@salesforce/cli 2.13.0 → 2.13.1-esm.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 +16 -16
- package/bin/dev.js +9 -0
- package/bin/run.js +32 -0
- package/dist/cli.js +35 -42
- package/dist/flags.js +1 -7
- package/dist/help/sfCommandHelp.js +9 -22
- package/dist/help/sfHelp.js +5 -8
- package/dist/hooks/display-release-notes.js +14 -39
- package/dist/hooks/incomplete.js +9 -11
- package/dist/hooks/pluginsPreinstall.js +3 -5
- package/dist/hooks/prerun.js +3 -5
- package/dist/index.js +1 -2
- package/dist/util/env.js +3 -7
- package/npm-shrinkwrap.json +5444 -3923
- package/oclif.manifest.json +2 -2
- package/package.json +99 -26
- package/scripts/post-install-release-notes.js +42 -37
- package/scripts/preinstall.js +8 -5
- package/bin/dev +0 -13
- package/bin/run +0 -25
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ $ npm install -g @salesforce/cli
|
|
|
24
24
|
$ sf COMMAND
|
|
25
25
|
running command...
|
|
26
26
|
$ sf (--version|-v)
|
|
27
|
-
@salesforce/cli/2.13.0 linux-x64 node-v18.18.0
|
|
27
|
+
@salesforce/cli/2.13.1-esm.0 linux-x64 node-v18.18.0
|
|
28
28
|
$ sf --help [COMMAND]
|
|
29
29
|
USAGE
|
|
30
30
|
$ sf COMMAND
|
|
@@ -2343,7 +2343,7 @@ FLAG DESCRIPTIONS
|
|
|
2343
2343
|
for a number of minutes, the client exits. Specify a longer wait time if timeouts occur frequently.
|
|
2344
2344
|
```
|
|
2345
2345
|
|
|
2346
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
2346
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/force/org/clone.ts)_
|
|
2347
2347
|
|
|
2348
2348
|
## `sf force org create`
|
|
2349
2349
|
|
|
@@ -2391,7 +2391,7 @@ EXAMPLES
|
|
|
2391
2391
|
$ sf force org create -t sandbox -f config/dev-sandbox-def.json -a MyDevSandbox -u prodOrg
|
|
2392
2392
|
```
|
|
2393
2393
|
|
|
2394
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
2394
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/force/org/create.ts)_
|
|
2395
2395
|
|
|
2396
2396
|
## `sf force org delete`
|
|
2397
2397
|
|
|
@@ -2423,7 +2423,7 @@ EXAMPLES
|
|
|
2423
2423
|
$ sf force org delete -u MyOrgAlias -p
|
|
2424
2424
|
```
|
|
2425
2425
|
|
|
2426
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
2426
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/force/org/delete.ts)_
|
|
2427
2427
|
|
|
2428
2428
|
## `sf force org status`
|
|
2429
2429
|
|
|
@@ -2461,7 +2461,7 @@ EXAMPLES
|
|
|
2461
2461
|
$ sf force org status --sandboxname DevSbx1 --wait 45 --setdefaultusername -u prodOrg
|
|
2462
2462
|
```
|
|
2463
2463
|
|
|
2464
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
2464
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/force/org/status.ts)_
|
|
2465
2465
|
|
|
2466
2466
|
## `sf force source deploy`
|
|
2467
2467
|
|
|
@@ -3804,7 +3804,7 @@ FLAG DESCRIPTIONS
|
|
|
3804
3804
|
sandbox.
|
|
3805
3805
|
```
|
|
3806
3806
|
|
|
3807
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
3807
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/org/create/sandbox.ts)_
|
|
3808
3808
|
|
|
3809
3809
|
## `sf org create scratch`
|
|
3810
3810
|
|
|
@@ -3957,7 +3957,7 @@ FLAG DESCRIPTIONS
|
|
|
3957
3957
|
Omit this flag to have Salesforce generate a unique username for your org.
|
|
3958
3958
|
```
|
|
3959
3959
|
|
|
3960
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
3960
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/org/create/scratch.ts)_
|
|
3961
3961
|
|
|
3962
3962
|
## `sf org create user`
|
|
3963
3963
|
|
|
@@ -4097,7 +4097,7 @@ EXAMPLES
|
|
|
4097
4097
|
$ sf org delete sandbox --target-org my-sandbox --no-prompt
|
|
4098
4098
|
```
|
|
4099
4099
|
|
|
4100
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
4100
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/org/delete/sandbox.ts)_
|
|
4101
4101
|
|
|
4102
4102
|
## `sf org delete scratch`
|
|
4103
4103
|
|
|
@@ -4139,7 +4139,7 @@ EXAMPLES
|
|
|
4139
4139
|
$ sf org delete scratch --target-org my-scratch-org --no-prompt
|
|
4140
4140
|
```
|
|
4141
4141
|
|
|
4142
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
4142
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/org/delete/scratch.ts)_
|
|
4143
4143
|
|
|
4144
4144
|
## `sf org display`
|
|
4145
4145
|
|
|
@@ -4182,7 +4182,7 @@ EXAMPLES
|
|
|
4182
4182
|
$ sf org display --target-org TestOrg1 --verbose
|
|
4183
4183
|
```
|
|
4184
4184
|
|
|
4185
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
4185
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/org/display.ts)_
|
|
4186
4186
|
|
|
4187
4187
|
## `sf org display user`
|
|
4188
4188
|
|
|
@@ -4316,7 +4316,7 @@ EXAMPLES
|
|
|
4316
4316
|
$ sf org list --clean
|
|
4317
4317
|
```
|
|
4318
4318
|
|
|
4319
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
4319
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/org/list.ts)_
|
|
4320
4320
|
|
|
4321
4321
|
## `sf org list auth`
|
|
4322
4322
|
|
|
@@ -4411,7 +4411,7 @@ FLAG DESCRIPTIONS
|
|
|
4411
4411
|
Examples of metadata types that use folders are Dashboard, Document, EmailTemplate, and Report.
|
|
4412
4412
|
```
|
|
4413
4413
|
|
|
4414
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
4414
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/org/list/metadata.ts)_
|
|
4415
4415
|
|
|
4416
4416
|
## `sf org list metadata-types`
|
|
4417
4417
|
|
|
@@ -4464,7 +4464,7 @@ FLAG DESCRIPTIONS
|
|
|
4464
4464
|
Override the api version used for api requests made by this command
|
|
4465
4465
|
```
|
|
4466
4466
|
|
|
4467
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
4467
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/org/list/metadata-types.ts)_
|
|
4468
4468
|
|
|
4469
4469
|
## `sf org list users`
|
|
4470
4470
|
|
|
@@ -4965,7 +4965,7 @@ EXAMPLES
|
|
|
4965
4965
|
$ sf org open --source-path force-app/main/default/flexipages/Hello.flexipage-meta.xml
|
|
4966
4966
|
```
|
|
4967
4967
|
|
|
4968
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
4968
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/org/open.ts)_
|
|
4969
4969
|
|
|
4970
4970
|
## `sf org resume sandbox`
|
|
4971
4971
|
|
|
@@ -5027,7 +5027,7 @@ FLAG DESCRIPTIONS
|
|
|
5027
5027
|
returns the job ID. To resume checking the sandbox creation, rerun this command.
|
|
5028
5028
|
```
|
|
5029
5029
|
|
|
5030
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
5030
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/org/resume/sandbox.ts)_
|
|
5031
5031
|
|
|
5032
5032
|
## `sf org resume scratch`
|
|
5033
5033
|
|
|
@@ -5073,7 +5073,7 @@ FLAG DESCRIPTIONS
|
|
|
5073
5073
|
The job ID is valid for 24 hours after you start the scratch org creation.
|
|
5074
5074
|
```
|
|
5075
5075
|
|
|
5076
|
-
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.
|
|
5076
|
+
_See code: [@salesforce/plugin-org](https://github.com/salesforcecli/plugin-org/blob/2.10.11/src/commands/org/resume/scratch.ts)_
|
|
5077
5077
|
|
|
5078
5078
|
## `sf plugins`
|
|
5079
5079
|
|
package/bin/dev.js
ADDED
package/bin/run.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Pre-process/prune flags before creating or running the actual CLI
|
|
4
|
+
(await import('../dist/flags.js')).preprocessCliFlags(process);
|
|
5
|
+
|
|
6
|
+
const oclif = await import('@oclif/core');
|
|
7
|
+
const { createRequire } = await import('module');
|
|
8
|
+
const pjson = createRequire(import.meta.url)('../package.json');
|
|
9
|
+
|
|
10
|
+
const cli = await import('../dist/cli.js');
|
|
11
|
+
|
|
12
|
+
async function main() {
|
|
13
|
+
// Since the CLI is a single process, we can have a larger amount of max listeners since
|
|
14
|
+
// the process gets shut down. Don't set it to 0 (no limit) since we should still be aware
|
|
15
|
+
// of rouge event listeners
|
|
16
|
+
process.setMaxListeners(parseInt(process.env.SF_MAX_EVENT_LISTENERS, 10) || 1000);
|
|
17
|
+
|
|
18
|
+
// Don't let other plugins override the CLI specified max listener count
|
|
19
|
+
process.setMaxListeners = () => {};
|
|
20
|
+
|
|
21
|
+
cli
|
|
22
|
+
.create({ version: pjson.version, bin: pjson.oclif.bin, channel: 'stable' })
|
|
23
|
+
.run()
|
|
24
|
+
.then(async () => {
|
|
25
|
+
await oclif.flush();
|
|
26
|
+
})
|
|
27
|
+
.catch(async (err) => {
|
|
28
|
+
await oclif.handle(err);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
await main();
|
package/dist/cli.js
CHANGED
|
@@ -1,59 +1,55 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const Debug = require("debug");
|
|
16
|
-
const env_1 = require("./util/env");
|
|
7
|
+
import { platform, arch, release } from 'node:os';
|
|
8
|
+
import { resolve } from 'node:path';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
import { Config, run as oclifRun, settings } from '@oclif/core';
|
|
11
|
+
import { set } from '@salesforce/kit';
|
|
12
|
+
import Debug from 'debug';
|
|
13
|
+
import { default as nodeEnv, Env } from './util/env.js';
|
|
17
14
|
const debug = Debug('sf');
|
|
18
15
|
const envVars = [
|
|
19
16
|
...new Set([
|
|
20
17
|
...Object.keys(process.env).filter((e) => e.startsWith('SF_') || e.startsWith('SFDX_')),
|
|
21
18
|
'NODE_OPTIONS',
|
|
22
|
-
|
|
19
|
+
Env.SF_AUTOUPDATE_DISABLE,
|
|
23
20
|
'SF_BINPATH',
|
|
24
21
|
'SF_COMPILE_CACHE',
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
Env.SF_DISABLE_AUTOUPDATE,
|
|
23
|
+
Env.SF_ENV,
|
|
24
|
+
Env.SF_INSTALLER,
|
|
25
|
+
Env.SF_NPM_REGISTRY,
|
|
29
26
|
'SF_REDIRECTED',
|
|
30
|
-
|
|
27
|
+
Env.SF_UPDATE_INSTRUCTIONS,
|
|
31
28
|
]),
|
|
32
29
|
];
|
|
33
|
-
|
|
30
|
+
export const UPDATE_DISABLED_INSTALLER = 'Manual and automatic CLI updates have been disabled by setting "SF_AUTOUPDATE_DISABLE=true". ' +
|
|
34
31
|
'To check for a new version, unset that environment variable.';
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
export const UPDATE_DISABLED_NPM = 'Use "npm update --global @salesforce/cli" to update npm-based installations.';
|
|
33
|
+
export const UPDATE_DISABLED_DEMO = 'Manual and automatic CLI updates have been disabled in DEMO mode. ' +
|
|
37
34
|
'To check for a new version, unset the environment variable SF_ENV.';
|
|
38
|
-
function configureUpdateSites(config, env =
|
|
35
|
+
export function configureUpdateSites(config, env = nodeEnv) {
|
|
39
36
|
const npmRegistry = env.getNpmRegistryOverride();
|
|
40
37
|
if (npmRegistry) {
|
|
41
38
|
// Override config value if set via envar
|
|
42
|
-
|
|
39
|
+
set(config, 'pjson.oclif.warn-if-update-available.registry', npmRegistry);
|
|
43
40
|
}
|
|
44
41
|
}
|
|
45
|
-
|
|
46
|
-
function configureAutoUpdate(envars) {
|
|
42
|
+
export function configureAutoUpdate(envars) {
|
|
47
43
|
if (envars.isDemoMode()) {
|
|
48
44
|
// Disable autoupdates in demo mode
|
|
49
45
|
envars.setAutoupdateDisabled(true);
|
|
50
|
-
envars.setUpdateInstructions(
|
|
46
|
+
envars.setUpdateInstructions(UPDATE_DISABLED_DEMO);
|
|
51
47
|
return;
|
|
52
48
|
}
|
|
53
49
|
if (envars.isInstaller()) {
|
|
54
50
|
envars.normalizeAutoupdateDisabled();
|
|
55
51
|
if (envars.isAutoupdateDisabled()) {
|
|
56
|
-
envars.setUpdateInstructions(
|
|
52
|
+
envars.setUpdateInstructions(UPDATE_DISABLED_INSTALLER);
|
|
57
53
|
}
|
|
58
54
|
return;
|
|
59
55
|
}
|
|
@@ -63,10 +59,9 @@ function configureAutoUpdate(envars) {
|
|
|
63
59
|
envars.setAutoupdateDisabled(true);
|
|
64
60
|
}
|
|
65
61
|
if (envars.isAutoupdateDisabled()) {
|
|
66
|
-
envars.setUpdateInstructions(
|
|
62
|
+
envars.setUpdateInstructions(UPDATE_DISABLED_NPM);
|
|
67
63
|
}
|
|
68
64
|
}
|
|
69
|
-
exports.configureAutoUpdate = configureAutoUpdate;
|
|
70
65
|
function debugCliInfo(version, channel, env, config) {
|
|
71
66
|
function debugSection(section, items) {
|
|
72
67
|
const pad = 25;
|
|
@@ -74,9 +69,9 @@ function debugCliInfo(version, channel, env, config) {
|
|
|
74
69
|
items.forEach(([name, value]) => debug('%s: %s', name.padStart(pad), value));
|
|
75
70
|
}
|
|
76
71
|
debugSection('OS', [
|
|
77
|
-
['platform',
|
|
78
|
-
['architecture',
|
|
79
|
-
['release',
|
|
72
|
+
['platform', platform()],
|
|
73
|
+
['architecture', arch()],
|
|
74
|
+
['release', release()],
|
|
80
75
|
['shell', config.shell],
|
|
81
76
|
]);
|
|
82
77
|
debugSection('NODE', [['version', process.versions.node]]);
|
|
@@ -91,28 +86,26 @@ function debugCliInfo(version, channel, env, config) {
|
|
|
91
86
|
debugSection('ENV', [...envVars].map((key) => [key, env.getString(key, '<not set>')]));
|
|
92
87
|
debugSection('ARGS', process.argv.map((arg, i) => [i.toString(), arg]));
|
|
93
88
|
}
|
|
94
|
-
function create(version, channel, run, env
|
|
95
|
-
|
|
96
|
-
const root =
|
|
97
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
98
|
-
const pjson = require(path.resolve(__dirname, '..', 'package.json'));
|
|
89
|
+
export function create({ version, bin, channel, run, env }) {
|
|
90
|
+
settings.performanceEnabled = true;
|
|
91
|
+
const root = resolve(fileURLToPath(import.meta.url), '..');
|
|
99
92
|
const args = process.argv.slice(2);
|
|
93
|
+
const environment = env ?? nodeEnv;
|
|
100
94
|
return {
|
|
101
95
|
async run() {
|
|
102
|
-
const config = new
|
|
103
|
-
name:
|
|
96
|
+
const config = new Config({
|
|
97
|
+
name: bin,
|
|
104
98
|
root,
|
|
105
99
|
version,
|
|
106
100
|
channel,
|
|
107
101
|
});
|
|
108
102
|
await config.load();
|
|
109
|
-
configureUpdateSites(config,
|
|
110
|
-
configureAutoUpdate(
|
|
111
|
-
debugCliInfo(version, channel,
|
|
103
|
+
configureUpdateSites(config, environment);
|
|
104
|
+
configureAutoUpdate(environment);
|
|
105
|
+
debugCliInfo(version, channel, environment, config);
|
|
112
106
|
// Example of how run is used in a test https://github.com/salesforcecli/cli/pull/171/files#diff-1deee0a575599b2df117c280da319f7938aaf6fdb0c04bcdbde769dbf464be69R46
|
|
113
|
-
return run ? run(args, config) : (
|
|
107
|
+
return run ? run(args, config) : oclifRun(args, config);
|
|
114
108
|
},
|
|
115
109
|
};
|
|
116
110
|
}
|
|
117
|
-
exports.create = create;
|
|
118
111
|
//# sourceMappingURL=cli.js.map
|
package/dist/flags.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
exports.preprocessCliFlags = void 0;
|
|
10
|
-
function preprocessCliFlags(process) {
|
|
7
|
+
export function preprocessCliFlags(process) {
|
|
11
8
|
process.argv.map((arg) => {
|
|
12
9
|
if (arg === '--dev-debug') {
|
|
13
10
|
let debug = '*';
|
|
@@ -25,7 +22,4 @@ function preprocessCliFlags(process) {
|
|
|
25
22
|
}
|
|
26
23
|
});
|
|
27
24
|
}
|
|
28
|
-
exports.preprocessCliFlags = preprocessCliFlags;
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
30
|
-
module.exports.preprocessCliFlags = preprocessCliFlags;
|
|
31
25
|
//# sourceMappingURL=flags.js.map
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SfCommandHelp = void 0;
|
|
4
1
|
/*
|
|
5
2
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
6
3
|
* All rights reserved.
|
|
7
4
|
* Licensed under the BSD 3-Clause license.
|
|
8
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
6
|
*/
|
|
10
|
-
|
|
11
|
-
class SfCommandHelp extends
|
|
7
|
+
import { CommandHelp } from '@oclif/core';
|
|
8
|
+
export class SfCommandHelp extends CommandHelp {
|
|
12
9
|
constructor(command, config, opts) {
|
|
13
10
|
super(command, config, opts);
|
|
14
11
|
this.command = command;
|
|
@@ -27,35 +24,25 @@ class SfCommandHelp extends core_1.CommandHelp {
|
|
|
27
24
|
if (this.shortHelp) {
|
|
28
25
|
return sections.filter(({ header }) => ['USAGE', 'ARGUMENTS', 'FLAGS'].includes(header));
|
|
29
26
|
}
|
|
30
|
-
const
|
|
27
|
+
const additionalSfSections = [
|
|
31
28
|
{
|
|
32
29
|
header: 'CONFIGURATION VARIABLES',
|
|
33
|
-
generate: ({ cmd }) =>
|
|
34
|
-
const sfCommand = cmd;
|
|
35
|
-
return sfCommand.configurationVariablesSection;
|
|
36
|
-
},
|
|
30
|
+
generate: ({ cmd }) => cmd.configurationVariablesSection,
|
|
37
31
|
},
|
|
38
32
|
{
|
|
39
33
|
header: 'ENVIRONMENT VARIABLES',
|
|
40
|
-
generate: ({ cmd }) =>
|
|
41
|
-
const sfCommand = cmd;
|
|
42
|
-
return sfCommand.envVariablesSection;
|
|
43
|
-
},
|
|
34
|
+
generate: ({ cmd }) => cmd.envVariablesSection,
|
|
44
35
|
},
|
|
45
36
|
{
|
|
46
37
|
header: 'ERROR CODES',
|
|
47
|
-
generate: ({ cmd }) =>
|
|
48
|
-
const sfCommand = cmd;
|
|
49
|
-
return sfCommand.errorCodes;
|
|
50
|
-
},
|
|
38
|
+
generate: ({ cmd }) => cmd.errorCodes,
|
|
51
39
|
},
|
|
52
40
|
];
|
|
53
41
|
const flagsIndex = (sections.findIndex((section) => section.header === 'FLAG DESCRIPTIONS') || sections.length - 1) + 1;
|
|
54
|
-
sections.splice(flagsIndex, 0,
|
|
55
|
-
sections.splice(flagsIndex + 1, 0,
|
|
56
|
-
sections.splice(flagsIndex + 2, 0,
|
|
42
|
+
sections.splice(flagsIndex, 0, additionalSfSections[0]);
|
|
43
|
+
sections.splice(flagsIndex + 1, 0, additionalSfSections[1]);
|
|
44
|
+
sections.splice(flagsIndex + 2, 0, additionalSfSections[2]);
|
|
57
45
|
return sections;
|
|
58
46
|
}
|
|
59
47
|
}
|
|
60
|
-
exports.SfCommandHelp = SfCommandHelp;
|
|
61
48
|
//# sourceMappingURL=sfCommandHelp.js.map
|
package/dist/help/sfHelp.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
/*
|
|
4
2
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
5
3
|
* All rights reserved.
|
|
6
4
|
* Licensed under the BSD 3-Clause license.
|
|
7
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
8
6
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class SfHelp extends
|
|
7
|
+
import { Help } from '@oclif/core';
|
|
8
|
+
import chalk from 'chalk';
|
|
9
|
+
import { SfCommandHelp } from './sfCommandHelp.js';
|
|
10
|
+
export default class SfHelp extends Help {
|
|
13
11
|
constructor() {
|
|
14
12
|
super(...arguments);
|
|
15
|
-
this.CommandHelpClass =
|
|
13
|
+
this.CommandHelpClass = SfCommandHelp;
|
|
16
14
|
this.showShortHelp = false;
|
|
17
15
|
this.commands = [];
|
|
18
16
|
this.subCommands = {};
|
|
@@ -45,5 +43,4 @@ class SfHelp extends core_1.Help {
|
|
|
45
43
|
super.log(...formatted);
|
|
46
44
|
}
|
|
47
45
|
}
|
|
48
|
-
exports.default = SfHelp;
|
|
49
46
|
//# sourceMappingURL=sfHelp.js.map
|
|
@@ -1,47 +1,22 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2021, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
core_1.ux.log('- Set the SF_HIDE_RELEASE_NOTES env var to "true" to skip this script\n');
|
|
15
|
-
core_1.ux.log(msg.toString());
|
|
16
|
-
};
|
|
17
|
-
/*
|
|
18
|
-
* NOTE: Please read "Notes about the hook scripts" in this PR before making changes:
|
|
19
|
-
* https://github.com/salesforcecli/sfdx-cli/pull/407
|
|
20
|
-
*/
|
|
21
|
-
const hook = async () => new Promise((resolve) => {
|
|
22
|
-
if (process.env.SF_HIDE_RELEASE_NOTES === 'true') {
|
|
23
|
-
resolve();
|
|
7
|
+
import { ux } from '@oclif/core';
|
|
8
|
+
export const hook = async function ({ config }) {
|
|
9
|
+
if (process.env.SF_HIDE_RELEASE_NOTES === 'true')
|
|
10
|
+
return;
|
|
11
|
+
try {
|
|
12
|
+
return await config.runCommand('whatsnew', ['--hook']);
|
|
24
13
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
34
|
-
cmd.on('error', (error) => {
|
|
35
|
-
logError(error);
|
|
36
|
-
resolve();
|
|
37
|
-
});
|
|
38
|
-
// 'exit' fires whether or not the stream are finished
|
|
39
|
-
cmd.on('exit', () => {
|
|
40
|
-
resolve();
|
|
41
|
-
});
|
|
42
|
-
cmd.on('close', () => {
|
|
43
|
-
resolve();
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
exports.default = hook;
|
|
14
|
+
catch (err) {
|
|
15
|
+
const error = err;
|
|
16
|
+
ux.log('NOTE: This error can be ignored in CI and may be silenced in the future');
|
|
17
|
+
ux.log('- Set the SF_HIDE_RELEASE_NOTES env var to "true" to skip this script\n');
|
|
18
|
+
ux.log(error.message);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export default hook;
|
|
47
22
|
//# sourceMappingURL=display-release-notes.js.map
|
package/dist/hooks/incomplete.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
7
|
+
import * as os from 'os';
|
|
8
|
+
import { toConfiguredId, toStandardizedId, loadHelpClass } from '@oclif/core';
|
|
9
|
+
import { Prompter } from '@salesforce/sf-plugins-core';
|
|
12
10
|
function buildChoices(matches, config) {
|
|
13
|
-
const configuredIds = matches.map((p) =>
|
|
11
|
+
const configuredIds = matches.map((p) => toConfiguredId(p.id, config));
|
|
14
12
|
const maxCommandLength = configuredIds.reduce((max, id) => Math.max(max, id.length), 0);
|
|
15
13
|
return matches.map((p, i) => {
|
|
16
14
|
const summary = p.summary ?? p.description?.split(os.EOL)[0] ?? '';
|
|
@@ -22,7 +20,7 @@ function buildChoices(matches, config) {
|
|
|
22
20
|
});
|
|
23
21
|
}
|
|
24
22
|
async function determineCommand(config, matches) {
|
|
25
|
-
const prompter = new
|
|
23
|
+
const prompter = new Prompter();
|
|
26
24
|
const choices = buildChoices(matches, config);
|
|
27
25
|
const { command } = await prompter.timedPrompt([
|
|
28
26
|
{
|
|
@@ -37,12 +35,12 @@ async function determineCommand(config, matches) {
|
|
|
37
35
|
const hook = async function ({ config, matches, argv }) {
|
|
38
36
|
const command = await determineCommand(config, matches);
|
|
39
37
|
if (argv.includes('--help') || argv.includes('-h')) {
|
|
40
|
-
const Help = await
|
|
38
|
+
const Help = await loadHelpClass(config);
|
|
41
39
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
42
40
|
const help = new Help(config, config.pjson.helpOptions);
|
|
43
|
-
return help.showHelp([
|
|
41
|
+
return help.showHelp([toStandardizedId(command, config), ...argv]);
|
|
44
42
|
}
|
|
45
|
-
return config.runCommand(
|
|
43
|
+
return config.runCommand(toStandardizedId(command, config), argv);
|
|
46
44
|
};
|
|
47
|
-
|
|
45
|
+
export default hook;
|
|
48
46
|
//# sourceMappingURL=incomplete.js.map
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
const core_1 = require("@oclif/core");
|
|
7
|
+
import { Errors } from '@oclif/core';
|
|
10
8
|
const hook = async function (options) {
|
|
11
9
|
const verifySignHookResult = await this.config.runHook('plugins:preinstall:verify:signature', options);
|
|
12
10
|
const pluginTrustFailure = verifySignHookResult.failures.find((failure) => failure.plugin.name === '@salesforce/plugin-trust');
|
|
13
11
|
if (pluginTrustFailure !== undefined) {
|
|
14
|
-
|
|
12
|
+
await Errors.handle(pluginTrustFailure.error);
|
|
15
13
|
}
|
|
16
14
|
};
|
|
17
|
-
|
|
15
|
+
export default hook;
|
|
18
16
|
//# sourceMappingURL=pluginsPreinstall.js.map
|
package/dist/hooks/prerun.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
2
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
4
3
|
* All rights reserved.
|
|
5
4
|
* Licensed under the BSD 3-Clause license.
|
|
6
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
const core_1 = require("@oclif/core");
|
|
7
|
+
import { ux } from '@oclif/core';
|
|
10
8
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
11
9
|
const hook = async function ({ Command, config }) {
|
|
12
10
|
if (process.argv.includes('--json'))
|
|
@@ -22,8 +20,8 @@ const hook = async function ({ Command, config }) {
|
|
|
22
20
|
if (!specifiedVersion)
|
|
23
21
|
return;
|
|
24
22
|
if (plugin.version !== specifiedVersion) {
|
|
25
|
-
|
|
23
|
+
ux.warn(`Plugin ${plugin.name} (${plugin.version}) differs from the version specified by ${config.bin} (${specifiedVersion})`);
|
|
26
24
|
}
|
|
27
25
|
};
|
|
28
|
-
|
|
26
|
+
export default hook;
|
|
29
27
|
//# sourceMappingURL=prerun.js.map
|
package/dist/index.js
CHANGED
package/dist/util/env.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Env = void 0;
|
|
4
1
|
/*
|
|
5
2
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
6
3
|
* All rights reserved.
|
|
7
4
|
* Licensed under the BSD 3-Clause license.
|
|
8
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
6
|
*/
|
|
10
|
-
|
|
11
|
-
class Env extends
|
|
7
|
+
import { EnvVars } from '@salesforce/core/lib/config/envVars.js';
|
|
8
|
+
export class Env extends EnvVars {
|
|
12
9
|
constructor(env = process.env) {
|
|
13
10
|
super(env);
|
|
14
11
|
}
|
|
@@ -51,12 +48,11 @@ class Env extends envVars_1.EnvVars {
|
|
|
51
48
|
}
|
|
52
49
|
}
|
|
53
50
|
}
|
|
54
|
-
exports.Env = Env;
|
|
55
51
|
Env.SF_AUTOUPDATE_DISABLE = 'SF_AUTOUPDATE_DISABLE';
|
|
56
52
|
Env.SF_DISABLE_AUTOUPDATE = 'SF_DISABLE_AUTOUPDATE';
|
|
57
53
|
Env.SF_ENV = 'SF_ENV';
|
|
58
54
|
Env.SF_INSTALLER = 'SF_INSTALLER';
|
|
59
55
|
Env.SF_NPM_REGISTRY = 'SF_NPM_REGISTRY';
|
|
60
56
|
Env.SF_UPDATE_INSTRUCTIONS = 'SF_UPDATE_INSTRUCTIONS';
|
|
61
|
-
|
|
57
|
+
export default new Env();
|
|
62
58
|
//# sourceMappingURL=env.js.map
|