@salesforce/plugin-devops-center 1.2.26 → 1.2.28
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/LICENSE.txt +200 -6
- package/README.md +430 -19
- package/bin/dev.js +15 -0
- package/bin/run.js +5 -0
- package/lib/commands/devops/pipeline/activate.d.ts +14 -0
- package/lib/commands/devops/pipeline/activate.js +82 -0
- package/lib/commands/devops/pipeline/activate.js.map +1 -0
- package/lib/commands/devops/pipeline/attach-project.d.ts +15 -0
- package/lib/commands/devops/pipeline/attach-project.js +82 -0
- package/lib/commands/devops/pipeline/attach-project.js.map +1 -0
- package/lib/commands/devops/pipeline/create.d.ts +23 -0
- package/lib/commands/devops/pipeline/create.js +136 -0
- package/lib/commands/devops/pipeline/create.js.map +1 -0
- package/lib/commands/devops/pipeline/stage/add.d.ts +16 -0
- package/lib/commands/devops/pipeline/stage/add.js +94 -0
- package/lib/commands/devops/pipeline/stage/add.js.map +1 -0
- package/lib/commands/devops/project/create.d.ts +15 -0
- package/lib/commands/devops/project/create.js +72 -0
- package/lib/commands/devops/project/create.js.map +1 -0
- package/lib/commands/devops/project/list.d.ts +20 -0
- package/lib/commands/devops/project/list.js +59 -0
- package/lib/commands/devops/project/list.js.map +1 -0
- package/lib/commands/devops/pull-request/create.d.ts +17 -0
- package/lib/commands/devops/pull-request/create.js +104 -0
- package/lib/commands/devops/pull-request/create.js.map +1 -0
- package/lib/commands/devops/work-item/create.d.ts +16 -0
- package/lib/commands/devops/work-item/create.js +76 -0
- package/lib/commands/devops/work-item/create.js.map +1 -0
- package/lib/commands/devops/work-item/list.d.ts +17 -0
- package/lib/commands/devops/work-item/list.js +72 -0
- package/lib/commands/devops/work-item/list.js.map +1 -0
- package/lib/commands/devops/work-item/status/update.d.ts +16 -0
- package/lib/commands/devops/work-item/status/update.js +90 -0
- package/lib/commands/devops/work-item/status/update.js.map +1 -0
- package/lib/commands/project/deploy/pipeline/quick.d.ts +2 -2
- package/lib/commands/project/deploy/pipeline/quick.js +24 -21
- package/lib/commands/project/deploy/pipeline/quick.js.map +1 -1
- package/lib/commands/project/deploy/pipeline/report.d.ts +4 -4
- package/lib/commands/project/deploy/pipeline/report.js +38 -35
- package/lib/commands/project/deploy/pipeline/report.js.map +1 -1
- package/lib/commands/project/deploy/pipeline/resume.d.ts +2 -2
- package/lib/commands/project/deploy/pipeline/resume.js +24 -21
- package/lib/commands/project/deploy/pipeline/resume.js.map +1 -1
- package/lib/commands/project/deploy/pipeline/start.d.ts +3 -3
- package/lib/commands/project/deploy/pipeline/start.js +26 -23
- package/lib/commands/project/deploy/pipeline/start.js.map +1 -1
- package/lib/commands/project/deploy/pipeline/validate.d.ts +3 -3
- package/lib/commands/project/deploy/pipeline/validate.js +24 -21
- package/lib/commands/project/deploy/pipeline/validate.js.map +1 -1
- package/lib/common/base/abstractAsyncOperation.d.ts +3 -3
- package/lib/common/base/abstractAsyncOperation.js +31 -23
- package/lib/common/base/abstractAsyncOperation.js.map +1 -1
- package/lib/common/base/abstractPromote.d.ts +5 -4
- package/lib/common/base/abstractPromote.js +52 -38
- package/lib/common/base/abstractPromote.js.map +1 -1
- package/lib/common/base/abstractQuick.d.ts +4 -3
- package/lib/common/base/abstractQuick.js +44 -43
- package/lib/common/base/abstractQuick.js.map +1 -1
- package/lib/common/base/abstractReportOnPromote.d.ts +2 -1
- package/lib/common/base/abstractReportOnPromote.js +31 -24
- package/lib/common/base/abstractReportOnPromote.js.map +1 -1
- package/lib/common/base/abstractResume.d.ts +3 -2
- package/lib/common/base/abstractResume.js +40 -33
- package/lib/common/base/abstractResume.js.map +1 -1
- package/lib/common/constants.js +19 -13
- package/lib/common/constants.js.map +1 -1
- package/lib/common/deployPipelineCache.js +20 -15
- package/lib/common/deployPipelineCache.js.map +1 -1
- package/lib/common/flags/flags.d.ts +2 -2
- package/lib/common/flags/flags.js +34 -29
- package/lib/common/flags/flags.js.map +1 -1
- package/lib/common/flags/promote/promoteFlags.d.ts +3 -3
- package/lib/common/flags/promote/promoteFlags.js +26 -20
- package/lib/common/flags/promote/promoteFlags.js.map +1 -1
- package/lib/common/index.d.ts +3 -2
- package/lib/common/index.js +2 -17
- package/lib/common/index.js.map +1 -1
- package/lib/common/outputColumns.d.ts +3 -13
- package/lib/common/outputColumns.js +23 -19
- package/lib/common/outputColumns.js.map +1 -1
- package/lib/common/outputService/aorOutputService.d.ts +4 -4
- package/lib/common/outputService/aorOutputService.js +27 -20
- package/lib/common/outputService/aorOutputService.js.map +1 -1
- package/lib/common/outputService/deployCommandOutputService.d.ts +2 -2
- package/lib/common/outputService/deployCommandOutputService.js +17 -12
- package/lib/common/outputService/deployCommandOutputService.js.map +1 -1
- package/lib/common/outputService/deploySummaryBuilder.d.ts +1 -1
- package/lib/common/outputService/deploySummaryBuilder.js +45 -31
- package/lib/common/outputService/deploySummaryBuilder.js.map +1 -1
- package/lib/common/outputService/deploymentResultOutputService.d.ts +4 -4
- package/lib/common/outputService/deploymentResultOutputService.js +16 -10
- package/lib/common/outputService/deploymentResultOutputService.js.map +1 -1
- package/lib/common/outputService/index.d.ts +8 -6
- package/lib/common/outputService/index.js +5 -19
- package/lib/common/outputService/index.js.map +1 -1
- package/lib/common/outputService/outputService.d.ts +6 -4
- package/lib/common/outputService/outputService.js +20 -14
- package/lib/common/outputService/outputService.js.map +1 -1
- package/lib/common/outputService/outputServiceFactory.d.ts +8 -8
- package/lib/common/outputService/outputServiceFactory.js +21 -16
- package/lib/common/outputService/outputServiceFactory.js.map +1 -1
- package/lib/common/outputService/outputUtils.d.ts +1 -1
- package/lib/common/outputService/outputUtils.js +24 -19
- package/lib/common/outputService/outputUtils.js.map +1 -1
- package/lib/common/outputService/promoteOutputService.d.ts +4 -5
- package/lib/common/outputService/promoteOutputService.js +19 -13
- package/lib/common/outputService/promoteOutputService.js.map +1 -1
- package/lib/common/outputService/reportOutputService.d.ts +5 -6
- package/lib/common/outputService/reportOutputService.js +32 -27
- package/lib/common/outputService/reportOutputService.js.map +1 -1
- package/lib/common/outputService/resumeCommandOutputService.d.ts +3 -3
- package/lib/common/outputService/resumeCommandOutputService.js +19 -13
- package/lib/common/outputService/resumeCommandOutputService.js.map +1 -1
- package/lib/common/outputService/resumeOutputService.d.ts +3 -3
- package/lib/common/outputService/resumeOutputService.js +23 -17
- package/lib/common/outputService/resumeOutputService.js.map +1 -1
- package/lib/common/selectors/asyncOperationResultsSelector.d.ts +1 -1
- package/lib/common/selectors/asyncOperationResultsSelector.js +16 -10
- package/lib/common/selectors/asyncOperationResultsSelector.js.map +1 -1
- package/lib/common/selectors/deployComponentsSelector.d.ts +1 -1
- package/lib/common/selectors/deployComponentsSelector.js +18 -13
- package/lib/common/selectors/deployComponentsSelector.js.map +1 -1
- package/lib/common/selectors/deployProgressSummarySelector.d.ts +2 -2
- package/lib/common/selectors/deployProgressSummarySelector.js +16 -10
- package/lib/common/selectors/deployProgressSummarySelector.js.map +1 -1
- package/lib/common/selectors/deploymentResultsSelector.d.ts +2 -2
- package/lib/common/selectors/deploymentResultsSelector.js +20 -16
- package/lib/common/selectors/deploymentResultsSelector.js.map +1 -1
- package/lib/common/selectors/environmentSelector.d.ts +2 -2
- package/lib/common/selectors/environmentSelector.js +16 -10
- package/lib/common/selectors/environmentSelector.js.map +1 -1
- package/lib/common/selectors/namedCredentialSelector.d.ts +1 -1
- package/lib/common/selectors/namedCredentialSelector.js +16 -10
- package/lib/common/selectors/namedCredentialSelector.js.map +1 -1
- package/lib/common/selectors/pipelineStageSelector.d.ts +1 -1
- package/lib/common/selectors/pipelineStageSelector.js +18 -13
- package/lib/common/selectors/pipelineStageSelector.js.map +1 -1
- package/lib/common/selectors/selectorUtils.d.ts +1 -1
- package/lib/common/selectors/selectorUtils.js +17 -11
- package/lib/common/selectors/selectorUtils.js.map +1 -1
- package/lib/common/selectors/validateDeploySelector.d.ts +1 -1
- package/lib/common/selectors/validateDeploySelector.js +16 -10
- package/lib/common/selectors/validateDeploySelector.js.map +1 -1
- package/lib/common/selectors/workItemSelector.d.ts +2 -2
- package/lib/common/selectors/workItemSelector.js +16 -10
- package/lib/common/selectors/workItemSelector.js.map +1 -1
- package/lib/common/types.d.ts +4 -4
- package/lib/common/types.js +4 -7
- package/lib/common/types.js.map +1 -1
- package/lib/common/utils.d.ts +4 -4
- package/lib/common/utils.js +42 -43
- package/lib/common/utils.js.map +1 -1
- package/lib/configMeta.js +21 -15
- package/lib/configMeta.js.map +1 -1
- package/lib/streamer/doceMonitor.d.ts +3 -2
- package/lib/streamer/doceMonitor.js +14 -6
- package/lib/streamer/doceMonitor.js.map +1 -1
- package/lib/streamer/doceStream.d.ts +1 -1
- package/lib/streamer/doceStream.js +19 -11
- package/lib/streamer/doceStream.js.map +1 -1
- package/lib/streamer/processors/asyncOpStream.d.ts +2 -2
- package/lib/streamer/processors/asyncOpStream.js +22 -15
- package/lib/streamer/processors/asyncOpStream.js.map +1 -1
- package/lib/streamer/sObjectStream.d.ts +1 -1
- package/lib/streamer/sObjectStream.js +9 -10
- package/lib/streamer/sObjectStream.js.map +1 -1
- package/lib/utils/activatePipeline.d.ts +17 -0
- package/lib/utils/activatePipeline.js +35 -0
- package/lib/utils/activatePipeline.js.map +1 -0
- package/lib/utils/addPipelineStage.d.ts +20 -0
- package/lib/utils/addPipelineStage.js +43 -0
- package/lib/utils/addPipelineStage.js.map +1 -0
- package/lib/utils/attachProject.d.ts +21 -0
- package/lib/utils/attachProject.js +44 -0
- package/lib/utils/attachProject.js.map +1 -0
- package/lib/utils/createPipeline.d.ts +34 -0
- package/lib/utils/createPipeline.js +77 -0
- package/lib/utils/createPipeline.js.map +1 -0
- package/lib/utils/createProject.d.ts +17 -0
- package/lib/utils/createProject.js +39 -0
- package/lib/utils/createProject.js.map +1 -0
- package/lib/utils/createPullRequest.d.ts +49 -0
- package/lib/utils/createPullRequest.js +204 -0
- package/lib/utils/createPullRequest.js.map +1 -0
- package/lib/utils/createWorkItem.d.ts +19 -0
- package/lib/utils/createWorkItem.js +58 -0
- package/lib/utils/createWorkItem.js.map +1 -0
- package/lib/utils/pipelineUtils.d.ts +8 -0
- package/lib/utils/pipelineUtils.js +51 -0
- package/lib/utils/pipelineUtils.js.map +1 -0
- package/lib/utils/types.d.ts +57 -0
- package/lib/utils/types.js +17 -0
- package/lib/utils/types.js.map +1 -0
- package/lib/utils/updateWorkItemStatus.d.ts +34 -0
- package/lib/utils/updateWorkItemStatus.js +71 -0
- package/lib/utils/updateWorkItemStatus.js.map +1 -0
- package/lib/utils/workItems.d.ts +3 -0
- package/lib/utils/workItems.js +181 -0
- package/lib/utils/workItems.js.map +1 -0
- package/messages/commonErrors.md +5 -1
- package/messages/devops.pipeline.activate.md +29 -0
- package/messages/devops.pipeline.attach-project.md +29 -0
- package/messages/devops.pipeline.create.md +81 -0
- package/messages/devops.pipeline.stage.add.md +37 -0
- package/messages/devops.project.create.md +29 -0
- package/messages/devops.project.list.md +17 -0
- package/messages/devops.pull-request.create.md +57 -0
- package/messages/devops.work-item.create.md +29 -0
- package/messages/devops.work-item.list.md +21 -0
- package/messages/devops.work-item.status.update.md +29 -0
- package/npm-shrinkwrap.json +4594 -4552
- package/oclif.lock +3513 -3194
- package/oclif.manifest.json +863 -11
- package/package.json +56 -26
- package/schemas/devops-pipeline-activate.json +28 -0
- package/schemas/devops-pipeline-attach__project.json +25 -0
- package/schemas/devops-pipeline-create.json +50 -0
- package/schemas/devops-pipeline-stage-add.json +31 -0
- package/schemas/devops-project-create.json +28 -0
- package/schemas/devops-project-list.json +35 -0
- package/schemas/devops-pull__request-create.json +34 -0
- package/schemas/devops-work__item-create.json +28 -0
- package/schemas/devops-work__item-list.json +75 -0
- package/schemas/devops-work__item-status-update.json +28 -0
- package/schemas/project-deploy-pipeline-report.json +2 -2
|
@@ -1,18 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
17
|
+
import { fetchAndValidatePipelineStage, validateTestFlags, } from '../index.js';
|
|
18
|
+
import { devopsCenterProjectName, requiredDoceOrgFlag, wait, verbose, concise } from '../flags/flags.js';
|
|
19
|
+
import { branchName, bundleVersionName, deployAll, specificTests, testLevel, async, } from '../flags/promote/promoteFlags.js';
|
|
20
|
+
import { REST_PROMOTE_BASE_URL, HTTP_CONFLICT_CODE } from '../constants.js';
|
|
21
|
+
import { OutputServiceFactory } from '../outputService/index.js';
|
|
22
|
+
import { sleep } from '../utils.js';
|
|
23
|
+
import { AsyncCommand } from './abstractAsyncOperation.js';
|
|
24
|
+
export class PromoteCommand extends AsyncCommand {
|
|
25
|
+
static enableJsonFlag = true;
|
|
26
|
+
// common flags that can be inherited by any command that extends PromoteCommand
|
|
27
|
+
static baseFlags = {
|
|
28
|
+
...SfCommand.baseFlags,
|
|
29
|
+
'branch-name': branchName,
|
|
30
|
+
'bundle-version-name': bundleVersionName,
|
|
31
|
+
'deploy-all': deployAll,
|
|
32
|
+
'devops-center-project-name': devopsCenterProjectName,
|
|
33
|
+
'devops-center-username': requiredDoceOrgFlag(),
|
|
34
|
+
tests: specificTests,
|
|
35
|
+
'test-level': testLevel(),
|
|
36
|
+
async,
|
|
37
|
+
wait,
|
|
38
|
+
verbose,
|
|
39
|
+
concise,
|
|
40
|
+
};
|
|
41
|
+
flags;
|
|
42
|
+
targetStage;
|
|
43
|
+
sourceStageId;
|
|
44
|
+
deployOptions;
|
|
45
|
+
numRetries409 = 50; // this is the number of times we retry if we get a http-409-Conflict response
|
|
16
46
|
async init() {
|
|
17
47
|
await super.init();
|
|
18
48
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
@@ -24,11 +54,11 @@ class PromoteCommand extends abstractAsyncOperation_1.AsyncCommand {
|
|
|
24
54
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
25
55
|
this.flags = flags;
|
|
26
56
|
this.targetOrg = this.flags['devops-center-username'];
|
|
27
|
-
this.setOutputService(new
|
|
57
|
+
this.setOutputService(new OutputServiceFactory().forDeployment(this.flags, this.targetOrg.getConnection()));
|
|
28
58
|
}
|
|
29
59
|
async executePromotion() {
|
|
30
|
-
|
|
31
|
-
this.targetStage = await
|
|
60
|
+
validateTestFlags(this.flags['test-level'], this.flags.tests);
|
|
61
|
+
this.targetStage = await fetchAndValidatePipelineStage(this.targetOrg, this.flags['devops-center-project-name'], this.flags['branch-name']);
|
|
32
62
|
this.sourceStageId = this.getSourceStageId();
|
|
33
63
|
this.setAsyncOperationId(await this.requestPromotionFlow());
|
|
34
64
|
return this.monitorOperation(this.flags.async, this.flags.wait);
|
|
@@ -47,7 +77,7 @@ class PromoteCommand extends abstractAsyncOperation_1.AsyncCommand {
|
|
|
47
77
|
catch (error) {
|
|
48
78
|
const err = error;
|
|
49
79
|
// if we get a 409 error then call the retry flow
|
|
50
|
-
if (err.errorCode ===
|
|
80
|
+
if (err.errorCode === HTTP_CONFLICT_CODE) {
|
|
51
81
|
this.spinner.start('Synchronization of source control system events in progress');
|
|
52
82
|
spinnerStarted = true;
|
|
53
83
|
return await this.retryRequestPromotion(this.numRetries409);
|
|
@@ -71,13 +101,13 @@ class PromoteCommand extends abstractAsyncOperation_1.AsyncCommand {
|
|
|
71
101
|
async retryRequestPromotion(numRetries) {
|
|
72
102
|
try {
|
|
73
103
|
// Sleep 2 seconds before requesting promotion again.
|
|
74
|
-
await
|
|
104
|
+
await sleep(2000);
|
|
75
105
|
return await this.requestPromotion();
|
|
76
106
|
}
|
|
77
107
|
catch (error) {
|
|
78
108
|
const err = error;
|
|
79
109
|
// if we still get a 409 error and haven't run out of retry attempts then retry again
|
|
80
|
-
if (err.errorCode ===
|
|
110
|
+
if (err.errorCode === HTTP_CONFLICT_CODE && numRetries > 1) {
|
|
81
111
|
return this.retryRequestPromotion(numRetries - 1);
|
|
82
112
|
}
|
|
83
113
|
throw error;
|
|
@@ -90,7 +120,7 @@ class PromoteCommand extends abstractAsyncOperation_1.AsyncCommand {
|
|
|
90
120
|
this.buildPromoteOptions();
|
|
91
121
|
const req = {
|
|
92
122
|
method: 'POST',
|
|
93
|
-
url: `${
|
|
123
|
+
url: `${REST_PROMOTE_BASE_URL}${this.targetStage.sf_devops__Pipeline__r.sf_devops__Project__c}/pipelineName/${this.sourceStageId}`,
|
|
94
124
|
body: JSON.stringify({
|
|
95
125
|
changeBundleName: this.flags['bundle-version-name'],
|
|
96
126
|
promoteOptions: this.deployOptions,
|
|
@@ -109,20 +139,4 @@ class PromoteCommand extends abstractAsyncOperation_1.AsyncCommand {
|
|
|
109
139
|
};
|
|
110
140
|
}
|
|
111
141
|
}
|
|
112
|
-
exports.PromoteCommand = PromoteCommand;
|
|
113
|
-
PromoteCommand.enableJsonFlag = true;
|
|
114
|
-
// common flags that can be inherited by any command that extends PromoteCommand
|
|
115
|
-
PromoteCommand.baseFlags = {
|
|
116
|
-
'branch-name': promoteFlags_1.branchName,
|
|
117
|
-
'bundle-version-name': promoteFlags_1.bundleVersionName,
|
|
118
|
-
'deploy-all': promoteFlags_1.deployAll,
|
|
119
|
-
'devops-center-project-name': flags_1.devopsCenterProjectName,
|
|
120
|
-
'devops-center-username': (0, flags_1.requiredDoceOrgFlag)(),
|
|
121
|
-
tests: promoteFlags_1.specificTests,
|
|
122
|
-
'test-level': (0, promoteFlags_1.testLevel)(),
|
|
123
|
-
async: promoteFlags_1.async,
|
|
124
|
-
wait: flags_1.wait,
|
|
125
|
-
verbose: flags_1.verbose,
|
|
126
|
-
concise: flags_1.concise,
|
|
127
|
-
};
|
|
128
142
|
//# sourceMappingURL=abstractPromote.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstractPromote.js","sourceRoot":"","sources":["../../../src/common/base/abstractPromote.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"abstractPromote.js","sourceRoot":"","sources":["../../../src/common/base/abstractPromote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAGxD,OAAO,EACL,6BAA6B,EAI7B,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACzG,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,SAAS,EACT,KAAK,GACN,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAM3D,MAAM,OAAgB,cAA2C,SAAQ,YAAY;IAC5E,MAAM,CAAU,cAAc,GAAG,IAAI,CAAC;IAC7C,gFAAgF;IACzE,MAAM,CAAC,SAAS,GAAG;QACxB,GAAG,SAAS,CAAC,SAAS;Q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|
import { Interfaces } from '@oclif/core';
|
|
2
2
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
3
|
-
import { PipelineStage, PromoteOptions } from '
|
|
4
|
-
import { AsyncOperationResultJson } from '../../common';
|
|
5
|
-
import { AsyncCommand } from './abstractAsyncOperation';
|
|
3
|
+
import { PipelineStage, PromoteOptions } from '../index.js';
|
|
4
|
+
import type { AsyncOperationResultJson } from '../../common/index.js';
|
|
5
|
+
import { AsyncCommand } from './abstractAsyncOperation.js';
|
|
6
6
|
export type Flags<T extends typeof SfCommand> = Interfaces.InferredFlags<(typeof QuickPromotionCommand)['baseFlags'] & T['flags']>;
|
|
7
7
|
export default abstract class QuickPromotionCommand<T extends typeof SfCommand> extends AsyncCommand {
|
|
8
8
|
static readonly enableJsonFlag = true;
|
|
@@ -14,6 +14,7 @@ export default abstract class QuickPromotionCommand<T extends typeof SfCommand>
|
|
|
14
14
|
'devops-center-username': Interfaces.OptionFlag<import("@salesforce/core").Org, Interfaces.CustomOptions>;
|
|
15
15
|
'job-id': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
16
16
|
'use-most-recent': Interfaces.BooleanFlag<boolean>;
|
|
17
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
18
|
};
|
|
18
19
|
protected flags: Flags<T>;
|
|
19
20
|
private targetStage;
|
|
@@ -1,19 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { Messages } from '@salesforce/core';
|
|
2
|
+
import { Flags as SfFlags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
3
|
+
import { AsyncOperationStatus } from '../index.js';
|
|
4
|
+
import { REST_PROMOTE_BASE_URL } from '../constants.js';
|
|
5
|
+
import { DeployPipelineCache } from '../deployPipelineCache.js';
|
|
6
|
+
import { async } from '../flags/promote/promoteFlags.js';
|
|
7
|
+
import { concise, requiredDoceOrgFlag, verbose, wait } from '../flags/flags.js';
|
|
8
|
+
import { OutputServiceFactory } from '../outputService/index.js';
|
|
9
|
+
import { selectOneDeploymentResultWithChangeBundleInstallsByAsyncJobId, } from '../selectors/deploymentResultsSelector.js';
|
|
10
|
+
import { selectOnePipelineStageByEnvironmentId } from '../selectors/pipelineStageSelector.js';
|
|
11
|
+
import { AsyncCommand } from './abstractAsyncOperation.js';
|
|
12
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
13
|
+
const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'project.deploy.pipeline.quick');
|
|
14
|
+
export default class QuickPromotionCommand extends AsyncCommand {
|
|
15
|
+
static enableJsonFlag = true;
|
|
16
|
+
static baseFlags = {
|
|
17
|
+
...SfCommand.baseFlags,
|
|
18
|
+
async,
|
|
19
|
+
concise,
|
|
20
|
+
verbose,
|
|
21
|
+
wait,
|
|
22
|
+
'devops-center-username': requiredDoceOrgFlag(),
|
|
23
|
+
'job-id': SfFlags.salesforceId({
|
|
24
|
+
char: 'i',
|
|
25
|
+
description: messages.getMessage('flags.job-id.description'),
|
|
26
|
+
summary: messages.getMessage('flags.job-id.summary'),
|
|
27
|
+
exactlyOne: ['use-most-recent', 'job-id'],
|
|
28
|
+
}),
|
|
29
|
+
'use-most-recent': SfFlags.boolean({
|
|
30
|
+
char: 'r',
|
|
31
|
+
description: messages.getMessage('flags.use-most-recent.description'),
|
|
32
|
+
summary: messages.getMessage('flags.use-most-recent.summary'),
|
|
33
|
+
exactlyOne: ['use-most-recent', 'job-id'],
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
flags;
|
|
37
|
+
targetStage;
|
|
38
|
+
deployOptions;
|
|
17
39
|
async init() {
|
|
18
40
|
await super.init();
|
|
19
41
|
const { flags } = await this.parse({
|
|
@@ -31,8 +53,8 @@ class QuickPromotionCommand extends abstractAsyncOperation_1.AsyncCommand {
|
|
|
31
53
|
async executeQuickPromotion() {
|
|
32
54
|
const deploymentResult = await this.getDeploymentResultForQuickDeploy();
|
|
33
55
|
const envId = deploymentResult.sf_devops__Change_Bundle_Installs__r.records[0].sf_devops__Environment__c;
|
|
34
|
-
this.targetStage = (await
|
|
35
|
-
this.setOutputService(new
|
|
56
|
+
this.targetStage = (await selectOnePipelineStageByEnvironmentId(this.targetOrg.getConnection(), envId));
|
|
57
|
+
this.setOutputService(new OutputServiceFactory().forQuickDeployment(this.flags, this.flags['devops-center-username'].getConnection(), this.targetStage.sf_devops__Branch__r.sf_devops__Name__c));
|
|
36
58
|
this.setAsyncOperationId(await this.requestPromotion(this.targetStage.sf_devops__Pipeline__r.sf_devops__Project__c, this.getSourceStageId(), deploymentResult.sf_devops__Deployment_Id__c));
|
|
37
59
|
return this.monitorOperation(this.flags.async, this.flags.wait);
|
|
38
60
|
}
|
|
@@ -51,7 +73,7 @@ class QuickPromotionCommand extends abstractAsyncOperation_1.AsyncCommand {
|
|
|
51
73
|
this.buildPromoteOptions(deploymentId);
|
|
52
74
|
const req = {
|
|
53
75
|
method: 'POST',
|
|
54
|
-
url: `${
|
|
76
|
+
url: `${REST_PROMOTE_BASE_URL}${projectId}/pipelineName/${sourceStageId}`,
|
|
55
77
|
body: JSON.stringify({
|
|
56
78
|
promoteOptions: this.deployOptions,
|
|
57
79
|
}),
|
|
@@ -65,13 +87,13 @@ class QuickPromotionCommand extends abstractAsyncOperation_1.AsyncCommand {
|
|
|
65
87
|
*/
|
|
66
88
|
async getDeploymentResultForQuickDeploy() {
|
|
67
89
|
const asyncJobId = this.flags['use-most-recent']
|
|
68
|
-
? (await
|
|
90
|
+
? (await DeployPipelineCache.create()).getLatestKeyOrThrow()
|
|
69
91
|
: this.flags['job-id'];
|
|
70
|
-
const deploymentResult = await
|
|
92
|
+
const deploymentResult = await selectOneDeploymentResultWithChangeBundleInstallsByAsyncJobId(this.targetOrg.getConnection(), asyncJobId);
|
|
71
93
|
if (!deploymentResult) {
|
|
72
94
|
throw messages.createError('error.JobIsNotValidationDeployment');
|
|
73
95
|
}
|
|
74
|
-
if (deploymentResult.sf_devops__Check_Deploy_Status__r.sf_devops__Status__c !==
|
|
96
|
+
if (deploymentResult.sf_devops__Check_Deploy_Status__r.sf_devops__Status__c !== AsyncOperationStatus.Completed) {
|
|
75
97
|
throw messages.createError('error.JobIsNotValidated');
|
|
76
98
|
}
|
|
77
99
|
return deploymentResult;
|
|
@@ -88,25 +110,4 @@ class QuickPromotionCommand extends abstractAsyncOperation_1.AsyncCommand {
|
|
|
88
110
|
};
|
|
89
111
|
}
|
|
90
112
|
}
|
|
91
|
-
QuickPromotionCommand.enableJsonFlag = true;
|
|
92
|
-
QuickPromotionCommand.baseFlags = {
|
|
93
|
-
async: promoteFlags_1.async,
|
|
94
|
-
concise: flags_1.concise,
|
|
95
|
-
verbose: flags_1.verbose,
|
|
96
|
-
wait: flags_1.wait,
|
|
97
|
-
'devops-center-username': (0, flags_1.requiredDoceOrgFlag)(),
|
|
98
|
-
'job-id': sf_plugins_core_1.Flags.salesforceId({
|
|
99
|
-
char: 'i',
|
|
100
|
-
description: messages.getMessage('flags.job-id.description'),
|
|
101
|
-
summary: messages.getMessage('flags.job-id.summary'),
|
|
102
|
-
exactlyOne: ['use-most-recent', 'job-id'],
|
|
103
|
-
}),
|
|
104
|
-
'use-most-recent': sf_plugins_core_1.Flags.boolean({
|
|
105
|
-
char: 'r',
|
|
106
|
-
description: messages.getMessage('flags.use-most-recent.description'),
|
|
107
|
-
summary: messages.getMessage('flags.use-most-recent.summary'),
|
|
108
|
-
exactlyOne: ['use-most-recent', 'job-id'],
|
|
109
|
-
}),
|
|
110
|
-
};
|
|
111
|
-
exports.default = QuickPromotionCommand;
|
|
112
113
|
//# sourceMappingURL=abstractQuick.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstractQuick.js","sourceRoot":"","sources":["../../../src/common/base/abstractQuick.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"abstractQuick.js","sourceRoot":"","sources":["../../../src/common/base/abstractQuick.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAsB,oBAAoB,EAAiC,MAAM,aAAa,CAAC;AACtG,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAEL,6DAA6D,GAC9D,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,qCAAqC,EAAE,MAAM,uCAAuC,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAM3D,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,+BAA+B,CAAC,CAAC;AAE5G,MAAM,CAAC,OAAO,OAAgB,qBAAkD,SAAQ,YAAY;IAC3F,MAAM,CAAU,cAAc,GAAG,IAAI,CAAC;IACtC,MAAM,CAAC,SAAS,GAAG;QACxB,GAAG,SAAS,CAAC,SAAS;QACtB,KAAK;QACL,OAAO;QACP,OAAO;QACP,IAAI;QACJ,wBAAwB,EAAE,mBAAmB,EAAE;QAC/C,QAA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,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC;YAC9C,CAAC,CAAC,CAAC,MAAM,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC,mBAAmB,EAAE;YAC5D,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAY,CAAC;QAErC,MAAM,gBAAgB,GAAG,MAAM,6DAA6D,CAC1F,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,EAC9B,UAAU,CACX,CAAC;QAEF,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,MAAM,QAAQ,CAAC,WAAW,CAAC,oCAAoC,CAAC,CAAC;QACnE,CAAC;QACD,IAAI,gBAAgB,CAAC,iCAAiC,CAAC,oBAAoB,KAAK,oBAAoB,CAAC,SAAS,EAAE,CAAC;YAC/G,MAAM,QAAQ,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACK,mBAAmB,CAAC,QAAgB;QAC1C,IAAI,CAAC,aAAa,GAAG;YACnB,YAAY,EAAE,QAAQ;YACtB,sEAAsE;YACtE,GAAG,IAAI,CAAC,iBAAiB,EAAE;SAC5B,CAAC;IACJ,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
2
|
import { Interfaces } from '@oclif/core';
|
|
3
|
-
import { PromotePipelineResult } from '../../common';
|
|
3
|
+
import type { PromotePipelineResult } from '../../common/index.js';
|
|
4
4
|
export type Flags<T extends typeof SfCommand> = Interfaces.InferredFlags<(typeof ReportOnPromoteCommand)['baseFlags'] & T['flags']>;
|
|
5
5
|
export declare abstract class ReportOnPromoteCommand<T extends typeof SfCommand> extends SfCommand<PromotePipelineResult> {
|
|
6
6
|
static readonly enableJsonFlag = true;
|
|
7
7
|
static baseFlags: {
|
|
8
8
|
'devops-center-username': Interfaces.OptionFlag<import("@salesforce/core").Org, Interfaces.CustomOptions>;
|
|
9
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
11
|
protected flags: Flags<T>;
|
|
11
12
|
protected abstract operationName: string;
|
|
@@ -1,21 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReportOnPromoteCommand = void 0;
|
|
4
1
|
/*
|
|
5
|
-
* Copyright
|
|
6
|
-
*
|
|
7
|
-
* Licensed under the
|
|
8
|
-
*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
9
15
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const messages =
|
|
18
|
-
class ReportOnPromoteCommand extends
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { DeployPipelineCache } from '../../common/deployPipelineCache.js';
|
|
19
|
+
import { requiredDoceOrgFlag } from '../../common/flags/flags.js';
|
|
20
|
+
import { selectOneDeploymentResultByAsyncJobId } from './../selectors/deploymentResultsSelector.js';
|
|
21
|
+
import { OutputServiceFactory } from './../outputService/outputServiceFactory.js';
|
|
22
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
23
|
+
const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'commonErrors');
|
|
24
|
+
export class ReportOnPromoteCommand extends SfCommand {
|
|
25
|
+
static enableJsonFlag = true;
|
|
26
|
+
static baseFlags = {
|
|
27
|
+
...SfCommand.baseFlags,
|
|
28
|
+
'devops-center-username': requiredDoceOrgFlag(),
|
|
29
|
+
};
|
|
30
|
+
flags;
|
|
19
31
|
async init() {
|
|
20
32
|
await super.init();
|
|
21
33
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
@@ -32,13 +44,13 @@ class ReportOnPromoteCommand extends sf_plugins_core_1.SfCommand {
|
|
|
32
44
|
*/
|
|
33
45
|
async getOperationReport() {
|
|
34
46
|
const asyncJobId = this.flags['use-most-recent']
|
|
35
|
-
? (await
|
|
47
|
+
? (await DeployPipelineCache.create()).getLatestKeyOrThrow()
|
|
36
48
|
: this.flags['job-id'];
|
|
37
49
|
const org = this.flags['devops-center-username'];
|
|
38
50
|
// query the deployment result related to the promote operation.
|
|
39
|
-
const operationResult = await
|
|
51
|
+
const operationResult = await selectOneDeploymentResultByAsyncJobId(org.getConnection(), asyncJobId);
|
|
40
52
|
if (operationResult && !this.jsonEnabled()) {
|
|
41
|
-
const displayer = new
|
|
53
|
+
const displayer = new OutputServiceFactory().forPromotionReport(this.flags, operationResult, this.operationName);
|
|
42
54
|
displayer.printOpSummary();
|
|
43
55
|
}
|
|
44
56
|
else if (!operationResult) {
|
|
@@ -52,9 +64,4 @@ class ReportOnPromoteCommand extends sf_plugins_core_1.SfCommand {
|
|
|
52
64
|
};
|
|
53
65
|
}
|
|
54
66
|
}
|
|
55
|
-
exports.ReportOnPromoteCommand = ReportOnPromoteCommand;
|
|
56
|
-
ReportOnPromoteCommand.enableJsonFlag = true;
|
|
57
|
-
ReportOnPromoteCommand.baseFlags = {
|
|
58
|
-
'devops-center-username': (0, flags_1.requiredDoceOrgFlag)(),
|
|
59
|
-
};
|
|
60
67
|
//# sourceMappingURL=abstractReportOnPromote.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstractReportOnPromote.js","sourceRoot":"","sources":["../../../src/common/base/abstractReportOnPromote.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"abstractReportOnPromote.js","sourceRoot":"","sources":["../../../src/common/base/abstractReportOnPromote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,OAAO,EAAE,qCAAqC,EAAE,MAAM,6CAA6C,CAAC;AAEpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAElF,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,cAAc,CAAC,CAAC;AAM3F,MAAM,OAAgB,sBAAmD,SAAQ,SAAgC;IACxG,MAAM,CAAU,cAAc,GAAG,IAAI,CAAC;IACtC,MAAM,CAAC,SAAS,GAAG;QACxB,GAAG,SAAS,CAAC,SAAS;QACtB,wBAAwB,EAAE,mBAAmB,EAAE;KAChD,CAAC;IACQ,KAAK,CAAY;IAGpB,KAAK,CAAC,IAAI;QACf,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,mEAAmE;QACnE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC;YACjC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;YACtB,SAAS,EAAG,KAAK,CAAC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ce/sf-plugins-core';
|
|
2
2
|
import { Interfaces } from '@oclif/core';
|
|
3
|
-
import { AsyncOperationResultJson, AsyncOperationStatus } from '../../common';
|
|
4
|
-
import { AsyncCommand } from './abstractAsyncOperation';
|
|
3
|
+
import { AsyncOperationResultJson, AsyncOperationStatus } from '../../common/index.js';
|
|
4
|
+
import { AsyncCommand } from './abstractAsyncOperation.js';
|
|
5
5
|
/**
|
|
6
6
|
* Helper to determine if an operation has finished and therefore is not resumable
|
|
7
7
|
*
|
|
@@ -23,6 +23,7 @@ export declare abstract class ResumeCommand<T extends typeof SfCommand> extends
|
|
|
23
23
|
concise: Interfaces.BooleanFlag<boolean>;
|
|
24
24
|
verbose: Interfaces.BooleanFlag<boolean>;
|
|
25
25
|
wait: Interfaces.OptionFlag<import("@salesforce/kit").Duration>;
|
|
26
|
+
'flags-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
27
|
};
|
|
27
28
|
protected flags: Flags<T>;
|
|
28
29
|
protected abstract operationType: string;
|
|
@@ -1,35 +1,53 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResumeCommand = void 0;
|
|
4
|
-
exports.isNotResumable = isNotResumable;
|
|
5
1
|
/*
|
|
6
|
-
* Copyright
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the
|
|
9
|
-
*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
10
15
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { AsyncOperationStatus, fetchAsyncOperationResult, } from '../../common/index.js';
|
|
19
|
+
import { concise, jobId, requiredDoceOrgFlag, useMostRecent, verbose, wait } from '../../common/flags/flags.js';
|
|
20
|
+
import { DeployPipelineCache } from './../deployPipelineCache.js';
|
|
21
|
+
import { OutputServiceFactory } from './../outputService/index.js';
|
|
22
|
+
import { AsyncCommand } from './abstractAsyncOperation.js';
|
|
23
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
24
|
+
const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'commonErrors');
|
|
19
25
|
/**
|
|
20
26
|
* Helper to determine if an operation has finished and therefore is not resumable
|
|
21
27
|
*
|
|
22
28
|
* @param status status of the async operation
|
|
23
29
|
* @returns true if the operation has finished
|
|
24
30
|
*/
|
|
25
|
-
function isNotResumable(status) {
|
|
26
|
-
return [
|
|
31
|
+
export function isNotResumable(status) {
|
|
32
|
+
return [AsyncOperationStatus.Completed, AsyncOperationStatus.Error, AsyncOperationStatus.Ignored].includes(status);
|
|
27
33
|
}
|
|
28
34
|
/**
|
|
29
35
|
*
|
|
30
36
|
* Base class with the common logic to resume an in progress operation
|
|
31
37
|
*/
|
|
32
|
-
class ResumeCommand extends
|
|
38
|
+
export class ResumeCommand extends AsyncCommand {
|
|
39
|
+
static enableJsonFlag = true;
|
|
40
|
+
// common flags that can be inherited by any command that extends ResumeCommand
|
|
41
|
+
static baseFlags = {
|
|
42
|
+
...SfCommand.baseFlags,
|
|
43
|
+
'devops-center-username': requiredDoceOrgFlag(),
|
|
44
|
+
'job-id': jobId,
|
|
45
|
+
'use-most-recent': useMostRecent,
|
|
46
|
+
concise,
|
|
47
|
+
verbose,
|
|
48
|
+
wait,
|
|
49
|
+
};
|
|
50
|
+
flags;
|
|
33
51
|
async init() {
|
|
34
52
|
await super.init();
|
|
35
53
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
@@ -38,15 +56,15 @@ class ResumeCommand extends abstractAsyncOperation_1.AsyncCommand {
|
|
|
38
56
|
baseFlags: super.ctor.baseFlags,
|
|
39
57
|
}); // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
40
58
|
this.flags = flags;
|
|
41
|
-
this.setOutputService(new
|
|
59
|
+
this.setOutputService(new OutputServiceFactory().forResume(this.flags, this.operationType, this.flags['devops-center-username'].getConnection()));
|
|
42
60
|
}
|
|
43
61
|
async resumeOperation() {
|
|
44
62
|
const asyncJobId = this.flags['use-most-recent']
|
|
45
|
-
? (await
|
|
63
|
+
? (await DeployPipelineCache.create()).getLatestKeyOrThrow()
|
|
46
64
|
: this.flags['job-id'];
|
|
47
65
|
// get the latest state of the async job and validate that it's resumable
|
|
48
66
|
this.targetOrg = this.flags['devops-center-username'];
|
|
49
|
-
const asyncJob = await
|
|
67
|
+
const asyncJob = await fetchAsyncOperationResult(this.targetOrg.getConnection(), asyncJobId);
|
|
50
68
|
if (asyncJob.sf_devops__Status__c && isNotResumable(asyncJob.sf_devops__Status__c)) {
|
|
51
69
|
throw messages.createError('error.JobNotResumable', [asyncJobId, asyncJob.sf_devops__Status__c]);
|
|
52
70
|
}
|
|
@@ -54,15 +72,4 @@ class ResumeCommand extends abstractAsyncOperation_1.AsyncCommand {
|
|
|
54
72
|
return this.monitorOperation(false, this.flags.wait);
|
|
55
73
|
}
|
|
56
74
|
}
|
|
57
|
-
exports.ResumeCommand = ResumeCommand;
|
|
58
|
-
ResumeCommand.enableJsonFlag = true;
|
|
59
|
-
// common flags that can be inherited by any command that extends ResumeCommand
|
|
60
|
-
ResumeCommand.baseFlags = {
|
|
61
|
-
'devops-center-username': (0, flags_1.requiredDoceOrgFlag)(),
|
|
62
|
-
'job-id': flags_1.jobId,
|
|
63
|
-
'use-most-recent': flags_1.useMostRecent,
|
|
64
|
-
concise: flags_1.concise,
|
|
65
|
-
verbose: flags_1.verbose,
|
|
66
|
-
wait: flags_1.wait,
|
|
67
|
-
};
|
|
68
75
|
//# sourceMappingURL=abstractResume.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstractResume.js","sourceRoot":"","sources":["../../../src/common/base/abstractResume.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"abstractResume.js","sourceRoot":"","sources":["../../../src/common/base/abstractResume.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,OAAO,EAGL,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAChH,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,cAAc,CAAC,CAAC;AAE3F;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,MAA4B;IACzD,OAAO,CAAC,oBAAoB,CAAC,SAAS,EAAE,oBAAoB,CAAC,KAAK,EAAE,oBAAoB,CAA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C;QACtD,MAAM,QAAQ,GAAyB,MAAM,yBAAyB,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,EAAE,UAAU,CAAC,CAAC;QACnH,IAAI,QAAQ,CAAC,oBAAoB,IAAI,cAAc,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC;YACnF,MAAM,QAAQ,CAAC,WAAW,CAAC,uBAAuB,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAC,CAAC;QACnG,CAAC;QAED,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC"}
|
package/lib/common/constants.js
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/*
|
|
3
|
-
* Copyright
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the
|
|
6
|
-
*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
7
15
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.HTTP_CONFLICT_CODE = 'CONFLICT';
|
|
14
|
-
var AsyncOperationType;
|
|
16
|
+
export const APPROVED = 'Approved';
|
|
17
|
+
export const ASYNC_OPERATION_CDC = '/data/sf_devops__Async_Operation_Result__ChangeEvent';
|
|
18
|
+
export const REST_PROMOTE_BASE_URL = '/services/apexrest/sf_devops/pipeline/promote/v1/';
|
|
19
|
+
export const HTTP_CONFLICT_CODE = 'CONFLICT';
|
|
20
|
+
export var AsyncOperationType;
|
|
15
21
|
(function (AsyncOperationType) {
|
|
16
22
|
AsyncOperationType["AD_HOC_PROMOTE"] = "AD_HOC_PROMOTE";
|
|
17
23
|
AsyncOperationType["VERSIONED_PROMOTE"] = "VERSIONED_PROMOTE";
|
|
18
24
|
AsyncOperationType["SOUP_PROMOTE"] = "SOUP_PROMOTE";
|
|
19
25
|
AsyncOperationType["CHECK_DEPLOY"] = "CHECK_DEPLOY";
|
|
20
|
-
})(AsyncOperationType || (
|
|
26
|
+
})(AsyncOperationType || (AsyncOperationType = {}));
|
|
21
27
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/common/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AACnC,MAAM,CAAC,MAAM,mBAAmB,GAAG,sDAAsD,CAAC;AAC1F,MAAM,CAAC,MAAM,qBAAqB,GAAG,mDAAmD,CAAC;AACzF,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAC7C,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,uDAAiC,CAAA;IACjC,6DAAuC,CAAA;IACvC,mDAA6B,CAAA;IAC7B,mDAA6B,CAAA;AAC/B,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B"}
|