hide deprecated commands from the list of commands
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
@@ -18,9 +18,11 @@ Commands:
|
||||
config:docs
|
||||
config:print
|
||||
config:schema
|
||||
create-github-app
|
||||
help [command]
|
||||
info
|
||||
migrate [command]
|
||||
new
|
||||
package [command]
|
||||
repo [command]
|
||||
versions:bump
|
||||
@@ -132,6 +134,15 @@ Options:
|
||||
--version
|
||||
```
|
||||
|
||||
### `backstage-cli-alpha create-github-app`
|
||||
|
||||
```
|
||||
Usage: program [options] <github-org>
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli-alpha info`
|
||||
|
||||
```
|
||||
@@ -204,6 +215,23 @@ Options:
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli-alpha new`
|
||||
|
||||
```
|
||||
Usage: program [options]
|
||||
|
||||
Options:
|
||||
--baseVersion <version>
|
||||
--license <license>
|
||||
--no-private
|
||||
--npm-registry <URL>
|
||||
--option <name>=<value>
|
||||
--scope <scope>
|
||||
--select <name>
|
||||
--skip-install
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli-alpha package`
|
||||
|
||||
```
|
||||
|
||||
@@ -12,17 +12,11 @@ Options:
|
||||
-h, --help
|
||||
|
||||
Commands:
|
||||
build-workspace [options] <workspace-dir> [packages...]
|
||||
config:check [options]
|
||||
config:docs [options]
|
||||
config:print [options]
|
||||
config:schema [options]
|
||||
repo [command]
|
||||
package [command]
|
||||
versions:bump [options]
|
||||
versions:migrate [options]
|
||||
migrate [command]
|
||||
build-workspace [options] <workspace-dir> [packages...]
|
||||
info
|
||||
new [options]
|
||||
create-github-app <github-org>
|
||||
help [command]
|
||||
info
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
import { Command } from 'commander';
|
||||
import { lazy } from '../lib/lazy';
|
||||
import { registerCommands as registerConfigCommands } from '../modules/config';
|
||||
import {
|
||||
registerPackageCommands as registerPackageBuildCommands,
|
||||
|
||||
@@ -69,6 +69,7 @@ export default createCliPlugin({
|
||||
reg.addCommand({
|
||||
path: ['create'],
|
||||
description: 'Create a new Backstage app',
|
||||
deprecated: true,
|
||||
execute: async () => {
|
||||
removed("use 'backstage-cli new' instead")();
|
||||
},
|
||||
@@ -76,6 +77,7 @@ export default createCliPlugin({
|
||||
reg.addCommand({
|
||||
path: ['create-plugin'],
|
||||
description: 'Create a new Backstage plugin',
|
||||
deprecated: true,
|
||||
execute: async () => {
|
||||
removed("use 'backstage-cli new' instead")();
|
||||
},
|
||||
|
||||
@@ -88,7 +88,7 @@ export class CliInitializer {
|
||||
);
|
||||
} else {
|
||||
argParser
|
||||
.command(node.name)
|
||||
.command(node.name, { hidden: !!node.command.deprecated })
|
||||
.description(node.command.description)
|
||||
.helpOption(false)
|
||||
.allowUnknownOption(true)
|
||||
|
||||
@@ -18,6 +18,7 @@ import { CommandRegistry } from './CommandRegistry';
|
||||
export interface BackstageCommand {
|
||||
path: string[];
|
||||
description: string;
|
||||
deprecated?: boolean;
|
||||
execute: (options: { args: string[] }) => Promise<void>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user