Skip to content

Releases: varabyte/kobweb-cli

v0.9.18

11 Nov 23:55
Compare
Choose a tag to compare

This small release adds handling for the new site.basePath configuration property.

Note

Previously, Kobweb used a property called routePrefix, but that name is getting migrated to basePath, after it was discovered that that was the terminology used by most other web frameworks.

Full Changelog: v0.9.17...v0.9.18

v0.9.17

23 Oct 20:42
Compare
Choose a tag to compare

This release contains some nice improvements around detecting and stopping unexpectedly running Kobweb servers.

However, the biggest visible change is color formatted help. For example, if you run kobweb run --help:

Kotter color formatted help example

Changes

  • Help pages are now formatted with color for easier readability.

  • Made git syncing logic more robust when pulling from repos regardless of how they name their main / master branch.

  • If a running Kobweb server is detected at the start of running kobweb run or kobweb export, interactive mode will now give the user an opportunity to stop it at that point, instead of just quitting and asking the user to run kobweb stop manually.

  • If a running Kobweb server is detected after trying to quit a kobweb run early, it will now be shut down.

    • Users have reported that a occasionally a Kobweb server gets spun up even after quitting a Kobweb build. This is because, despite the cancellation request going through to Gradle, it doesn't mean that it hadn't yet executed the task that spins up a Kobweb server.
    • This issue has likely gotten worse after enabling configuration and build caches, as now this can happen a lot easier actually due to tasks being executed a lot quicker now.

Thanks

  • Thanks to @EchoEllet for their support migrating Kobweb over to the latest version of Clikt! This really got the ball rolling on enabling the colored help formatting feature.

Full Changelog: v0.9.16...v0.9.17

v0.9.16

12 Sep 03:50
Compare
Choose a tag to compare

Changes

  • kobweb create will now make a best-effort match if it can't find an exact match.

    • For example, kobweb create todo will put the cursor on the examples/todo project.
  • Added support for the new FULLSTACK layout value.

    • KOBWEB, the legacy value, is still supported, but deprecated.
  • Updated Gradle reporting code to always show errors first, if both errors and warnings are reported during compilation.

  • When running in --notty mode, now exit with an error code if the relevant Kobweb command fails.

    • Users were doing exports in Docker containers that were failing due to OOM errors but they didn't realize it because kobweb export was itself returning a successful exit code. This resulted in users getting a confusing error later about the site folder not being found... which, of course it wasn't created -- the export had actually failed!

      Now users will get a failure message closer to where the error happened, which should make it easier for them to browse the logs to find out what really went wrong.

  • Made template parsing logic more robust.

    • So the CLI won't crash if it encounters a template it can't parse for any reason.

Full Changelog: v0.9.15...v0.9.16

v0.9.15

22 Feb 22:32
Compare
Choose a tag to compare

This release is nearly identical to v0.9.14 but with a tiny yet critical fix. (You are strongly encouraged to read those release notes instead because they are much more interesting and relevant to you as a user!)

Unfortunately, v0.9.14 hit a very niche issue where the compiler building the code hooked it up to a JDK16 API despite the build scripts set up to target JDK11. You can see this YouTrack issue for more details.

For this release, we actually changed the code to a functionally identical algorithm that avoids using the problematic API, but we also introduced a new process where we have the GitHub CI build the artifacts rather than build them locally. This ensures a sterile, consistent environment for builds where the only JDK available there is JDK11.

v0.9.14

22 Feb 19:55
Compare
Choose a tag to compare

kobweb-run-recovery

  • We now attempt some recovery behavior if a Kobweb project cannot be found.

    • If the user runs kobweb run, kobweb stop, or kobweb export in the wrong directory, we now look in nested folders if it's there instead.
    • This should help new users who run kobweb run in their root project and not the site subfolder, for example.
    • The search is limited to a depth of 2, so running kobweb in a totally incorrect place shouldn't cause major hanging issues.
  • kobweb create ... now attempts to find a close match if no exact match is found.

    • e.g. kobweb create clock is invalid, because the project is called examples/clock. As before, we show the user a list of templates to choose from in this case; but now, the cursor will point to the examples/clock line automatically so the user just has to press enter.
  • Fixed an issue where externally stopping a Kobweb server would cause kobweb to hang.

    • e.g. In terminal 1, run kobweb run. Once running, in terminal 2, run kobweb stop.
  • Yes/no questions now use a simpler [Yes] No widget instead of asking the user to type "Yes" or "No".

  • kobweb conf now uses general yaml parsing and not reflection, for a simpler, more future-proof approach.

    • Plus, reflection is ugly!
    • As a bonus, the command now also lists all possible queries if the user doesn't specify any query at all, or if they specify an invalid one.
  • kobweb help now works the same as kobweb --help

Internal

  • Kobweb Templates now support a maximumVersion value in addition to a minimumVersion.

    • In the future, this will allow us to fork templates over and add new features to them without breaking older users, who can continue to fetch the older versions in their case.
  • Removed the long deprecated --mode parameter. Users should be using --notty instead.

  • Added not to the list of freemarker methods available in templates.

    • This will allow us to clean up the empty template considerably after enough time passes that users can upgrade.
  • Added an informative error message instead of crashing if the user's .kobweb folder is somehow missing a conf.yaml file.

Full Changelog: v0.9.13...v0.9.14

v0.9.13

05 Jul 21:17
Compare
Choose a tag to compare
  • New --path / -p parameter which allows you to specify an explicit path to your kobweb app module, instead of requiring you run kobweb in the current working directory.
    • For example: kobweb run -p ~/my-kobweb-app/site
  • This version should have far less egregious repainting / flickering issues in response to window resizing / text filling up with full height of your terminal window.
  • The CLI now prints the Gradle command used.
    • For example, running kobweb run results in:
      $ gradlew kobwebStart -PkobwebEnv=DEV -PkobwebRunLayout=KOBWEB -t --stacktrace
      > Task :kotlinNodeJsSetup
      > Task :kotlinNpmCachesSetup
      ...
    • Most users will never need this, but it can be convenient if you want to create an equivalent run task in your IntelliJ IDE for example.
  • New --gradle arguments for advanced configuration of Gradle.
    • For example, kobweb run --gradle quiet --gradle-start --build-cache would pass the --quiet argument to both start and stop phases, but it would only pass the --build-cache argument to the start phase.
  • Fixed an issue that could result in not using the Gradle version associated with your project.

Run

  • kobweb run now accepts an optional --foreground value (which must be paired with --notty)
    • If passed in, the CLI program will stay active while the server is running, and you can use CTRL-C to both exit the app and shutdown the server in one keystroke.
    • Before, the CLI program would finish running immediately, leaving a kobweb server running in the background until you explicitly ran kobweb stop
    • kobweb run --notty --foreground can be useful when deploying your web server using a remote service, such as one configured with a Dockerfile.

v0.0.1

21 Apr 19:17
59e8dbc
Compare
Choose a tag to compare
v0.0.1 Pre-release
Pre-release

⚠️ ⚠️ ⚠️ DO NOT USE ⚠️ ⚠️ ⚠️

This release is for internal testing only.


For Kotter CLI devs, the way this release is populated is by doing the following:

  • Edit gradle/libs.versions.toml, set "kobweb-cli" to "0.0.1"
  • Run :kobweb:assembleShadowDist
  • Delete any existing binaries attached to this release
  • Upload contents from kobweb/build/distributions into this release.

v0.9.12

12 Apr 05:24
Compare
Choose a tag to compare
v0.9.12 Pre-release
Pre-release

This release is a fork of https://github.com/varabyte/kobweb/releases/tag/cli-v0.9.12, so please refer to that link for more details.

From this point forward, this repository will be the source of truth for the Kobweb CLI.