takomo 8.0.3 → 9.0.0-alpha.1

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 (339) hide show
  1. package/dist/cli-io/formatters.d.ts +3 -1
  2. package/dist/cli-io/formatters.js +13 -1
  3. package/dist/cli-io/formatters.js.map +1 -1
  4. package/dist/cli-io/stacks/common.d.ts +4 -0
  5. package/dist/cli-io/stacks/common.js +17 -0
  6. package/dist/cli-io/stacks/common.js.map +1 -1
  7. package/dist/cli-io/stacks/deploy-stacks/deploy-stacks-io.d.ts +8 -1
  8. package/dist/cli-io/stacks/deploy-stacks/deploy-stacks-io.js +90 -25
  9. package/dist/cli-io/stacks/deploy-stacks/deploy-stacks-io.js.map +1 -1
  10. package/dist/cli-io/stacks/deploy-stacks/emit-stack-templates-io.js +8 -1
  11. package/dist/cli-io/stacks/deploy-stacks/emit-stack-templates-io.js.map +1 -1
  12. package/dist/cli-io/stacks/deploy-stacks/parameters.d.ts +3 -0
  13. package/dist/cli-io/stacks/deploy-stacks/parameters.js +72 -0
  14. package/dist/cli-io/stacks/deploy-stacks/parameters.js.map +1 -1
  15. package/dist/cli-io/stacks/deploy-stacks/resources.d.ts +2 -0
  16. package/dist/cli-io/stacks/deploy-stacks/resources.js +20 -0
  17. package/dist/cli-io/stacks/deploy-stacks/resources.js.map +1 -1
  18. package/dist/cli-io/stacks/deploy-stacks/stack-policy.d.ts +2 -2
  19. package/dist/cli-io/stacks/deploy-stacks/stack-policy.js.map +1 -1
  20. package/dist/cli-io/stacks/deploy-stacks/tags.d.ts +3 -0
  21. package/dist/cli-io/stacks/deploy-stacks/tags.js +68 -0
  22. package/dist/cli-io/stacks/deploy-stacks/tags.js.map +1 -1
  23. package/dist/cli-io/stacks/deploy-stacks/termination-protection.d.ts +2 -2
  24. package/dist/cli-io/stacks/deploy-stacks/termination-protection.js.map +1 -1
  25. package/dist/cli-io/stacks/detect-drift-io.js +2 -2
  26. package/dist/cli-io/stacks/detect-drift-io.js.map +1 -1
  27. package/dist/cli-io/stacks/list-stacks-io.js +3 -2
  28. package/dist/cli-io/stacks/list-stacks-io.js.map +1 -1
  29. package/dist/cli-io/stacks/undeploy-stacks-io.js +41 -19
  30. package/dist/cli-io/stacks/undeploy-stacks-io.js.map +1 -1
  31. package/dist/command/command-model.d.ts +2 -1
  32. package/dist/command/command-model.js.map +1 -1
  33. package/dist/command/stacks/common/custom-states.d.ts +33 -0
  34. package/dist/command/stacks/common/custom-states.js +2 -0
  35. package/dist/command/stacks/common/custom-states.js.map +1 -0
  36. package/dist/command/stacks/common/load-current-cf-stacks.d.ts +17 -5
  37. package/dist/command/stacks/common/load-current-cf-stacks.js +73 -13
  38. package/dist/command/stacks/common/load-current-cf-stacks.js.map +1 -1
  39. package/dist/command/stacks/deploy/command.js +1 -1
  40. package/dist/command/stacks/deploy/command.js.map +1 -1
  41. package/dist/command/stacks/deploy/custom-stack/states.d.ts +42 -0
  42. package/dist/command/stacks/deploy/custom-stack/states.js.map +1 -0
  43. package/dist/command/stacks/deploy/custom-stack/steps/create-or-update-stack.d.ts +3 -0
  44. package/dist/command/stacks/deploy/custom-stack/steps/create-or-update-stack.js +11 -0
  45. package/dist/command/stacks/deploy/custom-stack/steps/create-or-update-stack.js.map +1 -0
  46. package/dist/command/stacks/deploy/custom-stack/steps/create-stack.d.ts +3 -0
  47. package/dist/command/stacks/deploy/custom-stack/steps/create-stack.js +41 -0
  48. package/dist/command/stacks/deploy/custom-stack/steps/create-stack.js.map +1 -0
  49. package/dist/command/stacks/deploy/custom-stack/steps/get-changes.d.ts +8 -0
  50. package/dist/command/stacks/deploy/custom-stack/steps/get-changes.js +58 -0
  51. package/dist/command/stacks/deploy/custom-stack/steps/get-changes.js.map +1 -0
  52. package/dist/command/stacks/deploy/custom-stack/steps/prepare-parameters.d.ts +3 -0
  53. package/dist/command/stacks/deploy/custom-stack/steps/prepare-parameters.js +44 -0
  54. package/dist/command/stacks/deploy/custom-stack/steps/prepare-parameters.js.map +1 -0
  55. package/dist/command/stacks/deploy/{steps → custom-stack/steps}/prepare-tags.d.ts +1 -1
  56. package/dist/command/stacks/deploy/custom-stack/steps/prepare-tags.js +27 -0
  57. package/dist/command/stacks/deploy/custom-stack/steps/prepare-tags.js.map +1 -0
  58. package/dist/command/stacks/deploy/custom-stack/steps/review-deployment.d.ts +3 -0
  59. package/dist/command/stacks/deploy/custom-stack/steps/review-deployment.js +15 -0
  60. package/dist/command/stacks/deploy/custom-stack/steps/review-deployment.js.map +1 -0
  61. package/dist/command/stacks/deploy/custom-stack/steps/update-stack.d.ts +3 -0
  62. package/dist/command/stacks/deploy/custom-stack/steps/update-stack.js +42 -0
  63. package/dist/command/stacks/deploy/custom-stack/steps/update-stack.js.map +1 -0
  64. package/dist/command/stacks/deploy/custom-stack/steps/wait-dependencies-to-complete.d.ts +3 -0
  65. package/dist/command/stacks/deploy/custom-stack/steps/wait-dependencies-to-complete.js +26 -0
  66. package/dist/command/stacks/deploy/custom-stack/steps/wait-dependencies-to-complete.js.map +1 -0
  67. package/dist/command/stacks/deploy/custom-stack/transitions.d.ts +13 -0
  68. package/dist/command/stacks/deploy/custom-stack/transitions.js +21 -0
  69. package/dist/command/stacks/deploy/custom-stack/transitions.js.map +1 -0
  70. package/dist/command/stacks/deploy/deploy-stack.d.ts +3 -4
  71. package/dist/command/stacks/deploy/deploy-stack.js +73 -34
  72. package/dist/command/stacks/deploy/deploy-stack.js.map +1 -1
  73. package/dist/command/stacks/deploy/execute-deploy-context.js +4 -4
  74. package/dist/command/stacks/deploy/execute-deploy-context.js.map +1 -1
  75. package/dist/command/stacks/deploy/model.d.ts +7 -2
  76. package/dist/command/stacks/deploy/plan.d.ts +18 -4
  77. package/dist/command/stacks/deploy/plan.js +28 -10
  78. package/dist/command/stacks/deploy/plan.js.map +1 -1
  79. package/dist/command/stacks/deploy/{states.d.ts → standard-stack/states.d.ts} +17 -15
  80. package/dist/command/stacks/deploy/standard-stack/states.js.map +1 -0
  81. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/continue-update-rollback.d.ts +1 -1
  82. package/dist/command/stacks/deploy/standard-stack/steps/continue-update-rollback.js.map +1 -0
  83. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/emit-stack-template.d.ts +1 -1
  84. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/emit-stack-template.js +2 -2
  85. package/dist/command/stacks/deploy/standard-stack/steps/emit-stack-template.js.map +1 -0
  86. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/enrich-current-stack.d.ts +1 -1
  87. package/dist/command/stacks/deploy/standard-stack/steps/enrich-current-stack.js.map +1 -0
  88. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/execute-after-deploy-hooks.d.ts +1 -1
  89. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/execute-after-deploy-hooks.js +2 -2
  90. package/dist/command/stacks/deploy/standard-stack/steps/execute-after-deploy-hooks.js.map +1 -0
  91. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/execute-before-deploy-hooks.d.ts +1 -1
  92. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/execute-before-deploy-hooks.js +2 -2
  93. package/dist/command/stacks/deploy/standard-stack/steps/execute-before-deploy-hooks.js.map +1 -0
  94. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-change-set-create.d.ts +3 -3
  95. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-change-set-create.js +2 -2
  96. package/dist/command/stacks/deploy/standard-stack/steps/initiate-change-set-create.js.map +1 -0
  97. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-failed-stack-delete.d.ts +1 -1
  98. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-failed-stack-delete.js +1 -1
  99. package/dist/command/stacks/deploy/standard-stack/steps/initiate-failed-stack-delete.js.map +1 -0
  100. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-stack-create-or-update.d.ts +1 -1
  101. package/dist/command/stacks/deploy/standard-stack/steps/initiate-stack-create-or-update.js.map +1 -0
  102. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-stack-create.d.ts +1 -1
  103. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-stack-create.js +2 -2
  104. package/dist/command/stacks/deploy/standard-stack/steps/initiate-stack-create.js.map +1 -0
  105. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-stack-update.d.ts +1 -1
  106. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-stack-update.js +3 -3
  107. package/dist/command/stacks/deploy/standard-stack/steps/initiate-stack-update.js.map +1 -0
  108. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/prepare-parameters.d.ts +1 -1
  109. package/dist/command/stacks/deploy/standard-stack/steps/prepare-parameters.js.map +1 -0
  110. package/dist/command/stacks/deploy/standard-stack/steps/prepare-tags.d.ts +3 -0
  111. package/dist/command/stacks/deploy/standard-stack/steps/prepare-tags.js.map +1 -0
  112. package/dist/command/stacks/deploy/standard-stack/steps/prepare-template.d.ts +7 -0
  113. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/prepare-template.js +1 -1
  114. package/dist/command/stacks/deploy/standard-stack/steps/prepare-template.js.map +1 -0
  115. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/review-change-set.d.ts +1 -1
  116. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/review-change-set.js +1 -1
  117. package/dist/command/stacks/deploy/standard-stack/steps/review-change-set.js.map +1 -0
  118. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/summarize-template.d.ts +1 -1
  119. package/dist/command/stacks/deploy/standard-stack/steps/summarize-template.js.map +1 -0
  120. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/update-termination-protection.d.ts +1 -1
  121. package/dist/command/stacks/deploy/standard-stack/steps/update-termination-protection.js.map +1 -0
  122. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/upload-template.d.ts +1 -1
  123. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/upload-template.js +1 -1
  124. package/dist/command/stacks/deploy/standard-stack/steps/upload-template.js.map +1 -0
  125. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/validate-parameters.d.ts +3 -3
  126. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/validate-parameters.js +3 -3
  127. package/dist/command/stacks/deploy/standard-stack/steps/validate-parameters.js.map +1 -0
  128. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/validate-template.d.ts +1 -1
  129. package/dist/command/stacks/deploy/standard-stack/steps/validate-template.js.map +1 -0
  130. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-change-set-to-be-ready.d.ts +1 -1
  131. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-change-set-to-be-ready.js +5 -5
  132. package/dist/command/stacks/deploy/standard-stack/steps/wait-change-set-to-be-ready.js.map +1 -0
  133. package/dist/command/stacks/deploy/standard-stack/steps/wait-dependencies-to-complete.d.ts +3 -0
  134. package/dist/command/stacks/deploy/standard-stack/steps/wait-dependencies-to-complete.js.map +1 -0
  135. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-failed-stack-delete-to-complete.d.ts +1 -1
  136. package/dist/command/stacks/deploy/standard-stack/steps/wait-failed-stack-delete-to-complete.js.map +1 -0
  137. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-stack-create-or-update-to-complete.d.ts +1 -1
  138. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-stack-create-or-update-to-complete.js +1 -1
  139. package/dist/command/stacks/deploy/standard-stack/steps/wait-stack-create-or-update-to-complete.js.map +1 -0
  140. package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-stack-rollback-to-complete.d.ts +1 -1
  141. package/dist/command/stacks/deploy/standard-stack/steps/wait-stack-rollback-to-complete.js.map +1 -0
  142. package/dist/command/stacks/deploy/{transitions.d.ts → standard-stack/transitions.d.ts} +4 -4
  143. package/dist/command/stacks/deploy/{transitions.js → standard-stack/transitions.js} +2 -2
  144. package/dist/command/stacks/deploy/standard-stack/transitions.js.map +1 -0
  145. package/dist/command/stacks/deploy/validate.js +3 -1
  146. package/dist/command/stacks/deploy/validate.js.map +1 -1
  147. package/dist/command/stacks/drift/detect-drift.js +10 -5
  148. package/dist/command/stacks/drift/detect-drift.js.map +1 -1
  149. package/dist/command/stacks/inspect/configuration/command.js.map +1 -1
  150. package/dist/command/stacks/list/list-stacks.js +27 -9
  151. package/dist/command/stacks/list/list-stacks.js.map +1 -1
  152. package/dist/command/stacks/list/model.d.ts +1 -0
  153. package/dist/command/stacks/undeploy/command.js +3 -3
  154. package/dist/command/stacks/undeploy/command.js.map +1 -1
  155. package/dist/command/stacks/undeploy/custom-stack/states.d.ts +27 -0
  156. package/dist/command/stacks/undeploy/custom-stack/states.js +2 -0
  157. package/dist/command/stacks/undeploy/custom-stack/states.js.map +1 -0
  158. package/dist/command/stacks/undeploy/custom-stack/steps/delete-stack.d.ts +3 -0
  159. package/dist/command/stacks/undeploy/custom-stack/steps/delete-stack.js +38 -0
  160. package/dist/command/stacks/undeploy/custom-stack/steps/delete-stack.js.map +1 -0
  161. package/dist/command/stacks/undeploy/custom-stack/steps/wait-dependents-to-complete.d.ts +3 -0
  162. package/dist/command/stacks/undeploy/custom-stack/steps/wait-dependents-to-complete.js +26 -0
  163. package/dist/command/stacks/undeploy/custom-stack/steps/wait-dependents-to-complete.js.map +1 -0
  164. package/dist/command/stacks/undeploy/custom-stack/transitions.d.ts +7 -0
  165. package/dist/command/stacks/undeploy/custom-stack/transitions.js +9 -0
  166. package/dist/command/stacks/undeploy/custom-stack/transitions.js.map +1 -0
  167. package/dist/command/stacks/undeploy/delete.js +41 -17
  168. package/dist/command/stacks/undeploy/delete.js.map +1 -1
  169. package/dist/command/stacks/undeploy/plan.d.ts +19 -5
  170. package/dist/command/stacks/undeploy/plan.js +39 -11
  171. package/dist/command/stacks/undeploy/plan.js.map +1 -1
  172. package/dist/command/stacks/undeploy/standard-stack/states.d.ts +32 -0
  173. package/dist/command/stacks/undeploy/standard-stack/states.js +2 -0
  174. package/dist/command/stacks/undeploy/standard-stack/states.js.map +1 -0
  175. package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/execute-after-undeploy-hooks.d.ts +1 -1
  176. package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/execute-after-undeploy-hooks.js +1 -1
  177. package/dist/command/stacks/undeploy/standard-stack/steps/execute-after-undeploy-hooks.js.map +1 -0
  178. package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/execute-before-undeploy-hooks.d.ts +1 -1
  179. package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/execute-before-undeploy-hooks.js +1 -1
  180. package/dist/command/stacks/undeploy/standard-stack/steps/execute-before-undeploy-hooks.js.map +1 -0
  181. package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/initiate-stack-delete.d.ts +1 -1
  182. package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/initiate-stack-delete.js +1 -1
  183. package/dist/command/stacks/undeploy/standard-stack/steps/initiate-stack-delete.js.map +1 -0
  184. package/dist/command/stacks/undeploy/standard-stack/steps/wait-dependents-to-complete.d.ts +3 -0
  185. package/dist/command/stacks/undeploy/standard-stack/steps/wait-dependents-to-complete.js.map +1 -0
  186. package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/wait-stack-delete-to-complete.d.ts +1 -1
  187. package/dist/command/stacks/undeploy/standard-stack/steps/wait-stack-delete-to-complete.js.map +1 -0
  188. package/dist/command/stacks/undeploy/{transitions.d.ts → standard-stack/transitions.d.ts} +4 -4
  189. package/dist/command/stacks/undeploy/{transitions.js → standard-stack/transitions.js} +2 -2
  190. package/dist/command/stacks/undeploy/standard-stack/transitions.js.map +1 -0
  191. package/dist/command/stacks/undeploy/validate.js +11 -6
  192. package/dist/command/stacks/undeploy/validate.js.map +1 -1
  193. package/dist/config/custom-stack-config.d.ts +8 -0
  194. package/dist/config/custom-stack-config.js +6 -0
  195. package/dist/config/custom-stack-config.js.map +1 -0
  196. package/dist/config/stack-config.d.ts +9 -11
  197. package/dist/config/standard-stack-config.d.ts +15 -0
  198. package/dist/config/standard-stack-config.js +3 -0
  199. package/dist/config/standard-stack-config.js.map +1 -0
  200. package/dist/context/stacks-context.d.ts +3 -1
  201. package/dist/custom-stacks/cmd-custom-stack-handler.d.ts +24 -0
  202. package/dist/custom-stacks/cmd-custom-stack-handler.js +274 -0
  203. package/dist/custom-stacks/cmd-custom-stack-handler.js.map +1 -0
  204. package/dist/custom-stacks/custom-stack-handler-registry.d.ts +13 -0
  205. package/dist/custom-stacks/custom-stack-handler-registry.js +32 -0
  206. package/dist/custom-stacks/custom-stack-handler-registry.js.map +1 -0
  207. package/dist/custom-stacks/custom-stack-handler.d.ts +401 -0
  208. package/dist/custom-stacks/custom-stack-handler.js +2 -0
  209. package/dist/custom-stacks/custom-stack-handler.js.map +1 -0
  210. package/dist/extensions/config-customizer.d.ts +5 -0
  211. package/dist/hooks/execute.d.ts +2 -2
  212. package/dist/hooks/execute.js +1 -0
  213. package/dist/hooks/execute.js.map +1 -1
  214. package/dist/hooks/hook.d.ts +2 -2
  215. package/dist/index.d.ts +5 -1
  216. package/dist/index.js +2 -0
  217. package/dist/index.js.map +1 -1
  218. package/dist/parser/stacks/build-custom-stack-config.d.ts +5 -0
  219. package/dist/parser/stacks/build-custom-stack-config.js +51 -0
  220. package/dist/parser/stacks/build-custom-stack-config.js.map +1 -0
  221. package/dist/parser/stacks/build-standard-stack-config.d.ts +6 -0
  222. package/dist/parser/stacks/{build-stack-config.js → build-standard-stack-config.js} +5 -4
  223. package/dist/parser/stacks/build-standard-stack-config.js.map +1 -0
  224. package/dist/parser/stacks/parse-custom-stack-type.d.ts +2 -0
  225. package/dist/parser/stacks/parse-custom-stack-type.js +10 -0
  226. package/dist/parser/stacks/parse-custom-stack-type.js.map +1 -0
  227. package/dist/resolvers/stack-output-resolver.js +4 -0
  228. package/dist/resolvers/stack-output-resolver.js.map +1 -1
  229. package/dist/schema/custom-stack-config-schema.d.ts +7 -0
  230. package/dist/schema/custom-stack-config-schema.js +34 -0
  231. package/dist/schema/custom-stack-config-schema.js.map +1 -0
  232. package/dist/schema/stacks-schema.d.ts +1 -0
  233. package/dist/schema/stacks-schema.js +2 -0
  234. package/dist/schema/stacks-schema.js.map +1 -1
  235. package/dist/schema/{stack-config-schema.d.ts → standard-stack-config-schema.d.ts} +2 -2
  236. package/dist/schema/{stack-config-schema.js → standard-stack-config-schema.js} +4 -3
  237. package/dist/schema/standard-stack-config-schema.js.map +1 -0
  238. package/dist/stacks/custom-stack.d.ts +26 -0
  239. package/dist/stacks/custom-stack.js +38 -0
  240. package/dist/stacks/custom-stack.js.map +1 -0
  241. package/dist/stacks/stack.d.ts +13 -41
  242. package/dist/stacks/stack.js +11 -38
  243. package/dist/stacks/stack.js.map +1 -1
  244. package/dist/stacks/standard-stack.d.ts +54 -0
  245. package/dist/stacks/standard-stack.js +42 -0
  246. package/dist/stacks/standard-stack.js.map +1 -0
  247. package/dist/takomo-config-repository-fs/deployment-targets/config-repository.js +5 -1
  248. package/dist/takomo-config-repository-fs/deployment-targets/config-repository.js.map +1 -1
  249. package/dist/takomo-config-repository-fs/stacks/config-repository.js +4 -1
  250. package/dist/takomo-config-repository-fs/stacks/config-repository.js.map +1 -1
  251. package/dist/takomo-config-repository-fs/stacks/parser.d.ts +4 -3
  252. package/dist/takomo-config-repository-fs/stacks/parser.js +35 -7
  253. package/dist/takomo-config-repository-fs/stacks/parser.js.map +1 -1
  254. package/dist/takomo-stacks-context/config/build-custom-stack.d.ts +15 -0
  255. package/dist/takomo-stacks-context/config/build-custom-stack.js +104 -0
  256. package/dist/takomo-stacks-context/config/build-custom-stack.js.map +1 -0
  257. package/dist/takomo-stacks-context/config/build-stack.d.ts +12 -12
  258. package/dist/takomo-stacks-context/config/build-stack.js +18 -139
  259. package/dist/takomo-stacks-context/config/build-stack.js.map +1 -1
  260. package/dist/takomo-stacks-context/config/build-stacks-context.js +8 -2
  261. package/dist/takomo-stacks-context/config/build-stacks-context.js.map +1 -1
  262. package/dist/takomo-stacks-context/config/build-standard-stack.d.ts +27 -0
  263. package/dist/takomo-stacks-context/config/build-standard-stack.js +144 -0
  264. package/dist/takomo-stacks-context/config/build-standard-stack.js.map +1 -0
  265. package/dist/takomo-stacks-context/config/config-tree.d.ts +3 -2
  266. package/dist/takomo-stacks-context/config/create-root-stack-group.js.map +1 -1
  267. package/dist/takomo-stacks-context/config/process-config-tree.d.ts +2 -1
  268. package/dist/takomo-stacks-context/config/process-config-tree.js +6 -6
  269. package/dist/takomo-stacks-context/config/process-config-tree.js.map +1 -1
  270. package/dist/takomo-stacks-context/dependencies.js +2 -2
  271. package/dist/takomo-stacks-context/dependencies.js.map +1 -1
  272. package/dist/takomo-stacks-context/model.d.ts +7 -5
  273. package/dist/takomo-stacks-context/model.js +2 -0
  274. package/dist/takomo-stacks-context/model.js.map +1 -1
  275. package/dist/takomo-stacks-model/util.d.ts +0 -4
  276. package/dist/takomo-stacks-model/util.js +0 -4
  277. package/dist/takomo-stacks-model/util.js.map +1 -1
  278. package/dist/utils/collections.d.ts +1 -0
  279. package/dist/utils/collections.js +4 -0
  280. package/dist/utils/collections.js.map +1 -1
  281. package/dist/utils/exhaustive-check.d.ts +1 -0
  282. package/dist/utils/exhaustive-check.js +4 -0
  283. package/dist/utils/exhaustive-check.js.map +1 -0
  284. package/package.json +3 -2
  285. package/dist/command/stacks/deploy/states.js.map +0 -1
  286. package/dist/command/stacks/deploy/steps/continue-update-rollback.js.map +0 -1
  287. package/dist/command/stacks/deploy/steps/emit-stack-template.js.map +0 -1
  288. package/dist/command/stacks/deploy/steps/enrich-current-stack.js.map +0 -1
  289. package/dist/command/stacks/deploy/steps/execute-after-deploy-hooks.js.map +0 -1
  290. package/dist/command/stacks/deploy/steps/execute-before-deploy-hooks.js.map +0 -1
  291. package/dist/command/stacks/deploy/steps/initiate-change-set-create.js.map +0 -1
  292. package/dist/command/stacks/deploy/steps/initiate-failed-stack-delete.js.map +0 -1
  293. package/dist/command/stacks/deploy/steps/initiate-stack-create-or-update.js.map +0 -1
  294. package/dist/command/stacks/deploy/steps/initiate-stack-create.js.map +0 -1
  295. package/dist/command/stacks/deploy/steps/initiate-stack-update.js.map +0 -1
  296. package/dist/command/stacks/deploy/steps/prepare-parameters.js.map +0 -1
  297. package/dist/command/stacks/deploy/steps/prepare-tags.js.map +0 -1
  298. package/dist/command/stacks/deploy/steps/prepare-template.d.ts +0 -7
  299. package/dist/command/stacks/deploy/steps/prepare-template.js.map +0 -1
  300. package/dist/command/stacks/deploy/steps/review-change-set.js.map +0 -1
  301. package/dist/command/stacks/deploy/steps/summarize-template.js.map +0 -1
  302. package/dist/command/stacks/deploy/steps/update-termination-protection.js.map +0 -1
  303. package/dist/command/stacks/deploy/steps/upload-template.js.map +0 -1
  304. package/dist/command/stacks/deploy/steps/validate-parameters.js.map +0 -1
  305. package/dist/command/stacks/deploy/steps/validate-template.js.map +0 -1
  306. package/dist/command/stacks/deploy/steps/wait-change-set-to-be-ready.js.map +0 -1
  307. package/dist/command/stacks/deploy/steps/wait-dependencies-to-complete.d.ts +0 -3
  308. package/dist/command/stacks/deploy/steps/wait-dependencies-to-complete.js.map +0 -1
  309. package/dist/command/stacks/deploy/steps/wait-failed-stack-delete-to-complete.js.map +0 -1
  310. package/dist/command/stacks/deploy/steps/wait-stack-create-or-update-to-complete.js.map +0 -1
  311. package/dist/command/stacks/deploy/steps/wait-stack-rollback-to-complete.js.map +0 -1
  312. package/dist/command/stacks/deploy/transitions.js.map +0 -1
  313. package/dist/command/stacks/undeploy/states.d.ts +0 -30
  314. package/dist/command/stacks/undeploy/states.js.map +0 -1
  315. package/dist/command/stacks/undeploy/steps/execute-after-undeploy-hooks.js.map +0 -1
  316. package/dist/command/stacks/undeploy/steps/execute-before-undeploy-hooks.js.map +0 -1
  317. package/dist/command/stacks/undeploy/steps/initiate-stack-delete.js.map +0 -1
  318. package/dist/command/stacks/undeploy/steps/wait-dependents-to-complete.d.ts +0 -3
  319. package/dist/command/stacks/undeploy/steps/wait-dependents-to-complete.js.map +0 -1
  320. package/dist/command/stacks/undeploy/steps/wait-stack-delete-to-complete.js.map +0 -1
  321. package/dist/command/stacks/undeploy/transitions.js.map +0 -1
  322. package/dist/parser/stacks/build-stack-config.d.ts +0 -6
  323. package/dist/parser/stacks/build-stack-config.js.map +0 -1
  324. package/dist/schema/stack-config-schema.js.map +0 -1
  325. /package/dist/command/stacks/deploy/{states.js → custom-stack/states.js} +0 -0
  326. /package/dist/command/stacks/{undeploy → deploy/standard-stack}/states.js +0 -0
  327. /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/continue-update-rollback.js +0 -0
  328. /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/enrich-current-stack.js +0 -0
  329. /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-stack-create-or-update.js +0 -0
  330. /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/prepare-parameters.js +0 -0
  331. /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/prepare-tags.js +0 -0
  332. /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/summarize-template.js +0 -0
  333. /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/update-termination-protection.js +0 -0
  334. /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/validate-template.js +0 -0
  335. /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-dependencies-to-complete.js +0 -0
  336. /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-failed-stack-delete-to-complete.js +0 -0
  337. /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-stack-rollback-to-complete.js +0 -0
  338. /package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/wait-dependents-to-complete.js +0 -0
  339. /package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/wait-stack-delete-to-complete.js +0 -0
@@ -0,0 +1,401 @@
1
+ import { StacksContext } from "../index.js";
2
+ import { CustomStack, CustomStackStatus } from "../stacks/custom-stack.js";
3
+ import { CustomStackType, StackPath } from "../stacks/stack.js";
4
+ import { TkmLogger } from "../utils/logging.js";
5
+ export type ParameterName = string;
6
+ export type ParameterValue = string;
7
+ export type Parameters = Record<ParameterName, ParameterValue>;
8
+ export type TagName = string;
9
+ export type TagValue = string;
10
+ export type Tags = Record<TagName, TagValue>;
11
+ export type OutputName = string;
12
+ export type OutputValue = string;
13
+ export type Outputs = Record<OutputName, OutputValue>;
14
+ /**
15
+ * Represents the state of a custom stack. All properties are optional to allow
16
+ * flexibility for different custom stack implementations.
17
+ */
18
+ export type CustomStackState = {
19
+ /**
20
+ * The status of the custom stack. This property is mandatory and is
21
+ * used to represent the current status of the custom stack.
22
+ */
23
+ status: CustomStackStatus;
24
+ /**
25
+ * Optional property representing the last updated time of the custom stack.
26
+ */
27
+ lastUpdatedTime?: Date;
28
+ /**
29
+ * Optional property representing the creation time of the custom stack.
30
+ */
31
+ creationTime?: Date;
32
+ /**
33
+ * Optional property representing the parameters of the custom stack.
34
+ */
35
+ parameters?: Parameters;
36
+ /**
37
+ * Optional property representing the tags of the custom stack.
38
+ */
39
+ tags?: Tags;
40
+ /**
41
+ * Optional property representing the outputs of the custom stack.
42
+ */
43
+ outputs?: Outputs;
44
+ };
45
+ /**
46
+ * Represents the properties passed to get the current state of a custom stack.
47
+ */
48
+ export type GetCurrentStateProps<CONFIG> = {
49
+ /**
50
+ * The logger instance to be used for logging.
51
+ */
52
+ readonly logger: TkmLogger;
53
+ /**
54
+ * The configuration object for the custom stack.
55
+ */
56
+ readonly config: CONFIG;
57
+ /**
58
+ * The custom stack for which the current state is being retrieved.
59
+ */
60
+ readonly stack: CustomStack;
61
+ /**
62
+ * The stacks context.
63
+ */
64
+ readonly ctx: StacksContext;
65
+ };
66
+ /**
67
+ * Represents a successful result of getting the current state of a custom stack.
68
+ */
69
+ export type SuccessfulGetCurrentStateResult<CONFIG> = {
70
+ readonly success: true;
71
+ /**
72
+ * The current state of the custom stack.
73
+ */
74
+ readonly state: CONFIG;
75
+ };
76
+ /**
77
+ * Represents a failed result of getting the current state of a custom stack.
78
+ */
79
+ export type FailedGetCurrentStateResult = {
80
+ readonly success: false;
81
+ /**
82
+ * An optional error object if the operation failed.
83
+ */
84
+ readonly error?: Error;
85
+ /**
86
+ * An optional message providing additional information about the operation result.
87
+ */
88
+ readonly message?: string;
89
+ };
90
+ /**
91
+ * Represents the result of getting the current state of a custom stack.
92
+ */
93
+ export type GetCurrentStateResult<STATE extends CustomStackState> = SuccessfulGetCurrentStateResult<STATE> | FailedGetCurrentStateResult;
94
+ /**
95
+ * Represents the properties passed to create a custom stack operation.
96
+ */
97
+ export type CreateCustomStackProps<CONFIG> = {
98
+ /**
99
+ * The logger instance to be used for logging.
100
+ */
101
+ readonly logger: TkmLogger;
102
+ /**
103
+ * The configuration object for the custom stack.
104
+ */
105
+ readonly config: CONFIG;
106
+ /**
107
+ * The parameters to be used for the create operation.
108
+ */
109
+ readonly parameters: Parameters;
110
+ /**
111
+ * The tags to be used for the create operation.
112
+ */
113
+ readonly tags: Tags;
114
+ /**
115
+ * The custom stack to be created.
116
+ */
117
+ readonly stack: CustomStack;
118
+ /**
119
+ * The stacks context.
120
+ */
121
+ readonly ctx: StacksContext;
122
+ };
123
+ /**
124
+ * Represents a successful result of creating a custom stack.
125
+ */
126
+ export type SuccessfulCreateCustomStackResult<STATE extends CustomStackState> = {
127
+ readonly success: true;
128
+ /**
129
+ * The state of the custom stack after creation.
130
+ */
131
+ readonly state: STATE;
132
+ };
133
+ /**
134
+ * Represents a failed result of creating a custom stack.
135
+ */
136
+ export type FailedCreateCustomStackResult = {
137
+ readonly success: false;
138
+ /**
139
+ * An optional error object if the operation failed.
140
+ */
141
+ readonly error?: Error;
142
+ /**
143
+ * An optional message providing additional information about the operation result.
144
+ */
145
+ readonly message?: string;
146
+ };
147
+ /**
148
+ * Represents the result of creating a custom stack.
149
+ */
150
+ export type CreateCustomStackResult<STATE extends CustomStackState> = SuccessfulCreateCustomStackResult<STATE> | FailedCreateCustomStackResult;
151
+ /**
152
+ * Represents the properties passed to update a custom stack operation.
153
+ */
154
+ export type UpdateCustomStackProps<CONFIG, STATE extends CustomStackState> = {
155
+ /**
156
+ * The logger instance to be used for logging.
157
+ */
158
+ readonly logger: TkmLogger;
159
+ /**
160
+ * The current state of the custom stack.
161
+ */
162
+ readonly state: STATE;
163
+ /**
164
+ * The configuration object for the custom stack.
165
+ */
166
+ readonly config: CONFIG;
167
+ /**
168
+ * The parameters to be used for the update operation.
169
+ */
170
+ readonly parameters: Parameters;
171
+ /**
172
+ * The tags to be used for the update operation.
173
+ */
174
+ readonly tags: Tags;
175
+ /**
176
+ * The custom stack to be updated.
177
+ */
178
+ readonly stack: CustomStack;
179
+ /**
180
+ * The stacks context.
181
+ */
182
+ readonly ctx: StacksContext;
183
+ };
184
+ export type SuccessfulUpdateCustomStackResult<STATE extends CustomStackState> = {
185
+ readonly success: true;
186
+ /**
187
+ * The updated state of the custom stack.
188
+ */
189
+ readonly state: STATE;
190
+ };
191
+ export type FailedUpdateCustomStackResult = {
192
+ readonly success: false;
193
+ /**
194
+ * An optional error object if the operation failed.
195
+ */
196
+ readonly error?: Error;
197
+ /**
198
+ * An optional message providing additional information about the operation result.
199
+ */
200
+ readonly message?: string;
201
+ };
202
+ /**
203
+ * Represents the result of updating a custom stack.
204
+ */
205
+ export type UpdateCustomStackResult<STATE extends CustomStackState> = SuccessfulUpdateCustomStackResult<STATE> | FailedUpdateCustomStackResult;
206
+ /**
207
+ * Represents the properties passed to parse a custom stack configuration function.
208
+ */
209
+ export type ParseConfigProps = {
210
+ /**
211
+ * The logger instance to be used for logging.
212
+ */
213
+ readonly logger: TkmLogger;
214
+ /**
215
+ * The raw configuration object to be parsed.
216
+ */
217
+ readonly config: unknown;
218
+ /**
219
+ * The stack path of the custom stack.
220
+ */
221
+ readonly stackPath: StackPath;
222
+ };
223
+ /**
224
+ * Represents a successful result of parsing a custom stack configuration.
225
+ */
226
+ export type SuccessfulParseConfigResult<CONFIG> = {
227
+ readonly success: true;
228
+ readonly config: CONFIG;
229
+ };
230
+ /**
231
+ * Represents a failed result of parsing a custom stack configuration.
232
+ */
233
+ export type FailedParseConfigResult = {
234
+ readonly success: false;
235
+ /**
236
+ * An optional error object if the parsing failed.
237
+ */
238
+ readonly error?: Error;
239
+ /**
240
+ * An optional message providing additional information about the parsing result.
241
+ */
242
+ readonly message?: string;
243
+ };
244
+ /**
245
+ * Represents the result of parsing a custom stack configuration.
246
+ */
247
+ export type ParseConfigResult<CONFIG> = SuccessfulParseConfigResult<CONFIG> | FailedParseConfigResult;
248
+ /**
249
+ * Represents the properties passed to delete a custom stack operation.
250
+ */
251
+ export type DeleteCustomStackProps<CONFIG, STATE extends CustomStackState> = {
252
+ /**
253
+ * The logger instance to be used for logging.
254
+ */
255
+ readonly logger: TkmLogger;
256
+ /**
257
+ * The current state of the custom stack.
258
+ */
259
+ readonly state: STATE;
260
+ /**
261
+ * The configuration object for the custom stack.
262
+ */
263
+ readonly config: CONFIG;
264
+ /**
265
+ * The custom stack to be deleted.
266
+ */
267
+ readonly stack: CustomStack;
268
+ /**
269
+ * The stacks context.
270
+ */
271
+ readonly ctx: StacksContext;
272
+ };
273
+ /**
274
+ * Represents a successful result of deleting a custom stack.
275
+ */
276
+ export type SuccessFullDeleteCustomStackResult = {
277
+ readonly success: true;
278
+ };
279
+ /**
280
+ * Represents a failed result of deleting a custom stack.
281
+ */
282
+ export type FailedDeleteCustomStackResult = {
283
+ readonly success: false;
284
+ /**
285
+ * An optional message providing additional information about the operation result.
286
+ */
287
+ readonly message?: string;
288
+ /**
289
+ * An optional error object if the operation failed.
290
+ */
291
+ readonly error?: Error;
292
+ };
293
+ /**
294
+ * Represents the result of deleting a custom stack.
295
+ */
296
+ export type DeleteCustomStackResult = SuccessFullDeleteCustomStackResult | FailedDeleteCustomStackResult;
297
+ /**
298
+ * Represents the properties passed to get changes of a custom stack operation.
299
+ */
300
+ export type GetChangesProps<CONFIG, STATE extends CustomStackState> = {
301
+ /**
302
+ * The logger instance to be used for logging.
303
+ */
304
+ readonly logger: TkmLogger;
305
+ /**
306
+ * The current state of the custom stack.
307
+ */
308
+ readonly state: STATE;
309
+ /**
310
+ * The configuration object for the custom stack.
311
+ */
312
+ readonly config: CONFIG;
313
+ /**
314
+ * The parameters to be used for the update operation.
315
+ */
316
+ readonly parameters: Parameters;
317
+ /**
318
+ * The tags to be used for the update operation.
319
+ */
320
+ readonly tags: Tags;
321
+ /**
322
+ * The custom stack to be updated.
323
+ */
324
+ readonly stack: CustomStack;
325
+ /**
326
+ * The stacks context.
327
+ */
328
+ readonly ctx: StacksContext;
329
+ };
330
+ /**
331
+ * Represents a change in a custom stack.
332
+ */
333
+ export type CustomStackChange = {
334
+ readonly description: string;
335
+ };
336
+ /**
337
+ * Represents a successful result of getting changes of a custom stack.
338
+ */
339
+ export type SuccessfulGetChangesResult = {
340
+ success: true;
341
+ /**
342
+ * The list of changes detected in the custom stack.
343
+ */
344
+ changes?: ReadonlyArray<CustomStackChange>;
345
+ };
346
+ /**
347
+ * Represents a failed result of getting changes of a custom stack.
348
+ */
349
+ export type FailedGetChangesResult = {
350
+ success: false;
351
+ /**
352
+ * An optional message providing additional information about the operation result.
353
+ */
354
+ message?: string;
355
+ /**
356
+ * An optional error object if the operation failed.
357
+ */
358
+ error?: Error;
359
+ };
360
+ /**
361
+ * Represents the result of getting changes of a custom stack.
362
+ */
363
+ export type GetChangesResult = SuccessfulGetChangesResult | FailedGetChangesResult;
364
+ /**
365
+ * Interface defining the contract for handling custom stack operations.
366
+ */
367
+ export interface CustomStackHandler<CONFIG, STATE extends CustomStackState> {
368
+ /**
369
+ * The type of the custom stack this handler manages.
370
+ */
371
+ readonly type: CustomStackType;
372
+ /**
373
+ * Gets the current state of the custom stack.
374
+ *
375
+ * During deploy operation, the existence of the stack determines whether to create
376
+ * or update the stack. During undeploy operation, the existence of the stack determines
377
+ * whether to attempt deletion or skip it.
378
+ */
379
+ readonly getCurrentState: (props: GetCurrentStateProps<CONFIG>) => Promise<GetCurrentStateResult<STATE>>;
380
+ /**
381
+ * Gets the changes between the current state and the desired state of the custom stack.
382
+ * Invoked during deploy of an existing stack to determine whether there would be any changes in the stack.
383
+ */
384
+ readonly getChanges: (props: GetChangesProps<CONFIG, STATE>) => Promise<GetChangesResult>;
385
+ /**
386
+ * Parses the custom stack configuration.
387
+ */
388
+ readonly parseConfig: (props: ParseConfigProps) => Promise<ParseConfigResult<CONFIG>>;
389
+ /**
390
+ * Creates a new custom stack.
391
+ */
392
+ readonly create: (props: CreateCustomStackProps<CONFIG>) => Promise<CreateCustomStackResult<STATE>>;
393
+ /**
394
+ * Updates an existing custom stack.
395
+ */
396
+ readonly update: (props: UpdateCustomStackProps<CONFIG, STATE>) => Promise<UpdateCustomStackResult<STATE>>;
397
+ /**
398
+ * Deletes an existing custom stack.
399
+ */
400
+ readonly delete: (props: DeleteCustomStackProps<CONFIG, STATE>) => Promise<DeleteCustomStackResult>;
401
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=custom-stack-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-stack-handler.js","sourceRoot":"","sources":["../../src/custom-stacks/custom-stack-handler.ts"],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { CustomStackHandler } from "../custom-stacks/custom-stack-handler.js";
1
2
  import { HookProvider } from "../hooks/hook-provider.js";
2
3
  import { ResolverProvider } from "../resolvers/resolver-provider.js";
3
4
  import { SchemaProvider } from "../takomo-stacks-model/schemas.js";
@@ -7,6 +8,10 @@ import { FilePath } from "../utils/files.js";
7
8
  * Takomo custom configuration.
8
9
  */
9
10
  export interface TakomoConfig {
11
+ /**
12
+ * List of custom stack handler providers.
13
+ */
14
+ readonly customStackHandlers?: Array<CustomStackHandler<any, any>>;
10
15
  /**
11
16
  * List of hook providers.
12
17
  */
@@ -1,13 +1,13 @@
1
1
  import { CloudFormationStack } from "../aws/cloudformation/model.js";
2
2
  import { StackOperationVariables } from "../command/command-model.js";
3
3
  import { InternalStacksContext } from "../context/stacks-context.js";
4
- import { Stack } from "../stacks/stack.js";
4
+ import { StandardStack } from "../stacks/standard-stack.js";
5
5
  import { TkmLogger } from "../utils/logging.js";
6
6
  import { HookExecutor } from "./hook-executor.js";
7
7
  import { HookOperation, HooksExecutionOutput, HookStage, HookStatus } from "./hook.js";
8
8
  interface ExecuteHooksProps {
9
9
  readonly ctx: InternalStacksContext;
10
- readonly stack: Stack;
10
+ readonly stack: StandardStack;
11
11
  readonly variables: StackOperationVariables;
12
12
  readonly hooks: ReadonlyArray<HookExecutor>;
13
13
  readonly operation: HookOperation;
@@ -34,6 +34,7 @@ export const executeHooks = async ({ ctx, stack, variables, hooks, operation, st
34
34
  result: "skip",
35
35
  };
36
36
  }
37
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
38
  }
38
39
  catch (error) {
39
40
  logger.error(`An error occurred while executing hook (name: ${hook.config.name}, type: ${hook.config.type})`, error);
@@ -1 +1 @@
1
- {"version":3,"file":"execute.js","sourceRoot":"","sources":["../../src/hooks/execute.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,EACjC,GAAG,EACH,KAAK,EACL,SAAS,EACT,KAAK,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,MAAM,EACN,YAAY,GACM,EAAiC,EAAE;IACrD,MAAM,CAAC,KAAK,CACV,sCAAsC,SAAS,YAAY,KAAK,aAAa,MAAM,GAAG,CACvF,CAAA;IAED,MAAM,KAAK,GAAG;QACZ,GAAG;QACH,KAAK;QACL,SAAS;QACT,KAAK;QACL,SAAS;QACT,MAAM;QACN,MAAM;QACN,YAAY;KACb,CAAA;IAED,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;IAE1D,MAAM,CAAC,KAAK,CAAC,SAAS,cAAc,CAAC,MAAM,mBAAmB,CAAC,CAA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AAC,KAAK,CACV,eAAe,IAAI,CAAC,MAAM,CAAC,IAAI,WAAW,IAAI,CAAC,MAAM,CAAC,IAAI,4BAA4B,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC,IAAI,aAAa,MAAM,CAAC,OAAO,EAAE,CACxJ,CAAA;YAED,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAA;YAEhD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,OAAO;oBACL,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,QAAQ;oBACnC,MAAM,EAAE,OAAO;oBACf,KAAK,EAAE,MAAM,CAAC,KAAK;iBACpB,CAAA;YACH,CAAC;YAED,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;gBACzB,OAAO;oBACL,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,MAAM;oBACjC,MAAM,EAAE,MAAM;iBACf,CAAA;YACH,CAAC;YACD,8DAA8D;QAChE,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,MAAM,CAAC,KAAK,CACV,iDAAiD,IAAI,CAAC,MAAM,CAAC,IAAI,WAAW,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,EAC/F,KAAK,CACN,CAAA;YACD,OAAO;gBACL,KAAK;gBACL,MAAM,EAAE,OAAO;gBACf,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,OAAO;aAClC,CAAA;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,UAAU;KACnB,CAAA;AACH,CAAC,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { CloudFormationStack } from "../aws/cloudformation/model.js";
2
2
  import { StacksContext } from "../context/stacks-context.js";
3
- import { Stack } from "../stacks/stack.js";
3
+ import { StandardStack } from "../stacks/standard-stack.js";
4
4
  import { StackOperationVariables } from "../takomo-stacks-context/model.js";
5
5
  import { TkmLogger } from "../utils/logging.js";
6
6
  export type HookType = string;
@@ -38,7 +38,7 @@ export interface HooksExecutionOutput {
38
38
  */
39
39
  export interface HookInput {
40
40
  readonly ctx: StacksContext;
41
- readonly stack: Stack;
41
+ readonly stack: StandardStack;
42
42
  readonly variables: StackOperationVariables;
43
43
  readonly stage: HookStage;
44
44
  readonly operation: HookOperation;
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ export type { HookProvider } from "./hooks/hook-provider.js";
17
17
  export type { Hook, HookConfig, HookInput, HookName, HookOperation, HookOutput, HookOutputObject, HookStage, HookStatus, HookType, } from "./hooks/hook.js";
18
18
  export type { ResolverConfig, ResolverProvider, ResolverProviderSchemaProps, } from "./resolvers/resolver-provider.js";
19
19
  export type { Resolver, ResolverInput } from "./resolvers/resolver.js";
20
- export type { Stack } from "./stacks/stack.js";
20
+ export type { StandardStack as Stack } from "./stacks/standard-stack.js";
21
21
  export type { CommandRole, OutputFormat } from "./takomo-core/command.js";
22
22
  export type { InitSchemaProps, SchemaProvider, } from "./takomo-stacks-model/schemas.js";
23
23
  export type { DeploymentStatus, Label } from "./targets/targets-model.js";
@@ -32,3 +32,7 @@ export { HandlebarsSafeString } from "./templating/handlebars/handlebars-templat
32
32
  export type { RenderTemplateFileProps, RenderTemplateProps, TemplateEngine, } from "./templating/template-engine.js";
33
33
  export type { FilePath } from "./utils/files.js";
34
34
  export type { LogLevel, TkmLogger } from "./utils/logging.js";
35
+ export { isCustomStack } from "./stacks/custom-stack.js";
36
+ export { isStandardStack } from "./stacks/standard-stack.js";
37
+ export type { CustomStack } from "./stacks/custom-stack.js";
38
+ export type { StandardStack } from "./stacks/standard-stack.js";
package/dist/index.js CHANGED
@@ -3,4 +3,6 @@ export { run } from "./cli/index.js";
3
3
  export { EjsTemplateEngineProvider } from "./templating/ejs/ejs-template-engine-provider.js";
4
4
  export { HandlebarsTemplateEngineProvider } from "./templating/handlebars/handlebars-template-engine-provider.js";
5
5
  export { HandlebarsSafeString } from "./templating/handlebars/handlebars-template-engine.js";
6
+ export { isCustomStack } from "./stacks/custom-stack.js";
7
+ export { isStandardStack } from "./stacks/standard-stack.js";
6
8
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAA;AAavC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AA0DpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAA;AAM5F,OAAO,EAAE,gCAAgC,EAAE,MAAM,gEAAgE,CAAA;AAWjH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uDAAuD,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAA;AAavC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AA0DpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,kDAAkD,CAAA;AAM5F,OAAO,EAAE,gCAAgC,EAAE,MAAM,gEAAgE,CAAA;AAWjH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uDAAuD,CAAA;AAQ5F,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { Result } from "neverthrow";
2
+ import { CommandContext } from "../../context/command-context.js";
3
+ import { ValidationError } from "../../utils/errors.js";
4
+ import { CustomStackConfig } from "../../config/custom-stack-config.js";
5
+ export declare const buildCustomStackConfig: (ctx: CommandContext, record: Record<string, unknown>) => Result<CustomStackConfig, ValidationError>;
@@ -0,0 +1,51 @@
1
+ import { err, ok } from "neverthrow";
2
+ import { ValidationError } from "../../utils/errors.js";
3
+ import { parseCommandRole, parseOptionalBoolean, parseOptionalString, parseOptionalStringArray, parseStringArray, } from "../common-parser.js";
4
+ import { parseAccountIds } from "./parse-account-ids.js";
5
+ import { parseData } from "./parse-data.js";
6
+ import { parseHooks } from "./parse-hooks.js";
7
+ import { parseParameters } from "./parse-parameters.js";
8
+ import { parseSchemas } from "./parse-schemas.js";
9
+ import { parseTags } from "./parse-tags.js";
10
+ import { parseTimeout } from "./parse-timeout.js";
11
+ import { parseCustomStackType } from "./parse-custom-stack-type.js";
12
+ import { createCustomStackConfigSchema } from "../../schema/custom-stack-config-schema.js";
13
+ export const buildCustomStackConfig = (ctx, record) => {
14
+ const { error } = createCustomStackConfigSchema({
15
+ regions: ctx.regions,
16
+ }).validate(record, {
17
+ abortEarly: false,
18
+ convert: false,
19
+ });
20
+ if (error) {
21
+ const details = error.details.map((d) => d.message);
22
+ return err(new ValidationError("Validation errors in custom stack configuration", details));
23
+ }
24
+ const customType = parseCustomStackType(record.customType);
25
+ const schemas = parseSchemas(record.schemas);
26
+ const data = parseData(record.data);
27
+ const hooks = parseHooks(record.hooks);
28
+ const accountIds = parseAccountIds(record.accountIds);
29
+ return ok({
30
+ stackType: "custom",
31
+ customConfig: record.customConfig ?? {},
32
+ customType,
33
+ accountIds,
34
+ data,
35
+ hooks,
36
+ schemas,
37
+ ignore: parseOptionalBoolean(record.ignore),
38
+ obsolete: parseOptionalBoolean(record.obsolete),
39
+ terminationProtection: parseOptionalBoolean(record.terminationProtection),
40
+ project: parseOptionalString(record.project),
41
+ commandRole: parseCommandRole(record.commandRole),
42
+ regions: parseStringArray(record.regions),
43
+ name: parseOptionalString(record.name),
44
+ timeout: parseTimeout(record.timeout),
45
+ depends: parseOptionalStringArray(record.depends),
46
+ tags: parseTags(record.tags),
47
+ inheritTags: parseOptionalBoolean(record.inheritTags),
48
+ parameters: parseParameters(record.parameters),
49
+ });
50
+ };
51
+ //# sourceMappingURL=build-custom-stack-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-custom-stack-config.js","sourceRoot":"","sources":["../../../src/parser/stacks/build-custom-stack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throw";
2
+ import { CommandContext } from "../../context/command-context.js";
3
+ import { ValidationError } from "../../utils/errors.js";
4
+ import { ParsedYamlDocument } from "../../utils/yaml.js";
5
+ import { StandardStackConfig } from "../../config/standard-stack-config.js";
6
+ export declare const buildStandardStackConfig: (ctx: CommandContext, record: ParsedYamlDocument, configType: "stack" | "blueprint") => Result<StandardStackConfig, ValidationError>;
@@ -1,5 +1,5 @@
1
1
  import { err, ok } from "neverthrow";
2
- import { createStackConfigSchema } from "../../schema/stack-config-schema.js";
2
+ import { createStandardStackConfigSchema } from "../../schema/standard-stack-config-schema.js";
3
3
  import { ValidationError } from "../../utils/errors.js";
4
4
  import { parseCommandRole, parseOptionalBoolean, parseOptionalString, parseOptionalStringArray, parseStringArray, } from "../common-parser.js";
5
5
  import { parseAccountIds } from "./parse-account-ids.js";
@@ -12,8 +12,8 @@ import { parseTags } from "./parse-tags.js";
12
12
  import { parseTemplateBucket } from "./parse-template-bucket.js";
13
13
  import { parseTemplate } from "./parse-template.js";
14
14
  import { parseTimeout } from "./parse-timeout.js";
15
- export const buildStackConfig = (ctx, record, configType) => {
16
- const { error } = createStackConfigSchema({
15
+ export const buildStandardStackConfig = (ctx, record, configType) => {
16
+ const { error } = createStandardStackConfigSchema({
17
17
  regions: ctx.regions,
18
18
  configType,
19
19
  }).validate(record, {
@@ -35,6 +35,7 @@ export const buildStackConfig = (ctx, record, configType) => {
35
35
  const stackPolicy = parseStackPolicy(record.stackPolicy);
36
36
  const stackPolicyDuringUpdate = parseStackPolicy(record.stackPolicyDuringUpdate);
37
37
  return ok({
38
+ stackType: "standard",
38
39
  accountIds,
39
40
  data,
40
41
  hooks,
@@ -59,4 +60,4 @@ export const buildStackConfig = (ctx, record, configType) => {
59
60
  blueprint: parseOptionalString(record.blueprint),
60
61
  });
61
62
  };
62
- //# sourceMappingURL=build-stack-config.js.map
63
+ //# sourceMappingURL=build-standard-stack-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-standard-stack-config.js","s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,MAAM,CAAC,WAAW,CAAC;QACjD,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC;QACzC,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC;QACtC,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC;QACrC,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,OAAO,CAAC;QACjD,cAAc,EAAE,mBAAmB,CAAC,MAAM,CAAC,cAAc,CAAC;QAC1D,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC;QAC5B,WAAW,EAAE,oBAAoB,CAAC,MAAM,CAAC,WAAW,CAAC;QACrD,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC;QAC9C,SAAS,EAAE,mBAAmB,CAAC,MAAM,CAAC,SAAS,CAAC;KACjD,CAAC,CAAA;AACJ,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { CustomStackType } from "../../stacks/stack.js";
2
+ export declare const parseCustomStackType: (value: unknown) => CustomStackType;
@@ -0,0 +1,10 @@
1
+ export const parseCustomStackType = (value) => {
2
+ if (value === null || value === undefined) {
3
+ throw new Error(`Custom stack type must be defined`);
4
+ }
5
+ if (typeof value !== "string") {
6
+ throw new Error(`Invalid custom stack type: expected a string but got: ${typeof value}`);
7
+ }
8
+ return value;
9
+ };
10
+ //# sourceMappingURL=parse-custom-stack-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-custom-stack-type.js","sourceRoot":"","sources":["../../../src/parser/stacks/parse-custom-stack-type.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAc,EAAmB,EAAE;IACtE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;IACtD,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CACb,yDAAyD,OAAO,KAAK,EAAE,CACxE,CAAA;IACH,CAAC;IAED,OAAO,KAAwB,CAAA;AACjC,CAAC,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import { createAwsSchemas } from "../schema/aws-schema.js";
2
2
  import { createStacksSchemas } from "../schema/stacks-schema.js";
3
+ import { isStandardStack } from "../stacks/standard-stack.js";
3
4
  const init = async (props) => ({
4
5
  dependencies: () => [props.stack],
5
6
  resolve: async ({ ctx, logger, parameterName, stack: stackConfig, }) => {
@@ -9,6 +10,9 @@ const init = async (props) => ({
9
10
  // TODO: We should be able to detect this earlier - when the configuration is being built
10
11
  throw new Error(`Stack not found with path: ${props.stack}`);
11
12
  }
13
+ if (!isStandardStack(referencedStack)) {
14
+ throw new Error(`Stack with path ${props.stack} is not a standard stack. Stack output resolver can only be used with standard stacks`);
15
+ }
12
16
  if (rest.length > 0) {
13
17
  // TODO: We should be able to detect this earlier - when the configuration is being built
14
18
  throw new Error(`More than one stack found with path: ${props.stack}`);