@oclif/plugin-commands
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -0,1 +1,9 @@ | ||
<a name="1.1.0"></a> | ||
# [1.1.0](https://github.com/oclif/plugin-commands/compare/v1.0.0...v1.1.0) (2018-05-31) | ||
### Features | ||
* add --hidden flag ([e6b9424](https://github.com/oclif/plugin-commands/commit/e6b9424)) | ||
<a name="1.0.0"></a> | ||
@@ -2,0 +10,0 @@ # 1.0.0 (2018-05-31) |
@@ -33,4 +33,18 @@ import { Command } from '@oclif/command'; | ||
}; | ||
hidden: { | ||
name: string; | ||
char?: "a" | "b" | "i" | "p" | "q" | "s" | "u" | "g" | "c" | "d" | "e" | "f" | "h" | "j" | "k" | "l" | "m" | "n" | "o" | "r" | "t" | "v" | "x" | "y" | "z" | "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "X" | "Y" | "Z" | undefined; | ||
description?: string | undefined; | ||
hidden?: boolean | undefined; | ||
required?: boolean | undefined; | ||
dependsOn?: string[] | undefined; | ||
exclusive?: string[] | undefined; | ||
env?: string | undefined; | ||
parse(input: boolean, context: any): boolean; | ||
} & { | ||
type: "boolean"; | ||
allowNo: boolean; | ||
}; | ||
}; | ||
run(): Promise<void>; | ||
} |
@@ -9,4 +9,7 @@ "use strict"; | ||
const { flags } = this.parse(Commands); | ||
const commands = this.config.commands; | ||
_.sortBy(commands, 'id'); | ||
let commands = this.config.commands; | ||
if (!flags.hidden) { | ||
commands = commands.filter(c => !c.hidden); | ||
} | ||
commands = _.sortBy(commands, 'id'); | ||
if (flags.json) { | ||
@@ -26,3 +29,4 @@ cli_ux_1.default.styledJSON(commands); | ||
json: command_1.flags.boolean({ char: 'j', description: 'output in json format' }), | ||
hidden: command_1.flags.boolean({ description: 'also show hidden commands' }), | ||
}; | ||
exports.default = Commands; |
@@ -1,1 +0,1 @@ | ||
{"version":"1.0.0","commands":{"commands":{"id":"commands","description":"list all the commands","pluginName":"@oclif/plugin-commands","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help"},"json":{"name":"json","type":"boolean","char":"j","description":"output in json format"}},"args":[]}}} | ||
{"version":"1.1.0","commands":{"commands":{"id":"commands","description":"list all the commands","pluginName":"@oclif/plugin-commands","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help"},"json":{"name":"json","type":"boolean","char":"j","description":"output in json format"},"hidden":{"name":"hidden","type":"boolean","description":"also show hidden commands"}},"args":[]}}} |
{ | ||
"name": "@oclif/plugin-commands", | ||
"description": "plugin to show the list of all the commands", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"author": "Jeff Dickey @jdxcode", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/plugin-commands/issues", |
@@ -25,3 +25,3 @@ @oclif/plugin-commands | ||
$ oclif-example (-v|--version|version) | ||
@oclif/plugin-commands/1.0.0 linux-x64 node-v10.2.1 | ||
@oclif/plugin-commands/1.1.0 linux-x64 node-v10.2.1 | ||
$ oclif-example --help [COMMAND] | ||
@@ -48,5 +48,6 @@ USAGE | ||
-j, --json output in json format | ||
--hidden also show hidden commands | ||
``` | ||
_See code: [src/commands/commands.ts](https://github.com/oclif/plugin-commands/blob/v1.0.0/src/commands/commands.ts)_ | ||
_See code: [src/commands/commands.ts](https://github.com/oclif/plugin-commands/blob/v1.1.0/src/commands/commands.ts)_ | ||
<!-- commandsstop --> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
93334
84
52
0