@empire-builder-kit/nx 1.0.0-rc.30 → 1.0.0-rc.31

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 (261) hide show
  1. package/executors.json +8 -3
  2. package/package.json +10 -7
  3. package/src/aws/child-environment.d.ts +10 -0
  4. package/src/aws/child-environment.js +77 -0
  5. package/src/aws/child-environment.js.map +1 -0
  6. package/src/aws/identity.d.ts +13 -0
  7. package/src/aws/identity.js +41 -0
  8. package/src/aws/identity.js.map +1 -0
  9. package/src/aws-authority/index.d.ts +1 -0
  10. package/src/aws-authority/index.js +5 -0
  11. package/src/aws-authority/index.js.map +1 -0
  12. package/src/aws-authority/stage-authority.d.ts +238 -0
  13. package/src/aws-authority/stage-authority.js +2836 -0
  14. package/src/aws-authority/stage-authority.js.map +1 -0
  15. package/src/developer-agent/generator-planning.js +4 -4
  16. package/src/developer-agent/generator-planning.js.map +1 -1
  17. package/src/developer-agent/operation-registry.js +14 -6
  18. package/src/developer-agent/operation-registry.js.map +1 -1
  19. package/src/executors/deployment-plan/deployment-plan.js +1 -1
  20. package/src/executors/deployment-plan/deployment-plan.js.map +1 -1
  21. package/src/executors/foundation-preflight/foundation-preflight.d.ts +0 -1
  22. package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -1
  23. package/src/executors/foundation-preflight/schema.json +0 -5
  24. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +12 -3
  25. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +95 -32
  26. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +1 -1
  27. package/src/executors/foundation-profile-preflight/production-database-safeguard.d.ts +64 -0
  28. package/src/executors/foundation-profile-preflight/production-database-safeguard.js +221 -0
  29. package/src/executors/foundation-profile-preflight/production-database-safeguard.js.map +1 -0
  30. package/src/executors/foundation-profile-preflight/schema.json +1 -6
  31. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.d.ts +11 -1
  32. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js +44 -21
  33. package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js.map +1 -1
  34. package/src/executors/foundation-remove-preflight/schema.json +6 -1
  35. package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +25 -369
  36. package/src/executors/infrastructure-plan/infrastructure-plan.js +222 -5472
  37. package/src/executors/infrastructure-plan/infrastructure-plan.js.map +1 -1
  38. package/src/executors/infrastructure-plan/schema.json +8 -64
  39. package/src/executors/local-deploy/federated-credential-transport.d.ts +48 -0
  40. package/src/executors/local-deploy/federated-credential-transport.js +252 -0
  41. package/src/executors/local-deploy/federated-credential-transport.js.map +1 -0
  42. package/src/executors/local-deploy/local-approval.d.ts +4 -9
  43. package/src/executors/local-deploy/local-approval.js +3 -7
  44. package/src/executors/local-deploy/local-approval.js.map +1 -1
  45. package/src/executors/local-deploy/local-deploy.d.ts +58 -43
  46. package/src/executors/local-deploy/local-deploy.js +938 -804
  47. package/src/executors/local-deploy/local-deploy.js.map +1 -1
  48. package/src/executors/local-deploy/schema.json +3 -20
  49. package/src/executors/refresh/refresh.js +2 -2
  50. package/src/executors/refresh/refresh.js.map +1 -1
  51. package/src/executors/remove/remove.js +2 -2
  52. package/src/executors/remove/remove.js.map +1 -1
  53. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +25 -1
  54. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +905 -22
  55. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js.map +1 -1
  56. package/src/executors/router-waf-rehearsal/schema.json +17 -2
  57. package/src/executors/secret-initialize/schema.json +42 -0
  58. package/src/executors/secret-initialize/secret-initialize.d.ts +30 -0
  59. package/src/executors/secret-initialize/secret-initialize.js +229 -0
  60. package/src/executors/secret-initialize/secret-initialize.js.map +1 -0
  61. package/src/executors/secret-metadata/secret-metadata.d.ts +2 -1
  62. package/src/executors/secret-metadata/secret-metadata.js +62 -29
  63. package/src/executors/secret-metadata/secret-metadata.js.map +1 -1
  64. package/src/executors/sst-lifecycle/generated-secret-retirement.d.ts +53 -0
  65. package/src/executors/sst-lifecycle/generated-secret-retirement.js +192 -0
  66. package/src/executors/sst-lifecycle/generated-secret-retirement.js.map +1 -0
  67. package/src/executors/sst-lifecycle/governed-native-operation.d.ts +46 -0
  68. package/src/executors/sst-lifecycle/governed-native-operation.js +153 -0
  69. package/src/executors/sst-lifecycle/governed-native-operation.js.map +1 -0
  70. package/src/executors/sst-lifecycle/run-sst-command.d.ts +25 -7
  71. package/src/executors/sst-lifecycle/run-sst-command.js +459 -89
  72. package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -1
  73. package/src/executors/sst-lifecycle/schema.json +0 -5
  74. package/src/executors/sst-lifecycle/secret-preflight.d.ts +2 -0
  75. package/src/executors/sst-lifecycle/secret-preflight.js +13 -7
  76. package/src/executors/sst-lifecycle/secret-preflight.js.map +1 -1
  77. package/src/executors/unlock/unlock.js +2 -2
  78. package/src/executors/unlock/unlock.js.map +1 -1
  79. package/src/foundation/router-waf-rate-rehearsal.d.ts +97 -0
  80. package/src/foundation/router-waf-rate-rehearsal.js +210 -0
  81. package/src/foundation/router-waf-rate-rehearsal.js.map +1 -0
  82. package/src/foundation/router-waf.d.ts +59 -9
  83. package/src/foundation/router-waf.js +427 -32
  84. package/src/foundation/router-waf.js.map +1 -1
  85. package/src/foundation/stages.d.ts +1 -0
  86. package/src/foundation/stages.js +11 -0
  87. package/src/foundation/stages.js.map +1 -1
  88. package/src/generators/formatting.d.ts +8 -0
  89. package/src/generators/formatting.js +118 -0
  90. package/src/generators/formatting.js.map +1 -0
  91. package/src/generators/function/function.js +37 -17
  92. package/src/generators/function/function.js.map +1 -1
  93. package/src/generators/post-generation-install.js +2 -2
  94. package/src/generators/post-generation-install.js.map +1 -1
  95. package/src/generators/preset/generator.js +22 -7
  96. package/src/generators/preset/generator.js.map +1 -1
  97. package/src/generators/preset/workspace-files-developer-agent.js +15 -7
  98. package/src/generators/preset/workspace-files-developer-agent.js.map +1 -1
  99. package/src/generators/preset/workspace-files-ecr-inspector.d.ts +18 -0
  100. package/src/generators/preset/workspace-files-ecr-inspector.js +298 -0
  101. package/src/generators/preset/workspace-files-ecr-inspector.js.map +1 -0
  102. package/src/generators/preset/workspace-files-performance-cost.d.ts +2 -2
  103. package/src/generators/preset/workspace-files-performance-cost.js +8 -8
  104. package/src/generators/preset/workspace-files-performance-cost.js.map +1 -1
  105. package/src/generators/preset/workspace-files-performance-load.d.ts +1 -1
  106. package/src/generators/preset/workspace-files-performance-load.js +8 -12
  107. package/src/generators/preset/workspace-files-performance-load.js.map +1 -1
  108. package/src/generators/preset/workspace-files-stage-authority.d.ts +4 -0
  109. package/src/generators/preset/workspace-files-stage-authority.js +275 -0
  110. package/src/generators/preset/workspace-files-stage-authority.js.map +1 -0
  111. package/src/generators/preset/workspace-files-thin-deploy.d.ts +35 -0
  112. package/src/generators/preset/workspace-files-thin-deploy.js +1434 -0
  113. package/src/generators/preset/workspace-files-thin-deploy.js.map +1 -0
  114. package/src/generators/preset/workspace-files-thin-docs.d.ts +5 -0
  115. package/src/generators/preset/workspace-files-thin-docs.js +224 -0
  116. package/src/generators/preset/workspace-files-thin-docs.js.map +1 -0
  117. package/src/generators/preset/workspace-files-thin-release.d.ts +14 -0
  118. package/src/generators/preset/workspace-files-thin-release.js +26 -0
  119. package/src/generators/preset/workspace-files-thin-release.js.map +1 -0
  120. package/src/generators/preset/workspace-files.d.ts +1 -1
  121. package/src/generators/preset/workspace-files.js +373 -223
  122. package/src/generators/preset/workspace-files.js.map +1 -1
  123. package/src/generators/slice/built-in-plan-api-files.js +1 -0
  124. package/src/generators/slice/built-in-plan-api-files.js.map +1 -1
  125. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +4 -0
  126. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +1 -1
  127. package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js +5 -31
  128. package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js.map +1 -1
  129. package/src/generators/slice/built-in-plan-data-files.d.ts +1 -1
  130. package/src/generators/slice/built-in-plan-data-files.js +89 -30
  131. package/src/generators/slice/built-in-plan-data-files.js.map +1 -1
  132. package/src/generators/slice/built-in-plan-foundation-files.js +3 -5
  133. package/src/generators/slice/built-in-plan-foundation-files.js.map +1 -1
  134. package/src/generators/slice/built-in-plan-frontend-files.js +5 -1
  135. package/src/generators/slice/built-in-plan-frontend-files.js.map +1 -1
  136. package/src/generators/slice/built-in-plan-infrastructure-files.d.ts +1 -1
  137. package/src/generators/slice/built-in-plan-infrastructure-files.js +199 -188
  138. package/src/generators/slice/built-in-plan-infrastructure-files.js.map +1 -1
  139. package/src/generators/slice/built-in-plan-metadata-files.js +13 -0
  140. package/src/generators/slice/built-in-plan-metadata-files.js.map +1 -1
  141. package/src/generators/slice/built-in-plan-native-runtime-authority-files.d.ts +2 -0
  142. package/src/generators/slice/built-in-plan-native-runtime-authority-files.js +307 -0
  143. package/src/generators/slice/built-in-plan-native-runtime-authority-files.js.map +1 -0
  144. package/src/generators/slice/built-in-plan-operations-files.js +43 -49
  145. package/src/generators/slice/built-in-plan-operations-files.js.map +1 -1
  146. package/src/generators/slice/built-in-plan-performance-files.js +37 -19
  147. package/src/generators/slice/built-in-plan-performance-files.js.map +1 -1
  148. package/src/generators/slice/built-in-plan-project-files.js +9 -68
  149. package/src/generators/slice/built-in-plan-project-files.js.map +1 -1
  150. package/src/generators/slice/built-in-plan-secret-runtime-files.d.ts +1 -1
  151. package/src/generators/slice/built-in-plan-secret-runtime-files.js +74 -76
  152. package/src/generators/slice/built-in-plan-secret-runtime-files.js.map +1 -1
  153. package/src/generators/slice/built-in-plan-testing-files.js +74 -47
  154. package/src/generators/slice/built-in-plan-testing-files.js.map +1 -1
  155. package/src/generators/slice/built-in-plan-thin-release-files.d.ts +11 -0
  156. package/src/generators/slice/built-in-plan-thin-release-files.js +129 -0
  157. package/src/generators/slice/built-in-plan-thin-release-files.js.map +1 -0
  158. package/src/generators/slice/built-in-plan-verification-files.js +6 -2
  159. package/src/generators/slice/built-in-plan-verification-files.js.map +1 -1
  160. package/src/generators/slice/built-in-plan-web-files.js +4 -2
  161. package/src/generators/slice/built-in-plan-web-files.js.map +1 -1
  162. package/src/generators/slice/built-in-plan-workload-role-files.js +26 -4
  163. package/src/generators/slice/built-in-plan-workload-role-files.js.map +1 -1
  164. package/src/generators/slice/built-in-plan.d.ts +1 -0
  165. package/src/generators/slice/built-in-plan.js +28 -11
  166. package/src/generators/slice/built-in-plan.js.map +1 -1
  167. package/src/generators/slice/slice.js +27 -29
  168. package/src/generators/slice/slice.js.map +1 -1
  169. package/src/generators/upgrade/upgrade.d.ts +1 -1
  170. package/src/generators/upgrade/upgrade.js +224 -69
  171. package/src/generators/upgrade/upgrade.js.map +1 -1
  172. package/src/generators/workload/performance-registration.d.ts +1 -0
  173. package/src/generators/workload/performance-registration.js +6 -4
  174. package/src/generators/workload/performance-registration.js.map +1 -1
  175. package/src/generators/workload/service-performance-files.d.ts +1 -0
  176. package/src/generators/workload/service-performance-files.js +27 -7
  177. package/src/generators/workload/service-performance-files.js.map +1 -1
  178. package/src/generators/workload/workload.d.ts +1 -1
  179. package/src/generators/workload/workload.js +55 -28
  180. package/src/generators/workload/workload.js.map +1 -1
  181. package/src/git-policy/github-bootstrap.d.ts +19 -6
  182. package/src/git-policy/github-bootstrap.js +103 -157
  183. package/src/git-policy/github-bootstrap.js.map +1 -1
  184. package/src/local-dev/private-state.d.ts +3 -0
  185. package/src/local-dev/private-state.js +17 -5
  186. package/src/local-dev/private-state.js.map +1 -1
  187. package/src/performance/cost-collection.d.ts +1 -1
  188. package/src/performance/cost-collection.js +4 -2
  189. package/src/performance/cost-collection.js.map +1 -1
  190. package/src/performance/cost-controls.d.ts +3 -1
  191. package/src/performance/cost-controls.js +9 -4
  192. package/src/performance/cost-controls.js.map +1 -1
  193. package/src/performance/evidence.d.ts +1 -1
  194. package/src/performance/evidence.js +5 -3
  195. package/src/performance/evidence.js.map +1 -1
  196. package/src/performance/load-safety.js +5 -3
  197. package/src/performance/load-safety.js.map +1 -1
  198. package/src/performance/model.d.ts +2 -2
  199. package/src/performance/model.js +4 -3
  200. package/src/performance/model.js.map +1 -1
  201. package/src/release/index.d.ts +0 -2
  202. package/src/release/index.js +0 -2
  203. package/src/release/index.js.map +1 -1
  204. package/src/release/source-authority.d.ts +4 -5
  205. package/src/release/source-authority.js +13 -123
  206. package/src/release/source-authority.js.map +1 -1
  207. package/src/repository-policy/aurora-preflight.d.ts +1 -1
  208. package/src/repository-policy/aurora-preflight.js +4 -1
  209. package/src/repository-policy/aurora-preflight.js.map +1 -1
  210. package/src/repository-policy/policy.d.ts +5 -1
  211. package/src/repository-policy/policy.js +64 -13
  212. package/src/repository-policy/policy.js.map +1 -1
  213. package/src/schemas/performance-policy-v1.json +3 -1
  214. package/src/secrets/adapters.d.ts +5 -1
  215. package/src/secrets/adapters.js +22 -1
  216. package/src/secrets/adapters.js.map +1 -1
  217. package/src/secrets/aws-control-plane.d.ts +10 -1
  218. package/src/secrets/aws-control-plane.js +67 -0
  219. package/src/secrets/aws-control-plane.js.map +1 -1
  220. package/src/secrets/generated-aws-control-plane.d.ts +23 -0
  221. package/src/secrets/generated-aws-control-plane.js +259 -0
  222. package/src/secrets/generated-aws-control-plane.js.map +1 -0
  223. package/src/secrets/metadata.js +38 -10
  224. package/src/secrets/metadata.js.map +1 -1
  225. package/src/secrets/model.d.ts +8 -1
  226. package/src/secrets/model.js +24 -3
  227. package/src/secrets/model.js.map +1 -1
  228. package/src/secrets/operator.d.ts +89 -3
  229. package/src/secrets/operator.js +422 -9
  230. package/src/secrets/operator.js.map +1 -1
  231. package/src/secrets/registry.d.ts +2 -1
  232. package/src/secrets/registry.js +18 -1
  233. package/src/secrets/registry.js.map +1 -1
  234. package/src/secrets/workload-access.js +10 -2
  235. package/src/secrets/workload-access.js.map +1 -1
  236. package/src/supply-chain/action-pins.js +61 -7
  237. package/src/supply-chain/action-pins.js.map +1 -1
  238. package/src/supply-chain/build-output-bounds.d.ts +2 -0
  239. package/src/supply-chain/build-output-bounds.js +12 -0
  240. package/src/supply-chain/build-output-bounds.js.map +1 -0
  241. package/src/supply-chain/build-output.js +2 -4
  242. package/src/supply-chain/build-output.js.map +1 -1
  243. package/src/supply-chain/ecr-scanning.d.ts +5 -3
  244. package/src/supply-chain/ecr-scanning.js +11 -7
  245. package/src/supply-chain/ecr-scanning.js.map +1 -1
  246. package/src/supply-chain/ecs-deployed-image.d.ts +5 -3
  247. package/src/supply-chain/ecs-deployed-image.js +6 -4
  248. package/src/supply-chain/ecs-deployed-image.js.map +1 -1
  249. package/src/supply-chain/generated-container-release-command.js +816 -34
  250. package/src/supply-chain/generated-container-release-command.js.map +1 -1
  251. package/src/supply-chain/generated-ecr-collector-command.d.ts +0 -1
  252. package/src/supply-chain/generated-ecr-collector-command.js +188 -91
  253. package/src/supply-chain/generated-ecr-collector-command.js.map +1 -1
  254. package/src/supply-chain/generated-files.js +4 -3
  255. package/src/supply-chain/generated-files.js.map +1 -1
  256. package/src/supply-chain/index.d.ts +1 -1
  257. package/src/supply-chain/index.js +2 -1
  258. package/src/supply-chain/index.js.map +1 -1
  259. package/src/workload-roles/index.d.ts +10 -17
  260. package/src/workload-roles/index.js +5 -18
  261. package/src/workload-roles/index.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"secret-metadata.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/secret-metadata/secret-metadata.ts"],"names":[],"mappings":";;AAkDA,gFA6BC;AAqBD,wFAgDC;AAED,gFAqCC;AAoBD,sDAiEC;AAhRD,uCAAgF;AAChF,oDAA0E;AAC1E,wEAAwD;AACxD,yCAA6C;AAE7C,qDAIgC;AAChC,8EAI8C;AAC9C,+DAO0C;AAC1C,0FAA8F;AAqB9F,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;AAC3D,MAAM,IAAI,GACR,4EAA4E,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AmC,CACxC,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"secret-metadata.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/secret-metadata/secret-metadata.ts"],"names":[],"mappings":";;AAsDA,gFA6BC;AA4BD,wFAiDC;AAED,gFAqCC;AAoBD,sDAqGC;AAhUD,uCAAgF;AAChF,oDAA0E;AAC1E,wEAAwD;AACxD,yCAA6C;AAE7C,qDAIgC;AAChC,2DAA4E;AAC5E,8EAI8C;AAC9C,+DAQ0C;AAC1C,uDAG+B;AAqB/B,MAAM,IAAI,GACR,4EAA4E,CAAC;AAI/E,SAAgB,kCAAkC,CAChD,KAA6C,EAC7C,KAAc,EACd,cAAiC,OAAO,CAAC,GAAG,EAC5C,oBAAuC,gBAAgB;IAEvD,IAAI,CAAC,KAAK;QAAE,OAAO,MAAM,CAAC;IAC1B,MAAM,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAAC;IACjD,MAAM,MAAM,GAAG,KAAK,KAAK,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3D,MAAM,GAAG,GAAG,cAAc,MAAM,EAAE,CAAC;IACnC,MAAM,gBAAgB,GAAG,UAAU;QACjC,CAAC,CAAC,GAAG,UAAU,0CAA0C,GAAG,EAAE;QAC9D,CAAC,CAAC,SAAS,CAAC;IACd,MAAM,aAAa,GACjB,WAAW,CAAC,cAAc,KAAK,MAAM;QACrC,WAAW,CAAC,iBAAiB,KAAK,mBAAmB;QACrD,WAAW,CAAC,UAAU,KAAK,GAAG;QAC9B,OAAO,CAAC,UAAU,CAAC;QACnB,WAAW,CAAC,mBAAmB,KAAK,gBAAgB,CAAC;IACvD,IAAI,aAAa;QAAE,OAAO,UAAU,CAAC;IACrC,IACE,IAAA,mCAAwB,EAAC,iBAAiB,EAAE,KAAK,CAAC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K,YAAY,KAAK;YACpB,CAAC,CAAC,KAAK,CAAC,OAAO;YACf,CAAC,CAAC,mCAAmC,CACxC,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,53 @@
1
+ import type { ExecutorContext } from '@nx/devkit';
2
+ import { type RepositoryOperatingPolicy } from '../../repository-policy/index.js';
3
+ import { type GeneratedSecretRetirementControlPlane, type GeneratedSecretRetirementResult } from '../../secrets/index.js';
4
+ import { type LoadedSliceSecretMetadata } from './secret-preflight.js';
5
+ import type { SstCommandInvocation, SstLifecycleOptions } from './run-sst-command.js';
6
+ export declare const GENERATED_SECRET_RETIREMENT_EVIDENCE_DIRECTORY: string;
7
+ interface AwsPrincipal {
8
+ accountId: string;
9
+ arn: string;
10
+ }
11
+ export interface GeneratedSecretRetirementEvidence {
12
+ accountId: string;
13
+ actorArn: string;
14
+ completedAt: string;
15
+ deletionMode: GeneratedSecretRetirementResult['deletionMode'];
16
+ kind: 'ebk-generated-secret-retirement';
17
+ project: string;
18
+ recoveryWindowDays?: 7;
19
+ region: string;
20
+ result: 'succeeded';
21
+ schemaVersion: 1;
22
+ secrets: GeneratedSecretRetirementResult['secrets'];
23
+ sourceCommit: string;
24
+ stage: string;
25
+ startedAt: string;
26
+ workspace: string;
27
+ }
28
+ export interface GeneratedSecretRetirementDependencies {
29
+ controlPlane?: GeneratedSecretRetirementControlPlane;
30
+ environment?: NodeJS.ProcessEnv;
31
+ loadMetadata?: (input: {
32
+ context: ExecutorContext;
33
+ cwd: string;
34
+ stage: string;
35
+ }) => Promise<LoadedSliceSecretMetadata>;
36
+ now?: () => Date;
37
+ readOperatingPolicy?: (workspaceRoot: string) => RepositoryOperatingPolicy;
38
+ readPrincipal?: (input: {
39
+ environment: NodeJS.ProcessEnv;
40
+ profile?: string;
41
+ region: string;
42
+ }) => Promise<AwsPrincipal>;
43
+ writeEvidence?: (path: string, evidence: GeneratedSecretRetirementEvidence) => void;
44
+ waitBeforeRetry?: (delayMs: number) => Promise<void>;
45
+ }
46
+ /**
47
+ * Complete the generated-secret portion of one successful native Slice remove.
48
+ * The invocation has already passed the normal stage/removal authorization;
49
+ * this function independently reattests its exact AWS identity and secret
50
+ * ownership before applying the stage-specific deletion policy.
51
+ */
52
+ export declare function retireGeneratedSecretsAfterSliceRemove(options: SstLifecycleOptions, context: ExecutorContext, invocation: SstCommandInvocation, dependencies?: GeneratedSecretRetirementDependencies): Promise<GeneratedSecretRetirementEvidence>;
53
+ export {};
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GENERATED_SECRET_RETIREMENT_EVIDENCE_DIRECTORY = void 0;
4
+ exports.retireGeneratedSecretsAfterSliceRemove = retireGeneratedSecretsAfterSliceRemove;
5
+ const client_sts_1 = require("@aws-sdk/client-sts");
6
+ const credential_providers_1 = require("@aws-sdk/credential-providers");
7
+ const node_fs_1 = require("node:fs");
8
+ const node_path_1 = require("node:path");
9
+ const index_js_1 = require("../../aws-authority/index.js");
10
+ const identity_js_1 = require("../../aws/identity.js");
11
+ const index_js_2 = require("../../repository-policy/index.js");
12
+ const index_js_3 = require("../../secrets/index.js");
13
+ const secret_preflight_js_1 = require("./secret-preflight.js");
14
+ const private_state_js_1 = require("../../local-dev/private-state.js");
15
+ const GENERATED_SECRET_RETIREMENT_EVIDENCE_SEGMENTS = [
16
+ '.ebk',
17
+ 'evidence',
18
+ 'generated-secret-retirement',
19
+ ];
20
+ exports.GENERATED_SECRET_RETIREMENT_EVIDENCE_DIRECTORY = (0, node_path_1.join)(...GENERATED_SECRET_RETIREMENT_EVIDENCE_SEGMENTS);
21
+ const SHA = /^[a-f0-9]{40,64}$/u;
22
+ const MAXIMUM_EVIDENCE_BYTES = 32 * 1024;
23
+ function partitionForRegion(region) {
24
+ if (region.startsWith('cn-'))
25
+ return 'aws-cn';
26
+ if (region.startsWith('us-gov-'))
27
+ return 'aws-us-gov';
28
+ return 'aws';
29
+ }
30
+ function profileCredentials(profile, environment) {
31
+ return (0, credential_providers_1.fromIni)({
32
+ ...(environment.AWS_CONFIG_FILE
33
+ ? { configFilepath: environment.AWS_CONFIG_FILE }
34
+ : {}),
35
+ ...(environment.AWS_SHARED_CREDENTIALS_FILE
36
+ ? { filepath: environment.AWS_SHARED_CREDENTIALS_FILE }
37
+ : {}),
38
+ profile,
39
+ });
40
+ }
41
+ async function readCurrentPrincipal(input) {
42
+ const client = new client_sts_1.STSClient({
43
+ ...(input.profile
44
+ ? { credentials: profileCredentials(input.profile, input.environment) }
45
+ : {}),
46
+ endpoint: (0, identity_js_1.canonicalStsEndpoint)(input.region),
47
+ region: input.region,
48
+ });
49
+ try {
50
+ const identity = await client.send(new client_sts_1.GetCallerIdentityCommand({}));
51
+ if (!identity.Account || !identity.Arn) {
52
+ throw new Error('identity unavailable');
53
+ }
54
+ return { accountId: identity.Account, arn: identity.Arn };
55
+ }
56
+ finally {
57
+ client.destroy();
58
+ }
59
+ }
60
+ function writeBoundedEvidence(path, evidence) {
61
+ const serialized = `${JSON.stringify(evidence, null, 2)}\n`;
62
+ (0, private_state_js_1.atomicWritePrivateFileWithMaximumBytes)(path, serialized, MAXIMUM_EVIDENCE_BYTES);
63
+ }
64
+ function prepareEvidenceDestination(cwd, path) {
65
+ const projectRoot = (0, node_path_1.resolve)(cwd);
66
+ const expectedPath = (0, node_path_1.join)(projectRoot, ...GENERATED_SECRET_RETIREMENT_EVIDENCE_SEGMENTS, (0, node_path_1.basename)(path));
67
+ if ((0, node_path_1.resolve)(path) !== expectedPath) {
68
+ throw new Error('Generated secret retirement evidence must remain inside the exact project evidence directory.');
69
+ }
70
+ const projectIdentity = (0, node_fs_1.lstatSync)(projectRoot);
71
+ if (projectIdentity.isSymbolicLink() || !projectIdentity.isDirectory()) {
72
+ throw new Error('Generated secret retirement requires one real project directory.');
73
+ }
74
+ let current = projectRoot;
75
+ for (const segment of GENERATED_SECRET_RETIREMENT_EVIDENCE_SEGMENTS) {
76
+ current = (0, node_path_1.join)(current, segment);
77
+ (0, private_state_js_1.ensurePrivateDirectory)(current);
78
+ }
79
+ if ((0, node_fs_1.existsSync)(path)) {
80
+ (0, private_state_js_1.assertPrivatePath)(path, 'file');
81
+ }
82
+ }
83
+ function sourceCommit(environment) {
84
+ const commit = (environment.EBK_SOURCE_COMMIT ??
85
+ environment.GITHUB_SHA ??
86
+ '').trim();
87
+ if (!SHA.test(commit)) {
88
+ throw new Error('Generated secret retirement requires one exact lifecycle source commit.');
89
+ }
90
+ return commit;
91
+ }
92
+ /**
93
+ * Complete the generated-secret portion of one successful native Slice remove.
94
+ * The invocation has already passed the normal stage/removal authorization;
95
+ * this function independently reattests its exact AWS identity and secret
96
+ * ownership before applying the stage-specific deletion policy.
97
+ */
98
+ async function retireGeneratedSecretsAfterSliceRemove(options, context, invocation, dependencies = {}) {
99
+ const environment = dependencies.environment ?? process.env;
100
+ const exactSourceCommit = sourceCommit(environment);
101
+ const startedAt = (dependencies.now ?? (() => new Date()))().toISOString();
102
+ const policy = (dependencies.readOperatingPolicy ?? index_js_2.readRepositoryOperatingPolicy)(context.root);
103
+ const stage = invocation.environment.EBK_CONSUMER_STAGE;
104
+ if (!(0, index_js_2.isActiveDeploymentStage)(policy.deploymentProfile, stage)) {
105
+ throw new Error(`Generated secret retirement stage ${stage} is inactive for the ${policy.deploymentProfile} deployment profile.`);
106
+ }
107
+ const region = (0, index_js_2.configuredDeploymentRegion)(policy.deploymentRegion);
108
+ const accountId = (0, index_js_2.configuredDeploymentAccountForStage)(policy.deploymentProfile, policy.deploymentAccounts, stage);
109
+ const expectedRoleArn = (0, index_js_1.createStageAuthorityIdentity)({
110
+ accountId,
111
+ partition: partitionForRegion(region),
112
+ region,
113
+ stage,
114
+ }).deploymentRoleArn;
115
+ if (invocation.environment.AWS_EXPECTED_ACCOUNT_ID !== accountId ||
116
+ invocation.environment.AWS_REGION !== region ||
117
+ invocation.environment.EBK_EXPECTED_DEPLOYMENT_ROLE_ARN !==
118
+ expectedRoleArn ||
119
+ (options.expectedRoleArn !== undefined &&
120
+ options.expectedRoleArn !== expectedRoleArn)) {
121
+ throw new Error('Generated secret retirement requires the exact committed account, Region, stage, and deployment role.');
122
+ }
123
+ const profile = invocation.environment.AWS_PROFILE;
124
+ if (profile !== undefined && options.profile !== profile) {
125
+ throw new Error('Generated secret retirement requires the exact invocation-private AWS profile.');
126
+ }
127
+ let principal;
128
+ try {
129
+ principal = await (dependencies.readPrincipal ?? readCurrentPrincipal)({
130
+ environment,
131
+ ...(profile ? { profile } : {}),
132
+ region,
133
+ });
134
+ }
135
+ catch {
136
+ throw new Error('Generated secret retirement could not authenticate its AWS principal.');
137
+ }
138
+ if (principal.accountId !== accountId ||
139
+ !(0, identity_js_1.matchesExpectedAssumedRoleArn)(accountId, principal.arn, expectedRoleArn)) {
140
+ throw new Error('Generated secret retirement is not running in the committed account as the exact temporary stage deployment role.');
141
+ }
142
+ const loaded = await (dependencies.loadMetadata ?? secret_preflight_js_1.loadSliceSecretMetadata)({
143
+ context,
144
+ cwd: invocation.cwd,
145
+ stage,
146
+ });
147
+ const evidencePath = (0, node_path_1.join)(invocation.cwd, exports.GENERATED_SECRET_RETIREMENT_EVIDENCE_DIRECTORY, `${stage}.json`);
148
+ prepareEvidenceDestination(invocation.cwd, evidencePath);
149
+ const controlPlane = dependencies.controlPlane ??
150
+ (0, index_js_3.createAwsGeneratedSecretRetirementControlPlane)({
151
+ clientConfiguration: {
152
+ ...(profile
153
+ ? { credentials: profileCredentials(profile, environment) }
154
+ : {}),
155
+ endpoint: (0, identity_js_1.canonicalAwsRegionalEndpoint)('secretsmanager', region),
156
+ region,
157
+ },
158
+ });
159
+ const result = await (0, index_js_3.runGeneratedSecretRetirement)({
160
+ accountId,
161
+ controlPlane,
162
+ declarations: loaded.declarations,
163
+ partition: partitionForRegion(region),
164
+ region,
165
+ scope: loaded.scope,
166
+ ...(dependencies.waitBeforeRetry === undefined
167
+ ? {}
168
+ : { waitBeforeRetry: dependencies.waitBeforeRetry }),
169
+ });
170
+ const evidence = Object.freeze({
171
+ accountId,
172
+ actorArn: principal.arn,
173
+ completedAt: (dependencies.now ?? (() => new Date()))().toISOString(),
174
+ deletionMode: result.deletionMode,
175
+ kind: 'ebk-generated-secret-retirement',
176
+ project: loaded.scope.slice,
177
+ ...(result.recoveryWindowDays === undefined
178
+ ? {}
179
+ : { recoveryWindowDays: result.recoveryWindowDays }),
180
+ region,
181
+ result: 'succeeded',
182
+ schemaVersion: 1,
183
+ secrets: result.secrets,
184
+ sourceCommit: exactSourceCommit,
185
+ stage,
186
+ startedAt,
187
+ workspace: loaded.scope.workspace,
188
+ });
189
+ (dependencies.writeEvidence ?? writeBoundedEvidence)(evidencePath, evidence);
190
+ return evidence;
191
+ }
192
+ //# sourceMappingURL=generated-secret-retirement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-secret-retirement.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/sst-lifecycle/generated-secret-retirement.ts"],"names":[],"mappings":";;;AAyMA,wFA2HC;AApUD,oDAA0E;AAC1E,wEAAwD;AAExD,qCAAgD;AAChD,yCAAoD;AAEpD,2DAA4E;AAC5E,uDAI+B;AAC/B,+DAM0C;AAC1C,qDAKgC;AAChC,+DAG+B;AAC/B,uEAI0C;AAM1C,MAAM,6CAA6C,GAAG;IACpD,MAAM;IACN,UAAU;IACV,6BAA6B;CACrB,CAAC;AAEE,QAAA,8CAA8C,GAAG,IAAA,gBAAI,EAChE,GAAG,6CAA6C,CACjD,CAAC;AA+CF,MAAM,GAAG,GAAG,oBAAoB,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,GAAG,IAAI,CAAC;AAEzC,SAAS,kBAAkB,CAAC,MAAc;IACxC,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC9C,IAAI,MAAM,CAAC,UAAU,CA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C,KAAK;QAC3B,GAAG,CAAC,MAAM,CAAC,kBAAkB,KAAK,SAAS;YACzC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,EAAE,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,EAAE,CAAC;QACtD,MAAM;QACN,MAAM,EAAE,WAAoB;QAC5B,aAAa,EAAE,CAAU;QACzB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,YAAY,EAAE,iBAAiB;QAC/B,KAAK;QACL,SAAS;QACT,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS;KAClC,CAAC,CAAC;IACH,CAAC,YAAY,CAAC,aAAa,IAAI,oBAAoB,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAC7E,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,46 @@
1
+ import type { ReadStream, WriteStream } from 'node:tty';
2
+ import { type ExecutorContext } from '@nx/devkit';
3
+ import { createLocalFederatedCredentialTransport } from '../local-deploy/federated-credential-transport.js';
4
+ import { type SstLifecycleCommand, type SstLifecycleOptions } from './run-sst-command.js';
5
+ export type GovernedNativeOperation = 'refresh' | 'remove' | 'unlock';
6
+ export interface GovernedNativeOperationApprovalRequest {
7
+ action: GovernedNativeOperation;
8
+ challenge: string;
9
+ sourceCommit: string;
10
+ stage: 'production' | 'staging';
11
+ }
12
+ export type GovernedNativeOperationApprover = (request: GovernedNativeOperationApprovalRequest) => Promise<boolean>;
13
+ interface ApprovalTerminal {
14
+ input: ReadStream;
15
+ output: WriteStream;
16
+ }
17
+ interface SourceIdentity {
18
+ clean: boolean;
19
+ commit: string;
20
+ workingTreeDigest: string;
21
+ }
22
+ type NativeRunner = (command: SstLifecycleCommand, options: SstLifecycleOptions, context: ExecutorContext, dependencies?: {
23
+ environment?: NodeJS.ProcessEnv;
24
+ }) => Promise<{
25
+ success: boolean;
26
+ }>;
27
+ export interface GovernedNativeOperationDependencies {
28
+ approve?: GovernedNativeOperationApprover;
29
+ createTransport?: typeof createLocalFederatedCredentialTransport;
30
+ environment?: NodeJS.ProcessEnv;
31
+ platform?: NodeJS.Platform;
32
+ readSource?: (root: string) => SourceIdentity;
33
+ run?: NativeRunner;
34
+ }
35
+ /** Active operator acknowledgement, not an independent-review claim. */
36
+ export declare function createTtyGovernedNativeOperationApprover(terminal?: ApprovalTerminal): GovernedNativeOperationApprover;
37
+ /**
38
+ * Govern refresh, remove, and unlock without replacing SST's native lifecycle.
39
+ * Local execution flattens the operator's federated profile into one private,
40
+ * invocation-scoped profile; protected stages additionally require a TTY
41
+ * acknowledgement. GitHub OIDC proceeds through the existing native path.
42
+ */
43
+ export declare function runGovernedNativeOperation(command: GovernedNativeOperation, options: SstLifecycleOptions, context: ExecutorContext, dependencies?: GovernedNativeOperationDependencies): Promise<{
44
+ success: boolean;
45
+ }>;
46
+ export {};
@@ -0,0 +1,153 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createTtyGovernedNativeOperationApprover = createTtyGovernedNativeOperationApprover;
4
+ exports.runGovernedNativeOperation = runGovernedNativeOperation;
5
+ const promises_1 = require("node:readline/promises");
6
+ const devkit_1 = require("@nx/devkit");
7
+ const index_js_1 = require("../../aws-authority/index.js");
8
+ const index_js_2 = require("../../repository-policy/index.js");
9
+ const federated_credential_transport_js_1 = require("../local-deploy/federated-credential-transport.js");
10
+ const local_deploy_js_1 = require("../local-deploy/local-deploy.js");
11
+ const run_sst_command_js_1 = require("./run-sst-command.js");
12
+ const SHA = /^[a-f0-9]{40,64}$/u;
13
+ function partitionForRegion(region) {
14
+ if (region.startsWith('cn-'))
15
+ return 'aws-cn';
16
+ if (region.startsWith('us-gov-'))
17
+ return 'aws-us-gov';
18
+ return 'aws';
19
+ }
20
+ function readSource(root) {
21
+ const identity = (0, local_deploy_js_1.localWorkingTreeDigest)(root);
22
+ const commit = identity.commit;
23
+ if (!SHA.test(commit)) {
24
+ throw new Error('Governed native lifecycle could not resolve one exact Git HEAD.');
25
+ }
26
+ return {
27
+ clean: identity.clean,
28
+ commit,
29
+ workingTreeDigest: identity.digest,
30
+ };
31
+ }
32
+ /** Active operator acknowledgement, not an independent-review claim. */
33
+ function createTtyGovernedNativeOperationApprover(terminal = {
34
+ input: process.stdin,
35
+ output: process.stderr,
36
+ }) {
37
+ return async ({ challenge }) => {
38
+ if (!terminal.input.isTTY || !terminal.output.isTTY) {
39
+ throw new Error('Local protected-stage lifecycle mutation requires an interactive TTY operated by a human or authorized agent.');
40
+ }
41
+ const prompt = (0, promises_1.createInterface)({
42
+ input: terminal.input,
43
+ output: terminal.output,
44
+ terminal: true,
45
+ });
46
+ try {
47
+ return ((await prompt.question(`Type ${challenge} to continue: `)) === challenge);
48
+ }
49
+ catch {
50
+ throw new Error('Local protected-stage lifecycle mutation requires an interactive TTY operated by a human or authorized agent.');
51
+ }
52
+ finally {
53
+ prompt.close();
54
+ }
55
+ };
56
+ }
57
+ /**
58
+ * Govern refresh, remove, and unlock without replacing SST's native lifecycle.
59
+ * Local execution flattens the operator's federated profile into one private,
60
+ * invocation-scoped profile; protected stages additionally require a TTY
61
+ * acknowledgement. GitHub OIDC proceeds through the existing native path.
62
+ */
63
+ async function runGovernedNativeOperation(command, options, context, dependencies = {}) {
64
+ try {
65
+ (0, run_sst_command_js_1.assertGovernedAwsLifecyclePlatform)(dependencies.platform);
66
+ }
67
+ catch (error) {
68
+ devkit_1.logger.error(error instanceof Error ? error.message : String(error));
69
+ return { success: false };
70
+ }
71
+ const environment = dependencies.environment ?? process.env;
72
+ const run = dependencies.run ?? run_sst_command_js_1.runSstCommand;
73
+ if (environment.GITHUB_ACTIONS === 'true') {
74
+ return run(command, options, context, { environment });
75
+ }
76
+ let transport;
77
+ try {
78
+ const policy = (0, index_js_2.readRepositoryOperatingPolicy)(context.root);
79
+ const stage = options.stage?.trim() ?? '';
80
+ if (!(0, index_js_2.isActiveDeploymentStage)(policy.deploymentProfile, stage)) {
81
+ throw new Error(`Lifecycle stage ${stage || '<absent>'} is inactive for the ${policy.deploymentProfile} deployment profile.`);
82
+ }
83
+ if ((0, index_js_2.requiresGithubDeployment)(policy.deploymentProfile, stage)) {
84
+ throw new Error(`The ${policy.deploymentProfile} profile requires GitHub deployment authority for ${stage}.`);
85
+ }
86
+ const region = (0, index_js_2.configuredDeploymentRegion)(policy.deploymentRegion);
87
+ if (options.region?.trim() && options.region.trim() !== region) {
88
+ throw new Error(`Lifecycle Region ${options.region.trim()} differs from committed deployment Region ${region}.`);
89
+ }
90
+ const account = (0, index_js_2.configuredDeploymentAccountForStage)(policy.deploymentProfile, policy.deploymentAccounts, stage);
91
+ const expectedRoleArn = (0, index_js_1.createStageAuthorityIdentity)({
92
+ accountId: account,
93
+ partition: partitionForRegion(region),
94
+ region,
95
+ stage,
96
+ }).deploymentRoleArn;
97
+ const source = (dependencies.readSource ?? readSource)(context.root);
98
+ if (stage !== 'development' && !source.clean) {
99
+ throw new Error(`Local ${stage} ${command} requires a completely clean source tree.`);
100
+ }
101
+ if (stage !== 'development') {
102
+ const challenge = `approve:${command}:${stage}:${source.commit}`;
103
+ const acknowledged = await (dependencies.approve ?? createTtyGovernedNativeOperationApprover())({
104
+ action: command,
105
+ challenge,
106
+ sourceCommit: source.commit,
107
+ stage,
108
+ });
109
+ if (!acknowledged) {
110
+ throw new Error(`Local ${stage} ${command} acknowledgement was declined.`);
111
+ }
112
+ }
113
+ transport = await (dependencies.createTransport ?? federated_credential_transport_js_1.createLocalFederatedCredentialTransport)({
114
+ account,
115
+ expectedRoleArn,
116
+ ...(options.profile ? { profile: options.profile } : {}),
117
+ region,
118
+ });
119
+ await transport.refresh();
120
+ const childEnvironment = {
121
+ ...transport.childEnvironment(environment),
122
+ AWS_EXPECTED_ACCOUNT_ID: account,
123
+ AWS_REGION: region,
124
+ EBK_NX_STAGE_LIFECYCLE: 'local',
125
+ EBK_LOCAL_SOURCE_TREE: source.workingTreeDigest,
126
+ EBK_SOURCE_COMMIT: source.commit,
127
+ };
128
+ const result = await run(command, {
129
+ ...options,
130
+ expectedRoleArn,
131
+ profile: transport.profile,
132
+ region,
133
+ stage,
134
+ }, context, { environment: childEnvironment });
135
+ transport.cleanup();
136
+ transport = undefined;
137
+ return result;
138
+ }
139
+ catch (error) {
140
+ devkit_1.logger.error(error instanceof Error ? error.message : String(error));
141
+ if (transport) {
142
+ try {
143
+ transport.cleanup();
144
+ transport = undefined;
145
+ }
146
+ catch {
147
+ devkit_1.logger.error('Local federated credential transport cleanup failed; lifecycle acceptance is blocked.');
148
+ }
149
+ }
150
+ return { success: false };
151
+ }
152
+ }
153
+ //# sourceMappingURL=governed-native-operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"governed-native-operation.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/sst-lifecycle/governed-native-operation.ts"],"names":[],"mappings":";;AAyFA,4FA6BC;AAQD,gEAsHC;AApPD,qDAAyD;AAGzD,uCAA0D;AAE1D,2DAA4E;AAC5E,+DAM0C;AAC1C,yGAG2D;AAC3D,qEAAyE;AACzE,6DAK8B;AA0C9B,MAAM,GAAG,GAAG,oBAAoB,CAAC;AAEjC,SAAS,kBAAkB,CAAC,MAAc;IACxC,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC9C,IAAI,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC;QAAE,OAAO,YAAY,CAAC;IACtD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,MAAM,QAAQ,GAAG,IAAA,wCAAsB,EAAC,IAAI,CAAC,CAAC;IAC9C,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;IAC/B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;IACJ,CAAC;IACD,OAAO;QACL,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,MAAM;QAC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YACxD,MAAM;SACP,CAAC,CAAC;QACH,MAAM,SAAS,CAAC,OAAO,EAAE,CAAC;QAC1B,MAAM,gBAAgB,GAAG;YACvB,GAAG,SAAS,CAAC,gBAAgB,CAAC,WAAW,CAAC;YAC1C,uBAAuB,EAAE,OAAO;YAChC,UAAU,EAAE,MAAM;YAClB,sBAAsB,EAAE,OAAO;YAC/B,qBAAqB,EAAE,MAAM,CAAC,iBAAiB;YAC/C,iBAAiB,EAAE,MAAM,CAAC,MAAM;SACjC,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,GAAG,CACtB,OAAO,EACP;YACE,GAAG,OAAO;YACV,eAAe;YACf,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,MAAM;YACN,KAAK;SACN,EACD,OAAO,EACP,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAClC,CAAC;QACF,SAAS,CAAC,OAAO,EAAE,CAAC;QACpB,SAAS,GAAG,SAAS,CAAC;QACtB,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAM,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACrE,IAAI,SAAS,EAAE,CAAC;YACd,IAAI,CAAC;gBACH,SAAS,CAAC,OAAO,EAAE,CAAC;gBACpB,SAAS,GAAG,SAAS,CAAC;YACxB,CAAC;YAAC,MAAM,CAAC;gBACP,eAAM,CAAC,KAAK,CACV,uFAAuF,CACxF,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC"}
@@ -3,15 +3,14 @@ import { spawn } from 'node:child_process';
3
3
  import { type FoundationStageResolution } from '../../foundation/stages.js';
4
4
  import { type PersonalStageResolver } from '../../local-dev/personal-stage.js';
5
5
  import { type DeploymentProfile } from '../../repository-policy/index.js';
6
- import { preflightManagedLogGroups } from './logging-preflight.js';
7
6
  import { preflightSliceSecretMetadata } from './secret-preflight.js';
7
+ import { retireGeneratedSecretsAfterSliceRemove } from './generated-secret-retirement.js';
8
8
  export type SstLifecycleCommand = 'deploy' | 'dev' | 'refresh' | 'remove' | 'unlock';
9
9
  export interface SstLifecycleOptions {
10
10
  args?: string[];
11
11
  cwd?: string;
12
12
  expectedRoleArn?: string;
13
13
  foundationStage?: string;
14
- localProductionConfirmation?: string;
15
14
  profile?: string;
16
15
  region?: string;
17
16
  stage?: string;
@@ -28,20 +27,39 @@ export interface SstCommandInvocation {
28
27
  EBK_CONSUMER_STAGE: string;
29
28
  EBK_EXPECTED_DEPLOYMENT_ROLE_ARN?: string;
30
29
  EBK_FOUNDATION_STAGE: string;
30
+ EBK_LOCAL_SOURCE_TREE?: string;
31
31
  EBK_PRODUCTION_FOUNDATION_PROFILE?: string;
32
+ EBK_SOURCE_COMMIT?: string;
32
33
  };
33
34
  executable: string;
34
35
  }
35
36
  export interface SstLifecyclePreflightDependencies {
36
- infrastructureAuthorization?: (command: 'deploy' | 'refresh' | 'remove', options: SstLifecycleOptions, context: ExecutorContext, invocation: SstCommandInvocation) => Promise<void>;
37
- logging?: typeof preflightManagedLogGroups;
38
37
  secrets?: typeof preflightSliceSecretMetadata;
39
- unlockAuthorization?: (options: SstLifecycleOptions, invocation: SstCommandInvocation) => Promise<void> | void;
38
+ unlockAuthorization?: (options: SstLifecycleOptions, invocation: SstCommandInvocation, environment?: NodeJS.ProcessEnv) => Promise<void> | void;
40
39
  }
41
40
  interface SstLifecycleRuntimeDependencies extends SstLifecyclePreflightDependencies {
42
- infrastructureConvergence?: (command: 'deploy' | 'refresh' | 'remove', options: SstLifecycleOptions, context: ExecutorContext, invocation: SstCommandInvocation, applySucceeded: boolean) => Promise<boolean>;
41
+ environment?: NodeJS.ProcessEnv;
42
+ generatedSecretRetirement?: typeof retireGeneratedSecretsAfterSliceRemove;
43
+ platform?: NodeJS.Platform;
43
44
  spawnChild?: typeof spawn;
44
45
  }
46
+ export declare function assertGovernedAwsLifecyclePlatform(platform?: NodeJS.Platform): void;
47
+ export interface GovernedChildProcessResult {
48
+ error?: Error;
49
+ signal: NodeJS.Signals | null;
50
+ status: number | null;
51
+ }
52
+ /** Run one exact shell-free child as an owned process tree. The returned
53
+ * promise settles only after child teardown and the bounded caller-supplied
54
+ * close reconciliation complete. */
55
+ export declare function runGovernedChildProcess(input: {
56
+ afterClose?: (result: GovernedChildProcessResult) => Promise<void> | void;
57
+ args: readonly string[];
58
+ cwd: string;
59
+ environment: NodeJS.ProcessEnv;
60
+ executable: string;
61
+ spawnChild?: typeof spawn;
62
+ }): Promise<GovernedChildProcessResult>;
45
63
  export declare function createSstChildEnvironment(ambient: NodeJS.ProcessEnv, invocation: SstCommandInvocation['environment']): NodeJS.ProcessEnv;
46
64
  export declare function assertSafeSstForwardedArguments(args: readonly string[]): void;
47
65
  export declare function resolveSstDevMode(environment: NodeJS.ProcessEnv, forwardedArguments?: readonly string[]): 'basic' | 'mono' | undefined;
@@ -50,7 +68,7 @@ export declare function resolveSstLifecycleStages(options: SstLifecycleOptions,
50
68
  export declare function buildSstCommandInvocation(command: SstLifecycleCommand, options: SstLifecycleOptions, context: ExecutorContext, environment?: NodeJS.ProcessEnv, dependencies?: {
51
69
  personalStageResolver?: PersonalStageResolver;
52
70
  }): SstCommandInvocation;
53
- export declare function runSstLifecyclePreflights(command: SstLifecycleCommand, options: SstLifecycleOptions, context: ExecutorContext, invocation: SstCommandInvocation, dependencies?: SstLifecyclePreflightDependencies): Promise<void>;
71
+ export declare function runSstLifecyclePreflights(command: SstLifecycleCommand, options: SstLifecycleOptions, context: ExecutorContext, invocation: SstCommandInvocation, dependencies?: SstLifecyclePreflightDependencies, environment?: NodeJS.ProcessEnv): Promise<void>;
54
72
  export declare function runSstCommand(command: SstLifecycleCommand, options: SstLifecycleOptions, context: ExecutorContext, dependencies?: SstLifecycleRuntimeDependencies): Promise<{
55
73
  success: boolean;
56
74
  }>;