@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,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 { logger } from '../logger.js';
17
- /** Sends a notification payload to one or more Microsoft Teams incoming webhooks. */
18
- export async function sendNotification(teamsWebhookUrl, payload) {
19
- const urls = Array.isArray(teamsWebhookUrl) ? teamsWebhookUrl : [teamsWebhookUrl];
20
- const nonEmptyUrls = urls.filter((u) => Boolean(u));
21
- if (nonEmptyUrls.length === 0) {
22
- logger.warn('No webhook URLs provided. Skipping notification.');
23
- return;
24
- }
25
- const notificationPromises = nonEmptyUrls.map(async (url) => {
26
- try {
27
- const response = await fetch(url, {
28
- method: 'POST',
29
- headers: { 'Content-Type': 'application/json' },
30
- body: typeof payload === 'string' ? payload : JSON.stringify(payload ?? {}),
31
- });
32
- if (!response.ok) {
33
- throw new Error(`Response not OK. Status: ${response.status} ${response.statusText}`);
34
- }
35
- logger.success(`Successfully sent notification to ${url}`);
36
- return { url, status: 'success' };
37
- }
38
- catch (error) {
39
- logger.error(`Failed to send notification to ${url}: ${error.message}`);
40
- return { url, status: 'failure', error };
41
- }
42
- });
43
- const results = await Promise.all(notificationPromises);
44
- const failures = results.filter((r) => r.status === 'failure');
45
- if (failures.length > 0) {
46
- const failedUrls = failures.map((f) => f.url).join(', ');
47
- throw new Error(`Failed to send ${failures.length} notification(s) to: ${failedUrls}`);
48
- }
49
- }
50
- //# sourceMappingURL=sendNotification.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sendNotification.js","sourceRoot":"","sources":["../../../src/common/notify/sendNotification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAItC,qFAAqF;AACrF,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,eAA8C,EAC9C,OAAgB;IAEhB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IAClF,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAe,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAEjE,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;QAChE,OAAO;IACT,CAAC;IAED,MAAM,oBAAoB,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,EAA+B,EAAE;QACvF,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;gBAChC,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;gBAC/C,IAAI,EAAE,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,IAAI,EAAE,CAAC;aAC5E,CAAC,CAAC;YAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,4BAA4B,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;YACxF,CAAC;YAED,MAAM,CAAC,OAAO,CAAC,qCAAqC,GAAG,EAAE,CAAC,CAAC;YAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QACpC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,kCAAkC,GAAG,KAAM,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;YACnF,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;QAC3C,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC;IAE/D,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzD,MAAM,IAAI,KAAK,CAAC,kBAAkB,QAAQ,CAAC,MAAM,wBAAwB,UAAU,EAAE,CAAC,CAAC;IACzF,CAAC;AACH,CAAC"}
@@ -1,13 +0,0 @@
1
- /** Teams notification card templates, keyed the same as the original `.hbs` file names. */
2
- export declare const NOTIFY_TEMPLATES: {
3
- readonly 'build-failure-notification': "<table>\n <tr><th colspan=\"3\" style=\"color: white; background-color: darkred;\">{{projectTitle}}: Failed Build</th></tr>\n <tr><th colspan=\"3\" style=\"color: white; background-color: grey;\">Job: {{jobName}} (Stage:\n {{stage}})</th></tr>\n <tr><td>Branch</td><td colspan=\"2\">Pipeline</td></tr>\n <tr><td>{{refName}}</td><td colspan=\"2\"><a\n href=\"{{pipelineUrl}}\"\n >{{pipelineId}}</a></td></tr>\n</table>\n";
4
- readonly 'build-package-version-notification': "<table>\n <tr><th colspan=\"3\" style=\"color: white; background-color: darkgreen;\">{{projectTitle}}: Package Version\n Created</th></tr>\n <tr><td>Version</td><td>Branch</td><td>Pipeline</td></tr>\n <tr><td>{{packageVersion}}<br />{{subscriberPackageVersionId}}</td><td>{{refName}}</td><td><a\n href=\"{{pipelineUrl}}\"\n >{{pipelineId}}</a></td></tr>\n <tr><td colspan=\"3\">Stories since {{packageVersionPrevious}}</td></tr>\n <tr><td colspan=\"3\">{{{storiesLinked}}}</td></tr>\n</table>\n";
5
- readonly 'happy-soup-failure-notification': "<table>\n <tr><th colspan=\"3\" style=\"color: white; background-color: darkred;\">Failed Stage:\n {{stage}}</th></tr>\n <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>\n <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a\n href=\"{{pipelineUrl}}\"\n >{{pipelineId}}</a></td></tr>\n</table>\n";
6
- readonly 'happy-soup-final-failure-notification': "<table>\n <tr><th colspan=\"3\" style=\"color: white; background-color: darkred;\">Happy Soup Deployment Failed</th></tr>\n <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>\n <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a\n href=\"{{pipelineUrl}}\"\n >{{pipelineId}}</a></td></tr>\n</table>\n";
7
- readonly 'happy-soup-final-success-notification': "<table>\n <tr><th colspan=\"3\" style=\"color: white; background-color: darkgreen;\">Happy Soup Deployment\n Completed</th></tr>\n <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>\n <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a\n href=\"{{pipelineUrl}}\"\n >{{pipelineId}}</a></td></tr>\n{{#if upgradedPackages.length}}\n <tr><td colspan=\"3\">Upgraded Packages</td></tr>\n{{#each upgradedPackages}}\n <tr><td colspan=\"1\">{{packageName}}</td><td colspan=\"2\">{{{storiesLinked}}}</td></tr>\n{{/each}}\n{{/if}}\n</table>\n";
8
- readonly 'happy-soup-starting-stage-notification': "<table>\n <tr><th colspan=\"3\" style=\"color: white; background-color: #007acc;\">Starting Stage:\n {{stage}}</th></tr>\n <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>\n <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a\n href=\"{{pipelineUrl}}\"\n >{{pipelineId}}</a></td></tr>\n</table>\n";
9
- readonly 'happy-soup-success-notification': "<table>\n <tr><th colspan=\"3\" style=\"color: white; background-color: darkgreen;\">Completed Stage:\n {{stage}}</th></tr>\n <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>\n <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a\n href=\"{{pipelineUrl}}\"\n >{{pipelineId}}</a></td></tr>\n{{#if upgradedPackages.length}}\n <tr><td colspan=\"3\">Upgraded Packages</td></tr>\n{{#each upgradedPackages}}\n <tr><td colspan=\"1\">{{packageName}}</td><td colspan=\"2\">{{{storiesLinked}}}</td></tr>\n{{/each}}\n{{/if}}\n</table>\n";
10
- readonly 'project-failure-notification': "<table>\n <tr><th colspan=\"3\" style=\"color: white; background-color: darkred;\">{{projectTitle}}: Failed\n Deployment</th></tr>\n <tr><th colspan=\"3\" style=\"color: white; background-color: grey;\">Stage:\n {{stage}}</th></tr>\n <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>\n <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a\n href=\"{{pipelineUrl}}\"\n >{{pipelineId}}</a></td></tr>\n</table>\n";
11
- readonly 'project-success-notification': "<table>\n <tr><th colspan=\"3\" style=\"color: white; background-color: darkgreen;\">{{projectTitle}}: Completed\n Deployment</th></tr>\n <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>\n <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a\n href=\"{{pipelineUrl}}\"\n >{{pipelineId}}</a></td></tr>\n <tr><td colspan=\"3\">Stories</td></tr>\n <tr><td colspan=\"3\">{{{storiesLinked}}}</td></tr>\n</table>\n";
12
- };
13
- export type NotifyTemplateName = keyof typeof NOTIFY_TEMPLATES;
@@ -1,118 +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
- /** Teams notification card templates, keyed the same as the original `.hbs` file names. */
17
- export const NOTIFY_TEMPLATES = {
18
- 'build-failure-notification': `<table>
19
- <tr><th colspan="3" style="color: white; background-color: darkred;">{{projectTitle}}: Failed Build</th></tr>
20
- <tr><th colspan="3" style="color: white; background-color: grey;">Job: {{jobName}} (Stage:
21
- {{stage}})</th></tr>
22
- <tr><td>Branch</td><td colspan="2">Pipeline</td></tr>
23
- <tr><td>{{refName}}</td><td colspan="2"><a
24
- href="{{pipelineUrl}}"
25
- >{{pipelineId}}</a></td></tr>
26
- </table>
27
- `,
28
- 'build-package-version-notification': `<table>
29
- <tr><th colspan="3" style="color: white; background-color: darkgreen;">{{projectTitle}}: Package Version
30
- Created</th></tr>
31
- <tr><td>Version</td><td>Branch</td><td>Pipeline</td></tr>
32
- <tr><td>{{packageVersion}}<br />{{subscriberPackageVersionId}}</td><td>{{refName}}</td><td><a
33
- href="{{pipelineUrl}}"
34
- >{{pipelineId}}</a></td></tr>
35
- <tr><td colspan="3">Stories since {{packageVersionPrevious}}</td></tr>
36
- <tr><td colspan="3">{{{storiesLinked}}}</td></tr>
37
- </table>
38
- `,
39
- 'happy-soup-failure-notification': `<table>
40
- <tr><th colspan="3" style="color: white; background-color: darkred;">Failed Stage:
41
- {{stage}}</th></tr>
42
- <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>
43
- <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a
44
- href="{{pipelineUrl}}"
45
- >{{pipelineId}}</a></td></tr>
46
- </table>
47
- `,
48
- 'happy-soup-final-failure-notification': `<table>
49
- <tr><th colspan="3" style="color: white; background-color: darkred;">Happy Soup Deployment Failed</th></tr>
50
- <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>
51
- <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a
52
- href="{{pipelineUrl}}"
53
- >{{pipelineId}}</a></td></tr>
54
- </table>
55
- `,
56
- 'happy-soup-final-success-notification': `<table>
57
- <tr><th colspan="3" style="color: white; background-color: darkgreen;">Happy Soup Deployment
58
- Completed</th></tr>
59
- <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>
60
- <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a
61
- href="{{pipelineUrl}}"
62
- >{{pipelineId}}</a></td></tr>
63
- {{#if upgradedPackages.length}}
64
- <tr><td colspan="3">Upgraded Packages</td></tr>
65
- {{#each upgradedPackages}}
66
- <tr><td colspan="1">{{packageName}}</td><td colspan="2">{{{storiesLinked}}}</td></tr>
67
- {{/each}}
68
- {{/if}}
69
- </table>
70
- `,
71
- 'happy-soup-starting-stage-notification': `<table>
72
- <tr><th colspan="3" style="color: white; background-color: #007acc;">Starting Stage:
73
- {{stage}}</th></tr>
74
- <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>
75
- <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a
76
- href="{{pipelineUrl}}"
77
- >{{pipelineId}}</a></td></tr>
78
- </table>
79
- `,
80
- 'happy-soup-success-notification': `<table>
81
- <tr><th colspan="3" style="color: white; background-color: darkgreen;">Completed Stage:
82
- {{stage}}</th></tr>
83
- <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>
84
- <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a
85
- href="{{pipelineUrl}}"
86
- >{{pipelineId}}</a></td></tr>
87
- {{#if upgradedPackages.length}}
88
- <tr><td colspan="3">Upgraded Packages</td></tr>
89
- {{#each upgradedPackages}}
90
- <tr><td colspan="1">{{packageName}}</td><td colspan="2">{{{storiesLinked}}}</td></tr>
91
- {{/each}}
92
- {{/if}}
93
- </table>
94
- `,
95
- 'project-failure-notification': `<table>
96
- <tr><th colspan="3" style="color: white; background-color: darkred;">{{projectTitle}}: Failed
97
- Deployment</th></tr>
98
- <tr><th colspan="3" style="color: white; background-color: grey;">Stage:
99
- {{stage}}</th></tr>
100
- <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>
101
- <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a
102
- href="{{pipelineUrl}}"
103
- >{{pipelineId}}</a></td></tr>
104
- </table>
105
- `,
106
- 'project-success-notification': `<table>
107
- <tr><th colspan="3" style="color: white; background-color: darkgreen;">{{projectTitle}}: Completed
108
- Deployment</th></tr>
109
- <tr><td>Environment</td><td>Branch</td><td>Pipeline</td></tr>
110
- <tr><td>{{environmentName}}</td><td>{{refName}}</td><td><a
111
- href="{{pipelineUrl}}"
112
- >{{pipelineId}}</a></td></tr>
113
- <tr><td colspan="3">Stories</td></tr>
114
- <tr><td colspan="3">{{{storiesLinked}}}</td></tr>
115
- </table>
116
- `,
117
- };
118
- //# sourceMappingURL=templates.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/common/notify/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,2FAA2F;AAC3F,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,4BAA4B,EAAE;;;;;;;;;CAS/B;IACC,oCAAoC,EAAE;;;;;;;;;;CAUvC;IACC,iCAAiC,EAAE;;;;;;;;CAQpC;IACC,uCAAuC,EAAE;;;;;;;CAO1C;IACC,uCAAuC,EAAE;;;;;;;;;;;;;;CAc1C;IACC,wCAAwC,EAAE;;;;;;;;CAQ3C;IACC,iCAAiC,EAAE;;;;;;;;;;;;;;CAcpC;IACC,8BAA8B,EAAE;;;;;;;;;;CAUjC;IACC,8BAA8B,EAAE;;;;;;;;;;CAUjC;CACS,CAAC"}
@@ -1,25 +0,0 @@
1
- import { z } from 'zod';
2
- declare const deploymentSchema: z.ZodObject<{
3
- name: z.ZodString;
4
- slug: z.ZodOptional<z.ZodString>;
5
- ref: z.ZodOptional<z.ZodString>;
6
- unpackagedDeploy: z.ZodOptional<z.ZodBoolean>;
7
- postDeploy: z.ZodOptional<z.ZodBoolean>;
8
- preDestructive: z.ZodOptional<z.ZodBoolean>;
9
- postDestructive: z.ZodOptional<z.ZodBoolean>;
10
- }, z.core.$strict>;
11
- /** Zod equivalent of the original `deploy.schema.json`. */
12
- export declare const deployConfigSchema: z.ZodObject<{
13
- deployments: z.ZodArray<z.ZodObject<{
14
- name: z.ZodString;
15
- slug: z.ZodOptional<z.ZodString>;
16
- ref: z.ZodOptional<z.ZodString>;
17
- unpackagedDeploy: z.ZodOptional<z.ZodBoolean>;
18
- postDeploy: z.ZodOptional<z.ZodBoolean>;
19
- preDestructive: z.ZodOptional<z.ZodBoolean>;
20
- postDestructive: z.ZodOptional<z.ZodBoolean>;
21
- }, z.core.$strict>>;
22
- }, z.core.$strict>;
23
- export type DeploymentConfig = z.infer<typeof deploymentSchema>;
24
- export type DeployConfig = z.infer<typeof deployConfigSchema>;
25
- export {};
@@ -1,55 +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 { z } from 'zod';
17
- const LOCAL_NAMES = new Set(['local', 'Local', 'LOCAL']);
18
- const deploymentSchema = z
19
- .object({
20
- name: z.string(),
21
- slug: z.string().optional(),
22
- ref: z.string().optional(),
23
- unpackagedDeploy: z.boolean().optional(),
24
- postDeploy: z.boolean().optional(),
25
- preDestructive: z.boolean().optional(),
26
- postDestructive: z.boolean().optional(),
27
- })
28
- .strict()
29
- .superRefine((deployment, ctx) => {
30
- if (!LOCAL_NAMES.has(deployment.name) && deployment.slug === undefined) {
31
- ctx.addIssue({
32
- code: z.ZodIssueCode.custom,
33
- message: `Deployment "${deployment.name}" must have a "slug" unless its name is one of: ${[...LOCAL_NAMES].join(', ')}.`,
34
- path: ['slug'],
35
- });
36
- }
37
- const hasStage = deployment.unpackagedDeploy !== undefined ||
38
- deployment.postDeploy !== undefined ||
39
- deployment.preDestructive !== undefined ||
40
- deployment.postDestructive !== undefined;
41
- if (!hasStage) {
42
- ctx.addIssue({
43
- code: z.ZodIssueCode.custom,
44
- message: `Deployment "${deployment.name}" must specify at least one of: unpackagedDeploy, postDeploy, preDestructive, postDestructive.`,
45
- path: [],
46
- });
47
- }
48
- });
49
- /** Zod equivalent of the original `deploy.schema.json`. */
50
- export const deployConfigSchema = z
51
- .object({
52
- deployments: z.array(deploymentSchema),
53
- })
54
- .strict();
55
- //# sourceMappingURL=deployConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deployConfig.js","sourceRoot":"","sources":["../../../src/common/schemas/deployConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAEzD,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACxC,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAClC,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACtC,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACxC,CAAC;KACD,MAAM,EAAE;KACR,WAAW,CAAC,CAAC,UAAU,EAAE,GAAG,EAAE,EAAE;IAC/B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QACvE,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM;YAC3B,OAAO,EAAE,eAAe,UAAU,CAAC,IAAI,mDAAmD,CAAC,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;YACxH,IAAI,EAAE,CAAC,MAAM,CAAC;SACf,CAAC,CAAC;IACL,CAAC;IAED,MAAM,QAAQ,GACZ,UAAU,CAAC,gBAAgB,KAAK,SAAS;QACzC,UAAU,CAAC,UAAU,KAAK,SAAS;QACnC,UAAU,CAAC,cAAc,KAAK,SAAS;QACvC,UAAU,CAAC,eAAe,KAAK,SAAS,CAAC;IAE3C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM;YAC3B,OAAO,EAAE,eAAe,UAAU,CAAC,IAAI,gGAAgG;YACvI,IAAI,EAAE,EAAE;SACT,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,2DAA2D;AAC3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;CACvC,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -1,33 +0,0 @@
1
- import { z } from 'zod';
2
- /** A single packaged dependency upgraded by `deploy happy-soup install-packaged`. */
3
- declare const upgradedPackageSchema: z.ZodObject<{
4
- packageName: z.ZodString;
5
- prevVersionId: z.ZodString;
6
- prevVersionNumber: z.ZodOptional<z.ZodString>;
7
- prevTag: z.ZodOptional<z.ZodString>;
8
- targetVersionId: z.ZodString;
9
- targetVersionNumber: z.ZodOptional<z.ZodString>;
10
- targetTag: z.ZodOptional<z.ZodString>;
11
- targetDescription: z.ZodOptional<z.ZodString>;
12
- }, z.core.$strip>;
13
- /** Zod equivalent of the original `deploy_progress.schema.json`. */
14
- export declare const deployProgressSchema: z.ZodObject<{
15
- preDestructive: z.ZodOptional<z.ZodString>;
16
- unpackagedDeploy: z.ZodOptional<z.ZodString>;
17
- postDeploy: z.ZodOptional<z.ZodString>;
18
- postDestructive: z.ZodOptional<z.ZodString>;
19
- durations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>>;
20
- upgradedPackages: z.ZodOptional<z.ZodArray<z.ZodObject<{
21
- packageName: z.ZodString;
22
- prevVersionId: z.ZodString;
23
- prevVersionNumber: z.ZodOptional<z.ZodString>;
24
- prevTag: z.ZodOptional<z.ZodString>;
25
- targetVersionId: z.ZodString;
26
- targetVersionNumber: z.ZodOptional<z.ZodString>;
27
- targetTag: z.ZodOptional<z.ZodString>;
28
- targetDescription: z.ZodOptional<z.ZodString>;
29
- }, z.core.$strip>>>;
30
- }, z.core.$strict>;
31
- export type DeployProgress = z.infer<typeof deployProgressSchema>;
32
- export type UpgradedPackage = z.infer<typeof upgradedPackageSchema>;
33
- export {};
@@ -1,46 +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 { z } from 'zod';
17
- /** A single packaged dependency upgraded by `deploy happy-soup install-packaged`. */
18
- const upgradedPackageSchema = z.object({
19
- packageName: z.string(),
20
- prevVersionId: z.string(),
21
- prevVersionNumber: z.string().optional(),
22
- /** The origin git commit SHA for the previous version, from that version's `report.Tag`. */
23
- prevTag: z.string().optional(),
24
- targetVersionId: z.string(),
25
- targetVersionNumber: z.string().optional(),
26
- /** The origin git commit SHA for the target version, from that version's `report.Tag`. */
27
- targetTag: z.string().optional(),
28
- /**
29
- * The target version's `report.Description` (the origin CI pipeline URL). Used at notify time
30
- * to resolve which VCS project the package's source lives in; the origin repo is assumed stable
31
- * between a package's previous and target version, so only the target's URL is kept.
32
- */
33
- targetDescription: z.string().optional(),
34
- });
35
- /** Zod equivalent of the original `deploy_progress.schema.json`. */
36
- export const deployProgressSchema = z
37
- .object({
38
- preDestructive: z.string().optional(),
39
- unpackagedDeploy: z.string().optional(),
40
- postDeploy: z.string().optional(),
41
- postDestructive: z.string().optional(),
42
- durations: z.record(z.string(), z.record(z.string(), z.number())).optional(),
43
- upgradedPackages: z.array(upgradedPackageSchema).optional(),
44
- })
45
- .strict();
46
- //# sourceMappingURL=deployProgress.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deployProgress.js","sourceRoot":"","sources":["../../../src/common/schemas/deployProgress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qFAAqF;AACrF,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,4FAA4F;IAC5F,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1C,0FAA0F;IAC1F,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC;;;;OAIG;IACH,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAEH,oEAAoE;AACpE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACvC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5E,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;CAC5D,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -1,34 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const deployStageSchema: z.ZodEnum<{
3
- preDestructive: "preDestructive";
4
- unpackagedDeploy: "unpackagedDeploy";
5
- postDeploy: "postDeploy";
6
- postDestructive: "postDestructive";
7
- }>;
8
- declare const deployRuleSchema: z.ZodObject<{
9
- deploymentName: z.ZodOptional<z.ZodString>;
10
- deploymentSlug: z.ZodOptional<z.ZodString>;
11
- requireStages: z.ZodArray<z.ZodEnum<{
12
- preDestructive: "preDestructive";
13
- unpackagedDeploy: "unpackagedDeploy";
14
- postDeploy: "postDeploy";
15
- postDestructive: "postDestructive";
16
- }>>;
17
- }, z.core.$strict>;
18
- /** Zod equivalent of the original `deploy-rules.schema.json`. */
19
- export declare const deployRulesSchema: z.ZodObject<{
20
- rules: z.ZodArray<z.ZodObject<{
21
- deploymentName: z.ZodOptional<z.ZodString>;
22
- deploymentSlug: z.ZodOptional<z.ZodString>;
23
- requireStages: z.ZodArray<z.ZodEnum<{
24
- preDestructive: "preDestructive";
25
- unpackagedDeploy: "unpackagedDeploy";
26
- postDeploy: "postDeploy";
27
- postDestructive: "postDestructive";
28
- }>>;
29
- }, z.core.$strict>>;
30
- }, z.core.$strict>;
31
- export type DeployStage = z.infer<typeof deployStageSchema>;
32
- export type DeployRule = z.infer<typeof deployRuleSchema>;
33
- export type DeployRules = z.infer<typeof deployRulesSchema>;
34
- export {};
@@ -1,40 +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 { z } from 'zod';
17
- export const deployStageSchema = z.enum(['unpackagedDeploy', 'postDeploy', 'preDestructive', 'postDestructive']);
18
- const deployRuleSchema = z
19
- .object({
20
- deploymentName: z.string().optional(),
21
- deploymentSlug: z.string().optional(),
22
- requireStages: z.array(deployStageSchema),
23
- })
24
- .strict()
25
- .superRefine((rule, ctx) => {
26
- if (rule.deploymentName === undefined && rule.deploymentSlug === undefined) {
27
- ctx.addIssue({
28
- code: z.ZodIssueCode.custom,
29
- message: 'Each rule must specify a "deploymentName" or "deploymentSlug".',
30
- path: [],
31
- });
32
- }
33
- });
34
- /** Zod equivalent of the original `deploy-rules.schema.json`. */
35
- export const deployRulesSchema = z
36
- .object({
37
- rules: z.array(deployRuleSchema),
38
- })
39
- .strict();
40
- //# sourceMappingURL=deployRules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deployRules.js","sourceRoot":"","sources":["../../../src/common/schemas/deployRules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,kBAAkB,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAEjH,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,CAAC;IACN,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC;CAC1C,CAAC;KACD,MAAM,EAAE;KACR,WAAW,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;IACzB,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;QAC3E,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM;YAC3B,OAAO,EAAE,gEAAgE;YACzE,IAAI,EAAE,EAAE;SACT,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,iEAAiE;AACjE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC;CACjC,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -1,22 +0,0 @@
1
- export type HasApexTestsOptions = {
2
- debugMode?: boolean;
3
- };
4
- export type RunApexTestsOptions = {
5
- alias?: string;
6
- testLevel?: string;
7
- testSuite?: string;
8
- wait?: string;
9
- debugMode?: boolean;
10
- };
11
- /**
12
- * Checks if there are any Apex test classes defined in the package directories, by reading
13
- * `sfdx-project.json` to identify the package directories and searching each recursively
14
- * (case-insensitively) for `@isTest` in `.cls` files.
15
- */
16
- export declare function hasApexTests(options?: HasApexTestsOptions): Promise<boolean>;
17
- /**
18
- * Runs Apex tests in the specified target Salesforce organization. First checks that any Apex
19
- * tests exist before initiating the run. Test results are written to `./test-results/apex` in
20
- * JUnit and JSON formats. If tests fail, a detailed failure report is printed and this throws.
21
- */
22
- export declare function runApexTests(options: RunApexTestsOptions): Promise<void>;
@@ -1,169 +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 path from 'node:path';
18
- import { execa } from 'execa';
19
- import { readSfdxProject } from '@simplysf/simply-core';
20
- import { runSf } from './exec/sfCli.js';
21
- import { logger } from './logger.js';
22
- /**
23
- * Checks if there are any Apex test classes defined in the package directories, by reading
24
- * `sfdx-project.json` to identify the package directories and searching each recursively
25
- * (case-insensitively) for `@isTest` in `.cls` files.
26
- */
27
- export async function hasApexTests(options) {
28
- let packageDirs = ['force-app'];
29
- try {
30
- const sfdxProjectJson = await readSfdxProject();
31
- packageDirs = sfdxProjectJson.packageDirectories.map((d) => d.path).filter((p) => Boolean(p));
32
- }
33
- catch {
34
- if (options?.debugMode) {
35
- logger.warn('Could not read sfdx-project.json to identify package directories. Using default force-app.');
36
- }
37
- }
38
- for (const dir of packageDirs) {
39
- try {
40
- // eslint-disable-next-line no-await-in-loop -- stops at the first directory with a match
41
- await execa('grep', ['-q', '-r', '-i', '--include=*.cls', '@isTest\\b', dir]);
42
- return true;
43
- }
44
- catch (error) {
45
- if (options?.debugMode) {
46
- const err = error;
47
- logger.log(`No Apex tests found in ${dir} or an error occurred during search.`, err.shortMessage);
48
- }
49
- }
50
- }
51
- return false;
52
- }
53
- /** Kicks off the `sf apex test run`, swallowing any failure so the run's artifacts (namely the
54
- * test run ID file) can still be inspected afterward to distinguish an execution failure from a
55
- * genuine test failure. */
56
- async function executeTestRun(args) {
57
- try {
58
- await runSf(args, { stdio: 'pipe' });
59
- return undefined;
60
- }
61
- catch (e) {
62
- return e;
63
- }
64
- }
65
- /** Reads the test run ID that `sf apex test run` writes out. If that fails, prefers surfacing
66
- * the run's own execution error (if any) since a missing ID file is usually just a symptom of it. */
67
- async function resolveTestRunId(testRunIdFile, execError) {
68
- try {
69
- return (await fs.readFile(testRunIdFile, 'utf-8')).trim();
70
- }
71
- catch (readIdError) {
72
- if (execError) {
73
- logger.error('Apex test run failed.', execError.shortMessage);
74
- throw execError;
75
- }
76
- logger.error(`Failed to read test run ID from ${testRunIdFile}.`, readIdError.message);
77
- throw readIdError;
78
- }
79
- }
80
- function reportFailingTests(failingTests) {
81
- logger.raw('\n' + '='.repeat(80));
82
- logger.raw(`❌ APEX TEST FAILURE REPORT (${failingTests.length} failures found)`);
83
- logger.raw('='.repeat(80));
84
- failingTests.forEach((t, index) => {
85
- logger.raw(`\n[${index + 1}/${failingTests.length}] ❌ ${t.FullName ?? 'Unknown test'}`);
86
- logger.raw(` Message: ${t.Message ? t.Message.trim().replace(/\n/g, '\n ') : 'N/A'}`);
87
- if (t.StackTrace) {
88
- logger.raw(` Stack Trace: ${t.StackTrace.trim().replace(/\n/g, '\n ')}`);
89
- }
90
- logger.raw('-'.repeat(80));
91
- });
92
- logger.raw();
93
- }
94
- /** Reads and reports on the JUnit/JSON result file for a completed test run, returning the run's
95
- * outcome. A read/parse failure here prefers surfacing the run's own execution error (if any). */
96
- async function processTestResults(resultFilePath, execError) {
97
- try {
98
- const resultsContent = await fs.readFile(resultFilePath, 'utf-8');
99
- const results = JSON.parse(resultsContent);
100
- const testRunOutcome = results.summary?.outcome;
101
- if (testRunOutcome !== 'Failed') {
102
- logger.success('Apex tests completed successfully.');
103
- return testRunOutcome;
104
- }
105
- logger.error('Apex test run failed.');
106
- const failingTests = results.tests ? results.tests.filter((t) => t.Outcome === 'Fail') : [];
107
- if (failingTests.length > 0) {
108
- reportFailingTests(failingTests);
109
- }
110
- else {
111
- logger.warn('Test run was marked as failed, but no individual test failures were found. This could indicate a compile error or issue.');
112
- }
113
- return testRunOutcome;
114
- }
115
- catch (fileError) {
116
- logger.error(`Failed to read or parse test result file at ${resultFilePath}.`, fileError.message);
117
- if (execError) {
118
- throw execError;
119
- }
120
- throw fileError;
121
- }
122
- }
123
- /**
124
- * Runs Apex tests in the specified target Salesforce organization. First checks that any Apex
125
- * tests exist before initiating the run. Test results are written to `./test-results/apex` in
126
- * JUnit and JSON formats. If tests fail, a detailed failure report is printed and this throws.
127
- */
128
- export async function runApexTests(options) {
129
- const { alias, testLevel = 'RunLocalTests', testSuite, wait = '60' } = options;
130
- if (!(await hasApexTests(options))) {
131
- logger.warn('No Apex test classes found. Skipping Apex tests.');
132
- return;
133
- }
134
- logger.info('Running Apex tests...');
135
- const testResultsDir = './test-results/apex';
136
- await fs.mkdir(testResultsDir, { recursive: true });
137
- const args = [
138
- 'apex',
139
- 'test',
140
- 'run',
141
- '--code-coverage',
142
- '--result-format',
143
- 'junit',
144
- '--output-dir',
145
- testResultsDir,
146
- '--wait',
147
- wait,
148
- ];
149
- if (alias) {
150
- args.push('--target-org', alias);
151
- }
152
- if (testSuite) {
153
- args.push('--suite-names', testSuite);
154
- }
155
- else {
156
- args.push('--test-level', testLevel);
157
- }
158
- const execError = await executeTestRun(args);
159
- const testRunId = await resolveTestRunId(path.join(testResultsDir, 'test-run-id.txt'), execError);
160
- let testRunOutcome;
161
- if (testRunId) {
162
- const resultFilePath = path.join(testResultsDir, `test-result-${testRunId}.json`);
163
- testRunOutcome = await processTestResults(resultFilePath, execError);
164
- }
165
- if (testRunOutcome === 'Failed') {
166
- throw new Error('Apex test run included failures.');
167
- }
168
- }
169
- //# sourceMappingURL=sfApex.js.map