All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
9.0.0 - 2023-07-15
- Support nestjs v10
- Support commander v11
- Update dependencies
- Remove Ora from dependencies and helpers
- Revert node engine in the runtime requirements to minimum version node v16 (required by commander v11)
8.0.0 - 2022-07-28
- Support nestjs v9
7.0.1 - 2021-11-25
- Add commander version as direct dependency
- Update dependencies
- Remove node engine from the runtime requirements
7.0.0 - 2021-07-28
- Migrate to commander v8.1.0.
6.0.0 - 2021-07-09
- Migrate to nestjs v8.0.0. Thanks to @Minishlink
5.0.1 - 2021-04-13
- Signature of
@Console
decorator has been updated.
ConsoleOptions has been replaced by CreateCommandOptions, to update from ^4.0.0 you simply have to change propertyname
bycommand
.
eg:@Console({name: "myCommand"})
=>@Console({command: "myCommand"})
- Command handler signature has changed. Options are now passed to the handler. See the command handler signature for more details
- Commander@< 7.2.0 is not any more supported. Please upgrade to latest version
npm install commander@^7.2.0
or using yarnyarn add commander@^7.2.0
- The helper formatResponse has been removed
- Update tests
- Remove calls to
command.exitOverride()
to simplify code - Native errors handling with commander
- update docs
- update dependencies
- Update to work with [email protected]
- All commands and sub commands are stored in the ConsoleService and can be found using the
ConsoleService.getCommand(name: string)
. Name is a command path separated by dots. eg:parent.command.subcommand
- Sub commands can now be registered on other subCommand without any args. If a parent command define options, they can be retrieved using
command.parent.opts()
inside the executed subCommand. This allow you to create group of command with global options based on parent options
- fix #302
4.0.0 - 2020-10-16
- Remove Pretiier format helpers and use JSON.stringify instead to reduce package size.
- update dependencies
- update docs
3.1.0 - 2020-07-30
- Update dependencies
- Update commander to v6
- Support required options (Warning, required options means option is required not the value. To force a required value use
<option>
instead[option]
)
3.0.6 - 2020-06-10
- Fix: command accept multiple arguments #148 (thanks to https://github.com/tzellman)
- Update dependencies
3.0.5 - 2020-05-05
- Fix #140 and #145 remove allowSyntheticDefaultImports to fit default nest application
3.0.4 - 2020-04-05
- Update dependencies
- Remove ignored files from npm build
- Fix #140 replace esModuleInterop by allowSyntheticDefaultImports
3.0.2 - 2020-23-04
- Update dependencies
- Update to support nest mono repo >= 7.0.0
- Update to Commander >= 5.0.0
2.1.0 - 2020-02-03
- Update dependencies
- Node 8 (carbon) is now deprecated (jest > v25)
- Update to Commander >= 4.1.1
- add badges in readme
2.0.3 - 2020-02-03
- Fix the return of the service's command. Updating the service to use
commander.parseAsync()
instead ofcommander.parse()
. Promise are now handled without event listener. Tests were improved.
- Replace tslint by eslint
- Remove I prefix from interfaces
2.0.1 - 2020-01-16
- Fix the app scanner register commands using decorators. Scanner now works with external and dynamic modules
2.0.0 - 2020-01-15
- BootstrapConsole method are not any more static. You must create an instance to boot.
- ConsoleService new methods
createCommand
andcreateGroupCommand
- Update dependencies versions
- Update to support commander ^4.0.1
- Possiblity to register multi dimensions commands and sub commands using decorators. (@Console({name: 'cliName'})). If two or more Console decorators with the same name are found, they will be grouped.
- Fix Command lifecycle to be able to resolve command's return or to catch errors
- BootstrapConsole.boot() return a promise resolving the command's return or throwing an error. This is usefull for testing.
1.2.1 - 2020-01-03
- Fix a type error during the bootstrap scan for decorators #61
- Remove implicit lodash dependency #59
- Update to support commander@^4 #58
1.2.0 - 2019-08-09
- Move commander as Peer Dependency
- Update to support commander@^3.0.0
1.1.4 - 2019-06-25
- Possiblity to register commands and sub commands (2d) using decorators. 2 new decorators @Console() and @Command()
1.0.2 - 2019-05-29
- Issue #18
1.0.1 - 2019-04-21
- Remove typescript peer dependency.
- Update dependencies versions
1.0.0 - 2019-04-12
- The bootstrap method has been moved and is now static in the new
BootstrapConsole
class, you can extend it if you need to change the default boot behavior. - New options for bootstrap
1.0.0-alpha.1 - 2019-04-08
- A decorator
InjectCli
to inject commander instance (patched for sub commands) as nestjs provider - A new methods
subCommands() => Command
in the classConsoleService
to get sub commands from a non patched commander instance. - Tests
- Update docs
- The instance method ConsoleService.log method was removed.
- The PatchedCommander interface was removed. You can import the Command interface from the nestjs-console module instead.
- Improve Commander override, type and service
- Fix git style sub commands to return a result if no arguments are submitted to the cli.
- Update of the bootstrap function signature
0.2.1 - 2019-04-07
- Fix doc
0.2.0 - 2019-04-07
- Update the dependencies to support nestjs ^6.0.0