@aws-amplify/cli-internal-gen2-migration-experimental-alpha 0.5.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 +22 -12
- package/aws-amplify-cli-internal-gen2-migration-experimental-alpha-0.5.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
|
@@ -3,626 +3,171 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.createUnifiedCategoryView = createUnifiedCategoryView;
|
|
7
7
|
const client_cloudformation_1 = require("@aws-sdk/client-cloudformation");
|
|
8
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
totalFailed: 0,
|
|
38
|
-
};
|
|
39
|
-
this.phase2Results = null;
|
|
40
|
-
this.phase3Results = null;
|
|
41
|
-
this.configService = new amplify_config_service_1.AmplifyConfigService();
|
|
42
|
-
this.cfnService = cfnService;
|
|
43
|
-
}
|
|
44
|
-
async processResults(cfn, stackName, rootTemplate, combinedResults) {
|
|
45
|
-
this.rootStackName = stackName;
|
|
46
|
-
this.rootTemplate = rootTemplate;
|
|
47
|
-
this.rootDrifts = combinedResults.rootStackDrifts.StackResourceDrifts || [];
|
|
48
|
-
this.summary = {
|
|
49
|
-
totalStacks: 1,
|
|
50
|
-
totalDrifted: combinedResults.totalDrifted,
|
|
51
|
-
totalInSync: 0,
|
|
52
|
-
totalUnchecked: 0,
|
|
53
|
-
totalFailed: 0,
|
|
54
|
-
};
|
|
55
|
-
this.summary.totalInSync += this.countInSync(this.rootDrifts);
|
|
56
|
-
this.summary.totalUnchecked += this.countUnchecked(this.rootDrifts, this.rootTemplate);
|
|
57
|
-
this.summary.totalFailed += this.countFailed(this.rootDrifts);
|
|
58
|
-
this.nestedStacks = [];
|
|
59
|
-
for (const [logicalId, nestedDrift] of combinedResults.nestedStackDrifts.entries()) {
|
|
60
|
-
if (!nestedDrift.StackResourceDrifts) {
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
const physicalName = combinedResults.nestedStackPhysicalIds.get(logicalId) || logicalId;
|
|
64
|
-
const nestedTemplate = await this.cfnService.getStackTemplate(cfn, physicalName);
|
|
65
|
-
const nestedDrifts = nestedDrift.StackResourceDrifts;
|
|
66
|
-
this.summary.totalInSync += this.countInSync(nestedDrifts);
|
|
67
|
-
this.summary.totalUnchecked += this.countUnchecked(nestedDrifts, nestedTemplate);
|
|
68
|
-
this.summary.totalFailed += this.countFailed(nestedDrifts);
|
|
69
|
-
this.summary.totalStacks++;
|
|
70
|
-
this.nestedStacks.push({
|
|
71
|
-
logicalId,
|
|
72
|
-
physicalName,
|
|
73
|
-
category: this.configService.extractCategory(logicalId),
|
|
74
|
-
drifts: nestedDrifts,
|
|
75
|
-
template: nestedTemplate,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
formatDrift(format = 'tree') {
|
|
80
|
-
const summaryDashboard = this.createSummaryDashboard();
|
|
81
|
-
let treeView;
|
|
82
|
-
let detailedChanges;
|
|
83
|
-
let categoryBreakdown;
|
|
84
|
-
switch (format) {
|
|
85
|
-
case 'tree':
|
|
86
|
-
treeView = this.createTreeView();
|
|
87
|
-
detailedChanges = this.createDetailedChanges();
|
|
88
|
-
categoryBreakdown = this.createCategoryBreakdown();
|
|
89
|
-
break;
|
|
90
|
-
case 'summary':
|
|
91
|
-
categoryBreakdown = this.createCategoryBreakdown();
|
|
92
|
-
break;
|
|
93
|
-
case 'json':
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
return {
|
|
97
|
-
summaryDashboard,
|
|
98
|
-
treeView,
|
|
99
|
-
detailedChanges,
|
|
100
|
-
categoryBreakdown,
|
|
101
|
-
totalDrifted: this.summary.totalDrifted,
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
createSimplifiedJsonOutput() {
|
|
105
|
-
return {
|
|
106
|
-
stackName: this.rootStackName,
|
|
107
|
-
numResourcesWithDrift: this.summary.totalDrifted,
|
|
108
|
-
numResourcesUnchecked: this.summary.totalUnchecked,
|
|
109
|
-
timestamp: new Date().toISOString(),
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
createSummaryDashboard() {
|
|
113
|
-
const projectName = this.configService.getProjectName();
|
|
114
|
-
const border = '─'.repeat(DISPLAY_CONSTANTS.BORDER_WIDTH);
|
|
115
|
-
let dashboard = '';
|
|
116
|
-
dashboard += chalk_1.default.cyan(`┌${border}┐\n`);
|
|
117
|
-
dashboard += chalk_1.default.cyan(`│${' '.repeat(DISPLAY_CONSTANTS.TITLE_PADDING)}DRIFT DETECTION SUMMARY${' '.repeat(DISPLAY_CONSTANTS.TITLE_PADDING)}│\n`);
|
|
118
|
-
dashboard += chalk_1.default.cyan(`├${border}┤\n`);
|
|
119
|
-
dashboard += this.formatDashboardLine('Project', chalk_1.default.bold(projectName), DISPLAY_CONSTANTS.LABEL_PROJECT);
|
|
120
|
-
dashboard += this.formatDashboardLine('Total Stacks Checked', chalk_1.default.bold(this.summary.totalStacks), DISPLAY_CONSTANTS.LABEL_STACKS_CHECKED);
|
|
121
|
-
const driftedColor = this.summary.totalDrifted > 0 ? chalk_1.default.red : chalk_1.default.green;
|
|
122
|
-
dashboard += this.formatDashboardLine('Resources with Drift', driftedColor(this.summary.totalDrifted), DISPLAY_CONSTANTS.LABEL_RESOURCES_DRIFT);
|
|
123
|
-
dashboard += this.formatDashboardLine('Resources in Sync', chalk_1.default.green(this.summary.totalInSync), DISPLAY_CONSTANTS.LABEL_RESOURCES_SYNC);
|
|
124
|
-
dashboard += this.formatDashboardLine('Unchecked Resources', chalk_1.default.gray(this.summary.totalUnchecked), DISPLAY_CONSTANTS.LABEL_UNCHECKED);
|
|
125
|
-
if (this.summary.totalFailed > 0) {
|
|
126
|
-
dashboard += this.formatDashboardLine('Failed Drift Checks', chalk_1.default.yellow(this.summary.totalFailed), DISPLAY_CONSTANTS.LABEL_FAILED);
|
|
127
|
-
}
|
|
128
|
-
dashboard += chalk_1.default.cyan(`└${border}┘`);
|
|
129
|
-
if (this.summary.totalFailed > 0) {
|
|
130
|
-
dashboard +=
|
|
131
|
-
'\n' +
|
|
132
|
-
chalk_1.default.yellow(`WARNING: Drift detection failed for ${this.summary.totalFailed} resource(s).\n` +
|
|
133
|
-
`This may be due to insufficient permissions or AWS API issues.\n` +
|
|
134
|
-
`Run with --debug to see which resources failed.`);
|
|
135
|
-
}
|
|
136
|
-
return dashboard;
|
|
137
|
-
}
|
|
138
|
-
formatDashboardLine(label, value, labelWidth) {
|
|
139
|
-
const stripAnsi = (str) => {
|
|
140
|
-
return str.replace(/\u001b\[[0-9;]*m/g, '');
|
|
141
|
-
};
|
|
142
|
-
const valueStr = value.toString();
|
|
143
|
-
const actualValueLength = stripAnsi(valueStr).length;
|
|
144
|
-
const usedLength = 2 + label.length + 2 + actualValueLength + 1;
|
|
145
|
-
const padding = DISPLAY_CONSTANTS.BORDER_WIDTH + 2 - usedLength;
|
|
146
|
-
return chalk_1.default.cyan(`│ ${label}: ${value}${' '.repeat(Math.max(0, padding))}│\n`);
|
|
147
|
-
}
|
|
148
|
-
createTreeView() {
|
|
149
|
-
let tree = '';
|
|
150
|
-
tree += chalk_1.default.bold('\nSTACK HIERARCHY:\n');
|
|
151
|
-
tree += `${chalk_1.default.blue(this.rootStackName)} ${chalk_1.default.gray('(ROOT)')}\n`;
|
|
152
|
-
const rootCounts = this.getResourceCounts(this.rootDrifts, this.rootTemplate);
|
|
153
|
-
tree += this.formatResourceCountsAsTree(rootCounts, '');
|
|
154
|
-
const stackHierarchy = this.buildStackHierarchy();
|
|
155
|
-
tree = this.renderStackHierarchy(stackHierarchy, tree, '');
|
|
156
|
-
return tree;
|
|
9
|
+
const amplify_cli_core_1 = require("@aws-amplify/amplify-cli-core");
|
|
10
|
+
const categories_1 = require("../../gen2-migration/_infra/categories");
|
|
11
|
+
function colorResourceLine(symbol, line) {
|
|
12
|
+
if (symbol === '+')
|
|
13
|
+
return chalk_1.default.green(line);
|
|
14
|
+
if (symbol === '-')
|
|
15
|
+
return chalk_1.default.red(line);
|
|
16
|
+
if (symbol === '~')
|
|
17
|
+
return chalk_1.default.yellow(line);
|
|
18
|
+
return line;
|
|
19
|
+
}
|
|
20
|
+
function getActionSymbol(action) {
|
|
21
|
+
if (action === client_cloudformation_1.ChangeAction.Add)
|
|
22
|
+
return '+';
|
|
23
|
+
if (action === client_cloudformation_1.ChangeAction.Remove)
|
|
24
|
+
return '-';
|
|
25
|
+
return '~';
|
|
26
|
+
}
|
|
27
|
+
function getCFDriftSymbol(status) {
|
|
28
|
+
if (status === client_cloudformation_1.StackResourceDriftStatus.MODIFIED)
|
|
29
|
+
return '~';
|
|
30
|
+
if (status === client_cloudformation_1.StackResourceDriftStatus.DELETED)
|
|
31
|
+
return '-';
|
|
32
|
+
return '?';
|
|
33
|
+
}
|
|
34
|
+
function regionFromArn(arn) {
|
|
35
|
+
try {
|
|
36
|
+
return (0, amplify_cli_core_1.parseArn)(arn).region || undefined;
|
|
157
37
|
}
|
|
158
|
-
|
|
159
|
-
return
|
|
160
|
-
drifted: this.countDrifted(drifts),
|
|
161
|
-
inSync: this.countInSync(drifts),
|
|
162
|
-
unchecked: this.countUnchecked(drifts, template),
|
|
163
|
-
failed: this.countFailed(drifts),
|
|
164
|
-
};
|
|
38
|
+
catch (_a) {
|
|
39
|
+
return undefined;
|
|
165
40
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
41
|
+
}
|
|
42
|
+
function cfnDriftConsoleUrl(stackArn) {
|
|
43
|
+
const region = regionFromArn(stackArn);
|
|
44
|
+
if (!region)
|
|
45
|
+
return undefined;
|
|
46
|
+
return `https://${region}.console.aws.amazon.com/cloudformation/home?region=${region}#/stacks/drifts?stackId=${encodeURIComponent(stackArn)}`;
|
|
47
|
+
}
|
|
48
|
+
function cfnChangesetConsoleUrl(changeSetArn) {
|
|
49
|
+
const region = regionFromArn(changeSetArn);
|
|
50
|
+
if (!region)
|
|
51
|
+
return undefined;
|
|
52
|
+
return `https://${region}.console.aws.amazon.com/cloudformation/home?region=${region}#/stacks/changesets/details?changeSetId=${encodeURIComponent(changeSetArn)}`;
|
|
53
|
+
}
|
|
54
|
+
function flattenTree(node, result = []) {
|
|
55
|
+
result.push(node);
|
|
56
|
+
for (const child of node.children)
|
|
57
|
+
flattenTree(child, result);
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
60
|
+
function collectDriftBlocks(phase1, phase2, phase3) {
|
|
61
|
+
const blocks = [];
|
|
62
|
+
for (const node of flattenTree(phase1.root)) {
|
|
63
|
+
for (const drift of node.drifts) {
|
|
64
|
+
blocks.push({
|
|
65
|
+
categoryName: node.category,
|
|
66
|
+
logicalId: drift.LogicalResourceId || 'Unknown',
|
|
67
|
+
type: 'cf',
|
|
68
|
+
cfDrift: drift,
|
|
69
|
+
driftDetectionId: node.driftDetectionId,
|
|
70
|
+
});
|
|
180
71
|
}
|
|
181
|
-
items.forEach((item, index) => {
|
|
182
|
-
const isLast = index === items.length - 1;
|
|
183
|
-
const symbol = isLast ? TREE_SYMBOLS.LAST_BRANCH : TREE_SYMBOLS.BRANCH;
|
|
184
|
-
const plural = item.count === 1 ? '' : 's';
|
|
185
|
-
result += `${prefix}${symbol} ${item.color(`${item.label}:`)} ${item.count} resource${plural}\n`;
|
|
186
|
-
});
|
|
187
|
-
return result;
|
|
188
72
|
}
|
|
189
|
-
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
if (!hierarchy.has(parts[0])) {
|
|
195
|
-
hierarchy.set(parts[0], {
|
|
196
|
-
stack: nestedStack,
|
|
197
|
-
children: new Map(),
|
|
198
|
-
});
|
|
73
|
+
if (!phase2.skipped && phase2.changes.length > 0) {
|
|
74
|
+
const flattenChanges = (changes, fallbackCategory, fallbackChangeSetId) => {
|
|
75
|
+
for (const change of changes) {
|
|
76
|
+
if (change.ResourceType === 'AWS::CloudFormation::Stack' && change.nestedChanges && change.nestedChanges.length > 0) {
|
|
77
|
+
flattenChanges(change.nestedChanges, (0, categories_1.extractCategory)(change.LogicalResourceId), change.ChangeSetId || fallbackChangeSetId);
|
|
199
78
|
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
79
|
+
else {
|
|
80
|
+
const resourceCategory = (0, categories_1.extractCategory)(change.LogicalResourceId);
|
|
81
|
+
blocks.push({
|
|
82
|
+
categoryName: resourceCategory !== 'Other' ? resourceCategory : fallbackCategory,
|
|
83
|
+
logicalId: change.LogicalResourceId || 'Unknown',
|
|
84
|
+
type: 'template',
|
|
85
|
+
templateChange: change,
|
|
86
|
+
changeSetId: change.ChangeSetId || fallbackChangeSetId,
|
|
208
87
|
});
|
|
209
88
|
}
|
|
210
|
-
const parent = hierarchy.get(topLevel);
|
|
211
|
-
parent.children.set(childName, {
|
|
212
|
-
stack: nestedStack,
|
|
213
|
-
children: new Map(),
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
return hierarchy;
|
|
218
|
-
}
|
|
219
|
-
renderStackHierarchy(hierarchy, tree, prefix) {
|
|
220
|
-
const entries = Array.from(hierarchy.entries());
|
|
221
|
-
entries.forEach(([name, node], index) => {
|
|
222
|
-
const isLastItem = index === entries.length - 1;
|
|
223
|
-
const nodePrefix = isLastItem ? TREE_SYMBOLS.LAST_BRANCH : TREE_SYMBOLS.BRANCH;
|
|
224
|
-
const childPrefix = isLastItem ? TREE_SYMBOLS.EMPTY : TREE_SYMBOLS.VERTICAL;
|
|
225
|
-
if (node.stack) {
|
|
226
|
-
const counts = this.getResourceCounts(node.stack.drifts, node.stack.template);
|
|
227
|
-
const categoryName = this.determineCategory(node.stack.category || node.stack.logicalId);
|
|
228
|
-
const displayName = name.includes('/') ? name.split('/').pop() : name;
|
|
229
|
-
tree += `${prefix}${nodePrefix} ${chalk_1.default.blue(displayName)} ${chalk_1.default.gray(`(${categoryName})`)}\n`;
|
|
230
|
-
const resourcePrefix = prefix + childPrefix;
|
|
231
|
-
tree += this.formatResourceCountsAsTree(counts, resourcePrefix);
|
|
232
|
-
if (node.children && node.children.size > 0) {
|
|
233
|
-
tree = this.renderStackHierarchy(node.children, tree, prefix + childPrefix);
|
|
234
|
-
}
|
|
235
89
|
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
const rootDrifted = this.getDriftedResources(this.rootDrifts).map((drift) => ({
|
|
253
|
-
...drift,
|
|
254
|
-
stackContext: 'ROOT',
|
|
255
|
-
stackName: this.rootStackName,
|
|
256
|
-
category: 'Core Infrastructure',
|
|
257
|
-
}));
|
|
258
|
-
const nestedDrifted = this.nestedStacks.flatMap((stack) => this.getDriftedResources(stack.drifts).map((drift) => ({
|
|
259
|
-
...drift,
|
|
260
|
-
stackContext: stack.logicalId,
|
|
261
|
-
stackName: stack.physicalName,
|
|
262
|
-
category: this.determineCategory(stack.category || stack.logicalId),
|
|
263
|
-
})));
|
|
264
|
-
return [...rootDrifted, ...nestedDrifted];
|
|
265
|
-
}
|
|
266
|
-
formatDriftedResource(drift, isLast) {
|
|
267
|
-
const prefix = isLast ? TREE_SYMBOLS.LAST_BRANCH : TREE_SYMBOLS.BRANCH;
|
|
268
|
-
const parentContext = drift.stackContext === 'ROOT'
|
|
269
|
-
? chalk_1.default.gray(` → ${chalk_1.default.bold('Root Stack')}`)
|
|
270
|
-
: chalk_1.default.gray(` → ${chalk_1.default.bold(drift.category)} → ${drift.stackContext}`);
|
|
271
|
-
let result = `${prefix} ${chalk_1.default.red('DRIFTED:')} ${chalk_1.default.cyan(drift.ResourceType)} ${chalk_1.default.bold(drift.LogicalResourceId)}${parentContext}\n`;
|
|
272
|
-
if (drift.PropertyDifferences && drift.PropertyDifferences.length > 0) {
|
|
273
|
-
const detailPrefix = isLast ? TREE_SYMBOLS.EMPTY : TREE_SYMBOLS.VERTICAL;
|
|
274
|
-
result += this.formatPropertyDifferences(drift.PropertyDifferences, detailPrefix);
|
|
275
|
-
}
|
|
276
|
-
return result;
|
|
277
|
-
}
|
|
278
|
-
formatPropertyDifferences(differences, prefix) {
|
|
279
|
-
let result = '';
|
|
280
|
-
differences.forEach((propDiff, propIndex) => {
|
|
281
|
-
const isLastProp = propIndex === differences.length - 1;
|
|
282
|
-
const propPrefix = isLastProp ? TREE_SYMBOLS.LAST_BRANCH : TREE_SYMBOLS.BRANCH;
|
|
283
|
-
result += `${prefix}${propPrefix} ${chalk_1.default.yellow('PROPERTY:')} ${propDiff.PropertyPath}\n`;
|
|
284
|
-
const valuePrefix = isLastProp ? TREE_SYMBOLS.EMPTY : TREE_SYMBOLS.VERTICAL;
|
|
285
|
-
result += `${prefix}${valuePrefix}├── ${chalk_1.default.green('[+]')} ${chalk_1.default.green(propDiff.ActualValue)}\n`;
|
|
286
|
-
result += `${prefix}${valuePrefix}└── ${chalk_1.default.red('[-]')} ${chalk_1.default.red(propDiff.ExpectedValue)}\n`;
|
|
287
|
-
});
|
|
288
|
-
return result;
|
|
289
|
-
}
|
|
290
|
-
createCategoryBreakdown() {
|
|
291
|
-
let breakdown = chalk_1.default.bold('\nAMPLIFY CATEGORIES:\n');
|
|
292
|
-
const categories = this.groupStacksByCategory();
|
|
293
|
-
const categoryEntries = Array.from(categories.entries());
|
|
294
|
-
categoryEntries.forEach(([categoryName, stacks], categoryIndex) => {
|
|
295
|
-
const isLastCategory = categoryIndex === categoryEntries.length - 1;
|
|
296
|
-
const categoryPrefix = isLastCategory ? TREE_SYMBOLS.LAST_BRANCH : TREE_SYMBOLS.BRANCH;
|
|
297
|
-
const categoryIcon = this.getCategoryIcon(categoryName);
|
|
298
|
-
const totalDrifted = stacks.reduce((sum, stack) => sum + stack.drifted, 0);
|
|
299
|
-
const statusText = totalDrifted > 0
|
|
300
|
-
? chalk_1.default.red(`DRIFT DETECTED: ${totalDrifted} resource${totalDrifted === 1 ? '' : 's'}`)
|
|
301
|
-
: chalk_1.default.green('NO DRIFT DETECTED');
|
|
302
|
-
breakdown += `${categoryPrefix} ${categoryIcon} ${chalk_1.default.bold(categoryName)}\n`;
|
|
303
|
-
const stackPrefix = isLastCategory ? TREE_SYMBOLS.EMPTY : TREE_SYMBOLS.VERTICAL;
|
|
304
|
-
breakdown += `${stackPrefix}└── Status: ${statusText}\n`;
|
|
305
|
-
});
|
|
306
|
-
return breakdown;
|
|
307
|
-
}
|
|
308
|
-
groupStacksByCategory() {
|
|
309
|
-
const categories = new Map();
|
|
310
|
-
const rootCounts = this.getResourceCounts(this.rootDrifts, this.rootTemplate);
|
|
311
|
-
categories.set('Core Infrastructure', [
|
|
312
|
-
{
|
|
313
|
-
name: 'Root Stack',
|
|
314
|
-
...rootCounts,
|
|
315
|
-
},
|
|
316
|
-
]);
|
|
317
|
-
this.nestedStacks.forEach((stack) => {
|
|
318
|
-
const categoryName = this.determineCategory(stack.category || stack.logicalId);
|
|
319
|
-
const counts = this.getResourceCounts(stack.drifts, stack.template);
|
|
320
|
-
if (!categories.has(categoryName)) {
|
|
321
|
-
categories.set(categoryName, []);
|
|
322
|
-
}
|
|
323
|
-
categories.get(categoryName).push({
|
|
324
|
-
name: stack.logicalId,
|
|
325
|
-
...counts,
|
|
326
|
-
});
|
|
327
|
-
});
|
|
328
|
-
return categories;
|
|
329
|
-
}
|
|
330
|
-
countDrifted(drifts) {
|
|
331
|
-
return drifts.filter((d) => d.StackResourceDriftStatus === client_cloudformation_1.StackResourceDriftStatus.MODIFIED || d.StackResourceDriftStatus === client_cloudformation_1.StackResourceDriftStatus.DELETED).length;
|
|
332
|
-
}
|
|
333
|
-
countInSync(drifts) {
|
|
334
|
-
return drifts.filter((d) => d.StackResourceDriftStatus === client_cloudformation_1.StackResourceDriftStatus.IN_SYNC).length;
|
|
335
|
-
}
|
|
336
|
-
countUnchecked(drifts, template) {
|
|
337
|
-
const checkedResourceIds = new Set(drifts.map((d) => d.LogicalResourceId));
|
|
338
|
-
const allResourceIds = Object.keys(template.Resources || {});
|
|
339
|
-
const notInResults = allResourceIds.filter((id) => !checkedResourceIds.has(id)).length;
|
|
340
|
-
const notChecked = drifts.filter((d) => d.StackResourceDriftStatus === client_cloudformation_1.StackResourceDriftStatus.NOT_CHECKED).length;
|
|
341
|
-
return notInResults + notChecked;
|
|
342
|
-
}
|
|
343
|
-
countFailed(drifts) {
|
|
344
|
-
return drifts.filter((d) => d.StackResourceDriftStatus === client_cloudformation_1.StackResourceDriftStatus.UNKNOWN).length;
|
|
345
|
-
}
|
|
346
|
-
getDriftedResources(drifts) {
|
|
347
|
-
return drifts.filter((d) => d.StackResourceDriftStatus === client_cloudformation_1.StackResourceDriftStatus.MODIFIED || d.StackResourceDriftStatus === client_cloudformation_1.StackResourceDriftStatus.DELETED);
|
|
348
|
-
}
|
|
349
|
-
determineCategory(identifier) {
|
|
350
|
-
const idLower = identifier.toLowerCase();
|
|
351
|
-
if (idLower.includes('auth'))
|
|
352
|
-
return 'Auth';
|
|
353
|
-
if (idLower.includes('storage'))
|
|
354
|
-
return 'Storage';
|
|
355
|
-
if (idLower.includes('function'))
|
|
356
|
-
return 'Function';
|
|
357
|
-
if (idLower.includes('api'))
|
|
358
|
-
return 'API';
|
|
359
|
-
if (idLower.includes('hosting'))
|
|
360
|
-
return 'Hosting';
|
|
361
|
-
if (idLower.includes('analytics'))
|
|
362
|
-
return 'Analytics';
|
|
363
|
-
if (idLower.includes('core') || idLower.includes('infrastructure'))
|
|
364
|
-
return 'Core Infrastructure';
|
|
365
|
-
return 'Other';
|
|
366
|
-
}
|
|
367
|
-
getCategoryIcon(category) {
|
|
368
|
-
switch (category) {
|
|
369
|
-
case 'Auth':
|
|
370
|
-
return chalk_1.default.magenta('[AUTH]');
|
|
371
|
-
case 'Storage':
|
|
372
|
-
return chalk_1.default.blue('[STORAGE]');
|
|
373
|
-
case 'Function':
|
|
374
|
-
return chalk_1.default.yellow('[FUNCTION]');
|
|
375
|
-
case 'API':
|
|
376
|
-
return chalk_1.default.green('[API]');
|
|
377
|
-
case 'Hosting':
|
|
378
|
-
return chalk_1.default.cyan('[HOSTING]');
|
|
379
|
-
case 'Analytics':
|
|
380
|
-
return chalk_1.default.red('[ANALYTICS]');
|
|
381
|
-
case 'Core Infrastructure':
|
|
382
|
-
return chalk_1.default.gray('[CORE]');
|
|
383
|
-
default:
|
|
384
|
-
return chalk_1.default.white('[OTHER]');
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
addPhase2Results(results) {
|
|
388
|
-
this.phase2Results = results;
|
|
389
|
-
if (results && !results.skipped) {
|
|
390
|
-
this.summary.totalDrifted += results.totalDrifted || 0;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
addPhase3Results(results) {
|
|
394
|
-
this.phase3Results = results;
|
|
395
|
-
if (results && !results.skipped) {
|
|
396
|
-
this.summary.totalDrifted += results.totalDrifted || 0;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
formatNestedChanges(nestedChanges, prefix, level) {
|
|
400
|
-
let output = '';
|
|
401
|
-
nestedChanges.forEach((change, index) => {
|
|
402
|
-
const isLast = index === nestedChanges.length - 1;
|
|
403
|
-
const changePrefix = isLast ? '└──' : '├──';
|
|
404
|
-
const action = change.action || 'Unknown';
|
|
405
|
-
const resourceId = change.logicalResourceId || 'Unknown';
|
|
406
|
-
const resourceType = change.resourceType || 'Unknown';
|
|
407
|
-
let actionColor = chalk_1.default.yellow;
|
|
408
|
-
let actionSymbol = '~';
|
|
409
|
-
if (action === 'Add') {
|
|
410
|
-
actionColor = chalk_1.default.green;
|
|
411
|
-
actionSymbol = '+';
|
|
412
|
-
}
|
|
413
|
-
else if (action === 'Remove') {
|
|
414
|
-
actionColor = chalk_1.default.red;
|
|
415
|
-
actionSymbol = '-';
|
|
416
|
-
}
|
|
417
|
-
else if (action === 'Modify') {
|
|
418
|
-
actionColor = chalk_1.default.yellow;
|
|
419
|
-
actionSymbol = '~';
|
|
420
|
-
}
|
|
421
|
-
output += `\n${prefix}${changePrefix} ${actionColor(`${actionSymbol} ${action}`)}: ${chalk_1.default.bold(resourceId)} (${chalk_1.default.gray(resourceType)})`;
|
|
422
|
-
if (change.details && change.details.length > 0) {
|
|
423
|
-
const detailPrefix = isLast ? ' ' : '│ ';
|
|
424
|
-
change.details.forEach((detail) => {
|
|
425
|
-
if (detail.name) {
|
|
426
|
-
output += `\n${prefix}${detailPrefix}└── Property: ${detail.name}`;
|
|
427
|
-
if (detail.changeSource) {
|
|
428
|
-
output += chalk_1.default.gray(` (${detail.changeSource})`);
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
if (change.nestedChanges && change.nestedChanges.length > 0) {
|
|
434
|
-
const childPrefix = isLast ? ' ' : '│ ';
|
|
435
|
-
output += this.formatNestedChanges(change.nestedChanges, prefix + childPrefix, level + 1);
|
|
90
|
+
};
|
|
91
|
+
flattenChanges(phase2.changes, 'Other', phase2.changeSetId);
|
|
92
|
+
}
|
|
93
|
+
const localResources = [
|
|
94
|
+
...(phase3.resourcesToBeCreated || []),
|
|
95
|
+
...(phase3.resourcesToBeUpdated || []),
|
|
96
|
+
...(phase3.resourcesToBeDeleted || []),
|
|
97
|
+
...(phase3.resourcesToBeSynced || []),
|
|
98
|
+
];
|
|
99
|
+
if (!phase3.skipped && localResources.length > 0) {
|
|
100
|
+
const seenCategories = new Set();
|
|
101
|
+
for (const resource of localResources) {
|
|
102
|
+
const categoryName = (0, categories_1.extractCategory)(resource.category || resource.service || 'Other');
|
|
103
|
+
if (!seenCategories.has(categoryName)) {
|
|
104
|
+
seenCategories.add(categoryName);
|
|
105
|
+
blocks.push({ categoryName, type: 'local' });
|
|
436
106
|
}
|
|
437
|
-
});
|
|
438
|
-
return output;
|
|
439
|
-
}
|
|
440
|
-
formatPhase2Results() {
|
|
441
|
-
if (!this.phase2Results)
|
|
442
|
-
return null;
|
|
443
|
-
if (this.phase2Results.skipped) {
|
|
444
|
-
return null;
|
|
445
|
-
}
|
|
446
|
-
const changes = this.phase2Results.changes || [];
|
|
447
|
-
if (changes.length === 0) {
|
|
448
|
-
return '\nTEMPLATE CHANGES:\n└── Status: NO DRIFT DETECTED';
|
|
449
|
-
}
|
|
450
|
-
let output = '\nTEMPLATE CHANGES:';
|
|
451
|
-
if (changes.length > 0) {
|
|
452
|
-
output += '\n├── Status: ' + chalk_1.default.yellow('DRIFT DETECTED');
|
|
453
|
-
changes.forEach((change, index) => {
|
|
454
|
-
const isLast = index === changes.length - 1;
|
|
455
|
-
const prefix = isLast ? '└──' : '├──';
|
|
456
|
-
const action = change.action || 'Unknown';
|
|
457
|
-
const resourceId = change.logicalResourceId || 'Unknown';
|
|
458
|
-
const resourceType = change.resourceType || 'Unknown';
|
|
459
|
-
let actionColor = chalk_1.default.yellow;
|
|
460
|
-
let actionSymbol = '~';
|
|
461
|
-
if (action === 'Add') {
|
|
462
|
-
actionColor = chalk_1.default.green;
|
|
463
|
-
actionSymbol = '+';
|
|
464
|
-
}
|
|
465
|
-
else if (action === 'Remove') {
|
|
466
|
-
actionColor = chalk_1.default.red;
|
|
467
|
-
actionSymbol = '-';
|
|
468
|
-
}
|
|
469
|
-
else if (action === 'Modify') {
|
|
470
|
-
actionColor = chalk_1.default.yellow;
|
|
471
|
-
actionSymbol = '~';
|
|
472
|
-
}
|
|
473
|
-
output += `\n${prefix} ${actionColor(`${actionSymbol} ${action}`)}: ${chalk_1.default.bold(resourceId)} (${chalk_1.default.gray(resourceType)})`;
|
|
474
|
-
if (change.replacement) {
|
|
475
|
-
output += chalk_1.default.red(' [REQUIRES REPLACEMENT]');
|
|
476
|
-
}
|
|
477
|
-
if (change.details && change.details.length > 0) {
|
|
478
|
-
const detailPrefix = isLast ? ' ' : '│ ';
|
|
479
|
-
const isNestedStack = resourceType === 'AWS::CloudFormation::Stack';
|
|
480
|
-
const hasOnlyAutomaticChanges = change.details.every((d) => d.changeSource === 'Automatic' && !d.name);
|
|
481
|
-
if (isNestedStack && hasOnlyAutomaticChanges) {
|
|
482
|
-
if (change.nestedChanges && change.nestedChanges.length > 0) {
|
|
483
|
-
output += `\n${detailPrefix}└── ${chalk_1.default.cyan('Nested stack changes detected:')}`;
|
|
484
|
-
change.nestedChanges.forEach((nestedChange, nestedIndex) => {
|
|
485
|
-
const isLastNested = nestedIndex === change.nestedChanges.length - 1;
|
|
486
|
-
const nestedPrefix = isLastNested ? ' └──' : ' ├──';
|
|
487
|
-
const nestedAction = nestedChange.action || 'Unknown';
|
|
488
|
-
const nestedResourceId = nestedChange.logicalResourceId || 'Unknown';
|
|
489
|
-
const nestedResourceType = nestedChange.resourceType || 'Unknown';
|
|
490
|
-
let nestedActionColor = chalk_1.default.yellow;
|
|
491
|
-
let nestedActionSymbol = '~';
|
|
492
|
-
if (nestedAction === 'Add') {
|
|
493
|
-
nestedActionColor = chalk_1.default.green;
|
|
494
|
-
nestedActionSymbol = '+';
|
|
495
|
-
}
|
|
496
|
-
else if (nestedAction === 'Remove') {
|
|
497
|
-
nestedActionColor = chalk_1.default.red;
|
|
498
|
-
nestedActionSymbol = '-';
|
|
499
|
-
}
|
|
500
|
-
else if (nestedAction === 'Modify') {
|
|
501
|
-
nestedActionColor = chalk_1.default.yellow;
|
|
502
|
-
nestedActionSymbol = '~';
|
|
503
|
-
}
|
|
504
|
-
output += `\n${detailPrefix}${nestedPrefix} ${nestedActionColor(`${nestedActionSymbol} ${nestedAction}`)}: ${chalk_1.default.bold(nestedResourceId)} (${chalk_1.default.gray(nestedResourceType)})`;
|
|
505
|
-
if (nestedChange.details && nestedChange.details.length > 0) {
|
|
506
|
-
const nestedDetailPrefix = isLastNested ? ' ' : ' │ ';
|
|
507
|
-
nestedChange.details.forEach((detail) => {
|
|
508
|
-
if (detail.name) {
|
|
509
|
-
output += `\n${detailPrefix}${nestedDetailPrefix}└── Property: ${detail.name}`;
|
|
510
|
-
}
|
|
511
|
-
});
|
|
512
|
-
}
|
|
513
|
-
if (nestedChange.nestedChanges && nestedChange.nestedChanges.length > 0) {
|
|
514
|
-
output += this.formatNestedChanges(nestedChange.nestedChanges, detailPrefix + ' ', 3);
|
|
515
|
-
}
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
else {
|
|
519
|
-
output += `\n${detailPrefix}└── ${chalk_1.default.cyan('Template changed in nested stack')}`;
|
|
520
|
-
output += `\n${detailPrefix} ${chalk_1.default.gray('(The nested stack template or its resources have been modified)')}`;
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
else {
|
|
524
|
-
const propDetails = change.details.filter((d) => d.name);
|
|
525
|
-
if (propDetails.length > 0) {
|
|
526
|
-
propDetails.forEach((detail, detailIndex) => {
|
|
527
|
-
const isLastDetail = detailIndex === propDetails.length - 1;
|
|
528
|
-
const detailSymbol = isLastDetail ? '└──' : '├──';
|
|
529
|
-
let changeType = 'Modified';
|
|
530
|
-
let changeColor = chalk_1.default.yellow;
|
|
531
|
-
if (detail.changeSource === 'DirectModification') {
|
|
532
|
-
changeType = 'Direct Change';
|
|
533
|
-
changeColor = chalk_1.default.cyan;
|
|
534
|
-
}
|
|
535
|
-
else if (detail.changeSource === 'Automatic') {
|
|
536
|
-
changeType = 'Automatic';
|
|
537
|
-
changeColor = chalk_1.default.gray;
|
|
538
|
-
}
|
|
539
|
-
output += `\n${detailPrefix}${detailSymbol} ${chalk_1.default.bold('Property')}: ${detail.name}`;
|
|
540
|
-
if (detail.requiresRecreation) {
|
|
541
|
-
const recreationPrefix = isLastDetail ? ' ' : '│ ';
|
|
542
|
-
const recreationType = detail.requiresRecreation === 'Always'
|
|
543
|
-
? chalk_1.default.red('Always requires replacement')
|
|
544
|
-
: detail.requiresRecreation === 'Never'
|
|
545
|
-
? chalk_1.default.green('No replacement needed')
|
|
546
|
-
: chalk_1.default.yellow('May require replacement');
|
|
547
|
-
output += `\n${detailPrefix}${recreationPrefix}└── Impact: ${recreationType}`;
|
|
548
|
-
}
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
else if (change.details.length > 0) {
|
|
552
|
-
output += `\n${detailPrefix}└── ${chalk_1.default.gray('Template or configuration change detected')}`;
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
else {
|
|
559
|
-
output += '\n└── Status: NO DRIFT DETECTED';
|
|
560
107
|
}
|
|
561
|
-
return output;
|
|
562
108
|
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
output +=
|
|
569
|
-
if (
|
|
570
|
-
output +=
|
|
571
|
-
return output;
|
|
109
|
+
return blocks;
|
|
110
|
+
}
|
|
111
|
+
function formatPropertyDiffs(differences) {
|
|
112
|
+
let output = '';
|
|
113
|
+
for (const propDiff of differences) {
|
|
114
|
+
output += ` Property: ${propDiff.PropertyPath}\n`;
|
|
115
|
+
if (propDiff.ActualValue != null) {
|
|
116
|
+
output += ` ${chalk_1.default.green(`Deployed: "${propDiff.ActualValue}"`)}\n`;
|
|
572
117
|
}
|
|
573
|
-
if (
|
|
574
|
-
output +=
|
|
575
|
-
return output;
|
|
118
|
+
if (propDiff.ExpectedValue != null) {
|
|
119
|
+
output += ` ${chalk_1.default.red(`Expected: "${propDiff.ExpectedValue}"`)}\n`;
|
|
576
120
|
}
|
|
577
|
-
const categoryGroups = this.groupPhase3ResourcesByCategory();
|
|
578
|
-
const allCategories = this.getAllCategoriesForPhase3(categoryGroups);
|
|
579
|
-
const categoryEntries = Array.from(allCategories.entries());
|
|
580
|
-
categoryEntries.forEach(([categoryName, resources], categoryIndex) => {
|
|
581
|
-
const isLastCategory = categoryIndex === categoryEntries.length - 1;
|
|
582
|
-
const categoryPrefix = isLastCategory ? TREE_SYMBOLS.LAST_BRANCH : TREE_SYMBOLS.BRANCH;
|
|
583
|
-
const categoryIcon = this.getCategoryIcon(categoryName);
|
|
584
|
-
const statusText = resources.length > 0
|
|
585
|
-
? chalk_1.default.red(`DRIFT DETECTED: ${resources.length} resource${resources.length === 1 ? '' : 's'}`)
|
|
586
|
-
: chalk_1.default.green('NO DRIFT DETECTED');
|
|
587
|
-
output += `${categoryPrefix} ${categoryIcon} ${chalk_1.default.bold(categoryName)}\n`;
|
|
588
|
-
const stackPrefix = isLastCategory ? TREE_SYMBOLS.EMPTY : TREE_SYMBOLS.VERTICAL;
|
|
589
|
-
output += `${stackPrefix}└── Status: ${statusText}\n`;
|
|
590
|
-
});
|
|
591
|
-
return output;
|
|
592
121
|
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
122
|
+
return output;
|
|
123
|
+
}
|
|
124
|
+
function formatBlock(block) {
|
|
125
|
+
const header = block.logicalId ? `${block.categoryName.toUpperCase()} ${block.logicalId}` : block.categoryName.toUpperCase();
|
|
126
|
+
let output = chalk_1.default.bold(header) + '\n';
|
|
127
|
+
if (block.type === 'cf') {
|
|
128
|
+
const drift = block.cfDrift;
|
|
129
|
+
const symbol = getCFDriftSymbol(drift.StackResourceDriftStatus);
|
|
130
|
+
const arn = drift.PhysicalResourceId || '';
|
|
131
|
+
output += ` CloudFormation Drift: Deployed resources do not match templates\n`;
|
|
132
|
+
if (block.driftDetectionId) {
|
|
133
|
+
const stackArn = drift.StackId || '';
|
|
134
|
+
const driftUrl = cfnDriftConsoleUrl(stackArn);
|
|
135
|
+
output += ` Drift Id: ${driftUrl || block.driftDetectionId}\n`;
|
|
136
|
+
}
|
|
137
|
+
if (arn) {
|
|
138
|
+
output += `\n ${arn}\n`;
|
|
139
|
+
}
|
|
140
|
+
output += ` ${colorResourceLine(symbol, `${symbol} ${drift.ResourceType || 'Unknown'}`)}\n`;
|
|
141
|
+
if (drift.StackResourceDriftStatus === client_cloudformation_1.StackResourceDriftStatus.MODIFIED &&
|
|
142
|
+
drift.PropertyDifferences &&
|
|
143
|
+
drift.PropertyDifferences.length > 0) {
|
|
144
|
+
output += formatPropertyDiffs(drift.PropertyDifferences);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
else if (block.type === 'template') {
|
|
148
|
+
const change = block.templateChange;
|
|
149
|
+
const symbol = getActionSymbol(change.Action);
|
|
150
|
+
output += ` Template Drift: S3 and deployed templates differ\n`;
|
|
151
|
+
if (block.changeSetId) {
|
|
152
|
+
const changesetUrl = cfnChangesetConsoleUrl(block.changeSetId);
|
|
153
|
+
output += ` Changeset Id: ${changesetUrl || block.changeSetId}\n`;
|
|
154
|
+
}
|
|
155
|
+
output += ` ${colorResourceLine(symbol, `${symbol} ${change.ResourceType || 'Unknown'}`)}\n`;
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
output += ` Local Drift: Undeployed changes in this category\n`;
|
|
159
|
+
}
|
|
160
|
+
return output;
|
|
161
|
+
}
|
|
162
|
+
function createUnifiedCategoryView(phase1, phase2, phase3) {
|
|
163
|
+
const blocks = collectDriftBlocks(phase1, phase2, phase3);
|
|
164
|
+
if (blocks.length === 0) {
|
|
165
|
+
return undefined;
|
|
610
166
|
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
const categoryName = this.determineCategory(stack.category || stack.logicalId);
|
|
615
|
-
if (!allCategories.has(categoryName)) {
|
|
616
|
-
allCategories.set(categoryName, driftedCategories.get(categoryName) || []);
|
|
617
|
-
}
|
|
618
|
-
});
|
|
619
|
-
driftedCategories.forEach((resources, categoryName) => {
|
|
620
|
-
if (!allCategories.has(categoryName)) {
|
|
621
|
-
allCategories.set(categoryName, resources);
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
return allCategories;
|
|
167
|
+
let output = '\n';
|
|
168
|
+
for (const block of blocks) {
|
|
169
|
+
output += formatBlock(block) + '\n';
|
|
625
170
|
}
|
|
171
|
+
return output;
|
|
626
172
|
}
|
|
627
|
-
exports.DriftFormatter = DriftFormatter;
|
|
628
173
|
//# sourceMappingURL=drift-formatter.js.map
|