@oclif/plugin-which 3.1.9 → 3.2.0
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 +14 -2
- package/lib/commands/which.js +20 -4
- package/oclif.manifest.json +13 -1
- package/package.json +11 -12
- package/npm-shrinkwrap.json +0 -14832
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ $ npm install -g @oclif/plugin-which
|
|
|
21
21
|
$ oclif-example COMMAND
|
|
22
22
|
running command...
|
|
23
23
|
$ oclif-example (--version)
|
|
24
|
-
@oclif/plugin-which/3.
|
|
24
|
+
@oclif/plugin-which/3.2.0 linux-x64 node-v20.13.1
|
|
25
25
|
$ oclif-example --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ oclif-example COMMAND
|
|
@@ -52,9 +52,21 @@ EXAMPLES
|
|
|
52
52
|
See which plugin the `help` command is in:
|
|
53
53
|
|
|
54
54
|
$ oclif-example which help
|
|
55
|
+
|
|
56
|
+
Use colon separators.
|
|
57
|
+
|
|
58
|
+
$ oclif-example which foo:bar:baz
|
|
59
|
+
|
|
60
|
+
Use spaces as separators.
|
|
61
|
+
|
|
62
|
+
$ oclif-example which foo bar baz
|
|
63
|
+
|
|
64
|
+
Wrap command in quotes to use spaces as separators.
|
|
65
|
+
|
|
66
|
+
$ oclif-example which "foo bar baz"
|
|
55
67
|
```
|
|
56
68
|
|
|
57
|
-
_See code: [src/commands/which.ts](https://github.com/oclif/plugin-which/blob/v3.
|
|
69
|
+
_See code: [src/commands/which.ts](https://github.com/oclif/plugin-which/blob/v3.2.0/src/commands/which.ts)_
|
|
58
70
|
<!-- commandsstop -->
|
|
59
71
|
|
|
60
72
|
# Contributing
|
package/lib/commands/which.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Command,
|
|
1
|
+
import { Command, toConfiguredId } from '@oclif/core';
|
|
2
|
+
import { bold, cyan } from 'ansis';
|
|
2
3
|
export default class Which extends Command {
|
|
3
4
|
static description = 'Show which plugin a command is in.';
|
|
4
5
|
static enableJsonFlag = true;
|
|
@@ -7,12 +8,24 @@ export default class Which extends Command {
|
|
|
7
8
|
command: '<%= config.bin %> <%= command.id %> help',
|
|
8
9
|
description: 'See which plugin the `help` command is in:',
|
|
9
10
|
},
|
|
11
|
+
{
|
|
12
|
+
command: '<%= config.bin %> <%= command.id %> foo:bar:baz',
|
|
13
|
+
description: 'Use colon separators.',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
command: '<%= config.bin %> <%= command.id %> foo bar baz',
|
|
17
|
+
description: 'Use spaces as separators.',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
command: '<%= config.bin %> <%= command.id %> "foo bar baz"',
|
|
21
|
+
description: 'Wrap command in quotes to use spaces as separators.',
|
|
22
|
+
},
|
|
10
23
|
];
|
|
11
24
|
static strict = false;
|
|
12
25
|
async run() {
|
|
13
26
|
const { argv } = await this.parse(Which);
|
|
14
27
|
if (argv.length === 0) {
|
|
15
|
-
|
|
28
|
+
this.error('"which" expects a command name', {
|
|
16
29
|
suggestions: [`Provide a command id like this, "${this.config.bin} which your:command:here"`],
|
|
17
30
|
});
|
|
18
31
|
}
|
|
@@ -29,8 +42,11 @@ export default class Which extends Command {
|
|
|
29
42
|
}
|
|
30
43
|
}
|
|
31
44
|
if (!this.jsonEnabled()) {
|
|
32
|
-
|
|
33
|
-
|
|
45
|
+
this.log(bold(commandParts.join(this.config.topicSeparator)) + '\n');
|
|
46
|
+
this.log(`${cyan('plugin')}: ${result.plugin}`);
|
|
47
|
+
if (result.aliasOf) {
|
|
48
|
+
this.log(`${cyan('aliasOf')}: ${result.aliasOf}`);
|
|
49
|
+
}
|
|
34
50
|
}
|
|
35
51
|
return result;
|
|
36
52
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -8,6 +8,18 @@
|
|
|
8
8
|
{
|
|
9
9
|
"command": "<%= config.bin %> <%= command.id %> help",
|
|
10
10
|
"description": "See which plugin the `help` command is in:"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"command": "<%= config.bin %> <%= command.id %> foo:bar:baz",
|
|
14
|
+
"description": "Use colon separators."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"command": "<%= config.bin %> <%= command.id %> foo bar baz",
|
|
18
|
+
"description": "Use spaces as separators."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"command": "<%= config.bin %> <%= command.id %> \"foo bar baz\"",
|
|
22
|
+
"description": "Wrap command in quotes to use spaces as separators."
|
|
11
23
|
}
|
|
12
24
|
],
|
|
13
25
|
"flags": {
|
|
@@ -39,5 +51,5 @@
|
|
|
39
51
|
]
|
|
40
52
|
}
|
|
41
53
|
},
|
|
42
|
-
"version": "3.
|
|
54
|
+
"version": "3.2.0"
|
|
43
55
|
}
|
package/package.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oclif/plugin-which",
|
|
3
3
|
"description": "find which plugin a command is in",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.2.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/plugin-which/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oclif/core": "^
|
|
8
|
+
"@oclif/core": "^4.0.0-beta.13",
|
|
9
|
+
"ansis": "^3.2.0"
|
|
9
10
|
},
|
|
10
11
|
"devDependencies": {
|
|
11
|
-
"@commitlint/config-conventional": "^
|
|
12
|
+
"@commitlint/config-conventional": "^19",
|
|
12
13
|
"@oclif/plugin-help": "^6",
|
|
13
14
|
"@oclif/prettier-config": "^0.2.1",
|
|
15
|
+
"@oclif/test": "^4.0.2",
|
|
14
16
|
"@types/chai": "^4.3.11",
|
|
15
17
|
"@types/mocha": "^10.0.6",
|
|
16
18
|
"@types/node": "^18",
|
|
17
|
-
"@types/sinon": "^17.0.3",
|
|
18
19
|
"chai": "^4.4.1",
|
|
19
|
-
"commitlint": "^
|
|
20
|
+
"commitlint": "^19",
|
|
20
21
|
"eslint": "^8.57.0",
|
|
21
|
-
"eslint-config-oclif": "^5.
|
|
22
|
+
"eslint-config-oclif": "^5.2.0",
|
|
22
23
|
"eslint-config-oclif-typescript": "^3.1.7",
|
|
23
24
|
"eslint-config-prettier": "^9.1.0",
|
|
24
25
|
"husky": "^9",
|
|
25
26
|
"lint-staged": "^15",
|
|
26
27
|
"mocha": "^10.4.0",
|
|
27
28
|
"nyc": "^15.1.0",
|
|
28
|
-
"oclif": "^4.
|
|
29
|
+
"oclif": "^4.11.0",
|
|
29
30
|
"prettier": "^3.2.5",
|
|
30
31
|
"shx": "^0.3.4",
|
|
31
|
-
"sinon": "^17.0.1",
|
|
32
32
|
"ts-node": "^10.9.2",
|
|
33
33
|
"typescript": "^5.4.5"
|
|
34
34
|
},
|
|
@@ -38,8 +38,7 @@
|
|
|
38
38
|
"exports": "./lib/index.js",
|
|
39
39
|
"files": [
|
|
40
40
|
"/lib",
|
|
41
|
-
"/oclif.manifest.json"
|
|
42
|
-
"/npm-shrinkwrap.json"
|
|
41
|
+
"/oclif.manifest.json"
|
|
43
42
|
],
|
|
44
43
|
"homepage": "https://github.com/oclif/plugin-which",
|
|
45
44
|
"keywords": [
|
|
@@ -58,12 +57,12 @@
|
|
|
58
57
|
"repository": "oclif/plugin-which",
|
|
59
58
|
"scripts": {
|
|
60
59
|
"build": "shx rm -rf lib && tsc",
|
|
61
|
-
"clean": "shx rm -f oclif.manifest.json
|
|
60
|
+
"clean": "shx rm -f oclif.manifest.json",
|
|
62
61
|
"compile": "tsc",
|
|
63
62
|
"lint": "eslint . --ext .ts",
|
|
64
63
|
"postpack": "yarn run clean",
|
|
65
64
|
"posttest": "yarn lint",
|
|
66
|
-
"prepack": "yarn build && oclif manifest && oclif readme
|
|
65
|
+
"prepack": "yarn build && oclif manifest && oclif readme",
|
|
67
66
|
"prepare": "husky && yarn build",
|
|
68
67
|
"pretest": "yarn build && tsc -p test --noEmit",
|
|
69
68
|
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|