@aws-amplify/cli-internal-gen2-migration-experimental-alpha 0.6.0 → 0.7.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/CHANGELOG.md +16 -0
- package/adr/001-refactor-gen2-migration-generate.md +413 -0
- package/adr/002-refactor-gen2-migration-refactor.md +593 -0
- package/adr/003-gen2-migration-assess.md +414 -0
- package/adr/004-gen2-migration-validation-modeling.md +336 -0
- package/aws-amplify-cli-internal-gen2-migration-experimental-alpha-0.7.0.tgz +0 -0
- package/bin/amplify +1 -1
- package/lib/commands/drift-detection/detect-local-drift.d.ts +1 -2
- package/lib/commands/drift-detection/detect-local-drift.d.ts.map +1 -1
- package/lib/commands/drift-detection/detect-local-drift.js +19 -6
- package/lib/commands/drift-detection/detect-local-drift.js.map +1 -1
- package/lib/commands/drift-detection/detect-stack-drift.d.ts +20 -9
- package/lib/commands/drift-detection/detect-stack-drift.d.ts.map +1 -1
- package/lib/commands/drift-detection/detect-stack-drift.js +121 -151
- package/lib/commands/drift-detection/detect-stack-drift.js.map +1 -1
- package/lib/commands/drift-detection/detect-template-drift.d.ts +8 -21
- package/lib/commands/drift-detection/detect-template-drift.d.ts.map +1 -1
- package/lib/commands/drift-detection/detect-template-drift.js +81 -89
- package/lib/commands/drift-detection/detect-template-drift.js.map +1 -1
- package/lib/commands/drift-detection/index.d.ts +2 -3
- package/lib/commands/drift-detection/index.d.ts.map +1 -1
- package/lib/commands/drift-detection/index.js +1 -3
- package/lib/commands/drift-detection/index.js.map +1 -1
- package/lib/commands/drift-detection/services/amplify-config-service.d.ts +0 -1
- package/lib/commands/drift-detection/services/amplify-config-service.d.ts.map +1 -1
- package/lib/commands/drift-detection/services/amplify-config-service.js +0 -16
- package/lib/commands/drift-detection/services/amplify-config-service.js.map +1 -1
- package/lib/commands/drift-detection/services/cloudformation-service.d.ts +2 -4
- package/lib/commands/drift-detection/services/cloudformation-service.d.ts.map +1 -1
- package/lib/commands/drift-detection/services/cloudformation-service.js +7 -11
- package/lib/commands/drift-detection/services/cloudformation-service.js.map +1 -1
- package/lib/commands/drift-detection/services/drift-formatter.d.ts +3 -70
- package/lib/commands/drift-detection/services/drift-formatter.d.ts.map +1 -1
- package/lib/commands/drift-detection/services/drift-formatter.js +148 -603
- package/lib/commands/drift-detection/services/drift-formatter.js.map +1 -1
- package/lib/commands/drift-detection/services/index.d.ts +1 -2
- package/lib/commands/drift-detection/services/index.d.ts.map +1 -1
- package/lib/commands/drift-detection/services/index.js +2 -4
- package/lib/commands/drift-detection/services/index.js.map +1 -1
- package/lib/commands/drift.d.ts +7 -18
- package/lib/commands/drift.d.ts.map +1 -1
- package/lib/commands/drift.js +71 -172
- package/lib/commands/drift.js.map +1 -1
- package/lib/commands/gen2-migration/_infra/aws-clients.d.ts +31 -0
- package/lib/commands/gen2-migration/_infra/aws-clients.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/aws-clients.js +64 -0
- package/lib/commands/gen2-migration/_infra/aws-clients.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/categories.d.ts +2 -0
- package/lib/commands/gen2-migration/_infra/categories.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/categories.js +32 -0
- package/lib/commands/gen2-migration/_infra/categories.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/cfn-template.d.ts +52 -0
- package/lib/commands/gen2-migration/_infra/cfn-template.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/cfn-template.js +21 -0
- package/lib/commands/gen2-migration/_infra/cfn-template.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/operation.d.ts +16 -0
- package/lib/commands/gen2-migration/_infra/operation.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/operation.js +3 -0
- package/lib/commands/gen2-migration/_infra/operation.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/plan.d.ts +21 -0
- package/lib/commands/gen2-migration/_infra/plan.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/plan.js +111 -0
- package/lib/commands/gen2-migration/_infra/plan.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/planner.d.ts +5 -0
- package/lib/commands/gen2-migration/_infra/planner.d.ts.map +1 -0
- package/lib/commands/gen2-migration/{generate/custom-resources/types.js → _infra/planner.js} +1 -1
- package/lib/commands/gen2-migration/_infra/planner.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/spinning-logger.d.ts +25 -0
- package/lib/commands/gen2-migration/_infra/spinning-logger.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/spinning-logger.js +115 -0
- package/lib/commands/gen2-migration/_infra/spinning-logger.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/stateful-resources.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/stateful-resources.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/step.d.ts +15 -0
- package/lib/commands/gen2-migration/_infra/step.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/step.js +13 -0
- package/lib/commands/gen2-migration/_infra/step.js.map +1 -0
- package/lib/commands/gen2-migration/{_validations.d.ts → _infra/validations.d.ts} +6 -7
- package/lib/commands/gen2-migration/_infra/validations.d.ts.map +1 -0
- package/lib/commands/gen2-migration/{_validations.js → _infra/validations.js} +24 -60
- package/lib/commands/gen2-migration/_infra/validations.js.map +1 -0
- package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.js +15 -0
- package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/api/data.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/api/data.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/api/data.assessor.js +25 -0
- package/lib/commands/gen2-migration/assess/api/data.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/api/rest-api.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/api/rest-api.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/api/rest-api.assessor.js +25 -0
- package/lib/commands/gen2-migration/assess/api/rest-api.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/assessment.d.ts +42 -0
- package/lib/commands/gen2-migration/assess/assessment.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/assessment.js +118 -0
- package/lib/commands/gen2-migration/assess/assessment.js.map +1 -0
- package/lib/commands/gen2-migration/assess/assessor.d.ts +5 -0
- package/lib/commands/gen2-migration/assess/assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/{generate/types.js → assess/assessor.js} +1 -1
- package/lib/commands/gen2-migration/assess/assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.js +30 -0
- package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.js +24 -0
- package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/function/function.assessor.d.ts +12 -0
- package/lib/commands/gen2-migration/assess/function/function.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/function/function.assessor.js +40 -0
- package/lib/commands/gen2-migration/assess/function/function.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.js +19 -0
- package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.js +15 -0
- package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.js +15 -0
- package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.js +25 -0
- package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/storage/s3.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/storage/s3.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/storage/s3.assessor.js +25 -0
- package/lib/commands/gen2-migration/assess/storage/s3.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess.d.ts +9 -0
- package/lib/commands/gen2-migration/assess.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess.js +80 -0
- package/lib/commands/gen2-migration/assess.js.map +1 -0
- package/lib/commands/gen2-migration/decommission.d.ts +6 -5
- package/lib/commands/gen2-migration/decommission.d.ts.map +1 -1
- package/lib/commands/gen2-migration/decommission.js +82 -25
- package/lib/commands/gen2-migration/decommission.js.map +1 -1
- package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.d.ts +32 -0
- package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.js +136 -0
- package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.js.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/files.d.ts +2 -0
- package/lib/commands/gen2-migration/generate/_infra/files.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/{codegen-head/directory_exists.js → _infra/files.js} +4 -5
- package/lib/commands/gen2-migration/generate/_infra/files.js.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/gen1-app.d.ts +40 -0
- package/lib/commands/gen2-migration/generate/_infra/gen1-app.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/gen1-app.js +198 -0
- package/lib/commands/gen2-migration/generate/_infra/gen1-app.js.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/ts.d.ts +24 -0
- package/lib/commands/gen2-migration/generate/_infra/ts.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/ts.js +128 -0
- package/lib/commands/gen2-migration/generate/_infra/ts.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.d.ts +18 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.js +126 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.d.ts +33 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/{unsupported/cdk-from-cfn.js → amplify/analytics/kinesis-cfn-converter.js} +94 -52
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.d.ts +14 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.js +69 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.d.ts +18 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.js +68 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.d.ts +24 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.js +233 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.d.ts +78 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.js +491 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.d.ts +15 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.js +75 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.d.ts +13 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.js +33 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/backend.generator.d.ts +22 -0
- package/lib/commands/gen2-migration/generate/amplify/backend.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/backend.generator.js +150 -0
- package/lib/commands/gen2-migration/generate/amplify/backend.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/{custom-resources/transformer → amplify/custom-resources}/amplify-helper-transformer.d.ts +4 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.js +333 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.d.ts +17 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.js +190 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.generator.d.ts +15 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.generator.js +112 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.d.ts +22 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.js +167 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.generator.d.ts +49 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.generator.js +626 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.d.ts +21 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.js +105 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.d.ts +49 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.js +239 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.d.ts +14 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.js +70 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.d.ts +13 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.js +161 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/package.json.generator.d.ts +8 -0
- package/lib/commands/gen2-migration/generate/amplify/package.json.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/package.json.generator.js +28 -0
- package/lib/commands/gen2-migration/generate/amplify/package.json.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.d.ts +15 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.js +162 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.d.ts +51 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.js +269 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.d.ts +14 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.js +96 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.d.ts +30 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.js +90 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.d.ts +22 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.js +132 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.d.ts +31 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.js +137 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.d.ts +8 -0
- package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.js +45 -0
- package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify.yml.generator.d.ts +9 -0
- package/lib/commands/gen2-migration/generate/amplify.yml.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify.yml.generator.js +112 -0
- package/lib/commands/gen2-migration/generate/amplify.yml.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/gitignore.generator.d.ts +6 -0
- package/lib/commands/gen2-migration/generate/gitignore.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/gitignore.generator.js +45 -0
- package/lib/commands/gen2-migration/generate/gitignore.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/package.json.generator.d.ts +12 -0
- package/lib/commands/gen2-migration/generate/package.json.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/package.json.generator.js +83 -0
- package/lib/commands/gen2-migration/generate/package.json.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate.d.ts +6 -5
- package/lib/commands/gen2-migration/generate.d.ts.map +1 -1
- package/lib/commands/gen2-migration/generate.js +232 -17
- package/lib/commands/gen2-migration/generate.js.map +1 -1
- package/lib/commands/gen2-migration/lock.d.ts +10 -6
- package/lib/commands/gen2-migration/lock.d.ts.map +1 -1
- package/lib/commands/gen2-migration/lock.js +182 -64
- package/lib/commands/gen2-migration/lock.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.js +19 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.js +26 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.d.ts +21 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.js +87 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.js +44 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.d.ts +11 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.js +33 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.js +26 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/cfn.d.ts +41 -0
- package/lib/commands/gen2-migration/refactor/cfn.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/cfn.js +337 -0
- package/lib/commands/gen2-migration/refactor/cfn.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/index.d.ts +1 -1
- package/lib/commands/gen2-migration/refactor/index.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/index.js +1 -1
- package/lib/commands/gen2-migration/refactor/index.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.d.ts +23 -11
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.js +53 -45
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.d.ts +2 -11
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.js +89 -123
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.d.ts +2 -7
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.js +6 -22
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.d.ts +8 -12
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.js +105 -127
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.d.ts +2 -8
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.js +36 -41
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.d.ts +3 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.js +18 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/stack-facade.d.ts +13 -0
- package/lib/commands/gen2-migration/refactor/stack-facade.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/stack-facade.js +39 -0
- package/lib/commands/gen2-migration/refactor/stack-facade.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.d.ts +8 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.js +18 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.js +26 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-forward.d.ts +10 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-forward.js +36 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-rollback.js +26 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/utils.d.ts +1 -1
- package/lib/commands/gen2-migration/refactor/utils.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/utils.js +2 -2
- package/lib/commands/gen2-migration/refactor/utils.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.d.ts +52 -0
- package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.js +212 -0
- package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.d.ts +15 -0
- package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.js +148 -0
- package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.d.ts +13 -0
- package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.js +123 -0
- package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.js.map +1 -0
- package/lib/commands/gen2-migration/refactor.d.ts +11 -0
- package/lib/commands/gen2-migration/refactor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor.js +189 -0
- package/lib/commands/gen2-migration/refactor.js.map +1 -0
- package/lib/commands/gen2-migration.d.ts +0 -12
- package/lib/commands/gen2-migration.d.ts.map +1 -1
- package/lib/commands/gen2-migration.js +82 -111
- package/lib/commands/gen2-migration.js.map +1 -1
- package/package.json +21 -12
- package/aws-amplify-cli-internal-gen2-migration-experimental-alpha-0.6.0.tgz +0 -0
- package/lib/commands/drift-detection/services/file-service.d.ts +0 -7
- package/lib/commands/drift-detection/services/file-service.d.ts.map +0 -1
- package/lib/commands/drift-detection/services/file-service.js +0 -53
- package/lib/commands/drift-detection/services/file-service.js.map +0 -1
- package/lib/commands/gen2-migration/_step.d.ts +0 -17
- package/lib/commands/gen2-migration/_step.d.ts.map +0 -1
- package/lib/commands/gen2-migration/_step.js +0 -16
- package/lib/commands/gen2-migration/_step.js.map +0 -1
- package/lib/commands/gen2-migration/_validations.d.ts.map +0 -1
- package/lib/commands/gen2-migration/_validations.js.map +0 -1
- package/lib/commands/gen2-migration/cleanup.d.ts +0 -8
- package/lib/commands/gen2-migration/cleanup.d.ts.map +0 -1
- package/lib/commands/gen2-migration/cleanup.js +0 -21
- package/lib/commands/gen2-migration/cleanup.js.map +0 -1
- package/lib/commands/gen2-migration/clone.d.ts +0 -8
- package/lib/commands/gen2-migration/clone.d.ts.map +0 -1
- package/lib/commands/gen2-migration/clone.js +0 -21
- package/lib/commands/gen2-migration/clone.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/auth/index.d.ts +0 -24
- package/lib/commands/gen2-migration/generate/adapters/auth/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/auth/index.js +0 -297
- package/lib/commands/gen2-migration/generate/adapters/auth/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/auth/index.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/auth/index.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/auth/index.test.js +0 -140
- package/lib/commands/gen2-migration/generate/adapters/auth/index.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/data/index.d.ts +0 -5
- package/lib/commands/gen2-migration/generate/adapters/data/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/data/index.js +0 -17
- package/lib/commands/gen2-migration/generate/adapters/data/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.d.ts +0 -10
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.js +0 -43
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.js +0 -34
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/index.d.ts +0 -18
- package/lib/commands/gen2-migration/generate/adapters/functions/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/index.js +0 -85
- package/lib/commands/gen2-migration/generate/adapters/functions/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/project/index.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/project/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/project/index.js +0 -7
- package/lib/commands/gen2-migration/generate/adapters/project/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.d.ts +0 -31
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.js +0 -34
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.js +0 -181
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/index.d.ts +0 -3
- package/lib/commands/gen2-migration/generate/adapters/storage/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/index.js +0 -10
- package/lib/commands/gen2-migration/generate/adapters/storage/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.d.ts +0 -25
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.js +0 -76
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.js +0 -125
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/backend/synthesizer.d.ts +0 -91
- package/lib/commands/gen2-migration/generate/backend/synthesizer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/backend/synthesizer.js +0 -1014
- package/lib/commands/gen2-migration/generate/backend/synthesizer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/backend/synthesizer.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/backend/synthesizer.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/backend/synthesizer.test.js +0 -777
- package/lib/commands/gen2-migration/generate/backend/synthesizer.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.d.ts +0 -14
- package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.js +0 -82
- package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/analytics.d.ts +0 -10
- package/lib/commands/gen2-migration/generate/codegen-head/analytics.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/analytics.js +0 -11
- package/lib/commands/gen2-migration/generate/codegen-head/analytics.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.d.ts +0 -7
- package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.js +0 -80
- package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.d.ts +0 -13
- package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.js +0 -59
- package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.d.ts +0 -24
- package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.js +0 -167
- package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.d.ts +0 -21
- package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.js +0 -135
- package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.d.ts +0 -23
- package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.js +0 -181
- package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.d.ts +0 -12
- package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.js +0 -157
- package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.d.ts +0 -10
- package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.js +0 -48
- package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.d.ts +0 -11
- package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.js +0 -38
- package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.d.ts +0 -13
- package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.js +0 -498
- package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.d.ts +0 -47
- package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.js +0 -222
- package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.d.ts +0 -10
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.js +0 -59
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.js +0 -90
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.d.ts +0 -14
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.js +0 -100
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.js +0 -69
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/format.d.ts +0 -8
- package/lib/commands/gen2-migration/generate/codegen-head/format.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/format.js +0 -66
- package/lib/commands/gen2-migration/generate/codegen-head/format.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/logger.d.ts +0 -15
- package/lib/commands/gen2-migration/generate/codegen-head/logger.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/logger.js +0 -14
- package/lib/commands/gen2-migration/generate/codegen-head/logger.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/printer.d.ts +0 -26
- package/lib/commands/gen2-migration/generate/codegen-head/printer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/printer.js +0 -103
- package/lib/commands/gen2-migration/generate/codegen-head/printer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.d.ts +0 -13
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.js +0 -66
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.js +0 -97
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/core/migration-pipeline.d.ts +0 -26
- package/lib/commands/gen2-migration/generate/core/migration-pipeline.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/core/migration-pipeline.js +0 -269
- package/lib/commands/gen2-migration/generate/core/migration-pipeline.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.d.ts +0 -7
- package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.js +0 -84
- package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.d.ts +0 -8
- package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.js +0 -105
- package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.d.ts +0 -5
- package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.js +0 -88
- package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.d.ts +0 -8
- package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.js +0 -36
- package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.d.ts +0 -5
- package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.js +0 -81
- package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.d.ts +0 -15
- package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.js +0 -35
- package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.d.ts +0 -5
- package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.js +0 -66
- package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.js +0 -178
- package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/types.d.ts +0 -38
- package/lib/commands/gen2-migration/generate/custom-resources/types.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/types.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/analytics/index.d.ts +0 -9
- package/lib/commands/gen2-migration/generate/generators/analytics/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/analytics/index.js +0 -40
- package/lib/commands/gen2-migration/generate/generators/analytics/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/auth/index.d.ts +0 -107
- package/lib/commands/gen2-migration/generate/generators/auth/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/auth/index.js +0 -313
- package/lib/commands/gen2-migration/generate/generators/auth/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/auth/index.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/generators/auth/index.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/auth/index.test.js +0 -566
- package/lib/commands/gen2-migration/generate/generators/auth/index.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/data/index.d.ts +0 -35
- package/lib/commands/gen2-migration/generate/generators/data/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/data/index.js +0 -185
- package/lib/commands/gen2-migration/generate/generators/data/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/data/index.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/generators/data/index.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/data/index.test.js +0 -47
- package/lib/commands/gen2-migration/generate/generators/data/index.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/index.d.ts +0 -53
- package/lib/commands/gen2-migration/generate/generators/functions/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/index.js +0 -125
- package/lib/commands/gen2-migration/generate/generators/functions/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda.d.ts +0 -6
- package/lib/commands/gen2-migration/generate/generators/functions/lambda.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda.js +0 -16
- package/lib/commands/gen2-migration/generate/generators/functions/lambda.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.d.ts +0 -3
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.js +0 -106
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.js +0 -120
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/storage/access.d.ts +0 -4
- package/lib/commands/gen2-migration/generate/generators/storage/access.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/storage/access.js +0 -73
- package/lib/commands/gen2-migration/generate/generators/storage/access.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/storage/index.d.ts +0 -37
- package/lib/commands/gen2-migration/generate/generators/storage/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/storage/index.js +0 -78
- package/lib/commands/gen2-migration/generate/generators/storage/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/npm_package/renderer.d.ts +0 -27
- package/lib/commands/gen2-migration/generate/npm_package/renderer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/npm_package/renderer.js +0 -28
- package/lib/commands/gen2-migration/generate/npm_package/renderer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/render_pipeline.d.ts +0 -9
- package/lib/commands/gen2-migration/generate/render_pipeline.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/render_pipeline.js +0 -15
- package/lib/commands/gen2-migration/generate/render_pipeline.js.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/ensure_directory.d.ts +0 -7
- package/lib/commands/gen2-migration/generate/renderers/ensure_directory.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/ensure_directory.js +0 -17
- package/lib/commands/gen2-migration/generate/renderers/ensure_directory.js.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/package_json.d.ts +0 -8
- package/lib/commands/gen2-migration/generate/renderers/package_json.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/package_json.js +0 -15
- package/lib/commands/gen2-migration/generate/renderers/package_json.js.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.d.ts +0 -11
- package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.js +0 -22
- package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.js.map +0 -1
- package/lib/commands/gen2-migration/generate/resource/resource.d.ts +0 -20
- package/lib/commands/gen2-migration/generate/resource/resource.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/resource/resource.js +0 -60
- package/lib/commands/gen2-migration/generate/resource/resource.js.map +0 -1
- package/lib/commands/gen2-migration/generate/test_utils/import_regex.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/test_utils/import_regex.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/test_utils/import_regex.js +0 -6
- package/lib/commands/gen2-migration/generate/test_utils/import_regex.js.map +0 -1
- package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.d.ts +0 -4
- package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.js +0 -22
- package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/todo_error.d.ts +0 -3
- package/lib/commands/gen2-migration/generate/todo_error.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/todo_error.js +0 -11
- package/lib/commands/gen2-migration/generate/todo_error.js.map +0 -1
- package/lib/commands/gen2-migration/generate/ts_factory_utils.d.ts +0 -3
- package/lib/commands/gen2-migration/generate/ts_factory_utils.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/ts_factory_utils.js +0 -10
- package/lib/commands/gen2-migration/generate/ts_factory_utils.js.map +0 -1
- package/lib/commands/gen2-migration/generate/types.d.ts +0 -4
- package/lib/commands/gen2-migration/generate/types.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/types.js.map +0 -1
- package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.d.ts +0 -26
- package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.d.ts +0 -5
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.js +0 -76
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.d.ts +0 -6
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.js +0 -52
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.d.ts +0 -40
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.js +0 -321
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/generators/template-generator.d.ts +0 -48
- package/lib/commands/gen2-migration/refactor/generators/template-generator.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/generators/template-generator.js +0 -513
- package/lib/commands/gen2-migration/refactor/generators/template-generator.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/refactor.d.ts +0 -19
- package/lib/commands/gen2-migration/refactor/refactor.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/refactor.js +0 -241
- package/lib/commands/gen2-migration/refactor/refactor.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/types.d.ts +0 -128
- package/lib/commands/gen2-migration/refactor/types.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/types.js +0 -59
- package/lib/commands/gen2-migration/refactor/types.js.map +0 -1
- package/lib/commands/gen2-migration/shift.d.ts +0 -8
- package/lib/commands/gen2-migration/shift.d.ts.map +0 -1
- package/lib/commands/gen2-migration/shift.js +0 -21
- package/lib/commands/gen2-migration/shift.js.map +0 -1
- package/lib/commands/gen2-migration/stateful-resources.d.ts.map +0 -1
- package/lib/commands/gen2-migration/stateful-resources.js.map +0 -1
- /package/lib/commands/gen2-migration/{stateful-resources.d.ts → _infra/stateful-resources.d.ts} +0 -0
- /package/lib/commands/gen2-migration/{stateful-resources.js → _infra/stateful-resources.js} +0 -0
|
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.detectTemplateDrift = detectTemplateDrift;
|
|
40
40
|
const amplify_cli_core_1 = require("@aws-amplify/amplify-cli-core");
|
|
41
41
|
const client_cloudformation_1 = require("@aws-sdk/client-cloudformation");
|
|
42
|
+
const client_cloudformation_2 = require("@aws-sdk/client-cloudformation");
|
|
42
43
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
43
44
|
const path = __importStar(require("path"));
|
|
44
45
|
function extractStackNameFromArn(stackArn) {
|
|
@@ -49,6 +50,27 @@ function extractChangeSetNameFromArn(changeSetArn) {
|
|
|
49
50
|
const resource = (0, amplify_cli_core_1.parseArn)(changeSetArn).resource;
|
|
50
51
|
return resource.split('/')[1];
|
|
51
52
|
}
|
|
53
|
+
const CHANGESET_PREFIX = 'amplify-drift-detection-';
|
|
54
|
+
async function cleanupOldDriftChangesets(cfn, stackName, print) {
|
|
55
|
+
var _a;
|
|
56
|
+
try {
|
|
57
|
+
const toDelete = [];
|
|
58
|
+
for await (const page of (0, client_cloudformation_2.paginateListChangeSets)({ client: cfn }, { StackName: stackName })) {
|
|
59
|
+
for (const cs of page.Summaries || []) {
|
|
60
|
+
if ((_a = cs.ChangeSetName) === null || _a === void 0 ? void 0 : _a.startsWith(CHANGESET_PREFIX)) {
|
|
61
|
+
toDelete.push(cs.ChangeSetName);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
await Promise.allSettled(toDelete.map((name) => {
|
|
66
|
+
print.debug(`Deleting old drift changeset: ${name}`);
|
|
67
|
+
return cfn.send(new client_cloudformation_1.DeleteChangeSetCommand({ StackName: stackName, ChangeSetName: name }));
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
print.debug(`Failed to clean up old drift changesets: ${error.message}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
52
74
|
async function detectTemplateDrift(stackName, print, cfn) {
|
|
53
75
|
var _a;
|
|
54
76
|
try {
|
|
@@ -56,7 +78,6 @@ async function detectTemplateDrift(stackName, print, cfn) {
|
|
|
56
78
|
print.debug(`Checking for #current-cloud-backend at: ${currentCloudBackendPath}`);
|
|
57
79
|
if (!fs_extra_1.default.existsSync(currentCloudBackendPath)) {
|
|
58
80
|
return {
|
|
59
|
-
totalDrifted: 0,
|
|
60
81
|
changes: [],
|
|
61
82
|
skipped: true,
|
|
62
83
|
skipReason: 'No #current-cloud-backend found. Run "amplify pull" first.',
|
|
@@ -66,7 +87,6 @@ async function detectTemplateDrift(stackName, print, cfn) {
|
|
|
66
87
|
print.debug(`Reading cached template from: ${templatePath}`);
|
|
67
88
|
if (!fs_extra_1.default.existsSync(templatePath)) {
|
|
68
89
|
return {
|
|
69
|
-
totalDrifted: 0,
|
|
70
90
|
changes: [],
|
|
71
91
|
skipped: true,
|
|
72
92
|
skipReason: 'No cached CloudFormation template found',
|
|
@@ -79,7 +99,6 @@ async function detectTemplateDrift(stackName, print, cfn) {
|
|
|
79
99
|
}));
|
|
80
100
|
if (!stackDescription.Stacks || stackDescription.Stacks.length === 0) {
|
|
81
101
|
return {
|
|
82
|
-
totalDrifted: 0,
|
|
83
102
|
changes: [],
|
|
84
103
|
skipped: true,
|
|
85
104
|
skipReason: `Stack ${stackName} not found in CloudFormation`,
|
|
@@ -87,7 +106,8 @@ async function detectTemplateDrift(stackName, print, cfn) {
|
|
|
87
106
|
}
|
|
88
107
|
const parameters = stackDescription.Stacks[0].Parameters || [];
|
|
89
108
|
print.debug(`Using ${parameters.length} parameters from deployed stack`);
|
|
90
|
-
|
|
109
|
+
await cleanupOldDriftChangesets(cfn, stackName, print);
|
|
110
|
+
const changeSetName = `${CHANGESET_PREFIX}${Date.now()}`;
|
|
91
111
|
print.debug(`Creating changeset: ${changeSetName}`);
|
|
92
112
|
await cfn.send(new client_cloudformation_1.CreateChangeSetCommand({
|
|
93
113
|
StackName: stackName,
|
|
@@ -99,75 +119,69 @@ async function detectTemplateDrift(stackName, print, cfn) {
|
|
|
99
119
|
IncludeNestedStacks: true,
|
|
100
120
|
}));
|
|
101
121
|
try {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}, {
|
|
107
|
-
StackName: stackName,
|
|
108
|
-
ChangeSetName: changeSetName,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
catch (waitError) {
|
|
112
|
-
print.debug(`Changeset waiter failed, will check status...`);
|
|
113
|
-
}
|
|
114
|
-
const changeSet = await cfn.send(new client_cloudformation_1.DescribeChangeSetCommand({
|
|
122
|
+
await (0, client_cloudformation_1.waitUntilChangeSetCreateComplete)({
|
|
123
|
+
client: cfn,
|
|
124
|
+
maxWaitTime: 300,
|
|
125
|
+
}, {
|
|
115
126
|
StackName: stackName,
|
|
116
127
|
ChangeSetName: changeSetName,
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
catch (waitError) {
|
|
131
|
+
print.debug(`Changeset waiter failed, will check status...`);
|
|
132
|
+
}
|
|
133
|
+
const changeSet = await cfn.send(new client_cloudformation_1.DescribeChangeSetCommand({
|
|
134
|
+
StackName: stackName,
|
|
135
|
+
ChangeSetName: changeSetName,
|
|
136
|
+
}));
|
|
137
|
+
if (changeSet.Status === 'FAILED' && ((_a = changeSet.StatusReason) === null || _a === void 0 ? void 0 : _a.includes("didn't contain changes"))) {
|
|
138
|
+
print.debug('✓ Changeset status: No changes detected (no drift)');
|
|
139
|
+
await cfn
|
|
140
|
+
.send(new client_cloudformation_1.DeleteChangeSetCommand({ StackName: stackName, ChangeSetName: changeSetName }))
|
|
141
|
+
.catch((e) => print.debug(`Failed to delete changeset: ${e.message}`));
|
|
142
|
+
return {
|
|
143
|
+
changes: [],
|
|
144
|
+
skipped: false,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
if (changeSet.Status === 'FAILED') {
|
|
148
|
+
print.debug(`Changeset failed with status: ${changeSet.Status}`);
|
|
149
|
+
print.debug(`Reason: ${changeSet.StatusReason}`);
|
|
150
|
+
await cfn
|
|
151
|
+
.send(new client_cloudformation_1.DeleteChangeSetCommand({ StackName: stackName, ChangeSetName: changeSetName }))
|
|
152
|
+
.catch((e) => print.debug(`Failed to delete changeset: ${e.message}`));
|
|
153
|
+
const errorMsg = `Changeset creation failed with status ${changeSet.Status}`;
|
|
154
|
+
const reasonMsg = changeSet.StatusReason ? `: ${changeSet.StatusReason}` : '';
|
|
155
|
+
return {
|
|
156
|
+
changes: [],
|
|
157
|
+
skipped: true,
|
|
158
|
+
skipReason: `${errorMsg}${reasonMsg}`,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
print.debug(`CloudFormation ChangeSet: ${stackName}`);
|
|
162
|
+
print.debug(`Status: ${changeSet.Status}`);
|
|
163
|
+
print.debug(`IncludeNestedStacks: ${changeSet.IncludeNestedStacks}`);
|
|
164
|
+
if (changeSet.StatusReason) {
|
|
165
|
+
print.debug(`StatusReason: ${changeSet.StatusReason}`);
|
|
166
|
+
}
|
|
167
|
+
if (changeSet.Changes && changeSet.Changes.length > 0) {
|
|
168
|
+
print.debug(`Changes: ${changeSet.Changes.length}`);
|
|
169
|
+
for (const change of changeSet.Changes) {
|
|
170
|
+
if (change.ResourceChange) {
|
|
171
|
+
const rc = change.ResourceChange;
|
|
172
|
+
print.debug(` ${rc.LogicalResourceId} (${rc.ResourceType}) - ${rc.Action}`);
|
|
146
173
|
}
|
|
147
174
|
}
|
|
148
|
-
else {
|
|
149
|
-
print.debug('Changes: 0');
|
|
150
|
-
}
|
|
151
|
-
const result = await analyzeChangeSet(cfn, changeSet, print);
|
|
152
|
-
return result;
|
|
153
175
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
print.debug(`Deleting changeset: ${changeSetName}`);
|
|
157
|
-
await cfn.send(new client_cloudformation_1.DeleteChangeSetCommand({
|
|
158
|
-
StackName: stackName,
|
|
159
|
-
ChangeSetName: changeSetName,
|
|
160
|
-
}));
|
|
161
|
-
print.debug(`Deleted changeset: ${changeSetName}`);
|
|
162
|
-
}
|
|
163
|
-
catch (deleteError) {
|
|
164
|
-
print.warn(`Failed to delete changeset ${changeSetName}: ${deleteError.message}`);
|
|
165
|
-
}
|
|
176
|
+
else {
|
|
177
|
+
print.debug('Changes: 0');
|
|
166
178
|
}
|
|
179
|
+
const result = await analyzeChangeSet(cfn, changeSet, print);
|
|
180
|
+
result.changeSetId = changeSet.ChangeSetId;
|
|
181
|
+
return result;
|
|
167
182
|
}
|
|
168
183
|
catch (error) {
|
|
169
184
|
return {
|
|
170
|
-
totalDrifted: 0,
|
|
171
185
|
changes: [],
|
|
172
186
|
skipped: true,
|
|
173
187
|
skipReason: `Error during template drift detection: ${error.message}`,
|
|
@@ -175,9 +189,8 @@ async function detectTemplateDrift(stackName, print, cfn) {
|
|
|
175
189
|
}
|
|
176
190
|
}
|
|
177
191
|
async function analyzeChangeSet(cfn, changeSet, print) {
|
|
178
|
-
var _a, _b
|
|
192
|
+
var _a, _b;
|
|
179
193
|
const result = {
|
|
180
|
-
totalDrifted: 0,
|
|
181
194
|
changes: [],
|
|
182
195
|
skipped: false,
|
|
183
196
|
};
|
|
@@ -189,7 +202,6 @@ async function analyzeChangeSet(cfn, changeSet, print) {
|
|
|
189
202
|
}
|
|
190
203
|
print.warn(`ChangeSet failed with unexpected reason: ${changeSet.StatusReason || 'No reason provided'}`);
|
|
191
204
|
return {
|
|
192
|
-
totalDrifted: 0,
|
|
193
205
|
changes: [],
|
|
194
206
|
skipped: true,
|
|
195
207
|
skipReason: `Changeset failed: ${changeSet.StatusReason || 'Unknown reason'}`,
|
|
@@ -205,26 +217,8 @@ async function analyzeChangeSet(cfn, changeSet, print) {
|
|
|
205
217
|
continue;
|
|
206
218
|
}
|
|
207
219
|
const rc = change.ResourceChange;
|
|
208
|
-
const changeInfo = {
|
|
209
|
-
|
|
210
|
-
resourceType: rc.ResourceType,
|
|
211
|
-
action: rc.Action,
|
|
212
|
-
replacement: rc.Replacement === 'True',
|
|
213
|
-
details: [],
|
|
214
|
-
nestedChanges: [],
|
|
215
|
-
};
|
|
216
|
-
if (rc.Details) {
|
|
217
|
-
for (const detail of rc.Details) {
|
|
218
|
-
(_c = changeInfo.details) === null || _c === void 0 ? void 0 : _c.push({
|
|
219
|
-
attribute: (_d = detail.Target) === null || _d === void 0 ? void 0 : _d.Attribute,
|
|
220
|
-
name: (_e = detail.Target) === null || _e === void 0 ? void 0 : _e.Name,
|
|
221
|
-
changeSource: detail.ChangeSource,
|
|
222
|
-
evaluation: detail.Evaluation,
|
|
223
|
-
requiresRecreation: (_f = detail.Target) === null || _f === void 0 ? void 0 : _f.RequiresRecreation,
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
if (rc.ResourceType === 'AWS::CloudFormation::Stack' && rc.ChangeSetId) {
|
|
220
|
+
const changeInfo = { ...rc };
|
|
221
|
+
if (rc.ResourceType === 'AWS::CloudFormation::Stack' && rc.ChangeSetId && rc.PhysicalResourceId) {
|
|
228
222
|
try {
|
|
229
223
|
const stackName = extractStackNameFromArn(rc.PhysicalResourceId);
|
|
230
224
|
const changeSetName = extractChangeSetNameFromArn(rc.ChangeSetId);
|
|
@@ -268,13 +262,11 @@ async function analyzeChangeSet(cfn, changeSet, print) {
|
|
|
268
262
|
}
|
|
269
263
|
if (hasNestedSkipped) {
|
|
270
264
|
return {
|
|
271
|
-
totalDrifted: 0,
|
|
272
265
|
changes: [],
|
|
273
266
|
skipped: true,
|
|
274
267
|
skipReason: 'One or more nested stacks could not be analyzed',
|
|
275
268
|
};
|
|
276
269
|
}
|
|
277
|
-
result.totalDrifted = result.changes.length;
|
|
278
270
|
return result;
|
|
279
271
|
}
|
|
280
272
|
//# sourceMappingURL=detect-template-drift.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect-template-drift.js","sourceRoot":"","sources":["../../../src/commands/drift-detection/detect-template-drift.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"detect-template-drift.js","sourceRoot":"","sources":["../../../src/commands/drift-detection/detect-template-drift.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,kDAuJC;AA1OD,oEAAsE;AACtE,0EASwC;AACxC,0EAAwE;AACxE,wDAA0B;AAC1B,2CAA6B;AAmB7B,SAAS,uBAAuB,CAAC,QAAgB;IAE/C,MAAM,QAAQ,GAAG,IAAA,2BAAQ,EAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;IAC7C,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAChC,CAAC;AAOD,SAAS,2BAA2B,CAAC,YAAoB;IAEvD,MAAM,QAAQ,GAAG,IAAA,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AG,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;gBAGzE,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;oBACzB,KAAK,CAAC,IAAI,CAAC,kBAAkB,SAAS,0BAA0B,YAAY,CAAC,UAAU,EAAE,CAAC,CAAC;oBAC3F,gBAAgB,GAAG,IAAI,CAAC;gBAC1B,CAAC;gBAGD,IAAI,YAAY,CAAC,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC5D,UAAU,CAAC,aAAa,GAAG,YAAY,CAAC,OAAO,CAAC;oBAChD,KAAK,CAAC,KAAK,CAAC,aAAa,YAAY,CAAC,OAAO,CAAC,MAAM,iBAAiB,CAAC,CAAC;gBACzE,CAAC;YACH,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBAEpB,KAAK,CAAC,IAAI,CAAC,0CAA0C,EAAE,CAAC,iBAAiB,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;gBAC/F,KAAK,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,kBAAkB,EAAE,CAAC,CAAC;gBACnD,KAAK,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;gBAC/C,gBAAgB,GAAG,IAAI,CAAC;YAC1B,CAAC;QACH,CAAC;QAED,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAGD,IAAI,gBAAgB,EAAE,CAAC;QACrB,OAAO;YACL,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,iDAAiD;SAC9D,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { detectStackDrift, detectStackDriftRecursive, type CloudFormationDriftResults } from './detect-stack-drift';
|
|
1
|
+
export { detectStackDrift, detectStackDriftRecursive, type CloudFormationDriftResults, type StackDriftNode } from './detect-stack-drift';
|
|
2
2
|
export { detectLocalDrift, type LocalDriftResults, type ResourceInfo } from './detect-local-drift';
|
|
3
|
-
export { detectTemplateDrift, type TemplateDriftResults } from './detect-template-drift';
|
|
4
|
-
export { DriftFormatter, type DriftDisplayFormat } from './services/drift-formatter';
|
|
3
|
+
export { detectTemplateDrift, type TemplateDriftResults, type ResourceChangeWithNested } from './detect-template-drift';
|
|
5
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/drift-detection/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,KAAK,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/drift-detection/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,KAAK,0BAA0B,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACzI,OAAO,EAAE,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAE,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.detectTemplateDrift = exports.detectLocalDrift = exports.detectStackDriftRecursive = exports.detectStackDrift = void 0;
|
|
4
4
|
var detect_stack_drift_1 = require("./detect-stack-drift");
|
|
5
5
|
Object.defineProperty(exports, "detectStackDrift", { enumerable: true, get: function () { return detect_stack_drift_1.detectStackDrift; } });
|
|
6
6
|
Object.defineProperty(exports, "detectStackDriftRecursive", { enumerable: true, get: function () { return detect_stack_drift_1.detectStackDriftRecursive; } });
|
|
@@ -8,6 +8,4 @@ var detect_local_drift_1 = require("./detect-local-drift");
|
|
|
8
8
|
Object.defineProperty(exports, "detectLocalDrift", { enumerable: true, get: function () { return detect_local_drift_1.detectLocalDrift; } });
|
|
9
9
|
var detect_template_drift_1 = require("./detect-template-drift");
|
|
10
10
|
Object.defineProperty(exports, "detectTemplateDrift", { enumerable: true, get: function () { return detect_template_drift_1.detectTemplateDrift; } });
|
|
11
|
-
var drift_formatter_1 = require("./services/drift-formatter");
|
|
12
|
-
Object.defineProperty(exports, "DriftFormatter", { enumerable: true, get: function () { return drift_formatter_1.DriftFormatter; } });
|
|
13
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/drift-detection/index.ts"],"names":[],"mappings":";;;AAKA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/drift-detection/index.ts"],"names":[],"mappings":";;;AAKA,2DAAyI;AAAhI,sHAAA,gBAAgB,OAAA;AAAE,+HAAA,yBAAyB,OAAA;AACpD,2DAAmG;AAA1F,sHAAA,gBAAgB,OAAA;AACzB,iEAAwH;AAA/G,4HAAA,mBAAmB,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amplify-config-service.d.ts","sourceRoot":"","sources":["../../../../src/commands/drift-detection/services/amplify-config-service.ts"],"names":[],"mappings":"AAUA,qBAAa,oBAAoB;IAIxB,sBAAsB,IAAI,IAAI;IAa9B,gBAAgB,IAAI,MAAM;IAkB1B,cAAc,IAAI,MAAM;
|
|
1
|
+
{"version":3,"file":"amplify-config-service.d.ts","sourceRoot":"","sources":["../../../../src/commands/drift-detection/services/amplify-config-service.ts"],"names":[],"mappings":"AAUA,qBAAa,oBAAoB;IAIxB,sBAAsB,IAAI,IAAI;IAa9B,gBAAgB,IAAI,MAAM;IAkB1B,cAAc,IAAI,MAAM;CAGhC"}
|
|
@@ -28,22 +28,6 @@ class AmplifyConfigService {
|
|
|
28
28
|
getProjectName() {
|
|
29
29
|
return amplify_cli_core_1.stateManager.getProjectName();
|
|
30
30
|
}
|
|
31
|
-
extractCategory(logicalId) {
|
|
32
|
-
const idLower = logicalId.toLowerCase();
|
|
33
|
-
if (idLower.includes('auth'))
|
|
34
|
-
return 'auth';
|
|
35
|
-
if (idLower.includes('storage'))
|
|
36
|
-
return 'storage';
|
|
37
|
-
if (idLower.includes('function'))
|
|
38
|
-
return 'function';
|
|
39
|
-
if (idLower.includes('api'))
|
|
40
|
-
return 'api';
|
|
41
|
-
if (idLower.includes('hosting'))
|
|
42
|
-
return 'hosting';
|
|
43
|
-
if (idLower.includes('analytics'))
|
|
44
|
-
return 'analytics';
|
|
45
|
-
return 'other';
|
|
46
|
-
}
|
|
47
31
|
}
|
|
48
32
|
exports.AmplifyConfigService = AmplifyConfigService;
|
|
49
33
|
//# sourceMappingURL=amplify-config-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amplify-config-service.js","sourceRoot":"","sources":["../../../../src/commands/drift-detection/services/amplify-config-service.ts"],"names":[],"mappings":";;;AAKA,oEAAwF;AAKxF,MAAa,oBAAoB;IAIxB,sBAAsB;QAC3B,MAAM,WAAW,GAAG,8BAAW,CAAC,eAAe,EAAE,CAAC;QAClD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,+BAAY,CAAC,sBAAsB,EAAE;gBAC7C,OAAO,EAAE,yBAAyB;gBAClC,UAAU,EAAE,qDAAqD;aAClE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAKM,gBAAgB;;QACrB,MAAM,WAAW,GAAG,8BAAW,CAAC,eAAe,EAAE,CAAC;QAClD,MAAM,IAAI,GAAG,+BAAY,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAE/C,MAAM,SAAS,GAAG,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,0CAAE,iBAAiB,0CAAE,SAAS,CAAC;QAChE,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,+BAAY,CAAC,oBAAoB,EAAE;gBAC3C,OAAO,EAAE,mDAAmD;gBAC5D,UAAU,EAAE,2EAA2E;aACxF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAKM,cAAc;QACnB,OAAO,+BAAY,CAAC,cAAc,EAAE,CAAC;IACvC,CAAC;
|
|
1
|
+
{"version":3,"file":"amplify-config-service.js","sourceRoot":"","sources":["../../../../src/commands/drift-detection/services/amplify-config-service.ts"],"names":[],"mappings":";;;AAKA,oEAAwF;AAKxF,MAAa,oBAAoB;IAIxB,sBAAsB;QAC3B,MAAM,WAAW,GAAG,8BAAW,CAAC,eAAe,EAAE,CAAC;QAClD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,+BAAY,CAAC,sBAAsB,EAAE;gBAC7C,OAAO,EAAE,yBAAyB;gBAClC,UAAU,EAAE,qDAAqD;aAClE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAKM,gBAAgB;;QACrB,MAAM,WAAW,GAAG,8BAAW,CAAC,eAAe,EAAE,CAAC;QAClD,MAAM,IAAI,GAAG,+BAAY,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAE/C,MAAM,SAAS,GAAG,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,0CAAE,iBAAiB,0CAAE,SAAS,CAAC;QAChE,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,+BAAY,CAAC,oBAAoB,EAAE;gBAC3C,OAAO,EAAE,mDAAmD;gBAC5D,UAAU,EAAE,2EAA2E;aACxF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAKM,cAAc;QACnB,OAAO,+BAAY,CAAC,cAAc,EAAE,CAAC;IACvC,CAAC;CACF;AAtCD,oDAsCC"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { CloudFormationClient } from '@aws-sdk/client-cloudformation';
|
|
2
2
|
import type { $TSContext } from '@aws-amplify/amplify-cli-core';
|
|
3
|
-
import type {
|
|
4
|
-
import type { Print } from '../../drift';
|
|
3
|
+
import type { SpinningLogger } from '../../gen2-migration/_infra/spinning-logger';
|
|
5
4
|
export declare class CloudFormationService {
|
|
6
5
|
private readonly print;
|
|
7
|
-
constructor(print:
|
|
6
|
+
constructor(print: SpinningLogger);
|
|
8
7
|
getClient(context: $TSContext): Promise<CloudFormationClient>;
|
|
9
8
|
validateStackExists(client: CloudFormationClient, stackName: string): Promise<boolean>;
|
|
10
|
-
getStackTemplate(client: CloudFormationClient, stackName: string): Promise<CloudFormationTemplate>;
|
|
11
9
|
syncCloudBackendFromS3(context: $TSContext): Promise<boolean>;
|
|
12
10
|
}
|
|
13
11
|
//# sourceMappingURL=cloudformation-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudformation-service.d.ts","sourceRoot":"","sources":["../../../../src/commands/drift-detection/services/cloudformation-service.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAsB,MAAM,gCAAgC,CAAC;AAC1F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAIhE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"cloudformation-service.d.ts","sourceRoot":"","sources":["../../../../src/commands/drift-detection/services/cloudformation-service.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAsB,MAAM,gCAAgC,CAAC;AAC1F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAIhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAUlF,qBAAa,qBAAqB;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,cAAc;IAKrC,SAAS,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAQ7D,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IA+BtF,sBAAsB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC;CAgD3E"}
|
|
@@ -32,22 +32,25 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
35
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
39
|
exports.CloudFormationService = void 0;
|
|
37
40
|
const client_cloudformation_1 = require("@aws-sdk/client-cloudformation");
|
|
38
41
|
const amplify_cli_core_1 = require("@aws-amplify/amplify-cli-core");
|
|
39
42
|
const fs = __importStar(require("fs-extra"));
|
|
40
43
|
const path = __importStar(require("path"));
|
|
41
|
-
const
|
|
44
|
+
const aws_cfn_1 = __importDefault(require("@aws-amplify/amplify-provider-awscloudformation/lib/aws-utils/aws-cfn"));
|
|
42
45
|
const zip_util_1 = require("@aws-amplify/amplify-provider-awscloudformation/lib/zip-util");
|
|
43
46
|
const aws_s3_1 = require("@aws-amplify/amplify-provider-awscloudformation/lib/aws-utils/aws-s3");
|
|
44
|
-
const
|
|
47
|
+
const constants_1 = require("@aws-amplify/amplify-provider-awscloudformation/lib/constants");
|
|
45
48
|
class CloudFormationService {
|
|
46
49
|
constructor(print) {
|
|
47
50
|
this.print = print;
|
|
48
51
|
}
|
|
49
52
|
async getClient(context) {
|
|
50
|
-
const cfn = await new
|
|
53
|
+
const cfn = await new aws_cfn_1.default(context, 'drift:detect');
|
|
51
54
|
return cfn.cfn;
|
|
52
55
|
}
|
|
53
56
|
async validateStackExists(client, stackName) {
|
|
@@ -69,13 +72,6 @@ class CloudFormationService {
|
|
|
69
72
|
}, error);
|
|
70
73
|
}
|
|
71
74
|
}
|
|
72
|
-
async getStackTemplate(client, stackName) {
|
|
73
|
-
const response = await client.send(new client_cloudformation_1.GetTemplateCommand({
|
|
74
|
-
StackName: stackName,
|
|
75
|
-
TemplateStage: 'Original',
|
|
76
|
-
}));
|
|
77
|
-
return JSON.parse(response.TemplateBody);
|
|
78
|
-
}
|
|
79
75
|
async syncCloudBackendFromS3(context) {
|
|
80
76
|
try {
|
|
81
77
|
if (!amplify_cli_core_1.stateManager.metaFileExists()) {
|
|
@@ -92,7 +88,7 @@ class CloudFormationService {
|
|
|
92
88
|
const s3 = await aws_s3_1.S3.getInstance(context);
|
|
93
89
|
let currentCloudBackendZip;
|
|
94
90
|
try {
|
|
95
|
-
currentCloudBackendZip = await (0, zip_util_1.downloadZip)(s3, tempDir, S3BackendZipFileName, undefined);
|
|
91
|
+
currentCloudBackendZip = await (0, zip_util_1.downloadZip)(s3, tempDir, constants_1.S3BackendZipFileName, undefined);
|
|
96
92
|
}
|
|
97
93
|
catch (err) {
|
|
98
94
|
if ((err === null || err === void 0 ? void 0 : err.name) === 'NoSuchBucket') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudformation-service.js","sourceRoot":"","sources":["../../../../src/commands/drift-detection/services/cloudformation-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cloudformation-service.js","sourceRoot":"","sources":["../../../../src/commands/drift-detection/services/cloudformation-service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,0EAA0F;AAE1F,oEAAwF;AACxF,6CAA+B;AAC/B,2CAA6B;AAG7B,oHAAmG;AACnG,2FAAuG;AACvG,iGAA0F;AAC1F,6FAAqG;AAKrG,MAAa,qBAAqB;IAChC,YAA6B,KAAqB;QAArB,UAAK,GAAL,KAAK,CAAgB;IAAG,CAA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ationClient } from '@aws-sdk/client-cloudformation';
|
|
2
|
-
import type { CloudFormationDriftResults } from '../detect-stack-drift';
|
|
3
|
-
import { CloudFormationService } from './cloudformation-service';
|
|
4
1
|
import type { LocalDriftResults } from '../detect-local-drift';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Parameters?: Record<string, any>;
|
|
9
|
-
Resources?: Record<string, any>;
|
|
10
|
-
Outputs?: Record<string, any>;
|
|
11
|
-
Mappings?: Record<string, any>;
|
|
12
|
-
Conditions?: Record<string, any>;
|
|
13
|
-
Transform?: any;
|
|
14
|
-
Metadata?: Record<string, any>;
|
|
15
|
-
}
|
|
16
|
-
export type DriftDisplayFormat = 'tree' | 'summary' | 'json';
|
|
17
|
-
interface SimplifiedJsonOutput {
|
|
18
|
-
stackName: string;
|
|
19
|
-
numResourcesWithDrift: number;
|
|
20
|
-
numResourcesUnchecked: number;
|
|
21
|
-
timestamp: string;
|
|
22
|
-
}
|
|
23
|
-
export declare class DriftFormatter {
|
|
24
|
-
private readonly configService;
|
|
25
|
-
private readonly cfnService;
|
|
26
|
-
private rootStackName;
|
|
27
|
-
private rootTemplate;
|
|
28
|
-
private rootDrifts;
|
|
29
|
-
private nestedStacks;
|
|
30
|
-
private summary;
|
|
31
|
-
private phase2Results;
|
|
32
|
-
private phase3Results;
|
|
33
|
-
constructor(cfnService: CloudFormationService);
|
|
34
|
-
processResults(cfn: CloudFormationClient, stackName: string, rootTemplate: CloudFormationTemplate, combinedResults: CloudFormationDriftResults): Promise<void>;
|
|
35
|
-
formatDrift(format?: DriftDisplayFormat): {
|
|
36
|
-
summaryDashboard: string;
|
|
37
|
-
treeView?: string;
|
|
38
|
-
detailedChanges?: string;
|
|
39
|
-
categoryBreakdown?: string;
|
|
40
|
-
totalDrifted: number;
|
|
41
|
-
};
|
|
42
|
-
createSimplifiedJsonOutput(): SimplifiedJsonOutput;
|
|
43
|
-
private createSummaryDashboard;
|
|
44
|
-
private formatDashboardLine;
|
|
45
|
-
private createTreeView;
|
|
46
|
-
private getResourceCounts;
|
|
47
|
-
private formatResourceCountsAsTree;
|
|
48
|
-
private buildStackHierarchy;
|
|
49
|
-
private renderStackHierarchy;
|
|
50
|
-
private createDetailedChanges;
|
|
51
|
-
private getAllDriftedResources;
|
|
52
|
-
private formatDriftedResource;
|
|
53
|
-
private formatPropertyDifferences;
|
|
54
|
-
private createCategoryBreakdown;
|
|
55
|
-
private groupStacksByCategory;
|
|
56
|
-
private countDrifted;
|
|
57
|
-
private countInSync;
|
|
58
|
-
private countUnchecked;
|
|
59
|
-
private countFailed;
|
|
60
|
-
private getDriftedResources;
|
|
61
|
-
private determineCategory;
|
|
62
|
-
private getCategoryIcon;
|
|
63
|
-
addPhase2Results(results: any): void;
|
|
64
|
-
addPhase3Results(results: LocalDriftResults): void;
|
|
65
|
-
private formatNestedChanges;
|
|
66
|
-
formatPhase2Results(): string | null;
|
|
67
|
-
formatPhase3Results(): string;
|
|
68
|
-
private groupPhase3ResourcesByCategory;
|
|
69
|
-
private getAllCategoriesForPhase3;
|
|
70
|
-
}
|
|
71
|
-
export {};
|
|
2
|
+
import type { TemplateDriftResults } from '../detect-template-drift';
|
|
3
|
+
import { type CloudFormationDriftResults } from '../detect-stack-drift';
|
|
4
|
+
export declare function createUnifiedCategoryView(phase1: CloudFormationDriftResults, phase2: TemplateDriftResults, phase3: LocalDriftResults): string | undefined;
|
|
72
5
|
//# sourceMappingURL=drift-formatter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drift-formatter.d.ts","sourceRoot":"","sources":["../../../../src/commands/drift-detection/services/drift-formatter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drift-formatter.d.ts","sourceRoot":"","sources":["../../../../src/commands/drift-detection/services/drift-formatter.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAA4B,MAAM,0BAA0B,CAAC;AAC/F,OAAO,EAAuB,KAAK,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAuN7F,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,0BAA0B,EAClC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,iBAAiB,GACxB,MAAM,GAAG,SAAS,CAapB"}
|