@salesforce/plugin-deploy-retrieve 1.18.0 → 1.18.2
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/report.d.ts +3 -0
- package/lib/commands/project/deploy/report.js +83 -11
- package/lib/commands/project/deploy/report.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/formatters/deployReportResultFormatter.js +9 -2
- package/lib/formatters/deployReportResultFormatter.js.map +1 -1
- package/lib/formatters/deployResultFormatter.d.ts +3 -0
- package/lib/formatters/deployResultFormatter.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.md +9 -0
- package/messages/deploy.metadata.quick.md +1 -1
- package/messages/deploy.metadata.report.md +10 -2
- package/messages/deploy.metadata.resume.md +4 -4
- package/oclif.manifest.json +29 -8
- 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,uBAAuB,CAAC,CAAC;AAEtG,MAAqB,mBAAoB,SAAQ,2BAA2B;IA4DnE,KAAK,CAAC,GAAG;QACd,MA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{ Org } from '@salesforce/core';
|
|
1
2
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
3
|
import { DeployResultJson } from '../../../utils/types';
|
|
3
4
|
export default class DeployMetadataReport extends SfCommand<DeployResultJson> {
|
|
@@ -7,6 +8,7 @@ export default class DeployMetadataReport extends SfCommand<DeployResultJson> {
|
|
|
7
8
|
static readonly aliases: string[];
|
|
8
9
|
static readonly deprecateAliases = true;
|
|
9
10
|
static readonly flags: {
|
|
11
|
+
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<Org | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
12
|
'job-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
13
|
'use-most-recent': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
14
|
'coverage-formatters': {
|
|
@@ -64,6 +66,7 @@ export default class DeployMetadataReport extends SfCommand<DeployResultJson> {
|
|
|
64
66
|
};
|
|
65
67
|
junit: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
66
68
|
'results-dir': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
69
|
+
wait: import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/kit").Duration | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
67
70
|
};
|
|
68
71
|
run(): Promise<DeployResultJson>;
|
|
69
72
|
}
|
|
@@ -7,30 +7,87 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const core_1 = require("@salesforce/core");
|
|
10
|
-
const kit_1 = require("@salesforce/kit");
|
|
11
10
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
12
11
|
const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
|
|
13
12
|
const deploy_1 = require("../../../utils/deploy");
|
|
13
|
+
const progressBar_1 = require("../../../utils/progressBar");
|
|
14
14
|
const deployCache_1 = require("../../../utils/deployCache");
|
|
15
15
|
const deployReportResultFormatter_1 = require("../../../formatters/deployReportResultFormatter");
|
|
16
16
|
const flags_1 = require("../../../utils/flags");
|
|
17
17
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
18
18
|
const messages = core_1.Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata.report');
|
|
19
|
+
const deployMessages = core_1.Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata');
|
|
19
20
|
const testFlags = 'Test';
|
|
20
21
|
class DeployMetadataReport extends sf_plugins_core_1.SfCommand {
|
|
21
22
|
async run() {
|
|
22
23
|
const [{ flags }, cache] = await Promise.all([this.parse(DeployMetadataReport), deployCache_1.DeployCache.create()]);
|
|
23
|
-
const jobId = cache.resolveLatest(flags['use-most-recent'], flags['job-id']);
|
|
24
|
-
const deployOpts = cache.get(jobId);
|
|
25
|
-
const
|
|
26
|
-
const [
|
|
27
|
-
|
|
24
|
+
const jobId = cache.resolveLatest(flags['use-most-recent'], flags['job-id'], false);
|
|
25
|
+
const deployOpts = cache.get(jobId) ?? {};
|
|
26
|
+
const wait = flags['wait'];
|
|
27
|
+
const org = flags['target-org'] ?? (await core_1.Org.create({ aliasOrUsername: deployOpts['target-org'] }));
|
|
28
|
+
// if we're using mdapi we won't have a component set
|
|
29
|
+
let componentSet = new source_deploy_retrieve_1.ComponentSet();
|
|
30
|
+
if (!deployOpts.isMdapi) {
|
|
31
|
+
if (!cache.get(jobId)) {
|
|
32
|
+
// If the cache file isn't there, use the project package directories for the CompSet
|
|
33
|
+
try {
|
|
34
|
+
this.project = await core_1.SfProject.resolve();
|
|
35
|
+
const sourcepath = this.project.getUniquePackageDirectories().map((pDir) => pDir.fullPath);
|
|
36
|
+
componentSet = await (0, deploy_1.buildComponentSet)({ 'source-dir': sourcepath, wait });
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
// ignore the error. this was just to get improved command output.
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
componentSet = await (0, deploy_1.buildComponentSet)({ ...deployOpts, wait });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
const mdapiDeploy = new source_deploy_retrieve_1.MetadataApiDeploy({
|
|
47
|
+
// setting an API version here won't matter since we're just checking deploy status
|
|
28
48
|
// eslint-disable-next-line sf-plugin/get-connection-with-version
|
|
29
|
-
org.getConnection()
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
49
|
+
usernameOrConnection: org.getConnection(),
|
|
50
|
+
id: jobId,
|
|
51
|
+
components: componentSet,
|
|
52
|
+
apiOptions: {
|
|
53
|
+
rest: deployOpts.api === 'REST',
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
const getDeployResult = async () => {
|
|
57
|
+
try {
|
|
58
|
+
const deployStatus = await mdapiDeploy.checkStatus();
|
|
59
|
+
return new source_deploy_retrieve_1.DeployResult(deployStatus, componentSet);
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
if (error instanceof Error && error.name === 'sf:INVALID_CROSS_REFERENCE_KEY') {
|
|
63
|
+
throw deployMessages.createError('error.InvalidDeployId', [jobId, org.getUsername()]);
|
|
64
|
+
}
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
let result;
|
|
69
|
+
if (wait) {
|
|
70
|
+
// poll for deploy results
|
|
71
|
+
try {
|
|
72
|
+
new progressBar_1.DeployProgress(mdapiDeploy, this.jsonEnabled()).start();
|
|
73
|
+
result = await mdapiDeploy.pollStatus(500, wait.seconds);
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
if (error instanceof Error && error.message.includes('The client has timed out')) {
|
|
77
|
+
this.debug('[project deploy report] polling timed out. Requesting status...');
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
finally {
|
|
84
|
+
result = await getDeployResult();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
// check the deploy status
|
|
89
|
+
result = await getDeployResult();
|
|
90
|
+
}
|
|
34
91
|
const formatter = new deployReportResultFormatter_1.DeployReportResultFormatter(result, {
|
|
35
92
|
...deployOpts,
|
|
36
93
|
...flags,
|
|
@@ -48,6 +105,11 @@ DeployMetadataReport.examples = messages.getMessages('examples');
|
|
|
48
105
|
DeployMetadataReport.aliases = ['deploy:metadata:report'];
|
|
49
106
|
DeployMetadataReport.deprecateAliases = true;
|
|
50
107
|
DeployMetadataReport.flags = {
|
|
108
|
+
'target-org': sf_plugins_core_1.Flags.optionalOrg({
|
|
109
|
+
char: 'o',
|
|
110
|
+
description: deployMessages.getMessage('flags.target-org.description'),
|
|
111
|
+
summary: deployMessages.getMessage('flags.target-org.summary'),
|
|
112
|
+
}),
|
|
51
113
|
'job-id': sf_plugins_core_1.Flags.salesforceId({
|
|
52
114
|
char: 'i',
|
|
53
115
|
startsWith: '0Af',
|
|
@@ -72,5 +134,15 @@ DeployMetadataReport.flags = {
|
|
|
72
134
|
summary: messages.getMessage('flags.results-dir.summary'),
|
|
73
135
|
helpGroup: testFlags,
|
|
74
136
|
}),
|
|
137
|
+
// we want to allow undefined for a simple check deploy status
|
|
138
|
+
// eslint-disable-next-line sf-plugin/flag-min-max-default
|
|
139
|
+
wait: sf_plugins_core_1.Flags.duration({
|
|
140
|
+
char: 'w',
|
|
141
|
+
summary: deployMessages.getMessage('flags.wait.summary'),
|
|
142
|
+
description: deployMessages.getMessage('flags.wait.description'),
|
|
143
|
+
unit: 'minutes',
|
|
144
|
+
helpValue: '<minutes>',
|
|
145
|
+
min: 1,
|
|
146
|
+
}),
|
|
75
147
|
};
|
|
76
148
|
//# sourceMappingURL=report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../../src/commands/project/deploy/report.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../../src/commands/project/deploy/report.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,2CAA4D;AAC5D,iEAA+D;AAC/D,+EAAmG;AACnG,kDAA0D;AAC1D,4DAA4D;AAC5D,4DAAyD;AACzD,iGAA8F;AAE9F,gDAA8D;AAE9D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,wBAAwB,CAAC,CAAC;AACvG,MAAM,cAAc,GAAG,eAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,iBAAiB,CAAC,CAAC;AACtG,MAAM,SAAS,GAAG,MAAM,CAAC;AAEzB,MAAqB,oBAAqB,SAAQ,2BAA2B;IAiDpE,KAAK,CAAC,GAAG;QACd,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,EAAE,yBAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACvG,MAAM,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC;QAEpF,MAAM,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAC1C,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3B,MAAM,GAAG,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,UAAG,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;QAErG,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,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;QACzD,SAAS,EAAE,SAAS;KACrB,CAAC;IACF,8DAA8D;IAC9D,0DAA0D;IAC1D,IAAI,EAAE,uBAAK,CAAC,QAAQ,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,cAAc,CAAC,UAAU,CAAC,oBAAoB,CAAC;QACxD,WAAW,EAAE,cAAc,CAAC,UAAU,CAAC,wBAAwB,CAAC;QAChE,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,WAAW;QACtB,GAAG,EAAE,CAAC;KACP,CAAC;CACH,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,4DAA4D;AAE5D,kDAA4G;AAC5G,4DAAyD;AACzD,0DAA6E;AAC7E,gDAA8D;AAE9D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,wBAAwB,CAAC,CAAC;AAEvG,MAAM,SAAS,GAAG,MAAM,CAAC;AAEzB,MAAqB,oBAAqB,SAAQ,2BAA2B;IAwDpE,KAAK,CAAC,GAAG;QACd,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,EAAE,yBAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACvG,MAAM,KAAK,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;QAE7E,2DAA2D;QAC3D,MAAM,UAAU,GAAG,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAEzD,IAAI,MAAoB,CAAC;QAEzB,yGAAyG;QACzG,IAAI,IAAA,uBAAc,EAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YACrC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,4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AAE;IAC1E,KAAK,EAAE,uBAAK,CAAC,OAAO,CAAC;QACnB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC;QACnD,SAAS,EAAE,SAAS;KACrB,CAAC;IACF,aAAa,EAAE,uBAAK,CAAC,SAAS,CAAC;QAC7B,aAAa,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,qBAAqB,EAAE,OAAO,CAAC,EAAE,CAAC;QAC1E,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,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"}
|
|
@@ -10,6 +10,7 @@ exports.DeployReportResultFormatter = void 0;
|
|
|
10
10
|
const core_1 = require("@oclif/core");
|
|
11
11
|
const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
|
|
12
12
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
13
|
+
const kit_1 = require("@salesforce/kit");
|
|
13
14
|
const output_1 = require("../utils/output");
|
|
14
15
|
const deployResultFormatter_1 = require("./deployResultFormatter");
|
|
15
16
|
class DeployReportResultFormatter extends deployResultFormatter_1.DeployResultFormatter {
|
|
@@ -29,10 +30,16 @@ class DeployReportResultFormatter extends deployResultFormatter_1.DeployResultFo
|
|
|
29
30
|
core_1.ux.log();
|
|
30
31
|
core_1.ux.table(response, { key: {}, value: {} }, { title: (0, output_1.tableHeader)('Deploy Info'), 'no-truncate': true });
|
|
31
32
|
const opts = Object.entries(this.flags).reduce((result, [key, value]) => {
|
|
32
|
-
if (key === 'timestamp')
|
|
33
|
+
if (key === 'timestamp') {
|
|
33
34
|
return result;
|
|
34
|
-
|
|
35
|
+
}
|
|
36
|
+
if (key === 'target-org') {
|
|
35
37
|
return result.concat({ key: 'target-org', value: this.flags['target-org']?.getUsername() });
|
|
38
|
+
}
|
|
39
|
+
if (key === 'wait' && this.flags['wait']) {
|
|
40
|
+
const wait = this.flags['wait'] instanceof kit_1.Duration ? this.flags['wait'].quantity : this.flags['wait'];
|
|
41
|
+
return result.concat({ key: 'wait', value: `${wait} minutes` });
|
|
42
|
+
}
|
|
36
43
|
return result.concat({ key, value });
|
|
37
44
|
}, []);
|
|
38
45
|
core_1.ux.log();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployReportResultFormatter.js","sourceRoot":"","sources":["../../src/formatters/deployReportResultFormatter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,sCAAiC;AACjC,+EAAmE;AACnE,iEAA6D;AAC7D,4CAA8C;AAC9C,mEAAgE;AAEhE,MAAa,2BAA4B,SAAQ,6CAAqB;IAC7D,OAAO;QACZ,SAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QAEvE,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAC1D,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YACvB,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,KAAK,CAAC,EAAE;gBAC1D,IAAI,GAAG,KAAK,QAAQ,EAAE;oBACpB,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,CAAC,KAAsB,CAAC,EAAE,CAAC,CAAC;iBAC3E;qBAAM;oBACL,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,KA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MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,UAAU,EAAE,CAAC,CAAC;aACjE;YACD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;QACvC,CAAC,EAAE,EAAE,CAAC,CAAC;QACP,SAAE,CAAC,GAAG,EAAE,CAAC;QACT,SAAE,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,IAAA,oBAAW,EAAC,gBAAgB,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QACtG,KAAK,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC;CACF;AAtCD,kEAsCC;AAED,SAAS,WAAW,CAAC,MAAqB;IACxC,IAAI,MAAM,KAAK,sCAAa,CAAC,SAAS;QAAE,OAAO,gCAAc,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9E,IAAI,MAAM,KAAK,sCAAa,CAAC,MAAM;QAAE,OAAO,gCAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;;QACpE,OAAO,gCAAc,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DeployResult } from '@salesforce/source-deploy-retrieve';
|
|
2
2
|
import { Org } from '@salesforce/core';
|
|
3
|
+
import { Duration } from '@salesforce/kit';
|
|
3
4
|
import { DeployResultJson, TestLevel, Verbosity, Formatter } from '../utils/types';
|
|
4
5
|
import { TestResultsFormatter } from '../formatters/testResultsFormatter';
|
|
5
6
|
export declare class DeployResultFormatter extends TestResultsFormatter implements Formatter<DeployResultJson> {
|
|
@@ -12,6 +13,7 @@ export declare class DeployResultFormatter extends TestResultsFormatter implemen
|
|
|
12
13
|
junit: boolean;
|
|
13
14
|
'results-dir': string;
|
|
14
15
|
'target-org': Org;
|
|
16
|
+
wait: Duration | number;
|
|
15
17
|
}>;
|
|
16
18
|
private relativeFiles;
|
|
17
19
|
private absoluteFiles;
|
|
@@ -26,6 +28,7 @@ export declare class DeployResultFormatter extends TestResultsFormatter implemen
|
|
|
26
28
|
junit: boolean;
|
|
27
29
|
'results-dir': string;
|
|
28
30
|
'target-org': Org;
|
|
31
|
+
wait: Duration | number;
|
|
29
32
|
}>);
|
|
30
33
|
getJson(): Promise<DeployResultJson>;
|
|
31
34
|
display(): void;
|
|
@@ -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,
|
|
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,yCAAwD;AACxD,qDAM+B;AAC/B,0CAA+G;AAC/G,gDAM2B;AAC3B,4CAAsH;AACtH,6EAA0E;AAE1E,MAAa,qBAAsB,SAAQ,2CAAoB;IAO7D,YACY,MAAoB,EACpB,KASR;QAEF,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAZX,WAAM,GAAN,MAAM,CAAc;QACpB,UAAK,GAAL,KAAK,CASb;QAGF,IAAI,CAAC,aAAa,GAAG,IAAA,0BAAiB,EAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7E,IAAI,CAAC,aAAa,GAAG,IAAA,wBAAe,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACzD,IAAI,CAAC,SAAS,GAAG,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AE,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;AAtRD,sDAsRC"}
|
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,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;AACpF,CAAC;AAFD,sCAEC;AAEM,KAAK,UAAU,UAAU,CAAC,wBAA2C;IAC1E,MAAM,GAAG,GAAG,wBAAwB,IAAI,CAAC,MAAM,uBAAgB,CAAC,MAAM,CAAC,EAAE,gBAAgB,EAAE,oBAAU,EAAE,CAAC,CAAC,CAAC;IAC1G,MAAM,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAAC,uBAAU,CAAC,wBAAwB,CAAC,EAAE,KAAK,CAAC;IACjF,OAAO,gBAAgB,KAAK,MAAM,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CAAC,QAAQ,CAC9G,MAAM,CACP,CAAC;AAJS,QAAA,cAAc,kBAIvB"}
|
|
@@ -219,6 +219,15 @@ No local changes to deploy.
|
|
|
219
219
|
|
|
220
220
|
- To see conflicts and ignored files, run "%s project deploy preview" with any of the manifest, directory, or metadata flags.
|
|
221
221
|
|
|
222
|
+
# error.InvalidDeployId
|
|
223
|
+
|
|
224
|
+
Invalid deploy ID: %s for org: %s
|
|
225
|
+
|
|
226
|
+
# error.InvalidDeployId.actions
|
|
227
|
+
|
|
228
|
+
- Ensure the deploy ID is correct.
|
|
229
|
+
- Ensure the target-org username or alias is correct.
|
|
230
|
+
|
|
222
231
|
# flags.junit.summary
|
|
223
232
|
|
|
224
233
|
Output JUnit test results.
|
|
@@ -78,7 +78,7 @@ Overrides your default org.
|
|
|
78
78
|
|
|
79
79
|
# error.CannotQuickDeploy
|
|
80
80
|
|
|
81
|
-
Job ID can't be used for quick deployment. Possible reasons include the deployment hasn't been validated or the validation expired because you ran it more than 10 days ago.
|
|
81
|
+
Job ID can't be used for quick deployment. Possible reasons include the deployment hasn't been validated, has already been deployed, or the validation expired because you ran it more than 10 days ago.
|
|
82
82
|
|
|
83
83
|
# error.QuickDeployFailure
|
|
84
84
|
|
|
@@ -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.18.
|
|
2
|
+
"version": "1.18.2",
|
|
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_1695783886253",
|
|
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": {
|
|
@@ -856,6 +857,15 @@
|
|
|
856
857
|
"allowNo": false,
|
|
857
858
|
"deprecateAliases": true
|
|
858
859
|
},
|
|
860
|
+
"target-org": {
|
|
861
|
+
"name": "target-org",
|
|
862
|
+
"type": "option",
|
|
863
|
+
"char": "o",
|
|
864
|
+
"summary": "Login username or alias for the target org.",
|
|
865
|
+
"description": "Overrides your default org.",
|
|
866
|
+
"multiple": false,
|
|
867
|
+
"deprecateAliases": true
|
|
868
|
+
},
|
|
859
869
|
"job-id": {
|
|
860
870
|
"name": "job-id",
|
|
861
871
|
"type": "option",
|
|
@@ -920,14 +930,25 @@
|
|
|
920
930
|
}
|
|
921
931
|
],
|
|
922
932
|
"deprecateAliases": true
|
|
933
|
+
},
|
|
934
|
+
"wait": {
|
|
935
|
+
"name": "wait",
|
|
936
|
+
"type": "option",
|
|
937
|
+
"char": "w",
|
|
938
|
+
"summary": "Number of minutes to wait for command to complete and display results.",
|
|
939
|
+
"description": "If the command continues to run after the wait period, the CLI returns control of the terminal window to you and returns the job ID. To resume the deployment, run \"<%= config.bin %> project deploy resume\". To check the status of the deployment, run \"<%= config.bin %> project deploy report\".",
|
|
940
|
+
"helpValue": "<minutes>",
|
|
941
|
+
"multiple": false,
|
|
942
|
+
"deprecateAliases": true
|
|
923
943
|
}
|
|
924
944
|
},
|
|
925
|
-
"args": {}
|
|
945
|
+
"args": {},
|
|
946
|
+
"hasDynamicHelp": true
|
|
926
947
|
},
|
|
927
948
|
"project:deploy:resume": {
|
|
928
949
|
"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.",
|
|
950
|
+
"summary": "Resume watching a deploy operation and update source tracking when the deploy completes.",
|
|
951
|
+
"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
952
|
"strict": true,
|
|
932
953
|
"pluginName": "@salesforce/plugin-deploy-retrieve",
|
|
933
954
|
"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.18.
|
|
4
|
+
"version": "1.18.2",
|
|
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.18.
|
|
271
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.18.
|
|
270
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.18.2.crt",
|
|
271
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-deploy-retrieve/1.18.2.sig"
|
|
272
272
|
}
|
|
273
273
|
}
|