@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.
Files changed (241) hide show
  1. package/LICENSE.txt +200 -6
  2. package/README.md +515 -19
  3. package/bin/dev.js +15 -0
  4. package/bin/run.js +5 -0
  5. package/lib/commands/devops/pipeline/activate.d.ts +14 -0
  6. package/lib/commands/devops/pipeline/activate.js +82 -0
  7. package/lib/commands/devops/pipeline/activate.js.map +1 -0
  8. package/lib/commands/devops/pipeline/attach-project.d.ts +15 -0
  9. package/lib/commands/devops/pipeline/attach-project.js +82 -0
  10. package/lib/commands/devops/pipeline/attach-project.js.map +1 -0
  11. package/lib/commands/devops/pipeline/create.d.ts +23 -0
  12. package/lib/commands/devops/pipeline/create.js +136 -0
  13. package/lib/commands/devops/pipeline/create.js.map +1 -0
  14. package/lib/commands/devops/pipeline/stage/add.d.ts +16 -0
  15. package/lib/commands/devops/pipeline/stage/add.js +94 -0
  16. package/lib/commands/devops/pipeline/stage/add.js.map +1 -0
  17. package/lib/commands/devops/project/create.d.ts +15 -0
  18. package/lib/commands/devops/project/create.js +72 -0
  19. package/lib/commands/devops/project/create.js.map +1 -0
  20. package/lib/commands/devops/project/list.d.ts +20 -0
  21. package/lib/commands/devops/project/list.js +59 -0
  22. package/lib/commands/devops/project/list.js.map +1 -0
  23. package/lib/commands/devops/pull-request/create.d.ts +17 -0
  24. package/lib/commands/devops/pull-request/create.js +104 -0
  25. package/lib/commands/devops/pull-request/create.js.map +1 -0
  26. package/lib/commands/devops/stage/add-branch.d.ts +17 -0
  27. package/lib/commands/devops/stage/add-branch.js +110 -0
  28. package/lib/commands/devops/stage/add-branch.js.map +1 -0
  29. package/lib/commands/devops/stage/add-environment.d.ts +18 -0
  30. package/lib/commands/devops/stage/add-environment.js +136 -0
  31. package/lib/commands/devops/stage/add-environment.js.map +1 -0
  32. package/lib/commands/devops/work-item/create.d.ts +16 -0
  33. package/lib/commands/devops/work-item/create.js +76 -0
  34. package/lib/commands/devops/work-item/create.js.map +1 -0
  35. package/lib/commands/devops/work-item/list.d.ts +17 -0
  36. package/lib/commands/devops/work-item/list.js +72 -0
  37. package/lib/commands/devops/work-item/list.js.map +1 -0
  38. package/lib/commands/devops/work-item/status/update.d.ts +16 -0
  39. package/lib/commands/devops/work-item/status/update.js +90 -0
  40. package/lib/commands/devops/work-item/status/update.js.map +1 -0
  41. package/lib/commands/project/deploy/pipeline/quick.d.ts +2 -2
  42. package/lib/commands/project/deploy/pipeline/quick.js +24 -21
  43. package/lib/commands/project/deploy/pipeline/quick.js.map +1 -1
  44. package/lib/commands/project/deploy/pipeline/report.d.ts +4 -4
  45. package/lib/commands/project/deploy/pipeline/report.js +38 -35
  46. package/lib/commands/project/deploy/pipeline/report.js.map +1 -1
  47. package/lib/commands/project/deploy/pipeline/resume.d.ts +2 -2
  48. package/lib/commands/project/deploy/pipeline/resume.js +24 -21
  49. package/lib/commands/project/deploy/pipeline/resume.js.map +1 -1
  50. package/lib/commands/project/deploy/pipeline/start.d.ts +3 -3
  51. package/lib/commands/project/deploy/pipeline/start.js +26 -23
  52. package/lib/commands/project/deploy/pipeline/start.js.map +1 -1
  53. package/lib/commands/project/deploy/pipeline/validate.d.ts +3 -3
  54. package/lib/commands/project/deploy/pipeline/validate.js +24 -21
  55. package/lib/commands/project/deploy/pipeline/validate.js.map +1 -1
  56. package/lib/common/base/abstractAsyncOperation.d.ts +3 -3
  57. package/lib/common/base/abstractAsyncOperation.js +31 -23
  58. package/lib/common/base/abstractAsyncOperation.js.map +1 -1
  59. package/lib/common/base/abstractPromote.d.ts +5 -4
  60. package/lib/common/base/abstractPromote.js +52 -38
  61. package/lib/common/base/abstractPromote.js.map +1 -1
  62. package/lib/common/base/abstractQuick.d.ts +4 -3
  63. package/lib/common/base/abstractQuick.js +44 -43
  64. package/lib/common/base/abstractQuick.js.map +1 -1
  65. package/lib/common/base/abstractReportOnPromote.d.ts +2 -1
  66. package/lib/common/base/abstractReportOnPromote.js +31 -24
  67. package/lib/common/base/abstractReportOnPromote.js.map +1 -1
  68. package/lib/common/base/abstractResume.d.ts +3 -2
  69. package/lib/common/base/abstractResume.js +40 -33
  70. package/lib/common/base/abstractResume.js.map +1 -1
  71. package/lib/common/constants.js +19 -13
  72. package/lib/common/constants.js.map +1 -1
  73. package/lib/common/deployPipelineCache.js +20 -15
  74. package/lib/common/deployPipelineCache.js.map +1 -1
  75. package/lib/common/flags/flags.d.ts +2 -2
  76. package/lib/common/flags/flags.js +34 -29
  77. package/lib/common/flags/flags.js.map +1 -1
  78. package/lib/common/flags/promote/promoteFlags.d.ts +3 -3
  79. package/lib/common/flags/promote/promoteFlags.js +26 -20
  80. package/lib/common/flags/promote/promoteFlags.js.map +1 -1
  81. package/lib/common/index.d.ts +3 -2
  82. package/lib/common/index.js +2 -17
  83. package/lib/common/index.js.map +1 -1
  84. package/lib/common/outputColumns.d.ts +3 -13
  85. package/lib/common/outputColumns.js +23 -19
  86. package/lib/common/outputColumns.js.map +1 -1
  87. package/lib/common/outputService/aorOutputService.d.ts +4 -4
  88. package/lib/common/outputService/aorOutputService.js +27 -20
  89. package/lib/common/outputService/aorOutputService.js.map +1 -1
  90. package/lib/common/outputService/deployCommandOutputService.d.ts +2 -2
  91. package/lib/common/outputService/deployCommandOutputService.js +17 -12
  92. package/lib/common/outputService/deployCommandOutputService.js.map +1 -1
  93. package/lib/common/outputService/deploySummaryBuilder.d.ts +1 -1
  94. package/lib/common/outputService/deploySummaryBuilder.js +45 -31
  95. package/lib/common/outputService/deploySummaryBuilder.js.map +1 -1
  96. package/lib/common/outputService/deploymentResultOutputService.d.ts +4 -4
  97. package/lib/common/outputService/deploymentResultOutputService.js +16 -10
  98. package/lib/common/outputService/deploymentResultOutputService.js.map +1 -1
  99. package/lib/common/outputService/index.d.ts +8 -6
  100. package/lib/common/outputService/index.js +5 -19
  101. package/lib/common/outputService/index.js.map +1 -1
  102. package/lib/common/outputService/outputService.d.ts +6 -4
  103. package/lib/common/outputService/outputService.js +20 -14
  104. package/lib/common/outputService/outputService.js.map +1 -1
  105. package/lib/common/outputService/outputServiceFactory.d.ts +8 -8
  106. package/lib/common/outputService/outputServiceFactory.js +21 -16
  107. package/lib/common/outputService/outputServiceFactory.js.map +1 -1
  108. package/lib/common/outputService/outputUtils.d.ts +1 -1
  109. package/lib/common/outputService/outputUtils.js +24 -19
  110. package/lib/common/outputService/outputUtils.js.map +1 -1
  111. package/lib/common/outputService/promoteOutputService.d.ts +4 -5
  112. package/lib/common/outputService/promoteOutputService.js +19 -13
  113. package/lib/common/outputService/promoteOutputService.js.map +1 -1
  114. package/lib/common/outputService/reportOutputService.d.ts +5 -6
  115. package/lib/common/outputService/reportOutputService.js +32 -27
  116. package/lib/common/outputService/reportOutputService.js.map +1 -1
  117. package/lib/common/outputService/resumeCommandOutputService.d.ts +3 -3
  118. package/lib/common/outputService/resumeCommandOutputService.js +19 -13
  119. package/lib/common/outputService/resumeCommandOutputService.js.map +1 -1
  120. package/lib/common/outputService/resumeOutputService.d.ts +3 -3
  121. package/lib/common/outputService/resumeOutputService.js +23 -17
  122. package/lib/common/outputService/resumeOutputService.js.map +1 -1
  123. package/lib/common/selectors/asyncOperationResultsSelector.d.ts +1 -1
  124. package/lib/common/selectors/asyncOperationResultsSelector.js +16 -10
  125. package/lib/common/selectors/asyncOperationResultsSelector.js.map +1 -1
  126. package/lib/common/selectors/deployComponentsSelector.d.ts +1 -1
  127. package/lib/common/selectors/deployComponentsSelector.js +18 -13
  128. package/lib/common/selectors/deployComponentsSelector.js.map +1 -1
  129. package/lib/common/selectors/deployProgressSummarySelector.d.ts +2 -2
  130. package/lib/common/selectors/deployProgressSummarySelector.js +16 -10
  131. package/lib/common/selectors/deployProgressSummarySelector.js.map +1 -1
  132. package/lib/common/selectors/deploymentResultsSelector.d.ts +2 -2
  133. package/lib/common/selectors/deploymentResultsSelector.js +20 -16
  134. package/lib/common/selectors/deploymentResultsSelector.js.map +1 -1
  135. package/lib/common/selectors/environmentSelector.d.ts +2 -2
  136. package/lib/common/selectors/environmentSelector.js +16 -10
  137. package/lib/common/selectors/environmentSelector.js.map +1 -1
  138. package/lib/common/selectors/namedCredentialSelector.d.ts +1 -1
  139. package/lib/common/selectors/namedCredentialSelector.js +16 -10
  140. package/lib/common/selectors/namedCredentialSelector.js.map +1 -1
  141. package/lib/common/selectors/pipelineStageSelector.d.ts +1 -1
  142. package/lib/common/selectors/pipelineStageSelector.js +18 -13
  143. package/lib/common/selectors/pipelineStageSelector.js.map +1 -1
  144. package/lib/common/selectors/selectorUtils.d.ts +1 -1
  145. package/lib/common/selectors/selectorUtils.js +17 -11
  146. package/lib/common/selectors/selectorUtils.js.map +1 -1
  147. package/lib/common/selectors/validateDeploySelector.d.ts +1 -1
  148. package/lib/common/selectors/validateDeploySelector.js +16 -10
  149. package/lib/common/selectors/validateDeploySelector.js.map +1 -1
  150. package/lib/common/selectors/workItemSelector.d.ts +2 -2
  151. package/lib/common/selectors/workItemSelector.js +16 -10
  152. package/lib/common/selectors/workItemSelector.js.map +1 -1
  153. package/lib/common/types.d.ts +4 -4
  154. package/lib/common/types.js +4 -7
  155. package/lib/common/types.js.map +1 -1
  156. package/lib/common/utils.d.ts +4 -4
  157. package/lib/common/utils.js +42 -43
  158. package/lib/common/utils.js.map +1 -1
  159. package/lib/configMeta.js +21 -15
  160. package/lib/configMeta.js.map +1 -1
  161. package/lib/streamer/doceMonitor.d.ts +3 -2
  162. package/lib/streamer/doceMonitor.js +14 -6
  163. package/lib/streamer/doceMonitor.js.map +1 -1
  164. package/lib/streamer/doceStream.d.ts +1 -1
  165. package/lib/streamer/doceStream.js +19 -11
  166. package/lib/streamer/doceStream.js.map +1 -1
  167. package/lib/streamer/processors/asyncOpStream.d.ts +2 -2
  168. package/lib/streamer/processors/asyncOpStream.js +22 -15
  169. package/lib/streamer/processors/asyncOpStream.js.map +1 -1
  170. package/lib/streamer/sObjectStream.d.ts +1 -1
  171. package/lib/streamer/sObjectStream.js +9 -10
  172. package/lib/streamer/sObjectStream.js.map +1 -1
  173. package/lib/utils/activatePipeline.d.ts +17 -0
  174. package/lib/utils/activatePipeline.js +35 -0
  175. package/lib/utils/activatePipeline.js.map +1 -0
  176. package/lib/utils/addPipelineStage.d.ts +20 -0
  177. package/lib/utils/addPipelineStage.js +43 -0
  178. package/lib/utils/addPipelineStage.js.map +1 -0
  179. package/lib/utils/addStageBranch.d.ts +22 -0
  180. package/lib/utils/addStageBranch.js +48 -0
  181. package/lib/utils/addStageBranch.js.map +1 -0
  182. package/lib/utils/addStageEnvironment.d.ts +92 -0
  183. package/lib/utils/addStageEnvironment.js +120 -0
  184. package/lib/utils/addStageEnvironment.js.map +1 -0
  185. package/lib/utils/attachProject.d.ts +21 -0
  186. package/lib/utils/attachProject.js +44 -0
  187. package/lib/utils/attachProject.js.map +1 -0
  188. package/lib/utils/createPipeline.d.ts +34 -0
  189. package/lib/utils/createPipeline.js +77 -0
  190. package/lib/utils/createPipeline.js.map +1 -0
  191. package/lib/utils/createProject.d.ts +17 -0
  192. package/lib/utils/createProject.js +39 -0
  193. package/lib/utils/createProject.js.map +1 -0
  194. package/lib/utils/createPullRequest.d.ts +49 -0
  195. package/lib/utils/createPullRequest.js +204 -0
  196. package/lib/utils/createPullRequest.js.map +1 -0
  197. package/lib/utils/createWorkItem.d.ts +19 -0
  198. package/lib/utils/createWorkItem.js +58 -0
  199. package/lib/utils/createWorkItem.js.map +1 -0
  200. package/lib/utils/pipelineUtils.d.ts +8 -0
  201. package/lib/utils/pipelineUtils.js +51 -0
  202. package/lib/utils/pipelineUtils.js.map +1 -0
  203. package/lib/utils/types.d.ts +57 -0
  204. package/lib/utils/types.js +17 -0
  205. package/lib/utils/types.js.map +1 -0
  206. package/lib/utils/updateWorkItemStatus.d.ts +34 -0
  207. package/lib/utils/updateWorkItemStatus.js +71 -0
  208. package/lib/utils/updateWorkItemStatus.js.map +1 -0
  209. package/lib/utils/workItems.d.ts +3 -0
  210. package/lib/utils/workItems.js +181 -0
  211. package/lib/utils/workItems.js.map +1 -0
  212. package/messages/commonErrors.md +5 -1
  213. package/messages/devops.pipeline.activate.md +29 -0
  214. package/messages/devops.pipeline.attach-project.md +29 -0
  215. package/messages/devops.pipeline.create.md +81 -0
  216. package/messages/devops.pipeline.stage.add.md +37 -0
  217. package/messages/devops.project.create.md +29 -0
  218. package/messages/devops.project.list.md +17 -0
  219. package/messages/devops.pull-request.create.md +57 -0
  220. package/messages/devops.stage.add-branch.md +46 -0
  221. package/messages/devops.stage.add-environment.md +61 -0
  222. package/messages/devops.work-item.create.md +29 -0
  223. package/messages/devops.work-item.list.md +21 -0
  224. package/messages/devops.work-item.status.update.md +29 -0
  225. package/npm-shrinkwrap.json +4197 -4471
  226. package/oclif.lock +3380 -3272
  227. package/oclif.manifest.json +1056 -11
  228. package/package.json +53 -23
  229. package/schemas/devops-pipeline-activate.json +28 -0
  230. package/schemas/devops-pipeline-attach__project.json +25 -0
  231. package/schemas/devops-pipeline-create.json +50 -0
  232. package/schemas/devops-pipeline-stage-add.json +31 -0
  233. package/schemas/devops-project-create.json +28 -0
  234. package/schemas/devops-project-list.json +35 -0
  235. package/schemas/devops-pull__request-create.json +34 -0
  236. package/schemas/devops-stage-add__branch.json +34 -0
  237. package/schemas/devops-stage-add__environment.json +47 -0
  238. package/schemas/devops-work__item-create.json +28 -0
  239. package/schemas/devops-work__item-list.json +75 -0
  240. package/schemas/devops-work__item-status-update.json +28 -0
  241. package/schemas/project-deploy-pipeline-report.json +2 -2
@@ -0,0 +1,181 @@
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 { computeFirstStageId, fetchPipelineStages, findStageById, getBranchNameFromStage, getPipelineIdForProject, resolveTargetStageId, } from './pipelineUtils.js';
17
+ function normalizeProvider(provider) {
18
+ if (!provider)
19
+ return undefined;
20
+ const normalized = String(provider).toLowerCase();
21
+ if (normalized === 'bitbucketcloud') {
22
+ return 'bitbucket';
23
+ }
24
+ return normalized;
25
+ }
26
+ function providerToVcsType(provider) {
27
+ const normalized = normalizeProvider(provider);
28
+ if (normalized === 'github')
29
+ return 'GITHUB';
30
+ if (normalized === 'bitbucket')
31
+ return 'BITBUCKET';
32
+ return undefined;
33
+ }
34
+ function extractOwnerFromVcsPayload(payload) {
35
+ if (!payload)
36
+ return undefined;
37
+ if (typeof payload === 'string')
38
+ return payload.trim() || undefined;
39
+ const obj = payload;
40
+ if (typeof obj.owner === 'string' && obj.owner.trim()) {
41
+ return obj.owner.trim();
42
+ }
43
+ const list = (obj.owners || obj.items || obj.records);
44
+ if (Array.isArray(list)) {
45
+ for (const candidate of list) {
46
+ if (typeof candidate === 'string' && candidate.trim())
47
+ return candidate.trim();
48
+ if (candidate && typeof candidate === 'object') {
49
+ const ownerVal = candidate.owner;
50
+ if (typeof ownerVal === 'string' && ownerVal.trim())
51
+ return ownerVal.trim();
52
+ }
53
+ }
54
+ }
55
+ return undefined;
56
+ }
57
+ async function fetchOwnerByVcsType(connection, vcsType) {
58
+ const path = `/services/data/v${connection.getApiVersion()}/connect/devops/vcs/${vcsType}`;
59
+ const response = await connection.request({ method: 'GET', url: path });
60
+ return extractOwnerFromVcsPayload(response);
61
+ }
62
+ async function fetchVcsOwnersForRecords(connection, records) {
63
+ const providerOwnerMap = new Map();
64
+ const vcsTypes = new Set();
65
+ for (const item of records) {
66
+ const provider = item.SourceCodeRepositoryBranch?.SourceCodeRepository?.Provider;
67
+ const vcsType = providerToVcsType(provider);
68
+ if (vcsType)
69
+ vcsTypes.add(vcsType);
70
+ }
71
+ await Promise.all(Array.from(vcsTypes).map(async (vcsType) => {
72
+ try {
73
+ const owner = await fetchOwnerByVcsType(connection, vcsType);
74
+ if (!owner)
75
+ return;
76
+ if (vcsType === 'GITHUB')
77
+ providerOwnerMap.set('github', owner);
78
+ else if (vcsType === 'BITBUCKET')
79
+ providerOwnerMap.set('bitbucket', owner);
80
+ }
81
+ catch {
82
+ // Fall back to RepositoryOwner from work item when Connect API owner lookup fails.
83
+ }
84
+ }));
85
+ return providerOwnerMap;
86
+ }
87
+ function buildRepositoryInfo(item, providerOwnerMap) {
88
+ const repoName = item.SourceCodeRepositoryBranch?.SourceCodeRepository?.Name ?? undefined;
89
+ const provider = item.SourceCodeRepositoryBranch?.SourceCodeRepository?.Provider;
90
+ const normalizedProvider = normalizeProvider(provider);
91
+ const ownerFromConnectApi = normalizedProvider ? providerOwnerMap?.get(normalizedProvider) : undefined;
92
+ const ownerFromRepository = item.SourceCodeRepositoryBranch?.SourceCodeRepository?.RepositoryOwner ?? undefined;
93
+ const repoOwner = normalizedProvider === 'bitbucket'
94
+ ? ownerFromRepository ?? ownerFromConnectApi
95
+ : ownerFromConnectApi ?? ownerFromRepository;
96
+ let repoUrl;
97
+ let repoType;
98
+ if (normalizedProvider && repoOwner && repoName) {
99
+ if (normalizedProvider === 'github') {
100
+ repoType = 'github';
101
+ repoUrl = `https://github.com/${repoOwner}/${repoName}`;
102
+ }
103
+ else if (normalizedProvider === 'bitbucket') {
104
+ repoType = 'bitbucket';
105
+ repoUrl = `https://bitbucket.org/${repoOwner}/${repoName}`;
106
+ }
107
+ else {
108
+ repoType = normalizedProvider;
109
+ }
110
+ }
111
+ return { repoUrl, repoType };
112
+ }
113
+ async function ensureProjectStages(connection, cache, projectId) {
114
+ if (!projectId)
115
+ return null;
116
+ if (cache.has(projectId))
117
+ return cache.get(projectId) ?? null;
118
+ const pipelineId = await getPipelineIdForProject(connection, projectId);
119
+ if (!pipelineId) {
120
+ cache.set(projectId, null);
121
+ return null;
122
+ }
123
+ const stages = await fetchPipelineStages(connection, pipelineId);
124
+ if (!stages?.length) {
125
+ cache.set(projectId, null);
126
+ return null;
127
+ }
128
+ const firstStageId = computeFirstStageId(stages);
129
+ const ctx = { pipelineId, stages, firstStageId };
130
+ cache.set(projectId, ctx);
131
+ return ctx;
132
+ }
133
+ function mapRawItemToWorkItem(item, ctx, providerOwnerMap) {
134
+ const { repoUrl, repoType } = buildRepositoryInfo(item, providerOwnerMap);
135
+ const mapped = {
136
+ id: item.Id,
137
+ name: item.Name ?? '',
138
+ subject: item.Subject ?? undefined,
139
+ description: item.Description ?? undefined,
140
+ status: item.Status ?? '',
141
+ owner: item.AssignedToId ?? '',
142
+ SourceCodeRepository: repoUrl ?? repoType ? { repoUrl: repoUrl ?? '', repoType: repoType ?? '' } : undefined,
143
+ WorkItemBranch: item.SourceCodeRepositoryBranch?.Name ?? undefined,
144
+ PipelineStageId: item.DevopsPipelineStageId ?? undefined,
145
+ DevopsProjectId: item.DevopsProjectId,
146
+ PipelineId: ctx?.pipelineId,
147
+ };
148
+ if (ctx) {
149
+ let targetStageId = resolveTargetStageId(mapped.PipelineStageId, ctx.stages);
150
+ if (!targetStageId) {
151
+ targetStageId = ctx.firstStageId;
152
+ }
153
+ const targetStage = findStageById(ctx.stages, targetStageId);
154
+ mapped.TargetBranch = getBranchNameFromStage(targetStage);
155
+ mapped.TargetStageId = targetStageId;
156
+ }
157
+ return mapped;
158
+ }
159
+ export async function fetchWorkItems(connection, projectId) {
160
+ const query = `
161
+ SELECT
162
+ Id, Name, Subject, Description, Status, AssignedToId,
163
+ SourceCodeRepositoryBranchId,
164
+ SourceCodeRepositoryBranch.Name,
165
+ SourceCodeRepositoryBranch.SourceCodeRepositoryId,
166
+ SourceCodeRepositoryBranch.SourceCodeRepository.Name,
167
+ SourceCodeRepositoryBranch.SourceCodeRepository.RepositoryOwner,
168
+ SourceCodeRepositoryBranch.SourceCodeRepository.Provider,
169
+ DevopsPipelineStageId,
170
+ DevopsProjectId
171
+ FROM WorkItem
172
+ WHERE DevopsProjectId = '${projectId}'
173
+ `;
174
+ const result = await connection.query(query);
175
+ const records = result.records ?? [];
176
+ const projectStagesCache = new Map();
177
+ const ctx = await ensureProjectStages(connection, projectStagesCache, projectId);
178
+ const providerOwnerMap = await fetchVcsOwnersForRecords(connection, records);
179
+ return records.map((item) => mapRawItemToWorkItem(item, ctx, providerOwnerMap));
180
+ }
181
+ //# sourceMappingURL=workItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workItems.js","sourceRoot":"","sources":["../../src/utils/workItems.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAG5B,SAAS,iBAAiB,CAAC,QAAiB;IAC1C,IAAI,CAAC,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChC,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;IAClD,IAAI,UAAU,KAAK,gBAAgB,EAAE,CAAC;QACpC,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAiB;IAC1C,MAAM,UAAU,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC/C,IAAI,UAAU,KAAK,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAC7C,IAAI,UAAU,KAAK,WAAW;QAAE,OAAO,WAAW,CAAC;IACnD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,0BAA0B,CAAC,OAAgB;IAClD,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAC/B,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC,IAAI,EAAE,IAAI,SAAS,CAAC;IAEpE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AAe,EAAE,IAAI,CAAC,eAAe;QACrC,UAAU,EAAE,GAAG,EAAE,UAAU;KAC5B,CAAC;IAEF,IAAI,GAAG,EAAE,CAAC;QACR,IAAI,aAAa,GAAG,oBAAoB,CAAC,MAAM,CAAC,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;QAC7E,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,aAAa,GAAG,GAAG,CAAC,YAAY,CAAC;QACnC,CAAC;QACD,MAAM,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAC7D,MAAM,CAAC,YAAY,GAAG,sBAAsB,CAAC,WAAW,CAAC,CAAC;QAC1D,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,UAAsB,EAAE,SAAiB;IAC5E,MAAM,KAAK,GAAG;;;;;;;;;;;;+BAYe,SAAS;GACrC,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,KAAK,CAAsB,KAAK,CAAC,CAAC;IAClE,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;IACrC,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAuC,CAAC;IAC1E,MAAM,GAAG,GAAG,MAAM,mBAAmB,CAAC,UAAU,EAAE,kBAAkB,EAAE,SAAS,CAAC,CAAC;IACjF,MAAM,gBAAgB,GAAG,MAAM,wBAAwB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAE7E,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAY,EAAE,CAAC,oBAAoB,CAAC,IAAI,EAAE,GAAG,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAC5F,CAAC"}
@@ -44,4 +44,8 @@ Connection is required
44
44
 
45
45
  # error.query-string-required
46
46
 
47
- Query string is required and must be a non-empty string
47
+ The query string is empty or missing. Specify a query string and try again.
48
+
49
+ # error.DevopsCenterNotEnabled
50
+
51
+ We couldn't run this command because DevOps Center isn't enabled in this org. Enable DevOps Center in Setup, and try again.
@@ -0,0 +1,29 @@
1
+ # summary
2
+
3
+ Activate a DevOps Center pipeline for deployments.
4
+
5
+ # description
6
+
7
+ A pipeline must have at least one stage before you activate it. You can't modify the pipeline stages after you activate and promote changes through it.
8
+
9
+ # flags.target-org.summary
10
+
11
+ Username or alias of the DevOps Center org.
12
+
13
+ # flags.pipeline-id.summary
14
+
15
+ ID of the pipeline.
16
+
17
+ # examples
18
+
19
+ - Activate a pipeline using the pipeline ID.
20
+
21
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001
22
+
23
+ # error.NoStages
24
+
25
+ Can't activate pipeline %s. Add at least one stage, then try again.
26
+
27
+ # error.AlreadyActive
28
+
29
+ Pipeline %s is already active.
@@ -0,0 +1,29 @@
1
+ # summary
2
+
3
+ Attach a DevOps Center project to a pipeline.
4
+
5
+ # description
6
+
7
+ You can attach a project to only one pipeline.
8
+
9
+ # flags.target-org.summary
10
+
11
+ Username or alias of the DevOps Center org.
12
+
13
+ # flags.pipeline-id.summary
14
+
15
+ ID of the pipeline.
16
+
17
+ # flags.project-id.summary
18
+
19
+ ID of the DevOps Center project.
20
+
21
+ # examples
22
+
23
+ - Attach a project to a pipeline using the project ID and pipeline ID.
24
+
25
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --project-id 0Hn000000000001
26
+
27
+ # error.AlreadyAttached
28
+
29
+ Project %s is already attached to pipeline %s. Remove the project, and then try again.
@@ -0,0 +1,81 @@
1
+ # summary
2
+
3
+ Create a DevOps Center pipeline.
4
+
5
+ # description
6
+
7
+ Provide the URL of an existing repository, or use `--create-repo` with a repository name to create one. After you create the pipeline, add stages, and activate the pipeline.
8
+
9
+ # flags.target-org.summary
10
+
11
+ Username or alias of the DevOps Center org.
12
+
13
+ # flags.name.summary
14
+
15
+ Name of the pipeline.
16
+
17
+ # flags.repo.summary
18
+
19
+ URL of an existing repository or the name of a repository to create.
20
+
21
+ # flags.repo-type.summary
22
+
23
+ Type of the source code repository. Required when creating a repository using '--create-repo'.
24
+
25
+ # flags.create-repo.summary
26
+
27
+ Create a repository if it doesn't exist.
28
+
29
+ # flags.repo-owner.summary
30
+
31
+ Owner (organization or user) of the repository. Required when creating a repository using '--create-repo'.
32
+
33
+ # flags.bitbucket-project.summary
34
+
35
+ Bitbucket project key for the repository. Used when creating a Bitbucket repository with '--create-repo'.
36
+
37
+ # flags.description.summary
38
+
39
+ Description of the pipeline.
40
+
41
+ # examples
42
+
43
+ - Create a pipeline and associate it with an existing GitHub repository.
44
+
45
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Release Pipeline" --repo https://github.com/myorg/myrepo
46
+
47
+ - Create a pipeline and associate it with a new GitHub repository.
48
+
49
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Release Pipeline" --repo my-new-repo --repo-type github --repo-owner myorg --create-repo
50
+
51
+ - Create a pipeline with a description and associate it with a Bitbucket repository.
52
+
53
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Release Pipeline" --repo https://bitbucket.org/myorg/myrepo --description "Main CI/CD pipeline for production releases"
54
+
55
+ # error.RepoTypeRequired
56
+
57
+ The --repo-type flag is required when using --create-repo. Specify --repo-type github or --repo-type bitbucket.
58
+
59
+ # error.RepoCreationFailed
60
+
61
+ Failed to create repository "%s". Verify the --repo-owner has permission to create repositories and the repository name is available. Details: %s
62
+
63
+ # error.RepoNotFound
64
+
65
+ Repository "%s" was not found or you don't have access. Verify the repository URL is correct and your DevOps Center org has the required VCS credentials.
66
+
67
+ # error.RepoValidationFailed
68
+
69
+ Failed to validate repository "%s". When using an existing repository, provide the full URL (e.g. https://github.com/owner/repo). To create a new repository, use --create-repo with --repo-type and --repo-owner.
70
+
71
+ # error.RepoOwnerRequired
72
+
73
+ The --repo-owner flag is required when using --create-repo. Specify the GitHub or Bitbucket organization or user that will own the repository.
74
+
75
+ # error.VcsCredentialsMissing
76
+
77
+ No VCS credentials found for repository "%s". Connect to Bitbucket in your DevOps Center org before creating a pipeline.
78
+
79
+ # error.RepoTypeDetectionFailed
80
+
81
+ Unable to detect the repository type from the URL "%s". Use --repo-type to specify the repository type.
@@ -0,0 +1,37 @@
1
+ # summary
2
+
3
+ Add a stage to a DevOps Center pipeline.
4
+
5
+ # description
6
+
7
+ Inserts an empty stage before the stage specified by `--next-stage-id`. The new stage doesn't include a branch or environment. Configure them separately after you create the stage.
8
+
9
+ # flags.target-org.summary
10
+
11
+ Username or alias of the DevOps Center org.
12
+
13
+ # flags.pipeline-id.summary
14
+
15
+ ID of the pipeline where the stage is added.
16
+
17
+ # flags.name.summary
18
+
19
+ Name of the pipeline stage, such as Integration, UAT, or Staging.
20
+
21
+ # flags.next-stage-id.summary
22
+
23
+ ID of the stage that follows the new stage in the pipeline.
24
+
25
+ # examples
26
+
27
+ - Add a Development stage before Integration in a specific pipeline.
28
+
29
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --name "Development" --next-stage-id 0Xc000000000002
30
+
31
+ - Add a QA stage before UAT in a specific pipeline.
32
+
33
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --name "QA" --next-stage-id 0Xc000000000003
34
+
35
+ # error.StageNotFound
36
+
37
+ Stage %s not found in pipeline %s. Check the stage ID and try again.
@@ -0,0 +1,29 @@
1
+ # summary
2
+
3
+ Create a DevOps Center project in a DevOps Center org.
4
+
5
+ # description
6
+
7
+ Creates a new DevOps Center project with the specified name and optional description.
8
+
9
+ # flags.target-org.summary
10
+
11
+ Username or alias of the DevOps Center org.
12
+
13
+ # flags.name.summary
14
+
15
+ Name of the new DevOps Center project.
16
+
17
+ # flags.description.summary
18
+
19
+ Description of the new project; if not specified, the description is blank.
20
+
21
+ # examples
22
+
23
+ - Create a new DevOps Center project in the specified org.
24
+
25
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --name "MyApp Release"
26
+
27
+ - Create a project with a name and description.
28
+
29
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Platform Update" --description "Platform services update"
@@ -0,0 +1,17 @@
1
+ # summary
2
+
3
+ List all DevOps Center projects in a Salesforce org.
4
+
5
+ # description
6
+
7
+ This command queries the DevopsProject standard object and returns the project Id, Name, and Description for each project found.
8
+
9
+ # examples
10
+
11
+ - List all DevOps Center projects in an org with alias "my-devops-org":
12
+
13
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org
14
+
15
+ - List projects using an org's username:
16
+
17
+ <%= config.bin %> <%= command.id %> --target-org devops-center@example.com
@@ -0,0 +1,57 @@
1
+ # summary
2
+
3
+ Create a pull request for a work item branch.
4
+
5
+ # description
6
+
7
+ The pull request title defaults to the work item subject. The work item must have an associated branch and repository. Requires VCS authentication: set GITHUB_TOKEN (or use `gh auth login`) for GitHub, or set BITBUCKET_TOKEN for Bitbucket.
8
+
9
+ # flags.work-item-name.summary
10
+
11
+ Name of the work item, such as WI-000001.
12
+
13
+ # flags.work-item-id.summary
14
+
15
+ ID of the work item.
16
+
17
+ # flags.title.summary
18
+
19
+ Title of the pull request.
20
+
21
+ # flags.body.summary
22
+
23
+ Description of the pull request.
24
+
25
+ # examples
26
+
27
+ - Create a pull request for a work item using the default title.
28
+
29
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --work-item-name WI-000001
30
+
31
+ - Create a pull request with a custom title and description.
32
+
33
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --work-item-id 0Wx000000000001 --title "Fix: Login timeout" --body "Resolves the 30s timeout on the login page"
34
+
35
+ # error.NoBranch
36
+
37
+ Work item %s doesn't have an associated branch. Mark the work item as In Progress to create a branch, then try again.
38
+
39
+ # error.NoRepo
40
+
41
+ Work item %s doesn't have an associated repository. Verify the project is connected to a source control repository and try again.
42
+
43
+ # error.NoTargetBranch
44
+
45
+ Unable to determine the target branch for work item %s. Verify the pipeline stages are configured correctly.
46
+
47
+ # error.NoProvider
48
+
49
+ Unable to determine the VCS provider for work item %s. Verify the project is connected to a supported source control provider (GitHub or Bitbucket).
50
+
51
+ # flags.target-org.summary
52
+
53
+ Username or alias of the DevOps Center org.
54
+
55
+ # error.NoToken
56
+
57
+ No authentication token found for %s. For GitHub, set the GITHUB_TOKEN environment variable or run "gh auth login". For Bitbucket, set the BITBUCKET_TOKEN environment variable.
@@ -0,0 +1,46 @@
1
+ # summary
2
+
3
+ Add a source code repository branch to a pipeline stage.
4
+
5
+ # description
6
+
7
+ By default, the branch must exist in the repository. Use --create-vcs-branch to create a branch if it doesn't exist.
8
+ Each pipeline stage supports only one branch. Adding a branch replaces any existing branch linked to the pipeline stage.
9
+
10
+ # flags.pipeline-id.summary
11
+
12
+ ID of the pipeline that contains the stage.
13
+
14
+ # flags.stage-id.summary
15
+
16
+ ID of the pipeline stage to associate the branch with.
17
+
18
+ # flags.branch-name.summary
19
+
20
+ Name of the repository branch to assign to the stage.
21
+
22
+ # flags.create-vcs-branch.summary
23
+
24
+ Create the branch in the remote repository if it doesn't already exist.
25
+
26
+ # examples
27
+
28
+ - Add an existing branch to a stage:
29
+
30
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0Xo000000000001 --stage-id 0Xp000000000001 --branch-name main
31
+
32
+ - Create and add a branch to a pipeline stage:
33
+
34
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0Xo000000000001 --stage-id 0Xp000000000002 --branch-name integration --create-vcs-branch
35
+
36
+ # error.StageNotFound
37
+
38
+ Pipeline stage "%s" doesn't exist in pipeline "%s". Check the stage ID and try again.
39
+
40
+ # error.NextStageNoBranch
41
+
42
+ You must set up a branch on stage "%s" before configuring stage "%s". Branches must be configured from right to left (starting from the last stage in the pipeline).
43
+
44
+ # error.BranchAttachFailed
45
+
46
+ Failed to associate branch with stage: %s
@@ -0,0 +1,61 @@
1
+ # summary
2
+
3
+ Add a Salesforce environment to a pipeline stage.
4
+
5
+ # description
6
+
7
+ This command triggers an OAuth flow to authenticate the environment. A browser window opens automatically for you to log in.
8
+
9
+ # flags.pipeline-id.summary
10
+
11
+ ID of the pipeline that contains the stage.
12
+
13
+ # flags.stage-id.summary
14
+
15
+ ID of the pipeline stage.
16
+
17
+ # flags.environment-name.summary
18
+
19
+ Name of the environment.
20
+
21
+ # flags.org-type.summary
22
+
23
+ Type of the Salesforce org. Valid values: Production, Sandbox.
24
+
25
+ # flags.no-browser.summary
26
+
27
+ Don't auto-open the browser for OAuth authentication. The redirect URL is printed for manual use.
28
+
29
+ # examples
30
+
31
+ - Add a production environment to a stage using its ID:
32
+
33
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --stage-id 0Xp000000000001 --environment-name Production_Org --org-type Production
34
+
35
+ # info.BrowserOpened
36
+
37
+ A browser window has been opened for authentication. Log in to the target org to complete the setup.
38
+
39
+ # info.ManualAuth
40
+
41
+ Open the following URL in your browser to authenticate the environment:\n%s
42
+
43
+ # info.WaitingForAuth
44
+
45
+ Waiting for authentication to complete...
46
+
47
+ # info.Success
48
+
49
+ Successfully added environment to the stage.
50
+
51
+ # error.StageNotFound
52
+
53
+ Pipeline stage "%s" doesn't exist in pipeline "%s". Check the stage ID and try again.
54
+
55
+ # error.EnvironmentAttachFailed
56
+
57
+ Failed to create environment for stage: %s
58
+
59
+ # error.AuthTimeout
60
+
61
+ Authentication timed out. The environment was created but not yet authenticated. Re-run the command or authenticate manually via the org's DevOps Center setup.
@@ -0,0 +1,29 @@
1
+ # summary
2
+
3
+ Create a new work item in a DevOps Center project.
4
+
5
+ # description
6
+
7
+ The command creates the work item using the Connect API. Requires a project ID and a subject for the new work item; run the `devops project list` command to get the IDs for all existing projects.
8
+
9
+ # flags.project-id.summary
10
+
11
+ ID of the DevOps Center project to create the work item in.
12
+
13
+ # flags.subject.summary
14
+
15
+ Subject (title) of the new work item.
16
+
17
+ # flags.description.summary
18
+
19
+ Description of the new work item; if not specified, the description is blank.
20
+
21
+ # examples
22
+
23
+ - Create a work item for the project with the specified ID and give the work item the specified subject (title); use the DevOps Center org with alias "my-devops-org":
24
+
25
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --subject "Fix login bug"
26
+
27
+ - Create a work item with a subject and description:
28
+
29
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --subject "Add dark mode" --description "Implement dark mode toggle in settings page"
@@ -0,0 +1,21 @@
1
+ # summary
2
+
3
+ List all work items for a DevOps Center project.
4
+
5
+ # description
6
+
7
+ Each work item displays the branch, environment, and repository details needed for checkout and promotion. Requires a project ID; run the `devops project list` command to get the IDs for all existing projects.
8
+
9
+ # flags.project-id.summary
10
+
11
+ ID of the DevOps Center project to list work items for.
12
+
13
+ # examples
14
+
15
+ - List work items for a specific project in the DevOps org with alias "my-devops-org":
16
+
17
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001
18
+
19
+ - List work items using JSON output:
20
+
21
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --json
@@ -0,0 +1,29 @@
1
+ # summary
2
+
3
+ Update the status of a work item in DevOps Center.
4
+
5
+ # description
6
+
7
+ Allowed statuses are "In Progress" and "Ready to Promote".
8
+
9
+ # flags.work-item-name.summary
10
+
11
+ Name of the work item, such as WI-000001.
12
+
13
+ # flags.work-item-id.summary
14
+
15
+ ID of the work item.
16
+
17
+ # flags.status.summary
18
+
19
+ Status to set for the work item. Allowed values: "In Progress", "Ready to Promote".
20
+
21
+ # examples
22
+
23
+ - Update a work item status by its name to indicate the work is underway:
24
+
25
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --work-item-name WI-000001 --status "In Progress"
26
+
27
+ - Update a work item status by its ID to indicate the changes are ready for promotion:
28
+
29
+ <%= config.bin %> <%= command.id %> --target-org my-devops-org --work-item-id 0Wx000000000001 --status "Ready to Promote"