@oclif/plugin-which 2.1.0 → 2.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 +2 -2
- package/lib/commands/which.js +8 -2
- package/oclif.manifest.json +1 -1
- package/package.json +14 -13
- package/CHANGELOG.md +0 -72
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g @oclif/plugin-which
|
|
|
20
20
|
$ oclif-example COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ oclif-example (--version)
|
|
23
|
-
@oclif/plugin-which/2.
|
|
23
|
+
@oclif/plugin-which/2.2.0 linux-x64 node-v18.12.0
|
|
24
24
|
$ oclif-example --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ oclif-example COMMAND
|
|
@@ -43,5 +43,5 @@ DESCRIPTION
|
|
|
43
43
|
Show which plugin a command is in.
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
_See code: [src/commands/which.ts](https://github.com/oclif/plugin-which/blob/v2.
|
|
46
|
+
_See code: [src/commands/which.ts](https://github.com/oclif/plugin-which/blob/v2.2.0/src/commands/which.ts)_
|
|
47
47
|
<!-- commandsstop -->
|
package/lib/commands/which.js
CHANGED
|
@@ -4,8 +4,14 @@ const core_1 = require("@oclif/core");
|
|
|
4
4
|
class Which extends core_1.Command {
|
|
5
5
|
async run() {
|
|
6
6
|
const { argv } = await this.parse(Which);
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
let command = argv;
|
|
8
|
+
if (argv.length === 1 && typeof argv[0] === 'string') {
|
|
9
|
+
// If this if statement is true then the command to find was passed in as a single string, e.g. `mycli which "my command"`
|
|
10
|
+
// So we must use the topicSeparator to split it into an array
|
|
11
|
+
command = argv[0].split(this.config.topicSeparator);
|
|
12
|
+
}
|
|
13
|
+
const cmd = this.config.findCommand(command.join(':'), { must: true });
|
|
14
|
+
core_1.CliUx.ux.styledHeader(command.join(this.config.topicSeparator));
|
|
9
15
|
core_1.CliUx.ux.styledObject({
|
|
10
16
|
plugin: cmd.pluginName,
|
|
11
17
|
}, ['plugin']);
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.
|
|
1
|
+
{"version":"2.2.0","commands":{"which":{"id":"which","description":"Show which plugin a command is in.","strict":false,"pluginName":"@oclif/plugin-which","pluginAlias":"@oclif/plugin-which","pluginType":"core","aliases":[],"flags":{},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oclif/plugin-which",
|
|
3
3
|
"description": "find which plugin a command is in",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/plugin-which/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oclif/core": "^1.
|
|
9
|
-
"tslib": "^2.
|
|
8
|
+
"@oclif/core": "^1.18.0",
|
|
9
|
+
"tslib": "^2.4.0"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@oclif/plugin-help": "^5.1.
|
|
13
|
-
"@oclif/test": "^2.
|
|
14
|
-
"@types/chai": "^4.1
|
|
12
|
+
"@oclif/plugin-help": "^5.1.17",
|
|
13
|
+
"@oclif/test": "^2.2.6",
|
|
14
|
+
"@types/chai": "^4.3.1",
|
|
15
15
|
"@types/mocha": "^9",
|
|
16
|
-
"@types/node": "^14.18.
|
|
16
|
+
"@types/node": "^14.18.33",
|
|
17
17
|
"chai": "^4.2.0",
|
|
18
18
|
"eslint": "^7.32.0",
|
|
19
19
|
"eslint-config-oclif": "^4.0.0",
|
|
20
|
-
"eslint-config-oclif-typescript": "^1.0.
|
|
20
|
+
"eslint-config-oclif-typescript": "^1.0.3",
|
|
21
21
|
"globby": "^11",
|
|
22
22
|
"mocha": "^9",
|
|
23
23
|
"nyc": "^15.1.0",
|
|
24
|
-
"oclif": "^2.3
|
|
24
|
+
"oclif": "^2.6.3",
|
|
25
|
+
"shx": "^0.3.4",
|
|
25
26
|
"ts-node": "^9.0.0",
|
|
26
|
-
"typescript": "4.4
|
|
27
|
+
"typescript": "4.6.4"
|
|
27
28
|
},
|
|
28
29
|
"engines": {
|
|
29
30
|
"node": ">=12.0.0"
|
|
@@ -46,14 +47,14 @@
|
|
|
46
47
|
},
|
|
47
48
|
"repository": "oclif/plugin-which",
|
|
48
49
|
"scripts": {
|
|
49
|
-
"postpack": "rm -f oclif.manifest.json",
|
|
50
|
+
"postpack": "shx rm -f oclif.manifest.json",
|
|
50
51
|
"posttest": "yarn lint",
|
|
51
52
|
"prepack": "yarn build && oclif manifest . && oclif readme",
|
|
52
53
|
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
53
54
|
"version": "oclif readme && git add README.md",
|
|
54
55
|
"lint": "eslint . --ext .ts --config .eslintrc",
|
|
55
56
|
"pretest": "yarn build && tsc -p test --noEmit",
|
|
56
|
-
"build": "rm -rf lib && tsc"
|
|
57
|
+
"build": "shx rm -rf lib && tsc"
|
|
57
58
|
},
|
|
58
59
|
"main": "lib/index.js"
|
|
59
|
-
}
|
|
60
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
-
|
|
5
|
-
## [2.1.0](https://github.com/oclif/plugin-which/compare/v2.0.5...v2.1.0) (2022-01-28)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Features
|
|
9
|
-
|
|
10
|
-
* remove cli-ux ([4eaa693](https://github.com/oclif/plugin-which/commit/4eaa6933815cce5e3de0c2b1e602f0e2d81c25e7))
|
|
11
|
-
|
|
12
|
-
### [2.0.5](https://github.com/oclif/plugin-which/compare/v2.0.4...v2.0.5) (2022-01-06)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### Bug Fixes
|
|
16
|
-
|
|
17
|
-
* add main to package.json ([#212](https://github.com/oclif/plugin-which/issues/212)) ([bff22f0](https://github.com/oclif/plugin-which/commit/bff22f062c0fef6fb9f4679e09f8ab9c48255977))
|
|
18
|
-
|
|
19
|
-
### [2.0.4](https://github.com/oclif/plugin-which/compare/v2.0.3...v2.0.4) (2021-12-17)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
### Bug Fixes
|
|
23
|
-
|
|
24
|
-
* bump deps ([0a1c4d9](https://github.com/oclif/plugin-which/commit/0a1c4d9b385d692dc7ec98c3ac85ebb7b0693542))
|
|
25
|
-
|
|
26
|
-
### [2.0.3](https://github.com/oclif/plugin-which/compare/v2.0.2...v2.0.3) (2021-12-17)
|
|
27
|
-
|
|
28
|
-
### [2.0.2](https://github.com/oclif/plugin-which/compare/v2.0.1...v2.0.2) (2021-12-02)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### Bug Fixes
|
|
32
|
-
|
|
33
|
-
* allow commands with spaces ([7b1910a](https://github.com/oclif/plugin-which/commit/7b1910aa314cb98dd7d0ae44e195eccd94d25669))
|
|
34
|
-
|
|
35
|
-
### [2.0.1](https://github.com/oclif/plugin-which/compare/v2.0.0...v2.0.1) (2021-12-02)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
### Bug Fixes
|
|
39
|
-
|
|
40
|
-
* bump core version ([49edb83](https://github.com/oclif/plugin-which/commit/49edb83b744e2de27fc0a0ed16447b75368c4086))
|
|
41
|
-
* get deps aligned ([9396b57](https://github.com/oclif/plugin-which/commit/9396b5768f946286c97d9239120bd5fb58defdbf))
|
|
42
|
-
* pin oclif ([377c6fa](https://github.com/oclif/plugin-which/commit/377c6fa2d3a175cd8ffa52552bb266c2ef7ebf85))
|
|
43
|
-
|
|
44
|
-
## [1.0.3](https://github.com/oclif/plugin-which/compare/v1.0.2...v1.0.3) (2018-10-13)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
### Bug Fixes
|
|
48
|
-
|
|
49
|
-
* remove greenkeeper badge ([281ab74](https://github.com/oclif/plugin-which/commit/281ab74))
|
|
50
|
-
|
|
51
|
-
## [1.0.2](https://github.com/oclif/plugin-which/compare/v1.0.1...v1.0.2) (2018-09-14)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
### Bug Fixes
|
|
55
|
-
|
|
56
|
-
* lint issue ([47b0f5b](https://github.com/oclif/plugin-which/commit/47b0f5b))
|
|
57
|
-
|
|
58
|
-
<a name="1.0.1"></a>
|
|
59
|
-
## [1.0.1](https://github.com/oclif/plugin-which/compare/v1.0.0...v1.0.1) (2018-05-22)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
### Bug Fixes
|
|
63
|
-
|
|
64
|
-
* bust circle cache ([4021744](https://github.com/oclif/plugin-which/commit/4021744))
|
|
65
|
-
|
|
66
|
-
<a name="1.0.0"></a>
|
|
67
|
-
# 1.0.0 (2018-05-22)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
### Features
|
|
71
|
-
|
|
72
|
-
* added which command ([9a63dbd](https://github.com/oclif/plugin-which/commit/9a63dbd))
|