@oclif/plugin-commands 2.2.3 → 2.2.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 +8 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
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.
|
|
23
|
+
@oclif/plugin-commands/2.2.4 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.
|
|
64
|
+
_See code: [src/commands/commands.ts](https://github.com/oclif/plugin-commands/blob/v2.2.4/src/commands/commands.ts)_
|
|
65
65
|
<!-- commandsstop -->
|
package/lib/commands/commands.js
CHANGED
|
@@ -22,7 +22,14 @@ class Commands extends core_1.Command {
|
|
|
22
22
|
});
|
|
23
23
|
if (this.jsonEnabled() && !flags.tree) {
|
|
24
24
|
const formatted = await Promise.all(commands.map(async (cmd) => {
|
|
25
|
-
|
|
25
|
+
// @ts-expect-error
|
|
26
|
+
let commandClass = {};
|
|
27
|
+
try {
|
|
28
|
+
commandClass = await cmd.load();
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
this.debug(error);
|
|
32
|
+
}
|
|
26
33
|
const obj = Object.assign(Object.assign({}, cmd), commandClass);
|
|
27
34
|
// Load all properties on all extending classes.
|
|
28
35
|
while (commandClass !== undefined) {
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED