@oclif/plugin-commands 3.3.2 → 3.3.4
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 +2 -2
- package/lib/commands/commands.js +7 -10
- package/oclif.manifest.json +1 -1
- package/package.json +7 -15
- package/npm-shrinkwrap.json +0 -13261
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ $ npm install -g @oclif/plugin-commands
|
|
|
21
21
|
$ oclif-example COMMAND
|
|
22
22
|
running command...
|
|
23
23
|
$ oclif-example (--version)
|
|
24
|
-
@oclif/plugin-commands/3.3.
|
|
24
|
+
@oclif/plugin-commands/3.3.4 linux-x64 node-v20.12.2
|
|
25
25
|
$ oclif-example --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ oclif-example COMMAND
|
|
@@ -65,7 +65,7 @@ DESCRIPTION
|
|
|
65
65
|
list all the commands
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
_See code: [src/commands/commands.ts](https://github.com/oclif/plugin-commands/blob/v3.3.
|
|
68
|
+
_See code: [src/commands/commands.ts](https://github.com/oclif/plugin-commands/blob/v3.3.4/src/commands/commands.ts)_
|
|
69
69
|
<!-- commandsstop -->
|
|
70
70
|
|
|
71
71
|
# Contributing
|
package/lib/commands/commands.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { Command, Flags, toConfiguredId, ux } from '@oclif/core';
|
|
2
|
-
import
|
|
3
|
-
import sortBy from 'lodash.sortby';
|
|
4
|
-
import template from 'lodash.template';
|
|
5
|
-
import uniqBy from 'lodash.uniqby';
|
|
2
|
+
import _ from 'lodash';
|
|
6
3
|
import { EOL } from 'node:os';
|
|
7
4
|
import createCommandTree from '../utils/tree.js';
|
|
8
5
|
export default class Commands extends Command {
|
|
@@ -26,13 +23,13 @@ export default class Commands extends Command {
|
|
|
26
23
|
commands = commands.filter((c) => c.state !== 'deprecated' && !deprecatedAliases.has(c.id));
|
|
27
24
|
}
|
|
28
25
|
const { config } = this;
|
|
29
|
-
commands = sortBy(commands, 'id').map((command) => {
|
|
26
|
+
commands = _.sortBy(commands, 'id').map((command) => {
|
|
30
27
|
// Template supported fields.
|
|
31
28
|
command.description =
|
|
32
|
-
(typeof command.description === 'string' && template(command.description)({ command, config })) || undefined;
|
|
29
|
+
(typeof command.description === 'string' && _.template(command.description)({ command, config })) || undefined;
|
|
33
30
|
command.summary =
|
|
34
|
-
(typeof command.summary === 'string' && template(command.summary)({ command, config })) || undefined;
|
|
35
|
-
command.usage = (typeof command.usage === 'string' && template(command.usage)({ command, config })) || undefined;
|
|
31
|
+
(typeof command.summary === 'string' && _.template(command.summary)({ command, config })) || undefined;
|
|
32
|
+
command.usage = (typeof command.usage === 'string' && _.template(command.usage)({ command, config })) || undefined;
|
|
36
33
|
command.id = toConfiguredId(command.id, config);
|
|
37
34
|
return command;
|
|
38
35
|
});
|
|
@@ -52,14 +49,14 @@ export default class Commands extends Command {
|
|
|
52
49
|
// ES2022 will return all unset static properties on the prototype as undefined. This is different from ES2021
|
|
53
50
|
// which only returns the static properties that are set by defaults. In order to prevent
|
|
54
51
|
// Object.assign from overwriting the properties on the object, we need to filter out the undefined values.
|
|
55
|
-
Object.assign(obj, pickBy(commandClass, (v) => v !== undefined));
|
|
52
|
+
Object.assign(obj, _.pickBy(commandClass, (v) => v !== undefined));
|
|
56
53
|
}
|
|
57
54
|
// The plugin property on the loaded class contains a LOT of information including all the commands again. Remove it.
|
|
58
55
|
delete obj.plugin;
|
|
59
56
|
// If Command classes have circular references, don't break the commands command.
|
|
60
57
|
return this.removeCycles(obj);
|
|
61
58
|
}));
|
|
62
|
-
return uniqBy(formatted, 'id');
|
|
59
|
+
return _.uniqBy(formatted, 'id');
|
|
63
60
|
}
|
|
64
61
|
if (flags.tree) {
|
|
65
62
|
const tree = createCommandTree(commands, config.topicSeparator);
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oclif/plugin-commands",
|
|
3
3
|
"description": "plugin to show the list of all the commands",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.4",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/plugin-commands/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oclif/core": "^3.26.
|
|
9
|
-
"lodash
|
|
10
|
-
"lodash.sortby": "^4.7.0",
|
|
11
|
-
"lodash.template": "^4.5.0",
|
|
12
|
-
"lodash.uniqby": "^4.7.0"
|
|
8
|
+
"@oclif/core": "^3.26.6",
|
|
9
|
+
"lodash": "^4.17.21"
|
|
13
10
|
},
|
|
14
11
|
"devDependencies": {
|
|
15
12
|
"@commitlint/config-conventional": "^18",
|
|
@@ -17,10 +14,6 @@
|
|
|
17
14
|
"@oclif/prettier-config": "^0.2.1",
|
|
18
15
|
"@oclif/test": "^3.2.12",
|
|
19
16
|
"@types/chai": "^4.3.11",
|
|
20
|
-
"@types/lodash.pickby": "^4.6.9",
|
|
21
|
-
"@types/lodash.sortby": "^4.7.9",
|
|
22
|
-
"@types/lodash.template": "^4.5.3",
|
|
23
|
-
"@types/lodash.uniqby": "^4.7.9",
|
|
24
17
|
"@types/mocha": "^10.0.6",
|
|
25
18
|
"@types/node": "^18",
|
|
26
19
|
"chai": "^4.4.1",
|
|
@@ -33,7 +26,7 @@
|
|
|
33
26
|
"lint-staged": "^15",
|
|
34
27
|
"mocha": "^10.4.0",
|
|
35
28
|
"nyc": "^15.1.0",
|
|
36
|
-
"oclif": "^4.
|
|
29
|
+
"oclif": "^4.10.7",
|
|
37
30
|
"prettier": "^3.2.5",
|
|
38
31
|
"shx": "^0.3.3",
|
|
39
32
|
"ts-node": "^10.9.2",
|
|
@@ -45,8 +38,7 @@
|
|
|
45
38
|
"exports": "./lib/index.js",
|
|
46
39
|
"files": [
|
|
47
40
|
"/lib",
|
|
48
|
-
"/oclif.manifest.json"
|
|
49
|
-
"npm-shrinkwrap.json"
|
|
41
|
+
"/oclif.manifest.json"
|
|
50
42
|
],
|
|
51
43
|
"homepage": "https://github.com/oclif/plugin-commands",
|
|
52
44
|
"keywords": [
|
|
@@ -64,12 +56,12 @@
|
|
|
64
56
|
"repository": "oclif/plugin-commands",
|
|
65
57
|
"scripts": {
|
|
66
58
|
"build": "shx rm -rf lib && tsc",
|
|
67
|
-
"clean": "shx rm -f oclif.manifest.json
|
|
59
|
+
"clean": "shx rm -f oclif.manifest.json",
|
|
68
60
|
"compile": "tsc",
|
|
69
61
|
"lint": "eslint . --ext .ts",
|
|
70
62
|
"postpack": "yarn run clean",
|
|
71
63
|
"posttest": "yarn lint",
|
|
72
|
-
"prepack": "yarn build && oclif manifest && oclif readme
|
|
64
|
+
"prepack": "yarn build && oclif manifest && oclif readme",
|
|
73
65
|
"prepare": "husky && yarn build",
|
|
74
66
|
"pretest": "yarn build --noEmit && tsc -p test --noEmit",
|
|
75
67
|
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|