Beta.18 Changes/Features (`db` has a breaking change)
⚠️Breaking: New db
helper
lowdb updated to 2.0, so I updated the db
helper to support it.
- access/mutate the objects in the db directly. Then
.write()
to save your changes to the file. await db()
andawait myDb.write()
Example with a simple object:
You can also use an async
function to store the initial data:
Text Area prompt
Optional value
arg
choice objects used to require a value
. Now if you don't provide a value, it will simply return the entire object:
⚗️ Experimental "Multiple kenvs"
There was a ton 🏋️♀️ of internal work over the past couple weeks to get this working. The "big idea" is supporting multiple kit environments. For example:
- private/personal kenv
- shared kenv
- company kenv
- product kenv
Future plans
In an upcoming release:
- you'll be able to "click to install kenv from repo" (just like we do with individual scripts)
- update a git-controlled kenv (like a company kenv)
- the main prompt will be able to search for all scripts across kenvs.
- If multiple kenvs exist, creating a new script will ask you which kenv to create it in.
For now, you can try adding/creating/switching the help menu. It should all work fine, but will be waaaay cooler in the future 😎
Improved Error Prompt
Now when an error occurs, it takes the error data, shuts down the script, then prompts you on what to do. For example, trying to use the old db
would result in this:
Improved Tab Switching
Switching tabs will now cancel the previous tabs' script. Previously, if you quickly switched tabs on the main menu, the "Hot" tab results might show up in a different tab because the loaded after the tab switched. The internals around message passing between the script and the app now have a cancellation mechanism so you only get the latest result that matches the prompt/tab. (This was also a ton of internals refactoring work 😅)