cli: new new command

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-08-31 18:51:46 +02:00
parent ef8d8d88e5
commit 8d886dd33e
6 changed files with 64 additions and 36 deletions
+15 -29
View File
@@ -12,8 +12,7 @@ Options:
-h, --help
Commands:
create [options]
create-plugin [options]
new [options]
plugin:diff [options]
test
config:docs [options]
@@ -100,20 +99,6 @@ Options:
-h, --help
```
### `backstage-cli create`
```
Usage: backstage-cli create [options]
Options:
--select <name>
--option <name>=<value>
--scope <scope>
--npm-registry <URL>
--no-private
-h, --help
```
### `backstage-cli create-github-app`
```
@@ -123,19 +108,6 @@ Options:
-h, --help
```
### `backstage-cli create-plugin`
```
Usage: backstage-cli create-plugin [options]
Options:
--backend
--scope <scope>
--npm-registry <URL>
--no-private
-h, --help
```
### `backstage-cli info`
```
@@ -197,6 +169,20 @@ Options:
-h, --help
```
### `backstage-cli new`
```
Usage: backstage-cli new [options]
Options:
--select <name>
--option <name>=<value>
--scope <scope>
--npm-registry <URL>
--no-private
-h, --help
```
### `backstage-cli package`
```
+27 -3
View File
@@ -198,7 +198,7 @@ export function registerMigrateCommand(program: Command) {
export function registerCommands(program: Command) {
program
.command('create')
.command('new')
.storeOptionsAsProperties(false)
.description(
'Open up an interactive guide to creating new things in your app',
@@ -222,12 +222,36 @@ export function registerCommands(program: Command) {
.action(lazy(() => import('./create/create').then(m => m.default)));
program
.command('create-plugin')
.command('create', { hidden: true })
.storeOptionsAsProperties(false)
.description(
'Open up an interactive guide to creating new things in your app [DEPRECATED]',
)
.option(
'--select <name>',
'Select the thing you want to be creating upfront',
)
.option(
'--option <name>=<value>',
'Pre-fill options for the creation process',
(opt, arr: string[]) => [...arr, opt],
[],
)
.option('--scope <scope>', 'The scope to use for new packages')
.option(
'--npm-registry <URL>',
'The package registry to use for new packages',
)
.option('--no-private', 'Do not mark new packages as private')
.action(lazy(() => import('./create/create').then(m => m.default)));
program
.command('create-plugin', { hidden: true })
.option(
'--backend',
'Create plugin with the backend dependencies as default',
)
.description('Creates a new plugin in the current repository')
.description('Creates a new plugin in the current repository [DEPRECATED]')
.option('--scope <scope>', 'npm scope')
.option('--npm-registry <URL>', 'npm registry URL')
.option('--no-private', 'Public npm package')