@oclif/plugin-commands 2.2.2 → 2.2.3

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 CHANGED
@@ -20,7 +20,7 @@ $ npm install -g @oclif/plugin-commands
20
20
  $ oclif-example COMMAND
21
21
  running command...
22
22
  $ oclif-example (--version)
23
- @oclif/plugin-commands/2.2.2 linux-x64 node-v18.12.1
23
+ @oclif/plugin-commands/2.2.3 linux-x64 node-v18.13.0
24
24
  $ oclif-example --help [COMMAND]
25
25
  USAGE
26
26
  $ oclif-example COMMAND
@@ -61,5 +61,5 @@ DESCRIPTION
61
61
  list all the commands
62
62
  ```
63
63
 
64
- _See code: [src/commands/commands.ts](https://github.com/oclif/plugin-commands/blob/v2.2.2/src/commands/commands.ts)_
64
+ _See code: [src/commands/commands.ts](https://github.com/oclif/plugin-commands/blob/v2.2.3/src/commands/commands.ts)_
65
65
  <!-- commandsstop -->
@@ -2,7 +2,19 @@ import { Command } from '@oclif/core';
2
2
  export default class Commands extends Command {
3
3
  static description: string;
4
4
  static enableJsonFlag: boolean;
5
- static flags: any;
5
+ static flags: {
6
+ columns: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
+ sort: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
+ filter: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
+ csv: import("@oclif/core/lib/interfaces").Flag<boolean>;
10
+ output: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
+ extended: import("@oclif/core/lib/interfaces").Flag<boolean>;
12
+ 'no-truncate': import("@oclif/core/lib/interfaces").Flag<boolean>;
13
+ 'no-header': import("@oclif/core/lib/interfaces").Flag<boolean>;
14
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
15
+ hidden: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ tree: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ };
6
18
  run(): Promise<unknown[] | import("@oclif/core/lib/cli-ux/styled/tree").Tree | undefined>;
7
19
  private getCommands;
8
20
  private removeCycles;
@@ -43,7 +43,7 @@ class Commands extends core_1.Command {
43
43
  }
44
44
  return tree;
45
45
  }
46
- core_1.CliUx.ux.table(commands.map(command => {
46
+ core_1.ux.table(commands.map(command => {
47
47
  // Massage some fields so it looks good in the table
48
48
  command.description = (command.description || '').split(os_1.EOL)[0];
49
49
  command.summary = (command.summary || (command.description || '').split(os_1.EOL)[0]);
@@ -113,4 +113,4 @@ class Commands extends core_1.Command {
113
113
  exports.default = Commands;
114
114
  Commands.description = 'list all the commands';
115
115
  Commands.enableJsonFlag = true;
116
- Commands.flags = Object.assign({ help: core_1.Flags.help({ char: 'h' }), hidden: core_1.Flags.boolean({ description: 'show hidden commands' }), tree: core_1.Flags.boolean({ description: 'show tree of commands' }) }, core_1.CliUx.ux.table.flags());
116
+ Commands.flags = Object.assign({ help: core_1.Flags.help({ char: 'h' }), hidden: core_1.Flags.boolean({ description: 'show hidden commands' }), tree: core_1.Flags.boolean({ description: 'show tree of commands' }) }, core_1.ux.table.flags());
@@ -1,4 +1,4 @@
1
- import { Interfaces } from '@oclif/core';
1
+ import { Command } from '@oclif/core';
2
2
  import { Tree } from '@oclif/core/lib/cli-ux/styled/tree';
3
- declare const createCommandTree: (commands: Interfaces.Command[], topicSeparator?: string) => Tree;
3
+ declare const createCommandTree: (commands: Command.Loadable[], topicSeparator?: string) => Tree;
4
4
  export default createCommandTree;
package/lib/utils/tree.js CHANGED
@@ -17,7 +17,7 @@ const addNodes = (tree, commandParts) => {
17
17
  }
18
18
  };
19
19
  const createCommandTree = (commands, topicSeparator = ':') => {
20
- const tree = core_1.CliUx.ux.tree();
20
+ const tree = core_1.ux.tree();
21
21
  commands.forEach(command => {
22
22
  const commandParts = command.id.split(topicSeparator);
23
23
  addNodes(tree, commandParts);
@@ -1 +1,116 @@
1
- {"version":"2.2.2","commands":{"commands":{"id":"commands","description":"list all the commands","strict":true,"pluginName":"@oclif/plugin-commands","pluginAlias":"@oclif/plugin-commands","pluginType":"core","aliases":[],"flags":{"json":{"name":"json","type":"boolean","description":"Format output as json.","helpGroup":"GLOBAL","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"hidden":{"name":"hidden","type":"boolean","description":"show hidden commands","allowNo":false},"tree":{"name":"tree","type":"boolean","description":"show tree of commands","allowNo":false},"columns":{"name":"columns","type":"option","description":"only show provided columns (comma-separated)","multiple":false,"exclusive":["extended"]},"sort":{"name":"sort","type":"option","description":"property to sort by (prepend '-' for descending)","multiple":false},"filter":{"name":"filter","type":"option","description":"filter property by partial string matching, ex: name=foo","multiple":false},"csv":{"name":"csv","type":"boolean","description":"output is csv format [alias: --output=csv]","allowNo":false,"exclusive":["no-truncate"]},"output":{"name":"output","type":"option","description":"output in a more machine friendly format","multiple":false,"options":["csv","json","yaml"],"exclusive":["no-truncate","csv"]},"extended":{"name":"extended","type":"boolean","char":"x","description":"show extra columns","allowNo":false,"exclusive":["columns"]},"no-truncate":{"name":"no-truncate","type":"boolean","description":"do not truncate output to fit screen","allowNo":false,"exclusive":["csv"]},"no-header":{"name":"no-header","type":"boolean","description":"hide table header from output","allowNo":false,"exclusive":["csv"]}},"args":[],"enableJsonFlag":true}}}
1
+ {
2
+ "version": "2.2.3",
3
+ "commands": {
4
+ "commands": {
5
+ "id": "commands",
6
+ "description": "list all the commands",
7
+ "strict": true,
8
+ "pluginName": "@oclif/plugin-commands",
9
+ "pluginAlias": "@oclif/plugin-commands",
10
+ "pluginType": "core",
11
+ "aliases": [],
12
+ "flags": {
13
+ "json": {
14
+ "name": "json",
15
+ "type": "boolean",
16
+ "description": "Format output as json.",
17
+ "helpGroup": "GLOBAL",
18
+ "allowNo": false
19
+ },
20
+ "help": {
21
+ "name": "help",
22
+ "type": "boolean",
23
+ "char": "h",
24
+ "description": "Show CLI help.",
25
+ "allowNo": false
26
+ },
27
+ "hidden": {
28
+ "name": "hidden",
29
+ "type": "boolean",
30
+ "description": "show hidden commands",
31
+ "allowNo": false
32
+ },
33
+ "tree": {
34
+ "name": "tree",
35
+ "type": "boolean",
36
+ "description": "show tree of commands",
37
+ "allowNo": false
38
+ },
39
+ "columns": {
40
+ "name": "columns",
41
+ "type": "option",
42
+ "description": "only show provided columns (comma-separated)",
43
+ "multiple": false,
44
+ "exclusive": [
45
+ "extended"
46
+ ]
47
+ },
48
+ "sort": {
49
+ "name": "sort",
50
+ "type": "option",
51
+ "description": "property to sort by (prepend '-' for descending)",
52
+ "multiple": false
53
+ },
54
+ "filter": {
55
+ "name": "filter",
56
+ "type": "option",
57
+ "description": "filter property by partial string matching, ex: name=foo",
58
+ "multiple": false
59
+ },
60
+ "csv": {
61
+ "name": "csv",
62
+ "type": "boolean",
63
+ "description": "output is csv format [alias: --output=csv]",
64
+ "allowNo": false,
65
+ "exclusive": [
66
+ "no-truncate"
67
+ ]
68
+ },
69
+ "output": {
70
+ "name": "output",
71
+ "type": "option",
72
+ "description": "output in a more machine friendly format",
73
+ "multiple": false,
74
+ "options": [
75
+ "csv",
76
+ "json",
77
+ "yaml"
78
+ ],
79
+ "exclusive": [
80
+ "no-truncate",
81
+ "csv"
82
+ ]
83
+ },
84
+ "extended": {
85
+ "name": "extended",
86
+ "type": "boolean",
87
+ "char": "x",
88
+ "description": "show extra columns",
89
+ "allowNo": false,
90
+ "exclusive": [
91
+ "columns"
92
+ ]
93
+ },
94
+ "no-truncate": {
95
+ "name": "no-truncate",
96
+ "type": "boolean",
97
+ "description": "do not truncate output to fit screen",
98
+ "allowNo": false,
99
+ "exclusive": [
100
+ "csv"
101
+ ]
102
+ },
103
+ "no-header": {
104
+ "name": "no-header",
105
+ "type": "boolean",
106
+ "description": "hide table header from output",
107
+ "allowNo": false,
108
+ "exclusive": [
109
+ "csv"
110
+ ]
111
+ }
112
+ },
113
+ "args": {}
114
+ }
115
+ }
116
+ }
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@oclif/plugin-commands",
3
3
  "description": "plugin to show the list of all the commands",
4
- "version": "2.2.2",
4
+ "version": "2.2.3",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/plugin-commands/issues",
7
7
  "dependencies": {
8
- "@oclif/core": "^1.2.0",
8
+ "@oclif/core": "^2.0.3",
9
9
  "lodash": "^4.17.11"
10
10
  },
11
11
  "devDependencies": {
12
- "@oclif/plugin-help": "^5.1.7",
13
- "@oclif/test": "^2.0.2",
12
+ "@oclif/plugin-help": "^5.2.0",
13
+ "@oclif/test": "^2.3.3",
14
14
  "@types/chai": "^4.3.4",
15
15
  "@types/lodash": "^4.14.191",
16
16
  "@types/mocha": "^8.0.0",
@@ -22,9 +22,9 @@
22
22
  "eslint-config-oclif-typescript": "^0.2.0",
23
23
  "globby": "^11",
24
24
  "mocha": "^8",
25
- "nock": "^13.0.0",
25
+ "nock": "^13.3.0",
26
26
  "nyc": "^15.1.0",
27
- "oclif": "^2.3.0",
27
+ "oclif": "^3.6.1",
28
28
  "shx": "^0.3.3",
29
29
  "ts-node": "^9.1.1",
30
30
  "tslib": "^2.4.1",
@@ -54,7 +54,7 @@
54
54
  "scripts": {
55
55
  "lint": "eslint . --ext .ts --config .eslintrc",
56
56
  "pretest": "yarn build && tsc -p test --noEmit",
57
- "test": "mocha --forbid-only \"test/**/*.test.ts\"",
57
+ "test": "mocha \"test/**/*.test.ts\"",
58
58
  "posttest": "yarn lint",
59
59
  "prepack": "shx rm -rf lib && tsc && oclif manifest . && oclif readme",
60
60
  "postpack": "shx rm -f oclif.manifest.json",