@simplysf/simply-cicd 0.23.0 → 0.24.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 (244) hide show
  1. package/README.md +40 -39
  2. package/lib/commands/simply/cicd/build/check-permission-sets.d.ts +1 -1
  3. package/lib/commands/simply/cicd/build/check-permission-sets.js +1 -1
  4. package/lib/commands/simply/cicd/build/check-permission-sets.js.map +1 -1
  5. package/lib/commands/simply/cicd/build/cleanup-scratch-orgs.js +1 -2
  6. package/lib/commands/simply/cicd/build/cleanup-scratch-orgs.js.map +1 -1
  7. package/lib/commands/simply/cicd/build/create-fallback-tag.d.ts +1 -1
  8. package/lib/commands/simply/cicd/build/create-fallback-tag.js +1 -3
  9. package/lib/commands/simply/cicd/build/create-fallback-tag.js.map +1 -1
  10. package/lib/commands/simply/cicd/build/create-package-version.js +1 -3
  11. package/lib/commands/simply/cicd/build/create-package-version.js.map +1 -1
  12. package/lib/commands/simply/cicd/build/create-scratch.d.ts +1 -1
  13. package/lib/commands/simply/cicd/build/create-scratch.js +1 -3
  14. package/lib/commands/simply/cicd/build/create-scratch.js.map +1 -1
  15. package/lib/commands/simply/cicd/build/delete-scratch.js +1 -3
  16. package/lib/commands/simply/cicd/build/delete-scratch.js.map +1 -1
  17. package/lib/commands/simply/cicd/build/determine-package-changes.js +1 -2
  18. package/lib/commands/simply/cicd/build/determine-package-changes.js.map +1 -1
  19. package/lib/commands/simply/cicd/build/generate-flexipage-diff.d.ts +1 -1
  20. package/lib/commands/simply/cicd/build/generate-flexipage-diff.js +1 -1
  21. package/lib/commands/simply/cicd/build/generate-flexipage-diff.js.map +1 -1
  22. package/lib/commands/simply/cicd/build/generate-flow-diff.d.ts +1 -1
  23. package/lib/commands/simply/cicd/build/generate-flow-diff.js +1 -1
  24. package/lib/commands/simply/cicd/build/generate-flow-diff.js.map +1 -1
  25. package/lib/commands/simply/cicd/build/install-dependencies.js +1 -3
  26. package/lib/commands/simply/cicd/build/install-dependencies.js.map +1 -1
  27. package/lib/commands/simply/cicd/build/lwc-jest.d.ts +1 -1
  28. package/lib/commands/simply/cicd/build/lwc-jest.js +1 -1
  29. package/lib/commands/simply/cicd/build/lwc-jest.js.map +1 -1
  30. package/lib/commands/simply/cicd/build/publish-utam-page-objects.d.ts +1 -1
  31. package/lib/commands/simply/cicd/build/publish-utam-page-objects.js +1 -1
  32. package/lib/commands/simply/cicd/build/publish-utam-page-objects.js.map +1 -1
  33. package/lib/commands/simply/cicd/build/push-scratch.js +1 -3
  34. package/lib/commands/simply/cicd/build/push-scratch.js.map +1 -1
  35. package/lib/commands/simply/cicd/build/test-scratch.js +1 -3
  36. package/lib/commands/simply/cicd/build/test-scratch.js.map +1 -1
  37. package/lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.js +2 -2
  38. package/lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.js.map +1 -1
  39. package/lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.js +1 -1
  40. package/lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.js.map +1 -1
  41. package/lib/commands/simply/cicd/deploy/happy-soup/install-packaged.js +1 -1
  42. package/lib/commands/simply/cicd/deploy/happy-soup/install-packaged.js.map +1 -1
  43. package/lib/commands/simply/cicd/deploy/happy-soup/post-deploy.js +2 -2
  44. package/lib/commands/simply/cicd/deploy/happy-soup/post-deploy.js.map +1 -1
  45. package/lib/commands/simply/cicd/deploy/happy-soup/post-destructive.js +2 -2
  46. package/lib/commands/simply/cicd/deploy/happy-soup/post-destructive.js.map +1 -1
  47. package/lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.js +2 -2
  48. package/lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.js.map +1 -1
  49. package/lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.js +1 -1
  50. package/lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.js.map +1 -1
  51. package/lib/commands/simply/cicd/deploy/happy-soup/validate.js +1 -1
  52. package/lib/commands/simply/cicd/deploy/happy-soup/validate.js.map +1 -1
  53. package/lib/commands/simply/cicd/deploy/project/deploy-unpackaged.js +2 -2
  54. package/lib/commands/simply/cicd/deploy/project/deploy-unpackaged.js.map +1 -1
  55. package/lib/commands/simply/cicd/deploy/project/install-packaged.js +1 -1
  56. package/lib/commands/simply/cicd/deploy/project/install-packaged.js.map +1 -1
  57. package/lib/commands/simply/cicd/deploy/project/post-deploy.js +2 -2
  58. package/lib/commands/simply/cicd/deploy/project/post-deploy.js.map +1 -1
  59. package/lib/commands/simply/cicd/deploy/project/post-destructive.js +2 -2
  60. package/lib/commands/simply/cicd/deploy/project/post-destructive.js.map +1 -1
  61. package/lib/commands/simply/cicd/deploy/project/pre-destructive.js +2 -2
  62. package/lib/commands/simply/cicd/deploy/project/pre-destructive.js.map +1 -1
  63. package/lib/commands/simply/cicd/deploy/project/run-apex-tests.js +1 -1
  64. package/lib/commands/simply/cicd/deploy/project/run-apex-tests.js.map +1 -1
  65. package/lib/commands/simply/cicd/deploy/project/validate.js +1 -1
  66. package/lib/commands/simply/cicd/deploy/project/validate.js.map +1 -1
  67. package/lib/commands/simply/cicd/deploy/validate.js +1 -1
  68. package/lib/commands/simply/cicd/deploy/validate.js.map +1 -1
  69. package/lib/commands/simply/cicd/notify/build.d.ts +2 -3
  70. package/lib/commands/simply/cicd/notify/build.js +1 -3
  71. package/lib/commands/simply/cicd/notify/build.js.map +1 -1
  72. package/lib/commands/simply/cicd/notify/happy-soup.d.ts +2 -3
  73. package/lib/commands/simply/cicd/notify/happy-soup.js +4 -6
  74. package/lib/commands/simply/cicd/notify/happy-soup.js.map +1 -1
  75. package/lib/commands/simply/cicd/notify/project.d.ts +1 -2
  76. package/lib/commands/simply/cicd/notify/project.js +3 -5
  77. package/lib/commands/simply/cicd/notify/project.js.map +1 -1
  78. package/lib/commands/simply/cicd/notify/teams.js +1 -2
  79. package/lib/commands/simply/cicd/notify/teams.js.map +1 -1
  80. package/lib/commands/simply/cicd/sfdx-dependabot.d.ts +1 -2
  81. package/lib/commands/simply/cicd/sfdx-dependabot.js +1 -4
  82. package/lib/commands/simply/cicd/sfdx-dependabot.js.map +1 -1
  83. package/lib/common/deploy/stageCommand.d.ts +0 -49
  84. package/lib/common/deploy/stageCommand.js +0 -54
  85. package/lib/common/deploy/stageCommand.js.map +1 -1
  86. package/messages/simply.cicd.build.create-scratch.md +1 -1
  87. package/oclif.manifest.json +2 -2
  88. package/package.json +3 -12
  89. package/lib/common/build/checkPermissionSets.d.ts +0 -22
  90. package/lib/common/build/checkPermissionSets.js +0 -102
  91. package/lib/common/build/checkPermissionSets.js.map +0 -1
  92. package/lib/common/build/cleanupScratchOrgs.d.ts +0 -6
  93. package/lib/common/build/cleanupScratchOrgs.js +0 -91
  94. package/lib/common/build/cleanupScratchOrgs.js.map +0 -1
  95. package/lib/common/build/createFallbackTag.d.ts +0 -24
  96. package/lib/common/build/createFallbackTag.js +0 -147
  97. package/lib/common/build/createFallbackTag.js.map +0 -1
  98. package/lib/common/build/createPackageVersion.d.ts +0 -42
  99. package/lib/common/build/createPackageVersion.js +0 -198
  100. package/lib/common/build/createPackageVersion.js.map +0 -1
  101. package/lib/common/build/createScratchOrg.d.ts +0 -14
  102. package/lib/common/build/createScratchOrg.js +0 -192
  103. package/lib/common/build/createScratchOrg.js.map +0 -1
  104. package/lib/common/build/deleteScratchOrg.d.ts +0 -13
  105. package/lib/common/build/deleteScratchOrg.js +0 -62
  106. package/lib/common/build/deleteScratchOrg.js.map +0 -1
  107. package/lib/common/build/deltaRunner.d.ts +0 -73
  108. package/lib/common/build/deltaRunner.js +0 -109
  109. package/lib/common/build/deltaRunner.js.map +0 -1
  110. package/lib/common/build/determinePackageChanges.d.ts +0 -11
  111. package/lib/common/build/determinePackageChanges.js +0 -90
  112. package/lib/common/build/determinePackageChanges.js.map +0 -1
  113. package/lib/common/build/devHubs.d.ts +0 -12
  114. package/lib/common/build/devHubs.js +0 -42
  115. package/lib/common/build/devHubs.js.map +0 -1
  116. package/lib/common/build/flexipageDelta.d.ts +0 -18
  117. package/lib/common/build/flexipageDelta.js +0 -35
  118. package/lib/common/build/flexipageDelta.js.map +0 -1
  119. package/lib/common/build/flowDelta.d.ts +0 -17
  120. package/lib/common/build/flowDelta.js +0 -34
  121. package/lib/common/build/flowDelta.js.map +0 -1
  122. package/lib/common/build/installDependencies.d.ts +0 -10
  123. package/lib/common/build/installDependencies.js +0 -39
  124. package/lib/common/build/installDependencies.js.map +0 -1
  125. package/lib/common/build/lwcJest.d.ts +0 -25
  126. package/lib/common/build/lwcJest.js +0 -126
  127. package/lib/common/build/lwcJest.js.map +0 -1
  128. package/lib/common/build/publishUtamPageObjects.d.ts +0 -50
  129. package/lib/common/build/publishUtamPageObjects.js +0 -283
  130. package/lib/common/build/publishUtamPageObjects.js.map +0 -1
  131. package/lib/common/build/pushScratch.d.ts +0 -9
  132. package/lib/common/build/pushScratch.js +0 -60
  133. package/lib/common/build/pushScratch.js.map +0 -1
  134. package/lib/common/build/scratchOrgAuth.d.ts +0 -18
  135. package/lib/common/build/scratchOrgAuth.js +0 -52
  136. package/lib/common/build/scratchOrgAuth.js.map +0 -1
  137. package/lib/common/build/scratchOrgInfo.d.ts +0 -14
  138. package/lib/common/build/scratchOrgInfo.js +0 -21
  139. package/lib/common/build/scratchOrgInfo.js.map +0 -1
  140. package/lib/common/build/skipGuard.d.ts +0 -8
  141. package/lib/common/build/skipGuard.js +0 -42
  142. package/lib/common/build/skipGuard.js.map +0 -1
  143. package/lib/common/build/testScratch.d.ts +0 -15
  144. package/lib/common/build/testScratch.js +0 -42
  145. package/lib/common/build/testScratch.js.map +0 -1
  146. package/lib/common/build/utamPageObjects.d.ts +0 -143
  147. package/lib/common/build/utamPageObjects.js +0 -245
  148. package/lib/common/build/utamPageObjects.js.map +0 -1
  149. package/lib/common/build/versionTagFormat.d.ts +0 -57
  150. package/lib/common/build/versionTagFormat.js +0 -194
  151. package/lib/common/build/versionTagFormat.js.map +0 -1
  152. package/lib/common/deploy/deployCommon.d.ts +0 -105
  153. package/lib/common/deploy/deployCommon.js +0 -358
  154. package/lib/common/deploy/deployCommon.js.map +0 -1
  155. package/lib/common/deploy/deployHappySoup.d.ts +0 -56
  156. package/lib/common/deploy/deployHappySoup.js +0 -160
  157. package/lib/common/deploy/deployHappySoup.js.map +0 -1
  158. package/lib/common/deploy/deployProject.d.ts +0 -27
  159. package/lib/common/deploy/deployProject.js +0 -114
  160. package/lib/common/deploy/deployProject.js.map +0 -1
  161. package/lib/common/deploy/runDeployStage.d.ts +0 -16
  162. package/lib/common/deploy/runDeployStage.js +0 -65
  163. package/lib/common/deploy/runDeployStage.js.map +0 -1
  164. package/lib/common/deploy/validate.d.ts +0 -11
  165. package/lib/common/deploy/validate.js +0 -54
  166. package/lib/common/deploy/validate.js.map +0 -1
  167. package/lib/common/env.d.ts +0 -9
  168. package/lib/common/env.js +0 -47
  169. package/lib/common/env.js.map +0 -1
  170. package/lib/common/exec/sfCli.d.ts +0 -27
  171. package/lib/common/exec/sfCli.js +0 -50
  172. package/lib/common/exec/sfCli.js.map +0 -1
  173. package/lib/common/flags/env.d.ts +0 -44
  174. package/lib/common/flags/env.js +0 -81
  175. package/lib/common/flags/env.js.map +0 -1
  176. package/lib/common/git.d.ts +0 -32
  177. package/lib/common/git.js +0 -106
  178. package/lib/common/git.js.map +0 -1
  179. package/lib/common/happySoup/resolveOriginProject.d.ts +0 -22
  180. package/lib/common/happySoup/resolveOriginProject.js +0 -61
  181. package/lib/common/happySoup/resolveOriginProject.js.map +0 -1
  182. package/lib/common/logger.d.ts +0 -10
  183. package/lib/common/logger.js +0 -33
  184. package/lib/common/logger.js.map +0 -1
  185. package/lib/common/notify/buildNotification.d.ts +0 -53
  186. package/lib/common/notify/buildNotification.js +0 -176
  187. package/lib/common/notify/buildNotification.js.map +0 -1
  188. package/lib/common/notify/getCommitStories.d.ts +0 -30
  189. package/lib/common/notify/getCommitStories.js +0 -70
  190. package/lib/common/notify/getCommitStories.js.map +0 -1
  191. package/lib/common/notify/getRemoteCommitStories.d.ts +0 -10
  192. package/lib/common/notify/getRemoteCommitStories.js +0 -45
  193. package/lib/common/notify/getRemoteCommitStories.js.map +0 -1
  194. package/lib/common/notify/happySoupNotification.d.ts +0 -26
  195. package/lib/common/notify/happySoupNotification.js +0 -139
  196. package/lib/common/notify/happySoupNotification.js.map +0 -1
  197. package/lib/common/notify/projectNotification.d.ts +0 -46
  198. package/lib/common/notify/projectNotification.js +0 -177
  199. package/lib/common/notify/projectNotification.js.map +0 -1
  200. package/lib/common/notify/renderTemplate.d.ts +0 -3
  201. package/lib/common/notify/renderTemplate.js +0 -24
  202. package/lib/common/notify/renderTemplate.js.map +0 -1
  203. package/lib/common/notify/sendNotification.d.ts +0 -2
  204. package/lib/common/notify/sendNotification.js +0 -50
  205. package/lib/common/notify/sendNotification.js.map +0 -1
  206. package/lib/common/notify/templates.d.ts +0 -13
  207. package/lib/common/notify/templates.js +0 -118
  208. package/lib/common/notify/templates.js.map +0 -1
  209. package/lib/common/schemas/deployConfig.d.ts +0 -25
  210. package/lib/common/schemas/deployConfig.js +0 -55
  211. package/lib/common/schemas/deployConfig.js.map +0 -1
  212. package/lib/common/schemas/deployProgress.d.ts +0 -33
  213. package/lib/common/schemas/deployProgress.js +0 -46
  214. package/lib/common/schemas/deployProgress.js.map +0 -1
  215. package/lib/common/schemas/deployRules.d.ts +0 -34
  216. package/lib/common/schemas/deployRules.js +0 -40
  217. package/lib/common/schemas/deployRules.js.map +0 -1
  218. package/lib/common/sfApex.d.ts +0 -22
  219. package/lib/common/sfApex.js +0 -169
  220. package/lib/common/sfApex.js.map +0 -1
  221. package/lib/common/sfAuth.d.ts +0 -19
  222. package/lib/common/sfAuth.js +0 -78
  223. package/lib/common/sfAuth.js.map +0 -1
  224. package/lib/common/sfConfig.d.ts +0 -23
  225. package/lib/common/sfConfig.js +0 -82
  226. package/lib/common/sfConfig.js.map +0 -1
  227. package/lib/common/sfPackages.d.ts +0 -31
  228. package/lib/common/sfPackages.js +0 -143
  229. package/lib/common/sfPackages.js.map +0 -1
  230. package/lib/common/sfPlugins.d.ts +0 -11
  231. package/lib/common/sfPlugins.js +0 -134
  232. package/lib/common/sfPlugins.js.map +0 -1
  233. package/lib/common/sfdxDependabot/dependabotRun.d.ts +0 -95
  234. package/lib/common/sfdxDependabot/dependabotRun.js +0 -287
  235. package/lib/common/sfdxDependabot/dependabotRun.js.map +0 -1
  236. package/lib/common/sfdxDependabot/updater.d.ts +0 -14
  237. package/lib/common/sfdxDependabot/updater.js +0 -94
  238. package/lib/common/sfdxDependabot/updater.js.map +0 -1
  239. package/lib/config/defaultDeploymentPlugins.d.ts +0 -2
  240. package/lib/config/defaultDeploymentPlugins.js +0 -18
  241. package/lib/config/defaultDeploymentPlugins.js.map +0 -1
  242. package/lib/config/trustedPlugins.d.ts +0 -2
  243. package/lib/config/trustedPlugins.js +0 -18
  244. package/lib/config/trustedPlugins.js.map +0 -1
@@ -1,160 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, SimplySF.
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 { createVcsProvider } from '@simplysf/simply-cicd-core';
19
- import { runSf } from '../exec/sfCli.js';
20
- import { addGitRemote } from '../git.js';
21
- import { logger } from '../logger.js';
22
- import { installPackageDependencies as installPackageDependenciesCommon, resolveUpgradedPackages, } from '../sfPackages.js';
23
- import { runDeployStage } from './runDeployStage.js';
24
- import { determineDeployConfigFile, loadProgress, printDeploymentSummary, runDeploymentSteps, updateProgress, } from './deployCommon.js';
25
- async function archiveOrRemoveDeployConfig(finalDeployConfigFile, remoteAlias) {
26
- if (finalDeployConfigFile) {
27
- try {
28
- await fs.access(finalDeployConfigFile);
29
- const newDeployPath = 'config/deploy.json';
30
- await fs.copyFile(finalDeployConfigFile, newDeployPath);
31
- await execa('git', ['add', newDeployPath]);
32
- await execa('git', ['commit', '-m', 'Archiving deploy.json [skip ci]', newDeployPath]);
33
- await execa('git', ['push', remoteAlias]);
34
- return;
35
- }
36
- catch {
37
- // Fall through and try to remove an obsolete config/deploy.json instead.
38
- }
39
- }
40
- try {
41
- await fs.access('config/deploy.json');
42
- await execa('git', ['rm', 'config/deploy.json']);
43
- await execa('git', ['commit', '-m', 'Removing obsolete config/deploy.json [skip ci]', 'config/deploy.json']);
44
- await execa('git', ['push', remoteAlias]);
45
- }
46
- catch {
47
- logger.warn('Unable to find a deploy.json to archive.');
48
- }
49
- }
50
- /** Fetches/switches to the release branch, then archives (or removes an obsolete) `config/deploy.json`. */
51
- async function deploymentCloseOut(config) {
52
- const { projectAccessToken, ciPipelineId, ciProjectPath, ciCommitRefName, deployReleaseDate, deployConfigFile, vcsHost, vcsProvider: vcsProviderKind, } = config;
53
- const vcsProvider = createVcsProvider(vcsProviderKind, { host: vcsHost, token: projectAccessToken });
54
- const remoteAlias = await addGitRemote(ciPipelineId, projectAccessToken, ciProjectPath, vcsProvider);
55
- await execa('git', ['fetch']);
56
- await execa('git', ['switch', ciCommitRefName]);
57
- const finalDeployConfigFile = deployReleaseDate ? `deployment-configs/${deployReleaseDate}.json` : deployConfigFile;
58
- await archiveOrRemoveDeployConfig(finalDeployConfigFile, remoteAlias);
59
- }
60
- function formatDeploymentTimestamp(date) {
61
- const formatter = new Intl.DateTimeFormat('en-US', {
62
- timeZone: 'America/New_York',
63
- year: 'numeric',
64
- month: '2-digit',
65
- day: '2-digit',
66
- hour: '2-digit',
67
- minute: '2-digit',
68
- hourCycle: 'h23',
69
- });
70
- const parts = formatter.formatToParts(date);
71
- const partMap = Object.fromEntries(parts.map((p) => [p.type, p.value]));
72
- return `${partMap.year}${partMap.month}${partMap.day}.${partMap.hour}${partMap.minute}`;
73
- }
74
- function buildDeploymentTagMessage(orgDomainPrefix, currentTime, config, vcsProvider) {
75
- let message = `deployed to org ${orgDomainPrefix} at ${currentTime}`;
76
- if (config.ciPipelineUrl) {
77
- message += ` Associated pipeline - ${config.ciPipelineUrl}`;
78
- }
79
- if (config.ciMergeRequestProjectUrl && config.ciMergeRequestIid) {
80
- // Both the wording and the URL path differ per platform, so both come from the provider.
81
- const changeRequestUrl = vcsProvider.buildChangeRequestUrl(config.ciMergeRequestProjectUrl, config.ciMergeRequestIid);
82
- message += ` Associated ${vcsProvider.terminology.changeRequest} - ${changeRequestUrl}`;
83
- }
84
- return message;
85
- }
86
- /** Tags the current commit with deployment details (org, timestamp, pipeline/MR links) and pushes the tag. */
87
- async function tagDeployment(config) {
88
- const { alias, projectAccessToken, ciPipelineId, ciProjectPath, vcsHost, vcsProvider: vcsProviderKind } = config;
89
- const vcsProvider = createVcsProvider(vcsProviderKind, { host: vcsHost, token: projectAccessToken });
90
- const remoteAlias = await addGitRemote(ciPipelineId, projectAccessToken, ciProjectPath, vcsProvider);
91
- const { stdout: orgDisplay } = await runSf(['org', 'display', '--target-org', alias ?? '', '--json']);
92
- const instanceUrlResult = JSON.parse(orgDisplay).result.instanceUrl;
93
- const instanceSlug = instanceUrlResult.split('.')[0];
94
- const orgDomainPrefix = instanceSlug.replace('https://', '');
95
- if (!orgDomainPrefix) {
96
- throw new Error('Unable to determine org domain prefix.');
97
- }
98
- const currentTime = formatDeploymentTimestamp(new Date());
99
- const gitMessage = buildDeploymentTagMessage(orgDomainPrefix, currentTime, config, vcsProvider);
100
- const tagName = `deployed--${orgDomainPrefix}-${currentTime}`;
101
- await execa('git', ['tag', '-m', gitMessage, tagName]);
102
- await execa('git', ['push', remoteAlias, '--tags']);
103
- logger.log(`Deployment tagged as ${tagName}`);
104
- }
105
- /**
106
- * Installs the target org's packaged dependencies, and — for every dependency that upgraded an
107
- * already-installed package — resolves the previous/target version's origin commit SHA and
108
- * pipeline URL via `sf package version report`. Detection only: the remote commit compare and
109
- * story extraction happen later, at notify time (`notify happy-soup`), once the origin repo per
110
- * package can be resolved. The target org must already be authenticated.
111
- */
112
- async function installPackagedAndDetectUpgrades(config) {
113
- const { alias, wait, installType, upgradeType } = config;
114
- const installResults = await installPackageDependenciesCommon({ alias, wait, installType, upgradeType });
115
- return resolveUpgradedPackages(installResults, { packagingDevhub: config.packagingDevhub });
116
- }
117
- async function runHappySoupStage(stage, config, deployConfigFile) {
118
- if (stage === 'install-packaged') {
119
- const upgradedPackages = await installPackagedAndDetectUpgrades(config);
120
- const deployProgressFile = config.deployProgressFile ?? 'DEPLOY_PROGRESS.json';
121
- const progress = await loadProgress(deployProgressFile);
122
- progress.upgradedPackages = upgradedPackages;
123
- await updateProgress(deployProgressFile, progress);
124
- }
125
- else if (stage === 'tag-deployment') {
126
- // The CLI layer requires projectAccessToken/ciPipelineId/ciProjectPath for this stage.
127
- await tagDeployment(config);
128
- }
129
- else if (stage === 'deployment-close-out') {
130
- // The CLI layer requires projectAccessToken/ciPipelineId/ciProjectPath/ciCommitRefName for this stage.
131
- await deploymentCloseOut({ ...config, deployConfigFile });
132
- }
133
- else {
134
- // The CLI layer requires ciJobToken for every other stage.
135
- const stepsConfig = {
136
- ...config,
137
- ciJobToken: config.ciJobToken ?? '',
138
- stage,
139
- deployConfigFile: deployConfigFile ?? '',
140
- deployProgressFile: config.deployProgressFile ?? 'DEPLOY_PROGRESS.json',
141
- deployRulesFile: config.deployRulesFile ?? 'config/deploy-rules.json',
142
- };
143
- const { deployProgress } = await runDeploymentSteps(stepsConfig);
144
- printDeploymentSummary(deployProgress, stage);
145
- }
146
- }
147
- /**
148
- * Runs a "happy-soup" (multi-repo, unlocked-package) deployment stage. `install-packaged` installs
149
- * dependencies only; `tag-deployment` and `deployment-close-out` have their own git-native logic;
150
- * every other stage runs through the resumable deployment-steps loop against the branch-derived
151
- * (or explicit) deploy config file.
152
- */
153
- export async function deployHappySoup(options) {
154
- const { stage, ...config } = options;
155
- await runDeployStage(stage, options, async () => {
156
- const deployConfigFile = determineDeployConfigFile(config.sourceBranchName, config.deployConfigFile);
157
- await runHappySoupStage(stage, config, deployConfigFile);
158
- });
159
- }
160
- //# sourceMappingURL=deployHappySoup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deployHappySoup.js","sourceRoot":"","sources":["../../../src/common/deploy/deployHappySoup.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,iBAAiB,EAA0C,MAAM,4BAA4B,CAAC;AACvG,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EACL,0BAA0B,IAAI,gCAAgC,EAC9D,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACL,yBAAyB,EACzB,YAAY,EACZ,sBAAsB,EACtB,kBAAkB,EAClB,cAAc,GAGf,MAAM,mBAAmB,CAAC;AAE3B,KAAK,UAAU,2BAA2B,CACxC,qBAAyC,EACzC,WAAmB;IAEnB,IAAI,qBAAqB,EAAE,CAAC;QAC1B,IAAI,CAAC;YACH,MAAM,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;YACvC,MAAM,aAAa,GAAG,oBAAoB,CAAC;YAC3C,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,EAAE,aAAa,CAAC,CAAC;YACxD,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,KA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CAAC;IACrD,CAAC;SAAM,IAAI,KAAK,KAAK,gBAAgB,EAAE,CAAC;QACtC,uFAAuF;QACvF,MAAM,aAAa,CAAC,MAA6B,CAAC,CAAC;IACrD,CAAC;SAAM,IAAI,KAAK,KAAK,sBAAsB,EAAE,CAAC;QAC5C,uGAAuG;QACvG,MAAM,kBAAkB,CAAC,EAAE,GAAI,MAAmC,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAC1F,CAAC;SAAM,CAAC;QACN,2DAA2D;QAC3D,MAAM,WAAW,GAA6B;YAC5C,GAAG,MAAM;YACT,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,EAAE;YACnC,KAAK;YACL,gBAAgB,EAAE,gBAAgB,IAAI,EAAE;YACxC,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,IAAI,sBAAsB;YACvE,eAAe,EAAE,MAAM,CAAC,eAAe,IAAI,0BAA0B;SACtE,CAAC;QACF,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,kBAAkB,CAAC,WAAW,CAAC,CAAC;QACjE,sBAAsB,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAChD,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAA+B;IACnE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC;IAErC,MAAM,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE;QAC9C,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC;QACrG,MAAM,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,27 +0,0 @@
1
- import type { VcsProviderKind } from '@simplysf/simply-cicd-core';
2
- import { type OrgAuthConfig, type RunApexTestsConfig } from './deployCommon.js';
3
- type UpgradeType = 'DeprecateOnly' | 'Mixed' | 'Delete';
4
- export type InstallProjectPackageConfig = OrgAuthConfig & {
5
- subscriberPackageVersionId?: string;
6
- debug?: boolean;
7
- upgradeType?: UpgradeType;
8
- };
9
- export type DeployProjectOptions = OrgAuthConfig & RunApexTestsConfig & InstallProjectPackageConfig & {
10
- stage: string;
11
- deployConfigFile?: string;
12
- deployRulesFile?: string;
13
- deployProgressFile?: string;
14
- startFrom?: string;
15
- tests?: string;
16
- ciJobToken: string;
17
- vcsHost?: string;
18
- vcsProvider: VcsProviderKind;
19
- installType?: 'All' | 'Delta' | 'Upgrade';
20
- };
21
- /**
22
- * Runs a single-package "project" deployment stage: `install-packaged` installs dependencies plus
23
- * the project's own package, `run-apex-tests` delegates to the shared Apex test runner, and every
24
- * other stage runs through the resumable deployment-steps loop against `config/deploy.json`.
25
- */
26
- export declare function deployProject(options: DeployProjectOptions): Promise<void>;
27
- export {};
@@ -1,114 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, SimplySF.
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 { isSubscriberPackageVersionId } from '@simplysf/simply-core';
18
- import { logger } from '../logger.js';
19
- import { runDeployStage } from './runDeployStage.js';
20
- import { installPackageDependencies, printDeploymentSummary, runApexTests, runDeploymentSteps, } from './deployCommon.js';
21
- async function installPackageById(packageId, alias, upgradeType) {
22
- await execa('sf', [
23
- 'package',
24
- 'install',
25
- '--apex-compile',
26
- 'package',
27
- '--package',
28
- packageId,
29
- '--target-org',
30
- alias ?? '',
31
- '--wait',
32
- '120',
33
- '--upgrade-type',
34
- upgradeType,
35
- '--no-prompt',
36
- ], { stdio: 'inherit' });
37
- }
38
- async function installProjectPackageFromSubscriberId(subscriberPackageVersionId, alias, upgradeType) {
39
- logger.info(`Installing package version from --subscriber-package-version-id: ${subscriberPackageVersionId}`);
40
- await installPackageById(subscriberPackageVersionId, alias, upgradeType);
41
- logger.success(`Successfully installed package ${subscriberPackageVersionId}.`);
42
- }
43
- async function installProjectPackageFromGitTag(alias, upgradeType) {
44
- logger.info('Checking for package version in git tag...');
45
- try {
46
- const { stdout: currentTagRaw } = await execa('git', ['tag', '--points-at', 'HEAD']);
47
- const currentTag = currentTagRaw.split('\n')[0].trim();
48
- if (!currentTag) {
49
- logger.info('No git tag found at HEAD. Skipping main package installation.');
50
- return;
51
- }
52
- logger.info(`Found git tag ${currentTag}, checking for package ID...`);
53
- const { stdout: tagAnnotation } = await execa('git', ['tag', '-l', '-n1', currentTag]);
54
- const parts = tagAnnotation.trim().split(/\s+/);
55
- if (parts.length <= 1) {
56
- logger.info(`Git tag ${currentTag} has no annotation. Skipping main package installation.`);
57
- return;
58
- }
59
- const packageId = parts.slice(1).join(' ');
60
- if (!isSubscriberPackageVersionId(packageId)) {
61
- logger.info('No 04t package version found in git tag annotation. Skipping main package installation.');
62
- return;
63
- }
64
- logger.info(`Found package ID ${packageId} in tag. Installing...`);
65
- await installPackageById(packageId, alias, upgradeType);
66
- logger.success(`Successfully installed package ${packageId} from git tag.`);
67
- }
68
- catch (error) {
69
- logger.warn(`Could not determine package version from git tag: ${error.message}. Skipping main package installation.`);
70
- }
71
- }
72
- /**
73
- * Installs the project's own package into the target org: prioritizes `--subscriber-package-version-id`
74
- * if given, else looks for a `04t...` package ID annotated on the git tag pointing at HEAD.
75
- */
76
- async function installProjectPackage(config) {
77
- const { alias, subscriberPackageVersionId, upgradeType = 'Mixed' } = config;
78
- logger.info('Installing main package...');
79
- if (subscriberPackageVersionId && isSubscriberPackageVersionId(subscriberPackageVersionId)) {
80
- await installProjectPackageFromSubscriberId(subscriberPackageVersionId, alias, upgradeType);
81
- }
82
- else {
83
- await installProjectPackageFromGitTag(alias, upgradeType);
84
- }
85
- }
86
- /**
87
- * Runs a single-package "project" deployment stage: `install-packaged` installs dependencies plus
88
- * the project's own package, `run-apex-tests` delegates to the shared Apex test runner, and every
89
- * other stage runs through the resumable deployment-steps loop against `config/deploy.json`.
90
- */
91
- export async function deployProject(options) {
92
- const { stage, ...config } = options;
93
- await runDeployStage(stage, options, async () => {
94
- if (stage === 'install-packaged') {
95
- await installPackageDependencies(config);
96
- await installProjectPackage(config);
97
- }
98
- else if (stage === 'run-apex-tests') {
99
- await runApexTests(config);
100
- }
101
- else {
102
- const { deployProgress } = await runDeploymentSteps({
103
- ...config,
104
- isProjectDeployment: true,
105
- stage,
106
- deployConfigFile: config.deployConfigFile ?? 'config/deploy.json',
107
- deployProgressFile: config.deployProgressFile ?? 'DEPLOY_PROGRESS.json',
108
- deployRulesFile: config.deployRulesFile ?? 'config/deploy-rules.json',
109
- });
110
- printDeploymentSummary(deployProgress, stage);
111
- }
112
- });
113
- }
114
- //# sourceMappingURL=deployProject.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deployProject.js","sourceRoot":"","sources":["../../../src/common/deploy/deployProject.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,YAAY,EACZ,kBAAkB,GAGnB,MAAM,mBAAmB,CAAC;AAI3B,KAAK,UAAU,kBAAkB,CAC/B,SAAiB,EACjB,KAAyB,EACzB,WAAwB;IAExB,MAAM,KAAK,CACT,IAAI,EACJ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AAC,OAA6B;IAC/D,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC;IAErC,MAAM,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE;QAC9C,IAAI,KAAK,KAAK,kBAAkB,EAAE,CAAC;YACjC,MAAM,0BAA0B,CAAC,MAAM,CAAC,CAAC;YACzC,MAAM,qBAAqB,CAAC,MAAM,CAAC,CAAC;QACtC,CAAC;aAAM,IAAI,KAAK,KAAK,gBAAgB,EAAE,CAAC;YACtC,MAAM,YAAY,CAAC,MAAM,CAAC,CAAC;QAC7B,CAAC;aAAM,CAAC;YACN,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,kBAAkB,CAAC;gBAClD,GAAG,MAAM;gBACT,mBAAmB,EAAE,IAAI;gBACzB,KAAK;gBACL,gBAAgB,EAAE,MAAM,CAAC,gBAAgB,IAAI,oBAAoB;gBACjE,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,IAAI,sBAAsB;gBACvE,eAAe,EAAE,MAAM,CAAC,eAAe,IAAI,0BAA0B;aACtE,CAAC,CAAC;YACH,sBAAsB,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QAChD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,16 +0,0 @@
1
- /**
2
- * Run one deployment stage inside the shared banner/timing/error frame.
3
- *
4
- * Both deployment styles bracket a stage the same way: announce it, install the deployment
5
- * plugins, run it, then report how long it took — or, on failure, report the elapsed time and the
6
- * failing job before rethrowing. Only the middle step differs between them.
7
- *
8
- * @param stage - The stage name, as it appears in the banner.
9
- * @param options - The stage's full options, logged verbatim when `debug` is set.
10
- * @param runStage - The stage's actual work.
11
- * @throws Whatever `runStage` throws, after logging it. The error is never swallowed — the CI job
12
- * still has to fail.
13
- */
14
- export declare function runDeployStage(stage: string, options: {
15
- debug?: boolean;
16
- }, runStage: () => Promise<void>): Promise<void>;
@@ -1,65 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, SimplySF.
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 chalk from 'chalk';
17
- import { logger } from '../logger.js';
18
- import { installDeploymentPlugins } from '../sfPlugins.js';
19
- /** Width of the `=` rules that bracket each stage's banner in the job log. */
20
- const BANNER_WIDTH = 80;
21
- /** @returns Seconds elapsed since `startTime`, to two decimal places. */
22
- function elapsedSeconds(startTime) {
23
- return Number(((Date.now() - startTime) / 1000).toFixed(2));
24
- }
25
- /** Writes a rule-bracketed banner, the shape every stage boundary uses in the job log. */
26
- function banner(write, message) {
27
- logger.raw('\n' + '='.repeat(BANNER_WIDTH));
28
- write(message);
29
- logger.raw('='.repeat(BANNER_WIDTH) + '\n');
30
- }
31
- /**
32
- * Run one deployment stage inside the shared banner/timing/error frame.
33
- *
34
- * Both deployment styles bracket a stage the same way: announce it, install the deployment
35
- * plugins, run it, then report how long it took — or, on failure, report the elapsed time and the
36
- * failing job before rethrowing. Only the middle step differs between them.
37
- *
38
- * @param stage - The stage name, as it appears in the banner.
39
- * @param options - The stage's full options, logged verbatim when `debug` is set.
40
- * @param runStage - The stage's actual work.
41
- * @throws Whatever `runStage` throws, after logging it. The error is never swallowed — the CI job
42
- * still has to fail.
43
- */
44
- export async function runDeployStage(stage, options, runStage) {
45
- banner(logger.info, `>>> Starting Deployment Stage: ${chalk.bold(stage)} <<<`);
46
- const startTime = Date.now();
47
- try {
48
- if (options.debug) {
49
- logger.debug(`Incoming parameters: ${stage}`, options);
50
- }
51
- await installDeploymentPlugins(options.debug);
52
- await runStage();
53
- banner(logger.success, `Completed stage ${chalk.bold(stage)} in ${elapsedSeconds(startTime)}s`);
54
- }
55
- catch (error) {
56
- // Deployment-step failures carry the job they came from; anything else just has a message.
57
- const job = error.job;
58
- logger.raw('\n' + '='.repeat(BANNER_WIDTH));
59
- logger.error(`Failed stage ${chalk.bold(stage)}${job ? ` for ${chalk.bold(job)}` : ''} after ${elapsedSeconds(startTime)}s`);
60
- logger.raw(error.message);
61
- logger.raw('='.repeat(BANNER_WIDTH) + '\n');
62
- throw error;
63
- }
64
- }
65
- //# sourceMappingURL=runDeployStage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runDeployStage.js","sourceRoot":"","sources":["../../../src/common/deploy/runDeployStage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,8EAA8E;AAC9E,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB,yEAAyE;AACzE,SAAS,cAAc,CAAC,SAAiB;IACvC,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED,0FAA0F;AAC1F,SAAS,MAAM,CAAC,KAAgC,EAAE,OAAe;IAC/D,MAAM,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;IAC5C,KAAK,CAAC,OAAO,CAAC,CAAC;IACf,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,KAAa,EACb,OAA4B,EA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- deployRulesFile?: string;
4
- sourceBranchName?: string;
5
- };
6
- /**
7
- * Validates the deployment config and deployment rules files against their JSON schemas.
8
- * Each is validated independently: a missing file is skipped (warned, not fatal), but a malformed
9
- * or schema-invalid file throws.
10
- */
11
- export declare function validateDeployFiles(options: ValidateDeployFilesOptions): Promise<void>;
@@ -1,54 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, SimplySF.
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 { deployConfigSchema } from '../schemas/deployConfig.js';
18
- import { deployRulesSchema } from '../schemas/deployRules.js';
19
- import { determineDeployConfigFile, loadValidatedJsonFile } from './deployCommon.js';
20
- async function validateFile(filePath, schema) {
21
- try {
22
- await loadValidatedJsonFile(filePath, schema);
23
- logger.success(`Validation successful for ${filePath}`);
24
- }
25
- catch (error) {
26
- if (error.code === 'ENOENT') {
27
- logger.warn(`Skipping validation for ${filePath} as it was not found.`);
28
- return;
29
- }
30
- logger.error(`Validation failed for ${filePath}: ${error.message}`);
31
- throw error;
32
- }
33
- }
34
- /**
35
- * Validates the deployment config and deployment rules files against their JSON schemas.
36
- * Each is validated independently: a missing file is skipped (warned, not fatal), but a malformed
37
- * or schema-invalid file throws.
38
- */
39
- export async function validateDeployFiles(options) {
40
- const resolvedDeployConfigFile = determineDeployConfigFile(options.sourceBranchName, options.deployConfigFile);
41
- if (resolvedDeployConfigFile) {
42
- await validateFile(resolvedDeployConfigFile, deployConfigSchema);
43
- }
44
- else {
45
- logger.warn('No deployment config file specified or derivable from --source-branch-name. Skipping validation.');
46
- }
47
- if (options.deployRulesFile) {
48
- await validateFile(options.deployRulesFile, deployRulesSchema);
49
- }
50
- else {
51
- logger.warn('No deployment rules file specified. Skipping validation.');
52
- }
53
- }
54
- //# sourceMappingURL=validate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/common/deploy/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAQrF,KAAK,UAAU,YAAY,CAAI,QAAgB,EAAE,MAAoB;IACnE,IAAI,CAAC;QACH,MAAM,qBAAqB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC9C,MAAM,CAAC,OAAO,CAAC,6BAA6B,QAAQ,EAAE,CAAC,CAAC;IAC1D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACvD,MAAM,CAAC,IAAI,CAAC,2BAA2B,QAAQ,uBAAuB,CAAC,CAAC;YACxE,OAAO;QACT,CAAC;QACD,MAAM,CAAC,KAAK,CAAC,yBAAyB,QAAQ,KAAM,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/E,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,OAAmC;IAC3E,MAAM,wBAAwB,GAAG,yBAAyB,CAAC,OAAO,CAAC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE/G,IAAI,wBAAwB,EAAE,CAAC;QAC7B,MAAM,YAAY,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAAC;IACnE,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,IAAI,CAAC,kGAAkG,CAAC,CAAC;IAClH,CAAC;IAED,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;QAC5B,MAAM,YAAY,CAAC,OAAO,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;IACjE,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,IAAI,CAAC,0DAA0D,CAAC,CAAC;IAC1E,CAAC;AACH,CAAC"}
@@ -1,9 +0,0 @@
1
- export type EnvLogger = {
2
- info: (message: string, ...args: unknown[]) => void;
3
- error: (message: string, ...args: unknown[]) => void;
4
- };
5
- /**
6
- * Appends key-value pairs to a .env style file. If the file exists and its content doesn't end
7
- * with a newline, a leading newline is added before appending. Creates the file if it doesn't exist.
8
- */
9
- export declare function appendToEnvFile(filePath: string, variables: Record<string, string | undefined>, log?: EnvLogger): void;
package/lib/common/env.js DELETED
@@ -1,47 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, SimplySF.
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 fs from 'node:fs';
17
- /**
18
- * Appends key-value pairs to a .env style file. If the file exists and its content doesn't end
19
- * with a newline, a leading newline is added before appending. Creates the file if it doesn't exist.
20
- */
21
- export function appendToEnvFile(filePath, variables, log) {
22
- const targetLogger = log ?? console;
23
- const lines = Object.entries(variables)
24
- .filter((entry) => entry[1] !== undefined)
25
- .map(([key, value]) => `${key}=${value}`);
26
- if (lines.length === 0) {
27
- return;
28
- }
29
- const variablesToAppend = lines.join('\n') + '\n';
30
- try {
31
- let contentToAppend = variablesToAppend;
32
- if (fs.existsSync(filePath)) {
33
- const currentContent = fs.readFileSync(filePath, 'utf8');
34
- if (currentContent && !currentContent.endsWith('\n')) {
35
- contentToAppend = `\n${variablesToAppend}`;
36
- }
37
- }
38
- fs.appendFileSync(filePath, contentToAppend, 'utf8');
39
- targetLogger.info(`Variables successfully appended to ${filePath}!`);
40
- }
41
- catch (error) {
42
- const err = error;
43
- targetLogger.error(`Error appending to ${filePath}: ${err.message}`);
44
- throw err;
45
- }
46
- }
47
- //# sourceMappingURL=env.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/common/env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AAOzB;;;GAGG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAgB,EAChB,SAA6C,EAC7C,GAAe;IAEf,MAAM,YAAY,GAAG,GAAG,IAAI,OAAO,CAAC;IACpC,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;SACpC,MAAM,CAAC,CAAC,KAAK,EAA6B,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC;SACpE,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;IAE5C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO;IACT,CAAC;IAED,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAElD,IAAI,CAAC;QACH,IAAI,eAAe,GAAG,iBAAiB,CAAC;QACxC,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC5B,MAAM,cAAc,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YACzD,IAAI,cAAc,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBACrD,eAAe,GAAG,KAAK,iBAAiB,EAAE,CAAC;YAC7C,CAAC;QACH,CAAC;QAED,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;QACrD,YAAY,CAAC,IAAI,CAAC,sCAAsC,QAAQ,GAAG,CAAC,CAAC;IACvE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,GAAG,GAAG,KAAc,CAAC;QAC3B,YAAY,CAAC,KAAK,CAAC,sBAAsB,QAAQ,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;QACrE,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -1,27 +0,0 @@
1
- import { type ExecaChildProcess, type Options } from 'execa';
2
- /**
3
- * Run the Salesforce CLI.
4
- *
5
- * Everything this package does to an org ultimately shells out to `sf`, and each site was
6
- * naming the binary itself. Options are forwarded only when a caller supplies them, so the
7
- * underlying `execa()` call keeps the exact arity each site had.
8
- *
9
- * @param args - Arguments to pass to `sf`.
10
- * @param options - Optional `execa` options, e.g. `{ stdio: 'inherit' }` to stream output
11
- * straight into the job log.
12
- * @returns The completed `execa` result.
13
- */
14
- export declare function runSf(args: string[], options?: Options): ExecaChildProcess;
15
- /**
16
- * Run the Salesforce CLI and parse its `--json` output.
17
- *
18
- * The caller still passes `--json` in `args` — this doesn't inject it, because which commands
19
- * accept it and where it belongs in the argument list varies. What it does replace is the
20
- * `JSON.parse(stdout) as SomeShape` written out at each call site.
21
- *
22
- * @param args - Arguments to pass to `sf`, including `--json`.
23
- * @param options - Optional `execa` options.
24
- * @returns The parsed payload, typed as the caller asserts.
25
- * @throws {SyntaxError} If the command's output isn't valid JSON.
26
- */
27
- export declare function runSfJson<T>(args: string[], options?: Options): Promise<T>;
@@ -1,50 +0,0 @@
1
- /*
2
- * Copyright (c) 2026, SimplySF.
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
- /** The `sf` executable, as resolved from `PATH` in the CI job. */
18
- const SF_BINARY = 'sf';
19
- /**
20
- * Run the Salesforce CLI.
21
- *
22
- * Everything this package does to an org ultimately shells out to `sf`, and each site was
23
- * naming the binary itself. Options are forwarded only when a caller supplies them, so the
24
- * underlying `execa()` call keeps the exact arity each site had.
25
- *
26
- * @param args - Arguments to pass to `sf`.
27
- * @param options - Optional `execa` options, e.g. `{ stdio: 'inherit' }` to stream output
28
- * straight into the job log.
29
- * @returns The completed `execa` result.
30
- */
31
- export function runSf(args, options) {
32
- return options ? execa(SF_BINARY, args, options) : execa(SF_BINARY, args);
33
- }
34
- /**
35
- * Run the Salesforce CLI and parse its `--json` output.
36
- *
37
- * The caller still passes `--json` in `args` — this doesn't inject it, because which commands
38
- * accept it and where it belongs in the argument list varies. What it does replace is the
39
- * `JSON.parse(stdout) as SomeShape` written out at each call site.
40
- *
41
- * @param args - Arguments to pass to `sf`, including `--json`.
42
- * @param options - Optional `execa` options.
43
- * @returns The parsed payload, typed as the caller asserts.
44
- * @throws {SyntaxError} If the command's output isn't valid JSON.
45
- */
46
- export async function runSfJson(args, options) {
47
- const { stdout } = await runSf(args, options);
48
- return JSON.parse(stdout);
49
- }
50
- //# sourceMappingURL=sfCli.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sfCli.js","sourceRoot":"","sources":["../../../src/common/exec/sfCli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAwC,MAAM,OAAO,CAAC;AAEpE,kEAAkE;AAClE,MAAM,SAAS,GAAG,IAAI,CAAC;AAEvB;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,KAAK,CAAC,IAAc,EAAE,OAAiB;IACrD,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC5E,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAI,IAAc,EAAE,OAAiB;IAClE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAE9C,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAM,CAAC;AACjC,CAAC"}