@salesforce/plugin-release-management 3.5.17 → 3.7.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 +3 -3
- package/bin/dev +7 -3
- package/bin/run +1 -3
- package/lib/amazonS3.d.ts +2 -2
- package/lib/codeSigning/packAndSign.d.ts +2 -2
- package/lib/codeSigning/packAndSign.js +1 -1
- package/lib/codeSigning/packAndSign.js.map +1 -1
- package/lib/commands/channel/promote.d.ts +19 -30
- package/lib/commands/channel/promote.js +133 -132
- package/lib/commands/channel/promote.js.map +1 -1
- package/lib/commands/cli/install/test.d.ts +9 -3
- package/lib/commands/cli/install/test.js +18 -16
- package/lib/commands/cli/install/test.js.map +1 -1
- package/lib/commands/cli/latestrc/build.d.ts +13 -3
- package/lib/commands/cli/latestrc/build.js +37 -36
- package/lib/commands/cli/latestrc/build.js.map +1 -1
- package/lib/commands/cli/releasenotes.d.ts +10 -5
- package/lib/commands/cli/releasenotes.js +23 -21
- package/lib/commands/cli/releasenotes.js.map +1 -1
- package/lib/commands/cli/schemas/collect.d.ts +7 -8
- package/lib/commands/cli/schemas/collect.js +33 -32
- package/lib/commands/cli/schemas/collect.js.map +1 -1
- package/lib/commands/cli/schemas/compare.d.ts +6 -5
- package/lib/commands/cli/schemas/compare.js +14 -16
- package/lib/commands/cli/schemas/compare.js.map +1 -1
- package/lib/commands/cli/tarballs/prepare.d.ts +10 -3
- package/lib/commands/cli/tarballs/prepare.js +15 -12
- package/lib/commands/cli/tarballs/prepare.js.map +1 -1
- package/lib/commands/cli/tarballs/smoke.d.ts +9 -3
- package/lib/commands/cli/tarballs/smoke.js +46 -44
- package/lib/commands/cli/tarballs/smoke.js.map +1 -1
- package/lib/commands/cli/tarballs/verify.d.ts +9 -3
- package/lib/commands/cli/tarballs/verify.js +13 -10
- package/lib/commands/cli/tarballs/verify.js.map +1 -1
- package/lib/commands/cli/versions/inspect.d.ts +17 -7
- package/lib/commands/cli/versions/inspect.js +40 -40
- package/lib/commands/cli/versions/inspect.js.map +1 -1
- package/lib/commands/dependabot/automerge.d.ts +11 -3
- package/lib/commands/dependabot/automerge.js +28 -25
- package/lib/commands/dependabot/automerge.js.map +1 -1
- package/lib/commands/dependabot/consolidate.d.ts +13 -4
- package/lib/commands/dependabot/consolidate.js +28 -31
- package/lib/commands/dependabot/consolidate.js.map +1 -1
- package/lib/commands/npm/dependencies/pin.d.ts +7 -3
- package/lib/commands/npm/dependencies/pin.js +14 -11
- package/lib/commands/npm/dependencies/pin.js.map +1 -1
- package/lib/commands/npm/package/promote.d.ts +8 -3
- package/lib/commands/npm/package/promote.js +15 -13
- package/lib/commands/npm/package/promote.js.map +1 -1
- package/lib/commands/npm/package/release.d.ts +13 -3
- package/lib/commands/npm/package/release.js +46 -41
- package/lib/commands/npm/package/release.js.map +1 -1
- package/lib/commands/npm/release/validate.d.ts +8 -5
- package/lib/commands/npm/release/validate.js +9 -7
- package/lib/commands/npm/release/validate.js.map +1 -1
- package/lib/commands/repositories/index.d.ts +4 -3
- package/lib/commands/repositories/index.js +7 -5
- package/lib/commands/repositories/index.js.map +1 -1
- package/lib/commands/typescript/update.d.ts +9 -3
- package/lib/commands/typescript/update.js +16 -15
- package/lib/commands/typescript/update.js.map +1 -1
- package/lib/dependabot.d.ts +2 -3
- package/lib/dependabot.js +2 -2
- package/lib/dependabot.js.map +1 -1
- package/lib/dependencies.d.ts +3 -3
- package/lib/package.d.ts +7 -5
- package/lib/package.js +2 -2
- package/lib/package.js.map +1 -1
- package/lib/pluginCommand.d.ts +4 -4
- package/lib/repositories.d.ts +3 -3
- package/lib/repository.d.ts +6 -6
- package/lib/repository.js +5 -3
- package/lib/repository.js.map +1 -1
- package/lib/types.d.ts +3 -3
- package/messages/channel.promote.json +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +17 -12
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
9
|
+
exports.deepEqual = exports.getExistingSchemaFiles = exports.getLatestSchemaFiles = void 0;
|
|
10
10
|
const path = require("path");
|
|
11
11
|
const os = require("os");
|
|
12
12
|
const fs = require("fs/promises");
|
|
13
13
|
const assert = require("assert");
|
|
14
|
-
const
|
|
14
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
15
15
|
const core_1 = require("@salesforce/core");
|
|
16
16
|
const shelljs_1 = require("shelljs");
|
|
17
17
|
const fg = require("fast-glob");
|
|
@@ -21,39 +21,39 @@ const messages = core_1.Messages.load('@salesforce/plugin-release-management', '
|
|
|
21
21
|
'description',
|
|
22
22
|
'examples',
|
|
23
23
|
]);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
const getLatestSchemaFiles = async () => {
|
|
25
|
+
const fileData = await fs.readFile(path.join(process.cwd(), 'package.json'), 'utf-8');
|
|
26
|
+
const pjson = (0, kit_1.parseJsonMap)(fileData, path.join(process.cwd(), 'package.json'));
|
|
27
|
+
const globs = (pjson.oclif?.plugins || []).map((plugin) => {
|
|
28
|
+
const normalized = plugin.replace(/\\/g, '/');
|
|
29
|
+
return `node_modules/${normalized}/schemas/**/*.json`; // We need to use / for path sep since fg only works with Unix paths
|
|
30
|
+
});
|
|
31
|
+
const schemaFiles = (await fg(globs))
|
|
32
|
+
.map((f) => path.normalize(f)) // normalize paths so this will work on Windows since fg only returns Unix paths
|
|
33
|
+
.filter((f) => !f.includes(path.join('@salesforce', 'schemas')));
|
|
34
|
+
return schemaFiles;
|
|
35
|
+
};
|
|
36
|
+
exports.getLatestSchemaFiles = getLatestSchemaFiles;
|
|
37
|
+
const getExistingSchemaFiles = async () => {
|
|
38
|
+
const globs = ['schemas/**/*.json'];
|
|
39
|
+
const schemaFiles = await fg(globs);
|
|
40
|
+
return schemaFiles;
|
|
41
|
+
};
|
|
42
|
+
exports.getExistingSchemaFiles = getExistingSchemaFiles;
|
|
43
|
+
const deepEqual = (a, b) => {
|
|
44
|
+
try {
|
|
45
|
+
assert.deepEqual(a, b);
|
|
46
|
+
return true;
|
|
36
47
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const schemaFiles = await fg(globs);
|
|
40
|
-
return schemaFiles;
|
|
48
|
+
catch {
|
|
49
|
+
return false;
|
|
41
50
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
catch {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.SchemaUtils = SchemaUtils;
|
|
53
|
-
class Collect extends command_1.SfdxCommand {
|
|
51
|
+
};
|
|
52
|
+
exports.deepEqual = deepEqual;
|
|
53
|
+
class Collect extends sf_plugins_core_1.SfCommand {
|
|
54
54
|
// eslint-disable-next-line class-methods-use-this
|
|
55
55
|
async run() {
|
|
56
|
-
const schemaFiles = await
|
|
56
|
+
const schemaFiles = await (0, exports.getLatestSchemaFiles)();
|
|
57
57
|
const schemaFilesByPlugin = new Map();
|
|
58
58
|
for (const file of schemaFiles) {
|
|
59
59
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -86,7 +86,8 @@ class Collect extends command_1.SfdxCommand {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
exports.default = Collect;
|
|
89
|
+
Collect.summary = messages.getMessage('description');
|
|
89
90
|
Collect.description = messages.getMessage('description');
|
|
90
91
|
Collect.examples = messages.getMessage('examples').split(os.EOL);
|
|
91
|
-
Collect.
|
|
92
|
+
Collect.flags = {};
|
|
92
93
|
//# sourceMappingURL=collect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect.js","sourceRoot":"","sources":["../../../../src/commands/cli/schemas/collect.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAA6B;AAC7B,yBAAyB;AACzB,kCAAkC;AAClC,iCAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"collect.js","sourceRoot":"","sources":["../../../../src/commands/cli/schemas/collect.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAA6B;AAC7B,yBAAyB;AACzB,kCAAkC;AAClC,iCAAiC;AACjC,iEAAwD;AACxD,2CAA4C;AAC5C,qCAA6B;AAC7B,gCAAgC;AAEhC,yCAA+C;AAE/C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,IAAI,CAAC,uCAAuC,EAAE,qBAAqB,EAAE;IAC7F,aAAa;IACb,UAAU;CACX,CAAC,CAAC;AAEI,MAAM,oBAAoB,GAAG,KAAK,IAAuB,EAAE;IAChE,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;IACtF,MAAM,KAAK,GAAqC,IAAA,kBAAY,EAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC;IAEjH,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACxD,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC9C,OAAO,gBAAgB,UAAU,oBAAoB,CAAC,CAAC,oEAAoE;IAC7H,CAAC,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,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,YAAE,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBAChE;qBAAM;oBACL,IAAA,YAAE,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBACjE;YACH,CAAC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;;AA1CH,0BA2CC;AA1CwB,eAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAC7C,mBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAEjD,gBAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACzD,aAAK,GAAG,EAAE,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
type Result = {
|
|
3
3
|
correspondingFile: string;
|
|
4
4
|
matches: boolean;
|
|
5
5
|
reason?: string;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
export default class Compare extends
|
|
7
|
+
type Results = Record<string, Result>;
|
|
8
|
+
export default class Compare extends SfCommand<Results> {
|
|
9
|
+
static readonly summary: string;
|
|
9
10
|
static readonly description: string;
|
|
10
11
|
static readonly examples: string[];
|
|
11
|
-
static readonly
|
|
12
|
+
static readonly flags: {};
|
|
12
13
|
run(): Promise<Results>;
|
|
13
14
|
}
|
|
14
15
|
export {};
|
|
@@ -10,21 +10,20 @@ const path = require("path");
|
|
|
10
10
|
const os = require("os");
|
|
11
11
|
const fs = require("fs/promises");
|
|
12
12
|
const kit_1 = require("@salesforce/kit");
|
|
13
|
-
const
|
|
13
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
14
14
|
const core_1 = require("@salesforce/core");
|
|
15
|
-
const core_2 = require("@oclif/core");
|
|
16
15
|
const collect_1 = require("./collect");
|
|
17
16
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
17
|
const messages = core_1.Messages.load('@salesforce/plugin-release-management', 'cli.schemas.compare', [
|
|
19
18
|
'description',
|
|
20
19
|
'examples',
|
|
21
20
|
]);
|
|
22
|
-
class Compare extends
|
|
21
|
+
class Compare extends sf_plugins_core_1.SfCommand {
|
|
23
22
|
async run() {
|
|
24
23
|
// The "existing schema" is the schema that is stored at the CLI level
|
|
25
|
-
const existing = await collect_1.
|
|
24
|
+
const existing = await (0, collect_1.getExistingSchemaFiles)();
|
|
26
25
|
// The "latest schema" is the schema that is found in the node_modules
|
|
27
|
-
const latest = await collect_1.
|
|
26
|
+
const latest = await (0, collect_1.getLatestSchemaFiles)();
|
|
28
27
|
// If there are more latest schema than existing schema, that means that new
|
|
29
28
|
// schema was added without also being added at the CLI level.
|
|
30
29
|
if (latest.length > existing.length) {
|
|
@@ -43,7 +42,7 @@ class Compare extends command_1.SfdxCommand {
|
|
|
43
42
|
]);
|
|
44
43
|
const fileContents = (0, kit_1.parseJsonMap)(fileData, file);
|
|
45
44
|
const correspondingFileContents = (0, kit_1.parseJsonMap)(correspondingFileData, correspondingFile);
|
|
46
|
-
const matches = collect_1.
|
|
45
|
+
const matches = (0, collect_1.deepEqual)(fileContents, correspondingFileContents);
|
|
47
46
|
return [file, { correspondingFile, matches }];
|
|
48
47
|
}
|
|
49
48
|
else {
|
|
@@ -57,15 +56,13 @@ class Compare extends command_1.SfdxCommand {
|
|
|
57
56
|
];
|
|
58
57
|
}
|
|
59
58
|
})));
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
core_2.CliUx.ux.table(data, columns);
|
|
68
|
-
}
|
|
59
|
+
const data = Object.entries(results).reduce((x, [file, d]) => x.concat(Object.assign({ file }, d)), []);
|
|
60
|
+
const columns = {
|
|
61
|
+
file: { header: 'File' },
|
|
62
|
+
correspondingFile: { header: 'Corresponding File' },
|
|
63
|
+
matches: { header: 'Matches?' },
|
|
64
|
+
};
|
|
65
|
+
this.table(data, columns);
|
|
69
66
|
const hasErrors = Object.values(results).some((result) => result.matches === false);
|
|
70
67
|
if (hasErrors) {
|
|
71
68
|
throw new core_1.SfError('Found schema changes', 'SchemaMismatchError', [
|
|
@@ -76,9 +73,10 @@ class Compare extends command_1.SfdxCommand {
|
|
|
76
73
|
}
|
|
77
74
|
}
|
|
78
75
|
exports.default = Compare;
|
|
76
|
+
Compare.summary = messages.getMessage('description');
|
|
79
77
|
Compare.description = messages.getMessage('description');
|
|
80
78
|
Compare.examples = messages.getMessage('examples').split(os.EOL);
|
|
81
|
-
Compare.
|
|
79
|
+
Compare.flags = {};
|
|
82
80
|
const normalizeFilename = (file) => {
|
|
83
81
|
const normalized = file
|
|
84
82
|
.split(path.sep)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compare.js","sourceRoot":"","sources":["../../../../src/commands/cli/schemas/compare.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,6BAA6B;AAC7B,yBAAyB;AACzB,kCAAkC;AAClC,yCAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"compare.js","sourceRoot":"","sources":["../../../../src/commands/cli/schemas/compare.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,6BAA6B;AAC7B,yBAAyB;AACzB,kCAAkC;AAClC,yCAA+C;AAC/C,iEAAwD;AACxD,2CAAqD;AACrD,uCAAoF;AAEpF,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,IAAI,CAAC,uCAAuC,EAAE,qBAAqB,EAAE;IAC7F,aAAa;IAC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I;aACvI,EACD,CAAC,CACF,CAAC;SACH;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;;AA7EH,0BA8EC;AA7EwB,eAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAC7C,mBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,gBAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACzD,aAAK,GAAG,EAAE,CAAC;AA4EpC,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAU,EAAE;IACjD,MAAM,UAAU,GAAG,IAAI;SACpB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;SACf,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;SACvD,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAC1C,CAAC,CAAC"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { Interfaces } from '@oclif/core';
|
|
2
3
|
/**
|
|
3
4
|
* The functionality of this command is taken entirely from https://github.com/salesforcecli/sfdx-cli/blob/v7.109.0/scripts/clean-for-tarballs
|
|
4
5
|
*/
|
|
5
|
-
export default class
|
|
6
|
+
export default class Prepare extends SfCommand<void> {
|
|
7
|
+
static readonly summary: string;
|
|
6
8
|
static readonly description: string;
|
|
7
9
|
static readonly examples: string[];
|
|
8
|
-
static readonly
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
dryrun: Interfaces.BooleanFlag<boolean>;
|
|
12
|
+
types: Interfaces.BooleanFlag<boolean>;
|
|
13
|
+
verbose: Interfaces.BooleanFlag<boolean>;
|
|
14
|
+
};
|
|
15
|
+
private flags;
|
|
9
16
|
run(): Promise<void>;
|
|
10
17
|
private remove;
|
|
11
18
|
}
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
const os = require("os");
|
|
10
10
|
const fg = require("fast-glob");
|
|
11
11
|
const shelljs_1 = require("shelljs");
|
|
12
|
-
const
|
|
12
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
13
13
|
const core_1 = require("@salesforce/core");
|
|
14
14
|
const chalk_1 = require("chalk");
|
|
15
15
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
@@ -17,8 +17,10 @@ const messages = core_1.Messages.loadMessages('@salesforce/plugin-release-manage
|
|
|
17
17
|
/**
|
|
18
18
|
* The functionality of this command is taken entirely from https://github.com/salesforcecli/sfdx-cli/blob/v7.109.0/scripts/clean-for-tarballs
|
|
19
19
|
*/
|
|
20
|
-
class
|
|
20
|
+
class Prepare extends sf_plugins_core_1.SfCommand {
|
|
21
21
|
async run() {
|
|
22
|
+
const { flags } = await this.parse(Prepare);
|
|
23
|
+
this.flags = flags;
|
|
22
24
|
const workingDir = (0, shelljs_1.pwd)().stdout;
|
|
23
25
|
const baseDirGlob = `${workingDir}/node_modules`;
|
|
24
26
|
// Remove JSforceTestSuite from dist
|
|
@@ -88,22 +90,23 @@ class Verify extends command_1.SfdxCommand {
|
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
|
-
exports.default =
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
exports.default = Prepare;
|
|
94
|
+
Prepare.summary = messages.getMessage('description');
|
|
95
|
+
Prepare.description = messages.getMessage('description');
|
|
96
|
+
Prepare.examples = messages.getMessage('examples').split(os.EOL);
|
|
97
|
+
Prepare.flags = {
|
|
98
|
+
dryrun: sf_plugins_core_1.Flags.boolean({
|
|
99
|
+
summary: messages.getMessage('dryrun'),
|
|
97
100
|
default: false,
|
|
98
101
|
char: 'd',
|
|
99
102
|
}),
|
|
100
|
-
types:
|
|
101
|
-
|
|
103
|
+
types: sf_plugins_core_1.Flags.boolean({
|
|
104
|
+
summary: messages.getMessage('types'),
|
|
102
105
|
default: false,
|
|
103
106
|
char: 't',
|
|
104
107
|
}),
|
|
105
|
-
verbose:
|
|
106
|
-
|
|
108
|
+
verbose: sf_plugins_core_1.Flags.boolean({
|
|
109
|
+
summary: messages.getMessage('verbose'),
|
|
107
110
|
}),
|
|
108
111
|
};
|
|
109
112
|
const find = async (globPattern, options = {}) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.js","sourceRoot":"","sources":["../../../../src/commands/cli/tarballs/prepare.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,yBAAyB;AACzB,gCAAgC;AAChC,qCAAkC;AAClC,
|
|
1
|
+
{"version":3,"file":"prepare.js","sourceRoot":"","sources":["../../../../src/commands/cli/tarballs/prepare.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,yBAAyB;AACzB,gCAAgC;AAChC,qCAAkC;AAClC,iEAA+D;AAC/D,2CAA4C;AAC5C,iCAA4B;AAG5B,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uCAAuC,EAAE,sBAAsB,CAAC,CAAC;AAExG;;GAEG;AACH,MAAqB,OAAQ,SAAQ,2BAAe;IAuB3C,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,MAAM,UAAU,GAAG,IAAA,aAAG,GAAE,CAAC,MAAM,CAAC;QAChC,MAAM,WAAW,GAAG,GAAG,UAAU,eAAe,CAAC;QAEjD,oCA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OAAO,CAAC,CAAC;AAC/B,CAAC,CAAC"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default class SmokeTest extends
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export default class SmokeTest extends SfCommand<void> {
|
|
3
|
+
static readonly summary: string;
|
|
3
4
|
static readonly description: string;
|
|
4
5
|
static readonly examples: string[];
|
|
5
|
-
static readonly
|
|
6
|
+
static readonly flags: {
|
|
7
|
+
cli: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
|
+
verbose: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
};
|
|
10
|
+
private verbose;
|
|
6
11
|
run(): Promise<void>;
|
|
7
12
|
private smokeTest;
|
|
8
13
|
private initializeAllCommands;
|
|
9
14
|
private getAllCommands;
|
|
15
|
+
private nonVerboseCommandExecution;
|
|
10
16
|
private execute;
|
|
11
17
|
}
|
|
@@ -8,81 +8,83 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const path = require("path");
|
|
10
10
|
const os = require("os");
|
|
11
|
+
const child_process_1 = require("child_process");
|
|
12
|
+
const node_util_1 = require("node:util");
|
|
11
13
|
const chalk = require("chalk");
|
|
12
|
-
const
|
|
14
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
13
15
|
const core_1 = require("@salesforce/core");
|
|
14
16
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
15
|
-
const shelljs_1 = require("shelljs");
|
|
16
17
|
const types_1 = require("../../../types");
|
|
18
|
+
const exec = (0, node_util_1.promisify)(child_process_1.exec);
|
|
17
19
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
20
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-release-management', 'cli.tarballs.smoke');
|
|
19
|
-
class SmokeTest extends
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
21
|
+
class SmokeTest extends sf_plugins_core_1.SfCommand {
|
|
21
22
|
async run() {
|
|
22
|
-
const
|
|
23
|
+
const { flags } = await this.parse(SmokeTest);
|
|
24
|
+
this.verbose = flags.verbose;
|
|
25
|
+
const cli = (0, ts_types_1.ensure)(flags.cli);
|
|
23
26
|
const executables = [path.join('tmp', cli, 'bin', cli)];
|
|
24
27
|
if (cli === types_1.CLI.SFDX) {
|
|
25
28
|
executables.push(path.join('tmp', cli, 'bin', types_1.CLI.SF));
|
|
26
29
|
}
|
|
27
|
-
|
|
28
|
-
this.smokeTest(executable);
|
|
29
|
-
}
|
|
30
|
+
await Promise.all(executables.map((executable) => this.smokeTest(executable)));
|
|
30
31
|
}
|
|
31
|
-
smokeTest(executable) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
async smokeTest(executable) {
|
|
33
|
+
await Promise.all([
|
|
34
|
+
this.execute(executable, '--version'),
|
|
35
|
+
this.execute(executable, '--help'),
|
|
36
|
+
this.execute(executable, 'plugins --core'),
|
|
37
|
+
this.execute(executable, 'plugins:install @salesforce/plugin-alias@latest'),
|
|
38
|
+
]);
|
|
39
|
+
await this.initializeAllCommands(executable);
|
|
37
40
|
}
|
|
38
|
-
initializeAllCommands(executable) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
try {
|
|
45
|
-
this.execute(executable, `${command} --help`, true);
|
|
46
|
-
this.log(`${executable} ${command} --help ${chalk.green('PASSED')}`);
|
|
47
|
-
}
|
|
48
|
-
catch (err) {
|
|
49
|
-
this.log(`${executable} ${command} --help ${chalk.red('FAILED')}`);
|
|
50
|
-
throw err;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
41
|
+
async initializeAllCommands(executable) {
|
|
42
|
+
await Promise.all(this.verbose
|
|
43
|
+
? (await this.getAllCommands(executable)).map((command) => this.execute(executable, `${command} --help`))
|
|
44
|
+
: (await this.getAllCommands(executable)).map((command) => this.nonVerboseCommandExecution(executable, command)));
|
|
54
45
|
}
|
|
55
|
-
getAllCommands(executable) {
|
|
56
|
-
const commandsJson = JSON.parse(this.execute(executable, 'commands --json', true));
|
|
46
|
+
async getAllCommands(executable) {
|
|
47
|
+
const commandsJson = JSON.parse(await this.execute(executable, 'commands --json', true));
|
|
57
48
|
return commandsJson.map((c) => c.id);
|
|
58
49
|
}
|
|
59
|
-
|
|
50
|
+
async nonVerboseCommandExecution(executable, command) {
|
|
51
|
+
try {
|
|
52
|
+
await this.execute(executable, `${command} --help`, true);
|
|
53
|
+
this.log(`${executable} ${command} --help ${chalk.green('PASSED')}`);
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
this.log(`${executable} ${command} --help ${chalk.red('FAILED')}`);
|
|
57
|
+
throw err;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async execute(executable, args, silent = false) {
|
|
60
61
|
const command = `${executable} ${args}`;
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
try {
|
|
63
|
+
const { stdout } = await exec(command);
|
|
63
64
|
if (!silent) {
|
|
64
|
-
this.
|
|
65
|
-
this.log(
|
|
65
|
+
this.styledHeader(command);
|
|
66
|
+
this.log(stdout);
|
|
66
67
|
}
|
|
67
|
-
return
|
|
68
|
+
return stdout;
|
|
68
69
|
}
|
|
69
|
-
|
|
70
|
+
catch (e) {
|
|
70
71
|
throw new core_1.SfError(`Failed: ${command}`);
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
exports.default = SmokeTest;
|
|
76
|
+
SmokeTest.summary = messages.getMessage('description');
|
|
75
77
|
SmokeTest.description = messages.getMessage('description');
|
|
76
78
|
SmokeTest.examples = messages.getMessage('examples').split(os.EOL);
|
|
77
|
-
SmokeTest.
|
|
78
|
-
cli:
|
|
79
|
-
|
|
79
|
+
SmokeTest.flags = {
|
|
80
|
+
cli: sf_plugins_core_1.Flags.string({
|
|
81
|
+
summary: messages.getMessage('cliFlag'),
|
|
80
82
|
options: Object.values(types_1.CLI),
|
|
81
83
|
char: 'c',
|
|
82
84
|
required: true,
|
|
83
85
|
}),
|
|
84
|
-
verbose:
|
|
85
|
-
|
|
86
|
+
verbose: sf_plugins_core_1.Flags.boolean({
|
|
87
|
+
summary: messages.getMessage('verboseFlag'),
|
|
86
88
|
}),
|
|
87
89
|
};
|
|
88
90
|
//# sourceMappingURL=smoke.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smoke.js","sourceRoot":"","sources":["../../../../src/commands/cli/tarballs/smoke.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,6BAA6B;AAC7B,yBAAyB;AACzB,+BAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"smoke.js","sourceRoot":"","sources":["../../../../src/commands/cli/tarballs/smoke.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,6BAA6B;AAC7B,yBAAyB;AACzB,iDAAiD;AACjD,yCAAsC;AACtC,+BAA+B;AAC/B,iEAA+D;AAC/D,2CAAqD;AACrD,mDAA8C;AAC9C,0CAAqC;AAErC,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;IAmB7C,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC9C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,MAAM,GAAG,GAAG,IAAA,iBAAM,EAAM,KAAK,CAAC,GAAU,CAAC,CAAC;QAC1C,MAAM,WAAW,GAAG,CAAC,IAAI,C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,CAAC;SACzC;IACH,CAAC;;AA3EH,4BA4EC;AA3EwB,iBAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAC7C,qBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAEjD,kBAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACzD,eAAK,GAAG;IAC7B,GAAG,EAAE,uBAAK,CAAC,MAAM,CAAC;QAChB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC;QACvC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,WAAG,CAAC;QAC3B,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,OAAO,EAAE,uBAAK,CAAC,OAAO,CAAC;QACrB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC;KAC5C,CAAC;CACH,CAAC"}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { Interfaces } from '@oclif/core';
|
|
2
3
|
/**
|
|
3
4
|
* The functionality of this command is taken entirely from https://github.com/salesforcecli/sfdx-cli/blob/v7.109.0/scripts/verify-tarballs
|
|
4
5
|
*/
|
|
5
|
-
export default class Verify extends
|
|
6
|
+
export default class Verify extends SfCommand<void> {
|
|
7
|
+
static readonly summary: string;
|
|
6
8
|
static readonly description: string;
|
|
7
9
|
static readonly examples: string[];
|
|
8
|
-
static readonly
|
|
10
|
+
static readonly flags: {
|
|
11
|
+
cli: Interfaces.OptionFlag<string>;
|
|
12
|
+
"windows-username-buffer": Interfaces.OptionFlag<number>;
|
|
13
|
+
};
|
|
9
14
|
private baseDir;
|
|
10
15
|
private step;
|
|
11
16
|
private totalSteps;
|
|
17
|
+
private flags;
|
|
12
18
|
run(): Promise<void>;
|
|
13
19
|
execute(msg: string, validate: () => Promise<boolean>): Promise<boolean>;
|
|
14
20
|
ensureNoWebDriverIO(): Promise<void>;
|
|
@@ -11,7 +11,7 @@ const fs = require("fs/promises");
|
|
|
11
11
|
const path = require("path");
|
|
12
12
|
const fg = require("fast-glob");
|
|
13
13
|
const shelljs_1 = require("shelljs");
|
|
14
|
-
const
|
|
14
|
+
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
15
15
|
const core_1 = require("@salesforce/core");
|
|
16
16
|
const ts_types_1 = require("@salesforce/ts-types");
|
|
17
17
|
const chalk_1 = require("chalk");
|
|
@@ -43,13 +43,15 @@ async function fileExists(filePath) {
|
|
|
43
43
|
/**
|
|
44
44
|
* The functionality of this command is taken entirely from https://github.com/salesforcecli/sfdx-cli/blob/v7.109.0/scripts/verify-tarballs
|
|
45
45
|
*/
|
|
46
|
-
class Verify extends
|
|
46
|
+
class Verify extends sf_plugins_core_1.SfCommand {
|
|
47
47
|
constructor() {
|
|
48
48
|
super(...arguments);
|
|
49
49
|
this.step = 1;
|
|
50
50
|
this.totalSteps = 1;
|
|
51
51
|
}
|
|
52
52
|
async run() {
|
|
53
|
+
const { flags } = await this.parse(Verify);
|
|
54
|
+
this.flags = flags;
|
|
53
55
|
const cli = (0, ts_types_1.ensure)(this.flags.cli);
|
|
54
56
|
this.baseDir = path.join('tmp', cli);
|
|
55
57
|
const cliRunLists = {
|
|
@@ -78,13 +80,13 @@ class Verify extends command_1.SfdxCommand {
|
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
async execute(msg, validate) {
|
|
81
|
-
this.
|
|
83
|
+
this.spinner.start(`[${this.step}/${this.totalSteps}] ${msg}`);
|
|
82
84
|
if (!(await validate())) {
|
|
83
|
-
this.
|
|
85
|
+
this.spinner.stop(FAILED);
|
|
84
86
|
return false;
|
|
85
87
|
}
|
|
86
88
|
this.step += 1;
|
|
87
|
-
this.
|
|
89
|
+
this.spinner.stop(PASSED);
|
|
88
90
|
return true;
|
|
89
91
|
}
|
|
90
92
|
async ensureNoWebDriverIO() {
|
|
@@ -255,17 +257,18 @@ class Verify extends command_1.SfdxCommand {
|
|
|
255
257
|
}
|
|
256
258
|
}
|
|
257
259
|
exports.default = Verify;
|
|
260
|
+
Verify.summary = messages.getMessage('description');
|
|
258
261
|
Verify.description = messages.getMessage('description');
|
|
259
262
|
Verify.examples = messages.getMessage('examples').split(os.EOL);
|
|
260
|
-
Verify.
|
|
261
|
-
cli:
|
|
262
|
-
|
|
263
|
+
Verify.flags = {
|
|
264
|
+
cli: sf_plugins_core_1.Flags.enum({
|
|
265
|
+
summary: messages.getMessage('cli'),
|
|
263
266
|
options: Object.values(types_1.CLI),
|
|
264
267
|
default: 'sfdx',
|
|
265
268
|
char: 'c',
|
|
266
269
|
}),
|
|
267
|
-
['windows-username-buffer']:
|
|
268
|
-
|
|
270
|
+
['windows-username-buffer']: sf_plugins_core_1.Flags.integer({
|
|
271
|
+
summary: messages.getMessage('windowsUsernameBuffer'),
|
|
269
272
|
default: 41,
|
|
270
273
|
char: 'w',
|
|
271
274
|
}),
|