@oclif/plugin-which 2.2.6 → 2.2.8

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-which
20
20
  $ oclif-example COMMAND
21
21
  running command...
22
22
  $ oclif-example (--version)
23
- @oclif/plugin-which/2.2.6 linux-x64 node-v18.12.1
23
+ @oclif/plugin-which/2.2.8 linux-x64 node-v18.13.0
24
24
  $ oclif-example --help [COMMAND]
25
25
  USAGE
26
26
  $ oclif-example COMMAND
@@ -41,7 +41,12 @@ USAGE
41
41
 
42
42
  DESCRIPTION
43
43
  Show which plugin a command is in.
44
+
45
+ EXAMPLES
46
+ See which plugin the `help` command is in:
47
+
48
+ $ oclif-example which help
44
49
  ```
45
50
 
46
- _See code: [src/commands/which.ts](https://github.com/oclif/plugin-which/blob/v2.2.6/src/commands/which.ts)_
51
+ _See code: [src/commands/which.ts](https://github.com/oclif/plugin-which/blob/v2.2.8/src/commands/which.ts)_
47
52
  <!-- commandsstop -->
@@ -2,5 +2,9 @@ import { Command } from '@oclif/core';
2
2
  export default class Which extends Command {
3
3
  static description: string;
4
4
  static strict: boolean;
5
+ static examples: {
6
+ description: string;
7
+ command: string;
8
+ }[];
5
9
  run(): Promise<void>;
6
10
  }
@@ -10,6 +10,9 @@ class Which extends core_1.Command {
10
10
  // So we must use the topicSeparator to split it into an array
11
11
  command = argv[0].split(this.config.topicSeparator);
12
12
  }
13
+ else {
14
+ throw new Error('"which" expects a command name. Try something like "which your:command:here" ');
15
+ }
13
16
  const cmd = this.config.findCommand(command.join(':'), { must: true });
14
17
  core_1.CliUx.ux.styledHeader(command.join(this.config.topicSeparator));
15
18
  core_1.CliUx.ux.styledObject({
@@ -20,3 +23,9 @@ class Which extends core_1.Command {
20
23
  exports.default = Which;
21
24
  Which.description = 'Show which plugin a command is in.';
22
25
  Which.strict = false;
26
+ Which.examples = [
27
+ {
28
+ description: 'See which plugin the `help` command is in:',
29
+ command: '<%= config.bin %> <%= command.id %> help',
30
+ },
31
+ ];
@@ -1 +1 @@
1
- {"version":"2.2.6","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":[]}}}
1
+ {"version":"2.2.8","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":[],"examples":[{"description":"See which plugin the `help` command is in:","command":"<%= config.bin %> <%= command.id %> help"}],"flags":{},"args":[]}}}
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@oclif/plugin-which",
3
3
  "description": "find which plugin a command is in",
4
- "version": "2.2.6",
4
+ "version": "2.2.8",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/plugin-which/issues",
7
7
  "dependencies": {
8
- "@oclif/core": "^1.23.1",
8
+ "@oclif/core": "^1.25.0",
9
9
  "tslib": "^2.4.1"
10
10
  },
11
11
  "devDependencies": {
12
- "@oclif/plugin-help": "^5.1.20",
13
- "@oclif/test": "^2.2.16",
12
+ "@oclif/plugin-help": "^5.2.0",
13
+ "@oclif/test": "^2.3.1",
14
14
  "@types/chai": "^4.3.4",
15
15
  "@types/mocha": "^9",
16
- "@types/node": "^14.18.35",
16
+ "@types/node": "^14.18.36",
17
17
  "chai": "^4.3.7",
18
18
  "eslint": "^7.32.0",
19
19
  "eslint-config-oclif": "^4.0.0",