@salesforce/cli 2.13.1-esm.0 → 2.13.1
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 +1 -1
- package/bin/dev +13 -0
- package/bin/run +25 -0
- package/dist/cli.js +42 -35
- package/dist/flags.js +7 -1
- package/dist/help/sfCommandHelp.js +22 -9
- package/dist/help/sfHelp.js +8 -5
- package/dist/hooks/display-release-notes.js +39 -14
- package/dist/hooks/incomplete.js +11 -9
- package/dist/hooks/pluginsPreinstall.js +5 -3
- package/dist/hooks/prerun.js +5 -3
- package/dist/index.js +2 -1
- package/dist/util/env.js +7 -3
- package/npm-shrinkwrap.json +3611 -5132
- package/oclif.manifest.json +2 -2
- package/package.json +25 -98
- package/scripts/post-install-release-notes.js +37 -42
- package/scripts/preinstall.js +5 -8
- package/bin/dev.js +0 -9
- package/bin/run.js +0 -32
package/README.md
CHANGED
package/bin/dev
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const oclif = require('@oclif/core');
|
|
4
|
+
|
|
5
|
+
require('ts-node').register();
|
|
6
|
+
|
|
7
|
+
oclif.settings.tsnodeEnabled = true;
|
|
8
|
+
oclif.settings.debug = true;
|
|
9
|
+
oclif.settings.performanceEnabled = true;
|
|
10
|
+
|
|
11
|
+
process.env.NODE_ENV = 'development';
|
|
12
|
+
|
|
13
|
+
oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'));
|
package/bin/run
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Since the CLI is a single process, we can have a larger amount of max listeners since
|
|
4
|
+
// the process gets shut down. Don't set it to 0 (no limit) since we should still be aware
|
|
5
|
+
// of rouge event listeners
|
|
6
|
+
process.setMaxListeners(parseInt(process.env.SF_MAX_EVENT_LISTENERS, 10) || 1000);
|
|
7
|
+
|
|
8
|
+
// Don't let other plugins override the CLI specified max listener count
|
|
9
|
+
process.setMaxListeners = () => {};
|
|
10
|
+
|
|
11
|
+
// Pre-process/prune flags before creating or running the actual CLI
|
|
12
|
+
require('../dist/flags').preprocessCliFlags(process);
|
|
13
|
+
|
|
14
|
+
const cli = require('../dist/cli');
|
|
15
|
+
const pjson = require('../package.json');
|
|
16
|
+
|
|
17
|
+
cli
|
|
18
|
+
.create(pjson.version, 'stable')
|
|
19
|
+
.run()
|
|
20
|
+
.then(function () {
|
|
21
|
+
require('@oclif/core/flush')();
|
|
22
|
+
})
|
|
23
|
+
.catch(function (err) {
|
|
24
|
+
require('@oclif/core/handle')(err);
|
|
25
|
+
});
|
package/dist/cli.js
CHANGED
|
@@ -1,55 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/*
|
|
2
3
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
3
4
|
* All rights reserved.
|
|
4
5
|
* Licensed under the BSD 3-Clause license.
|
|
5
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.create = exports.configureAutoUpdate = exports.configureUpdateSites = exports.UPDATE_DISABLED_DEMO = exports.UPDATE_DISABLED_NPM = exports.UPDATE_DISABLED_INSTALLER = void 0;
|
|
10
|
+
const os = require("os");
|
|
11
|
+
const path = require("path");
|
|
12
|
+
const core_1 = require("@oclif/core");
|
|
13
|
+
const kit_1 = require("@salesforce/kit");
|
|
14
|
+
const ts_types_1 = require("@salesforce/ts-types");
|
|
15
|
+
const Debug = require("debug");
|
|
16
|
+
const env_1 = require("./util/env");
|
|
14
17
|
const debug = Debug('sf');
|
|
15
18
|
const envVars = [
|
|
16
19
|
...new Set([
|
|
17
20
|
...Object.keys(process.env).filter((e) => e.startsWith('SF_') || e.startsWith('SFDX_')),
|
|
18
21
|
'NODE_OPTIONS',
|
|
19
|
-
Env.SF_AUTOUPDATE_DISABLE,
|
|
22
|
+
env_1.Env.SF_AUTOUPDATE_DISABLE,
|
|
20
23
|
'SF_BINPATH',
|
|
21
24
|
'SF_COMPILE_CACHE',
|
|
22
|
-
Env.SF_DISABLE_AUTOUPDATE,
|
|
23
|
-
Env.SF_ENV,
|
|
24
|
-
Env.SF_INSTALLER,
|
|
25
|
-
Env.SF_NPM_REGISTRY,
|
|
25
|
+
env_1.Env.SF_DISABLE_AUTOUPDATE,
|
|
26
|
+
env_1.Env.SF_ENV,
|
|
27
|
+
env_1.Env.SF_INSTALLER,
|
|
28
|
+
env_1.Env.SF_NPM_REGISTRY,
|
|
26
29
|
'SF_REDIRECTED',
|
|
27
|
-
Env.SF_UPDATE_INSTRUCTIONS,
|
|
30
|
+
env_1.Env.SF_UPDATE_INSTRUCTIONS,
|
|
28
31
|
]),
|
|
29
32
|
];
|
|
30
|
-
|
|
33
|
+
exports.UPDATE_DISABLED_INSTALLER = 'Manual and automatic CLI updates have been disabled by setting "SF_AUTOUPDATE_DISABLE=true". ' +
|
|
31
34
|
'To check for a new version, unset that environment variable.';
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
exports.UPDATE_DISABLED_NPM = 'Use "npm update --global @salesforce/cli" to update npm-based installations.';
|
|
36
|
+
exports.UPDATE_DISABLED_DEMO = 'Manual and automatic CLI updates have been disabled in DEMO mode. ' +
|
|
34
37
|
'To check for a new version, unset the environment variable SF_ENV.';
|
|
35
|
-
|
|
38
|
+
function configureUpdateSites(config, env = env_1.default) {
|
|
36
39
|
const npmRegistry = env.getNpmRegistryOverride();
|
|
37
40
|
if (npmRegistry) {
|
|
38
41
|
// Override config value if set via envar
|
|
39
|
-
set(config, 'pjson.oclif.warn-if-update-available.registry', npmRegistry);
|
|
42
|
+
(0, kit_1.set)(config, 'pjson.oclif.warn-if-update-available.registry', npmRegistry);
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
|
-
|
|
45
|
+
exports.configureUpdateSites = configureUpdateSites;
|
|
46
|
+
function configureAutoUpdate(envars) {
|
|
43
47
|
if (envars.isDemoMode()) {
|
|
44
48
|
// Disable autoupdates in demo mode
|
|
45
49
|
envars.setAutoupdateDisabled(true);
|
|
46
|
-
envars.setUpdateInstructions(UPDATE_DISABLED_DEMO);
|
|
50
|
+
envars.setUpdateInstructions(exports.UPDATE_DISABLED_DEMO);
|
|
47
51
|
return;
|
|
48
52
|
}
|
|
49
53
|
if (envars.isInstaller()) {
|
|
50
54
|
envars.normalizeAutoupdateDisabled();
|
|
51
55
|
if (envars.isAutoupdateDisabled()) {
|
|
52
|
-
envars.setUpdateInstructions(UPDATE_DISABLED_INSTALLER);
|
|
56
|
+
envars.setUpdateInstructions(exports.UPDATE_DISABLED_INSTALLER);
|
|
53
57
|
}
|
|
54
58
|
return;
|
|
55
59
|
}
|
|
@@ -59,9 +63,10 @@ export function configureAutoUpdate(envars) {
|
|
|
59
63
|
envars.setAutoupdateDisabled(true);
|
|
60
64
|
}
|
|
61
65
|
if (envars.isAutoupdateDisabled()) {
|
|
62
|
-
envars.setUpdateInstructions(UPDATE_DISABLED_NPM);
|
|
66
|
+
envars.setUpdateInstructions(exports.UPDATE_DISABLED_NPM);
|
|
63
67
|
}
|
|
64
68
|
}
|
|
69
|
+
exports.configureAutoUpdate = configureAutoUpdate;
|
|
65
70
|
function debugCliInfo(version, channel, env, config) {
|
|
66
71
|
function debugSection(section, items) {
|
|
67
72
|
const pad = 25;
|
|
@@ -69,9 +74,9 @@ function debugCliInfo(version, channel, env, config) {
|
|
|
69
74
|
items.forEach(([name, value]) => debug('%s: %s', name.padStart(pad), value));
|
|
70
75
|
}
|
|
71
76
|
debugSection('OS', [
|
|
72
|
-
['platform', platform()],
|
|
73
|
-
['architecture', arch()],
|
|
74
|
-
['release', release()],
|
|
77
|
+
['platform', os.platform()],
|
|
78
|
+
['architecture', os.arch()],
|
|
79
|
+
['release', os.release()],
|
|
75
80
|
['shell', config.shell],
|
|
76
81
|
]);
|
|
77
82
|
debugSection('NODE', [['version', process.versions.node]]);
|
|
@@ -86,26 +91,28 @@ function debugCliInfo(version, channel, env, config) {
|
|
|
86
91
|
debugSection('ENV', [...envVars].map((key) => [key, env.getString(key, '<not set>')]));
|
|
87
92
|
debugSection('ARGS', process.argv.map((arg, i) => [i.toString(), arg]));
|
|
88
93
|
}
|
|
89
|
-
|
|
90
|
-
settings.performanceEnabled = true;
|
|
91
|
-
const root = resolve(
|
|
94
|
+
function create(version, channel, run, env = env_1.default) {
|
|
95
|
+
core_1.settings.performanceEnabled = true;
|
|
96
|
+
const root = path.resolve(__dirname, '..');
|
|
97
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
98
|
+
const pjson = require(path.resolve(__dirname, '..', 'package.json'));
|
|
92
99
|
const args = process.argv.slice(2);
|
|
93
|
-
const environment = env ?? nodeEnv;
|
|
94
100
|
return {
|
|
95
101
|
async run() {
|
|
96
|
-
const config = new Config({
|
|
97
|
-
name: bin,
|
|
102
|
+
const config = new core_1.Config({
|
|
103
|
+
name: (0, ts_types_1.get)(pjson, 'oclif.bin'),
|
|
98
104
|
root,
|
|
99
105
|
version,
|
|
100
106
|
channel,
|
|
101
107
|
});
|
|
102
108
|
await config.load();
|
|
103
|
-
configureUpdateSites(config,
|
|
104
|
-
configureAutoUpdate(
|
|
105
|
-
debugCliInfo(version, channel,
|
|
109
|
+
configureUpdateSites(config, env);
|
|
110
|
+
configureAutoUpdate(env);
|
|
111
|
+
debugCliInfo(version, channel, env, config);
|
|
106
112
|
// Example of how run is used in a test https://github.com/salesforcecli/cli/pull/171/files#diff-1deee0a575599b2df117c280da319f7938aaf6fdb0c04bcdbde769dbf464be69R46
|
|
107
|
-
return run ? run(args, config) :
|
|
113
|
+
return run ? run(args, config) : (0, core_1.run)(args, config);
|
|
108
114
|
},
|
|
109
115
|
};
|
|
110
116
|
}
|
|
117
|
+
exports.create = create;
|
|
111
118
|
//# sourceMappingURL=cli.js.map
|
package/dist/flags.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/*
|
|
2
3
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
3
4
|
* All rights reserved.
|
|
4
5
|
* Licensed under the BSD 3-Clause license.
|
|
5
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.preprocessCliFlags = void 0;
|
|
10
|
+
function preprocessCliFlags(process) {
|
|
8
11
|
process.argv.map((arg) => {
|
|
9
12
|
if (arg === '--dev-debug') {
|
|
10
13
|
let debug = '*';
|
|
@@ -22,4 +25,7 @@ export function preprocessCliFlags(process) {
|
|
|
22
25
|
}
|
|
23
26
|
});
|
|
24
27
|
}
|
|
28
|
+
exports.preprocessCliFlags = preprocessCliFlags;
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
30
|
+
module.exports.preprocessCliFlags = preprocessCliFlags;
|
|
25
31
|
//# sourceMappingURL=flags.js.map
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SfCommandHelp = void 0;
|
|
1
4
|
/*
|
|
2
5
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
3
6
|
* All rights reserved.
|
|
4
7
|
* Licensed under the BSD 3-Clause license.
|
|
5
8
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
9
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
const core_1 = require("@oclif/core");
|
|
11
|
+
class SfCommandHelp extends core_1.CommandHelp {
|
|
9
12
|
constructor(command, config, opts) {
|
|
10
13
|
super(command, config, opts);
|
|
11
14
|
this.command = command;
|
|
@@ -24,25 +27,35 @@ export class SfCommandHelp extends CommandHelp {
|
|
|
24
27
|
if (this.shortHelp) {
|
|
25
28
|
return sections.filter(({ header }) => ['USAGE', 'ARGUMENTS', 'FLAGS'].includes(header));
|
|
26
29
|
}
|
|
27
|
-
const
|
|
30
|
+
const additionaSfSections = [
|
|
28
31
|
{
|
|
29
32
|
header: 'CONFIGURATION VARIABLES',
|
|
30
|
-
generate: ({ cmd }) =>
|
|
33
|
+
generate: ({ cmd }) => {
|
|
34
|
+
const sfCommand = cmd;
|
|
35
|
+
return sfCommand.configurationVariablesSection;
|
|
36
|
+
},
|
|
31
37
|
},
|
|
32
38
|
{
|
|
33
39
|
header: 'ENVIRONMENT VARIABLES',
|
|
34
|
-
generate: ({ cmd }) =>
|
|
40
|
+
generate: ({ cmd }) => {
|
|
41
|
+
const sfCommand = cmd;
|
|
42
|
+
return sfCommand.envVariablesSection;
|
|
43
|
+
},
|
|
35
44
|
},
|
|
36
45
|
{
|
|
37
46
|
header: 'ERROR CODES',
|
|
38
|
-
generate: ({ cmd }) =>
|
|
47
|
+
generate: ({ cmd }) => {
|
|
48
|
+
const sfCommand = cmd;
|
|
49
|
+
return sfCommand.errorCodes;
|
|
50
|
+
},
|
|
39
51
|
},
|
|
40
52
|
];
|
|
41
53
|
const flagsIndex = (sections.findIndex((section) => section.header === 'FLAG DESCRIPTIONS') || sections.length - 1) + 1;
|
|
42
|
-
sections.splice(flagsIndex, 0,
|
|
43
|
-
sections.splice(flagsIndex + 1, 0,
|
|
44
|
-
sections.splice(flagsIndex + 2, 0,
|
|
54
|
+
sections.splice(flagsIndex, 0, additionaSfSections[0]);
|
|
55
|
+
sections.splice(flagsIndex + 1, 0, additionaSfSections[1]);
|
|
56
|
+
sections.splice(flagsIndex + 2, 0, additionaSfSections[2]);
|
|
45
57
|
return sections;
|
|
46
58
|
}
|
|
47
59
|
}
|
|
60
|
+
exports.SfCommandHelp = SfCommandHelp;
|
|
48
61
|
//# sourceMappingURL=sfCommandHelp.js.map
|
package/dist/help/sfHelp.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
3
|
/*
|
|
2
4
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
3
5
|
* All rights reserved.
|
|
4
6
|
* Licensed under the BSD 3-Clause license.
|
|
5
7
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
8
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
const core_1 = require("@oclif/core");
|
|
10
|
+
const chalk = require("chalk");
|
|
11
|
+
const sfCommandHelp_1 = require("./sfCommandHelp");
|
|
12
|
+
class SfHelp extends core_1.Help {
|
|
11
13
|
constructor() {
|
|
12
14
|
super(...arguments);
|
|
13
|
-
this.CommandHelpClass = SfCommandHelp;
|
|
15
|
+
this.CommandHelpClass = sfCommandHelp_1.SfCommandHelp;
|
|
14
16
|
this.showShortHelp = false;
|
|
15
17
|
this.commands = [];
|
|
16
18
|
this.subCommands = {};
|
|
@@ -43,4 +45,5 @@ export default class SfHelp extends Help {
|
|
|
43
45
|
super.log(...formatted);
|
|
44
46
|
}
|
|
45
47
|
}
|
|
48
|
+
exports.default = SfHelp;
|
|
46
49
|
//# sourceMappingURL=sfHelp.js.map
|
|
@@ -1,22 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/*
|
|
2
3
|
* Copyright (c) 2021, salesforce.com, inc.
|
|
3
4
|
* All rights reserved.
|
|
4
5
|
* Licensed under the BSD 3-Clause license.
|
|
5
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
}
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
const child_process_1 = require("child_process");
|
|
11
|
+
const core_1 = require("@oclif/core");
|
|
12
|
+
const logError = (msg) => {
|
|
13
|
+
core_1.ux.log('NOTE: This error can be ignored in CI and may be silenced in the future');
|
|
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());
|
|
20
16
|
};
|
|
21
|
-
|
|
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();
|
|
24
|
+
}
|
|
25
|
+
const executable = process.platform === 'win32' ? 'run.cmd' : 'run';
|
|
26
|
+
const cmd = (0, child_process_1.spawn)((0, path_1.join)(__dirname, '..', '..', 'bin', executable), ['whatsnew', '--hook'], {
|
|
27
|
+
stdio: ['ignore', 'inherit', 'pipe'],
|
|
28
|
+
timeout: 10000,
|
|
29
|
+
});
|
|
30
|
+
cmd.stderr.on('data', (error) => {
|
|
31
|
+
logError(error);
|
|
32
|
+
resolve();
|
|
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;
|
|
22
47
|
//# sourceMappingURL=display-release-notes.js.map
|
package/dist/hooks/incomplete.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/*
|
|
2
3
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
3
4
|
* All rights reserved.
|
|
4
5
|
* Licensed under the BSD 3-Clause license.
|
|
5
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const os = require("os");
|
|
10
|
+
const core_1 = require("@oclif/core");
|
|
11
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
10
12
|
function buildChoices(matches, config) {
|
|
11
|
-
const configuredIds = matches.map((p) => toConfiguredId(p.id, config));
|
|
13
|
+
const configuredIds = matches.map((p) => (0, core_1.toConfiguredId)(p.id, config));
|
|
12
14
|
const maxCommandLength = configuredIds.reduce((max, id) => Math.max(max, id.length), 0);
|
|
13
15
|
return matches.map((p, i) => {
|
|
14
16
|
const summary = p.summary ?? p.description?.split(os.EOL)[0] ?? '';
|
|
@@ -20,7 +22,7 @@ function buildChoices(matches, config) {
|
|
|
20
22
|
});
|
|
21
23
|
}
|
|
22
24
|
async function determineCommand(config, matches) {
|
|
23
|
-
const prompter = new Prompter();
|
|
25
|
+
const prompter = new sf_plugins_core_1.Prompter();
|
|
24
26
|
const choices = buildChoices(matches, config);
|
|
25
27
|
const { command } = await prompter.timedPrompt([
|
|
26
28
|
{
|
|
@@ -35,12 +37,12 @@ async function determineCommand(config, matches) {
|
|
|
35
37
|
const hook = async function ({ config, matches, argv }) {
|
|
36
38
|
const command = await determineCommand(config, matches);
|
|
37
39
|
if (argv.includes('--help') || argv.includes('-h')) {
|
|
38
|
-
const Help = await loadHelpClass(config);
|
|
40
|
+
const Help = await (0, core_1.loadHelpClass)(config);
|
|
39
41
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
40
42
|
const help = new Help(config, config.pjson.helpOptions);
|
|
41
|
-
return help.showHelp([toStandardizedId(command, config), ...argv]);
|
|
43
|
+
return help.showHelp([(0, core_1.toStandardizedId)(command, config), ...argv]);
|
|
42
44
|
}
|
|
43
|
-
return config.runCommand(toStandardizedId(command, config), argv);
|
|
45
|
+
return config.runCommand((0, core_1.toStandardizedId)(command, config), argv);
|
|
44
46
|
};
|
|
45
|
-
|
|
47
|
+
exports.default = hook;
|
|
46
48
|
//# sourceMappingURL=incomplete.js.map
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/*
|
|
2
3
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
3
4
|
* All rights reserved.
|
|
4
5
|
* Licensed under the BSD 3-Clause license.
|
|
5
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const core_1 = require("@oclif/core");
|
|
8
10
|
const hook = async function (options) {
|
|
9
11
|
const verifySignHookResult = await this.config.runHook('plugins:preinstall:verify:signature', options);
|
|
10
12
|
const pluginTrustFailure = verifySignHookResult.failures.find((failure) => failure.plugin.name === '@salesforce/plugin-trust');
|
|
11
13
|
if (pluginTrustFailure !== undefined) {
|
|
12
|
-
|
|
14
|
+
core_1.Errors.handle(pluginTrustFailure.error);
|
|
13
15
|
}
|
|
14
16
|
};
|
|
15
|
-
|
|
17
|
+
exports.default = hook;
|
|
16
18
|
//# sourceMappingURL=pluginsPreinstall.js.map
|
package/dist/hooks/prerun.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/*
|
|
2
3
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
3
4
|
* All rights reserved.
|
|
4
5
|
* Licensed under the BSD 3-Clause license.
|
|
5
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const core_1 = require("@oclif/core");
|
|
8
10
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
9
11
|
const hook = async function ({ Command, config }) {
|
|
10
12
|
if (process.argv.includes('--json'))
|
|
@@ -20,8 +22,8 @@ const hook = async function ({ Command, config }) {
|
|
|
20
22
|
if (!specifiedVersion)
|
|
21
23
|
return;
|
|
22
24
|
if (plugin.version !== specifiedVersion) {
|
|
23
|
-
ux.warn(`Plugin ${plugin.name} (${plugin.version}) differs from the version specified by ${config.bin} (${specifiedVersion})`);
|
|
25
|
+
core_1.ux.warn(`Plugin ${plugin.name} (${plugin.version}) differs from the version specified by ${config.bin} (${specifiedVersion})`);
|
|
24
26
|
}
|
|
25
27
|
};
|
|
26
|
-
|
|
28
|
+
exports.default = hook;
|
|
27
29
|
//# sourceMappingURL=prerun.js.map
|
package/dist/index.js
CHANGED
package/dist/util/env.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Env = void 0;
|
|
1
4
|
/*
|
|
2
5
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
3
6
|
* All rights reserved.
|
|
4
7
|
* Licensed under the BSD 3-Clause license.
|
|
5
8
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
9
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
const envVars_1 = require("@salesforce/core/lib/config/envVars");
|
|
11
|
+
class Env extends envVars_1.EnvVars {
|
|
9
12
|
constructor(env = process.env) {
|
|
10
13
|
super(env);
|
|
11
14
|
}
|
|
@@ -48,11 +51,12 @@ export class Env extends EnvVars {
|
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
}
|
|
54
|
+
exports.Env = Env;
|
|
51
55
|
Env.SF_AUTOUPDATE_DISABLE = 'SF_AUTOUPDATE_DISABLE';
|
|
52
56
|
Env.SF_DISABLE_AUTOUPDATE = 'SF_DISABLE_AUTOUPDATE';
|
|
53
57
|
Env.SF_ENV = 'SF_ENV';
|
|
54
58
|
Env.SF_INSTALLER = 'SF_INSTALLER';
|
|
55
59
|
Env.SF_NPM_REGISTRY = 'SF_NPM_REGISTRY';
|
|
56
60
|
Env.SF_UPDATE_INSTRUCTIONS = 'SF_UPDATE_INSTRUCTIONS';
|
|
57
|
-
|
|
61
|
+
exports.default = new Env();
|
|
58
62
|
//# sourceMappingURL=env.js.map
|