@oclif/plugin-help 5.2.20 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -4
- package/lib/commands/help.d.ts +4 -4
- package/lib/commands/help.js +15 -18
- package/lib/index.js +1 -3
- package/oclif.lock +6330 -0
- package/oclif.manifest.json +30 -18
- package/package.json +34 -25
package/README.md
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
@oclif/plugin-help
|
|
2
|
-
===================
|
|
1
|
+
# @oclif/plugin-help
|
|
3
2
|
|
|
4
3
|
A CLI command to invoke the standard help functionality from [oclif/core](https://github.com/oclif/core).
|
|
5
4
|
|
|
6
5
|
[](https://npmjs.org/package/@oclif/plugin-help)
|
|
7
|
-
[](https://circleci.com/gh/oclif/plugin-help/tree/main)
|
|
8
|
-
[](https://ci.appveyor.com/project/heroku/plugin-help/branch/main)
|
|
9
6
|
[](https://snyk.io/test/npm/@oclif/plugin-help)
|
|
10
7
|
[](https://npmjs.org/package/@oclif/plugin-help)
|
|
11
8
|
[](https://github.com/oclif/plugin-help/blob/main/package.json)
|
package/lib/commands/help.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Command } from '@oclif/core';
|
|
2
2
|
export default class HelpCommand extends Command {
|
|
3
|
+
static args: {
|
|
4
|
+
commands: import("@oclif/core/lib/interfaces/parser.js").Arg<string | undefined, Record<string, unknown>>;
|
|
5
|
+
};
|
|
3
6
|
static description: string;
|
|
4
7
|
static flags: {
|
|
5
|
-
'nested-commands': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
6
|
-
};
|
|
7
|
-
static args: {
|
|
8
|
-
commands: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
|
|
8
|
+
'nested-commands': import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
9
9
|
};
|
|
10
10
|
static strict: boolean;
|
|
11
11
|
run(): Promise<void>;
|
package/lib/commands/help.js
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Args, Command, Flags, Help } from '@oclif/core';
|
|
2
|
+
export default class HelpCommand extends Command {
|
|
3
|
+
static args = {
|
|
4
|
+
commands: Args.string({ description: 'Command to show help for.', required: false }),
|
|
5
|
+
};
|
|
6
|
+
static description = 'Display help for <%= config.bin %>.';
|
|
7
|
+
static flags = {
|
|
8
|
+
'nested-commands': Flags.boolean({
|
|
9
|
+
char: 'n',
|
|
10
|
+
description: 'Include all nested commands in the output.',
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
static strict = false;
|
|
5
14
|
async run() {
|
|
6
|
-
const {
|
|
7
|
-
const help = new
|
|
15
|
+
const { argv, flags } = await this.parse(HelpCommand);
|
|
16
|
+
const help = new Help(this.config, { all: flags['nested-commands'] });
|
|
8
17
|
await help.showHelp(argv);
|
|
9
18
|
}
|
|
10
19
|
}
|
|
11
|
-
exports.default = HelpCommand;
|
|
12
|
-
HelpCommand.description = 'Display help for <%= config.bin %>.';
|
|
13
|
-
HelpCommand.flags = {
|
|
14
|
-
'nested-commands': core_1.Flags.boolean({
|
|
15
|
-
description: 'Include all nested commands in the output.',
|
|
16
|
-
char: 'n',
|
|
17
|
-
}),
|
|
18
|
-
};
|
|
19
|
-
HelpCommand.args = {
|
|
20
|
-
commands: core_1.Args.string({ required: false, description: 'Command to show help for.' }),
|
|
21
|
-
};
|
|
22
|
-
HelpCommand.strict = false;
|
package/lib/index.js
CHANGED