@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
|
@@ -0,0 +1,72 @@
|
|
|
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 { Messages } from '@salesforce/core';
|
|
17
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { fetchWorkItems } from '../../../utils/workItems.js';
|
|
19
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
|
+
const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'devops.work-item.list');
|
|
21
|
+
const commonErrorMessages = Messages.loadMessages('@salesforce/plugin-devops-center', 'commonErrors');
|
|
22
|
+
export default class DevopsWorkItemList extends SfCommand {
|
|
23
|
+
static summary = messages.getMessage('summary');
|
|
24
|
+
static description = messages.getMessage('description');
|
|
25
|
+
static examples = messages.getMessages('examples');
|
|
26
|
+
static flags = {
|
|
27
|
+
'target-org': Flags.requiredOrg(),
|
|
28
|
+
'api-version': Flags.orgApiVersion(),
|
|
29
|
+
'project-id': Flags.salesforceId({
|
|
30
|
+
summary: messages.getMessage('flags.project-id.summary'),
|
|
31
|
+
char: 'p',
|
|
32
|
+
required: true,
|
|
33
|
+
startsWith: '1Qg',
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
async run() {
|
|
37
|
+
const { flags } = await this.parse(DevopsWorkItemList);
|
|
38
|
+
const org = flags['target-org'];
|
|
39
|
+
const projectId = flags['project-id'];
|
|
40
|
+
const connection = org.getConnection(flags['api-version']);
|
|
41
|
+
let workItems;
|
|
42
|
+
try {
|
|
43
|
+
workItems = await fetchWorkItems(connection, projectId);
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
const errMsg = error instanceof Error ? error.message : String(error);
|
|
47
|
+
if (errMsg.includes('sObject type') && errMsg.includes('is not supported')) {
|
|
48
|
+
this.error(commonErrorMessages.getMessage('error.DevopsCenterNotEnabled'));
|
|
49
|
+
}
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
if (workItems.length === 0) {
|
|
53
|
+
this.log('No work items found for this project.');
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
const tableData = workItems.map((wi) => ({
|
|
57
|
+
Name: wi.name,
|
|
58
|
+
Subject: wi.subject ?? '',
|
|
59
|
+
Status: wi.status,
|
|
60
|
+
Branch: wi.WorkItemBranch ?? '',
|
|
61
|
+
'Target Branch': wi.TargetBranch ?? '',
|
|
62
|
+
}));
|
|
63
|
+
this.styledHeader('DevOps Center Work Items');
|
|
64
|
+
this.table({
|
|
65
|
+
data: tableData,
|
|
66
|
+
columns: ['Name', 'Subject', 'Status', 'Branch', 'Target Branch'],
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return { workItems };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//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,CAAC,0BAA0B,CAAC,CAAC;YAC9C,IAAI,CAAC,KAAK,CAAC;gBACT,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,CAAC;aAClE,CAAC,CAAC;QACL,CAAC;QAED,OAAO,EAAE,SAAS,EAAE,CAAC;IACvB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Org } from '@salesforce/core';
|
|
2
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
3
|
+
import { UpdateWorkItemStatusResult } from '../../../../utils/updateWorkItemStatus.js';
|
|
4
|
+
export default class DevopsWorkItemStatusUpdate extends SfCommand<UpdateWorkItemStatusResult> {
|
|
5
|
+
static readonly summary: string;
|
|
6
|
+
static readonly description: string;
|
|
7
|
+
static readonly examples: string[];
|
|
8
|
+
static readonly flags: {
|
|
9
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'work-item-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'work-item-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
status: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<UpdateWorkItemStatusResult>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
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 { Messages } from '@salesforce/core';
|
|
17
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { resolveWorkItemByName, resolveProjectIdForWorkItem, updateWorkItemStatus, ALLOWED_STATUSES, } from '../../../../utils/updateWorkItemStatus.js';
|
|
19
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
|
+
const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'devops.work-item.status.update');
|
|
21
|
+
const commonErrorMessages = Messages.loadMessages('@salesforce/plugin-devops-center', 'commonErrors');
|
|
22
|
+
export default class DevopsWorkItemStatusUpdate extends SfCommand {
|
|
23
|
+
static summary = messages.getMessage('summary');
|
|
24
|
+
static description = messages.getMessage('description');
|
|
25
|
+
static examples = messages.getMessages('examples');
|
|
26
|
+
static flags = {
|
|
27
|
+
'target-org': Flags.requiredOrg(),
|
|
28
|
+
'api-version': Flags.orgApiVersion(),
|
|
29
|
+
'work-item-name': Flags.string({
|
|
30
|
+
summary: messages.getMessage('flags.work-item-name.summary'),
|
|
31
|
+
char: 'n',
|
|
32
|
+
exactlyOne: ['work-item-name', 'work-item-id'],
|
|
33
|
+
}),
|
|
34
|
+
'work-item-id': Flags.salesforceId({
|
|
35
|
+
summary: messages.getMessage('flags.work-item-id.summary'),
|
|
36
|
+
char: 'w',
|
|
37
|
+
exactlyOne: ['work-item-name', 'work-item-id'],
|
|
38
|
+
}),
|
|
39
|
+
status: Flags.string({
|
|
40
|
+
summary: messages.getMessage('flags.status.summary'),
|
|
41
|
+
required: true,
|
|
42
|
+
options: [...ALLOWED_STATUSES],
|
|
43
|
+
}),
|
|
44
|
+
};
|
|
45
|
+
async run() {
|
|
46
|
+
const { flags } = await this.parse(DevopsWorkItemStatusUpdate);
|
|
47
|
+
const org = flags['target-org'];
|
|
48
|
+
const connection = org.getConnection(flags['api-version']);
|
|
49
|
+
let workItemId;
|
|
50
|
+
let projectId;
|
|
51
|
+
try {
|
|
52
|
+
if (flags['work-item-name']) {
|
|
53
|
+
const ctx = await resolveWorkItemByName(connection, flags['work-item-name']);
|
|
54
|
+
workItemId = ctx.workItemId;
|
|
55
|
+
projectId = ctx.projectId;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
workItemId = flags['work-item-id'];
|
|
59
|
+
projectId = await resolveProjectIdForWorkItem(connection, workItemId);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
const errMsg = error instanceof Error ? error.message : String(error);
|
|
64
|
+
if (errMsg.includes('sObject type') && errMsg.includes('is not supported')) {
|
|
65
|
+
this.error(commonErrorMessages.getMessage('error.DevopsCenterNotEnabled'));
|
|
66
|
+
}
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
let result;
|
|
70
|
+
try {
|
|
71
|
+
result = await updateWorkItemStatus({ connection, workItemId, projectId, status: flags['status'] });
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
const errMsg = error instanceof Error ? error.message : String(error);
|
|
75
|
+
if (errMsg.includes('sObject type') && errMsg.includes('is not supported')) {
|
|
76
|
+
this.error(commonErrorMessages.getMessage('error.DevopsCenterNotEnabled'));
|
|
77
|
+
}
|
|
78
|
+
throw error;
|
|
79
|
+
}
|
|
80
|
+
if (result.success) {
|
|
81
|
+
const identifier = flags['work-item-name'] ?? result.workItemId;
|
|
82
|
+
this.log(`Successfully updated status for work item ${identifier} to "${result.status ?? flags['status']}".`);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
this.error(`Failed to update work item status: ${result.error ?? ''}`);
|
|
86
|
+
}
|
|
87
|
+
return result;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../../src/commands/devops/work-item/status/update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAO,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,EAEpB,gBAAgB,GACjB,MAAM,2CAA2C,CAAC;AAEnD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,gCAAgC,CAAC,CAAC;AAC7G,MAAM,mBAAmB,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,cAAc,CAAC,CAAC;AAEtG,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,SAAqC;IACpF,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE5D,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE;QACjC,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE;QACpC,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC;YAC7B,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,8BAA8B,CAAC;YAC5D,IAAI,EAAE,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KAAK,IAAI,EAAE,EAAE,CAAC,CAAC;QACzE,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import QuickPromotionCommand from '../../../../common/base/abstractQuick';
|
|
3
|
-
import { AsyncOperationResultJson, PromoteOptions } from '../../../../common';
|
|
2
|
+
import QuickPromotionCommand from '../../../../common/base/abstractQuick.js';
|
|
3
|
+
import type { AsyncOperationResultJson, PromoteOptions } from '../../../../common/index.js';
|
|
4
4
|
export default class DeployPipelineQuick extends QuickPromotionCommand<typeof SfCommand> {
|
|
5
5
|
static readonly description: string;
|
|
6
6
|
static readonly summary: string;
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
/*
|
|
4
|
-
* Copyright
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the
|
|
7
|
-
*
|
|
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.
|
|
8
15
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const messages =
|
|
13
|
-
class DeployPipelineQuick extends
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import QuickPromotionCommand from '../../../../common/base/abstractQuick.js';
|
|
18
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
19
|
+
const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'project.deploy.pipeline.quick');
|
|
20
|
+
export default class DeployPipelineQuick extends QuickPromotionCommand {
|
|
21
|
+
static description = messages.getMessage('description');
|
|
22
|
+
static summary = messages.getMessage('summary');
|
|
23
|
+
static examples = messages.getMessages('examples');
|
|
24
|
+
static state = 'beta';
|
|
25
|
+
baseCommand = 'project deploy pipeline';
|
|
26
|
+
isUndeployedOnly = true;
|
|
19
27
|
async run() {
|
|
20
28
|
return this.executeQuickPromotion();
|
|
21
29
|
}
|
|
@@ -37,9 +45,4 @@ class DeployPipelineQuick extends abstractQuick_1.default {
|
|
|
37
45
|
return { undeployedOnly: this.isUndeployedOnly };
|
|
38
46
|
}
|
|
39
47
|
}
|
|
40
|
-
DeployPipelineQuick.description = messages.getMessage('description');
|
|
41
|
-
DeployPipelineQuick.summary = messages.getMessage('summary');
|
|
42
|
-
DeployPipelineQuick.examples = messages.getMessages('examples');
|
|
43
|
-
DeployPipelineQuick.state = 'beta';
|
|
44
|
-
exports.default = DeployPipelineQuick;
|
|
45
48
|
//# sourceMappingURL=quick.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quick.js","sourceRoot":"","sources":["../../../../../src/commands/project/deploy/pipeline/quick.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"quick.js","sourceRoot":"","sources":["../../../../../src/commands/project/deploy/pipeline/quick.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,qBAAqB,MAAM,0CAA0C,CAAC;AAI7E,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,OAAO,mBAAoB,SAAQ,qBAAuC;IAC/E,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,KAAK,GAAG,MAAM,CAAC;IAE5B,WAAW,GAAG,yBAAyB,CAAC;IACjC,gBAAgB,GAAG,IAAI,CAAC;IAElC,KAAK,CAAC,GAAG;QACd,OAAO,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACtC,CAAC;IAED;;;;;OAKG;IACO,gBAAgB;QACxB,2DAA2D;QAC3D,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,6BAAuD,CAAC;QACjG,OAAO,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAClC,CAAC;IAED;;OAEG;IACO,iBAAiB;QACzB,OAAO,EAAE,cAAc,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC;IACnD,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { PromotePipelineResult } from '../../../../common';
|
|
3
|
-
import { ReportOnPromoteCommand } from '../../../../common/base/abstractReportOnPromote';
|
|
2
|
+
import type { PromotePipelineResult } from '../../../../common/index.js';
|
|
3
|
+
import { ReportOnPromoteCommand } from '../../../../common/base/abstractReportOnPromote.js';
|
|
4
4
|
export default class DeployPipelineReport extends ReportOnPromoteCommand<typeof SfCommand> {
|
|
5
5
|
static readonly description: string;
|
|
6
6
|
static readonly summary: string;
|
|
7
7
|
static readonly examples: string[];
|
|
8
8
|
static readonly state = "beta";
|
|
9
9
|
static flags: {
|
|
10
|
-
'job-id': import("@oclif/core/
|
|
11
|
-
'use-most-recent': import("@oclif/core/
|
|
10
|
+
'job-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'use-most-recent': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
12
|
};
|
|
13
13
|
protected operationName: string;
|
|
14
14
|
run(): Promise<PromotePipelineResult>;
|
|
@@ -1,42 +1,45 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
/*
|
|
4
|
-
* Copyright
|
|
5
|
-
*
|
|
6
|
-
* Licensed under the
|
|
7
|
-
*
|
|
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.
|
|
8
15
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const messages =
|
|
14
|
-
class DeployPipelineReport extends
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { Flags } from '@salesforce/sf-plugins-core';
|
|
18
|
+
import { ReportOnPromoteCommand } from '../../../../common/base/abstractReportOnPromote.js';
|
|
19
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
|
+
const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'project.deploy.pipeline.report');
|
|
21
|
+
export default class DeployPipelineReport extends ReportOnPromoteCommand {
|
|
22
|
+
static description = messages.getMessage('description');
|
|
23
|
+
static summary = messages.getMessage('summary');
|
|
24
|
+
static examples = messages.getMessages('examples');
|
|
25
|
+
static state = 'beta';
|
|
26
|
+
static flags = {
|
|
27
|
+
'job-id': Flags.salesforceId({
|
|
28
|
+
char: 'i',
|
|
29
|
+
description: messages.getMessage('flags.job-id.description'),
|
|
30
|
+
summary: messages.getMessage('flags.job-id.summary'),
|
|
31
|
+
exactlyOne: ['use-most-recent', 'job-id'],
|
|
32
|
+
}),
|
|
33
|
+
'use-most-recent': Flags.boolean({
|
|
34
|
+
char: 'r',
|
|
35
|
+
description: messages.getMessage('flags.use-most-recent.description'),
|
|
36
|
+
summary: messages.getMessage('flags.use-most-recent.summary'),
|
|
37
|
+
exactlyOne: ['use-most-recent', 'job-id'],
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
operationName = 'Deploy';
|
|
19
41
|
async run() {
|
|
20
42
|
return this.getOperationReport();
|
|
21
43
|
}
|
|
22
44
|
}
|
|
23
|
-
DeployPipelineReport.description = messages.getMessage('description');
|
|
24
|
-
DeployPipelineReport.summary = messages.getMessage('summary');
|
|
25
|
-
DeployPipelineReport.examples = messages.getMessages('examples');
|
|
26
|
-
DeployPipelineReport.state = 'beta';
|
|
27
|
-
DeployPipelineReport.flags = {
|
|
28
|
-
'job-id': sf_plugins_core_1.Flags.salesforceId({
|
|
29
|
-
char: 'i',
|
|
30
|
-
description: messages.getMessage('flags.job-id.description'),
|
|
31
|
-
summary: messages.getMessage('flags.job-id.summary'),
|
|
32
|
-
exactlyOne: ['use-most-recent', 'job-id'],
|
|
33
|
-
}),
|
|
34
|
-
'use-most-recent': sf_plugins_core_1.Flags.boolean({
|
|
35
|
-
char: 'r',
|
|
36
|
-
description: messages.getMessage('flags.use-most-recent.description'),
|
|
37
|
-
summary: messages.getMessage('flags.use-most-recent.summary'),
|
|
38
|
-
exactlyOne: ['use-most-recent', 'job-id'],
|
|
39
|
-
}),
|
|
40
|
-
};
|
|
41
|
-
exports.default = DeployPipelineReport;
|
|
42
45
|
//# sourceMappingURL=report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../../../src/commands/project/deploy/pipeline/report.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../../../src/commands/project/deploy/pipeline/report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAa,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAE5F,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,gCAAgC,CAAC,CAAC;AAE7G,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,sBAAwC;IACjF,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,KAAK,GAAG,MAAM,CAAC;IAC/B,MAAM,CAAC,KAAK,GAAG;QACpB,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;YAC3B,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;YAC5D,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;YACpD,UAAU,EAAE,CAAC,iBAAiB,EAAE,QAAQ,CAAC;SAC1C,CAAC;QACF,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC;YAC/B,IAAI,EAAE,GAAG;YACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,mCAAmC,CAAC;YACrE,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC;YAC7D,UAAU,EAAE,CAAC,iBAAiB,EAAE,QAAQ,CAAC;SAC1C,CAAC;KACH,CAAC;IACQ,aAAa,GAAG,QAAQ,CAAC;IAE5B,KAAK,CAAC,GAAG;QACd,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC;IACnC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { AsyncOperationResultJson } from '../../../../common';
|
|
3
|
-
import { ResumeCommand } from '../../../../common/base/abstractResume';
|
|
2
|
+
import type { AsyncOperationResultJson } from '../../../../common/index.js';
|
|
3
|
+
import { ResumeCommand } from '../../../../common/base/abstractResume.js';
|
|
4
4
|
export default class DeployPipelineResume extends ResumeCommand<typeof SfCommand> {
|
|
5
5
|
static readonly summary: string;
|
|
6
6
|
static readonly description: string;
|
|
@@ -1,28 +1,31 @@
|
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { ResumeCommand } from '../../../../common/base/abstractResume.js';
|
|
18
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
19
|
+
const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'project.deploy.pipeline.resume');
|
|
20
|
+
export default class DeployPipelineResume extends ResumeCommand {
|
|
21
|
+
static summary = messages.getMessage('summary');
|
|
22
|
+
static description = messages.getMessage('description');
|
|
23
|
+
static examples = messages.getMessages('examples');
|
|
24
|
+
static state = 'beta';
|
|
25
|
+
operationType = 'Deployment';
|
|
26
|
+
baseCommand = 'project deploy pipeline';
|
|
19
27
|
async run() {
|
|
20
28
|
return this.resumeOperation();
|
|
21
29
|
}
|
|
22
30
|
}
|
|
23
|
-
DeployPipelineResume.summary = messages.getMessage('summary');
|
|
24
|
-
DeployPipelineResume.description = messages.getMessage('description');
|
|
25
|
-
DeployPipelineResume.examples = messages.getMessages('examples');
|
|
26
|
-
DeployPipelineResume.state = 'beta';
|
|
27
|
-
exports.default = DeployPipelineResume;
|
|
28
31
|
//# sourceMappingURL=resume.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../../../../../src/commands/project/deploy/pipeline/resume.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../../../../../src/commands/project/deploy/pipeline/resume.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAE1E,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,gCAAgC,CAAC,CAAC;AAE7G,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,aAA+B;IACxE,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,KAAK,GAAG,MAAM,CAAC;IAE5B,aAAa,GAAG,YAAY,CAAC;IAC7B,WAAW,GAAG,yBAAyB,CAAC;IAE3C,KAAK,CAAC,GAAG;QACd,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC;IAChC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { PromoteCommand } from '../../../../common/base/abstractPromote';
|
|
3
|
-
import { PromoteOptions } from '../../../../common';
|
|
4
|
-
import { AsyncOperationResultJson } from '../../../../common/types';
|
|
2
|
+
import { PromoteCommand } from '../../../../common/base/abstractPromote.js';
|
|
3
|
+
import type { PromoteOptions } from '../../../../common/index.js';
|
|
4
|
+
import type { AsyncOperationResultJson } from '../../../../common/types.js';
|
|
5
5
|
/**
|
|
6
6
|
* Contains the logic to execute the sf project deploy pipeline start command.
|
|
7
7
|
*/
|
|
@@ -1,25 +1,33 @@
|
|
|
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 messages = core_1.Messages.loadMessages('@salesforce/plugin-devops-center', 'project.deploy.pipeline.start');
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import { PromoteCommand } from '../../../../common/base/abstractPromote.js';
|
|
18
|
+
import { APPROVED } from '../../../../common/constants.js';
|
|
19
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
20
|
+
const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'project.deploy.pipeline.start');
|
|
14
21
|
/**
|
|
15
22
|
* Contains the logic to execute the sf project deploy pipeline start command.
|
|
16
23
|
*/
|
|
17
|
-
class DeployPipeline extends
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
export default class DeployPipeline extends PromoteCommand {
|
|
25
|
+
static summary = messages.getMessage('summary');
|
|
26
|
+
static description = messages.getMessage('description');
|
|
27
|
+
static examples = messages.getMessages('examples');
|
|
28
|
+
static state = 'beta';
|
|
29
|
+
baseCommand = 'project deploy pipeline';
|
|
30
|
+
isUndeployedOnly = true;
|
|
23
31
|
async run() {
|
|
24
32
|
return this.executePromotion();
|
|
25
33
|
}
|
|
@@ -34,7 +42,7 @@ class DeployPipeline extends abstractPromote_1.PromoteCommand {
|
|
|
34
42
|
const targetStage = this.getTargetStage();
|
|
35
43
|
return targetStage.sf_devops__Pipeline_Stages__r
|
|
36
44
|
? targetStage.sf_devops__Pipeline_Stages__r.records[0].Id
|
|
37
|
-
:
|
|
45
|
+
: APPROVED;
|
|
38
46
|
}
|
|
39
47
|
/**
|
|
40
48
|
* Returns the promote option necessary to performs an undeployed only promotion
|
|
@@ -43,9 +51,4 @@ class DeployPipeline extends abstractPromote_1.PromoteCommand {
|
|
|
43
51
|
return { undeployedOnly: this.isUndeployedOnly };
|
|
44
52
|
}
|
|
45
53
|
}
|
|
46
|
-
DeployPipeline.summary = messages.getMessage('summary');
|
|
47
|
-
DeployPipeline.description = messages.getMessage('description');
|
|
48
|
-
DeployPipeline.examples = messages.getMessages('examples');
|
|
49
|
-
DeployPipeline.state = 'beta';
|
|
50
|
-
exports.default = DeployPipeline;
|
|
51
54
|
//# sourceMappingURL=start.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../../../../src/commands/project/deploy/pipeline/start.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../../../../src/commands/project/deploy/pipeline/start.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG3D,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;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,cAAgC;IACnE,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,KAAK,GAAG,MAAM,CAAC;IAC5B,WAAW,GAAG,yBAAyB,CAAC;IACjC,gBAAgB,GAAG,IAAI,CAAC;IAElC,KAAK,CAAC,GAAG;QACd,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC;IACjC,CAAC;IAED;;;;;;OAMG;IACO,gBAAgB;QACxB,MAAM,WAAW,GAAkB,IAAI,CAAC,cAAc,EAAE,CAAC;QACzD,OAAO,WAAW,CAAC,6BAA6B;YAC9C,CAAC,CAAC,WAAW,CAAC,6BAA6B,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;YACzD,CAAC,CAAC,QAAQ,CAAC;IACf,CAAC;IAED;;OAEG;IACO,iBAAiB;QACzB,OAAO,EAAE,cAAc,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC;IACnD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PromoteOptions } from '../../../../common';
|
|
2
|
-
import { AsyncOperationResultJson } from '../../../../common/types';
|
|
3
|
-
import DeployPipeline from './start';
|
|
1
|
+
import type { PromoteOptions } from '../../../../common/index.js';
|
|
2
|
+
import type { AsyncOperationResultJson } from '../../../../common/types.js';
|
|
3
|
+
import DeployPipeline from './start.js';
|
|
4
4
|
/**
|
|
5
5
|
* Contains the logic to execute the sf project deploy pipeline validate command.
|
|
6
6
|
*/
|
|
@@ -1,24 +1,32 @@
|
|
|
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
|
-
const messages = core_1.Messages.loadMessages('@salesforce/plugin-devops-center', 'project.deploy.pipeline.validate');
|
|
16
|
+
import { Messages } from '@salesforce/core';
|
|
17
|
+
import DeployPipeline from './start.js';
|
|
18
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
19
|
+
const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'project.deploy.pipeline.validate');
|
|
13
20
|
/**
|
|
14
21
|
* Contains the logic to execute the sf project deploy pipeline validate command.
|
|
15
22
|
*/
|
|
16
|
-
class ValidateDeployPipeline extends
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
export default class ValidateDeployPipeline extends DeployPipeline {
|
|
24
|
+
static summary = messages.getMessage('summary');
|
|
25
|
+
static description = messages.getMessage('description');
|
|
26
|
+
static examples = messages.getMessages('examples');
|
|
27
|
+
static state = 'beta';
|
|
28
|
+
baseCommand = 'project deploy pipeline';
|
|
29
|
+
isCheckDeploy = true;
|
|
22
30
|
async run() {
|
|
23
31
|
return this.executePromotion();
|
|
24
32
|
}
|
|
@@ -29,9 +37,4 @@ class ValidateDeployPipeline extends start_1.default {
|
|
|
29
37
|
return { ...super.getPromoteOptions(), checkDeploy: this.isCheckDeploy };
|
|
30
38
|
}
|
|
31
39
|
}
|
|
32
|
-
ValidateDeployPipeline.summary = messages.getMessage('summary');
|
|
33
|
-
ValidateDeployPipeline.description = messages.getMessage('description');
|
|
34
|
-
ValidateDeployPipeline.examples = messages.getMessages('examples');
|
|
35
|
-
ValidateDeployPipeline.state = 'beta';
|
|
36
|
-
exports.default = ValidateDeployPipeline;
|
|
37
40
|
//# sourceMappingURL=validate.js.map
|