@salesforce/plugin-release-management 4.1.31 → 4.2.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/lib/commands/cli/install/jit/test.d.ts +6 -0
- package/lib/commands/cli/install/jit/test.js +26 -0
- package/lib/commands/cli/install/jit/test.js.map +1 -0
- package/lib/commands/cli/tarballs/smoke.d.ts +0 -2
- package/lib/commands/cli/tarballs/smoke.js +9 -79
- package/lib/commands/cli/tarballs/smoke.js.map +1 -1
- package/lib/jit.d.ts +7 -0
- package/lib/jit.js +127 -0
- package/lib/jit.js.map +1 -0
- package/messages/cli.install.jit.test.md +7 -0
- package/messages/cli.tarballs.smoke.json +2 -3
- package/npm-shrinkwrap.json +44 -36
- package/oclif.manifest.json +27 -17
- package/package.json +4 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2023, salesforce.com, inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Licensed under the BSD 3-Clause license.
|
|
6
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
|
+
const core_1 = require("@salesforce/core");
|
|
12
|
+
const jit_1 = require("../../../../jit");
|
|
13
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
14
|
+
const messages = core_1.Messages.loadMessages('@salesforce/plugin-release-management', 'cli.install.jit.test');
|
|
15
|
+
class Test extends sf_plugins_core_1.SfCommand {
|
|
16
|
+
async run() {
|
|
17
|
+
await (0, jit_1.testJITInstall)({
|
|
18
|
+
jsonEnabled: this.jsonEnabled(),
|
|
19
|
+
executable: process.platform === 'win32' ? (0, path_1.join)('bin', 'run.cmd') : (0, path_1.join)('bin', 'run'),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
Test.summary = messages.getMessage('summary');
|
|
24
|
+
Test.examples = messages.getMessages('examples');
|
|
25
|
+
exports.default = Test;
|
|
26
|
+
//# sourceMappingURL=test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../../../src/commands/cli/install/jit/test.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,+BAA4B;AAC5B,iEAAwD;AACxD,2CAA4C;AAC5C,yCAAiD;AAEjD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uCAAuC,EAAE,sBAAsB,CAAC,CAAC;AAExG,MAAqB,IAAK,SAAQ,2BAAe;IAIxC,KAAK,CAAC,GAAG;QACd,MAAM,IAAA,oBAAc,EAAC;YACnB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;YAC/B,UAAU,EAAE,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,IAAA,WAAI,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,IAAA,WAAI,EAAC,KAAK,EAAE,KAAK,CAAC;SACvF,CAAC,CAAC;IACL,CAAC;;AARsB,YAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACzC,aAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;kBAFhD,IAAI"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
2
|
import { Interfaces } from '@oclif/core';
|
|
3
|
-
import { CLI } from '../../../types';
|
|
4
3
|
export default class SmokeTest extends SfCommand<void> {
|
|
5
4
|
static readonly summary: string;
|
|
6
5
|
static readonly description: string;
|
|
7
6
|
static readonly examples: string[];
|
|
8
7
|
static readonly flags: {
|
|
9
|
-
cli: Interfaces.OptionFlag<CLI, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
8
|
verbose: Interfaces.BooleanFlag<boolean>;
|
|
11
9
|
};
|
|
12
10
|
private flags;
|
|
@@ -16,18 +16,14 @@ const chalk = require("chalk");
|
|
|
16
16
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
17
17
|
const core_1 = require("@salesforce/core");
|
|
18
18
|
const kit_1 = require("@salesforce/kit");
|
|
19
|
-
const
|
|
19
|
+
const jit_1 = require("../../../jit");
|
|
20
20
|
const exec = (0, node_util_1.promisify)(child_process_1.exec);
|
|
21
21
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
22
22
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-release-management', 'cli.tarballs.smoke');
|
|
23
23
|
class SmokeTest extends sf_plugins_core_1.SfCommand {
|
|
24
24
|
async run() {
|
|
25
25
|
this.flags = (await this.parse(SmokeTest)).flags;
|
|
26
|
-
|
|
27
|
-
if (this.flags.cli === types_1.CLI.SFDX) {
|
|
28
|
-
executables.push(path.join('tmp', this.flags.cli, 'bin', types_1.CLI.SF));
|
|
29
|
-
}
|
|
30
|
-
await Promise.all(executables.map((executable) => this.smokeTest(executable)));
|
|
26
|
+
await this.smokeTest(path.join('tmp', 'sf', 'bin', 'sf'));
|
|
31
27
|
}
|
|
32
28
|
async smokeTest(executable) {
|
|
33
29
|
await Promise.all([
|
|
@@ -36,74 +32,15 @@ class SmokeTest extends sf_plugins_core_1.SfCommand {
|
|
|
36
32
|
this.execute(executable, 'plugins --core'),
|
|
37
33
|
this.testInstall(executable, '@salesforce/plugin-alias', 'latest'),
|
|
38
34
|
]);
|
|
39
|
-
|
|
40
|
-
if (this.flags.cli === types_1.CLI.SFDX && !executable.endsWith('sf')) {
|
|
41
|
-
await this.testJITInstall(executable);
|
|
42
|
-
}
|
|
35
|
+
await this.testJITInstall(executable);
|
|
43
36
|
await this.initializeAllCommands(executable);
|
|
44
37
|
}
|
|
45
38
|
async testJITInstall(executable) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return;
|
|
52
|
-
const manifestData = await fs.promises.readFile(path.join('tmp', this.flags.cli, 'oclif.manifest.json'), 'utf8');
|
|
53
|
-
const manifest = (0, kit_1.parseJson)(manifestData);
|
|
54
|
-
const commands = Object.values(manifest.commands);
|
|
55
|
-
let failed = false;
|
|
56
|
-
const help = async (command) => {
|
|
57
|
-
try {
|
|
58
|
-
await exec(`${executable} ${command} --help`);
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
catch (e) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
// We have to test these serially in order to avoid issues when running plugin installs concurrently.
|
|
66
|
-
for (const plugin of jitPlugins) {
|
|
67
|
-
try {
|
|
68
|
-
this.log(`Testing JIT install for ${plugin}`);
|
|
69
|
-
const firstCommand = commands.find((c) => c.pluginName === plugin);
|
|
70
|
-
if (!firstCommand) {
|
|
71
|
-
throw new core_1.SfError(`Unable to find command for ${plugin}`);
|
|
72
|
-
}
|
|
73
|
-
// Test that --help works on JIT commands
|
|
74
|
-
const helpResult = await help(firstCommand.id);
|
|
75
|
-
this.log(`${executable} ${firstCommand.id} --help ${helpResult ? chalk.green('PASSED') : chalk.red('FAILED')}`);
|
|
76
|
-
this.log(`${executable} ${firstCommand.id}`);
|
|
77
|
-
// Test that executing the command will trigger JIT install
|
|
78
|
-
// This will likely always fail because we're not providing all the required flags or it depends on some other setup.
|
|
79
|
-
// However, this is okay because all we need to verify is that running the command will trigger the JIT install
|
|
80
|
-
const { stdout, stderr } = await exec(`${executable} ${firstCommand.id}`, { maxBuffer: 1024 * 1024 * 100 });
|
|
81
|
-
this.log(stdout);
|
|
82
|
-
this.log(stderr);
|
|
83
|
-
}
|
|
84
|
-
catch (e) {
|
|
85
|
-
const err = e;
|
|
86
|
-
// @ts-expect-error ExecException type doesn't have a stdout or stderr property
|
|
87
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
88
|
-
this.log(err.stdout);
|
|
89
|
-
// @ts-expect-error ExecException type doesn't have a stdout or stderr property
|
|
90
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
91
|
-
this.log(err.stderr);
|
|
92
|
-
}
|
|
93
|
-
finally {
|
|
94
|
-
const result = await this.verifyInstall(plugin, executable, true);
|
|
95
|
-
if (result) {
|
|
96
|
-
this.log(`✅ ${chalk.green(`Verified installation of ${plugin}\n`)}`);
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
failed = true;
|
|
100
|
-
this.log(`❌ ${chalk.red(`Failed installation of ${plugin}\n`)}`);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
if (failed) {
|
|
105
|
-
throw new core_1.SfError('Failed JIT installation');
|
|
106
|
-
}
|
|
39
|
+
await (0, jit_1.testJITInstall)({
|
|
40
|
+
jsonEnabled: this.jsonEnabled(),
|
|
41
|
+
executable,
|
|
42
|
+
manifestPath: path.join('tmp', 'sf', 'oclif.manifest.json'),
|
|
43
|
+
});
|
|
107
44
|
}
|
|
108
45
|
async testInstall(executable, plugin, tag) {
|
|
109
46
|
await this.execute(executable, `plugins:install ${plugin}${tag ? `@${tag}` : ''}`);
|
|
@@ -127,7 +64,7 @@ class SmokeTest extends sf_plugins_core_1.SfCommand {
|
|
|
127
64
|
return true;
|
|
128
65
|
}
|
|
129
66
|
async initializeAllCommands(executable) {
|
|
130
|
-
this.styledHeader(
|
|
67
|
+
this.styledHeader("Initializing help for all 'sf' commands");
|
|
131
68
|
// Ran into memory issues when running all commands at once. Now we run them in batches of 10.
|
|
132
69
|
const throttledPromise = new kit_1.ThrottledPromiseAll({
|
|
133
70
|
concurrency: 10,
|
|
@@ -174,13 +111,6 @@ SmokeTest.summary = messages.getMessage('description');
|
|
|
174
111
|
SmokeTest.description = messages.getMessage('description');
|
|
175
112
|
SmokeTest.examples = messages.getMessages('examples');
|
|
176
113
|
SmokeTest.flags = {
|
|
177
|
-
cli: sf_plugins_core_1.Flags.custom({
|
|
178
|
-
options: Object.values(types_1.CLI),
|
|
179
|
-
})({
|
|
180
|
-
summary: messages.getMessage('cliFlag'),
|
|
181
|
-
char: 'c',
|
|
182
|
-
required: true,
|
|
183
|
-
}),
|
|
184
114
|
verbose: sf_plugins_core_1.Flags.boolean({
|
|
185
115
|
summary: messages.getMessage('verboseFlag'),
|
|
186
116
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smoke.js","sourceRoot":"","sources":["../../../../src/commands/cli/tarballs/smoke.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,qCAAqC;AACrC,yBAAyB;AACzB,yBAAyB;AACzB,6BAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"smoke.js","sourceRoot":"","sources":["../../../../src/commands/cli/tarballs/smoke.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,qCAAqC;AACrC,yBAAyB;AACzB,yBAAyB;AACzB,6BAA6B;AAC7B,iDAAiD;AACjD,yCAAsC;AACtC,+BAA+B;AAC/B,iEAA+D;AAC/D,2CAAqD;AACrD,yCAA2E;AAG3E,sCAA8C;AAE9C,MAAM,IAAI,GAAG,IAAA,qBAAS,EAAC,oBAAQ,CAAC,CAAC;AAEjC,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uCAAuC,EAAE,oBAAoB,CAAC,CAAC;AAEtG,MAAqB,SAAU,SAAQ,2BAAe;IAa7C,KAAK,CAAC,GAAG;QACd,IAAI,CAAC,KAAK,GAAG,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;QACjD,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,E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YACV,MAAM,GAAG,GAAG,CAAU,CAAC;YACvB,MAAM,IAAI,cAAO,CAAC,WAAW,OAAO,OAAO,GAAG,CAAC,OAAO,EAAE,EAAE,oBAAoB,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;SAC1F;IACH,CAAC;;AA9GsB,iBAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAC7C,qBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAEjD,kBAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAC5C,eAAK,GAAG;IAC7B,OAAO,EAAE,uBAAK,CAAC,OAAO,CAAC;QACrB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC;KAC5C,CAAC;CACH,CAAC;kBATiB,SAAS"}
|
package/lib/jit.d.ts
ADDED
package/lib/jit.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.testJITInstall = void 0;
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (c) 2023, salesforce.com, inc.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Licensed under the BSD 3-Clause license.
|
|
8
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
+
*/
|
|
10
|
+
/* eslint-disable no-await-in-loop */
|
|
11
|
+
const fs = require("fs");
|
|
12
|
+
const path = require("path");
|
|
13
|
+
const os = require("os");
|
|
14
|
+
const util_1 = require("util");
|
|
15
|
+
const child_process_1 = require("child_process");
|
|
16
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
17
|
+
const chalk = require("chalk");
|
|
18
|
+
const core_1 = require("@salesforce/core");
|
|
19
|
+
const kit_1 = require("@salesforce/kit");
|
|
20
|
+
const stripAnsi = require("strip-ansi");
|
|
21
|
+
const exec = (0, util_1.promisify)(child_process_1.exec);
|
|
22
|
+
async function testJITInstall(options) {
|
|
23
|
+
const { jsonEnabled, executable } = options;
|
|
24
|
+
const ux = new sf_plugins_core_1.Ux({ jsonEnabled });
|
|
25
|
+
const tmpDir = path.join(os.tmpdir(), 'sf-jit-test');
|
|
26
|
+
// Clear tmp dir before test to ensure that we're starting from a clean slate
|
|
27
|
+
await fs.promises.rm(tmpDir, { recursive: true, force: true });
|
|
28
|
+
await fs.promises.mkdir(tmpDir, { recursive: true });
|
|
29
|
+
const dataDir = path.join(tmpDir, 'data');
|
|
30
|
+
const cacheDir = path.join(tmpDir, 'cache');
|
|
31
|
+
const configDir = path.join(tmpDir, 'config');
|
|
32
|
+
process.env.SF_DATA_DIR = dataDir;
|
|
33
|
+
process.env.SF_CACHE_DIR = cacheDir;
|
|
34
|
+
process.env.SF_CONFIG_DIR = configDir;
|
|
35
|
+
await fs.promises.mkdir(dataDir, { recursive: true });
|
|
36
|
+
await fs.promises.mkdir(cacheDir, { recursive: true });
|
|
37
|
+
await fs.promises.mkdir(configDir, { recursive: true });
|
|
38
|
+
ux.styledHeader('Testing JIT installation');
|
|
39
|
+
ux.log(`SF_DATA_DIR: ${dataDir}`);
|
|
40
|
+
ux.log(`SF_CACHE_DIR: ${cacheDir}`);
|
|
41
|
+
ux.log(`SF_CONFIG_DIR: ${configDir}`);
|
|
42
|
+
const fileData = await fs.promises.readFile('package.json', 'utf8');
|
|
43
|
+
const packageJson = (0, kit_1.parseJson)(fileData);
|
|
44
|
+
const jitPlugins = Object.keys(packageJson.oclif?.jitPlugins ?? {});
|
|
45
|
+
if (jitPlugins.length === 0)
|
|
46
|
+
return;
|
|
47
|
+
let manifestData;
|
|
48
|
+
try {
|
|
49
|
+
manifestData = options.manifestPath
|
|
50
|
+
? await fs.promises.readFile(options.manifestPath, 'utf8')
|
|
51
|
+
: await fs.promises.readFile('oclif.manifest.json', 'utf8');
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
ux.log('No oclif.manifest.json found. Generating one now.');
|
|
55
|
+
await exec('yarn oclif manifest');
|
|
56
|
+
manifestData = await fs.promises.readFile('oclif.manifest.json', 'utf8');
|
|
57
|
+
}
|
|
58
|
+
const manifest = (0, kit_1.parseJson)(manifestData);
|
|
59
|
+
const commands = Object.values(manifest.commands);
|
|
60
|
+
const help = async (command) => {
|
|
61
|
+
try {
|
|
62
|
+
await exec(`${executable} ${command} --help`);
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
catch (e) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const verifyInstall = async (plugin) => {
|
|
70
|
+
const userPjsonRaw = await fs.promises.readFile(path.join(dataDir, 'package.json'), 'utf-8');
|
|
71
|
+
const userPjson = (0, kit_1.parseJson)(userPjsonRaw);
|
|
72
|
+
return Boolean(userPjson.dependencies?.[plugin]);
|
|
73
|
+
};
|
|
74
|
+
const passedInstalls = [];
|
|
75
|
+
const failedInstalls = [];
|
|
76
|
+
// We have to test these serially in order to avoid issues when running plugin installs concurrently.
|
|
77
|
+
for (const plugin of jitPlugins) {
|
|
78
|
+
try {
|
|
79
|
+
ux.log(`Testing JIT install for ${plugin}`);
|
|
80
|
+
const firstCommand = commands.find((c) => c.pluginName === plugin);
|
|
81
|
+
if (!firstCommand) {
|
|
82
|
+
throw new core_1.SfError(`Unable to find command for ${plugin}`);
|
|
83
|
+
}
|
|
84
|
+
// Test that --help works on JIT commands
|
|
85
|
+
const helpResult = await help(firstCommand.id);
|
|
86
|
+
ux.log(`${executable} ${firstCommand.id} --help ${helpResult ? chalk.green('PASSED') : chalk.red('FAILED')}`);
|
|
87
|
+
ux.log(`${executable} ${firstCommand.id}`);
|
|
88
|
+
// Test that executing the command will trigger JIT install
|
|
89
|
+
// This will likely always fail because we're not providing all the required flags or it depends on some other setup.
|
|
90
|
+
// However, this is okay because all we need to verify is that running the command will trigger the JIT install
|
|
91
|
+
const { stdout, stderr } = await exec(`${executable} ${firstCommand.id}`);
|
|
92
|
+
ux.log(stripAnsi(stdout));
|
|
93
|
+
ux.log(stripAnsi(stderr));
|
|
94
|
+
}
|
|
95
|
+
catch (e) {
|
|
96
|
+
const err = e;
|
|
97
|
+
// @ts-expect-error ExecException type doesn't have a stdout or stderr property
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
99
|
+
ux.log(stripAnsi(err.stdout));
|
|
100
|
+
// @ts-expect-error ExecException type doesn't have a stdout or stderr property
|
|
101
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
102
|
+
ux.log(stripAnsi(err.stderr));
|
|
103
|
+
}
|
|
104
|
+
finally {
|
|
105
|
+
const result = await verifyInstall(plugin);
|
|
106
|
+
if (result) {
|
|
107
|
+
ux.log(`✅ ${chalk.green(`Verified installation of ${plugin}\n`)}`);
|
|
108
|
+
passedInstalls.push(plugin);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
ux.log(`❌ ${chalk.red(`Failed installation of ${plugin}\n`)}`);
|
|
112
|
+
failedInstalls.push(plugin);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
ux.styledHeader('JIT Installation Results');
|
|
117
|
+
ux.log(`Passed (${passedInstalls.length})`);
|
|
118
|
+
passedInstalls.forEach((msg) => ux.log(`• ${msg}`));
|
|
119
|
+
if (failedInstalls.length) {
|
|
120
|
+
ux.log();
|
|
121
|
+
ux.log(`Failed (${failedInstalls.length})`);
|
|
122
|
+
failedInstalls.forEach((msg) => ux.log(`• ${msg}`));
|
|
123
|
+
throw new core_1.SfError('Failed JIT installation');
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
exports.testJITInstall = testJITInstall;
|
|
127
|
+
//# sourceMappingURL=jit.js.map
|
package/lib/jit.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jit.js","sourceRoot":"","sources":["../src/jit.ts"],"names":[],"mappings":";;;A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,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,0BAA0B,MAAM,IAAI,CAAC,EAAE,CAAC,CAAC;gBAC/D,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aAC7B;SACF;KACF;IAED,EAAE,CAAC,YAAY,CAAC,0BAA0B,CAAC,CAAC;IAC5C,EAAE,CAAC,GAAG,CAAC,WAAW,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;IAC5C,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC;IACpD,IAAI,cAAc,CAAC,MAAM,EAAE;QACzB,EAAE,CAAC,GAAG,EAAE,CAAC;QACT,EAAE,CAAC,GAAG,CAAC,WAAW,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5C,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC;QACpD,MAAM,IAAI,cAAO,CAAC,yBAAyB,CAAC,CAAC;KAC9C;AACH,CAAC;AAjHD,wCAiHC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "smoke tests for the
|
|
3
|
-
"examples": ["<%= config.bin %> <%= command.id %>
|
|
4
|
-
"cliFlag": "the cli to install",
|
|
2
|
+
"description": "smoke tests for the sf CLI\n Tests that the CLI and every command can be initialized.",
|
|
3
|
+
"examples": ["<%= config.bin %> <%= command.id %>", "<%= config.bin %> <%= command.id %>"],
|
|
5
4
|
"verboseFlag": "show the --help output for each command"
|
|
6
5
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-release-management",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/plugin-release-management",
|
|
9
|
-
"version": "4.1
|
|
9
|
+
"version": "4.2.1",
|
|
10
10
|
"license": "BSD-3-Clause",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@oclif/core": "^2.15.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@salesforce/kit": "^3.0.9",
|
|
19
19
|
"@salesforce/plugin-command-reference": "^3.0.25",
|
|
20
20
|
"@salesforce/plugin-trust": "^2.6.8",
|
|
21
|
-
"@salesforce/sf-plugins-core": "^3.1.
|
|
21
|
+
"@salesforce/sf-plugins-core": "^3.1.22",
|
|
22
22
|
"@salesforce/ts-types": "^2.0.6",
|
|
23
23
|
"aws-sdk": "^2.1440.0",
|
|
24
24
|
"chalk": "^4.1.0",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"semver": "^7.5.2",
|
|
30
30
|
"shelljs": "^0.8.4",
|
|
31
31
|
"standard-version": "^9.0.0",
|
|
32
|
+
"strip-ansi": "^6",
|
|
32
33
|
"tslib": "^2",
|
|
33
34
|
"yarn-deduplicate": "^3.1.0"
|
|
34
35
|
},
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
"sf-release": "bin/run"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
|
-
"@oclif/plugin-command-snapshot": "^4.0.
|
|
40
|
+
"@oclif/plugin-command-snapshot": "^4.0.14",
|
|
40
41
|
"@salesforce/dev-config": "^4.0.1",
|
|
41
42
|
"@salesforce/dev-scripts": "^5.10.0",
|
|
42
43
|
"@salesforce/prettier-config": "^0.0.3",
|
|
@@ -1958,19 +1959,19 @@
|
|
|
1958
1959
|
}
|
|
1959
1960
|
},
|
|
1960
1961
|
"node_modules/@oclif/plugin-command-snapshot": {
|
|
1961
|
-
"version": "4.0.
|
|
1962
|
-
"resolved": "https://registry.npmjs.org/@oclif/plugin-command-snapshot/-/plugin-command-snapshot-4.0.
|
|
1963
|
-
"integrity": "sha512-
|
|
1962
|
+
"version": "4.0.14",
|
|
1963
|
+
"resolved": "https://registry.npmjs.org/@oclif/plugin-command-snapshot/-/plugin-command-snapshot-4.0.14.tgz",
|
|
1964
|
+
"integrity": "sha512-Gn7FvuYZl/avk1vRfSq4jT/1eQS7PARsQiB4gXokp1m0RDP0OHb5O6W1AwTTUcxqY+AcSEhl/lsSjjN2GdKgEg==",
|
|
1964
1965
|
"dev": true,
|
|
1965
1966
|
"license": "MIT",
|
|
1966
1967
|
"dependencies": {
|
|
1967
|
-
"@oclif/core": "^2.11.
|
|
1968
|
+
"@oclif/core": "^2.11.8",
|
|
1968
1969
|
"chalk": "^4.1.2",
|
|
1969
1970
|
"just-diff": "^5.2.0",
|
|
1970
1971
|
"lodash": "^4.17.21",
|
|
1971
1972
|
"semver": "^7.5.4",
|
|
1972
|
-
"ts-json-schema-generator": "^1.
|
|
1973
|
-
"tslib": "^2.6.
|
|
1973
|
+
"ts-json-schema-generator": "^1.3.0",
|
|
1974
|
+
"tslib": "^2.6.2"
|
|
1974
1975
|
},
|
|
1975
1976
|
"engines": {
|
|
1976
1977
|
"node": ">=16.0.0"
|
|
@@ -2454,15 +2455,15 @@
|
|
|
2454
2455
|
}
|
|
2455
2456
|
},
|
|
2456
2457
|
"node_modules/@salesforce/core": {
|
|
2457
|
-
"version": "5.2.
|
|
2458
|
-
"resolved": "https://registry.npmjs.org/@salesforce/core/-/core-5.2.
|
|
2459
|
-
"integrity": "sha512-
|
|
2458
|
+
"version": "5.2.9",
|
|
2459
|
+
"resolved": "https://registry.npmjs.org/@salesforce/core/-/core-5.2.9.tgz",
|
|
2460
|
+
"integrity": "sha512-ZWNxHnCPGT1pcJe1bjeRjd8VAeHELK4fftt/2WO+ZsPFHZnzmdowz2Th407v04et+uIzL0Z6+qOaRY/bZr5tLA==",
|
|
2460
2461
|
"license": "BSD-3-Clause",
|
|
2461
2462
|
"dependencies": {
|
|
2462
2463
|
"@salesforce/kit": "^3.0.11",
|
|
2463
2464
|
"@salesforce/schemas": "^1.6.0",
|
|
2464
2465
|
"@salesforce/ts-types": "^2.0.7",
|
|
2465
|
-
"@types/semver": "^7.5.
|
|
2466
|
+
"@types/semver": "^7.5.1",
|
|
2466
2467
|
"ajv": "^8.12.0",
|
|
2467
2468
|
"change-case": "^4.1.2",
|
|
2468
2469
|
"faye": "^1.4.0",
|
|
@@ -2471,7 +2472,7 @@
|
|
|
2471
2472
|
"jsforce": "^2.0.0-beta.27",
|
|
2472
2473
|
"jsonwebtoken": "9.0.2",
|
|
2473
2474
|
"jszip": "3.10.1",
|
|
2474
|
-
"pino": "^8.15.
|
|
2475
|
+
"pino": "^8.15.1",
|
|
2475
2476
|
"pino-abstract-transport": "^1.0.0",
|
|
2476
2477
|
"pino-pretty": "^10.2.0",
|
|
2477
2478
|
"proper-lockfile": "^4.1.2",
|
|
@@ -2482,6 +2483,12 @@
|
|
|
2482
2483
|
"node": ">=16.0.0"
|
|
2483
2484
|
}
|
|
2484
2485
|
},
|
|
2486
|
+
"node_modules/@salesforce/core/node_modules/@types/semver": {
|
|
2487
|
+
"version": "7.5.2",
|
|
2488
|
+
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.2.tgz",
|
|
2489
|
+
"integrity": "sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw==",
|
|
2490
|
+
"license": "MIT"
|
|
2491
|
+
},
|
|
2485
2492
|
"node_modules/@salesforce/core/node_modules/ajv": {
|
|
2486
2493
|
"version": "8.12.0",
|
|
2487
2494
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
|
|
@@ -2761,13 +2768,13 @@
|
|
|
2761
2768
|
"license": "ISC"
|
|
2762
2769
|
},
|
|
2763
2770
|
"node_modules/@salesforce/sf-plugins-core": {
|
|
2764
|
-
"version": "3.1.
|
|
2765
|
-
"resolved": "https://registry.npmjs.org/@salesforce/sf-plugins-core/-/sf-plugins-core-3.1.
|
|
2766
|
-
"integrity": "sha512-
|
|
2771
|
+
"version": "3.1.22",
|
|
2772
|
+
"resolved": "https://registry.npmjs.org/@salesforce/sf-plugins-core/-/sf-plugins-core-3.1.22.tgz",
|
|
2773
|
+
"integrity": "sha512-t8IvC+8LLzCU+skT3/FGjpkB6qm+VaL3uCbwrqgmZivzQc5tpRQpVcW9YbTgJUgkQrD58yurbkwX/jA9hMR6yg==",
|
|
2767
2774
|
"license": "BSD-3-Clause",
|
|
2768
2775
|
"dependencies": {
|
|
2769
|
-
"@oclif/core": "^2.
|
|
2770
|
-
"@salesforce/core": "^5.2.
|
|
2776
|
+
"@oclif/core": "^2.15.0",
|
|
2777
|
+
"@salesforce/core": "^5.2.6",
|
|
2771
2778
|
"@salesforce/kit": "^3.0.11",
|
|
2772
2779
|
"@salesforce/ts-types": "^2.0.7",
|
|
2773
2780
|
"chalk": "^4",
|
|
@@ -3293,6 +3300,7 @@
|
|
|
3293
3300
|
"version": "7.5.0",
|
|
3294
3301
|
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz",
|
|
3295
3302
|
"integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==",
|
|
3303
|
+
"dev": true,
|
|
3296
3304
|
"license": "MIT"
|
|
3297
3305
|
},
|
|
3298
3306
|
"node_modules/@types/shelljs": {
|
|
@@ -18984,19 +18992,19 @@
|
|
|
18984
18992
|
}
|
|
18985
18993
|
},
|
|
18986
18994
|
"node_modules/ts-json-schema-generator": {
|
|
18987
|
-
"version": "1.
|
|
18988
|
-
"resolved": "https://registry.npmjs.org/ts-json-schema-generator/-/ts-json-schema-generator-1.
|
|
18989
|
-
"integrity": "sha512-
|
|
18995
|
+
"version": "1.3.0",
|
|
18996
|
+
"resolved": "https://registry.npmjs.org/ts-json-schema-generator/-/ts-json-schema-generator-1.3.0.tgz",
|
|
18997
|
+
"integrity": "sha512-Y2smEgpxtWat8ICaLbUENXZ/o/SqvVy85X48V/7qOarOTu6XgVs+lr6k0OPFljVhZX5gEMrGPT3q7Ql7JKnexw==",
|
|
18990
18998
|
"dev": true,
|
|
18991
18999
|
"license": "MIT",
|
|
18992
19000
|
"dependencies": {
|
|
18993
|
-
"@types/json-schema": "^7.0.
|
|
18994
|
-
"commander": "^
|
|
19001
|
+
"@types/json-schema": "^7.0.12",
|
|
19002
|
+
"commander": "^11.0.0",
|
|
18995
19003
|
"glob": "^8.0.3",
|
|
18996
|
-
"json5": "^2.2.
|
|
19004
|
+
"json5": "^2.2.3",
|
|
18997
19005
|
"normalize-path": "^3.0.0",
|
|
18998
|
-
"safe-stable-stringify": "^2.4.
|
|
18999
|
-
"typescript": "~
|
|
19006
|
+
"safe-stable-stringify": "^2.4.3",
|
|
19007
|
+
"typescript": "~5.1.6"
|
|
19000
19008
|
},
|
|
19001
19009
|
"bin": {
|
|
19002
19010
|
"ts-json-schema-generator": "bin/ts-json-schema-generator"
|
|
@@ -19006,13 +19014,13 @@
|
|
|
19006
19014
|
}
|
|
19007
19015
|
},
|
|
19008
19016
|
"node_modules/ts-json-schema-generator/node_modules/commander": {
|
|
19009
|
-
"version": "
|
|
19010
|
-
"resolved": "https://registry.npmjs.org/commander/-/commander-
|
|
19011
|
-
"integrity": "sha512-
|
|
19017
|
+
"version": "11.0.0",
|
|
19018
|
+
"resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz",
|
|
19019
|
+
"integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==",
|
|
19012
19020
|
"dev": true,
|
|
19013
19021
|
"license": "MIT",
|
|
19014
19022
|
"engines": {
|
|
19015
|
-
"node": "
|
|
19023
|
+
"node": ">=16"
|
|
19016
19024
|
}
|
|
19017
19025
|
},
|
|
19018
19026
|
"node_modules/ts-json-schema-generator/node_modules/glob": {
|
|
@@ -19049,9 +19057,9 @@
|
|
|
19049
19057
|
}
|
|
19050
19058
|
},
|
|
19051
19059
|
"node_modules/ts-json-schema-generator/node_modules/typescript": {
|
|
19052
|
-
"version": "
|
|
19053
|
-
"resolved": "https://registry.npmjs.org/typescript/-/typescript-
|
|
19054
|
-
"integrity": "sha512-
|
|
19060
|
+
"version": "5.1.6",
|
|
19061
|
+
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
|
|
19062
|
+
"integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
|
|
19055
19063
|
"dev": true,
|
|
19056
19064
|
"license": "Apache-2.0",
|
|
19057
19065
|
"bin": {
|
|
@@ -19059,7 +19067,7 @@
|
|
|
19059
19067
|
"tsserver": "bin/tsserver"
|
|
19060
19068
|
},
|
|
19061
19069
|
"engines": {
|
|
19062
|
-
"node": ">=
|
|
19070
|
+
"node": ">=14.17"
|
|
19063
19071
|
}
|
|
19064
19072
|
},
|
|
19065
19073
|
"node_modules/ts-node": {
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.1
|
|
2
|
+
"version": "4.2.1",
|
|
3
3
|
"commands": {
|
|
4
4
|
"channel:promote": {
|
|
5
5
|
"id": "channel:promote",
|
|
@@ -735,16 +735,16 @@
|
|
|
735
735
|
},
|
|
736
736
|
"cli:tarballs:smoke": {
|
|
737
737
|
"id": "cli:tarballs:smoke",
|
|
738
|
-
"summary": "smoke tests for the
|
|
739
|
-
"description": "smoke tests for the
|
|
738
|
+
"summary": "smoke tests for the sf CLI\n Tests that the CLI and every command can be initialized.",
|
|
739
|
+
"description": "smoke tests for the sf CLI\n Tests that the CLI and every command can be initialized.",
|
|
740
740
|
"strict": true,
|
|
741
741
|
"pluginName": "@salesforce/plugin-release-management",
|
|
742
742
|
"pluginAlias": "@salesforce/plugin-release-management",
|
|
743
743
|
"pluginType": "core",
|
|
744
744
|
"aliases": [],
|
|
745
745
|
"examples": [
|
|
746
|
-
"<%= config.bin %> <%= command.id %>
|
|
747
|
-
"<%= config.bin %> <%= command.id %>
|
|
746
|
+
"<%= config.bin %> <%= command.id %>",
|
|
747
|
+
"<%= config.bin %> <%= command.id %>"
|
|
748
748
|
],
|
|
749
749
|
"flags": {
|
|
750
750
|
"json": {
|
|
@@ -754,18 +754,6 @@
|
|
|
754
754
|
"helpGroup": "GLOBAL",
|
|
755
755
|
"allowNo": false
|
|
756
756
|
},
|
|
757
|
-
"cli": {
|
|
758
|
-
"name": "cli",
|
|
759
|
-
"type": "option",
|
|
760
|
-
"char": "c",
|
|
761
|
-
"summary": "the cli to install",
|
|
762
|
-
"required": true,
|
|
763
|
-
"multiple": false,
|
|
764
|
-
"options": [
|
|
765
|
-
"sf",
|
|
766
|
-
"sfdx"
|
|
767
|
-
]
|
|
768
|
-
},
|
|
769
757
|
"verbose": {
|
|
770
758
|
"name": "verbose",
|
|
771
759
|
"type": "boolean",
|
|
@@ -1053,6 +1041,28 @@
|
|
|
1053
1041
|
}
|
|
1054
1042
|
},
|
|
1055
1043
|
"args": {}
|
|
1044
|
+
},
|
|
1045
|
+
"cli:install:jit:test": {
|
|
1046
|
+
"id": "cli:install:jit:test",
|
|
1047
|
+
"summary": "Test that all JIT plugins can be successfully installed.",
|
|
1048
|
+
"strict": true,
|
|
1049
|
+
"pluginName": "@salesforce/plugin-release-management",
|
|
1050
|
+
"pluginAlias": "@salesforce/plugin-release-management",
|
|
1051
|
+
"pluginType": "core",
|
|
1052
|
+
"aliases": [],
|
|
1053
|
+
"examples": [
|
|
1054
|
+
"<%= config.bin %> <%= command.id %>"
|
|
1055
|
+
],
|
|
1056
|
+
"flags": {
|
|
1057
|
+
"json": {
|
|
1058
|
+
"name": "json",
|
|
1059
|
+
"type": "boolean",
|
|
1060
|
+
"description": "Format output as json.",
|
|
1061
|
+
"helpGroup": "GLOBAL",
|
|
1062
|
+
"allowNo": false
|
|
1063
|
+
}
|
|
1064
|
+
},
|
|
1065
|
+
"args": {}
|
|
1056
1066
|
}
|
|
1057
1067
|
}
|
|
1058
1068
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-release-management",
|
|
3
3
|
"description": "A plugin for preparing and publishing npm packages",
|
|
4
|
-
"version": "4.1
|
|
4
|
+
"version": "4.2.1",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@salesforce/kit": "^3.0.9",
|
|
18
18
|
"@salesforce/plugin-command-reference": "^3.0.25",
|
|
19
19
|
"@salesforce/plugin-trust": "^2.6.8",
|
|
20
|
-
"@salesforce/sf-plugins-core": "^3.1.
|
|
20
|
+
"@salesforce/sf-plugins-core": "^3.1.22",
|
|
21
21
|
"@salesforce/ts-types": "^2.0.6",
|
|
22
22
|
"aws-sdk": "^2.1440.0",
|
|
23
23
|
"chalk": "^4.1.0",
|
|
@@ -28,11 +28,12 @@
|
|
|
28
28
|
"semver": "^7.5.2",
|
|
29
29
|
"shelljs": "^0.8.4",
|
|
30
30
|
"standard-version": "^9.0.0",
|
|
31
|
+
"strip-ansi": "^6",
|
|
31
32
|
"tslib": "^2",
|
|
32
33
|
"yarn-deduplicate": "^3.1.0"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
|
-
"@oclif/plugin-command-snapshot": "^4.0.
|
|
36
|
+
"@oclif/plugin-command-snapshot": "^4.0.14",
|
|
36
37
|
"@salesforce/dev-config": "^4.0.1",
|
|
37
38
|
"@salesforce/dev-scripts": "^5.10.0",
|
|
38
39
|
"@salesforce/prettier-config": "^0.0.3",
|