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.
- package/dist/cli-io/formatters.d.ts +3 -1
- package/dist/cli-io/formatters.js +13 -1
- package/dist/cli-io/formatters.js.map +1 -1
- package/dist/cli-io/stacks/common.d.ts +4 -0
- package/dist/cli-io/stacks/common.js +17 -0
- package/dist/cli-io/stacks/common.js.map +1 -1
- package/dist/cli-io/stacks/deploy-stacks/deploy-stacks-io.d.ts +8 -1
- package/dist/cli-io/stacks/deploy-stacks/deploy-stacks-io.js +90 -25
- package/dist/cli-io/stacks/deploy-stacks/deploy-stacks-io.js.map +1 -1
- package/dist/cli-io/stacks/deploy-stacks/emit-stack-templates-io.js +8 -1
- package/dist/cli-io/stacks/deploy-stacks/emit-stack-templates-io.js.map +1 -1
- package/dist/cli-io/stacks/deploy-stacks/parameters.d.ts +3 -0
- package/dist/cli-io/stacks/deploy-stacks/parameters.js +72 -0
- package/dist/cli-io/stacks/deploy-stacks/parameters.js.map +1 -1
- package/dist/cli-io/stacks/deploy-stacks/resources.d.ts +2 -0
- package/dist/cli-io/stacks/deploy-stacks/resources.js +20 -0
- package/dist/cli-io/stacks/deploy-stacks/resources.js.map +1 -1
- package/dist/cli-io/stacks/deploy-stacks/stack-policy.d.ts +2 -2
- package/dist/cli-io/stacks/deploy-stacks/stack-policy.js.map +1 -1
- package/dist/cli-io/stacks/deploy-stacks/tags.d.ts +3 -0
- package/dist/cli-io/stacks/deploy-stacks/tags.js +68 -0
- package/dist/cli-io/stacks/deploy-stacks/tags.js.map +1 -1
- package/dist/cli-io/stacks/deploy-stacks/termination-protection.d.ts +2 -2
- package/dist/cli-io/stacks/deploy-stacks/termination-protection.js.map +1 -1
- package/dist/cli-io/stacks/detect-drift-io.js +2 -2
- package/dist/cli-io/stacks/detect-drift-io.js.map +1 -1
- package/dist/cli-io/stacks/list-stacks-io.js +3 -2
- package/dist/cli-io/stacks/list-stacks-io.js.map +1 -1
- package/dist/cli-io/stacks/undeploy-stacks-io.js +41 -19
- package/dist/cli-io/stacks/undeploy-stacks-io.js.map +1 -1
- package/dist/command/command-model.d.ts +2 -1
- package/dist/command/command-model.js.map +1 -1
- package/dist/command/stacks/common/custom-states.d.ts +33 -0
- package/dist/command/stacks/common/custom-states.js +2 -0
- package/dist/command/stacks/common/custom-states.js.map +1 -0
- package/dist/command/stacks/common/load-current-cf-stacks.d.ts +17 -5
- package/dist/command/stacks/common/load-current-cf-stacks.js +73 -13
- package/dist/command/stacks/common/load-current-cf-stacks.js.map +1 -1
- package/dist/command/stacks/deploy/command.js +1 -1
- package/dist/command/stacks/deploy/command.js.map +1 -1
- package/dist/command/stacks/deploy/custom-stack/states.d.ts +42 -0
- package/dist/command/stacks/deploy/custom-stack/states.js.map +1 -0
- package/dist/command/stacks/deploy/custom-stack/steps/create-or-update-stack.d.ts +3 -0
- package/dist/command/stacks/deploy/custom-stack/steps/create-or-update-stack.js +11 -0
- package/dist/command/stacks/deploy/custom-stack/steps/create-or-update-stack.js.map +1 -0
- package/dist/command/stacks/deploy/custom-stack/steps/create-stack.d.ts +3 -0
- package/dist/command/stacks/deploy/custom-stack/steps/create-stack.js +41 -0
- package/dist/command/stacks/deploy/custom-stack/steps/create-stack.js.map +1 -0
- package/dist/command/stacks/deploy/custom-stack/steps/get-changes.d.ts +8 -0
- package/dist/command/stacks/deploy/custom-stack/steps/get-changes.js +58 -0
- package/dist/command/stacks/deploy/custom-stack/steps/get-changes.js.map +1 -0
- package/dist/command/stacks/deploy/custom-stack/steps/prepare-parameters.d.ts +3 -0
- package/dist/command/stacks/deploy/custom-stack/steps/prepare-parameters.js +44 -0
- package/dist/command/stacks/deploy/custom-stack/steps/prepare-parameters.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → custom-stack/steps}/prepare-tags.d.ts +1 -1
- package/dist/command/stacks/deploy/custom-stack/steps/prepare-tags.js +27 -0
- package/dist/command/stacks/deploy/custom-stack/steps/prepare-tags.js.map +1 -0
- package/dist/command/stacks/deploy/custom-stack/steps/review-deployment.d.ts +3 -0
- package/dist/command/stacks/deploy/custom-stack/steps/review-deployment.js +15 -0
- package/dist/command/stacks/deploy/custom-stack/steps/review-deployment.js.map +1 -0
- package/dist/command/stacks/deploy/custom-stack/steps/update-stack.d.ts +3 -0
- package/dist/command/stacks/deploy/custom-stack/steps/update-stack.js +42 -0
- package/dist/command/stacks/deploy/custom-stack/steps/update-stack.js.map +1 -0
- package/dist/command/stacks/deploy/custom-stack/steps/wait-dependencies-to-complete.d.ts +3 -0
- package/dist/command/stacks/deploy/custom-stack/steps/wait-dependencies-to-complete.js +26 -0
- package/dist/command/stacks/deploy/custom-stack/steps/wait-dependencies-to-complete.js.map +1 -0
- package/dist/command/stacks/deploy/custom-stack/transitions.d.ts +13 -0
- package/dist/command/stacks/deploy/custom-stack/transitions.js +21 -0
- package/dist/command/stacks/deploy/custom-stack/transitions.js.map +1 -0
- package/dist/command/stacks/deploy/deploy-stack.d.ts +3 -4
- package/dist/command/stacks/deploy/deploy-stack.js +73 -34
- package/dist/command/stacks/deploy/deploy-stack.js.map +1 -1
- package/dist/command/stacks/deploy/execute-deploy-context.js +4 -4
- package/dist/command/stacks/deploy/execute-deploy-context.js.map +1 -1
- package/dist/command/stacks/deploy/model.d.ts +7 -2
- package/dist/command/stacks/deploy/plan.d.ts +18 -4
- package/dist/command/stacks/deploy/plan.js +28 -10
- package/dist/command/stacks/deploy/plan.js.map +1 -1
- package/dist/command/stacks/deploy/{states.d.ts → standard-stack/states.d.ts} +17 -15
- package/dist/command/stacks/deploy/standard-stack/states.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/continue-update-rollback.d.ts +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/continue-update-rollback.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/emit-stack-template.d.ts +1 -1
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/emit-stack-template.js +2 -2
- package/dist/command/stacks/deploy/standard-stack/steps/emit-stack-template.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/enrich-current-stack.d.ts +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/enrich-current-stack.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/execute-after-deploy-hooks.d.ts +1 -1
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/execute-after-deploy-hooks.js +2 -2
- package/dist/command/stacks/deploy/standard-stack/steps/execute-after-deploy-hooks.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/execute-before-deploy-hooks.d.ts +1 -1
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/execute-before-deploy-hooks.js +2 -2
- package/dist/command/stacks/deploy/standard-stack/steps/execute-before-deploy-hooks.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-change-set-create.d.ts +3 -3
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-change-set-create.js +2 -2
- package/dist/command/stacks/deploy/standard-stack/steps/initiate-change-set-create.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-failed-stack-delete.d.ts +1 -1
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-failed-stack-delete.js +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/initiate-failed-stack-delete.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-stack-create-or-update.d.ts +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/initiate-stack-create-or-update.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-stack-create.d.ts +1 -1
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-stack-create.js +2 -2
- package/dist/command/stacks/deploy/standard-stack/steps/initiate-stack-create.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-stack-update.d.ts +1 -1
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-stack-update.js +3 -3
- package/dist/command/stacks/deploy/standard-stack/steps/initiate-stack-update.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/prepare-parameters.d.ts +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/prepare-parameters.js.map +1 -0
- package/dist/command/stacks/deploy/standard-stack/steps/prepare-tags.d.ts +3 -0
- package/dist/command/stacks/deploy/standard-stack/steps/prepare-tags.js.map +1 -0
- package/dist/command/stacks/deploy/standard-stack/steps/prepare-template.d.ts +7 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/prepare-template.js +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/prepare-template.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/review-change-set.d.ts +1 -1
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/review-change-set.js +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/review-change-set.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/summarize-template.d.ts +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/summarize-template.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/update-termination-protection.d.ts +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/update-termination-protection.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/upload-template.d.ts +1 -1
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/upload-template.js +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/upload-template.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/validate-parameters.d.ts +3 -3
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/validate-parameters.js +3 -3
- package/dist/command/stacks/deploy/standard-stack/steps/validate-parameters.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/validate-template.d.ts +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/validate-template.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-change-set-to-be-ready.d.ts +1 -1
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-change-set-to-be-ready.js +5 -5
- package/dist/command/stacks/deploy/standard-stack/steps/wait-change-set-to-be-ready.js.map +1 -0
- package/dist/command/stacks/deploy/standard-stack/steps/wait-dependencies-to-complete.d.ts +3 -0
- package/dist/command/stacks/deploy/standard-stack/steps/wait-dependencies-to-complete.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-failed-stack-delete-to-complete.d.ts +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/wait-failed-stack-delete-to-complete.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-stack-create-or-update-to-complete.d.ts +1 -1
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-stack-create-or-update-to-complete.js +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/wait-stack-create-or-update-to-complete.js.map +1 -0
- package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-stack-rollback-to-complete.d.ts +1 -1
- package/dist/command/stacks/deploy/standard-stack/steps/wait-stack-rollback-to-complete.js.map +1 -0
- package/dist/command/stacks/deploy/{transitions.d.ts → standard-stack/transitions.d.ts} +4 -4
- package/dist/command/stacks/deploy/{transitions.js → standard-stack/transitions.js} +2 -2
- package/dist/command/stacks/deploy/standard-stack/transitions.js.map +1 -0
- package/dist/command/stacks/deploy/validate.js +3 -1
- package/dist/command/stacks/deploy/validate.js.map +1 -1
- package/dist/command/stacks/drift/detect-drift.js +10 -5
- package/dist/command/stacks/drift/detect-drift.js.map +1 -1
- package/dist/command/stacks/inspect/configuration/command.js.map +1 -1
- package/dist/command/stacks/list/list-stacks.js +27 -9
- package/dist/command/stacks/list/list-stacks.js.map +1 -1
- package/dist/command/stacks/list/model.d.ts +1 -0
- package/dist/command/stacks/undeploy/command.js +3 -3
- package/dist/command/stacks/undeploy/command.js.map +1 -1
- package/dist/command/stacks/undeploy/custom-stack/states.d.ts +27 -0
- package/dist/command/stacks/undeploy/custom-stack/states.js +2 -0
- package/dist/command/stacks/undeploy/custom-stack/states.js.map +1 -0
- package/dist/command/stacks/undeploy/custom-stack/steps/delete-stack.d.ts +3 -0
- package/dist/command/stacks/undeploy/custom-stack/steps/delete-stack.js +38 -0
- package/dist/command/stacks/undeploy/custom-stack/steps/delete-stack.js.map +1 -0
- package/dist/command/stacks/undeploy/custom-stack/steps/wait-dependents-to-complete.d.ts +3 -0
- package/dist/command/stacks/undeploy/custom-stack/steps/wait-dependents-to-complete.js +26 -0
- package/dist/command/stacks/undeploy/custom-stack/steps/wait-dependents-to-complete.js.map +1 -0
- package/dist/command/stacks/undeploy/custom-stack/transitions.d.ts +7 -0
- package/dist/command/stacks/undeploy/custom-stack/transitions.js +9 -0
- package/dist/command/stacks/undeploy/custom-stack/transitions.js.map +1 -0
- package/dist/command/stacks/undeploy/delete.js +41 -17
- package/dist/command/stacks/undeploy/delete.js.map +1 -1
- package/dist/command/stacks/undeploy/plan.d.ts +19 -5
- package/dist/command/stacks/undeploy/plan.js +39 -11
- package/dist/command/stacks/undeploy/plan.js.map +1 -1
- package/dist/command/stacks/undeploy/standard-stack/states.d.ts +32 -0
- package/dist/command/stacks/undeploy/standard-stack/states.js +2 -0
- package/dist/command/stacks/undeploy/standard-stack/states.js.map +1 -0
- package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/execute-after-undeploy-hooks.d.ts +1 -1
- package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/execute-after-undeploy-hooks.js +1 -1
- package/dist/command/stacks/undeploy/standard-stack/steps/execute-after-undeploy-hooks.js.map +1 -0
- package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/execute-before-undeploy-hooks.d.ts +1 -1
- package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/execute-before-undeploy-hooks.js +1 -1
- package/dist/command/stacks/undeploy/standard-stack/steps/execute-before-undeploy-hooks.js.map +1 -0
- package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/initiate-stack-delete.d.ts +1 -1
- package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/initiate-stack-delete.js +1 -1
- package/dist/command/stacks/undeploy/standard-stack/steps/initiate-stack-delete.js.map +1 -0
- package/dist/command/stacks/undeploy/standard-stack/steps/wait-dependents-to-complete.d.ts +3 -0
- package/dist/command/stacks/undeploy/standard-stack/steps/wait-dependents-to-complete.js.map +1 -0
- package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/wait-stack-delete-to-complete.d.ts +1 -1
- package/dist/command/stacks/undeploy/standard-stack/steps/wait-stack-delete-to-complete.js.map +1 -0
- package/dist/command/stacks/undeploy/{transitions.d.ts → standard-stack/transitions.d.ts} +4 -4
- package/dist/command/stacks/undeploy/{transitions.js → standard-stack/transitions.js} +2 -2
- package/dist/command/stacks/undeploy/standard-stack/transitions.js.map +1 -0
- package/dist/command/stacks/undeploy/validate.js +11 -6
- package/dist/command/stacks/undeploy/validate.js.map +1 -1
- package/dist/config/custom-stack-config.d.ts +8 -0
- package/dist/config/custom-stack-config.js +6 -0
- package/dist/config/custom-stack-config.js.map +1 -0
- package/dist/config/stack-config.d.ts +9 -11
- package/dist/config/standard-stack-config.d.ts +15 -0
- package/dist/config/standard-stack-config.js +3 -0
- package/dist/config/standard-stack-config.js.map +1 -0
- package/dist/context/stacks-context.d.ts +3 -1
- package/dist/custom-stacks/cmd-custom-stack-handler.d.ts +24 -0
- package/dist/custom-stacks/cmd-custom-stack-handler.js +274 -0
- package/dist/custom-stacks/cmd-custom-stack-handler.js.map +1 -0
- package/dist/custom-stacks/custom-stack-handler-registry.d.ts +13 -0
- package/dist/custom-stacks/custom-stack-handler-registry.js +32 -0
- package/dist/custom-stacks/custom-stack-handler-registry.js.map +1 -0
- package/dist/custom-stacks/custom-stack-handler.d.ts +401 -0
- package/dist/custom-stacks/custom-stack-handler.js +2 -0
- package/dist/custom-stacks/custom-stack-handler.js.map +1 -0
- package/dist/extensions/config-customizer.d.ts +5 -0
- package/dist/hooks/execute.d.ts +2 -2
- package/dist/hooks/execute.js +1 -0
- package/dist/hooks/execute.js.map +1 -1
- package/dist/hooks/hook.d.ts +2 -2
- package/dist/index.d.ts +5 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/parser/stacks/build-custom-stack-config.d.ts +5 -0
- package/dist/parser/stacks/build-custom-stack-config.js +51 -0
- package/dist/parser/stacks/build-custom-stack-config.js.map +1 -0
- package/dist/parser/stacks/build-standard-stack-config.d.ts +6 -0
- package/dist/parser/stacks/{build-stack-config.js → build-standard-stack-config.js} +5 -4
- package/dist/parser/stacks/build-standard-stack-config.js.map +1 -0
- package/dist/parser/stacks/parse-custom-stack-type.d.ts +2 -0
- package/dist/parser/stacks/parse-custom-stack-type.js +10 -0
- package/dist/parser/stacks/parse-custom-stack-type.js.map +1 -0
- package/dist/resolvers/stack-output-resolver.js +4 -0
- package/dist/resolvers/stack-output-resolver.js.map +1 -1
- package/dist/schema/custom-stack-config-schema.d.ts +7 -0
- package/dist/schema/custom-stack-config-schema.js +34 -0
- package/dist/schema/custom-stack-config-schema.js.map +1 -0
- package/dist/schema/stacks-schema.d.ts +1 -0
- package/dist/schema/stacks-schema.js +2 -0
- package/dist/schema/stacks-schema.js.map +1 -1
- package/dist/schema/{stack-config-schema.d.ts → standard-stack-config-schema.d.ts} +2 -2
- package/dist/schema/{stack-config-schema.js → standard-stack-config-schema.js} +4 -3
- package/dist/schema/standard-stack-config-schema.js.map +1 -0
- package/dist/stacks/custom-stack.d.ts +26 -0
- package/dist/stacks/custom-stack.js +38 -0
- package/dist/stacks/custom-stack.js.map +1 -0
- package/dist/stacks/stack.d.ts +13 -41
- package/dist/stacks/stack.js +11 -38
- package/dist/stacks/stack.js.map +1 -1
- package/dist/stacks/standard-stack.d.ts +54 -0
- package/dist/stacks/standard-stack.js +42 -0
- package/dist/stacks/standard-stack.js.map +1 -0
- package/dist/takomo-config-repository-fs/deployment-targets/config-repository.js +5 -1
- package/dist/takomo-config-repository-fs/deployment-targets/config-repository.js.map +1 -1
- package/dist/takomo-config-repository-fs/stacks/config-repository.js +4 -1
- package/dist/takomo-config-repository-fs/stacks/config-repository.js.map +1 -1
- package/dist/takomo-config-repository-fs/stacks/parser.d.ts +4 -3
- package/dist/takomo-config-repository-fs/stacks/parser.js +35 -7
- package/dist/takomo-config-repository-fs/stacks/parser.js.map +1 -1
- package/dist/takomo-stacks-context/config/build-custom-stack.d.ts +15 -0
- package/dist/takomo-stacks-context/config/build-custom-stack.js +104 -0
- package/dist/takomo-stacks-context/config/build-custom-stack.js.map +1 -0
- package/dist/takomo-stacks-context/config/build-stack.d.ts +12 -12
- package/dist/takomo-stacks-context/config/build-stack.js +18 -139
- package/dist/takomo-stacks-context/config/build-stack.js.map +1 -1
- package/dist/takomo-stacks-context/config/build-stacks-context.js +8 -2
- package/dist/takomo-stacks-context/config/build-stacks-context.js.map +1 -1
- package/dist/takomo-stacks-context/config/build-standard-stack.d.ts +27 -0
- package/dist/takomo-stacks-context/config/build-standard-stack.js +144 -0
- package/dist/takomo-stacks-context/config/build-standard-stack.js.map +1 -0
- package/dist/takomo-stacks-context/config/config-tree.d.ts +3 -2
- package/dist/takomo-stacks-context/config/create-root-stack-group.js.map +1 -1
- package/dist/takomo-stacks-context/config/process-config-tree.d.ts +2 -1
- package/dist/takomo-stacks-context/config/process-config-tree.js +6 -6
- package/dist/takomo-stacks-context/config/process-config-tree.js.map +1 -1
- package/dist/takomo-stacks-context/dependencies.js +2 -2
- package/dist/takomo-stacks-context/dependencies.js.map +1 -1
- package/dist/takomo-stacks-context/model.d.ts +7 -5
- package/dist/takomo-stacks-context/model.js +2 -0
- package/dist/takomo-stacks-context/model.js.map +1 -1
- package/dist/takomo-stacks-model/util.d.ts +0 -4
- package/dist/takomo-stacks-model/util.js +0 -4
- package/dist/takomo-stacks-model/util.js.map +1 -1
- package/dist/utils/collections.d.ts +1 -0
- package/dist/utils/collections.js +4 -0
- package/dist/utils/collections.js.map +1 -1
- package/dist/utils/exhaustive-check.d.ts +1 -0
- package/dist/utils/exhaustive-check.js +4 -0
- package/dist/utils/exhaustive-check.js.map +1 -0
- package/package.json +3 -2
- package/dist/command/stacks/deploy/states.js.map +0 -1
- package/dist/command/stacks/deploy/steps/continue-update-rollback.js.map +0 -1
- package/dist/command/stacks/deploy/steps/emit-stack-template.js.map +0 -1
- package/dist/command/stacks/deploy/steps/enrich-current-stack.js.map +0 -1
- package/dist/command/stacks/deploy/steps/execute-after-deploy-hooks.js.map +0 -1
- package/dist/command/stacks/deploy/steps/execute-before-deploy-hooks.js.map +0 -1
- package/dist/command/stacks/deploy/steps/initiate-change-set-create.js.map +0 -1
- package/dist/command/stacks/deploy/steps/initiate-failed-stack-delete.js.map +0 -1
- package/dist/command/stacks/deploy/steps/initiate-stack-create-or-update.js.map +0 -1
- package/dist/command/stacks/deploy/steps/initiate-stack-create.js.map +0 -1
- package/dist/command/stacks/deploy/steps/initiate-stack-update.js.map +0 -1
- package/dist/command/stacks/deploy/steps/prepare-parameters.js.map +0 -1
- package/dist/command/stacks/deploy/steps/prepare-tags.js.map +0 -1
- package/dist/command/stacks/deploy/steps/prepare-template.d.ts +0 -7
- package/dist/command/stacks/deploy/steps/prepare-template.js.map +0 -1
- package/dist/command/stacks/deploy/steps/review-change-set.js.map +0 -1
- package/dist/command/stacks/deploy/steps/summarize-template.js.map +0 -1
- package/dist/command/stacks/deploy/steps/update-termination-protection.js.map +0 -1
- package/dist/command/stacks/deploy/steps/upload-template.js.map +0 -1
- package/dist/command/stacks/deploy/steps/validate-parameters.js.map +0 -1
- package/dist/command/stacks/deploy/steps/validate-template.js.map +0 -1
- package/dist/command/stacks/deploy/steps/wait-change-set-to-be-ready.js.map +0 -1
- package/dist/command/stacks/deploy/steps/wait-dependencies-to-complete.d.ts +0 -3
- package/dist/command/stacks/deploy/steps/wait-dependencies-to-complete.js.map +0 -1
- package/dist/command/stacks/deploy/steps/wait-failed-stack-delete-to-complete.js.map +0 -1
- package/dist/command/stacks/deploy/steps/wait-stack-create-or-update-to-complete.js.map +0 -1
- package/dist/command/stacks/deploy/steps/wait-stack-rollback-to-complete.js.map +0 -1
- package/dist/command/stacks/deploy/transitions.js.map +0 -1
- package/dist/command/stacks/undeploy/states.d.ts +0 -30
- package/dist/command/stacks/undeploy/states.js.map +0 -1
- package/dist/command/stacks/undeploy/steps/execute-after-undeploy-hooks.js.map +0 -1
- package/dist/command/stacks/undeploy/steps/execute-before-undeploy-hooks.js.map +0 -1
- package/dist/command/stacks/undeploy/steps/initiate-stack-delete.js.map +0 -1
- package/dist/command/stacks/undeploy/steps/wait-dependents-to-complete.d.ts +0 -3
- package/dist/command/stacks/undeploy/steps/wait-dependents-to-complete.js.map +0 -1
- package/dist/command/stacks/undeploy/steps/wait-stack-delete-to-complete.js.map +0 -1
- package/dist/command/stacks/undeploy/transitions.js.map +0 -1
- package/dist/parser/stacks/build-stack-config.d.ts +0 -6
- package/dist/parser/stacks/build-stack-config.js.map +0 -1
- package/dist/schema/stack-config-schema.js.map +0 -1
- /package/dist/command/stacks/deploy/{states.js → custom-stack/states.js} +0 -0
- /package/dist/command/stacks/{undeploy → deploy/standard-stack}/states.js +0 -0
- /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/continue-update-rollback.js +0 -0
- /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/enrich-current-stack.js +0 -0
- /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/initiate-stack-create-or-update.js +0 -0
- /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/prepare-parameters.js +0 -0
- /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/prepare-tags.js +0 -0
- /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/summarize-template.js +0 -0
- /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/update-termination-protection.js +0 -0
- /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/validate-template.js +0 -0
- /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-dependencies-to-complete.js +0 -0
- /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-failed-stack-delete-to-complete.js +0 -0
- /package/dist/command/stacks/deploy/{steps → standard-stack/steps}/wait-stack-rollback-to-complete.js +0 -0
- /package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/wait-dependents-to-complete.js +0 -0
- /package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/wait-stack-delete-to-complete.js +0 -0
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
import { CloudFormationStack } from "../../../aws/cloudformation/model.js";
|
|
2
|
-
import {
|
|
2
|
+
import { InternalStandardStack } from "../../../stacks/standard-stack.js";
|
|
3
3
|
import { CommandPath } from "../../command-model.js";
|
|
4
|
+
import { InternalStack, StackPath } from "../../../stacks/stack.js";
|
|
5
|
+
import { InternalCustomStack } from "../../../stacks/custom-stack.js";
|
|
6
|
+
import { CustomStackState } from "../../../custom-stacks/custom-stack-handler.js";
|
|
7
|
+
import { StacksContext } from "../../../context/stacks-context.js";
|
|
4
8
|
export type StackUndeployOperationType = "DELETE" | "SKIP";
|
|
5
|
-
export declare const resolveUndeployOperationType: (currentStack?:
|
|
6
|
-
export
|
|
7
|
-
|
|
9
|
+
export declare const resolveUndeployOperationType: (currentStack?: unknown) => StackUndeployOperationType;
|
|
10
|
+
export declare const resolveUndeployCustomStackOperationType: (currentState: CustomStackState) => StackUndeployOperationType;
|
|
11
|
+
export interface StandardStackUndeployOperation {
|
|
12
|
+
readonly stack: InternalStandardStack;
|
|
8
13
|
readonly type: StackUndeployOperationType;
|
|
9
14
|
readonly currentStack?: CloudFormationStack;
|
|
10
15
|
readonly dependents: ReadonlyArray<StackPath>;
|
|
11
16
|
}
|
|
17
|
+
export interface CustomStackUndeployOperation {
|
|
18
|
+
readonly stack: InternalCustomStack;
|
|
19
|
+
readonly type: StackUndeployOperationType;
|
|
20
|
+
readonly currentState: CustomStackState;
|
|
21
|
+
readonly dependents: ReadonlyArray<StackPath>;
|
|
22
|
+
}
|
|
23
|
+
export type StackUndeployOperation = StandardStackUndeployOperation | CustomStackUndeployOperation;
|
|
24
|
+
export declare const isStandardStackUndeployOperation: (op: StackUndeployOperation) => op is StandardStackUndeployOperation;
|
|
25
|
+
export declare const isCustomStackUndeployOperation: (op: StackUndeployOperation) => op is CustomStackUndeployOperation;
|
|
12
26
|
export interface StacksUndeployPlan {
|
|
13
27
|
readonly operations: ReadonlyArray<StackUndeployOperation>;
|
|
14
28
|
readonly prune: boolean;
|
|
15
29
|
}
|
|
16
|
-
export declare const buildStacksUndeployPlan: (stacks: ReadonlyArray<InternalStack>, commandPath: CommandPath, ignoreDependencies: boolean, prune: boolean) => Promise<StacksUndeployPlan>;
|
|
30
|
+
export declare const buildStacksUndeployPlan: (ctx: StacksContext, stacks: ReadonlyArray<InternalStack>, commandPath: CommandPath, ignoreDependencies: boolean, prune: boolean) => Promise<StacksUndeployPlan>;
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import * as R from "ramda";
|
|
2
|
+
import { isInternalStandardStack, } from "../../../stacks/standard-stack.js";
|
|
2
3
|
import { getStackPath, isNotObsolete, isObsolete, isWithinCommandPath, } from "../../../takomo-stacks-model/util.js";
|
|
3
4
|
import { arrayToMap } from "../../../utils/collections.js";
|
|
4
5
|
import { sortStacksForUndeploy } from "../../../takomo-stacks-context/dependencies.js";
|
|
6
|
+
import { isInternalCustomStack, } from "../../../stacks/custom-stack.js";
|
|
7
|
+
import { exhaustiveCheck } from "../../../utils/exhaustive-check.js";
|
|
8
|
+
import { getCustomStackState } from "../common/load-current-cf-stacks.js";
|
|
5
9
|
export const resolveUndeployOperationType = (currentStack) => (currentStack ? "DELETE" : "SKIP");
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
export const resolveUndeployCustomStackOperationType = (currentState) => {
|
|
11
|
+
switch (currentState.status) {
|
|
12
|
+
case "CREATE_COMPLETED":
|
|
13
|
+
case "UPDATE_COMPLETED":
|
|
14
|
+
return "DELETE";
|
|
15
|
+
case "PENDING":
|
|
16
|
+
return "SKIP";
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export const isStandardStackUndeployOperation = (op) => isInternalStandardStack(op.stack);
|
|
20
|
+
export const isCustomStackUndeployOperation = (op) => isInternalCustomStack(op.stack);
|
|
21
|
+
const convertToUndeployOperation = async (ctx, stacksByPath, stack, prune) => {
|
|
9
22
|
const dependentFilter = prune ? isObsolete : isNotObsolete;
|
|
10
23
|
const dependents = stack.dependents.filter((dependentPath) => {
|
|
11
24
|
const dependent = stacksByPath.get(dependentPath);
|
|
@@ -14,12 +27,27 @@ const convertToUndeployOperation = async (stacksByPath, stack, prune) => {
|
|
|
14
27
|
}
|
|
15
28
|
return dependentFilter(dependent);
|
|
16
29
|
});
|
|
17
|
-
|
|
18
|
-
stack
|
|
19
|
-
type
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
30
|
+
if (isInternalCustomStack(stack)) {
|
|
31
|
+
const currentState = await getCustomStackState(ctx, stack);
|
|
32
|
+
const type = resolveUndeployCustomStackOperationType(currentState);
|
|
33
|
+
return {
|
|
34
|
+
stack,
|
|
35
|
+
type,
|
|
36
|
+
dependents,
|
|
37
|
+
currentState,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
if (isInternalStandardStack(stack)) {
|
|
41
|
+
const currentStack = await stack.getCurrentCloudFormationStack();
|
|
42
|
+
const type = resolveUndeployOperationType(currentStack);
|
|
43
|
+
return {
|
|
44
|
+
stack,
|
|
45
|
+
type,
|
|
46
|
+
dependents,
|
|
47
|
+
currentStack,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return exhaustiveCheck(stack);
|
|
23
51
|
};
|
|
24
52
|
const collectStackDependents = (stacksByPath, stack) => stack.dependents.reduce((collected, dependent) => {
|
|
25
53
|
const dependentStack = stacksByPath.get(dependent);
|
|
@@ -32,7 +60,7 @@ const collectStackDependents = (stacksByPath, stack) => stack.dependents.reduce(
|
|
|
32
60
|
...collectStackDependents(stacksByPath, dependentStack),
|
|
33
61
|
]);
|
|
34
62
|
}, new Array());
|
|
35
|
-
export const buildStacksUndeployPlan = async (stacks, commandPath, ignoreDependencies, prune) => {
|
|
63
|
+
export const buildStacksUndeployPlan = async (ctx, stacks, commandPath, ignoreDependencies, prune) => {
|
|
36
64
|
const pruneFilter = prune ? isObsolete : isNotObsolete;
|
|
37
65
|
const stacksByPath = arrayToMap(stacks, getStackPath);
|
|
38
66
|
const stacksToUndeploy = stacks
|
|
@@ -48,7 +76,7 @@ export const buildStacksUndeployPlan = async (stacks, commandPath, ignoreDepende
|
|
|
48
76
|
const selectedStacks = ignoreDependencies
|
|
49
77
|
? sortedStacks.filter((stack) => isWithinCommandPath(stack.path, commandPath))
|
|
50
78
|
: sortedStacks;
|
|
51
|
-
const operations = await Promise.all(selectedStacks.map((stack) => convertToUndeployOperation(stacksByPath, stack, prune)));
|
|
79
|
+
const operations = await Promise.all(selectedStacks.map((stack) => convertToUndeployOperation(ctx, stacksByPath, stack, prune)));
|
|
52
80
|
return {
|
|
53
81
|
prune,
|
|
54
82
|
operations,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../src/command/stacks/undeploy/plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../../src/command/stacks/undeploy/plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAA;AAE1B,OAAO,EAEL,uBAAuB,GACxB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EACL,YAAY,EACZ,aAAa,EACb,UAAU,EACV,mBAAmB,GACpB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAE1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CA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from "../../../../aws/cloudformation/model.js";
|
|
2
|
+
import { InternalStacksContext } from "../../../../context/stacks-context.js";
|
|
3
|
+
import { InternalStandardStack } from "../../../../stacks/standard-stack.js";
|
|
4
|
+
import { CommandStatus } from "../../../../takomo-core/command.js";
|
|
5
|
+
import { TkmLogger } from "../../../../utils/logging.js";
|
|
6
|
+
import { StackOperationVariables, StackResult } from "../../../command-model.js";
|
|
7
|
+
import { InitialStackOperationState } from "../../common/states.js";
|
|
8
|
+
import { UndeployStacksIO } from "../model.js";
|
|
9
|
+
import { UndeployStackTransitions } from "./transitions.js";
|
|
10
|
+
export interface InitialUndeployStandardStackState extends InitialStackOperationState {
|
|
11
|
+
readonly ctx: InternalStacksContext;
|
|
12
|
+
readonly logger: TkmLogger;
|
|
13
|
+
readonly dependents: ReadonlyArray<Promise<StackResult>>;
|
|
14
|
+
readonly io: UndeployStacksIO;
|
|
15
|
+
readonly variables: StackOperationVariables;
|
|
16
|
+
readonly transitions: UndeployStackTransitions;
|
|
17
|
+
readonly stack: InternalStandardStack;
|
|
18
|
+
readonly currentStack?: CloudFormationStack;
|
|
19
|
+
}
|
|
20
|
+
export interface CurrentStackHolder extends InitialUndeployStandardStackState {
|
|
21
|
+
readonly currentStack: CloudFormationStack;
|
|
22
|
+
}
|
|
23
|
+
export interface ClientTokenHolder extends CurrentStackHolder {
|
|
24
|
+
readonly clientToken: string;
|
|
25
|
+
}
|
|
26
|
+
export interface StackOperationResultHolder extends InitialUndeployStandardStackState {
|
|
27
|
+
readonly message: string;
|
|
28
|
+
readonly events: ReadonlyArray<StackEvent>;
|
|
29
|
+
readonly success: boolean;
|
|
30
|
+
readonly status: CommandStatus;
|
|
31
|
+
readonly error?: Error;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"states.js","sourceRoot":"","sources":["../../../../../src/command/stacks/undeploy/standard-stack/states.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StackOperationStep } from "
|
|
1
|
+
import { StackOperationStep } from "../../../common/steps.js";
|
|
2
2
|
import { StackOperationResultHolder } from "../states.js";
|
|
3
3
|
export declare const executeAfterUndeployHooks: StackOperationStep<StackOperationResultHolder>;
|
package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/execute-after-undeploy-hooks.js
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { executeHooks } from "
|
|
1
|
+
import { executeHooks } from "../../../../../hooks/execute.js";
|
|
2
2
|
export const executeAfterUndeployHooks = async (state) => {
|
|
3
3
|
const { stack, ctx, variables, logger, transitions, events } = state;
|
|
4
4
|
const { result, message, error } = await executeHooks({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-after-undeploy-hooks.js","sourceRoot":"","sources":["../../../../../../src/command/stacks/undeploy/standard-stack/steps/execute-after-undeploy-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAI9D,MAAM,CAAC,MAAM,yBAAyB,GAElC,KAAK,EAAE,KAAK,EAAE,EAAE;IAClB,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,KAAK,CAAA;IAEpE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,MAAM,YAAY,CAAC;QACpD,GAAG;QACH,KAAK;QACL,SAAS;QACT,MAAM;QACN,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,OAAO;KACf,CAAC,CAAA;IAEF,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;QACvB,MAAM,CAAC,KAAK,CAAC,6CAA6C,OAAO,EAAE,CAAC,CAAA;QACpE,OAAO,WAAW,CAAC,kBAAkB,CAAC;YACpC,GAAG,KAAK;YACR,OAAO;YACP,MAAM;YACN,KAAK;SACN,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,WAAW,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAA;AAClD,CAAC,CAAA"}
|
package/dist/command/stacks/undeploy/{steps → standard-stack/steps}/execute-before-undeploy-hooks.js
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { executeHooks } from "
|
|
1
|
+
import { executeHooks } from "../../../../../hooks/execute.js";
|
|
2
2
|
export const executeBeforeUndeployHooks = async (state) => {
|
|
3
3
|
const { stack, ctx, variables, logger, transitions, currentStack } = state;
|
|
4
4
|
const { result, message, error } = await executeHooks({
|
package/dist/command/stacks/undeploy/standard-stack/steps/execute-before-undeploy-hooks.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-before-undeploy-hooks.js","sourceRoot":"","sources":["../../../../../../src/command/stacks/undeploy/standard-stack/steps/execute-before-undeploy-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAI9D,MAAM,CAAC,MAAM,0BAA0B,GAEnC,KAAK,EAAE,KAAK,EAAE,EAAE;IAClB,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,KAAK,CAAA;IAE1E,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,MAAM,YAAY,CAAC;QACpD,GAAG;QACH,KAAK;QACL,SAAS;QACT,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,QAAQ;QACf,MAAM;QACN,YAAY;KACb,CAAC,CAAA;IAEF,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;QACvB,MAAM,CAAC,KAAK,CAAC,8CAA8C,OAAO,EAAE,CAAC,CAAA;QACrE,OAAO,WAAW,CAAC,kBAAkB,CAAC;YACpC,GAAG,KAAK;YACR,OAAO;YACP,KAAK;YACL,MAAM,EAAE,EAAE;SACX,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,MAAM,CAAC,IAAI,CACT,8DAA8D,OAAO,EAAE,CACxE,CAAA;QACD,OAAO,WAAW,CAAC,kBAAkB,CAAC;YACpC,GAAG,KAAK;YACR,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,WAAW,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAA;AAC/C,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initiate-stack-delete.js","sourceRoot":"","sources":["../../../../../../src/command/stacks/undeploy/standard-stack/steps/initiate-stack-delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAA;AAItD,MAAM,CAAC,MAAM,qBAAqB,GAE9B,KAAK,EAAE,KAAK,EAAE,EAAE;IAClB,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,KAAK,CAAA;IAElD,MAAM,WAAW,GAAG,IAAI,EAAE,CAAA;IAE1B,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,uBAAuB,EAAE,CAAA;IACpD,MAAM,MAAM,CAAC,qBAAqB,CAAC;QACjC,SAAS,EAAE,YAAY,CAAC,EAAE;QAC1B,kBAAkB,EAAE,WAAW;KAChC,CAAC,CAAA;IAEF,OAAO,WAAW,CAAC,yBAAyB,CAAC;QAC3C,GAAG,KAAK;QACR,WAAW;KACZ,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-dependents-to-complete.js","sourceRoot":"","sources":["../../../../../../src/command/stacks/undeploy/standard-stack/steps/wait-dependents-to-complete.ts"],"names":[],"mappings":"AAIA,MAAM,sBAAsB,GAAG,CAAC,OAAmC,EAAW,EAAE,CAC9E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;AAEjC,MAAM,uBAAuB,GAAG,CAC9B,OAAmC,EAC1B,EAAE,CACX,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,CAAC,2BAA2B,CAAC,CAAA;AAE9E,MAAM,CAAC,MAAM,wBAAwB,GAEjC,KAAK,EAAE,KAAK,EAAE,EAAE;IAClB,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,KAAK,CAAA;IAEvD,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IAEtD,IAAI,sBAAsB,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAC7C,OAAO,WAAW,CAAC,oBAAoB,CAAC;YACtC,GAAG,KAAK;YACR,OAAO,EAAE,mBAAmB;SAC7B,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,uBAAuB,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAC9C,OAAO,WAAW,CAAC,oBAAoB,CAAC;YACtC,GAAG,KAAK;YACR,OAAO,EAAE,oBAAoB;SAC9B,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,WAAW,CAAC,kBAAkB,CAAC;YACpC,GAAG,KAAK;YACR,OAAO,EAAE,iBAAiB;SAC3B,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,WAAW,CAAC,0BAA0B,CAAC;QAC5C,GAAG,KAAK;QACR,YAAY;KACb,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
package/dist/command/stacks/undeploy/standard-stack/steps/wait-stack-delete-to-complete.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-stack-delete-to-complete.js","sourceRoot":"","sources":["../../../../../../src/command/stacks/undeploy/standard-stack/steps/wait-stack-delete-to-complete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAA;AAI1B,MAAM,CAAC,MAAM,yBAAyB,GAElC,KAAK,EAAE,KAAK,EAAE,EAAE;IAClB,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,EAAE,GAAG,KAAK,CAAA;IAEnE,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAE7D,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,uBAAuB,EAAE,CAAA;IAEpD,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC;QACrE,WAAW;QACX,aAAa;QACb,OAAO,EAAE,YAAY,CAAC,EAAE;KACzB,CAAC,CAAA;IAEF,IAAI,WAAW,KAAK,iBAAiB,EAAE,CAAC;QACtC,OAAO,WAAW,CAAC,yBAAyB,CAAC;YAC3C,GAAG,KAAK;YACR,MAAM;YACN,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,qBAAqB;YAC9B,OAAO,EAAE,KAAK;SACf,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,WAAW,CAAC,yBAAyB,CAAC;QAC3C,GAAG,KAAK;QACR,MAAM;QACN,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,wBAAwB;QACjC,OAAO,EAAE,IAAI;KACd,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { StackOperationStep } from "
|
|
2
|
-
import { StackOperationTransitions } from "
|
|
3
|
-
import { ClientTokenHolder, CurrentStackHolder,
|
|
1
|
+
import { StackOperationStep } from "../../common/steps.js";
|
|
2
|
+
import { StackOperationTransitions } from "../../common/transitions.js";
|
|
3
|
+
import { ClientTokenHolder, CurrentStackHolder, InitialUndeployStandardStackState, StackOperationResultHolder } from "./states.js";
|
|
4
4
|
export interface UndeployStackTransitions extends StackOperationTransitions {
|
|
5
5
|
executeBeforeUndeployHooks: StackOperationStep<CurrentStackHolder>;
|
|
6
6
|
initiateStackDelete: StackOperationStep<CurrentStackHolder>;
|
|
@@ -8,4 +8,4 @@ export interface UndeployStackTransitions extends StackOperationTransitions {
|
|
|
8
8
|
executeAfterUndeployHooks: StackOperationStep<StackOperationResultHolder>;
|
|
9
9
|
}
|
|
10
10
|
export declare const createUndeployStackTransitions: () => UndeployStackTransitions;
|
|
11
|
-
export declare const executeAfterUndeployHooksOnError: <S extends
|
|
11
|
+
export declare const executeAfterUndeployHooksOnError: <S extends InitialUndeployStandardStackState>(step: StackOperationStep<S>) => StackOperationStep<S>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defaultStackOperationTransitions, inProgress, } from "
|
|
1
|
+
import { defaultStackOperationTransitions, inProgress, } from "../../common/transitions.js";
|
|
2
2
|
import { executeAfterUndeployHooks } from "./steps/execute-after-undeploy-hooks.js";
|
|
3
|
-
import { executeBeforeUndeployHooks } from "./steps/execute-before-undeploy-hooks.js";
|
|
4
3
|
import { initiateStackDeletion } from "./steps/initiate-stack-delete.js";
|
|
4
|
+
import { executeBeforeUndeployHooks } from "./steps/execute-before-undeploy-hooks.js";
|
|
5
5
|
import { waitDependentsToComplete } from "./steps/wait-dependents-to-complete.js";
|
|
6
6
|
import { waitStackDeleteToComplete } from "./steps/wait-stack-delete-to-complete.js";
|
|
7
7
|
export const createUndeployStackTransitions = () => ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transitions.js","sourceRoot":"","sources":["../../../../../src/command/stacks/undeploy/standard-stack/transitions.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gCAAgC,EAChC,UAAU,GAEX,MAAM,6BAA6B,CAAA;AAOpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAA;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAA;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAA;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAA;AASpF,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAA6B,EAAE,CAAC,CAAC;IAC7E,GAAG,gCAAgC;IACnC,yBAAyB,EAAE,UAAU,CACnC,qBAAqB,EACrB,yBAAyB,CAC1B;IACD,0BAA0B,EAAE,UAAU,CACpC,sBAAsB,EACtB,0BAA0B,CAC3B;IACD,mBAAmB,EAAE,UAAU,CAC7B,uBAAuB,EACvB,gCAAgC,CAAC,qBAAqB,CAAC,CACxD;IACD,yBAAyB,EAAE,UAAU,CACnC,4BAA4B,EAC5B,gCAAgC,CAAC,yBAAyB,CAAC,CAC5D;IACD,KAAK,EAAE,UAAU,CAAC,6BAA6B,EAAE,wBAAwB,CAAC;CAC3E,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAC3C,CACE,IAA2B,EACJ,EAAE,CAC3B,KAAK,EAAE,KAAQ,EAAE,EAAE;IACjB,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,CAAC,KAAK,CAAC,CAAA;IAC1B,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAA;QAC9C,OAAO,KAAK,CAAC,WAAW,CAAC,yBAAyB,CAAC;YACjD,MAAM,EAAE,EAAE;YACV,GAAG,KAAK;YACR,KAAK;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,OAAO;SACjB,CAAC,CAAA;IACJ,CAAC;AACH,CAAC,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as R from "ramda";
|
|
2
2
|
import { validateStackCredentialManagersWithAllowedAccountIds } from "../../../takomo-stacks-context/common.js";
|
|
3
3
|
import { TakomoError } from "../../../utils/errors.js";
|
|
4
|
+
import { isStandardStackUndeployOperation, } from "./plan.js";
|
|
4
5
|
export const isStackReadyForUndeploy = (stackStatus) => [
|
|
5
6
|
"ROLLBACK_COMPLETE",
|
|
6
7
|
"CREATE_FAILED",
|
|
@@ -17,9 +18,11 @@ export const isStackReadyForUndeploy = (stackStatus) => [
|
|
|
17
18
|
const validateStackStatus = (operations) => {
|
|
18
19
|
const stacksInInvalidStatus = [];
|
|
19
20
|
for (const operation of operations) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
if (isStandardStackUndeployOperation(operation)) {
|
|
22
|
+
const { currentStack } = operation;
|
|
23
|
+
if (currentStack && !isStackReadyForUndeploy(currentStack.status)) {
|
|
24
|
+
stacksInInvalidStatus.push(operation);
|
|
25
|
+
}
|
|
23
26
|
}
|
|
24
27
|
}
|
|
25
28
|
if (stacksInInvalidStatus.length > 0) {
|
|
@@ -32,9 +35,11 @@ const validateStackStatus = (operations) => {
|
|
|
32
35
|
const validateTerminationProtection = (operations) => {
|
|
33
36
|
const stacks = [];
|
|
34
37
|
for (const operation of operations) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
if (isStandardStackUndeployOperation(operation)) {
|
|
39
|
+
const { currentStack } = operation;
|
|
40
|
+
if (currentStack && currentStack.enableTerminationProtection) {
|
|
41
|
+
stacks.push(operation);
|
|
42
|
+
}
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
45
|
if (stacks.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../src/command/stacks/undeploy/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAA;AAE1B,OAAO,EAAE,oDAAoD,EAAE,MAAM,0CAA0C,CAAA;AAC/G,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../../src/command/stacks/undeploy/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAA;AAE1B,OAAO,EAAE,oDAAoD,EAAE,MAAM,0CAA0C,CAAA;AAC/G,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EACL,gCAAgC,GAGjC,MAAM,WAAW,CAAA;AAElB,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,WAAwB,EAAW,EAAE,CAC3E;IACE,mBAAmB;IACnB,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,0BAA0B;IAC1B,oBAAoB;IACpB,wBAAwB;IACxB,iBAAiB;IACjB,0BAA0B;CAC3B,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;AAEzB,MAAM,mBAAmB,GAAG,CAC1B,UAAiD,EAC3C,EAAE;IACR,MAAM,qBAAqB,GAAG,EAAE,CAAA;IAChC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,gCAAgC,CAAC,SAAS,CAAC,EAAE,CAAC;YAChD,MAAM,EAAE,YAAY,EAAE,GAAG,SAAS,CAAA;YAClC,IAAI,YAAY,IAAI,CAAC,uBAAuB,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;gBAClE,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;YACvC,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,qBAAqB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,WAAW,CACnB,2EAA2E;YACzE,qBAAqB;iBAClB,GAAG,CACF,CAAC,CAAC,EAAE,EAAE,CACJ,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,uBAAuB,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,CACrE;iBACA,IAAI,CAAC,IAAI,CAAC,CAChB,CAAA;I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M,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAA;IAErE,MAAM,0BAA0B,CAAC,IAAI,CAAC,CAAA;IAEtC,MAAM,oDAAoD,CACxD,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAC/B,CAAA;IACD,mBAAmB,CAAC,UAAU,CAAC,CAAA;IAC/B,6BAA6B,CAAC,UAAU,CAAC,CAAA;AAC3C,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CustomStackType } from "../stacks/stack.js";
|
|
2
|
+
import { BaseStackConfig } from "./stack-config.js";
|
|
3
|
+
export type CustomStackConfig = BaseStackConfig & {
|
|
4
|
+
readonly stackType: "custom";
|
|
5
|
+
readonly customType: CustomStackType;
|
|
6
|
+
readonly customConfig?: unknown;
|
|
7
|
+
};
|
|
8
|
+
export declare const isCustomStackConfig: (obj: BaseStackConfig) => obj is CustomStackConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"custom-stack-config.js","sourceRoot":"","sources":["../../src/config/custom-stack-config.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,GAAoB,EACM,EAAE,CAC5B,GAAG,KAAK,SAAS;IACjB,GAAG,KAAK,IAAI;IACZ,OAAO,GAAG,KAAK,QAAQ;IACvB,YAAY,IAAI,GAAG;IACnB,GAAG,CAAC,UAAU,KAAK,SAAS,CAAA"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StackName, StackParameterKey } from "../aws/cloudformation/model.js";
|
|
2
2
|
import { AccountId, Region, TagKey } from "../aws/common/model.js";
|
|
3
|
-
import {
|
|
3
|
+
import { TimeoutConfig, Vars } from "../common/model.js";
|
|
4
4
|
import { HookConfig } from "../hooks/hook.js";
|
|
5
|
-
import {
|
|
5
|
+
import { RawTagValue, StackPath } from "../stacks/stack.js";
|
|
6
6
|
import { CommandRole, Project } from "../takomo-core/command.js";
|
|
7
|
-
import { ParameterConfigs, SchemasConfig
|
|
8
|
-
|
|
7
|
+
import { ParameterConfigs, SchemasConfig } from "./common-config.js";
|
|
8
|
+
import { CustomStackConfig } from "./custom-stack-config.js";
|
|
9
|
+
import { StandardStackConfig } from "./standard-stack-config.js";
|
|
10
|
+
export interface BaseStackConfig {
|
|
11
|
+
readonly stackType: "custom" | "standard";
|
|
9
12
|
readonly project?: Project;
|
|
10
13
|
readonly name?: StackName;
|
|
11
|
-
readonly template?: TemplateConfig;
|
|
12
|
-
readonly templateBucket?: TemplateBucketConfig;
|
|
13
14
|
readonly regions: ReadonlyArray<Region>;
|
|
14
15
|
readonly accountIds?: ReadonlyArray<AccountId>;
|
|
15
16
|
readonly commandRole?: CommandRole;
|
|
@@ -20,12 +21,9 @@ export interface StackConfig {
|
|
|
20
21
|
readonly parameters: Map<StackParameterKey, ParameterConfigs>;
|
|
21
22
|
readonly data: Vars;
|
|
22
23
|
readonly hooks: ReadonlyArray<HookConfig>;
|
|
23
|
-
readonly capabilities?: ReadonlyArray<StackCapability>;
|
|
24
24
|
readonly ignore?: boolean;
|
|
25
25
|
readonly obsolete?: boolean;
|
|
26
26
|
readonly terminationProtection?: boolean;
|
|
27
|
-
readonly stackPolicy?: StackPolicyBody;
|
|
28
|
-
readonly stackPolicyDuringUpdate?: StackPolicyBody;
|
|
29
27
|
readonly schemas?: SchemasConfig;
|
|
30
|
-
readonly blueprint?: BlueprintPath;
|
|
31
28
|
}
|
|
29
|
+
export type StackConfig = CustomStackConfig | StandardStackConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StackCapability, StackPolicyBody } from "../aws/cloudformation/model.js";
|
|
2
|
+
import { TemplateBucketConfig } from "../common/model.js";
|
|
3
|
+
import { BlueprintPath } from "../stacks/standard-stack.js";
|
|
4
|
+
import { TemplateConfig } from "./common-config.js";
|
|
5
|
+
import { BaseStackConfig } from "./stack-config.js";
|
|
6
|
+
export type StandardStackConfig = BaseStackConfig & {
|
|
7
|
+
readonly stackType: "standard";
|
|
8
|
+
readonly template?: TemplateConfig;
|
|
9
|
+
readonly templateBucket?: TemplateBucketConfig;
|
|
10
|
+
readonly capabilities?: ReadonlyArray<StackCapability>;
|
|
11
|
+
readonly stackPolicy?: StackPolicyBody;
|
|
12
|
+
readonly stackPolicyDuringUpdate?: StackPolicyBody;
|
|
13
|
+
readonly blueprint?: BlueprintPath;
|
|
14
|
+
};
|
|
15
|
+
export declare const isStandardStackConfig: (config: BaseStackConfig) => config is StandardStackConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standard-stack-config.js","sourceRoot":"","sources":["../../src/config/standard-stack-config.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAY9D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,MAAuB,EACQ,EAAE,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { CredentialManager } from "../aws/common/credentials.js";
|
|
2
2
|
import { StackGroup, StackGroupPath } from "../stacks/stack-group.js";
|
|
3
|
-
import { InternalStack, Stack, StackPath } from "../stacks/stack.js";
|
|
4
3
|
import { TemplateEngine } from "../templating/template-engine.js";
|
|
5
4
|
import { CommandContext, InternalCommandContext } from "./command-context.js";
|
|
6
5
|
import { Cache } from "../caches/cache.js";
|
|
6
|
+
import { InternalStack, Stack, StackPath } from "../stacks/stack.js";
|
|
7
|
+
import { CustomStackHandlerRegistry } from "../custom-stacks/custom-stack-handler-registry.js";
|
|
7
8
|
/**
|
|
8
9
|
* Provides access to the current stack context and
|
|
9
10
|
* project configuration.
|
|
@@ -38,6 +39,7 @@ export interface InternalStacksContext extends InternalCommandContext {
|
|
|
38
39
|
readonly concurrentStacks: number;
|
|
39
40
|
readonly credentialManager: CredentialManager;
|
|
40
41
|
readonly templateEngine: TemplateEngine;
|
|
42
|
+
readonly customStackHandlerRegistry: CustomStackHandlerRegistry;
|
|
41
43
|
readonly rootStackGroup: StackGroup;
|
|
42
44
|
readonly stacks: ReadonlyArray<InternalStack>;
|
|
43
45
|
readonly getStackGroup: (stackGroupPath: StackGroupPath) => StackGroup | undefined;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CustomStackHandler, CustomStackState } from "./custom-stack-handler.js";
|
|
2
|
+
type Capture = "last-line" | "all";
|
|
3
|
+
type CommandString = string;
|
|
4
|
+
type CommandConfig = {
|
|
5
|
+
readonly command: CommandString;
|
|
6
|
+
readonly exposeStackCredentials?: boolean;
|
|
7
|
+
readonly exposeStackRegion?: boolean;
|
|
8
|
+
readonly cwd?: string;
|
|
9
|
+
readonly capture?: Capture;
|
|
10
|
+
};
|
|
11
|
+
type CmdCustomStackHandlerConfig = {
|
|
12
|
+
readonly createCommand: CommandConfig | CommandString;
|
|
13
|
+
readonly updateCommand: CommandConfig | CommandString;
|
|
14
|
+
readonly deleteCommand: CommandConfig | CommandString;
|
|
15
|
+
readonly getCurrentStateCommand: CommandConfig | CommandString;
|
|
16
|
+
readonly getChangesCommand: CommandConfig | CommandString;
|
|
17
|
+
readonly cwd?: string;
|
|
18
|
+
readonly exposeStackCredentials?: boolean;
|
|
19
|
+
readonly exposeStackRegion?: boolean;
|
|
20
|
+
readonly capture?: Capture;
|
|
21
|
+
};
|
|
22
|
+
type CmdCustomStackHandlerState = {} & CustomStackState;
|
|
23
|
+
export declare const createCmdCustomStackHandler: () => CustomStackHandler<CmdCustomStackHandlerConfig, CmdCustomStackHandlerState>;
|
|
24
|
+
export {};
|