aws-cdk 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +276 -0
- package/LICENSE +202 -0
- package/NOTICE +16 -0
- package/README.md +1274 -0
- package/THIRD_PARTY_LICENSES +26821 -0
- package/bin/cdk +6 -0
- package/build-info.json +4 -0
- package/db.json.gz +0 -0
- package/generate.sh +25 -0
- package/images/garbage-collection.png +0 -0
- package/lib/api/aws-auth/account-cache.d.ts +39 -0
- package/lib/api/aws-auth/account-cache.js +102 -0
- package/lib/api/aws-auth/awscli-compatible.d.ts +42 -0
- package/lib/api/aws-auth/awscli-compatible.js +264 -0
- package/lib/api/aws-auth/cached.d.ts +11 -0
- package/lib/api/aws-auth/cached.js +26 -0
- package/lib/api/aws-auth/credential-plugins.d.ts +36 -0
- package/lib/api/aws-auth/credential-plugins.js +153 -0
- package/lib/api/aws-auth/index.d.ts +3 -0
- package/lib/api/aws-auth/index.js +20 -0
- package/lib/api/aws-auth/provider-caching.d.ts +13 -0
- package/lib/api/aws-auth/provider-caching.js +24 -0
- package/lib/api/aws-auth/sdk-logger.d.ts +69 -0
- package/lib/api/aws-auth/sdk-logger.js +130 -0
- package/lib/api/aws-auth/sdk-provider.d.ts +207 -0
- package/lib/api/aws-auth/sdk-provider.js +359 -0
- package/lib/api/aws-auth/sdk.d.ts +223 -0
- package/lib/api/aws-auth/sdk.js +366 -0
- package/lib/api/aws-auth/tracing.d.ts +11 -0
- package/lib/api/aws-auth/tracing.js +61 -0
- package/lib/api/aws-auth/user-agent.d.ts +7 -0
- package/lib/api/aws-auth/user-agent.js +21 -0
- package/lib/api/aws-auth/util.d.ts +6 -0
- package/lib/api/aws-auth/util.js +23 -0
- package/lib/api/bootstrap/bootstrap-environment.d.ts +33 -0
- package/lib/api/bootstrap/bootstrap-environment.js +322 -0
- package/lib/api/bootstrap/bootstrap-props.d.ts +130 -0
- package/lib/api/bootstrap/bootstrap-props.js +14 -0
- package/lib/api/bootstrap/bootstrap-template.yaml +692 -0
- package/lib/api/bootstrap/deploy-bootstrap.d.ts +37 -0
- package/lib/api/bootstrap/deploy-bootstrap.js +143 -0
- package/lib/api/bootstrap/index.d.ts +2 -0
- package/lib/api/bootstrap/index.js +19 -0
- package/lib/api/bootstrap/legacy-template.d.ts +2 -0
- package/lib/api/bootstrap/legacy-template.js +82 -0
- package/lib/api/context.d.ts +40 -0
- package/lib/api/context.js +82 -0
- package/lib/api/cxapp/cloud-assembly.d.ts +150 -0
- package/lib/api/cxapp/cloud-assembly.js +305 -0
- package/lib/api/cxapp/cloud-executable.d.ts +44 -0
- package/lib/api/cxapp/cloud-executable.js +90 -0
- package/lib/api/cxapp/environments.d.ts +9 -0
- package/lib/api/cxapp/environments.js +66 -0
- package/lib/api/cxapp/exec.d.ts +56 -0
- package/lib/api/cxapp/exec.js +275 -0
- package/lib/api/deployments/asset-manifest-builder.d.ts +8 -0
- package/lib/api/deployments/asset-manifest-builder.js +35 -0
- package/lib/api/deployments/asset-publishing.d.ts +77 -0
- package/lib/api/deployments/asset-publishing.js +163 -0
- package/lib/api/deployments/assets.d.ts +10 -0
- package/lib/api/deployments/assets.js +111 -0
- package/lib/api/deployments/checks.d.ts +8 -0
- package/lib/api/deployments/checks.js +73 -0
- package/lib/api/deployments/cloudformation.d.ts +235 -0
- package/lib/api/deployments/cloudformation.js +598 -0
- package/lib/api/deployments/deploy-stack.d.ts +177 -0
- package/lib/api/deployments/deploy-stack.js +484 -0
- package/lib/api/deployments/deployment-method.d.ts +24 -0
- package/lib/api/deployments/deployment-method.js +3 -0
- package/lib/api/deployments/deployment-result.d.ts +21 -0
- package/lib/api/deployments/deployment-result.js +10 -0
- package/lib/api/deployments/deployments.d.ts +340 -0
- package/lib/api/deployments/deployments.js +369 -0
- package/lib/api/deployments/hotswap-deployments.d.ts +14 -0
- package/lib/api/deployments/hotswap-deployments.js +357 -0
- package/lib/api/deployments/index.d.ts +6 -0
- package/lib/api/deployments/index.js +23 -0
- package/lib/api/deployments/nested-stack-helpers.d.ts +25 -0
- package/lib/api/deployments/nested-stack-helpers.js +88 -0
- package/lib/api/environment-access.d.ts +138 -0
- package/lib/api/environment-access.js +203 -0
- package/lib/api/environment-resources.d.ts +73 -0
- package/lib/api/environment-resources.js +208 -0
- package/lib/api/evaluate-cloudformation-template.d.ts +84 -0
- package/lib/api/evaluate-cloudformation-template.js +443 -0
- package/lib/api/garbage-collection/garbage-collector.d.ts +152 -0
- package/lib/api/garbage-collection/garbage-collector.js +607 -0
- package/lib/api/garbage-collection/progress-printer.d.ts +21 -0
- package/lib/api/garbage-collection/progress-printer.js +69 -0
- package/lib/api/garbage-collection/stack-refresh.d.ts +44 -0
- package/lib/api/garbage-collection/stack-refresh.js +154 -0
- package/lib/api/hotswap/appsync-mapping-templates.d.ts +3 -0
- package/lib/api/hotswap/appsync-mapping-templates.js +157 -0
- package/lib/api/hotswap/code-build-projects.d.ts +3 -0
- package/lib/api/hotswap/code-build-projects.js +55 -0
- package/lib/api/hotswap/common.d.ts +126 -0
- package/lib/api/hotswap/common.js +170 -0
- package/lib/api/hotswap/ecs-services.d.ts +3 -0
- package/lib/api/hotswap/ecs-services.js +140 -0
- package/lib/api/hotswap/lambda-functions.d.ts +3 -0
- package/lib/api/hotswap/lambda-functions.js +309 -0
- package/lib/api/hotswap/s3-bucket-deployments.d.ts +9 -0
- package/lib/api/hotswap/s3-bucket-deployments.js +112 -0
- package/lib/api/hotswap/stepfunctions-state-machines.d.ts +3 -0
- package/lib/api/hotswap/stepfunctions-state-machines.js +42 -0
- package/lib/api/index.d.ts +5 -0
- package/lib/api/index.js +22 -0
- package/lib/api/logs/find-cloudwatch-logs.d.ts +24 -0
- package/lib/api/logs/find-cloudwatch-logs.js +97 -0
- package/lib/api/logs/logs-monitor.d.ts +53 -0
- package/lib/api/logs/logs-monitor.js +169 -0
- package/lib/api/plugin/context-provider-plugin.d.ts +6 -0
- package/lib/api/plugin/context-provider-plugin.js +7 -0
- package/lib/api/plugin/index.d.ts +3 -0
- package/lib/api/plugin/index.js +20 -0
- package/lib/api/plugin/mode.d.ts +4 -0
- package/lib/api/plugin/mode.js +9 -0
- package/lib/api/plugin/plugin.d.ts +63 -0
- package/lib/api/plugin/plugin.js +106 -0
- package/lib/api/settings.d.ts +29 -0
- package/lib/api/settings.js +141 -0
- package/lib/api/tags.d.ts +9 -0
- package/lib/api/tags.js +10 -0
- package/lib/api/toolkit-info.d.ts +51 -0
- package/lib/api/toolkit-info.js +156 -0
- package/lib/api/util/cloudformation/stack-activity-monitor.d.ts +237 -0
- package/lib/api/util/cloudformation/stack-activity-monitor.js +550 -0
- package/lib/api/util/cloudformation/stack-event-poller.d.ts +63 -0
- package/lib/api/util/cloudformation/stack-event-poller.js +129 -0
- package/lib/api/util/cloudformation/stack-status.d.ts +42 -0
- package/lib/api/util/cloudformation/stack-status.js +88 -0
- package/lib/api/util/display.d.ts +13 -0
- package/lib/api/util/display.js +80 -0
- package/lib/api/util/placeholders.d.ts +10 -0
- package/lib/api/util/placeholders.js +24 -0
- package/lib/api/util/rwlock.d.ts +65 -0
- package/lib/api/util/rwlock.js +179 -0
- package/lib/api/util/string-manipulation.d.ts +10 -0
- package/lib/api/util/string-manipulation.js +33 -0
- package/lib/api/util/template-body-parameter.d.ts +21 -0
- package/lib/api/util/template-body-parameter.js +104 -0
- package/lib/cli/cdk-toolkit.d.ts +594 -0
- package/lib/cli/cdk-toolkit.js +1019 -0
- package/lib/cli/cli-config.d.ts +10 -0
- package/lib/cli/cli-config.js +406 -0
- package/lib/cli/cli.d.ts +4 -0
- package/lib/cli/cli.js +538 -0
- package/lib/cli/convert-to-user-input.d.ts +3 -0
- package/lib/cli/convert-to-user-input.js +434 -0
- package/lib/cli/parse-command-line-arguments.d.ts +1 -0
- package/lib/cli/parse-command-line-arguments.js +806 -0
- package/lib/cli/platform-warnings.d.ts +2 -0
- package/lib/cli/platform-warnings.js +45 -0
- package/lib/cli/user-configuration.d.ts +90 -0
- package/lib/cli/user-configuration.js +272 -0
- package/lib/cli/user-input.d.ts +1163 -0
- package/lib/cli/user-input.js +3 -0
- package/lib/cli/util/console-formatters.d.ts +18 -0
- package/lib/cli/util/console-formatters.js +42 -0
- package/lib/cli/util/npm.d.ts +1 -0
- package/lib/cli/util/npm.js +22 -0
- package/lib/cli/util/yargs-helpers.d.ts +22 -0
- package/lib/cli/util/yargs-helpers.js +49 -0
- package/lib/cli/version.d.ts +13 -0
- package/lib/cli/version.js +120 -0
- package/lib/commands/context.d.ts +35 -0
- package/lib/commands/context.js +156 -0
- package/lib/commands/docs.d.ts +13 -0
- package/lib/commands/docs.js +32 -0
- package/lib/commands/doctor.d.ts +1 -0
- package/lib/commands/doctor.js +69 -0
- package/lib/commands/migrate.d.ts +327 -0
- package/lib/commands/migrate.js +804 -0
- package/lib/context-providers/ami.d.ts +11 -0
- package/lib/context-providers/ami.js +50 -0
- package/lib/context-providers/availability-zones.d.ts +11 -0
- package/lib/context-providers/availability-zones.js +27 -0
- package/lib/context-providers/endpoint-service-availability-zones.d.ts +11 -0
- package/lib/context-providers/endpoint-service-availability-zones.js +33 -0
- package/lib/context-providers/hosted-zones.d.ts +10 -0
- package/lib/context-providers/hosted-zones.js +67 -0
- package/lib/context-providers/index.d.ts +30 -0
- package/lib/context-providers/index.js +109 -0
- package/lib/context-providers/keys.d.ts +11 -0
- package/lib/context-providers/keys.js +52 -0
- package/lib/context-providers/load-balancers.d.ts +20 -0
- package/lib/context-providers/load-balancers.js +159 -0
- package/lib/context-providers/security-groups.d.ts +9 -0
- package/lib/context-providers/security-groups.js +70 -0
- package/lib/context-providers/ssm-parameters.d.ts +23 -0
- package/lib/context-providers/ssm-parameters.js +59 -0
- package/lib/context-providers/vpcs.d.ts +11 -0
- package/lib/context-providers/vpcs.js +288 -0
- package/lib/diff.d.ts +28 -0
- package/lib/diff.js +165 -0
- package/lib/import.d.ts +182 -0
- package/lib/import.js +335 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +348304 -0
- package/lib/index_bg.wasm +0 -0
- package/lib/init-hooks.d.ts +40 -0
- package/lib/init-hooks.js +64 -0
- package/lib/init-templates/.init-version.json +1 -0
- package/lib/init-templates/.no-packagejson-validator +0 -0
- package/lib/init-templates/.recommended-feature-flags.json +68 -0
- package/lib/init-templates/LICENSE +16 -0
- package/lib/init-templates/app/csharp/.template.gitignore +342 -0
- package/lib/init-templates/app/csharp/README.md +14 -0
- package/lib/init-templates/app/csharp/cdk.template.json +15 -0
- package/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj +20 -0
- package/lib/init-templates/app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs +13 -0
- package/lib/init-templates/app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs +1 -0
- package/lib/init-templates/app/csharp/src/%name.PascalCased%/Program.template.cs +44 -0
- package/lib/init-templates/app/csharp/src/%name.PascalCased%.template.sln +18 -0
- package/lib/init-templates/app/fsharp/.template.gitignore +342 -0
- package/lib/init-templates/app/fsharp/README.md +18 -0
- package/lib/init-templates/app/fsharp/cdk.template.json +14 -0
- package/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj +25 -0
- package/lib/init-templates/app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs +8 -0
- package/lib/init-templates/app/fsharp/src/%name.PascalCased%/Program.template.fs +11 -0
- package/lib/init-templates/app/fsharp/src/%name.PascalCased%.template.sln +18 -0
- package/lib/init-templates/app/go/%name%.template.go +70 -0
- package/lib/init-templates/app/go/%name%_test.template.go +26 -0
- package/lib/init-templates/app/go/.template.gitignore +19 -0
- package/lib/init-templates/app/go/README.md +12 -0
- package/lib/init-templates/app/go/cdk.template.json +13 -0
- package/lib/init-templates/app/go/go.template.mod +9 -0
- package/lib/init-templates/app/info.json +4 -0
- package/lib/init-templates/app/java/.template.gitignore +13 -0
- package/lib/init-templates/app/java/README.md +18 -0
- package/lib/init-templates/app/java/cdk.json +13 -0
- package/lib/init-templates/app/java/pom.xml +60 -0
- package/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java +42 -0
- package/lib/init-templates/app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java +24 -0
- package/lib/init-templates/app/java/src/test/java/com/myorg/%name.PascalCased%Test.template.java +26 -0
- package/lib/init-templates/app/javascript/.template.gitignore +5 -0
- package/lib/init-templates/app/javascript/.template.npmignore +3 -0
- package/lib/init-templates/app/javascript/README.md +12 -0
- package/lib/init-templates/app/javascript/bin/%name%.template.js +21 -0
- package/lib/init-templates/app/javascript/cdk.template.json +15 -0
- package/lib/init-templates/app/javascript/jest.config.js +3 -0
- package/lib/init-templates/app/javascript/lib/%name%-stack.template.js +23 -0
- package/lib/init-templates/app/javascript/package.json +20 -0
- package/lib/init-templates/app/javascript/test/%name%.test.template.js +17 -0
- package/lib/init-templates/app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py +19 -0
- package/lib/init-templates/app/python/%name.PythonModule%/__init__.py +0 -0
- package/lib/init-templates/app/python/.template.gitignore +10 -0
- package/lib/init-templates/app/python/README.template.md +58 -0
- package/lib/init-templates/app/python/app.template.py +28 -0
- package/lib/init-templates/app/python/cdk.template.json +15 -0
- package/lib/init-templates/app/python/requirements-dev.txt +1 -0
- package/lib/init-templates/app/python/requirements.txt +2 -0
- package/lib/init-templates/app/python/source.bat +13 -0
- package/lib/init-templates/app/python/tests/__init__.py +0 -0
- package/lib/init-templates/app/python/tests/unit/__init__.py +0 -0
- package/lib/init-templates/app/python/tests/unit/test_%name.PythonModule%_stack.template.py +15 -0
- package/lib/init-templates/app/typescript/.template.gitignore +8 -0
- package/lib/init-templates/app/typescript/.template.npmignore +6 -0
- package/lib/init-templates/app/typescript/README.md +14 -0
- package/lib/init-templates/app/typescript/bin/%name%.template.ts +20 -0
- package/lib/init-templates/app/typescript/cdk.template.json +17 -0
- package/lib/init-templates/app/typescript/jest.config.js +8 -0
- package/lib/init-templates/app/typescript/lib/%name%-stack.template.ts +16 -0
- package/lib/init-templates/app/typescript/package.json +26 -0
- package/lib/init-templates/app/typescript/test/%name%.test.template.ts +17 -0
- package/lib/init-templates/app/typescript/tsconfig.json +31 -0
- package/lib/init-templates/lib/info.json +4 -0
- package/lib/init-templates/lib/typescript/.template.gitignore +8 -0
- package/lib/init-templates/lib/typescript/.template.npmignore +6 -0
- package/lib/init-templates/lib/typescript/README.template.md +12 -0
- package/lib/init-templates/lib/typescript/jest.config.js +8 -0
- package/lib/init-templates/lib/typescript/lib/index.template.ts +21 -0
- package/lib/init-templates/lib/typescript/package.json +24 -0
- package/lib/init-templates/lib/typescript/test/%name%.test.template.ts +18 -0
- package/lib/init-templates/lib/typescript/tsconfig.json +31 -0
- package/lib/init-templates/sample-app/csharp/.template.gitignore +342 -0
- package/lib/init-templates/sample-app/csharp/README.template.md +19 -0
- package/lib/init-templates/sample-app/csharp/cdk.template.json +15 -0
- package/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%.template.csproj +20 -0
- package/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.cs +24 -0
- package/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/GlobalSuppressions.cs +1 -0
- package/lib/init-templates/sample-app/csharp/src/%name.PascalCased%/Program.template.cs +15 -0
- package/lib/init-templates/sample-app/csharp/src/%name.PascalCased%.template.sln +18 -0
- package/lib/init-templates/sample-app/fsharp/.template.gitignore +342 -0
- package/lib/init-templates/sample-app/fsharp/README.template.md +20 -0
- package/lib/init-templates/sample-app/fsharp/cdk.template.json +14 -0
- package/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%.template.fsproj +25 -0
- package/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/%name.PascalCased%Stack.template.fs +14 -0
- package/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%/Program.template.fs +11 -0
- package/lib/init-templates/sample-app/fsharp/src/%name.PascalCased%.template.sln +18 -0
- package/lib/init-templates/sample-app/go/%name%.template.go +73 -0
- package/lib/init-templates/sample-app/go/%name%_test.template.go +25 -0
- package/lib/init-templates/sample-app/go/.template.gitignore +19 -0
- package/lib/init-templates/sample-app/go/README.md +12 -0
- package/lib/init-templates/sample-app/go/cdk.template.json +13 -0
- package/lib/init-templates/sample-app/go/go.template.mod +9 -0
- package/lib/init-templates/sample-app/info.json +4 -0
- package/lib/init-templates/sample-app/java/.template.gitignore +13 -0
- package/lib/init-templates/sample-app/java/README.template.md +19 -0
- package/lib/init-templates/sample-app/java/cdk.json +13 -0
- package/lib/init-templates/sample-app/java/pom.xml +55 -0
- package/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%App.template.java +13 -0
- package/lib/init-templates/sample-app/java/src/main/java/com/myorg/%name.PascalCased%Stack.template.java +29 -0
- package/lib/init-templates/sample-app/java/src/test/java/com/myorg/%name.PascalCased%StackTest.template.java +27 -0
- package/lib/init-templates/sample-app/javascript/.template.gitignore +5 -0
- package/lib/init-templates/sample-app/javascript/.template.npmignore +3 -0
- package/lib/init-templates/sample-app/javascript/README.template.md +13 -0
- package/lib/init-templates/sample-app/javascript/bin/%name%.template.js +6 -0
- package/lib/init-templates/sample-app/javascript/cdk.template.json +15 -0
- package/lib/init-templates/sample-app/javascript/jest.config.js +3 -0
- package/lib/init-templates/sample-app/javascript/lib/%name%-stack.template.js +25 -0
- package/lib/init-templates/sample-app/javascript/package.json +20 -0
- package/lib/init-templates/sample-app/javascript/test/%name%.test.template.js +16 -0
- package/lib/init-templates/sample-app/javascript/tsconfig.json +34 -0
- package/lib/init-templates/sample-app/python/%name.PythonModule%/%name.PythonModule%_stack.template.py +26 -0
- package/lib/init-templates/sample-app/python/%name.PythonModule%/__init__.py +0 -0
- package/lib/init-templates/sample-app/python/.template.gitignore +22 -0
- package/lib/init-templates/sample-app/python/README.template.md +65 -0
- package/lib/init-templates/sample-app/python/app.template.py +11 -0
- package/lib/init-templates/sample-app/python/cdk.template.json +15 -0
- package/lib/init-templates/sample-app/python/requirements-dev.txt +1 -0
- package/lib/init-templates/sample-app/python/requirements.txt +2 -0
- package/lib/init-templates/sample-app/python/source.bat +13 -0
- package/lib/init-templates/sample-app/python/tests/__init__.py +0 -0
- package/lib/init-templates/sample-app/python/tests/unit/__init__.py +0 -0
- package/lib/init-templates/sample-app/python/tests/unit/test_%name.PythonModule%_stack.template.py +21 -0
- package/lib/init-templates/sample-app/typescript/.template.gitignore +8 -0
- package/lib/init-templates/sample-app/typescript/.template.npmignore +6 -0
- package/lib/init-templates/sample-app/typescript/README.template.md +15 -0
- package/lib/init-templates/sample-app/typescript/bin/%name%.template.ts +6 -0
- package/lib/init-templates/sample-app/typescript/cdk.template.json +17 -0
- package/lib/init-templates/sample-app/typescript/jest.config.js +8 -0
- package/lib/init-templates/sample-app/typescript/lib/%name%-stack.template.ts +19 -0
- package/lib/init-templates/sample-app/typescript/package.json +26 -0
- package/lib/init-templates/sample-app/typescript/test/%name%.test.template.ts +17 -0
- package/lib/init-templates/sample-app/typescript/tsconfig.json +31 -0
- package/lib/init.d.ts +52 -0
- package/lib/init.js +430 -0
- package/lib/legacy-exports-source.d.ts +27 -0
- package/lib/legacy-exports-source.js +88 -0
- package/lib/legacy-exports.d.ts +10 -0
- package/lib/legacy-exports.js +28 -0
- package/lib/legacy-logging-source.d.ts +32 -0
- package/lib/legacy-logging-source.js +107 -0
- package/lib/list-stacks.d.ts +22 -0
- package/lib/list-stacks.js +23 -0
- package/lib/logging.d.ts +109 -0
- package/lib/logging.js +159 -0
- package/lib/migrator.d.ts +25 -0
- package/lib/migrator.js +67 -0
- package/lib/notices.d.ts +156 -0
- package/lib/notices.js +373 -0
- package/lib/os.d.ts +7 -0
- package/lib/os.js +92 -0
- package/lib/serialize.d.ts +27 -0
- package/lib/serialize.js +86 -0
- package/lib/toolkit/cli-io-host.d.ts +208 -0
- package/lib/toolkit/cli-io-host.js +282 -0
- package/lib/toolkit/error.d.ts +44 -0
- package/lib/toolkit/error.js +78 -0
- package/lib/tree.d.ts +31 -0
- package/lib/tree.js +40 -0
- package/lib/util/archive.d.ts +1 -0
- package/lib/util/archive.js +86 -0
- package/lib/util/arrays.d.ts +14 -0
- package/lib/util/arrays.js +36 -0
- package/lib/util/bool.d.ts +7 -0
- package/lib/util/bool.js +13 -0
- package/lib/util/bytes.d.ts +8 -0
- package/lib/util/bytes.js +21 -0
- package/lib/util/content-hash.d.ts +5 -0
- package/lib/util/content-hash.js +43 -0
- package/lib/util/directories.d.ts +23 -0
- package/lib/util/directories.js +57 -0
- package/lib/util/error.d.ts +9 -0
- package/lib/util/error.js +22 -0
- package/lib/util/index.d.ts +5 -0
- package/lib/util/index.js +22 -0
- package/lib/util/objects.d.ts +52 -0
- package/lib/util/objects.js +183 -0
- package/lib/util/parallel.d.ts +6 -0
- package/lib/util/parallel.js +44 -0
- package/lib/util/tables.d.ts +1 -0
- package/lib/util/tables.js +10 -0
- package/lib/util/type-brands.d.ts +39 -0
- package/lib/util/type-brands.js +38 -0
- package/lib/util/types.d.ts +27 -0
- package/lib/util/types.js +25 -0
- package/lib/util/validate-notification-arn.d.ts +4 -0
- package/lib/util/validate-notification-arn.js +10 -0
- package/lib/util/version-range.d.ts +2 -0
- package/lib/util/version-range.js +36 -0
- package/lib/util/work-graph-builder.d.ts +32 -0
- package/lib/util/work-graph-builder.js +167 -0
- package/lib/util/work-graph-types.d.ts +50 -0
- package/lib/util/work-graph-types.js +14 -0
- package/lib/util/work-graph.d.ts +70 -0
- package/lib/util/work-graph.js +344 -0
- package/lib/util/yaml-cfn.d.ts +15 -0
- package/lib/util/yaml-cfn.js +56 -0
- package/package.json +197 -0
- package/scripts/user-input-gen +2 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import * as cxapi from '@aws-cdk/cx-api';
|
|
2
|
+
import { type DescribeChangeSetCommandOutput, type Parameter, type ResourceIdentifierSummary, type ResourceToImport, type Stack, type Tag } from '@aws-sdk/client-cloudformation';
|
|
3
|
+
import type { ICloudFormationClient, SdkProvider } from '../aws-auth';
|
|
4
|
+
import type { Deployments } from './deployments';
|
|
5
|
+
import { StackStatus } from '../util/cloudformation/stack-status';
|
|
6
|
+
import { TemplateBodyParameter } from '../util/template-body-parameter';
|
|
7
|
+
export type ResourcesToImport = ResourceToImport[];
|
|
8
|
+
export type ResourceIdentifierSummaries = ResourceIdentifierSummary[];
|
|
9
|
+
export type ResourceIdentifierProperties = Record<string, string>;
|
|
10
|
+
export type Template = {
|
|
11
|
+
Parameters?: Record<string, TemplateParameter>;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
interface TemplateParameter {
|
|
15
|
+
Type: string;
|
|
16
|
+
Default?: any;
|
|
17
|
+
Description?: string;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Represents an (existing) Stack in CloudFormation
|
|
22
|
+
*
|
|
23
|
+
* Bundle and cache some information that we need during deployment (so we don't have to make
|
|
24
|
+
* repeated calls to CloudFormation).
|
|
25
|
+
*/
|
|
26
|
+
export declare class CloudFormationStack {
|
|
27
|
+
private readonly cfn;
|
|
28
|
+
readonly stackName: string;
|
|
29
|
+
private readonly stack?;
|
|
30
|
+
private readonly retrieveProcessedTemplate;
|
|
31
|
+
static lookup(cfn: ICloudFormationClient, stackName: string, retrieveProcessedTemplate?: boolean): Promise<CloudFormationStack>;
|
|
32
|
+
/**
|
|
33
|
+
* Return a copy of the given stack that does not exist
|
|
34
|
+
*
|
|
35
|
+
* It's a little silly that it needs arguments to do that, but there we go.
|
|
36
|
+
*/
|
|
37
|
+
static doesNotExist(cfn: ICloudFormationClient, stackName: string): CloudFormationStack;
|
|
38
|
+
/**
|
|
39
|
+
* From static information (for testing)
|
|
40
|
+
*/
|
|
41
|
+
static fromStaticInformation(cfn: ICloudFormationClient, stackName: string, stack: Stack): CloudFormationStack;
|
|
42
|
+
private _template;
|
|
43
|
+
protected constructor(cfn: ICloudFormationClient, stackName: string, stack?: Stack | undefined, retrieveProcessedTemplate?: boolean);
|
|
44
|
+
/**
|
|
45
|
+
* Retrieve the stack's deployed template
|
|
46
|
+
*
|
|
47
|
+
* Cached, so will only be retrieved once. Will return an empty
|
|
48
|
+
* structure if the stack does not exist.
|
|
49
|
+
*/
|
|
50
|
+
template(): Promise<Template>;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the stack exists
|
|
53
|
+
*/
|
|
54
|
+
get exists(): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* The stack's ID
|
|
57
|
+
*
|
|
58
|
+
* Throws if the stack doesn't exist.
|
|
59
|
+
*/
|
|
60
|
+
get stackId(): string;
|
|
61
|
+
/**
|
|
62
|
+
* The stack's current outputs
|
|
63
|
+
*
|
|
64
|
+
* Empty object if the stack doesn't exist
|
|
65
|
+
*/
|
|
66
|
+
get outputs(): Record<string, string>;
|
|
67
|
+
/**
|
|
68
|
+
* The stack's status
|
|
69
|
+
*
|
|
70
|
+
* Special status NOT_FOUND if the stack does not exist.
|
|
71
|
+
*/
|
|
72
|
+
get stackStatus(): StackStatus;
|
|
73
|
+
/**
|
|
74
|
+
* The stack's current tags
|
|
75
|
+
*
|
|
76
|
+
* Empty list if the stack does not exist
|
|
77
|
+
*/
|
|
78
|
+
get tags(): Tag[];
|
|
79
|
+
/**
|
|
80
|
+
* SNS Topic ARNs that will receive stack events.
|
|
81
|
+
*
|
|
82
|
+
* Empty list if the stack does not exist
|
|
83
|
+
*/
|
|
84
|
+
get notificationArns(): string[];
|
|
85
|
+
/**
|
|
86
|
+
* Return the names of all current parameters to the stack
|
|
87
|
+
*
|
|
88
|
+
* Empty list if the stack does not exist.
|
|
89
|
+
*/
|
|
90
|
+
get parameterNames(): string[];
|
|
91
|
+
/**
|
|
92
|
+
* Return the names and values of all current parameters to the stack
|
|
93
|
+
*
|
|
94
|
+
* Empty object if the stack does not exist.
|
|
95
|
+
*/
|
|
96
|
+
get parameters(): Record<string, string>;
|
|
97
|
+
/**
|
|
98
|
+
* Return the termination protection of the stack
|
|
99
|
+
*/
|
|
100
|
+
get terminationProtection(): boolean | undefined;
|
|
101
|
+
private assertExists;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Waits for a ChangeSet to be available for triggering a StackUpdate.
|
|
105
|
+
*
|
|
106
|
+
* Will return a changeset that is either ready to be executed or has no changes.
|
|
107
|
+
* Will throw in other cases.
|
|
108
|
+
*
|
|
109
|
+
* @param cfn a CloudFormation client
|
|
110
|
+
* @param stackName the name of the Stack that the ChangeSet belongs to
|
|
111
|
+
* @param changeSetName the name of the ChangeSet
|
|
112
|
+
* @param fetchAll if true, fetches all pages of the ChangeSet before returning.
|
|
113
|
+
*
|
|
114
|
+
* @returns the CloudFormation description of the ChangeSet
|
|
115
|
+
*/
|
|
116
|
+
export declare function waitForChangeSet(cfn: ICloudFormationClient, stackName: string, changeSetName: string, { fetchAll }: {
|
|
117
|
+
fetchAll: boolean;
|
|
118
|
+
}): Promise<DescribeChangeSetCommandOutput>;
|
|
119
|
+
export type PrepareChangeSetOptions = {
|
|
120
|
+
stack: cxapi.CloudFormationStackArtifact;
|
|
121
|
+
deployments: Deployments;
|
|
122
|
+
uuid: string;
|
|
123
|
+
willExecute: boolean;
|
|
124
|
+
sdkProvider: SdkProvider;
|
|
125
|
+
stream: NodeJS.WritableStream;
|
|
126
|
+
parameters: {
|
|
127
|
+
[name: string]: string | undefined;
|
|
128
|
+
};
|
|
129
|
+
resourcesToImport?: ResourcesToImport;
|
|
130
|
+
};
|
|
131
|
+
export type CreateChangeSetOptions = {
|
|
132
|
+
cfn: ICloudFormationClient;
|
|
133
|
+
changeSetName: string;
|
|
134
|
+
willExecute: boolean;
|
|
135
|
+
exists: boolean;
|
|
136
|
+
uuid: string;
|
|
137
|
+
stack: cxapi.CloudFormationStackArtifact;
|
|
138
|
+
bodyParameter: TemplateBodyParameter;
|
|
139
|
+
parameters: {
|
|
140
|
+
[name: string]: string | undefined;
|
|
141
|
+
};
|
|
142
|
+
resourcesToImport?: ResourceToImport[];
|
|
143
|
+
role?: string;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Create a changeset for a diff operation
|
|
147
|
+
*/
|
|
148
|
+
export declare function createDiffChangeSet(options: PrepareChangeSetOptions): Promise<DescribeChangeSetCommandOutput | undefined>;
|
|
149
|
+
/**
|
|
150
|
+
* Uploads the assets that look like templates for this CloudFormation stack
|
|
151
|
+
*
|
|
152
|
+
* This is necessary for any CloudFormation call that needs the template, it may need
|
|
153
|
+
* to be uploaded to an S3 bucket first. We have to follow the instructions in the
|
|
154
|
+
* asset manifest, because technically that is the only place that knows about
|
|
155
|
+
* bucket and assumed roles and such.
|
|
156
|
+
*/
|
|
157
|
+
export declare function uploadStackTemplateAssets(stack: cxapi.CloudFormationStackArtifact, deployments: Deployments): Promise<void>;
|
|
158
|
+
export declare function createChangeSet(options: CreateChangeSetOptions): Promise<DescribeChangeSetCommandOutput>;
|
|
159
|
+
export declare function cleanupOldChangeset(changeSetName: string, stackName: string, cfn: ICloudFormationClient): Promise<void>;
|
|
160
|
+
/**
|
|
161
|
+
* Return true if the given change set has no changes
|
|
162
|
+
*
|
|
163
|
+
* This must be determined from the status, not the 'Changes' array on the
|
|
164
|
+
* object; the latter can be empty because no resources were changed, but if
|
|
165
|
+
* there are changes to Outputs, the change set can still be executed.
|
|
166
|
+
*/
|
|
167
|
+
export declare function changeSetHasNoChanges(description: DescribeChangeSetCommandOutput): boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Waits for a CloudFormation stack to stabilize in a complete/available state
|
|
170
|
+
* after a delete operation is issued.
|
|
171
|
+
*
|
|
172
|
+
* Fails if the stack is in a FAILED state. Will not fail if the stack was
|
|
173
|
+
* already deleted.
|
|
174
|
+
*
|
|
175
|
+
* @param cfn a CloudFormation client
|
|
176
|
+
* @param stackName the name of the stack to wait for after a delete
|
|
177
|
+
*
|
|
178
|
+
* @returns the CloudFormation description of the stabilized stack after the delete attempt
|
|
179
|
+
*/
|
|
180
|
+
export declare function waitForStackDelete(cfn: ICloudFormationClient, stackName: string): Promise<CloudFormationStack | undefined>;
|
|
181
|
+
/**
|
|
182
|
+
* Waits for a CloudFormation stack to stabilize in a complete/available state
|
|
183
|
+
* after an update/create operation is issued.
|
|
184
|
+
*
|
|
185
|
+
* Fails if the stack is in a FAILED state, ROLLBACK state, or DELETED state.
|
|
186
|
+
*
|
|
187
|
+
* @param cfn a CloudFormation client
|
|
188
|
+
* @param stackName the name of the stack to wait for after an update
|
|
189
|
+
*
|
|
190
|
+
* @returns the CloudFormation description of the stabilized stack after the update attempt
|
|
191
|
+
*/
|
|
192
|
+
export declare function waitForStackDeploy(cfn: ICloudFormationClient, stackName: string): Promise<CloudFormationStack | undefined>;
|
|
193
|
+
/**
|
|
194
|
+
* Wait for a stack to become stable (no longer _IN_PROGRESS), returning it
|
|
195
|
+
*/
|
|
196
|
+
export declare function stabilizeStack(cfn: ICloudFormationClient, stackName: string): Promise<CloudFormationStack | undefined>;
|
|
197
|
+
/**
|
|
198
|
+
* The set of (formal) parameters that have been declared in a template
|
|
199
|
+
*/
|
|
200
|
+
export declare class TemplateParameters {
|
|
201
|
+
private readonly params;
|
|
202
|
+
static fromTemplate(template: Template): TemplateParameters;
|
|
203
|
+
constructor(params: Record<string, TemplateParameter>);
|
|
204
|
+
/**
|
|
205
|
+
* Calculate stack parameters to pass from the given desired parameter values
|
|
206
|
+
*
|
|
207
|
+
* Will throw if parameters without a Default value or a Previous value are not
|
|
208
|
+
* supplied.
|
|
209
|
+
*/
|
|
210
|
+
supplyAll(updates: Record<string, string | undefined>): ParameterValues;
|
|
211
|
+
/**
|
|
212
|
+
* From the template, the given desired values and the current values, calculate the changes to the stack parameters
|
|
213
|
+
*
|
|
214
|
+
* Will take into account parameters already set on the template (will emit
|
|
215
|
+
* 'UsePreviousValue: true' for those unless the value is changed), and will
|
|
216
|
+
* throw if parameters without a Default value or a Previous value are not
|
|
217
|
+
* supplied.
|
|
218
|
+
*/
|
|
219
|
+
updateExisting(updates: Record<string, string | undefined>, previousValues: Record<string, string>): ParameterValues;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* The set of parameters we're going to pass to a Stack
|
|
223
|
+
*/
|
|
224
|
+
export declare class ParameterValues {
|
|
225
|
+
private readonly formalParams;
|
|
226
|
+
readonly values: Record<string, string>;
|
|
227
|
+
readonly apiParameters: Parameter[];
|
|
228
|
+
constructor(formalParams: Record<string, TemplateParameter>, updates: Record<string, string | undefined>, previousValues?: Record<string, string>);
|
|
229
|
+
/**
|
|
230
|
+
* Whether this set of parameter updates will change the actual stack values
|
|
231
|
+
*/
|
|
232
|
+
hasChanges(currentValues: Record<string, string>): ParameterChanges;
|
|
233
|
+
}
|
|
234
|
+
export type ParameterChanges = boolean | 'ssm';
|
|
235
|
+
export {};
|