@salesforce/plugin-deploy-retrieve 1.17.16 → 1.18.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/project/deploy/quick.js +12 -4
- package/lib/commands/project/deploy/quick.js.map +1 -1
- package/lib/commands/project/deploy/resume.js +42 -23
- package/lib/commands/project/deploy/resume.js.map +1 -1
- package/lib/commands/project/reset/tracking.js +1 -2
- package/lib/commands/project/reset/tracking.js.map +1 -1
- package/lib/formatters/deleteResultFormatter.js +1 -2
- package/lib/formatters/deleteResultFormatter.js.map +1 -1
- package/lib/formatters/deployResultFormatter.js +9 -15
- package/lib/formatters/deployResultFormatter.js.map +1 -1
- package/lib/formatters/testResultsFormatter.d.ts +0 -3
- package/lib/formatters/testResultsFormatter.js +46 -51
- package/lib/formatters/testResultsFormatter.js.map +1 -1
- package/lib/utils/coverage.d.ts +6 -2
- package/lib/utils/coverage.js +30 -33
- package/lib/utils/coverage.js.map +1 -1
- package/lib/utils/deploy.d.ts +1 -2
- package/lib/utils/deploy.js +5 -23
- package/lib/utils/deploy.js.map +1 -1
- package/messages/deploy.metadata.report.md +10 -2
- package/messages/deploy.metadata.resume.md +4 -4
- package/oclif.manifest.json +8 -7
- package/package.json +6 -6
|
@@ -26,10 +26,15 @@ class DeployMetadataQuick extends sf_plugins_core_1.SfCommand {
|
|
|
26
26
|
const deployOpts = cache.get(jobId) ?? {};
|
|
27
27
|
const org = flags['target-org'] ?? (await core_1.Org.create({ aliasOrUsername: deployOpts['target-org'] }));
|
|
28
28
|
const api = await (0, deploy_1.resolveApi)(this.configAggregator);
|
|
29
|
+
const mdapiDeploy = new source_deploy_retrieve_1.MetadataApiDeploy({
|
|
30
|
+
usernameOrConnection: org.getConnection(flags['api-version']),
|
|
31
|
+
id: jobId,
|
|
32
|
+
apiOptions: {
|
|
33
|
+
rest: api === 'REST',
|
|
34
|
+
},
|
|
35
|
+
});
|
|
29
36
|
// This is the ID of the deploy (of the validated metadata)
|
|
30
|
-
const deployId = await
|
|
31
|
-
.getConnection(flags['api-version'])
|
|
32
|
-
.metadata.deployRecentValidation({ id: jobId, rest: api === 'REST' });
|
|
37
|
+
const deployId = await mdapiDeploy.deployRecentValidation(api === 'REST');
|
|
33
38
|
this.log(`Deploy ID: ${(0, chalk_1.bold)(deployId)}`);
|
|
34
39
|
if (flags.async) {
|
|
35
40
|
const asyncFormatter = new asyncDeployResultFormatter_1.AsyncDeployResultFormatter(deployId, this.config.bin);
|
|
@@ -37,7 +42,10 @@ class DeployMetadataQuick extends sf_plugins_core_1.SfCommand {
|
|
|
37
42
|
asyncFormatter.display();
|
|
38
43
|
return asyncFormatter.getJson();
|
|
39
44
|
}
|
|
40
|
-
const result = await
|
|
45
|
+
const result = await mdapiDeploy.pollStatus({
|
|
46
|
+
frequency: kit_1.Duration.seconds(1),
|
|
47
|
+
timeout: flags.wait,
|
|
48
|
+
});
|
|
41
49
|
const formatter = new deployResultFormatter_1.DeployResultFormatter(result, flags);
|
|
42
50
|
if (!this.jsonEnabled())
|
|
43
51
|
formatter.display();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quick.js","sourceRoot":"","sources":["../../../../src/commands/project/deploy/quick.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,iCAA6B;AAC7B,2CAAiD;AACjD,iEAA8E;AAC9E,+
|
|
1
|
+
{"version":3,"file":"quick.js","sourceRoot":"","sources":["../../../../src/commands/project/deploy/quick.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,iCAA6B;AAC7B,2CAAiD;AACjD,iEAA8E;AAC9E,+EAAsF;AACtF,yCAA2C;AAC3C,kDAAqF;AACrF,4DAAyD;AACzD,0DAA6E;AAC7E,+FAA4F;AAC5F,qFAAkF;AAGlF,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,uBAA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+BAAa,EAAC,aAAa,EAAE,6CAAgC,CAAC,CAAC"}
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
const chalk_1 = require("chalk");
|
|
10
10
|
const core_1 = require("@salesforce/core");
|
|
11
11
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
12
|
+
const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
|
|
12
13
|
const kit_1 = require("@salesforce/kit");
|
|
13
14
|
const deployResultFormatter_1 = require("../../../formatters/deployResultFormatter");
|
|
14
15
|
const progressBar_1 = require("../../../utils/progressBar");
|
|
@@ -25,26 +26,49 @@ class DeployMetadataResume extends sf_plugins_core_1.SfCommand {
|
|
|
25
26
|
const jobId = cache.resolveLatest(flags['use-most-recent'], flags['job-id']);
|
|
26
27
|
// if it was async before, then it should not be async now.
|
|
27
28
|
const deployOpts = { ...cache.get(jobId), async: false };
|
|
29
|
+
let result;
|
|
30
|
+
// If we already have a status from cache that is not resumable, display a warning and the deploy result.
|
|
28
31
|
if ((0, deploy_1.isNotResumable)(deployOpts.status)) {
|
|
29
|
-
|
|
32
|
+
this.warn(messages.getMessage('warning.DeployNotResumable', [jobId, deployOpts.status]));
|
|
33
|
+
const org = await core_1.Org.create({ aliasOrUsername: deployOpts['target-org'] });
|
|
34
|
+
const componentSet = await (0, deploy_1.buildComponentSet)({ ...deployOpts, wait: kit_1.Duration.seconds(0) });
|
|
35
|
+
const mdapiDeploy = new source_deploy_retrieve_1.MetadataApiDeploy({
|
|
36
|
+
// setting an API version here won't matter since we're just checking deploy status
|
|
37
|
+
// eslint-disable-next-line sf-plugin/get-connection-with-version
|
|
38
|
+
usernameOrConnection: org.getConnection(),
|
|
39
|
+
id: jobId,
|
|
40
|
+
components: componentSet,
|
|
41
|
+
apiOptions: {
|
|
42
|
+
rest: deployOpts.api === 'REST',
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
const deployStatus = await mdapiDeploy.checkStatus();
|
|
46
|
+
result = new source_deploy_retrieve_1.DeployResult(deployStatus, componentSet);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const wait = flags.wait ?? kit_1.Duration.minutes(deployOpts.wait);
|
|
50
|
+
const { deploy } = await (0, deploy_1.executeDeploy)(
|
|
51
|
+
// there will always be conflicts on a resume if anything deployed--the changes on the server are not synced to local
|
|
52
|
+
{
|
|
53
|
+
...deployOpts,
|
|
54
|
+
wait,
|
|
55
|
+
'dry-run': false,
|
|
56
|
+
'ignore-conflicts': true,
|
|
57
|
+
// TODO: isMdapi is generated from 'metadata-dir' flag, but we don't have that flag here
|
|
58
|
+
// change the cache value to actually cache the metadata-dir, and if there's a value, it isMdapi
|
|
59
|
+
// deployCache~L38, so to tell the executeDeploy method it's ok to not have a project, we spoof a metadata-dir
|
|
60
|
+
// in deploy~L140, it checks the if the id is present, so this metadata-dir value is never _really_ used
|
|
61
|
+
'metadata-dir': deployOpts.isMdapi ? { type: 'file', path: 'testing' } : undefined,
|
|
62
|
+
}, this.config.bin, this.project, jobId);
|
|
63
|
+
this.log(`Deploy ID: ${(0, chalk_1.bold)(jobId)}`);
|
|
64
|
+
new progressBar_1.DeployProgress(deploy, this.jsonEnabled()).start();
|
|
65
|
+
result = await deploy.pollStatus(500, wait.seconds);
|
|
66
|
+
if (!deploy.id) {
|
|
67
|
+
throw new core_1.SfError('The deploy id is not available.');
|
|
68
|
+
}
|
|
69
|
+
cache.update(deploy.id, { status: result.response.status });
|
|
70
|
+
await cache.write();
|
|
30
71
|
}
|
|
31
|
-
const wait = flags.wait ?? kit_1.Duration.minutes(deployOpts.wait);
|
|
32
|
-
const { deploy } = await (0, deploy_1.executeDeploy)(
|
|
33
|
-
// there will always be conflicts on a resume if anything deployed--the changes on the server are not synced to local
|
|
34
|
-
{
|
|
35
|
-
...deployOpts,
|
|
36
|
-
wait,
|
|
37
|
-
'dry-run': false,
|
|
38
|
-
'ignore-conflicts': true,
|
|
39
|
-
// TODO: isMdapi is generated from 'metadata-dir' flag, but we don't have that flag here
|
|
40
|
-
// change the cache value to actually cache the metadata-dir, and if there's a value, it isMdapi
|
|
41
|
-
// deployCache~L38, so to tell the executeDeploy method it's ok to not have a project, we spoof a metadata-dir
|
|
42
|
-
// in deploy~L140, it checks the if the id is present, so this metadata-dir value is never _really_ used
|
|
43
|
-
'metadata-dir': deployOpts.isMdapi ? { type: 'file', path: 'testing' } : undefined,
|
|
44
|
-
}, this.config.bin, this.project, jobId);
|
|
45
|
-
this.log(`Deploy ID: ${(0, chalk_1.bold)(jobId)}`);
|
|
46
|
-
new progressBar_1.DeployProgress(deploy, this.jsonEnabled()).start();
|
|
47
|
-
const result = await deploy.pollStatus(500, wait.seconds);
|
|
48
72
|
process.exitCode = (0, deploy_1.determineExitCode)(result);
|
|
49
73
|
const formatter = new deployResultFormatter_1.DeployResultFormatter(result, {
|
|
50
74
|
...flags,
|
|
@@ -53,11 +77,6 @@ class DeployMetadataResume extends sf_plugins_core_1.SfCommand {
|
|
|
53
77
|
});
|
|
54
78
|
if (!this.jsonEnabled())
|
|
55
79
|
formatter.display();
|
|
56
|
-
if (!deploy.id) {
|
|
57
|
-
throw new core_1.SfError('The deploy id is not available.');
|
|
58
|
-
}
|
|
59
|
-
cache.update(deploy.id, { status: result.response.status });
|
|
60
|
-
await cache.write();
|
|
61
80
|
return formatter.getJson();
|
|
62
81
|
}
|
|
63
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../../../../src/commands/project/deploy/resume.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,iCAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../../../../src/commands/project/deploy/resume.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,iCAA6B;AAC7B,2CAA+E;AAC/E,iEAA8E;AAC9E,+EAAqF;AACrF,yCAA2C;AAC3C,qFAAkF;AAClF,4DAA4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,2BAA2B,CAAC;QACzD,SAAS,EAAE,SAAS;KACrB,CAAC;CACH,CAAC;AAEY,wCAAmB,GAAG,IAAA,+BAAa,EAAC,uBAAuB,EAAE,0BAAmB,CAAC,mBAAmB,CAAC,CAAC;AAEtG,+BAAU,GAAG,IAAA,+BAAa,EAAC,aAAa,EAAE,6CAAgC,CAAC,CAAC"}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.ResetTracking = void 0;
|
|
10
10
|
const core_1 = require("@salesforce/core");
|
|
11
|
-
const chalk = require("chalk");
|
|
12
11
|
const source_tracking_1 = require("@salesforce/source-tracking");
|
|
13
12
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
14
13
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
@@ -16,7 +15,7 @@ const messages = core_1.Messages.loadMessages('@salesforce/plugin-deploy-retriev
|
|
|
16
15
|
class ResetTracking extends sf_plugins_core_1.SfCommand {
|
|
17
16
|
async run() {
|
|
18
17
|
const { flags } = await this.parse(ResetTracking);
|
|
19
|
-
if (flags['no-prompt'] || (await this.confirm(
|
|
18
|
+
if (flags['no-prompt'] || (await this.confirm(sf_plugins_core_1.StandardColors.info(messages.getMessage('promptMessage'))))) {
|
|
20
19
|
const sourceTracking = await source_tracking_1.SourceTracking.create({
|
|
21
20
|
project: this.project,
|
|
22
21
|
org: flags['target-org'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracking.js","sourceRoot":"","sources":["../../../../src/commands/project/reset/tracking.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAA4C;AAC5C
|
|
1
|
+
{"version":3,"file":"tracking.js","sourceRoot":"","sources":["../../../../src/commands/project/reset/tracking.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAA4C;AAC5C,iEAA6D;AAC7D,iEAOqC;AAErC,eAAQ,CAAC,uBAAuB,CAAC,SA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c,CAAC,CAAC;AAC9C,yBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;AACtD,6BAAe,GAAG,IAAI,CAAC;AACvB,sBAAQ,GAAG,EAAE,CAAC;AAEd,mBAAK,GAAG;IAC7B,YAAY,EAAE,iDAA+B;IAC7C,aAAa,EAAE,mDAAiC;IAChD,QAAQ,EAAR,0BAAQ;IACR,0DAA0D;IAC1D,QAAQ,EAAE,uBAAK,CAAC,OAAO,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;QACtD,GAAG,EAAE,CAAC;KACP,CAAC;IACF,WAAW,EAAE,uBAAK,CAAC,OAAO,CAAC;QACzB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;QACvD,OAAO,EAAE,CAAC,UAAU,CAAC;QACrB,gBAAgB,EAAE,IAAI;KACvB,CAAC;CACH,CAAC"}
|
|
@@ -8,7 +8,6 @@ exports.DeleteResultFormatter = void 0;
|
|
|
8
8
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
9
|
*/
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
|
-
const chalk = require("chalk");
|
|
12
11
|
const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
|
|
13
12
|
const kit_1 = require("@salesforce/kit");
|
|
14
13
|
const chalk_1 = require("chalk");
|
|
@@ -65,7 +64,7 @@ class DeleteResultFormatter extends testResultsFormatter_1.TestResultsFormatter
|
|
|
65
64
|
});
|
|
66
65
|
}
|
|
67
66
|
core_1.ux.log('');
|
|
68
|
-
core_1.ux.styledHeader(
|
|
67
|
+
core_1.ux.styledHeader((0, chalk_1.blue)('Deleted Source'));
|
|
69
68
|
core_1.ux.table(successes.map((entry) => ({
|
|
70
69
|
fullName: entry.fullName,
|
|
71
70
|
type: entry.type,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteResultFormatter.js","sourceRoot":"","sources":["../../src/formatters/deleteResultFormatter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,sCAAiC;AACjC,+
|
|
1
|
+
{"version":3,"file":"deleteResultFormatter.js","sourceRoot":"","sources":["../../src/formatters/deleteResultFormatter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,sCAAiC;AACjC,+EAA+F;AAC/F,yCAA8C;AAC9C,iCAAmC;AACnC,iEAA6D;AAE7D,4CAAqE;AACrE,6EAA0E;AAE1E,MAAa,qBAAsB,SAAQ,2CAAoB;IAC7D,YACY,MAAoB,EACpB,KAGR;QAEF,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QANX,WAAM,GAAN,MAAM,CAAc;QACpB,UAAK,GAAL,KAAK,CAGb;QAGF,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC7C,CAAC;IACD;;;;OAIG;IACH,4DAA4D;IACrD,KAAK,CAAC,OAAO;QAClB,OAAO;YACL,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ;YACvB,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,EAAE;YACnD,aAAa,EAAE,EAAE;YACjB,cAAc,EAAE,EAAE;YAClB,OAAO,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;SACpD,CAAC;IACJ,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,EAAE;YAC3C,MAAM,SAAS,GAAmB,EAAE,CAAC;YACrC,M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AAE,CAAC,GAAG,EAAE,CAAC;QACT,SAAE,CAAC,KAAK,CACN,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,EAC7F,OAAO,EACP,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAvGD,sDAuGC"}
|
|
@@ -36,18 +36,14 @@ class DeployResultFormatter extends testResultsFormatter_1.TestResultsFormatter
|
|
|
36
36
|
// only generate reports if test results are presented
|
|
37
37
|
if ((!this.result.response?.numberTestsTotal && !this.flags['test-level']) ||
|
|
38
38
|
this.flags['test-level'] === 'NoTestRun') {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
testsWarn += `\`--junit\` was specified but no tests ran.${node_os_1.EOL}`;
|
|
45
|
-
}
|
|
39
|
+
const testsWarn = (this.coverageOptions.reportFormats?.length ? ['`--coverage-formatters` was specified but no tests ran.'] : [])
|
|
40
|
+
.concat(this.junit ? ['`--junit` was specified but no tests ran.'] : [])
|
|
41
|
+
.concat([
|
|
42
|
+
'You can ensure tests run by specifying `--test-level` and setting it to `RunSpecifiedTests`, `RunLocalTests` or `RunAllTestsInOrg`.',
|
|
43
|
+
]);
|
|
46
44
|
// only emit warning if --coverage-formatters or --junit flags were passed
|
|
47
|
-
if (testsWarn.length >
|
|
48
|
-
testsWarn
|
|
49
|
-
'You can ensure tests run by specifying `--test-level` and setting it to `RunSpecifiedTests`, `RunLocalTests` or `RunAllTestsInOrg`.';
|
|
50
|
-
await core_2.Lifecycle.getInstance().emitWarning(testsWarn);
|
|
45
|
+
if (testsWarn.length > 1) {
|
|
46
|
+
await core_2.Lifecycle.getInstance().emitWarning(testsWarn.join(node_os_1.EOL));
|
|
51
47
|
}
|
|
52
48
|
}
|
|
53
49
|
if (this.coverageOptions.reportFormats?.length) {
|
|
@@ -148,10 +144,8 @@ class DeployResultFormatter extends testResultsFormatter_1.TestResultsFormatter
|
|
|
148
144
|
...(0, coverage_1.mapTestResults)((0, kit_1.ensureArray)(runTestResult.failures)),
|
|
149
145
|
],
|
|
150
146
|
codecoverage: (0, kit_1.ensureArray)(runTestResult?.codeCoverage).map((cov) => {
|
|
151
|
-
const numLinesUncovered = parseInt(cov.numLocationsNotCovered, 10);
|
|
152
147
|
const [uncoveredLines, coveredLines] = (0, coverage_1.generateCoveredLines)(cov);
|
|
153
|
-
const numLocationsNum =
|
|
154
|
-
const numLocationsNotCovered = parseInt(cov.numLocationsNotCovered, 10);
|
|
148
|
+
const [numLocationsNum, numLinesUncovered] = (0, coverage_1.getCoverageNumbers)(cov);
|
|
155
149
|
return {
|
|
156
150
|
// TODO: fix this type in SDR?
|
|
157
151
|
type: cov.type,
|
|
@@ -162,7 +156,7 @@ class DeployResultFormatter extends testResultsFormatter_1.TestResultsFormatter
|
|
|
162
156
|
coveredLines,
|
|
163
157
|
uncoveredLines,
|
|
164
158
|
percentage: numLocationsNum > 0
|
|
165
|
-
? (((numLocationsNum -
|
|
159
|
+
? (((numLocationsNum - numLinesUncovered) / numLocationsNum) * 100).toFixed() + '%'
|
|
166
160
|
: '',
|
|
167
161
|
};
|
|
168
162
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployResultFormatter.js","sourceRoot":"","sources":["../../src/formatters/deployResultFormatter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,qCAA8B;AAC9B,yBAAyB;AACzB,sCAAiC;AACjC,+EAAoH;AACpH,2CAA2D;AAC3D,yCAA8C;AAC9C,qDAM+B;AAC/B,0CAA+G;AAC/G,
|
|
1
|
+
{"version":3,"file":"deployResultFormatter.js","sourceRoot":"","sources":["../../src/formatters/deployResultFormatter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AAC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AAE,CAAC,KAAK,CACN,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAC3F,OAAO,EACP,OAAO,CACR,CAAC;IACJ,CAAC;IAEO,cAAc;QACpB,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,oBAAY,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;QAE/F,IAAI,CAAC,SAAS,CAAC,MAAM;YAAE,OAAO;QAE9B,MAAM,OAAO,GAAG;YACd,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;YAC5B,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;YACxB,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;SAC7B,CAAC;QAEF,MAAM,OAAO,GAAG,EAAE,KAAK,EAAE,IAAA,oBAAW,EAAC,gBAAgB,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;QAC9E,SAAE,CAAC,GAAG,EAAE,CAAC;QAET,SAAE,CAAC,KAAK,CAAC,IAAA,oCAA2B,EAAC,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;CACF;AArRD,sDAqRC"}
|
|
@@ -26,10 +26,10 @@ class TestResultsFormatter {
|
|
|
26
26
|
core_1.ux.log();
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
this.
|
|
29
|
+
displayVerboseTestFailures(this.result.response);
|
|
30
30
|
if (this.verbosity === 'verbose') {
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
31
|
+
displayVerboseTestSuccesses(this.result.response.details.runTestResult?.successes);
|
|
32
|
+
displayVerboseTestCoverage(this.result.response.details.runTestResult?.codeCoverage);
|
|
33
33
|
}
|
|
34
34
|
core_1.ux.log();
|
|
35
35
|
core_1.ux.log((0, output_1.tableHeader)('Test Results Summary'));
|
|
@@ -47,58 +47,53 @@ class TestResultsFormatter {
|
|
|
47
47
|
return 'verbose';
|
|
48
48
|
return 'normal';
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
});
|
|
50
|
+
}
|
|
51
|
+
exports.TestResultsFormatter = TestResultsFormatter;
|
|
52
|
+
const displayVerboseTestSuccesses = (resultSuccesses) => {
|
|
53
|
+
const successes = (0, kit_1.ensureArray)(resultSuccesses).sort(testResultSort);
|
|
54
|
+
if (successes.length > 0) {
|
|
55
|
+
core_1.ux.log();
|
|
56
|
+
core_1.ux.log((0, output_1.success)(`Test Success [${successes.length}]`));
|
|
57
|
+
for (const test of successes) {
|
|
58
|
+
const testName = (0, chalk_1.underline)(`${test.name}.${test.methodName}`);
|
|
59
|
+
core_1.ux.log(`${output_1.check} ${testName}`);
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
};
|
|
63
|
+
/** display the Test failures if there are any testErrors in the mdapi deploy response */
|
|
64
|
+
const displayVerboseTestFailures = (response) => {
|
|
65
|
+
if (!response.numberTestErrors)
|
|
66
|
+
return;
|
|
67
|
+
const failures = (0, kit_1.ensureArray)(response.details.runTestResult?.failures).sort(testResultSort);
|
|
68
|
+
const failureCount = response.details.runTestResult?.numFailures;
|
|
69
|
+
core_1.ux.log();
|
|
70
|
+
core_1.ux.log((0, output_1.error)(`Test Failures [${failureCount}]`));
|
|
71
|
+
for (const test of failures) {
|
|
72
|
+
const testName = (0, chalk_1.underline)(`${test.name}.${test.methodName}`);
|
|
73
|
+
core_1.ux.log(`• ${testName}`);
|
|
74
|
+
core_1.ux.log(` ${(0, chalk_1.dim)('message')}: ${test.message}`);
|
|
75
|
+
if (test.stackTrace) {
|
|
76
|
+
const stackTrace = test.stackTrace.replace(/\n/g, `${os.EOL} `);
|
|
77
|
+
core_1.ux.log(` ${(0, chalk_1.dim)('stacktrace')}: ${os.EOL} ${stackTrace}`);
|
|
73
78
|
}
|
|
79
|
+
core_1.ux.log();
|
|
74
80
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Display the table if there is at least one coverage item in the result
|
|
84
|
+
*/
|
|
85
|
+
const displayVerboseTestCoverage = (coverage) => {
|
|
86
|
+
const codeCoverage = (0, kit_1.ensureArray)(coverage);
|
|
87
|
+
if (codeCoverage.length) {
|
|
81
88
|
core_1.ux.log();
|
|
82
|
-
core_1.ux.log((0, output_1.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const stackTrace = test.stackTrace.replace(/\n/g, `${os.EOL} `);
|
|
89
|
-
core_1.ux.log(` ${(0, chalk_1.dim)('stacktrace')}: ${os.EOL} ${stackTrace}`);
|
|
90
|
-
}
|
|
91
|
-
core_1.ux.log();
|
|
92
|
-
}
|
|
89
|
+
core_1.ux.log((0, output_1.tableHeader)('Apex Code Coverage'));
|
|
90
|
+
core_1.ux.table(codeCoverage.sort(coverageSort).map(coverage_1.coverageOutput), {
|
|
91
|
+
name: { header: 'Name' },
|
|
92
|
+
coveragePercent: { header: '% Covered' },
|
|
93
|
+
linesNotCovered: { header: 'Uncovered Lines' },
|
|
94
|
+
});
|
|
93
95
|
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
return results.sort((a, b) => {
|
|
98
|
-
if (a.methodName === b.methodName) {
|
|
99
|
-
return a.name.localeCompare(b.name);
|
|
100
|
-
}
|
|
101
|
-
return a.methodName.localeCompare(b.methodName);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
96
|
+
};
|
|
97
|
+
const testResultSort = (a, b) => a.methodName === b.methodName ? a.name.localeCompare(b.name) : a.methodName.localeCompare(b.methodName);
|
|
98
|
+
const coverageSort = (a, b) => a.name.toUpperCase() > b.name.toUpperCase() ? 1 : -1;
|
|
104
99
|
//# sourceMappingURL=testResultsFormatter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testResultsFormatter.js","sourceRoot":"","sources":["../../src/formatters/testResultsFormatter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,sCAAiC;AACjC,iCAAuC;
|
|
1
|
+
{"version":3,"file":"testResultsFormatter.js","sourceRoot":"","sources":["../../src/formatters/testResultsFormatter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,sCAAiC;AACjC,iCAAuC;AAUvC,yCAA8C;AAC9C,0CAAsD;AACtD,4CAAqE;AACrE,gDAAmD;AAEnD,MAAa,oBAAoB;IAI/B,YACY,MAAoB,EACpB,KAGR;QAJQ,WAAM,GAAN,MAAM,CAAc;QACpB,UAAK,GAAL,KAAK,CAGb;QAEF,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC7C,CAAC;IAEM,kBAAkB;QACvB,IAAI,IAAI,CAAC,SAAS,KAAK,iBAAS,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE;YACnF,SAAE,CAAC,GAAG,EAAE,CAAC;YACT,OAAO;SACR;QAED,0BAA0B,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAEjD,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5E,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;AAE1G,MAAM,YAAY,GAAG,CAAC,CAAe,EAAE,CAAe,EAAU,EAAE,CAChE,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/lib/utils/coverage.d.ts
CHANGED
|
@@ -4,6 +4,10 @@ export declare const mapTestResults: <T extends Failures | Successes>(testResult
|
|
|
4
4
|
export declare const generateCoveredLines: (cov: CodeCoverage) => [number[], number[]];
|
|
5
5
|
export declare const getCoverageFormattersOptions: (formatters?: string[]) => CoverageReporterOptions;
|
|
6
6
|
export declare const transformCoverageToApexCoverage: (mdCoverage: CodeCoverage[]) => ApexCodeCoverageAggregate;
|
|
7
|
-
export declare const coverageOutput: (cov: CodeCoverage) => Pick<CodeCoverage, 'name'
|
|
8
|
-
|
|
7
|
+
export declare const coverageOutput: (cov: CodeCoverage) => Pick<CodeCoverage, 'name'> & {
|
|
8
|
+
coveragePercent: string;
|
|
9
|
+
linesNotCovered: string;
|
|
9
10
|
};
|
|
11
|
+
export declare const getCoveragePct: (cov: CodeCoverage) => number;
|
|
12
|
+
/** returns the number of total line for which coverage should apply, and the total uncovered line */
|
|
13
|
+
export declare const getCoverageNumbers: (cov: CodeCoverage) => [lineCount: number, uncoveredLineCount: number];
|
package/lib/utils/coverage.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.coverageOutput = exports.transformCoverageToApexCoverage = exports.getCoverageFormattersOptions = exports.generateCoveredLines = exports.mapTestResults = void 0;
|
|
3
|
+
exports.getCoverageNumbers = exports.getCoveragePct = exports.coverageOutput = exports.transformCoverageToApexCoverage = exports.getCoverageFormattersOptions = exports.generateCoveredLines = exports.mapTestResults = void 0;
|
|
4
4
|
/*
|
|
5
5
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
6
6
|
* All rights reserved.
|
|
@@ -28,11 +28,10 @@ const mapTestResults = (testResults) => testResults.map((testResult) => ({
|
|
|
28
28
|
}));
|
|
29
29
|
exports.mapTestResults = mapTestResults;
|
|
30
30
|
const generateCoveredLines = (cov) => {
|
|
31
|
-
const
|
|
32
|
-
const numUncovered = parseInt(cov.numLocationsNotCovered, 10);
|
|
31
|
+
const [lineCount, uncoveredLineCount] = (0, exports.getCoverageNumbers)(cov);
|
|
33
32
|
const uncoveredLines = (0, kit_1.ensureArray)(cov.locationsNotCovered).map((location) => parseInt(location.line, 10));
|
|
34
33
|
const minLineNumber = uncoveredLines.length ? Math.min(...uncoveredLines) : 1;
|
|
35
|
-
const lines = [...Array(
|
|
34
|
+
const lines = [...Array(lineCount + uncoveredLineCount).keys()].map((i) => i + minLineNumber);
|
|
36
35
|
const coveredLines = lines.filter((line) => !uncoveredLines.includes(line));
|
|
37
36
|
return [uncoveredLines, coveredLines];
|
|
38
37
|
};
|
|
@@ -62,48 +61,46 @@ const getCoverageFormattersOptions = (formatters = []) => {
|
|
|
62
61
|
exports.getCoverageFormattersOptions = getCoverageFormattersOptions;
|
|
63
62
|
const transformCoverageToApexCoverage = (mdCoverage) => {
|
|
64
63
|
const apexCoverage = mdCoverage.map((cov) => {
|
|
65
|
-
const
|
|
66
|
-
const numUncovered = parseInt(cov.numLocationsNotCovered, 10);
|
|
64
|
+
const [NumLinesCovered, NumLinesUncovered] = (0, exports.getCoverageNumbers)(cov);
|
|
67
65
|
const [uncoveredLines, coveredLines] = (0, exports.generateCoveredLines)(cov);
|
|
68
|
-
|
|
66
|
+
return {
|
|
69
67
|
ApexClassOrTrigger: {
|
|
70
68
|
Id: cov.id,
|
|
71
69
|
Name: cov.name,
|
|
72
70
|
},
|
|
73
|
-
NumLinesCovered
|
|
74
|
-
NumLinesUncovered
|
|
71
|
+
NumLinesCovered,
|
|
72
|
+
NumLinesUncovered,
|
|
75
73
|
Coverage: {
|
|
76
74
|
coveredLines,
|
|
77
75
|
uncoveredLines,
|
|
78
76
|
},
|
|
79
77
|
};
|
|
80
|
-
return ac;
|
|
81
78
|
});
|
|
82
79
|
return { done: true, totalSize: apexCoverage.length, records: apexCoverage };
|
|
83
80
|
};
|
|
84
81
|
exports.transformCoverageToApexCoverage = transformCoverageToApexCoverage;
|
|
85
|
-
const coverageOutput = (cov) => {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
// cov.numLocations = color(`${pctCovered}%`);
|
|
95
|
-
const base = {
|
|
96
|
-
name: cov.name,
|
|
97
|
-
numLocations: color(`${pctCovered}%`),
|
|
98
|
-
};
|
|
99
|
-
if (!cov.locationsNotCovered) {
|
|
100
|
-
return { ...base, lineNotCovered: '' };
|
|
101
|
-
}
|
|
102
|
-
const locations = (0, kit_1.ensureArray)(cov.locationsNotCovered);
|
|
103
|
-
return {
|
|
104
|
-
...base,
|
|
105
|
-
lineNotCovered: locations.map((location) => location.line).join(','),
|
|
106
|
-
};
|
|
107
|
-
};
|
|
82
|
+
const coverageOutput = (cov) => ({
|
|
83
|
+
name: cov.name,
|
|
84
|
+
coveragePercent: formatPercent((0, exports.getCoveragePct)(cov)),
|
|
85
|
+
linesNotCovered: cov.locationsNotCovered
|
|
86
|
+
? (0, kit_1.ensureArray)(cov.locationsNotCovered)
|
|
87
|
+
.map((location) => location.line)
|
|
88
|
+
.join(',')
|
|
89
|
+
: '',
|
|
90
|
+
});
|
|
108
91
|
exports.coverageOutput = coverageOutput;
|
|
92
|
+
const color = (percent) => percent >= 90 ? sf_plugins_core_1.StandardColors.success : percent >= 75 ? sf_plugins_core_1.StandardColors.warning : sf_plugins_core_1.StandardColors.error;
|
|
93
|
+
const formatPercent = (percent) => color(percent)(`${percent}%`);
|
|
94
|
+
const getCoveragePct = (cov) => {
|
|
95
|
+
const [lineCount, uncoveredLineCount] = (0, exports.getCoverageNumbers)(cov);
|
|
96
|
+
const coverageDecimal = parseFloat(((lineCount - uncoveredLineCount) / lineCount).toFixed(2));
|
|
97
|
+
return lineCount > 0 ? coverageDecimal * 100 : 100;
|
|
98
|
+
};
|
|
99
|
+
exports.getCoveragePct = getCoveragePct;
|
|
100
|
+
/** returns the number of total line for which coverage should apply, and the total uncovered line */
|
|
101
|
+
const getCoverageNumbers = (cov) => [
|
|
102
|
+
parseInt(cov.numLocations, 10),
|
|
103
|
+
parseInt(cov.numLocationsNotCovered, 10),
|
|
104
|
+
];
|
|
105
|
+
exports.getCoverageNumbers = getCoverageNumbers;
|
|
109
106
|
//# sourceMappingURL=coverage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coverage.js","sourceRoot":"","sources":["../../src/utils/coverage.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA6B;AAE7B,qDAQ+B;AAE/B,yCAA8C;AAC9C,iEAA6D;
|
|
1
|
+
{"version":3,"file":"coverage.js","sourceRoot":"","sources":["../../src/utils/coverage.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA6B;AAE7B,qDAQ+B;AAE/B,yCAA8C;AAC9C,iEAA6D;AAGtD,MAAM,cAAc,GAAG,CAAiC,WAAgB,EAAwB,EAAE,CACvG,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC/B,SAAS,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,IAAI,EAAE,EAAE,EAAE,UAAU,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE;I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AC;AAEzG,MAAM,aAAa,GAAG,CAAC,OAAe,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,GAAG,CAAC,CAAC;AAE1E,MAAM,cAAc,GAAG,CAAC,GAAiB,EAAU,EAAE;IAC1D,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,GAAG,IAAA,0BAAkB,EAAC,GAAG,CAAC,CAAC;IAChE,MAAM,eAAe,GAAG,UAAU,CAAC,CAAC,CAAC,SAAS,GAAG,kBAAkB,CAAC,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9F,OAAO,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AACrD,CAAC,CAAC;AALW,QAAA,cAAc,kBAKzB;AAEF,sGAAsG;AAC/F,MAAM,kBAAkB,GAAG,CAAC,GAAiB,EAAmD,EAAE,CAAC;IACxG,QAAQ,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC;IAC9B,QAAQ,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,CAAC;CACzC,CAAC;AAHW,QAAA,kBAAkB,sBAG7B"}
|
package/lib/utils/deploy.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigAggregator, Messages,
|
|
1
|
+
import { ConfigAggregator, Messages, SfProject } from '@salesforce/core';
|
|
2
2
|
import { Duration } from '@salesforce/kit';
|
|
3
3
|
import { Nullable } from '@salesforce/ts-types';
|
|
4
4
|
import { ComponentSet, DeployResult, MetadataApiDeploy, RequestStatus } from '@salesforce/source-deploy-retrieve';
|
|
@@ -46,6 +46,5 @@ export declare function cancelDeploy(opts: Partial<DeployOptions>, id: string):
|
|
|
46
46
|
export declare function cancelDeployAsync(opts: Partial<DeployOptions>, id: string): Promise<{
|
|
47
47
|
id: string;
|
|
48
48
|
}>;
|
|
49
|
-
export declare function poll(org: Org, id: string, wait: Duration, componentSet?: ComponentSet): Promise<DeployResult>;
|
|
50
49
|
export declare function determineExitCode(result: DeployResult, async?: boolean): number;
|
|
51
50
|
export declare const isNotResumable: (status?: RequestStatus) => boolean;
|
package/lib/utils/deploy.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
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.isNotResumable = exports.determineExitCode = exports.
|
|
9
|
+
exports.isNotResumable = exports.determineExitCode = exports.cancelDeployAsync = exports.cancelDeploy = exports.executeDeploy = exports.buildComponentSet = exports.resolveApi = exports.validateTests = exports.cacheMessages = void 0;
|
|
10
10
|
const core_1 = require("@salesforce/core");
|
|
11
11
|
const kit_1 = require("@salesforce/kit");
|
|
12
12
|
const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
|
|
@@ -138,7 +138,10 @@ async function cancelDeploy(opts, id) {
|
|
|
138
138
|
}
|
|
139
139
|
await deployCache_1.DeployCache.set(deploy.id, { ...opts });
|
|
140
140
|
await deploy.cancel();
|
|
141
|
-
return
|
|
141
|
+
return deploy.pollStatus({
|
|
142
|
+
frequency: kit_1.Duration.milliseconds(500),
|
|
143
|
+
timeout: opts.wait ?? kit_1.Duration.minutes(33),
|
|
144
|
+
});
|
|
142
145
|
}
|
|
143
146
|
exports.cancelDeploy = cancelDeploy;
|
|
144
147
|
async function cancelDeployAsync(opts, id) {
|
|
@@ -152,27 +155,6 @@ async function cancelDeployAsync(opts, id) {
|
|
|
152
155
|
return { id: deploy.id };
|
|
153
156
|
}
|
|
154
157
|
exports.cancelDeployAsync = cancelDeployAsync;
|
|
155
|
-
async function poll(org, id, wait, componentSet) {
|
|
156
|
-
const report = async () => {
|
|
157
|
-
const res = await org.getConnection().metadata.checkDeployStatus(id, true);
|
|
158
|
-
const deployStatus = res;
|
|
159
|
-
return new source_deploy_retrieve_1.DeployResult(deployStatus, componentSet);
|
|
160
|
-
};
|
|
161
|
-
const opts = {
|
|
162
|
-
frequency: kit_1.Duration.milliseconds(1000),
|
|
163
|
-
timeout: wait,
|
|
164
|
-
poll: async () => {
|
|
165
|
-
const deployResult = await report();
|
|
166
|
-
return {
|
|
167
|
-
completed: deployResult.response.done,
|
|
168
|
-
payload: deployResult,
|
|
169
|
-
};
|
|
170
|
-
},
|
|
171
|
-
};
|
|
172
|
-
const pollingClient = await core_1.PollingClient.create(opts);
|
|
173
|
-
return pollingClient.subscribe();
|
|
174
|
-
}
|
|
175
|
-
exports.poll = poll;
|
|
176
158
|
function determineExitCode(result, async = false) {
|
|
177
159
|
if (async) {
|
|
178
160
|
return result.response.status === source_deploy_retrieve_1.RequestStatus.Succeeded ? 0 : 1;
|
package/lib/utils/deploy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/utils/deploy.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/utils/deploy.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAAuF;AACvF,yCAA2C;AAE3C,+EAM4C;AAC5C,iEAA6D;AAC7D,8CAAuD;AACvD,uCAAgE;AAChE,mCAAmD;AACnD,6CAAmD;AACnD,+CAA4C;AAC5C,mDAAgD;AAEhD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC/B,QAAA,aAAa,GAAG,eAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,OAAO,CAAC,CAAC;AAElG,MAAM,cAAc,GAAG,eAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,iBAAiB,CAAC,CAAC;AAoCtG,SAAgB,aAAa,CAAC,SAAgC,EAAE,KAAyB;IACvF,OAAO,CAAC,CAAC,SAAS,KAAK,iBAAS,CAAC,iBAAiB,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M,KAAK,sCAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACnE;IAED,OAAO,gCAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC9D,CAAC;AAND,8CAMC;AAEM,MAAM,cAAc,GAAG,CAAC,MAAsB,EAAW,EAAE,CAChE,MAAM,KAAK,SAAS;IACpB,CAAC,sCAAa,CAAC,SAAS,EAAE,sCAAa,CAAC,MAAM,EAAE,sCAAa,CAAC,gBAAgB,EAAE,sCAAa,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAC9G,MAAM,CACP,CAAC;AAJS,QAAA,cAAc,kBAIvB"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
# summary
|
|
2
2
|
|
|
3
|
-
Check the status of a deploy operation.
|
|
3
|
+
Check or poll for the status of a deploy operation.
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
7
|
Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations.
|
|
8
8
|
|
|
9
|
-
Run this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.
|
|
9
|
+
Run this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation. If you specify the --wait flag, the command polls for the status every second until the timeout of --wait minutes. If you don't specify the --wait flag, the command simply checks and displays the status of the deploy; the command doesn't poll for the status.
|
|
10
|
+
|
|
11
|
+
You typically don't specify the --target-org flag because the cached job already references the org to which you deployed. But if you run this command on a computer different than the one from which you deployed, then you must specify the --target-org and it must point to the same org.
|
|
12
|
+
|
|
13
|
+
This command doesn't update source tracking information.
|
|
10
14
|
|
|
11
15
|
# examples
|
|
12
16
|
|
|
@@ -18,6 +22,10 @@ Run this command by either passing it a job ID or specifying the --use-most-rece
|
|
|
18
22
|
|
|
19
23
|
<%= config.bin %> <%= command.id %> --use-most-recent
|
|
20
24
|
|
|
25
|
+
- Poll for the status using a job ID and target org:
|
|
26
|
+
|
|
27
|
+
<%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2 --target-org me@my.org --wait 30
|
|
28
|
+
|
|
21
29
|
# flags.job-id.summary
|
|
22
30
|
|
|
23
31
|
Job ID of the deploy operation you want to check the status of.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# summary
|
|
2
2
|
|
|
3
|
-
Resume watching a deploy operation.
|
|
3
|
+
Resume watching a deploy operation and update source tracking when the deploy completes.
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
Use this command to resume watching a deploy operation if the original command times out or you specified the --async flag. Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations. This command doesn't resume the original operation itself, because the operation always continues after you've started it, regardless of whether you're watching it or not.
|
|
7
|
+
Use this command to resume watching a deploy operation if the original command times out or you specified the --async flag. Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations. This command doesn't resume the original operation itself, because the operation always continues after you've started it, regardless of whether you're watching it or not. When the deploy completes, source tracking information is updated as needed.
|
|
8
8
|
|
|
9
9
|
Run this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.
|
|
10
10
|
|
|
@@ -57,9 +57,9 @@ Show verbose output of the deploy operation result.
|
|
|
57
57
|
|
|
58
58
|
Show concise output of the deploy operation result.
|
|
59
59
|
|
|
60
|
-
#
|
|
60
|
+
# warning.DeployNotResumable
|
|
61
61
|
|
|
62
|
-
Job ID %s is not resumable with status %s.
|
|
62
|
+
Job ID %s is not resumable because it already completed with status: %s. Displaying results...
|
|
63
63
|
|
|
64
64
|
# flags.junit.summary
|
|
65
65
|
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.18.1",
|
|
3
3
|
"commands": {
|
|
4
4
|
"deploy": {
|
|
5
5
|
"id": "deploy",
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
"char": "d",
|
|
205
205
|
"summary": "Output directory to store the Metadata API–formatted files in.",
|
|
206
206
|
"multiple": false,
|
|
207
|
-
"default": "
|
|
207
|
+
"default": "metadataPackage_1695746220434",
|
|
208
208
|
"deprecateAliases": true,
|
|
209
209
|
"aliases": [
|
|
210
210
|
"outputdir"
|
|
@@ -833,8 +833,8 @@
|
|
|
833
833
|
},
|
|
834
834
|
"project:deploy:report": {
|
|
835
835
|
"id": "project:deploy:report",
|
|
836
|
-
"summary": "Check the status of a deploy operation.",
|
|
837
|
-
"description": "Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations.\n\nRun this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.",
|
|
836
|
+
"summary": "Check or poll for the status of a deploy operation.",
|
|
837
|
+
"description": "Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations.\n\nRun this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation. If you specify the --wait flag, the command polls for the status every second until the timeout of --wait minutes. If you don't specify the --wait flag, the command simply checks and displays the status of the deploy; the command doesn't poll for the status. \n\nYou typically don't specify the --target-org flag because the cached job already references the org to which you deployed. But if you run this command on a computer different than the one from which you deployed, then you must specify the --target-org and it must point to the same org. \n\nThis command doesn't update source tracking information.",
|
|
838
838
|
"strict": true,
|
|
839
839
|
"pluginName": "@salesforce/plugin-deploy-retrieve",
|
|
840
840
|
"pluginAlias": "@salesforce/plugin-deploy-retrieve",
|
|
@@ -844,7 +844,8 @@
|
|
|
844
844
|
],
|
|
845
845
|
"examples": [
|
|
846
846
|
"Check the status using a job ID:\n<%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2",
|
|
847
|
-
"Check the status of the most recent deploy operation:\n<%= config.bin %> <%= command.id %> --use-most-recent"
|
|
847
|
+
"Check the status of the most recent deploy operation:\n<%= config.bin %> <%= command.id %> --use-most-recent",
|
|
848
|
+
"Poll for the status using a job ID and target org:\n<%= config.bin %> <%= command.id %> --job-id 0Af0x000017yLUFCA2 --target-org me@my.org --wait 30"
|
|
848
849
|
],
|
|
849
850
|
"deprecateAliases": true,
|
|
850
851
|
"flags": {
|
|
@@ -926,8 +927,8 @@
|
|
|
926
927
|
},
|
|
927
928
|
"project:deploy:resume": {
|
|
928
929
|
"id": "project:deploy:resume",
|
|
929
|
-
"summary": "Resume watching a deploy operation.",
|
|
930
|
-
"description": "Use this command to resume watching a deploy operation if the original command times out or you specified the --async flag. Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations. This command doesn't resume the original operation itself, because the operation always continues after you've started it, regardless of whether you're watching it or not.\n\nRun this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.",
|
|
930
|
+
"summary": "Resume watching a deploy operation and update source tracking when the deploy completes.",
|
|
931
|
+
"description": "Use this command to resume watching a deploy operation if the original command times out or you specified the --async flag. Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations. This command doesn't resume the original operation itself, because the operation always continues after you've started it, regardless of whether you're watching it or not. When the deploy completes, source tracking information is updated as needed.\n\nRun this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most recent deploy operation.",
|
|
931
932
|
"strict": true,
|
|
932
933
|
"pluginName": "@salesforce/plugin-deploy-retrieve",
|
|
933
934
|
"pluginAlias": "@salesforce/plugin-deploy-retrieve",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-deploy-retrieve",
|
|
3
3
|
"description": "deploy and retrieve commands for sf",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.18.1",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@oclif/plugin-command-snapshot": "^4.0.12",
|
|
21
|
-
"@salesforce/cli-plugins-testkit": "^4.3.
|
|
21
|
+
"@salesforce/cli-plugins-testkit": "^4.3.6",
|
|
22
22
|
"@salesforce/dev-config": "^4.0.1",
|
|
23
23
|
"@salesforce/dev-scripts": "^5.10.0",
|
|
24
|
-
"@salesforce/plugin-command-reference": "^3.0.
|
|
24
|
+
"@salesforce/plugin-command-reference": "^3.0.33",
|
|
25
25
|
"@salesforce/plugin-settings": "^1.4.27",
|
|
26
26
|
"@salesforce/plugin-source": "^2.10.30",
|
|
27
27
|
"@salesforce/plugin-templates": "^55.5.11",
|
|
28
|
-
"@salesforce/plugin-user": "^2.3.
|
|
28
|
+
"@salesforce/plugin-user": "^2.3.32",
|
|
29
29
|
"@salesforce/prettier-config": "^0.0.3",
|
|
30
30
|
"@salesforce/source-testkit": "^2.1.26",
|
|
31
31
|
"@salesforce/ts-sinon": "1.4.15",
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
269
|
"sfdx": {
|
|
270
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.
|
|
271
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.
|
|
270
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.18.1.crt",
|
|
271
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.18.1.sig"
|
|
272
272
|
}
|
|
273
273
|
}
|