@salesforce/cli 1.24.0 → 1.25.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/CHANGELOG.md +2 -0
- package/README.md +21 -2
- package/dist/help/sfHelp.js +21 -0
- package/npm-shrinkwrap.json +525 -3716
- package/oclif.manifest.json +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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.0](https://github.com/salesforcecli/cli/compare/v1.24.0...v1.25.0) (2022-04-21)
|
|
6
|
+
|
|
5
7
|
## [1.24.0](https://github.com/salesforcecli/cli/compare/v1.23.0...v1.24.0) (2022-04-13)
|
|
6
8
|
|
|
7
9
|
## [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.
|
|
34
|
+
@salesforce/cli/1.25.0 linux-x64 node-v14.19.1
|
|
35
35
|
$ sf --help [COMMAND]
|
|
36
36
|
USAGE
|
|
37
37
|
$ sf COMMAND
|
|
@@ -57,6 +57,7 @@ USAGE
|
|
|
57
57
|
- [`sf env delete`](#sf-env-delete)
|
|
58
58
|
- [`sf env display`](#sf-env-display)
|
|
59
59
|
- [`sf env list`](#sf-env-list)
|
|
60
|
+
- [`sf env log`](#sf-env-log)
|
|
60
61
|
- [`sf env log tail`](#sf-env-log-tail)
|
|
61
62
|
- [`sf env logdrain add`](#sf-env-logdrain-add)
|
|
62
63
|
- [`sf env logdrain list`](#sf-env-logdrain-list)
|
|
@@ -516,7 +517,7 @@ Create a compute environment for use with Salesforce Functions.
|
|
|
516
517
|
|
|
517
518
|
```
|
|
518
519
|
USAGE
|
|
519
|
-
$ sf env create compute [-o <value>] [-a <value>
|
|
520
|
+
$ sf env create compute [-o <value>] [-a <value>]
|
|
520
521
|
|
|
521
522
|
FLAGS
|
|
522
523
|
-a, --alias=<value> Alias for the created environment.
|
|
@@ -683,6 +684,24 @@ EXAMPLES
|
|
|
683
684
|
$ sf env list --csv --no-header
|
|
684
685
|
```
|
|
685
686
|
|
|
687
|
+
## `sf env log`
|
|
688
|
+
|
|
689
|
+
Stream log output for an environment.
|
|
690
|
+
|
|
691
|
+
```
|
|
692
|
+
USAGE
|
|
693
|
+
$ sf env log [-e <value> | ] [-n <value>]
|
|
694
|
+
|
|
695
|
+
FLAGS
|
|
696
|
+
-e, --target-compute=<value> Compute environment name to retrieve logs.
|
|
697
|
+
-n, --num=<value> Number of lines to display.
|
|
698
|
+
|
|
699
|
+
EXAMPLES
|
|
700
|
+
Stream log output:
|
|
701
|
+
|
|
702
|
+
$ sf env log --target-compute environment-alias
|
|
703
|
+
```
|
|
704
|
+
|
|
686
705
|
## `sf env log tail`
|
|
687
706
|
|
|
688
707
|
Stream log output for an environment.
|
package/dist/help/sfHelp.js
CHANGED
|
@@ -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
|