Releases: jmcdo29/nest-commander
[email protected]
Minor Changes
-
6c9eaa3: Commands can now be built with the expectation of reading in plugins to dynamically modify the CLI
By using the
usePlugins
option for theCommandFactory
, the built CLI can expect to find a configuration file atnest-commander.json
(or several others, check the docs) to allow for users to plug commands in after the CLI is built. -
13723bd: Subcommands can now be created
There's a new decorator,
@SubCommand()
for creating nested commands likedocker compose up
. There's also a new option on@Command()
(subCommands
) for setting up this sub command relationship.
[email protected]
Minor Changes
-
3831e52: Adds a new
@Help()
decorator for custom commander help outputnest-commander-testing
now also uses ahex
instead ofutf-8
encoding when creating a random js file name during theCommandTestFactory
command. This is to help create more predictable output names.
[email protected]
Patch Changes
-
3831e52: Adds a new
@Help()
decorator for custom commander help outputnest-commander-testing
now also uses ahex
instead ofutf-8
encoding when creating a random js file name during theCommandTestFactory
command. This is to help create more predictable output names.
[email protected]
Minor Changes
-
7cce284: Add ability to use error handler for commander errors
Within the
CommandFactory.run()
now as a second parameter you can either keep passing just the logger, or you can pass in an object with the logger and anerrorHandler
. ThserrorHandler
is a method that takes in anError
and returnsvoid
. The errorHandler will be passed to commander'sexitOverride
method, if it exists. This is useful for better handling errors and giving the dev more control over what is seen. There is also no longer anunhandledPromiseRejection
on empty commands.
[email protected]
Major Changes
- 28cc116: Releases two schematics for the angular and nest CLI's to make use of
command
andquestion
. To use one, you can pass--collection nest-commander-schematic
to Nest's CLI and then the schematic name followed by the name of the feature. e.g.nest g --collection nest-commander-schematics command foo
.
V1.1.0
Features
- new
InquirerService
to allow for integration with Inquirer. Check this blog post for more info