@salesforce/cli 1.24.0 → 1.25.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
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
4
 
5
+ ### [1.25.2](https://github.com/salesforcecli/cli/compare/v1.25.1...v1.25.2) (2022-04-25)
6
+
7
+ ### Bug Fixes
8
+
9
+ - revert plugin-functions ([3783a83](https://github.com/salesforcecli/cli/commit/3783a83a2d58193f6ba0a0186094cdceebd23994))
10
+
11
+ ### [1.25.1](https://github.com/salesforcecli/cli/compare/v1.25.0...v1.25.1) (2022-04-21)
12
+
13
+ ### Bug Fixes
14
+
15
+ - add cli-release context to windows package job for signing key ([301762d](https://github.com/salesforcecli/cli/commit/301762d039a91dc36aa4ae223c56848425b4d959))
16
+
17
+ ## [1.25.0](https://github.com/salesforcecli/cli/compare/v1.24.0...v1.25.0) (2022-04-21)
18
+
5
19
  ## [1.24.0](https://github.com/salesforcecli/cli/compare/v1.23.0...v1.24.0) (2022-04-13)
6
20
 
7
21
  ## [1.23.0](https://github.com/salesforcecli/cli/compare/v1.22.1...v1.23.0) (2022-04-06)
package/README.md CHANGED
@@ -31,7 +31,7 @@ $ npm install -g @salesforce/cli
31
31
  $ sf COMMAND
32
32
  running command...
33
33
  $ sf (--version|-v)
34
- @salesforce/cli/1.24.0 linux-x64 node-v14.19.1
34
+ @salesforce/cli/1.25.2 linux-x64 node-v14.19.1
35
35
  $ sf --help [COMMAND]
36
36
  USAGE
37
37
  $ sf COMMAND
@@ -7,15 +7,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
8
8
  */
9
9
  const core_1 = require("@oclif/core");
10
+ const chalk = require("chalk");
10
11
  const sfCommandHelp_1 = require("./sfCommandHelp");
11
12
  class SfHelp extends core_1.Help {
12
13
  constructor() {
13
14
  super(...arguments);
14
15
  this.CommandHelpClass = sfCommandHelp_1.SfCommandHelp;
15
16
  this.showShortHelp = false;
17
+ this.commands = [];
18
+ this.subCommands = {};
16
19
  }
17
20
  async showHelp(argv) {
18
21
  this.showShortHelp = argv.includes('-h');
22
+ this.commands = this.config.commandIDs.map((c) => `${this.config.bin} ${c.replace(/:/g, this.config.topicSeparator)}`);
23
+ for (const cmd of this.commands) {
24
+ this.subCommands[cmd] = this.commands
25
+ .filter((c) => c.startsWith(cmd) && c !== cmd)
26
+ .map((c) => `${c.replace(cmd, '')}`);
27
+ }
19
28
  return await super.showHelp(argv);
20
29
  }
21
30
  getCommandHelpClass(command) {
@@ -23,6 +32,18 @@ class SfHelp extends core_1.Help {
23
32
  this.commandHelpClass.showShortHelp = this.showShortHelp;
24
33
  return this.commandHelpClass;
25
34
  }
35
+ log(...args) {
36
+ const formatted = args.map((arg) => {
37
+ for (const cmd of this.commands) {
38
+ const regex = this.subCommands[cmd].length > 0
39
+ ? new RegExp(`(?<!\\$ )${cmd}(?!${this.subCommands[cmd].join('|')})`, 'g')
40
+ : new RegExp(`(?<!\\$ )${cmd}`, 'g');
41
+ arg = arg.replace(regex, chalk.dim(cmd));
42
+ }
43
+ return arg;
44
+ });
45
+ super.log(...formatted);
46
+ }
26
47
  }
27
48
  exports.default = SfHelp;
28
49
  //# sourceMappingURL=sfHelp.js.map