@salesforce/plugin-devops-center 1.2.27 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +200 -6
- package/README.md +515 -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/stage/add-branch.d.ts +17 -0
- package/lib/commands/devops/stage/add-branch.js +110 -0
- package/lib/commands/devops/stage/add-branch.js.map +1 -0
- package/lib/commands/devops/stage/add-environment.d.ts +18 -0
- package/lib/commands/devops/stage/add-environment.js +136 -0
- package/lib/commands/devops/stage/add-environment.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/addStageBranch.d.ts +22 -0
- package/lib/utils/addStageBranch.js +48 -0
- package/lib/utils/addStageBranch.js.map +1 -0
- package/lib/utils/addStageEnvironment.d.ts +92 -0
- package/lib/utils/addStageEnvironment.js +120 -0
- package/lib/utils/addStageEnvironment.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.stage.add-branch.md +46 -0
- package/messages/devops.stage.add-environment.md +61 -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 +4197 -4471
- package/oclif.lock +3380 -3272
- package/oclif.manifest.json +1056 -11
- package/package.json +53 -23
- 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-stage-add__branch.json +34 -0
- package/schemas/devops-stage-add__environment.json +47 -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,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,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACrH,CAAC;AAMD;;;GAGG;AAEH,MAAM,OAAgB,aAA0C,SAAQ,YAAY;IAC3E,MAAM,CAAU,cAAc,GAAG,IAAI,CAAC;IAC7C,+EAA+E;IACxE,MAAM,CAAC,SAAS,GAAG;QACxB,GAAG,SAAS,CAAC,SAAS;QACtB,wBAAwB,EAAE,mBAAmB,EAAE;QAC/C,QAAQ,EAAE,KAAK;QACf,iBA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AC;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"}
|
|
@@ -1,22 +1,28 @@
|
|
|
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
|
-
const
|
|
12
|
-
core_1.Messages.importMessagesDirectory(__dirname);
|
|
13
|
-
const cacheMessages = core_1.Messages.loadMessages('@salesforce/plugin-devops-center', 'cache');
|
|
16
|
+
import { Global, Messages, TTLConfig } from '@salesforce/core';
|
|
17
|
+
import { Duration } from '@salesforce/kit';
|
|
18
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
19
|
+
const cacheMessages = Messages.loadMessages('@salesforce/plugin-devops-center', 'cache');
|
|
14
20
|
/**
|
|
15
21
|
* Caches the AOR data
|
|
16
22
|
*
|
|
17
23
|
* @author JuanStenghele-sf
|
|
18
24
|
*/
|
|
19
|
-
class DeployPipelineCache extends
|
|
25
|
+
export class DeployPipelineCache extends TTLConfig {
|
|
20
26
|
/**
|
|
21
27
|
* Returns the cache's filename
|
|
22
28
|
*/
|
|
@@ -31,8 +37,8 @@ class DeployPipelineCache extends core_1.TTLConfig {
|
|
|
31
37
|
isGlobal: true,
|
|
32
38
|
isState: false,
|
|
33
39
|
filename: this.getFileName(),
|
|
34
|
-
stateFolder:
|
|
35
|
-
ttl:
|
|
40
|
+
stateFolder: Global.SF_STATE_FOLDER,
|
|
41
|
+
ttl: Duration.days(3),
|
|
36
42
|
};
|
|
37
43
|
}
|
|
38
44
|
/**
|
|
@@ -77,5 +83,4 @@ class DeployPipelineCache extends core_1.TTLConfig {
|
|
|
77
83
|
return aorId;
|
|
78
84
|
}
|
|
79
85
|
}
|
|
80
|
-
exports.DeployPipelineCache = DeployPipelineCache;
|
|
81
86
|
//# sourceMappingURL=deployPipelineCache.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployPipelineCache.js","sourceRoot":"","sources":["../../src/common/deployPipelineCache.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"deployPipelineCache.js","sourceRoot":"","sources":["../../src/common/deployPipelineCache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,aAAa,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,OAAO,CAAC,CAAC;AAKzF;;;;GAIG;AACH,MAAM,OAAO,mBAAoB,SAAQ,SAAgD;IACvF;;OAEG;IACI,MAAM,CAAC,WAAW;QACvB,OAAO,4BAA4B,CAAC;IACtC,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,iBAAiB;QAC7B,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE;YAC5B,WAAW,EAAE,MAAM,CAAC,eAAe;YACnC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;SACtB,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,KAAa,EAAE,IAAwB;QAC7D,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,MAAM,EAAE,CAAC;QACjD,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACvB,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAa;QACrC,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,MAAM,EAAE,CAAC;QACjD,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACnB,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAa,EAAE,IAAkD;QAC1F,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,MAAM,EAAE,CAAC;QACjD,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC1B,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAED;;OAEG;IACI,GAAG,CAAC,KAAa;QACtB,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED;;OAEG;IACI,mBAAmB;QACxB,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,aAAa,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;QACzD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Org } from '@salesforce/core';
|
|
2
2
|
import { Duration } from '@salesforce/kit';
|
|
3
|
-
import { BooleanFlag, OptionFlag } from '@oclif/core/
|
|
3
|
+
import { BooleanFlag, OptionFlag } from '@oclif/core/interfaces';
|
|
4
4
|
export declare const devopsCenterProjectName: OptionFlag<string>;
|
|
5
5
|
/**
|
|
6
6
|
* Wait flag
|
|
@@ -12,7 +12,7 @@ export declare const wait: OptionFlag<Duration>;
|
|
|
12
12
|
* Makes this flag required and validates that passed in alias/username corresponds to an authenticated org.
|
|
13
13
|
* If no value is passed in, then it looks for the alias/username set in the --target-devops-center config variable.
|
|
14
14
|
*/
|
|
15
|
-
export declare const requiredDoceOrgFlag: import("@oclif/core/
|
|
15
|
+
export declare const requiredDoceOrgFlag: import("@oclif/core/interfaces").FlagDefinition<Org, import("@oclif/core/interfaces").CustomOptions, {
|
|
16
16
|
multiple: false;
|
|
17
17
|
requiredOrDefaulted: true;
|
|
18
18
|
}>;
|
|
@@ -1,20 +1,26 @@
|
|
|
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
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const messages = core_1.Messages.loadMessages('@salesforce/plugin-devops-center', 'commonFlags');
|
|
17
|
-
exports.devopsCenterProjectName = sf_plugins_core_1.Flags.string({
|
|
16
|
+
import { ConfigAggregator, Messages, Org } from '@salesforce/core';
|
|
17
|
+
import { Duration } from '@salesforce/kit';
|
|
18
|
+
import { Flags } from '@salesforce/sf-plugins-core';
|
|
19
|
+
import { Flags as OclifFlags } from '@oclif/core';
|
|
20
|
+
import ConfigMeta, { ConfigVars } from '../../configMeta.js';
|
|
21
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
22
|
+
const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'commonFlags');
|
|
23
|
+
export const devopsCenterProjectName = Flags.string({
|
|
18
24
|
char: 'p',
|
|
19
25
|
summary: messages.getMessage('flags.devops-center-project-name.summary'),
|
|
20
26
|
required: true,
|
|
@@ -23,14 +29,14 @@ exports.devopsCenterProjectName = sf_plugins_core_1.Flags.string({
|
|
|
23
29
|
* Wait flag
|
|
24
30
|
* This is used to determine how many minutes we are going to stream results before giving back the control of the terminal to the user.
|
|
25
31
|
*/
|
|
26
|
-
|
|
32
|
+
export const wait = Flags.duration({
|
|
27
33
|
unit: 'minutes',
|
|
28
34
|
char: 'w',
|
|
29
35
|
summary: messages.getMessage('flags.wait.summary'),
|
|
30
36
|
description: messages.getMessage('flags.wait.description'),
|
|
31
37
|
defaultValue: 33,
|
|
32
38
|
// Set defaultHelp. This is not needed once sf-plugins-core is updated to 7.1.16 or newer.
|
|
33
|
-
defaultHelp: async () => Promise.resolve(
|
|
39
|
+
defaultHelp: async () => Promise.resolve(Duration.minutes(33).toString()),
|
|
34
40
|
helpValue: '<minutes>',
|
|
35
41
|
min: 3,
|
|
36
42
|
exclusive: ['async'],
|
|
@@ -40,30 +46,30 @@ exports.wait = sf_plugins_core_1.Flags.duration({
|
|
|
40
46
|
* Makes this flag required and validates that passed in alias/username corresponds to an authenticated org.
|
|
41
47
|
* If no value is passed in, then it looks for the alias/username set in the --target-devops-center config variable.
|
|
42
48
|
*/
|
|
43
|
-
|
|
49
|
+
export const requiredDoceOrgFlag = OclifFlags.custom({
|
|
44
50
|
char: 'c',
|
|
45
51
|
summary: messages.getMessage('flags.targetDoceOrg.summary'),
|
|
46
52
|
parse: async (input) => getOrgOrThrow(input),
|
|
47
53
|
default: async () => getOrgOrThrow(),
|
|
48
|
-
defaultHelp: async () =>
|
|
54
|
+
defaultHelp: async () => getDefaultDevopsCenterUsernameAlias(),
|
|
49
55
|
required: true,
|
|
50
56
|
});
|
|
51
|
-
|
|
57
|
+
export const jobId = Flags.salesforceId({
|
|
52
58
|
char: 'i',
|
|
53
59
|
description: messages.getMessage('flags.job-id.description'),
|
|
54
60
|
summary: messages.getMessage('flags.job-id.summary'),
|
|
55
61
|
exactlyOne: ['use-most-recent', 'job-id'],
|
|
56
62
|
});
|
|
57
|
-
|
|
63
|
+
export const useMostRecent = Flags.boolean({
|
|
58
64
|
char: 'r',
|
|
59
65
|
description: messages.getMessage('flags.use-most-recent.description'),
|
|
60
66
|
summary: messages.getMessage('flags.use-most-recent.summary'),
|
|
61
67
|
exactlyOne: ['use-most-recent', 'job-id'],
|
|
62
68
|
});
|
|
63
|
-
|
|
69
|
+
export const verbose = Flags.boolean({
|
|
64
70
|
summary: messages.getMessage('flags.verbose.summary'),
|
|
65
71
|
});
|
|
66
|
-
|
|
72
|
+
export const concise = Flags.boolean({
|
|
67
73
|
summary: messages.getMessage('flags.concise.summary'),
|
|
68
74
|
exclusive: ['verbose'],
|
|
69
75
|
});
|
|
@@ -71,11 +77,10 @@ exports.concise = sf_plugins_core_1.Flags.boolean({
|
|
|
71
77
|
* Helper to get the userneame or alias of the default Devops Center org
|
|
72
78
|
* from the target-devops-center config variable.
|
|
73
79
|
*/
|
|
74
|
-
const getDefaultDevopsCenterUsernameAlias = async () => {
|
|
75
|
-
const config = await
|
|
76
|
-
return config.getInfo(
|
|
80
|
+
export const getDefaultDevopsCenterUsernameAlias = async () => {
|
|
81
|
+
const config = await ConfigAggregator.create({ customConfigMeta: ConfigMeta });
|
|
82
|
+
return config.getInfo(ConfigVars.TARGET_DEVOPS_CENTER)?.value?.toString();
|
|
77
83
|
};
|
|
78
|
-
exports.getDefaultDevopsCenterUsernameAlias = getDefaultDevopsCenterUsernameAlias;
|
|
79
84
|
/**
|
|
80
85
|
*
|
|
81
86
|
* @param input alias/username of an org
|
|
@@ -83,11 +88,11 @@ exports.getDefaultDevopsCenterUsernameAlias = getDefaultDevopsCenterUsernameAlia
|
|
|
83
88
|
* or to the alias/username set in --target-devops-center config variable.
|
|
84
89
|
*/
|
|
85
90
|
const getOrgOrThrow = async (input) => {
|
|
86
|
-
const usernameOrAlias = input ? input : await
|
|
91
|
+
const usernameOrAlias = input ? input : await getDefaultDevopsCenterUsernameAlias();
|
|
87
92
|
if (!usernameOrAlias) {
|
|
88
93
|
throw messages.createError('errors.NoDefaultDoceEnv');
|
|
89
94
|
}
|
|
90
|
-
const org = await
|
|
95
|
+
const org = await Org.create({ aliasOrUsername: usernameOrAlias });
|
|
91
96
|
return org;
|
|
92
97
|
};
|
|
93
98
|
//# sourceMappingURL=flags.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flags.js","sourceRoot":"","sources":["../../../src/common/flags/flags.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"flags.js","sourceRoot":"","sources":["../../../src/common/flags/flags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,UAAU,EAAE,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE7D,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,aAAa,CAAC,CAAC;AAE1F,MAAM,CAAC,MAAM,uBAAuB,GAAuB,KAAK,CAAC,MAAM,CAAC;IACtE,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,0CAA0C,CAAC;IACxE,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,IAAI,GAAyB,KAAK,CAAC,QAAQ,CAAC;IACvD,IAAI,EAAE,SAAS;I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1
|
+
import { BooleanFlag, OptionFlag } from '@oclif/core/interfaces';
|
|
2
|
+
import { TestLevel } from '../../index.js';
|
|
3
3
|
export declare const branchName: OptionFlag<string>;
|
|
4
4
|
/**
|
|
5
5
|
* Custom flag for the test level.
|
|
6
6
|
* Validates that the passed in value is a valid test level.
|
|
7
7
|
*/
|
|
8
|
-
export declare const testLevel: import("@oclif/core/
|
|
8
|
+
export declare const testLevel: import("@oclif/core/interfaces").FlagDefinition<TestLevel, import("@oclif/core/interfaces").CustomOptions, {
|
|
9
9
|
multiple: false;
|
|
10
10
|
requiredOrDefaulted: false;
|
|
11
11
|
}>;
|
|
@@ -1,19 +1,25 @@
|
|
|
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
|
-
const
|
|
14
|
-
|
|
15
|
-
const messages = core_1.Messages.loadMessages('@salesforce/plugin-devops-center', 'promoteFlags');
|
|
16
|
-
exports.branchName = sf_plugins_core_1.Flags.string({
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { Flags } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { Flags as OclifFlags } from '@oclif/core';
|
|
19
|
+
import { TestLevel } from '../../index.js';
|
|
20
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
21
|
+
const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'promoteFlags');
|
|
22
|
+
export const branchName = Flags.string({
|
|
17
23
|
char: 'b',
|
|
18
24
|
summary: messages.getMessage('promote.branch-name.summary'),
|
|
19
25
|
required: true,
|
|
@@ -22,30 +28,30 @@ exports.branchName = sf_plugins_core_1.Flags.string({
|
|
|
22
28
|
* Custom flag for the test level.
|
|
23
29
|
* Validates that the passed in value is a valid test level.
|
|
24
30
|
*/
|
|
25
|
-
|
|
31
|
+
export const testLevel = OclifFlags.custom({
|
|
26
32
|
char: 'l',
|
|
27
33
|
parse: (input) => Promise.resolve(input),
|
|
28
|
-
options: Object.values(
|
|
34
|
+
options: Object.values(TestLevel),
|
|
29
35
|
description: messages.getMessage('promote.test-level.description'),
|
|
30
36
|
summary: messages.getMessage('promote.test-level.summary'),
|
|
31
37
|
});
|
|
32
|
-
|
|
38
|
+
export const specificTests = Flags.string({
|
|
33
39
|
char: 't',
|
|
34
40
|
multiple: true,
|
|
35
41
|
description: messages.getMessage('promote.tests.description'),
|
|
36
42
|
summary: messages.getMessage('promote.tests.summary'),
|
|
37
43
|
});
|
|
38
|
-
|
|
44
|
+
export const deployAll = Flags.boolean({
|
|
39
45
|
char: 'a',
|
|
40
46
|
description: messages.getMessage('promote.deploy-all.description'),
|
|
41
47
|
summary: messages.getMessage('promote.deploy-all.summary'),
|
|
42
48
|
});
|
|
43
|
-
|
|
49
|
+
export const bundleVersionName = Flags.string({
|
|
44
50
|
char: 'v',
|
|
45
51
|
summary: messages.getMessage('promote.bundle-version-name.summary'),
|
|
46
52
|
description: messages.getMessage('promote.bundle-version-name.description'),
|
|
47
53
|
});
|
|
48
|
-
|
|
54
|
+
export const async = Flags.boolean({
|
|
49
55
|
description: messages.getMessage('promote.async.description'),
|
|
50
56
|
summary: messages.getMessage('promote.async.summary'),
|
|
51
57
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promoteFlags.js","sourceRoot":"","sources":["../../../../src/common/flags/promote/promoteFlags.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"promoteFlags.js","sourceRoot":"","sources":["../../../../src/common/flags/promote/promoteFlags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,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,MAAM,CAAC,MAAM,UAAU,GAAuB,KAAK,CAAC,MAAM,CAAC;IACzD,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC;IAC3D,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAY;IACpD,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,KAAkB,CAAC;IACrD,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;IACjC,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,gCAAgC,CAAC;IAClE,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC;CAC3D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAqC,KAAK,CAAC,MAAM,CAAC;IAC1E,IAAI,EAAE,GAAG;IACT,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;IAC7D,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;CACtD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAAyB,KAAK,CAAC,OAAO,CAAC;IAC3D,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,gCAAgC,CAAC;IAClE,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC;CAC3D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAmC,KAAK,CAAC,MAAM,CAAC;IAC5E,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,qCAAqC,CAAC;IACnE,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,yCAAyC,CAAC;CAC5E,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,KAAK,GAAyB,KAAK,CAAC,OAAO,CAAC;IACvD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;IAC7D,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;CACtD,CAAC,CAAC"}
|
package/lib/common/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { ApiError, ApiPromoteResponse, AsyncOperationResult, AsyncOperationResultJson,
|
|
2
|
-
export {
|
|
1
|
+
export type { ApiError, ApiPromoteResponse, AsyncOperationResult, AsyncOperationResultJson, DeploymentResult, PipelineStage, PromoteOptions, PromotePipelineResult, DeployComponent, } from './types.js';
|
|
2
|
+
export { AsyncOperationStatus, TestLevel } from './types.js';
|
|
3
|
+
export { fetchAndValidatePipelineStage, fetchAsyncOperationResult, getAsyncOperationStreamer, validateTestFlags, } from './utils.js';
|
package/lib/common/index.js
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.validateTestFlags = exports.getAsyncOperationStreamer = exports.fetchAsyncOperationResult = exports.fetchAndValidatePipelineStage = exports.TestLevel = exports.AsyncOperationStatus = void 0;
|
|
4
|
-
/*
|
|
5
|
-
* Copyright (c) 2022, salesforce.com, inc.
|
|
6
|
-
* All rights reserved.
|
|
7
|
-
* Licensed under the BSD 3-Clause license.
|
|
8
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
-
*/
|
|
10
|
-
var types_1 = require("./types");
|
|
11
|
-
Object.defineProperty(exports, "AsyncOperationStatus", { enumerable: true, get: function () { return types_1.AsyncOperationStatus; } });
|
|
12
|
-
Object.defineProperty(exports, "TestLevel", { enumerable: true, get: function () { return types_1.TestLevel; } });
|
|
13
|
-
var utils_1 = require("./utils");
|
|
14
|
-
Object.defineProperty(exports, "fetchAndValidatePipelineStage", { enumerable: true, get: function () { return utils_1.fetchAndValidatePipelineStage; } });
|
|
15
|
-
Object.defineProperty(exports, "fetchAsyncOperationResult", { enumerable: true, get: function () { return utils_1.fetchAsyncOperationResult; } });
|
|
16
|
-
Object.defineProperty(exports, "getAsyncOperationStreamer", { enumerable: true, get: function () { return utils_1.getAsyncOperationStreamer; } });
|
|
17
|
-
Object.defineProperty(exports, "validateTestFlags", { enumerable: true, get: function () { return utils_1.validateTestFlags; } });
|
|
1
|
+
export { AsyncOperationStatus, TestLevel } from './types.js';
|
|
2
|
+
export { fetchAndValidatePipelineStage, fetchAsyncOperationResult, getAsyncOperationStreamer, validateTestFlags, } from './utils.js';
|
|
18
3
|
//# sourceMappingURL=index.js.map
|
package/lib/common/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,yBAAyB,EACzB,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
|
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
export declare const DeployComponentsTable: {
|
|
2
2
|
columns: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Name: {
|
|
7
|
-
header: string;
|
|
8
|
-
};
|
|
9
|
-
Type: {
|
|
10
|
-
header: string;
|
|
11
|
-
};
|
|
12
|
-
sf_devops__File_Path__c: {
|
|
13
|
-
header: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
3
|
+
key: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}[];
|
|
16
6
|
title: string;
|
|
17
7
|
validateDeployTitle: string;
|
|
18
8
|
};
|
|
@@ -1,24 +1,28 @@
|
|
|
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
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Type: { header: tableElements.getMessage('deployComponent.type.column') },
|
|
19
|
-
// eslint-disable-next-line camelcase
|
|
20
|
-
sf_devops__File_Path__c: { header: tableElements.getMessage('deployComponent.path.column') },
|
|
21
|
-
},
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
18
|
+
const tableElements = Messages.loadMessages('@salesforce/plugin-devops-center', 'project.deploy.pipeline.start');
|
|
19
|
+
export const DeployComponentsTable = {
|
|
20
|
+
columns: [
|
|
21
|
+
{ key: 'sf_devops__Operation__c', name: tableElements.getMessage('deployComponent.operation.column') },
|
|
22
|
+
{ key: 'Name', name: tableElements.getMessage('deployComponent.name.column') },
|
|
23
|
+
{ key: 'Type', name: tableElements.getMessage('deployComponent.type.column') },
|
|
24
|
+
{ key: 'sf_devops__File_Path__c', name: tableElements.getMessage('deployComponent.path.column') },
|
|
25
|
+
],
|
|
22
26
|
title: tableElements.getMessage('deployComponent.table.title'),
|
|
23
27
|
validateDeployTitle: tableElements.getMessage('deployComponent.table.validateDeployTitle'),
|
|
24
28
|
};
|