Releases: lecstor/makitso
update the dist..
- add prepare script & update makitso-prompt properly.. c437b8a
upgrade makitso-prompt for Node 14 compatibility
Add ability to use Makitso apps non-interactively
Convert to Typescript
Typescript
fix incomplete and non-existent commands
don't die a flaming death just because the command is incomplete, or completely empty
command spec help function
commands can now provide a help function which returns a string to be added to the prompt header
Add `suggest` property to context `ask`
When context asks the user for a value it will now do so with a unique instance of makitso-prompt.
These instances have a basic autocomplete keypress module which is initialised with an array or function provided by the context ask.suggest property.
Include options in args
Options (--foo bar) will now be included in the args object commands are called with
Nested command structure
This release drops Commander, does some command processing of it's own and uses yargs-parser for options parsing. This has allowed for a nested command structure for grouping of commands, more flexibility in the command format, and automatic command suggest/complete functionality.
The format of command definitions have changed, with an args property replacing the command property. The actual commands used on the commandline are now defined as the keys in the commands definition object. There is also the option to set a top-level command group in the new plugin config object.
Actions no receive two arguments, the context object and an object containing the command options.
A new choices property in the command definition allows for suggest/autocomplete to be displayed for command arguments. The format of this property will likely change or be extended... WIP.
There's also some cursor positioning hackery intended to enable a line below the cursor to be used for suggestions, errors, etc. Early days, but it seems to work ok.