@simplysf/simply-cicd 0.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 (274) hide show
  1. package/README.md +1621 -0
  2. package/lib/commands/simply/cicd/build/cleanup-scratch-orgs.d.ts +21 -0
  3. package/lib/commands/simply/cicd/build/cleanup-scratch-orgs.js +47 -0
  4. package/lib/commands/simply/cicd/build/cleanup-scratch-orgs.js.map +1 -0
  5. package/lib/commands/simply/cicd/build/create-fallback-tag.d.ts +25 -0
  6. package/lib/commands/simply/cicd/build/create-fallback-tag.js +63 -0
  7. package/lib/commands/simply/cicd/build/create-fallback-tag.js.map +1 -0
  8. package/lib/commands/simply/cicd/build/create-package-version.d.ts +32 -0
  9. package/lib/commands/simply/cicd/build/create-package-version.js +110 -0
  10. package/lib/commands/simply/cicd/build/create-package-version.js.map +1 -0
  11. package/lib/commands/simply/cicd/build/create-scratch.d.ts +25 -0
  12. package/lib/commands/simply/cicd/build/create-scratch.js +63 -0
  13. package/lib/commands/simply/cicd/build/create-scratch.js.map +1 -0
  14. package/lib/commands/simply/cicd/build/delete-scratch.d.ts +21 -0
  15. package/lib/commands/simply/cicd/build/delete-scratch.js +53 -0
  16. package/lib/commands/simply/cicd/build/delete-scratch.js.map +1 -0
  17. package/lib/commands/simply/cicd/build/determine-package-changes.d.ts +17 -0
  18. package/lib/commands/simply/cicd/build/determine-package-changes.js +44 -0
  19. package/lib/commands/simply/cicd/build/determine-package-changes.js.map +1 -0
  20. package/lib/commands/simply/cicd/build/generate-flexipage-diff.d.ts +20 -0
  21. package/lib/commands/simply/cicd/build/generate-flexipage-diff.js +47 -0
  22. package/lib/commands/simply/cicd/build/generate-flexipage-diff.js.map +1 -0
  23. package/lib/commands/simply/cicd/build/generate-flow-diff.d.ts +20 -0
  24. package/lib/commands/simply/cicd/build/generate-flow-diff.js +47 -0
  25. package/lib/commands/simply/cicd/build/generate-flow-diff.js.map +1 -0
  26. package/lib/commands/simply/cicd/build/install-dependencies.d.ts +18 -0
  27. package/lib/commands/simply/cicd/build/install-dependencies.js +58 -0
  28. package/lib/commands/simply/cicd/build/install-dependencies.js.map +1 -0
  29. package/lib/commands/simply/cicd/build/lwc-jest.d.ts +14 -0
  30. package/lib/commands/simply/cicd/build/lwc-jest.js +37 -0
  31. package/lib/commands/simply/cicd/build/lwc-jest.js.map +1 -0
  32. package/lib/commands/simply/cicd/build/push-scratch.d.ts +19 -0
  33. package/lib/commands/simply/cicd/build/push-scratch.js +57 -0
  34. package/lib/commands/simply/cicd/build/push-scratch.js.map +1 -0
  35. package/lib/commands/simply/cicd/build/test-scratch.d.ts +18 -0
  36. package/lib/commands/simply/cicd/build/test-scratch.js +58 -0
  37. package/lib/commands/simply/cicd/build/test-scratch.js.map +1 -0
  38. package/lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.d.ts +29 -0
  39. package/lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.js +36 -0
  40. package/lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.js.map +1 -0
  41. package/lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.d.ts +23 -0
  42. package/lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.js +82 -0
  43. package/lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.js.map +1 -0
  44. package/lib/commands/simply/cicd/deploy/happy-soup/install-packaged.d.ts +21 -0
  45. package/lib/commands/simply/cicd/deploy/happy-soup/install-packaged.js +57 -0
  46. package/lib/commands/simply/cicd/deploy/happy-soup/install-packaged.js.map +1 -0
  47. package/lib/commands/simply/cicd/deploy/happy-soup/post-deploy.d.ts +29 -0
  48. package/lib/commands/simply/cicd/deploy/happy-soup/post-deploy.js +36 -0
  49. package/lib/commands/simply/cicd/deploy/happy-soup/post-deploy.js.map +1 -0
  50. package/lib/commands/simply/cicd/deploy/happy-soup/post-destructive.d.ts +29 -0
  51. package/lib/commands/simply/cicd/deploy/happy-soup/post-destructive.js +36 -0
  52. package/lib/commands/simply/cicd/deploy/happy-soup/post-destructive.js.map +1 -0
  53. package/lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.d.ts +29 -0
  54. package/lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.js +36 -0
  55. package/lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.js.map +1 -0
  56. package/lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.d.ts +28 -0
  57. package/lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.js +89 -0
  58. package/lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.js.map +1 -0
  59. package/lib/commands/simply/cicd/deploy/happy-soup/validate.d.ts +15 -0
  60. package/lib/commands/simply/cicd/deploy/happy-soup/validate.js +49 -0
  61. package/lib/commands/simply/cicd/deploy/happy-soup/validate.js.map +1 -0
  62. package/lib/commands/simply/cicd/deploy/project/deploy-unpackaged.d.ts +28 -0
  63. package/lib/commands/simply/cicd/deploy/project/deploy-unpackaged.js +36 -0
  64. package/lib/commands/simply/cicd/deploy/project/deploy-unpackaged.js.map +1 -0
  65. package/lib/commands/simply/cicd/deploy/project/install-packaged.d.ts +24 -0
  66. package/lib/commands/simply/cicd/deploy/project/install-packaged.js +69 -0
  67. package/lib/commands/simply/cicd/deploy/project/install-packaged.js.map +1 -0
  68. package/lib/commands/simply/cicd/deploy/project/post-deploy.d.ts +28 -0
  69. package/lib/commands/simply/cicd/deploy/project/post-deploy.js +36 -0
  70. package/lib/commands/simply/cicd/deploy/project/post-deploy.js.map +1 -0
  71. package/lib/commands/simply/cicd/deploy/project/post-destructive.d.ts +28 -0
  72. package/lib/commands/simply/cicd/deploy/project/post-destructive.js +36 -0
  73. package/lib/commands/simply/cicd/deploy/project/post-destructive.js.map +1 -0
  74. package/lib/commands/simply/cicd/deploy/project/pre-destructive.d.ts +28 -0
  75. package/lib/commands/simply/cicd/deploy/project/pre-destructive.js +36 -0
  76. package/lib/commands/simply/cicd/deploy/project/pre-destructive.js.map +1 -0
  77. package/lib/commands/simply/cicd/deploy/project/run-apex-tests.d.ts +26 -0
  78. package/lib/commands/simply/cicd/deploy/project/run-apex-tests.js +66 -0
  79. package/lib/commands/simply/cicd/deploy/project/run-apex-tests.js.map +1 -0
  80. package/lib/commands/simply/cicd/deploy/project/validate.d.ts +14 -0
  81. package/lib/commands/simply/cicd/deploy/project/validate.js +51 -0
  82. package/lib/commands/simply/cicd/deploy/project/validate.js.map +1 -0
  83. package/lib/commands/simply/cicd/deploy/validate.d.ts +14 -0
  84. package/lib/commands/simply/cicd/deploy/validate.js +50 -0
  85. package/lib/commands/simply/cicd/deploy/validate.js.map +1 -0
  86. package/lib/commands/simply/cicd/notify/happy-soup.d.ts +32 -0
  87. package/lib/commands/simply/cicd/notify/happy-soup.js +193 -0
  88. package/lib/commands/simply/cicd/notify/happy-soup.js.map +1 -0
  89. package/lib/commands/simply/cicd/notify/project.d.ts +51 -0
  90. package/lib/commands/simply/cicd/notify/project.js +376 -0
  91. package/lib/commands/simply/cicd/notify/project.js.map +1 -0
  92. package/lib/commands/simply/cicd/notify/teams.d.ts +18 -0
  93. package/lib/commands/simply/cicd/notify/teams.js +77 -0
  94. package/lib/commands/simply/cicd/notify/teams.js.map +1 -0
  95. package/lib/commands/simply/cicd/sfdx-dependabot.d.ts +84 -0
  96. package/lib/commands/simply/cicd/sfdx-dependabot.js +469 -0
  97. package/lib/commands/simply/cicd/sfdx-dependabot.js.map +1 -0
  98. package/lib/common/build/cleanupScratchOrgs.d.ts +7 -0
  99. package/lib/common/build/cleanupScratchOrgs.js +91 -0
  100. package/lib/common/build/cleanupScratchOrgs.js.map +1 -0
  101. package/lib/common/build/createFallbackTag.d.ts +24 -0
  102. package/lib/common/build/createFallbackTag.js +96 -0
  103. package/lib/common/build/createFallbackTag.js.map +1 -0
  104. package/lib/common/build/createPackageVersion.d.ts +27 -0
  105. package/lib/common/build/createPackageVersion.js +164 -0
  106. package/lib/common/build/createPackageVersion.js.map +1 -0
  107. package/lib/common/build/createScratchOrg.d.ts +14 -0
  108. package/lib/common/build/createScratchOrg.js +191 -0
  109. package/lib/common/build/createScratchOrg.js.map +1 -0
  110. package/lib/common/build/deleteScratchOrg.d.ts +12 -0
  111. package/lib/common/build/deleteScratchOrg.js +58 -0
  112. package/lib/common/build/deleteScratchOrg.js.map +1 -0
  113. package/lib/common/build/determinePackageChanges.d.ts +13 -0
  114. package/lib/common/build/determinePackageChanges.js +98 -0
  115. package/lib/common/build/determinePackageChanges.js.map +1 -0
  116. package/lib/common/build/devHubs.d.ts +8 -0
  117. package/lib/common/build/devHubs.js +30 -0
  118. package/lib/common/build/devHubs.js.map +1 -0
  119. package/lib/common/build/flags.d.ts +36 -0
  120. package/lib/common/build/flags.js +120 -0
  121. package/lib/common/build/flags.js.map +1 -0
  122. package/lib/common/build/flexipageDelta.d.ts +31 -0
  123. package/lib/common/build/flexipageDelta.js +92 -0
  124. package/lib/common/build/flexipageDelta.js.map +1 -0
  125. package/lib/common/build/flowDelta.d.ts +30 -0
  126. package/lib/common/build/flowDelta.js +91 -0
  127. package/lib/common/build/flowDelta.js.map +1 -0
  128. package/lib/common/build/installDependencies.d.ts +7 -0
  129. package/lib/common/build/installDependencies.js +36 -0
  130. package/lib/common/build/installDependencies.js.map +1 -0
  131. package/lib/common/build/lwcJest.d.ts +9 -0
  132. package/lib/common/build/lwcJest.js +36 -0
  133. package/lib/common/build/lwcJest.js.map +1 -0
  134. package/lib/common/build/pushScratch.d.ts +8 -0
  135. package/lib/common/build/pushScratch.js +63 -0
  136. package/lib/common/build/pushScratch.js.map +1 -0
  137. package/lib/common/build/scratchOrgInfo.d.ts +10 -0
  138. package/lib/common/build/scratchOrgInfo.js +21 -0
  139. package/lib/common/build/scratchOrgInfo.js.map +1 -0
  140. package/lib/common/build/skipGuard.d.ts +8 -0
  141. package/lib/common/build/skipGuard.js +41 -0
  142. package/lib/common/build/skipGuard.js.map +1 -0
  143. package/lib/common/build/testScratch.d.ts +14 -0
  144. package/lib/common/build/testScratch.js +45 -0
  145. package/lib/common/build/testScratch.js.map +1 -0
  146. package/lib/common/deploy/deployCommon.d.ts +101 -0
  147. package/lib/common/deploy/deployCommon.js +361 -0
  148. package/lib/common/deploy/deployCommon.js.map +1 -0
  149. package/lib/common/deploy/deployHappySoup.d.ts +54 -0
  150. package/lib/common/deploy/deployHappySoup.js +143 -0
  151. package/lib/common/deploy/deployHappySoup.js.map +1 -0
  152. package/lib/common/deploy/deployProject.d.ts +24 -0
  153. package/lib/common/deploy/deployProject.js +114 -0
  154. package/lib/common/deploy/deployProject.js.map +1 -0
  155. package/lib/common/deploy/flags.d.ts +34 -0
  156. package/lib/common/deploy/flags.js +91 -0
  157. package/lib/common/deploy/flags.js.map +1 -0
  158. package/lib/common/deploy/runDeployStage.d.ts +16 -0
  159. package/lib/common/deploy/runDeployStage.js +65 -0
  160. package/lib/common/deploy/runDeployStage.js.map +1 -0
  161. package/lib/common/deploy/stageCommand.d.ts +106 -0
  162. package/lib/common/deploy/stageCommand.js +131 -0
  163. package/lib/common/deploy/stageCommand.js.map +1 -0
  164. package/lib/common/deploy/validate.d.ts +11 -0
  165. package/lib/common/deploy/validate.js +54 -0
  166. package/lib/common/deploy/validate.js.map +1 -0
  167. package/lib/common/env.d.ts +9 -0
  168. package/lib/common/env.js +47 -0
  169. package/lib/common/env.js.map +1 -0
  170. package/lib/common/exec/sfCli.d.ts +27 -0
  171. package/lib/common/exec/sfCli.js +50 -0
  172. package/lib/common/exec/sfCli.js.map +1 -0
  173. package/lib/common/flags/env.d.ts +44 -0
  174. package/lib/common/flags/env.js +81 -0
  175. package/lib/common/flags/env.js.map +1 -0
  176. package/lib/common/git.d.ts +19 -0
  177. package/lib/common/git.js +79 -0
  178. package/lib/common/git.js.map +1 -0
  179. package/lib/common/logger.d.ts +10 -0
  180. package/lib/common/logger.js +33 -0
  181. package/lib/common/logger.js.map +1 -0
  182. package/lib/common/notify/getCommitStories.d.ts +16 -0
  183. package/lib/common/notify/getCommitStories.js +69 -0
  184. package/lib/common/notify/getCommitStories.js.map +1 -0
  185. package/lib/common/notify/renderTemplate.d.ts +3 -0
  186. package/lib/common/notify/renderTemplate.js +24 -0
  187. package/lib/common/notify/renderTemplate.js.map +1 -0
  188. package/lib/common/notify/sendNotification.d.ts +2 -0
  189. package/lib/common/notify/sendNotification.js +50 -0
  190. package/lib/common/notify/sendNotification.js.map +1 -0
  191. package/lib/common/notify/templates.d.ts +11 -0
  192. package/lib/common/notify/templates.js +85 -0
  193. package/lib/common/notify/templates.js.map +1 -0
  194. package/lib/common/schemas/deployConfig.d.ts +25 -0
  195. package/lib/common/schemas/deployConfig.js +55 -0
  196. package/lib/common/schemas/deployConfig.js.map +1 -0
  197. package/lib/common/schemas/deployProgress.d.ts +10 -0
  198. package/lib/common/schemas/deployProgress.js +27 -0
  199. package/lib/common/schemas/deployProgress.js.map +1 -0
  200. package/lib/common/schemas/deployRules.d.ts +34 -0
  201. package/lib/common/schemas/deployRules.js +40 -0
  202. package/lib/common/schemas/deployRules.js.map +1 -0
  203. package/lib/common/sfApex.d.ts +22 -0
  204. package/lib/common/sfApex.js +158 -0
  205. package/lib/common/sfApex.js.map +1 -0
  206. package/lib/common/sfAuth.d.ts +30 -0
  207. package/lib/common/sfAuth.js +99 -0
  208. package/lib/common/sfAuth.js.map +1 -0
  209. package/lib/common/sfConfig.d.ts +6 -0
  210. package/lib/common/sfConfig.js +45 -0
  211. package/lib/common/sfConfig.js.map +1 -0
  212. package/lib/common/sfPackages.d.ts +12 -0
  213. package/lib/common/sfPackages.js +53 -0
  214. package/lib/common/sfPackages.js.map +1 -0
  215. package/lib/common/sfPlugins.d.ts +11 -0
  216. package/lib/common/sfPlugins.js +134 -0
  217. package/lib/common/sfPlugins.js.map +1 -0
  218. package/lib/common/sfdxDependabot/updater.d.ts +14 -0
  219. package/lib/common/sfdxDependabot/updater.js +94 -0
  220. package/lib/common/sfdxDependabot/updater.js.map +1 -0
  221. package/lib/common/vcs/gitlab.d.ts +21 -0
  222. package/lib/common/vcs/gitlab.js +208 -0
  223. package/lib/common/vcs/gitlab.js.map +1 -0
  224. package/lib/common/vcs/index.d.ts +4 -0
  225. package/lib/common/vcs/index.js +26 -0
  226. package/lib/common/vcs/index.js.map +1 -0
  227. package/lib/common/vcs/types.d.ts +69 -0
  228. package/lib/common/vcs/types.js +17 -0
  229. package/lib/common/vcs/types.js.map +1 -0
  230. package/lib/config/defaultDeploymentPlugins.d.ts +2 -0
  231. package/lib/config/defaultDeploymentPlugins.js +18 -0
  232. package/lib/config/defaultDeploymentPlugins.js.map +1 -0
  233. package/lib/config/trustedPlugins.d.ts +2 -0
  234. package/lib/config/trustedPlugins.js +18 -0
  235. package/lib/config/trustedPlugins.js.map +1 -0
  236. package/lib/index.d.ts +2 -0
  237. package/lib/index.js +17 -0
  238. package/lib/index.js.map +1 -0
  239. package/messages/simply.cicd.build.cleanup-scratch-orgs.md +11 -0
  240. package/messages/simply.cicd.build.create-fallback-tag.md +21 -0
  241. package/messages/simply.cicd.build.create-package-version.md +49 -0
  242. package/messages/simply.cicd.build.create-scratch.md +21 -0
  243. package/messages/simply.cicd.build.delete-scratch.md +13 -0
  244. package/messages/simply.cicd.build.determine-package-changes.md +15 -0
  245. package/messages/simply.cicd.build.generate-flexipage-diff.md +11 -0
  246. package/messages/simply.cicd.build.generate-flow-diff.md +11 -0
  247. package/messages/simply.cicd.build.install-dependencies.md +17 -0
  248. package/messages/simply.cicd.build.lwc-jest.md +11 -0
  249. package/messages/simply.cicd.build.md +75 -0
  250. package/messages/simply.cicd.build.push-scratch.md +21 -0
  251. package/messages/simply.cicd.build.test-scratch.md +17 -0
  252. package/messages/simply.cicd.deploy.happy-soup.deploy-unpackaged.md +11 -0
  253. package/messages/simply.cicd.deploy.happy-soup.deployment-close-out.md +39 -0
  254. package/messages/simply.cicd.deploy.happy-soup.install-packaged.md +15 -0
  255. package/messages/simply.cicd.deploy.happy-soup.post-deploy.md +11 -0
  256. package/messages/simply.cicd.deploy.happy-soup.post-destructive.md +11 -0
  257. package/messages/simply.cicd.deploy.happy-soup.pre-destructive.md +11 -0
  258. package/messages/simply.cicd.deploy.happy-soup.tag-deployment.md +35 -0
  259. package/messages/simply.cicd.deploy.happy-soup.validate.md +25 -0
  260. package/messages/simply.cicd.deploy.md +75 -0
  261. package/messages/simply.cicd.deploy.project.deploy-unpackaged.md +11 -0
  262. package/messages/simply.cicd.deploy.project.install-packaged.md +23 -0
  263. package/messages/simply.cicd.deploy.project.post-deploy.md +11 -0
  264. package/messages/simply.cicd.deploy.project.post-destructive.md +11 -0
  265. package/messages/simply.cicd.deploy.project.pre-destructive.md +11 -0
  266. package/messages/simply.cicd.deploy.project.run-apex-tests.md +15 -0
  267. package/messages/simply.cicd.deploy.project.validate.md +25 -0
  268. package/messages/simply.cicd.deploy.validate.md +25 -0
  269. package/messages/simply.cicd.md +3 -0
  270. package/messages/simply.cicd.notify.happy-soup.md +73 -0
  271. package/messages/simply.cicd.notify.project.md +125 -0
  272. package/messages/simply.cicd.notify.teams.md +27 -0
  273. package/messages/simply.cicd.sfdx-dependabot.md +91 -0
  274. package/package.json +214 -0
@@ -0,0 +1,98 @@
1
+ /*
2
+ * Copyright (c) 2026, Clay Chipps; Copyright (c) 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 { promises as fs } from 'node:fs';
17
+ import { execa } from 'execa';
18
+ import { getDefaultPackageDirectory, readSfdxProject } from '@simplysf/simply-core';
19
+ import { logger } from '../logger.js';
20
+ /** Narrows a full `versionNumber` (e.g. `6.40.0.NEXT`) down to a `major.minor.patch*` git tag match pattern. */
21
+ export function buildTagMatchPattern(versionNumber) {
22
+ if (versionNumber) {
23
+ const parts = versionNumber.split('.');
24
+ if (parts.length >= 3) {
25
+ return `v${parts[0]}.${parts[1]}.${parts[2]}*`;
26
+ }
27
+ }
28
+ return 'v*';
29
+ }
30
+ async function resolveLastTag(tagMatchPattern) {
31
+ try {
32
+ const { stdout } = await execa('git', ['describe', '--tags', '--abbrev=0', '--match', tagMatchPattern]);
33
+ return stdout.trim();
34
+ }
35
+ catch {
36
+ logger.info(`No previous release tag (${tagMatchPattern}) found. A full package build is required.`);
37
+ return '';
38
+ }
39
+ }
40
+ async function detectChangesSincePackagePath(packagePath, lastTag) {
41
+ logger.info(`Running git diff on path: "${packagePath}" and "sfdx-project.json"`);
42
+ const { stdout: diffOutput } = await execa('git', [
43
+ 'diff',
44
+ '--name-only',
45
+ lastTag,
46
+ 'HEAD',
47
+ '--',
48
+ packagePath,
49
+ 'sfdx-project.json',
50
+ ]);
51
+ if (diffOutput.trim().length > 0) {
52
+ logger.info(`Changes detected in package directory or project config:\n${diffOutput}`);
53
+ return true;
54
+ }
55
+ logger.success('No changes detected in package directory or project config.');
56
+ return false;
57
+ }
58
+ async function detectPackageChanges() {
59
+ const projectJson = await readSfdxProject();
60
+ const defaultDir = getDefaultPackageDirectory(projectJson);
61
+ if (!defaultDir?.path) {
62
+ logger.warn('No default package directory found in sfdx-project.json. Defaulting to PACKAGE_CHANGED=FALSE.');
63
+ return { packageChanged: false, lastTag: '' };
64
+ }
65
+ logger.info('Fetching remote tags...');
66
+ await execa('git', ['fetch', '--tags']);
67
+ const lastTag = await resolveLastTag(buildTagMatchPattern(defaultDir.versionNumber));
68
+ if (!lastTag) {
69
+ return { packageChanged: true, lastTag: '' };
70
+ }
71
+ logger.info(`Last package tag found: ${lastTag}`);
72
+ const packageChanged = await detectChangesSincePackagePath(defaultDir.path, lastTag);
73
+ return { packageChanged, lastTag };
74
+ }
75
+ /**
76
+ * Detects whether any files under the default package directory (or `sfdx-project.json` itself)
77
+ * have changed since the last release tag, and writes the result as a dotenv file. Any failure
78
+ * during detection (missing/invalid sfdx-project.json, git errors) defaults to `PACKAGE_CHANGED=TRUE`
79
+ * so a build never silently skips work it should have done.
80
+ */
81
+ export async function determinePackageChanges(options) {
82
+ logger.info('Determining package changes...');
83
+ const outFile = options.out ?? 'changes.env';
84
+ let packageChanged = true;
85
+ let lastTag = '';
86
+ try {
87
+ ({ packageChanged, lastTag } = await detectPackageChanges());
88
+ }
89
+ catch (err) {
90
+ logger.error(`Error during change detection: ${err.message}. Defaulting to full build.`);
91
+ packageChanged = true;
92
+ lastTag = '';
93
+ }
94
+ const envContent = `PACKAGE_CHANGED=${packageChanged ? 'TRUE' : 'FALSE'}\nLAST_TAG=${lastTag}\n`;
95
+ await fs.writeFile(outFile, envContent, 'utf-8');
96
+ logger.success(`Wrote change detection results to ${outFile}`);
97
+ }
98
+ //# sourceMappingURL=determinePackageChanges.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"determinePackageChanges.js","sourceRoot":"","sources":["../../../src/common/build/determinePackageChanges.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,gHAAgH;AAChH,MAAM,UAAU,oBAAoB,CAAC,aAAsB;IACzD,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACtB,OAAO,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,C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,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,cAAc,OAAO,IAAI,CAAC;IACjG,MAAM,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACjD,MAAM,CAAC,OAAO,CAAC,qCAAqC,OAAO,EAAE,CAAC,CAAC;AACjE,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type DevHubConfig = {
2
+ name: string;
3
+ username: string;
4
+ clientId: string;
5
+ instanceUrl: string;
6
+ };
7
+ /** Zips the four parallel `--dev-hub-*` flag arrays into a list of Dev Hub configs. */
8
+ export declare function parseDevHubs(names?: string[], usernames?: string[], clientIds?: string[], instanceUrls?: string[]): DevHubConfig[];
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright (c) 2026, Clay Chipps; Copyright (c) 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
+ /** Zips the four parallel `--dev-hub-*` flag arrays into a list of Dev Hub configs. */
17
+ export function parseDevHubs(names = [], usernames = [], clientIds = [], instanceUrls = []) {
18
+ if (!(names.length === usernames.length &&
19
+ names.length === clientIds.length &&
20
+ names.length === instanceUrls.length)) {
21
+ throw new Error('Mismatched number of Dev Hub arguments. Each --dev-hub-name must be accompanied by a username, client-id, and instance-url.');
22
+ }
23
+ return names.map((name, i) => ({
24
+ name,
25
+ username: usernames[i],
26
+ clientId: clientIds[i],
27
+ instanceUrl: instanceUrls[i],
28
+ }));
29
+ }
30
+ //# sourceMappingURL=devHubs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"devHubs.js","sourceRoot":"","sources":["../../../src/common/build/devHubs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,uFAAuF;AACvF,MAAM,UAAU,YAAY,CAC1B,QAAkB,EAAE,EACpB,YAAsB,EAAE,EACxB,YAAsB,EAAE,EACxB,eAAyB,EAAE;IAE3B,IAAI,CAAC,CACH,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,MAAM;QACjC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,MAAM;QACjC,KAAK,CAAC,MAAM,KAAK,YAAY,CAAC,MAAM,CACrC,EAAE,CAAC;QACF,MAAM,IAAI,KAAK,CACb,6HAA6H,CAC9H,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7B,IAAI;QACJ,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;QACtB,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;QACtB,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC;KAC7B,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,36 @@
1
+ /** Flags shared by every build command that authenticates against one or more Dev Hubs. */
2
+ export declare const devHubFlags: {
3
+ 'dev-hub-name': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
4
+ 'dev-hub-username': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
5
+ 'dev-hub-client-id': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
6
+ 'dev-hub-instance-url': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
7
+ };
8
+ export declare const jwtKeyFileFlag: {
9
+ 'jwt-key-file': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
+ };
11
+ export declare const debugFlag: {
12
+ debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
+ };
14
+ export declare const disabledFlag: {
15
+ disabled: import("@oclif/core/interfaces").BooleanFlag<boolean>;
16
+ };
17
+ /** Flags shared by every build command that adds a temporary authenticated git remote to tag or push. */
18
+ export declare const gitOpsFlags: {
19
+ 'ci-commit-ref-name': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
20
+ 'ci-pipeline-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
21
+ 'ci-project-path': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
22
+ 'project-access-token': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
23
+ };
24
+ export declare const vcsFlags: {
25
+ 'vcs-host': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
26
+ 'vcs-provider': import("@oclif/core/interfaces").OptionFlag<"gitlab", import("@oclif/core/interfaces").CustomOptions>;
27
+ };
28
+ /** Flags shared by the (inherently GitLab-specific) `generate-flow-diff` and `generate-flexipage-diff` commands. */
29
+ export declare const diffFlags: {
30
+ 'ci-project-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
31
+ 'ci-merge-request-iid': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
32
+ from: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
33
+ to: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
34
+ 'project-access-token': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
35
+ out: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
36
+ };
@@ -0,0 +1,120 @@
1
+ /*
2
+ * Copyright (c) 2026, Clay Chipps; Copyright (c) 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 { Flags } from '@salesforce/sf-plugins-core';
18
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
19
+ const messages = Messages.loadMessages('@simplysf/simply-cicd', 'simply.cicd.build');
20
+ /** Flags shared by every build command that authenticates against one or more Dev Hubs. */
21
+ export const devHubFlags = {
22
+ 'dev-hub-name': Flags.string({
23
+ summary: messages.getMessage('flags.dev-hub-name.summary'),
24
+ multiple: true,
25
+ required: true,
26
+ }),
27
+ 'dev-hub-username': Flags.string({
28
+ summary: messages.getMessage('flags.dev-hub-username.summary'),
29
+ multiple: true,
30
+ required: true,
31
+ }),
32
+ 'dev-hub-client-id': Flags.string({
33
+ summary: messages.getMessage('flags.dev-hub-client-id.summary'),
34
+ multiple: true,
35
+ required: true,
36
+ }),
37
+ 'dev-hub-instance-url': Flags.string({
38
+ summary: messages.getMessage('flags.dev-hub-instance-url.summary'),
39
+ multiple: true,
40
+ required: true,
41
+ }),
42
+ };
43
+ export const jwtKeyFileFlag = {
44
+ 'jwt-key-file': Flags.string({
45
+ summary: messages.getMessage('flags.jwt-key-file.summary'),
46
+ required: true,
47
+ env: 'SIMPLY_CICD_JWT_KEY_FILE',
48
+ }),
49
+ };
50
+ export const debugFlag = {
51
+ debug: Flags.boolean({
52
+ summary: messages.getMessage('flags.debug.summary'),
53
+ default: false,
54
+ env: 'SIMPLY_CICD_DEBUG',
55
+ }),
56
+ };
57
+ export const disabledFlag = {
58
+ disabled: Flags.boolean({
59
+ summary: messages.getMessage('flags.disabled.summary'),
60
+ default: false,
61
+ env: 'SIMPLY_CICD_DISABLED',
62
+ }),
63
+ };
64
+ /** Flags shared by every build command that adds a temporary authenticated git remote to tag or push. */
65
+ export const gitOpsFlags = {
66
+ 'ci-commit-ref-name': Flags.string({
67
+ summary: messages.getMessage('flags.ci-commit-ref-name.summary'),
68
+ required: true,
69
+ env: 'SIMPLY_CICD_CI_COMMIT_REF_NAME',
70
+ }),
71
+ 'ci-pipeline-id': Flags.string({
72
+ summary: messages.getMessage('flags.ci-pipeline-id.summary'),
73
+ required: true,
74
+ env: 'SIMPLY_CICD_CI_PIPELINE_ID',
75
+ }),
76
+ 'ci-project-path': Flags.string({
77
+ summary: messages.getMessage('flags.ci-project-path.summary'),
78
+ required: true,
79
+ env: 'SIMPLY_CICD_CI_PROJECT_PATH',
80
+ }),
81
+ 'project-access-token': Flags.string({
82
+ summary: messages.getMessage('flags.project-access-token.summary'),
83
+ required: true,
84
+ env: 'SIMPLY_CICD_PROJECT_ACCESS_TOKEN',
85
+ }),
86
+ };
87
+ export const vcsFlags = {
88
+ 'vcs-host': Flags.string({
89
+ summary: messages.getMessage('flags.vcs-host.summary'),
90
+ default: 'gitlab.com',
91
+ env: 'SIMPLY_CICD_VCS_HOST',
92
+ }),
93
+ 'vcs-provider': Flags.custom({ options: ['gitlab'] })({
94
+ summary: messages.getMessage('flags.vcs-provider.summary'),
95
+ default: 'gitlab',
96
+ env: 'SIMPLY_CICD_VCS_PROVIDER',
97
+ }),
98
+ };
99
+ /** Flags shared by the (inherently GitLab-specific) `generate-flow-diff` and `generate-flexipage-diff` commands. */
100
+ export const diffFlags = {
101
+ 'ci-project-id': Flags.string({
102
+ summary: messages.getMessage('flags.diff-ci-project-id.summary'),
103
+ required: true,
104
+ env: 'SIMPLY_CICD_CI_PROJECT_ID',
105
+ }),
106
+ 'ci-merge-request-iid': Flags.string({
107
+ summary: messages.getMessage('flags.diff-ci-merge-request-iid.summary'),
108
+ required: true,
109
+ env: 'SIMPLY_CICD_CI_MERGE_REQUEST_IID',
110
+ }),
111
+ from: Flags.string({ summary: messages.getMessage('flags.diff-from.summary'), required: true }),
112
+ to: Flags.string({ summary: messages.getMessage('flags.diff-to.summary'), required: true }),
113
+ 'project-access-token': Flags.string({
114
+ summary: messages.getMessage('flags.diff-project-access-token.summary'),
115
+ required: true,
116
+ env: 'SIMPLY_CICD_PROJECT_ACCESS_TOKEN',
117
+ }),
118
+ out: Flags.string({ summary: messages.getMessage('flags.diff-out.summary') }),
119
+ };
120
+ //# sourceMappingURL=flags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flags.js","sourceRoot":"","sources":["../../../src/common/build/flags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAGpD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,CAAC;AAErF,2FAA2F;AAC3F,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC;QAC3B,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC;QAC1D,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC;QAC/B,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,gCAAgC,CAAC;QAC9D,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC;QAChC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,iCAAiC,CAAC;Q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AAC,UAAU,CAAC,yBAAyB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC/F,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3F,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC;QACnC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,yCAAyC,CAAC;QACvE,QAAQ,EAAE,IAAI;QACd,GAAG,EAAE,kCAAkC;KACxC,CAAC;IACF,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC,EAAE,CAAC;CAC9E,CAAC"}
@@ -0,0 +1,31 @@
1
+ export type RunFlexipageDeltaOptions = {
2
+ from: string;
3
+ to: string;
4
+ out?: string;
5
+ projectAccessToken?: string;
6
+ ciProjectId?: string;
7
+ ciMergeRequestIid?: string;
8
+ debug?: boolean;
9
+ };
10
+ /**
11
+ * Core runner for the upstream `flexipage-delta` / `flexipage-delta-gitlab` binaries (installed via
12
+ * `installFlowDeltaPlugin`). GitLab-specific by nature of those binaries themselves — not routed
13
+ * through the `VcsProvider` abstraction. Does not catch its own errors; callers decide how to handle them.
14
+ */
15
+ export declare function runFlexipageDelta(options: RunFlexipageDeltaOptions): Promise<void>;
16
+ export type GenerateFlexipageDiffOptions = RunFlexipageDeltaOptions & {
17
+ disabled?: boolean;
18
+ };
19
+ export type GenerateFlexipageDiffResult = {
20
+ skipped: boolean;
21
+ success: boolean;
22
+ };
23
+ /**
24
+ * Action-handler wrapper around `runFlexipageDelta`: checks the job-level skip flag, then runs the
25
+ * flexipage delta and logs (rather than throws) on failure, since a diff-posting step shouldn't
26
+ * fail the build.
27
+ *
28
+ * Fixes a bug from the original: the CLI wired its skip flag as `--disabled`, but this function
29
+ * checked `options.disableFlexipageDiff` — a property nothing ever set — so `--disabled` was a no-op.
30
+ */
31
+ export declare function generateFlexipageDiff(options: GenerateFlexipageDiffOptions): Promise<GenerateFlexipageDiffResult>;
@@ -0,0 +1,92 @@
1
+ /*
2
+ * Copyright (c) 2026, Clay Chipps; Copyright (c) 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 { execa } from 'execa';
17
+ import { logger } from '../logger.js';
18
+ import { installFlowDeltaPlugin } from '../sfPlugins.js';
19
+ /**
20
+ * Core runner for the upstream `flexipage-delta` / `flexipage-delta-gitlab` binaries (installed via
21
+ * `installFlowDeltaPlugin`). GitLab-specific by nature of those binaries themselves — not routed
22
+ * through the `VcsProvider` abstraction. Does not catch its own errors; callers decide how to handle them.
23
+ */
24
+ export async function runFlexipageDelta(options) {
25
+ const { from, to, out = 'flexipage-delta-out', projectAccessToken, ciProjectId, ciMergeRequestIid, debug = false, } = options;
26
+ if (!from || !to) {
27
+ throw new Error('Missing "from" or "to" commit SHA. Provide --from/--to arguments.');
28
+ }
29
+ await installFlowDeltaPlugin(debug);
30
+ await execa('flexipage-delta', [
31
+ '--repo',
32
+ '.',
33
+ '--from',
34
+ from,
35
+ '--to',
36
+ to,
37
+ '--path',
38
+ '**/*.flexipage-meta.xml',
39
+ '--changed-only',
40
+ '--out',
41
+ out,
42
+ '--json',
43
+ ], { stdio: 'inherit' });
44
+ // Bracket notation (rather than dot access) for the upstream binary's required env var names, which aren't camelCase.
45
+ const env = {};
46
+ if (projectAccessToken)
47
+ env['FlexipageDelta_GITLAB_TOKEN'] = projectAccessToken;
48
+ if (ciProjectId)
49
+ env.CI_PROJECT_ID = ciProjectId;
50
+ if (ciMergeRequestIid)
51
+ env.CI_MERGE_REQUEST_IID = ciMergeRequestIid;
52
+ const execaOptions = Object.keys(env).length > 0 ? { env } : {};
53
+ await execa('flexipage-delta-gitlab', ['--in', out, '--token', projectAccessToken], {
54
+ ...execaOptions,
55
+ stdio: 'inherit',
56
+ });
57
+ }
58
+ function extractErrorMessage(error) {
59
+ if (error instanceof Error && error.message) {
60
+ return error.message;
61
+ }
62
+ if (typeof error === 'string') {
63
+ return error;
64
+ }
65
+ return 'Unknown error running flexipage-delta';
66
+ }
67
+ /**
68
+ * Action-handler wrapper around `runFlexipageDelta`: checks the job-level skip flag, then runs the
69
+ * flexipage delta and logs (rather than throws) on failure, since a diff-posting step shouldn't
70
+ * fail the build.
71
+ *
72
+ * Fixes a bug from the original: the CLI wired its skip flag as `--disabled`, but this function
73
+ * checked `options.disableFlexipageDiff` — a property nothing ever set — so `--disabled` was a no-op.
74
+ */
75
+ export async function generateFlexipageDiff(options) {
76
+ if (options.disabled) {
77
+ logger.info('Flexipage diff generation is disabled. Skipping.');
78
+ return { skipped: true, success: false };
79
+ }
80
+ logger.info('Generating flexipage diff using flexipage-delta...');
81
+ try {
82
+ await runFlexipageDelta(options);
83
+ logger.success('Flexipage diff generation completed.');
84
+ return { skipped: false, success: true };
85
+ }
86
+ catch (error) {
87
+ logger.error('Flexipage diff generation failed.');
88
+ logger.error(extractErrorMessage(error));
89
+ return { skipped: false, success: false };
90
+ }
91
+ }
92
+ //# sourceMappingURL=flexipageDelta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flexipageDelta.js","sourceRoot":"","sources":["../../../src/common/build/flexipageDelta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,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BAAmB,CAAC,KAAc;IACzC,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,uCAAuC,CAAC;AACjD,CAAC;AAKD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAAqC;IAErC,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QACrB,MAAM,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;QAChE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;IAClE,IAAI,CAAC;QACH,MAAM,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACjC,MAAM,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC;QACvD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;QAClD,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;QACzC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5C,CAAC;AACH,CAAC"}
@@ -0,0 +1,30 @@
1
+ export type RunFlowDeltaOptions = {
2
+ from: string;
3
+ to: string;
4
+ out?: string;
5
+ projectAccessToken?: string;
6
+ ciProjectId?: string;
7
+ ciMergeRequestIid?: string;
8
+ debug?: boolean;
9
+ };
10
+ /**
11
+ * Core runner for the upstream `flow-delta` / `flow-delta-gitlab` binaries (installed via
12
+ * `installFlowDeltaPlugin`). GitLab-specific by nature of those binaries themselves — not routed
13
+ * through the `VcsProvider` abstraction. Does not catch its own errors; callers decide how to handle them.
14
+ */
15
+ export declare function runFlowDelta(options: RunFlowDeltaOptions): Promise<void>;
16
+ export type GenerateFlowDiffOptions = RunFlowDeltaOptions & {
17
+ disabled?: boolean;
18
+ };
19
+ export type GenerateFlowDiffResult = {
20
+ skipped: boolean;
21
+ success: boolean;
22
+ };
23
+ /**
24
+ * Action-handler wrapper around `runFlowDelta`: checks the job-level skip flag, then runs the flow
25
+ * delta and logs (rather than throws) on failure, since a diff-posting step shouldn't fail the build.
26
+ *
27
+ * Fixes a bug from the original: the CLI wired its skip flag as `--disabled`, but this function
28
+ * checked `options.disableFlowDiff` — a property nothing ever set — so `--disabled` was a no-op.
29
+ */
30
+ export declare function generateFlowDiff(options: GenerateFlowDiffOptions): Promise<GenerateFlowDiffResult>;
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Copyright (c) 2026, Clay Chipps; Copyright (c) 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 { execa } from 'execa';
17
+ import { logger } from '../logger.js';
18
+ import { installFlowDeltaPlugin } from '../sfPlugins.js';
19
+ /**
20
+ * Core runner for the upstream `flow-delta` / `flow-delta-gitlab` binaries (installed via
21
+ * `installFlowDeltaPlugin`). GitLab-specific by nature of those binaries themselves — not routed
22
+ * through the `VcsProvider` abstraction. Does not catch its own errors; callers decide how to handle them.
23
+ */
24
+ export async function runFlowDelta(options) {
25
+ const { from, to, out = 'flow-delta-out', projectAccessToken, ciProjectId, ciMergeRequestIid, debug = false, } = options;
26
+ if (!from || !to) {
27
+ throw new Error('Missing "from" or "to" commit SHA. Provide --from/--to arguments.');
28
+ }
29
+ await installFlowDeltaPlugin(debug);
30
+ await execa('flow-delta', [
31
+ '--repo',
32
+ '.',
33
+ '--from',
34
+ from,
35
+ '--to',
36
+ to,
37
+ '--path',
38
+ '**/*.flow-meta.xml',
39
+ '--changed-only',
40
+ '--out',
41
+ out,
42
+ '--json',
43
+ ], { stdio: 'inherit' });
44
+ // Bracket notation (rather than dot access) for the upstream binary's required env var names, which aren't camelCase.
45
+ const env = {};
46
+ if (projectAccessToken)
47
+ env['FlowDelta_GITLAB_TOKEN'] = projectAccessToken;
48
+ if (ciProjectId)
49
+ env.CI_PROJECT_ID = ciProjectId;
50
+ if (ciMergeRequestIid)
51
+ env.CI_MERGE_REQUEST_IID = ciMergeRequestIid;
52
+ const execaOptions = Object.keys(env).length > 0 ? { env } : {};
53
+ await execa('flow-delta-gitlab', ['--in', out, '--token', projectAccessToken], {
54
+ ...execaOptions,
55
+ stdio: 'inherit',
56
+ });
57
+ }
58
+ function extractErrorMessage(error) {
59
+ if (error instanceof Error && error.message) {
60
+ return error.message;
61
+ }
62
+ if (typeof error === 'string') {
63
+ return error;
64
+ }
65
+ return 'Unknown error running flow-delta';
66
+ }
67
+ /**
68
+ * Action-handler wrapper around `runFlowDelta`: checks the job-level skip flag, then runs the flow
69
+ * delta and logs (rather than throws) on failure, since a diff-posting step shouldn't fail the build.
70
+ *
71
+ * Fixes a bug from the original: the CLI wired its skip flag as `--disabled`, but this function
72
+ * checked `options.disableFlowDiff` — a property nothing ever set — so `--disabled` was a no-op.
73
+ */
74
+ export async function generateFlowDiff(options) {
75
+ if (options.disabled) {
76
+ logger.info('Flow diff generation is disabled. Skipping.');
77
+ return { skipped: true, success: false };
78
+ }
79
+ logger.info('Generating flow diff using flow-delta...');
80
+ try {
81
+ await runFlowDelta(options);
82
+ logger.success('Flow diff generation completed.');
83
+ return { skipped: false, success: true };
84
+ }
85
+ catch (error) {
86
+ logger.error('Flow diff generation failed.');
87
+ logger.error(extractErrorMessage(error));
88
+ return { skipped: false, success: false };
89
+ }
90
+ }
91
+ //# sourceMappingURL=flowDelta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flowDelta.js","sourceRoot":"","sources":["../../../src/common/build/flowDelta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAYzD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAA4B;IAC7D,MAAM,EACJ,IAAI,EACJ,EAAE,EACF,GAAG,GAAG,gBAAgB,EACtB,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,KAAK,GAAG,KAAK,GACd,GAAG,OAAO,CAAC;IACZ,IAAI,CAAC,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;IACvF,CAAC;IAED,MAAM,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,KAAK,CACT,YAAY,EACZ;QACE,QAAQ;QACR,GAAG;QACH,QAAQ;QACR,IAAI;QACJ,MAAM;QACN,EAAE;QACF,QAAQ;QACR,oBAAoB;QACpB,gBAAgB;QAChB,OAAO;QACP,GAAG;QACH,QAAQ;KACT,EACD,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC;IAEF,sHAAsH;IACtH,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,IAAI,kBAAkB;QAAE,GAAG,CAAC,wBAAwB,CAAC,GAAG,kBAAkB,CAAC;IAC3E,IAAI,WAAW;QAAE,GAAG,CAAC,aAAa,GAAG,WAAW,CAAC;IACjD,IA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MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;QACzC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5C,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ export type InstallDependenciesOptions = {
2
+ jwtKeyFile: string;
3
+ debug?: boolean;
4
+ installType?: 'All' | 'Delta' | 'Upgrade';
5
+ };
6
+ /** Authenticates to the scratch org (recorded in `SCRATCH_ORG_INFO.json`) and installs its packaged dependencies. */
7
+ export declare function installDependencies(options: InstallDependenciesOptions): Promise<void>;
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Copyright (c) 2026, Clay Chipps; Copyright (c) 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 { logger } from '../logger.js';
17
+ import { authenticateOrg } from '../sfAuth.js';
18
+ import { installPackageDependencies as installPackageDependenciesCommon } from '../sfPackages.js';
19
+ import { readScratchOrgInfo } from './scratchOrgInfo.js';
20
+ /** Authenticates to the scratch org (recorded in `SCRATCH_ORG_INFO.json`) and installs its packaged dependencies. */
21
+ export async function installDependencies(options) {
22
+ logger.info('Installing package dependencies into scratch org...');
23
+ const scratchOrgInfo = await readScratchOrgInfo();
24
+ await authenticateOrg({
25
+ username: scratchOrgInfo.authFields.username,
26
+ clientId: scratchOrgInfo.authFields.clientId,
27
+ instanceUrl: scratchOrgInfo.authFields.instanceUrl,
28
+ jwtKeyFile: options.jwtKeyFile,
29
+ setDefault: true,
30
+ debug: options.debug,
31
+ });
32
+ // A default org is now set, so no alias is needed.
33
+ await installPackageDependenciesCommon({ wait: '240', installType: options.installType });
34
+ logger.success('Package dependencies installed.');
35
+ }
36
+ //# sourceMappingURL=installDependencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installDependencies.js","sourceRoot":"","sources":["../../../src/common/build/installDependencies.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,0BAA0B,IAAI,gCAAgC,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAQzD,qHAAqH;AACrH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,OAAmC;IAC3E,MAAM,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC;IACnE,MAAM,cAAc,GAAG,MAAM,kBAAkB,EAAE,CAAC;IAClD,MAAM,eAAe,CAAC;QACpB,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,QAAQ;QAC5C,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,QAAQ;QAC5C,WAAW,EAAE,cAAc,CAAC,UAAU,CAAC,WAAW;QAClD,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,UAAU,EAAE,IAAI;QAChB,KAAK,EAAE,OAAO,CAAC,KAAK;KACrB,CAAC,CAAC;IACH,mDAAmD;IACnD,MAAM,gCAAgC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IAC1F,MAAM,CAAC,OAAO,CAAC,iCAAiC,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1,9 @@
1
+ export type RunLwcJestOptions = {
2
+ disabled?: boolean;
3
+ };
4
+ export type RunLwcJestResult = {
5
+ skipped: boolean;
6
+ success: boolean;
7
+ };
8
+ /** Installs the LWC Jest test libraries and runs the project's LWC Jest tests with coverage. */
9
+ export declare function runLwcJest(options: RunLwcJestOptions): Promise<RunLwcJestResult>;