@aws-amplify/cli-internal-gen2-migration-experimental-alpha 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/adr/001-refactor-gen2-migration-generate.md +413 -0
- package/adr/002-refactor-gen2-migration-refactor.md +593 -0
- package/adr/003-gen2-migration-assess.md +414 -0
- package/adr/004-gen2-migration-validation-modeling.md +336 -0
- package/aws-amplify-cli-internal-gen2-migration-experimental-alpha-0.7.0.tgz +0 -0
- package/bin/amplify +1 -1
- package/lib/commands/drift-detection/detect-local-drift.d.ts +1 -2
- package/lib/commands/drift-detection/detect-local-drift.d.ts.map +1 -1
- package/lib/commands/drift-detection/detect-local-drift.js +19 -6
- package/lib/commands/drift-detection/detect-local-drift.js.map +1 -1
- package/lib/commands/drift-detection/detect-stack-drift.d.ts +20 -9
- package/lib/commands/drift-detection/detect-stack-drift.d.ts.map +1 -1
- package/lib/commands/drift-detection/detect-stack-drift.js +121 -151
- package/lib/commands/drift-detection/detect-stack-drift.js.map +1 -1
- package/lib/commands/drift-detection/detect-template-drift.d.ts +8 -21
- package/lib/commands/drift-detection/detect-template-drift.d.ts.map +1 -1
- package/lib/commands/drift-detection/detect-template-drift.js +81 -89
- package/lib/commands/drift-detection/detect-template-drift.js.map +1 -1
- package/lib/commands/drift-detection/index.d.ts +2 -3
- package/lib/commands/drift-detection/index.d.ts.map +1 -1
- package/lib/commands/drift-detection/index.js +1 -3
- package/lib/commands/drift-detection/index.js.map +1 -1
- package/lib/commands/drift-detection/services/amplify-config-service.d.ts +0 -1
- package/lib/commands/drift-detection/services/amplify-config-service.d.ts.map +1 -1
- package/lib/commands/drift-detection/services/amplify-config-service.js +0 -16
- package/lib/commands/drift-detection/services/amplify-config-service.js.map +1 -1
- package/lib/commands/drift-detection/services/cloudformation-service.d.ts +2 -4
- package/lib/commands/drift-detection/services/cloudformation-service.d.ts.map +1 -1
- package/lib/commands/drift-detection/services/cloudformation-service.js +7 -11
- package/lib/commands/drift-detection/services/cloudformation-service.js.map +1 -1
- package/lib/commands/drift-detection/services/drift-formatter.d.ts +3 -70
- package/lib/commands/drift-detection/services/drift-formatter.d.ts.map +1 -1
- package/lib/commands/drift-detection/services/drift-formatter.js +148 -603
- package/lib/commands/drift-detection/services/drift-formatter.js.map +1 -1
- package/lib/commands/drift-detection/services/index.d.ts +1 -2
- package/lib/commands/drift-detection/services/index.d.ts.map +1 -1
- package/lib/commands/drift-detection/services/index.js +2 -4
- package/lib/commands/drift-detection/services/index.js.map +1 -1
- package/lib/commands/drift.d.ts +7 -18
- package/lib/commands/drift.d.ts.map +1 -1
- package/lib/commands/drift.js +71 -172
- package/lib/commands/drift.js.map +1 -1
- package/lib/commands/gen2-migration/_infra/aws-clients.d.ts +31 -0
- package/lib/commands/gen2-migration/_infra/aws-clients.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/aws-clients.js +64 -0
- package/lib/commands/gen2-migration/_infra/aws-clients.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/categories.d.ts +2 -0
- package/lib/commands/gen2-migration/_infra/categories.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/categories.js +32 -0
- package/lib/commands/gen2-migration/_infra/categories.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/cfn-template.d.ts +52 -0
- package/lib/commands/gen2-migration/_infra/cfn-template.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/cfn-template.js +21 -0
- package/lib/commands/gen2-migration/_infra/cfn-template.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/operation.d.ts +16 -0
- package/lib/commands/gen2-migration/_infra/operation.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/operation.js +3 -0
- package/lib/commands/gen2-migration/_infra/operation.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/plan.d.ts +21 -0
- package/lib/commands/gen2-migration/_infra/plan.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/plan.js +111 -0
- package/lib/commands/gen2-migration/_infra/plan.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/planner.d.ts +5 -0
- package/lib/commands/gen2-migration/_infra/planner.d.ts.map +1 -0
- package/lib/commands/gen2-migration/{generate/custom-resources/types.js → _infra/planner.js} +1 -1
- package/lib/commands/gen2-migration/_infra/planner.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/spinning-logger.d.ts +25 -0
- package/lib/commands/gen2-migration/_infra/spinning-logger.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/spinning-logger.js +115 -0
- package/lib/commands/gen2-migration/_infra/spinning-logger.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/stateful-resources.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/stateful-resources.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/step.d.ts +15 -0
- package/lib/commands/gen2-migration/_infra/step.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/step.js +13 -0
- package/lib/commands/gen2-migration/_infra/step.js.map +1 -0
- package/lib/commands/gen2-migration/{_validations.d.ts → _infra/validations.d.ts} +6 -7
- package/lib/commands/gen2-migration/_infra/validations.d.ts.map +1 -0
- package/lib/commands/gen2-migration/{_validations.js → _infra/validations.js} +24 -60
- package/lib/commands/gen2-migration/_infra/validations.js.map +1 -0
- package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.js +15 -0
- package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/api/data.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/api/data.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/api/data.assessor.js +25 -0
- package/lib/commands/gen2-migration/assess/api/data.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/api/rest-api.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/api/rest-api.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/api/rest-api.assessor.js +25 -0
- package/lib/commands/gen2-migration/assess/api/rest-api.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/assessment.d.ts +42 -0
- package/lib/commands/gen2-migration/assess/assessment.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/assessment.js +118 -0
- package/lib/commands/gen2-migration/assess/assessment.js.map +1 -0
- package/lib/commands/gen2-migration/assess/assessor.d.ts +5 -0
- package/lib/commands/gen2-migration/assess/assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/{generate/types.js → assess/assessor.js} +1 -1
- package/lib/commands/gen2-migration/assess/assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.js +30 -0
- package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.js +24 -0
- package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/function/function.assessor.d.ts +12 -0
- package/lib/commands/gen2-migration/assess/function/function.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/function/function.assessor.js +40 -0
- package/lib/commands/gen2-migration/assess/function/function.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.js +19 -0
- package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.js +15 -0
- package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.js +15 -0
- package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.js +25 -0
- package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/storage/s3.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/storage/s3.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/storage/s3.assessor.js +25 -0
- package/lib/commands/gen2-migration/assess/storage/s3.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess.d.ts +9 -0
- package/lib/commands/gen2-migration/assess.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess.js +80 -0
- package/lib/commands/gen2-migration/assess.js.map +1 -0
- package/lib/commands/gen2-migration/decommission.d.ts +6 -5
- package/lib/commands/gen2-migration/decommission.d.ts.map +1 -1
- package/lib/commands/gen2-migration/decommission.js +82 -25
- package/lib/commands/gen2-migration/decommission.js.map +1 -1
- package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.d.ts +32 -0
- package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.js +136 -0
- package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.js.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/files.d.ts +2 -0
- package/lib/commands/gen2-migration/generate/_infra/files.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/{codegen-head/directory_exists.js → _infra/files.js} +4 -5
- package/lib/commands/gen2-migration/generate/_infra/files.js.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/gen1-app.d.ts +40 -0
- package/lib/commands/gen2-migration/generate/_infra/gen1-app.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/gen1-app.js +198 -0
- package/lib/commands/gen2-migration/generate/_infra/gen1-app.js.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/ts.d.ts +24 -0
- package/lib/commands/gen2-migration/generate/_infra/ts.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/ts.js +128 -0
- package/lib/commands/gen2-migration/generate/_infra/ts.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.d.ts +18 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.js +126 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.d.ts +33 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/{unsupported/cdk-from-cfn.js → amplify/analytics/kinesis-cfn-converter.js} +94 -52
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.d.ts +14 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.js +69 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.d.ts +18 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.js +68 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.d.ts +24 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.js +233 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.d.ts +78 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.js +491 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.d.ts +15 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.js +75 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.d.ts +13 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.js +33 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/backend.generator.d.ts +22 -0
- package/lib/commands/gen2-migration/generate/amplify/backend.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/backend.generator.js +150 -0
- package/lib/commands/gen2-migration/generate/amplify/backend.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/{custom-resources/transformer → amplify/custom-resources}/amplify-helper-transformer.d.ts +4 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.js +333 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.d.ts +17 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.js +190 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.generator.d.ts +15 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.generator.js +112 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.d.ts +22 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.js +167 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.generator.d.ts +49 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.generator.js +626 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.d.ts +21 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.js +105 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.d.ts +49 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.js +239 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.d.ts +14 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.js +70 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.d.ts +13 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.js +161 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/package.json.generator.d.ts +8 -0
- package/lib/commands/gen2-migration/generate/amplify/package.json.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/package.json.generator.js +28 -0
- package/lib/commands/gen2-migration/generate/amplify/package.json.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.d.ts +15 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.js +162 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.d.ts +51 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.js +269 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.d.ts +14 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.js +96 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.d.ts +30 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.js +90 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.d.ts +22 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.js +132 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.d.ts +31 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.js +137 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.d.ts +8 -0
- package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.js +45 -0
- package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify.yml.generator.d.ts +9 -0
- package/lib/commands/gen2-migration/generate/amplify.yml.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify.yml.generator.js +112 -0
- package/lib/commands/gen2-migration/generate/amplify.yml.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/gitignore.generator.d.ts +6 -0
- package/lib/commands/gen2-migration/generate/gitignore.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/gitignore.generator.js +45 -0
- package/lib/commands/gen2-migration/generate/gitignore.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/package.json.generator.d.ts +12 -0
- package/lib/commands/gen2-migration/generate/package.json.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/package.json.generator.js +83 -0
- package/lib/commands/gen2-migration/generate/package.json.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate.d.ts +6 -5
- package/lib/commands/gen2-migration/generate.d.ts.map +1 -1
- package/lib/commands/gen2-migration/generate.js +232 -17
- package/lib/commands/gen2-migration/generate.js.map +1 -1
- package/lib/commands/gen2-migration/lock.d.ts +10 -6
- package/lib/commands/gen2-migration/lock.d.ts.map +1 -1
- package/lib/commands/gen2-migration/lock.js +182 -64
- package/lib/commands/gen2-migration/lock.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.js +19 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.js +26 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.d.ts +21 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.js +87 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.js +44 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.d.ts +11 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.js +33 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.js +26 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/cfn.d.ts +41 -0
- package/lib/commands/gen2-migration/refactor/cfn.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/cfn.js +337 -0
- package/lib/commands/gen2-migration/refactor/cfn.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/index.d.ts +1 -1
- package/lib/commands/gen2-migration/refactor/index.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/index.js +1 -1
- package/lib/commands/gen2-migration/refactor/index.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.d.ts +23 -11
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.js +53 -45
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.d.ts +2 -11
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.js +89 -123
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.d.ts +2 -7
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.js +6 -22
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.d.ts +8 -12
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.js +105 -127
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.d.ts +2 -8
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.js +36 -41
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.d.ts +3 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.js +18 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/stack-facade.d.ts +13 -0
- package/lib/commands/gen2-migration/refactor/stack-facade.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/stack-facade.js +39 -0
- package/lib/commands/gen2-migration/refactor/stack-facade.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.d.ts +8 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.js +18 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.js +26 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-forward.d.ts +10 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-forward.js +36 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-rollback.js +26 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/utils.d.ts +1 -1
- package/lib/commands/gen2-migration/refactor/utils.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/utils.js +2 -2
- package/lib/commands/gen2-migration/refactor/utils.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.d.ts +52 -0
- package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.js +212 -0
- package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.d.ts +15 -0
- package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.js +148 -0
- package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.d.ts +13 -0
- package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.js +123 -0
- package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.js.map +1 -0
- package/lib/commands/gen2-migration/refactor.d.ts +11 -0
- package/lib/commands/gen2-migration/refactor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor.js +189 -0
- package/lib/commands/gen2-migration/refactor.js.map +1 -0
- package/lib/commands/gen2-migration.d.ts +0 -12
- package/lib/commands/gen2-migration.d.ts.map +1 -1
- package/lib/commands/gen2-migration.js +82 -111
- package/lib/commands/gen2-migration.js.map +1 -1
- package/package.json +21 -12
- package/aws-amplify-cli-internal-gen2-migration-experimental-alpha-0.6.0.tgz +0 -0
- package/lib/commands/drift-detection/services/file-service.d.ts +0 -7
- package/lib/commands/drift-detection/services/file-service.d.ts.map +0 -1
- package/lib/commands/drift-detection/services/file-service.js +0 -53
- package/lib/commands/drift-detection/services/file-service.js.map +0 -1
- package/lib/commands/gen2-migration/_step.d.ts +0 -17
- package/lib/commands/gen2-migration/_step.d.ts.map +0 -1
- package/lib/commands/gen2-migration/_step.js +0 -16
- package/lib/commands/gen2-migration/_step.js.map +0 -1
- package/lib/commands/gen2-migration/_validations.d.ts.map +0 -1
- package/lib/commands/gen2-migration/_validations.js.map +0 -1
- package/lib/commands/gen2-migration/cleanup.d.ts +0 -8
- package/lib/commands/gen2-migration/cleanup.d.ts.map +0 -1
- package/lib/commands/gen2-migration/cleanup.js +0 -21
- package/lib/commands/gen2-migration/cleanup.js.map +0 -1
- package/lib/commands/gen2-migration/clone.d.ts +0 -8
- package/lib/commands/gen2-migration/clone.d.ts.map +0 -1
- package/lib/commands/gen2-migration/clone.js +0 -21
- package/lib/commands/gen2-migration/clone.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/auth/index.d.ts +0 -24
- package/lib/commands/gen2-migration/generate/adapters/auth/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/auth/index.js +0 -297
- package/lib/commands/gen2-migration/generate/adapters/auth/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/auth/index.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/auth/index.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/auth/index.test.js +0 -140
- package/lib/commands/gen2-migration/generate/adapters/auth/index.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/data/index.d.ts +0 -5
- package/lib/commands/gen2-migration/generate/adapters/data/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/data/index.js +0 -17
- package/lib/commands/gen2-migration/generate/adapters/data/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.d.ts +0 -10
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.js +0 -43
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.js +0 -34
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/index.d.ts +0 -18
- package/lib/commands/gen2-migration/generate/adapters/functions/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/index.js +0 -85
- package/lib/commands/gen2-migration/generate/adapters/functions/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/project/index.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/project/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/project/index.js +0 -7
- package/lib/commands/gen2-migration/generate/adapters/project/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.d.ts +0 -31
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.js +0 -34
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.js +0 -181
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/index.d.ts +0 -3
- package/lib/commands/gen2-migration/generate/adapters/storage/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/index.js +0 -10
- package/lib/commands/gen2-migration/generate/adapters/storage/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.d.ts +0 -25
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.js +0 -76
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.js +0 -125
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/backend/synthesizer.d.ts +0 -91
- package/lib/commands/gen2-migration/generate/backend/synthesizer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/backend/synthesizer.js +0 -1014
- package/lib/commands/gen2-migration/generate/backend/synthesizer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/backend/synthesizer.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/backend/synthesizer.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/backend/synthesizer.test.js +0 -777
- package/lib/commands/gen2-migration/generate/backend/synthesizer.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.d.ts +0 -14
- package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.js +0 -82
- package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/analytics.d.ts +0 -10
- package/lib/commands/gen2-migration/generate/codegen-head/analytics.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/analytics.js +0 -11
- package/lib/commands/gen2-migration/generate/codegen-head/analytics.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.d.ts +0 -7
- package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.js +0 -80
- package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.d.ts +0 -13
- package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.js +0 -59
- package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.d.ts +0 -24
- package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.js +0 -167
- package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.d.ts +0 -21
- package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.js +0 -135
- package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.d.ts +0 -23
- package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.js +0 -181
- package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.d.ts +0 -12
- package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.js +0 -157
- package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.d.ts +0 -10
- package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.js +0 -48
- package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.d.ts +0 -11
- package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.js +0 -38
- package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.d.ts +0 -13
- package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.js +0 -498
- package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.d.ts +0 -47
- package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.js +0 -222
- package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.d.ts +0 -10
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.js +0 -59
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.js +0 -90
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.d.ts +0 -14
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.js +0 -100
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.js +0 -69
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/format.d.ts +0 -8
- package/lib/commands/gen2-migration/generate/codegen-head/format.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/format.js +0 -66
- package/lib/commands/gen2-migration/generate/codegen-head/format.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/logger.d.ts +0 -15
- package/lib/commands/gen2-migration/generate/codegen-head/logger.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/logger.js +0 -14
- package/lib/commands/gen2-migration/generate/codegen-head/logger.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/printer.d.ts +0 -26
- package/lib/commands/gen2-migration/generate/codegen-head/printer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/printer.js +0 -103
- package/lib/commands/gen2-migration/generate/codegen-head/printer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.d.ts +0 -13
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.js +0 -66
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.js +0 -97
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/core/migration-pipeline.d.ts +0 -26
- package/lib/commands/gen2-migration/generate/core/migration-pipeline.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/core/migration-pipeline.js +0 -269
- package/lib/commands/gen2-migration/generate/core/migration-pipeline.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.d.ts +0 -7
- package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.js +0 -84
- package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.d.ts +0 -8
- package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.js +0 -105
- package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.d.ts +0 -5
- package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.js +0 -88
- package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.d.ts +0 -8
- package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.js +0 -36
- package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.d.ts +0 -5
- package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.js +0 -81
- package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.d.ts +0 -15
- package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.js +0 -35
- package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.d.ts +0 -5
- package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.js +0 -66
- package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.js +0 -178
- package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/types.d.ts +0 -38
- package/lib/commands/gen2-migration/generate/custom-resources/types.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/types.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/analytics/index.d.ts +0 -9
- package/lib/commands/gen2-migration/generate/generators/analytics/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/analytics/index.js +0 -40
- package/lib/commands/gen2-migration/generate/generators/analytics/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/auth/index.d.ts +0 -107
- package/lib/commands/gen2-migration/generate/generators/auth/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/auth/index.js +0 -313
- package/lib/commands/gen2-migration/generate/generators/auth/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/auth/index.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/generators/auth/index.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/auth/index.test.js +0 -566
- package/lib/commands/gen2-migration/generate/generators/auth/index.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/data/index.d.ts +0 -35
- package/lib/commands/gen2-migration/generate/generators/data/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/data/index.js +0 -185
- package/lib/commands/gen2-migration/generate/generators/data/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/data/index.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/generators/data/index.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/data/index.test.js +0 -47
- package/lib/commands/gen2-migration/generate/generators/data/index.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/index.d.ts +0 -53
- package/lib/commands/gen2-migration/generate/generators/functions/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/index.js +0 -125
- package/lib/commands/gen2-migration/generate/generators/functions/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda.d.ts +0 -6
- package/lib/commands/gen2-migration/generate/generators/functions/lambda.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda.js +0 -16
- package/lib/commands/gen2-migration/generate/generators/functions/lambda.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.d.ts +0 -3
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.js +0 -106
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.js +0 -120
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/storage/access.d.ts +0 -4
- package/lib/commands/gen2-migration/generate/generators/storage/access.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/storage/access.js +0 -73
- package/lib/commands/gen2-migration/generate/generators/storage/access.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/storage/index.d.ts +0 -37
- package/lib/commands/gen2-migration/generate/generators/storage/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/storage/index.js +0 -78
- package/lib/commands/gen2-migration/generate/generators/storage/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/npm_package/renderer.d.ts +0 -27
- package/lib/commands/gen2-migration/generate/npm_package/renderer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/npm_package/renderer.js +0 -28
- package/lib/commands/gen2-migration/generate/npm_package/renderer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/render_pipeline.d.ts +0 -9
- package/lib/commands/gen2-migration/generate/render_pipeline.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/render_pipeline.js +0 -15
- package/lib/commands/gen2-migration/generate/render_pipeline.js.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/ensure_directory.d.ts +0 -7
- package/lib/commands/gen2-migration/generate/renderers/ensure_directory.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/ensure_directory.js +0 -17
- package/lib/commands/gen2-migration/generate/renderers/ensure_directory.js.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/package_json.d.ts +0 -8
- package/lib/commands/gen2-migration/generate/renderers/package_json.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/package_json.js +0 -15
- package/lib/commands/gen2-migration/generate/renderers/package_json.js.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.d.ts +0 -11
- package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.js +0 -22
- package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.js.map +0 -1
- package/lib/commands/gen2-migration/generate/resource/resource.d.ts +0 -20
- package/lib/commands/gen2-migration/generate/resource/resource.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/resource/resource.js +0 -60
- package/lib/commands/gen2-migration/generate/resource/resource.js.map +0 -1
- package/lib/commands/gen2-migration/generate/test_utils/import_regex.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/test_utils/import_regex.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/test_utils/import_regex.js +0 -6
- package/lib/commands/gen2-migration/generate/test_utils/import_regex.js.map +0 -1
- package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.d.ts +0 -4
- package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.js +0 -22
- package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/todo_error.d.ts +0 -3
- package/lib/commands/gen2-migration/generate/todo_error.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/todo_error.js +0 -11
- package/lib/commands/gen2-migration/generate/todo_error.js.map +0 -1
- package/lib/commands/gen2-migration/generate/ts_factory_utils.d.ts +0 -3
- package/lib/commands/gen2-migration/generate/ts_factory_utils.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/ts_factory_utils.js +0 -10
- package/lib/commands/gen2-migration/generate/ts_factory_utils.js.map +0 -1
- package/lib/commands/gen2-migration/generate/types.d.ts +0 -4
- package/lib/commands/gen2-migration/generate/types.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/types.js.map +0 -1
- package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.d.ts +0 -26
- package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.d.ts +0 -5
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.js +0 -76
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.d.ts +0 -6
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.js +0 -52
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.d.ts +0 -40
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.js +0 -321
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/generators/template-generator.d.ts +0 -48
- package/lib/commands/gen2-migration/refactor/generators/template-generator.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/generators/template-generator.js +0 -513
- package/lib/commands/gen2-migration/refactor/generators/template-generator.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/refactor.d.ts +0 -19
- package/lib/commands/gen2-migration/refactor/refactor.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/refactor.js +0 -241
- package/lib/commands/gen2-migration/refactor/refactor.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/types.d.ts +0 -128
- package/lib/commands/gen2-migration/refactor/types.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/types.js +0 -59
- package/lib/commands/gen2-migration/refactor/types.js.map +0 -1
- package/lib/commands/gen2-migration/shift.d.ts +0 -8
- package/lib/commands/gen2-migration/shift.d.ts.map +0 -1
- package/lib/commands/gen2-migration/shift.js +0 -21
- package/lib/commands/gen2-migration/shift.js.map +0 -1
- package/lib/commands/gen2-migration/stateful-resources.d.ts.map +0 -1
- package/lib/commands/gen2-migration/stateful-resources.js.map +0 -1
- /package/lib/commands/gen2-migration/{stateful-resources.d.ts → _infra/stateful-resources.d.ts} +0 -0
- /package/lib/commands/gen2-migration/{stateful-resources.js → _infra/stateful-resources.js} +0 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CFNFunction = void 0;
|
|
4
|
+
var CFNFunction;
|
|
5
|
+
(function (CFNFunction) {
|
|
6
|
+
CFNFunction["Equals"] = "Fn::Equals";
|
|
7
|
+
CFNFunction["Not"] = "Fn::Not";
|
|
8
|
+
CFNFunction["Or"] = "Fn::Or";
|
|
9
|
+
CFNFunction["And"] = "Fn::And";
|
|
10
|
+
CFNFunction["If"] = "Fn::If";
|
|
11
|
+
})(CFNFunction || (exports.CFNFunction = CFNFunction = {}));
|
|
12
|
+
class CFNConditionResolver {
|
|
13
|
+
constructor(template) {
|
|
14
|
+
this.template = template;
|
|
15
|
+
this.conditions = template.Conditions;
|
|
16
|
+
}
|
|
17
|
+
resolve(parameters) {
|
|
18
|
+
if (!this.conditions || Object.keys(this.conditions).length === 0)
|
|
19
|
+
return this.template;
|
|
20
|
+
const clonedTemplate = JSON.parse(JSON.stringify(this.template));
|
|
21
|
+
const conditionValueMap = new Map();
|
|
22
|
+
for (const [conditionKey, conditionValue] of Object.entries(this.conditions)) {
|
|
23
|
+
const fnType = Object.keys(conditionValue)[0];
|
|
24
|
+
if (Object.values(CFNFunction).includes(fnType)) {
|
|
25
|
+
const conditionStatements = conditionValue[fnType];
|
|
26
|
+
const [leftStatement, rightStatement] = conditionStatements;
|
|
27
|
+
const result = this.resolveCondition(leftStatement, rightStatement, parameters, fnType);
|
|
28
|
+
conditionValueMap.set(conditionKey, result);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
this.resolveConditionInResources(clonedTemplate.Resources, conditionValueMap);
|
|
32
|
+
return clonedTemplate;
|
|
33
|
+
}
|
|
34
|
+
resolveCondition(leftStatement, rightStatement, params, fnType) {
|
|
35
|
+
var _a, _b;
|
|
36
|
+
if (!this.conditions) {
|
|
37
|
+
throw new Error('Cannot resolve condition: template has no Conditions block');
|
|
38
|
+
}
|
|
39
|
+
let resolvedLeftStatement;
|
|
40
|
+
let resolvedRightStatement;
|
|
41
|
+
if (typeof leftStatement !== 'object') {
|
|
42
|
+
resolvedLeftStatement = leftStatement;
|
|
43
|
+
}
|
|
44
|
+
if (typeof rightStatement !== 'object') {
|
|
45
|
+
resolvedRightStatement = rightStatement;
|
|
46
|
+
}
|
|
47
|
+
if (typeof leftStatement === 'object' && 'Condition' in leftStatement) {
|
|
48
|
+
const nestedCondition = this.conditions[leftStatement.Condition];
|
|
49
|
+
const nestedFnType = Object.keys(nestedCondition)[0];
|
|
50
|
+
const [nestedLeft, nestedRight] = nestedCondition[nestedFnType];
|
|
51
|
+
resolvedLeftStatement = this.resolveCondition(nestedLeft, nestedRight, params, nestedFnType);
|
|
52
|
+
}
|
|
53
|
+
if (typeof rightStatement === 'object' && 'Condition' in rightStatement) {
|
|
54
|
+
const nestedCondition = this.conditions[rightStatement.Condition];
|
|
55
|
+
const nestedFnType = Object.keys(nestedCondition)[0];
|
|
56
|
+
const [nestedLeft, nestedRight] = nestedCondition[nestedFnType];
|
|
57
|
+
resolvedRightStatement = this.resolveCondition(nestedLeft, nestedRight, params, nestedFnType);
|
|
58
|
+
}
|
|
59
|
+
if (typeof leftStatement === 'object' && Object.values(CFNFunction).includes(Object.keys(leftStatement)[0])) {
|
|
60
|
+
const nestedFnType = Object.keys(leftStatement)[0];
|
|
61
|
+
const [nestedLeft, nestedRight] = leftStatement[nestedFnType];
|
|
62
|
+
resolvedLeftStatement = this.resolveCondition(nestedLeft, nestedRight, params, nestedFnType);
|
|
63
|
+
}
|
|
64
|
+
if (typeof rightStatement === 'object' && Object.values(CFNFunction).includes(Object.keys(rightStatement)[0])) {
|
|
65
|
+
const nestedFnType = Object.keys(rightStatement)[0];
|
|
66
|
+
const [nestedLeft, nestedRight] = rightStatement[nestedFnType];
|
|
67
|
+
resolvedRightStatement = this.resolveCondition(nestedLeft, nestedRight, params, nestedFnType);
|
|
68
|
+
}
|
|
69
|
+
if (typeof leftStatement === 'object' && 'Ref' in leftStatement) {
|
|
70
|
+
const value = (_a = params.find((p) => p.ParameterKey === leftStatement.Ref)) === null || _a === void 0 ? void 0 : _a.ParameterValue;
|
|
71
|
+
if (!value) {
|
|
72
|
+
throw new Error(`Could not resolve parameter ref: ${leftStatement.Ref}`);
|
|
73
|
+
}
|
|
74
|
+
resolvedLeftStatement = value;
|
|
75
|
+
}
|
|
76
|
+
if (rightStatement && typeof rightStatement === 'object' && 'Ref' in rightStatement) {
|
|
77
|
+
const value = (_b = params.find((p) => p.ParameterKey === rightStatement.Ref)) === null || _b === void 0 ? void 0 : _b.ParameterValue;
|
|
78
|
+
if (!value) {
|
|
79
|
+
throw new Error(`Could not resolve parameter ref: ${rightStatement.Ref}`);
|
|
80
|
+
}
|
|
81
|
+
resolvedRightStatement = value;
|
|
82
|
+
}
|
|
83
|
+
switch (fnType) {
|
|
84
|
+
case CFNFunction.Equals:
|
|
85
|
+
return resolvedLeftStatement === resolvedRightStatement;
|
|
86
|
+
case CFNFunction.Not:
|
|
87
|
+
return !resolvedLeftStatement;
|
|
88
|
+
case CFNFunction.Or:
|
|
89
|
+
return !!(resolvedLeftStatement || resolvedRightStatement);
|
|
90
|
+
case CFNFunction.And:
|
|
91
|
+
return !!(resolvedLeftStatement && resolvedRightStatement);
|
|
92
|
+
default:
|
|
93
|
+
throw new Error(`Invalid ${fnType} condition`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
resolveConditionInResources(resources, conditionValueMap) {
|
|
97
|
+
for (const [logicalId, value] of Object.entries(resources)) {
|
|
98
|
+
if (value.Condition && conditionValueMap.has(value.Condition)) {
|
|
99
|
+
if (!conditionValueMap.get(value.Condition)) {
|
|
100
|
+
delete resources[logicalId];
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
const props = value.Properties;
|
|
105
|
+
if (!props)
|
|
106
|
+
continue;
|
|
107
|
+
for (const [propName, propValue] of Object.entries(props)) {
|
|
108
|
+
if (typeof propValue === 'object' && propValue !== null) {
|
|
109
|
+
props[propName] = this.resolveIfCondition(propValue, conditionValueMap);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
resolveIfCondition(propValue, conditionValueMap) {
|
|
115
|
+
if (CFNFunction.If in propValue) {
|
|
116
|
+
const ifCondition = propValue[CFNFunction.If];
|
|
117
|
+
const conditionName = ifCondition[0];
|
|
118
|
+
if (conditionValueMap.has(conditionName)) {
|
|
119
|
+
return conditionValueMap.get(conditionName) ? ifCondition[1] : ifCondition[2];
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return propValue;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.default = CFNConditionResolver;
|
|
126
|
+
//# sourceMappingURL=cfn-condition-resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cfn-condition-resolver.js","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.ts"],"names":[],"mappings":";;;AAKA,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,oCAAqB,CAAA;IACrB,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,4BAAa,CAAA;AACf,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AAcD,MAAqB,oBAAoB;IAIvC,YAAoC,QAAa;QAAb,aAAQ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AC,SAAS,CAAC,CAAC;oBAC5B,SAAS;gBACX,CAAC;YACH,CAAC;YACD,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC;YAC/B,IAAI,CAAC,KAAK;gBAAE,SAAS;YACrB,KAAK,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC1D,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;oBACxD,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;gBAC1E,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAEO,kBAAkB,CAAC,SAAiB,EAAE,iBAAuC;QACnF,IAAI,WAAW,CAAC,EAAE,IAAI,SAAS,EAAE,CAAC;YAEhC,MAAM,WAAW,GAAI,SAAiB,CAAC,WAAW,CAAC,EAAE,CAA6B,CAAC;YACnF,MAAM,aAAa,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;YACrC,IAAI,iBAAiB,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,OAAO,iBAAiB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAChF,CAAC;QACH,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAtID,uCAsIC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { S3Client } from '@aws-sdk/client-s3';
|
|
2
|
+
import { CloudFormationClient } from '@aws-sdk/client-cloudformation';
|
|
3
|
+
export interface KinesisAnalyticsMetaEntry {
|
|
4
|
+
readonly service: 'Kinesis' | 'Pinpoint';
|
|
5
|
+
readonly providerMetadata: {
|
|
6
|
+
readonly s3TemplateURL: string;
|
|
7
|
+
readonly logicalId: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface KinesisAnalyticsDefinition extends KinesisAnalyticsMetaEntry {
|
|
11
|
+
readonly name: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AnalyticsCodegenResult {
|
|
14
|
+
readonly constructClassName: string;
|
|
15
|
+
readonly constructFileName: string;
|
|
16
|
+
readonly resourceName: string;
|
|
17
|
+
readonly shardCount: number;
|
|
18
|
+
readonly streamName: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class KinesisCfnConverter {
|
|
21
|
+
private readonly dir;
|
|
22
|
+
private readonly fileWriter;
|
|
23
|
+
private readonly cfnClient?;
|
|
24
|
+
private readonly rootStackName?;
|
|
25
|
+
private readonly s3Client;
|
|
26
|
+
constructor(dir: string, fileWriter: (content: string, filePath: string) => Promise<void>, s3Client: S3Client, cfnClient?: CloudFormationClient, rootStackName?: string);
|
|
27
|
+
generateKinesisAnalyticsL1Code(definition: KinesisAnalyticsDefinition): Promise<AnalyticsCodegenResult>;
|
|
28
|
+
private getNestedStackPhysicalName;
|
|
29
|
+
private getNestedStackParameters;
|
|
30
|
+
private getNestedStackResourcePhysicalId;
|
|
31
|
+
private preTransmute;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=kinesis-cfn-converter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinesis-cfn-converter.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAmE,MAAM,gCAAgC,CAAC;AAKvI,MAAM,WAAW,yBAAyB;IAIxC,QAAQ,CAAC,OAAO,EAAE,SAAS,GAAG,UAAU,CAAC;IAKzC,QAAQ,CAAC,gBAAgB,EAAE;QACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;QAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;KAC5B,CAAC;CACH;AAKD,MAAM,WAAW,0BAA2B,SAAQ,yBAAyB;IAI3E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAKD,MAAM,WAAW,sBAAsB;IAIrC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IAKpC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAKnC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAK9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAK5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AASD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuD;IAClF,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAuB;IAClD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAW;gBAGlC,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,EAChE,QAAQ,EAAE,QAAQ,EAClB,SAAS,CAAC,EAAE,oBAAoB,EAChC,aAAa,CAAC,EAAE,MAAM;IAeX,8BAA8B,CAAC,UAAU,EAAE,0BAA0B,GAAG,OAAO,CAAC,sBAAsB,CAAC;YAoDtG,0BAA0B;YAyB1B,wBAAwB;YA4BxB,gCAAgC;YAyBhC,YAAY;CA6B3B"}
|
|
@@ -36,99 +36,142 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.KinesisCfnConverter = void 0;
|
|
40
40
|
const path = __importStar(require("path"));
|
|
41
41
|
const fs = __importStar(require("fs/promises"));
|
|
42
42
|
const cdk_from_cfn = __importStar(require("cdk-from-cfn"));
|
|
43
|
+
const cfn_condition_resolver_1 = __importDefault(require("./cfn-condition-resolver"));
|
|
43
44
|
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
44
45
|
const client_cloudformation_1 = require("@aws-sdk/client-cloudformation");
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
constructor(dir, fileWriter, cfnClient, rootStackName) {
|
|
46
|
+
class KinesisCfnConverter {
|
|
47
|
+
constructor(dir, fileWriter, s3Client, cfnClient, rootStackName) {
|
|
48
48
|
this.dir = dir;
|
|
49
49
|
this.fileWriter = fileWriter;
|
|
50
|
+
this.s3Client = s3Client;
|
|
50
51
|
this.cfnClient = cfnClient;
|
|
51
52
|
this.rootStackName = rootStackName;
|
|
52
53
|
}
|
|
53
|
-
async
|
|
54
|
-
|
|
54
|
+
async generateKinesisAnalyticsL1Code(definition) {
|
|
55
|
+
const resourceName = definition.name;
|
|
56
|
+
const constructFileName = `${resourceName}-construct`;
|
|
57
|
+
const filePath = path.join(this.dir, 'amplify', 'analytics', `${constructFileName}.ts`);
|
|
58
|
+
const templateS3Url = definition.providerMetadata.s3TemplateURL;
|
|
59
|
+
const template = await getCfnTemplateFromS3(templateS3Url, this.s3Client);
|
|
60
|
+
const nestedStackLogicalId = definition.providerMetadata.logicalId;
|
|
61
|
+
const parameters = await this.getNestedStackParameters(nestedStackLogicalId);
|
|
62
|
+
const shardCountParam = parameters.find((p) => p.ParameterKey === 'kinesisStreamShardCount');
|
|
63
|
+
if (!(shardCountParam === null || shardCountParam === void 0 ? void 0 : shardCountParam.ParameterValue)) {
|
|
64
|
+
throw new Error(`kinesisStreamShardCount parameter not found for nested stack with logical ID: ${nestedStackLogicalId}`);
|
|
65
|
+
}
|
|
66
|
+
const shardCount = parseInt(shardCountParam.ParameterValue, 10);
|
|
67
|
+
const streamName = await this.getNestedStackResourcePhysicalId(nestedStackLogicalId, 'KinesisStream');
|
|
68
|
+
if (!streamName) {
|
|
69
|
+
throw new Error(`Could not find physical stream name for KinesisStream in nested stack: ${nestedStackLogicalId}`);
|
|
70
|
+
}
|
|
71
|
+
const finalTemplate = await this.preTransmute(template, nestedStackLogicalId);
|
|
72
|
+
const tsFile = cdk_from_cfn.transmute(JSON.stringify(finalTemplate), 'typescript', nestedStackLogicalId, 'construct');
|
|
73
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
74
|
+
const prettier = await Promise.resolve().then(() => __importStar(require('prettier')));
|
|
75
|
+
const formatted = prettier.format(tsFile, {
|
|
76
|
+
parser: 'typescript',
|
|
77
|
+
singleQuote: true,
|
|
78
|
+
tabWidth: 2,
|
|
79
|
+
printWidth: 80,
|
|
80
|
+
});
|
|
81
|
+
await this.fileWriter(formatted, filePath);
|
|
82
|
+
const classNameMatch = tsFile.match(/export class (\w+) extends/);
|
|
83
|
+
const constructClassName = classNameMatch ? classNameMatch[1] : `analytics${resourceName}`;
|
|
84
|
+
return {
|
|
85
|
+
constructClassName,
|
|
86
|
+
constructFileName,
|
|
87
|
+
resourceName,
|
|
88
|
+
shardCount,
|
|
89
|
+
streamName,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
async getNestedStackPhysicalName(logicalId) {
|
|
93
|
+
var _a, _b;
|
|
55
94
|
if (!this.cfnClient || !this.rootStackName) {
|
|
56
|
-
return
|
|
95
|
+
return undefined;
|
|
57
96
|
}
|
|
58
97
|
try {
|
|
59
98
|
const describeResourcesResponse = await this.cfnClient.send(new client_cloudformation_1.DescribeStackResourcesCommand({
|
|
60
99
|
StackName: this.rootStackName,
|
|
61
100
|
LogicalResourceId: logicalId,
|
|
62
101
|
}));
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
102
|
+
return (_b = (_a = describeResourcesResponse.StackResources) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.PhysicalResourceId;
|
|
103
|
+
}
|
|
104
|
+
catch (e) {
|
|
105
|
+
throw new Error(`Failed to describe CloudFormation stack resources: ${e}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
async getNestedStackParameters(logicalId) {
|
|
109
|
+
var _a, _b, _c;
|
|
110
|
+
if (!this.cfnClient || !this.rootStackName) {
|
|
111
|
+
return [];
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
const nestedStackName = await this.getNestedStackPhysicalName(logicalId);
|
|
115
|
+
if (!nestedStackName) {
|
|
66
116
|
return [];
|
|
67
117
|
}
|
|
68
118
|
const describeStacksResponse = await this.cfnClient.send(new client_cloudformation_1.DescribeStacksCommand({
|
|
69
|
-
StackName:
|
|
119
|
+
StackName: nestedStackName,
|
|
70
120
|
}));
|
|
71
|
-
return (
|
|
121
|
+
return (_c = (_b = (_a = describeStacksResponse.Stacks) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.Parameters) !== null && _c !== void 0 ? _c : [];
|
|
72
122
|
}
|
|
73
|
-
catch (
|
|
74
|
-
|
|
75
|
-
return [];
|
|
123
|
+
catch (e) {
|
|
124
|
+
throw new Error(`Failed to describe CloudFormation stack resources: ${e}`);
|
|
76
125
|
}
|
|
77
126
|
}
|
|
78
|
-
async
|
|
79
|
-
var _a;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
127
|
+
async getNestedStackResourcePhysicalId(nestedStackLogicalId, resourceLogicalId) {
|
|
128
|
+
var _a, _b;
|
|
129
|
+
if (!this.cfnClient || !this.rootStackName) {
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
try {
|
|
133
|
+
const nestedStackName = await this.getNestedStackPhysicalName(nestedStackLogicalId);
|
|
134
|
+
if (!nestedStackName) {
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
const describeResourcesResponse = await this.cfnClient.send(new client_cloudformation_1.DescribeStackResourcesCommand({
|
|
138
|
+
StackName: nestedStackName,
|
|
139
|
+
LogicalResourceId: resourceLogicalId,
|
|
140
|
+
}));
|
|
141
|
+
return (_b = (_a = describeResourcesResponse.StackResources) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.PhysicalResourceId;
|
|
142
|
+
}
|
|
143
|
+
catch (e) {
|
|
144
|
+
throw new Error(`Failed to describe CloudFormation stack resources: ${e}`);
|
|
90
145
|
}
|
|
91
|
-
const shardCount = parseInt(shardCountParam.ParameterValue, 10);
|
|
92
|
-
const finalTemplate = await this.preTransmute(template, stackName);
|
|
93
|
-
const tsFile = cdk_from_cfn.transmute(JSON.stringify(finalTemplate), 'typescript', stackName);
|
|
94
|
-
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
95
|
-
await this.fileWriter(tsFile, filePath);
|
|
96
|
-
const classNameMatch = tsFile.match(/export class (\w+) extends/);
|
|
97
|
-
const stackClassName = classNameMatch ? classNameMatch[1] : `analytics${resourceName}`;
|
|
98
|
-
return {
|
|
99
|
-
stackClassName,
|
|
100
|
-
stackFileName,
|
|
101
|
-
resourceName,
|
|
102
|
-
shardCount,
|
|
103
|
-
};
|
|
104
146
|
}
|
|
105
147
|
async preTransmute(template, logicalId) {
|
|
106
148
|
var _a;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
149
|
+
const result = JSON.parse(JSON.stringify(template));
|
|
150
|
+
if ((_a = result.Parameters) === null || _a === void 0 ? void 0 : _a.env) {
|
|
151
|
+
result.Parameters['branchName'] = result.Parameters.env;
|
|
152
|
+
delete result.Parameters.env;
|
|
110
153
|
}
|
|
111
154
|
const updateRefs = (obj) => {
|
|
112
155
|
if (typeof obj === 'object' && obj !== null) {
|
|
113
156
|
const record = obj;
|
|
114
157
|
if (record.Ref === 'env') {
|
|
115
|
-
record.Ref = '
|
|
158
|
+
record.Ref = 'branchName';
|
|
116
159
|
}
|
|
117
160
|
Object.values(record).forEach(updateRefs);
|
|
118
161
|
}
|
|
119
162
|
};
|
|
120
|
-
updateRefs(
|
|
121
|
-
const parameters = await this.
|
|
163
|
+
updateRefs(result.Resources);
|
|
164
|
+
const parameters = await this.getNestedStackParameters(logicalId);
|
|
122
165
|
if (parameters.length > 0) {
|
|
123
|
-
const resolved = new cfn_condition_resolver_1.default(
|
|
166
|
+
const resolved = new cfn_condition_resolver_1.default(result).resolve(parameters);
|
|
124
167
|
delete resolved.Conditions;
|
|
125
168
|
return resolved;
|
|
126
169
|
}
|
|
127
|
-
return
|
|
170
|
+
return result;
|
|
128
171
|
}
|
|
129
172
|
}
|
|
130
|
-
exports.
|
|
131
|
-
async function getCfnTemplateFromS3(s3Url) {
|
|
173
|
+
exports.KinesisCfnConverter = KinesisCfnConverter;
|
|
174
|
+
async function getCfnTemplateFromS3(s3Url, s3Client) {
|
|
132
175
|
const url = new URL(s3Url);
|
|
133
176
|
let bucket;
|
|
134
177
|
let key;
|
|
@@ -142,11 +185,10 @@ async function getCfnTemplateFromS3(s3Url) {
|
|
|
142
185
|
bucket = splitPath[1];
|
|
143
186
|
key = splitPath.slice(2).join('/');
|
|
144
187
|
}
|
|
145
|
-
const s3Client = new client_s3_1.S3Client({});
|
|
146
188
|
const response = await s3Client.send(new client_s3_1.GetObjectCommand({ Bucket: bucket, Key: key }));
|
|
147
189
|
if (!response.Body) {
|
|
148
190
|
throw new Error(`Failed to retrieve S3 object: ${s3Url}`);
|
|
149
191
|
}
|
|
150
192
|
return JSON.parse(await response.Body.transformToString());
|
|
151
193
|
}
|
|
152
|
-
//# sourceMappingURL=
|
|
194
|
+
//# sourceMappingURL=kinesis-cfn-converter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinesis-cfn-converter.js","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.ts"],"names":[],"mappings":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,SAAS,CAAC,CAAC,CAAC,CAAC;QACtB,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,4BAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IACzF,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,iCAAiC,KAAK,EAAE,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Planner } from '../../../_infra/planner';
|
|
2
|
+
import { AmplifyMigrationOperation } from '../../../_infra/operation';
|
|
3
|
+
import { BackendGenerator } from '../backend.generator';
|
|
4
|
+
import { Gen1App, DiscoveredResource } from '../../_infra/gen1-app';
|
|
5
|
+
export declare class AnalyticsKinesisGenerator implements Planner {
|
|
6
|
+
private readonly gen1App;
|
|
7
|
+
private readonly backendGenerator;
|
|
8
|
+
private readonly outputDir;
|
|
9
|
+
private readonly resource;
|
|
10
|
+
private readonly renderer;
|
|
11
|
+
constructor(gen1App: Gen1App, backendGenerator: BackendGenerator, outputDir: string, resource: DiscoveredResource);
|
|
12
|
+
plan(): Promise<AmplifyMigrationOperation[]>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=kinesis.generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinesis.generator.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAcpE,qBAAa,yBAA0B,YAAW,OAAO;IACvD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;IAClC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAmB;IACpD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;gBAE1B,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB;IAW3G,IAAI,IAAI,OAAO,CAAC,yBAAyB,EAAE,CAAC;CAyE1D"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AnalyticsKinesisGenerator = void 0;
|
|
7
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
+
const promises_1 = __importDefault(require("node:fs/promises"));
|
|
9
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
10
|
+
const ts_1 = require("../../_infra/ts");
|
|
11
|
+
const kinesis_renderer_1 = require("./kinesis.renderer");
|
|
12
|
+
const kinesis_cfn_converter_1 = require("./kinesis-cfn-converter");
|
|
13
|
+
const factory = typescript_1.default.factory;
|
|
14
|
+
class AnalyticsKinesisGenerator {
|
|
15
|
+
constructor(gen1App, backendGenerator, outputDir, resource) {
|
|
16
|
+
this.gen1App = gen1App;
|
|
17
|
+
this.backendGenerator = backendGenerator;
|
|
18
|
+
this.outputDir = outputDir;
|
|
19
|
+
this.resource = resource;
|
|
20
|
+
this.renderer = new kinesis_renderer_1.AnalyticsRenderer();
|
|
21
|
+
}
|
|
22
|
+
async plan() {
|
|
23
|
+
const analyticsCategory = this.gen1App.meta('analytics');
|
|
24
|
+
const resourceMeta = analyticsCategory === null || analyticsCategory === void 0 ? void 0 : analyticsCategory[this.resource.resourceName];
|
|
25
|
+
if (!resourceMeta) {
|
|
26
|
+
throw new Error(`Analytics resource '${this.resource.resourceName}' not found in amplify-meta.json`);
|
|
27
|
+
}
|
|
28
|
+
const rootStackName = this.gen1App.rootStackName;
|
|
29
|
+
const analyticsDir = node_path_1.default.join(this.outputDir, 'amplify', 'analytics');
|
|
30
|
+
const definition = {
|
|
31
|
+
name: this.resource.resourceName,
|
|
32
|
+
service: 'Kinesis',
|
|
33
|
+
providerMetadata: resourceMeta.providerMetadata,
|
|
34
|
+
};
|
|
35
|
+
return [
|
|
36
|
+
{
|
|
37
|
+
resource: this.resource,
|
|
38
|
+
validate: () => undefined,
|
|
39
|
+
describe: async () => [`Generate amplify/analytics/${this.resource.resourceName}/resource.ts`],
|
|
40
|
+
execute: async () => {
|
|
41
|
+
const fileWriter = async (content, filePath) => {
|
|
42
|
+
await promises_1.default.mkdir(node_path_1.default.dirname(filePath), { recursive: true });
|
|
43
|
+
await promises_1.default.writeFile(filePath, content, 'utf-8');
|
|
44
|
+
};
|
|
45
|
+
const kinesisCfnConverter = new kinesis_cfn_converter_1.KinesisCfnConverter(this.outputDir, fileWriter, this.gen1App.clients.s3, this.gen1App.clients.cloudFormation, rootStackName);
|
|
46
|
+
const codegenResult = await kinesisCfnConverter.generateKinesisAnalyticsL1Code(definition);
|
|
47
|
+
const nodes = this.renderer.render({
|
|
48
|
+
constructClassName: codegenResult.constructClassName,
|
|
49
|
+
constructFileName: codegenResult.constructFileName,
|
|
50
|
+
resourceName: codegenResult.resourceName,
|
|
51
|
+
shardCount: codegenResult.shardCount,
|
|
52
|
+
streamName: codegenResult.streamName,
|
|
53
|
+
});
|
|
54
|
+
const content = ts_1.TS.printNodes(nodes);
|
|
55
|
+
await promises_1.default.mkdir(analyticsDir, { recursive: true });
|
|
56
|
+
await promises_1.default.writeFile(node_path_1.default.join(analyticsDir, 'resource.ts'), content, 'utf-8');
|
|
57
|
+
this.backendGenerator.addImport('./analytics/resource', ['defineAnalytics']);
|
|
58
|
+
this.backendGenerator.addEarlyStatement(factory.createVariableStatement(undefined, factory.createVariableDeclarationList([
|
|
59
|
+
factory.createVariableDeclaration('analytics', undefined, undefined, factory.createCallExpression(factory.createIdentifier('defineAnalytics'), undefined, [
|
|
60
|
+
factory.createIdentifier('backend'),
|
|
61
|
+
])),
|
|
62
|
+
], typescript_1.default.NodeFlags.Const)));
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.AnalyticsKinesisGenerator = AnalyticsKinesisGenerator;
|
|
69
|
+
//# sourceMappingURL=kinesis.generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinesis.generator.js","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA6B;AAC7B,gEAAkC;AAClC,4DAA4B;AAK5B,wCAAqC;AACrC,yDAAuD;AACvD,mEAA0F;AAE1F,MAAM,OAAO,GAAG,oBAAE,CAAC,OAAO,CAAC;AAS3B,MAAa,yBAAyB;IAOpC,YAAmB,OAAgB,EAAE,gBAAkC,EAAE,SAAiB,EAAE,QAA4B;QACtH,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG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AAC,gBAAgB,CAAC,SAAS,CAAC;yBACpC,CAAC,CACH;qBACF,EACD,oBAAE,CAAC,SAAS,CAAC,KAAK,CACnB,CACF,CACF,CAAC;gBACJ,CAAC;aACF;SACF,CAAC;IACJ,CAAC;CACF;AA3FD,8DA2FC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import ts from 'typescript';
|
|
2
|
+
export interface RenderDefineAnalyticsOptions {
|
|
3
|
+
readonly constructClassName: string;
|
|
4
|
+
readonly constructFileName: string;
|
|
5
|
+
readonly resourceName: string;
|
|
6
|
+
readonly shardCount: number;
|
|
7
|
+
readonly streamName: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class AnalyticsRenderer {
|
|
10
|
+
render(opts: RenderDefineAnalyticsOptions): ts.NodeArray<ts.Node>;
|
|
11
|
+
private createImports;
|
|
12
|
+
private createStackCall;
|
|
13
|
+
private createConstructInstantiation;
|
|
14
|
+
private createAuthRoleAccess;
|
|
15
|
+
private createUnauthRoleAccess;
|
|
16
|
+
private createExportStatement;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=kinesis.renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinesis.renderer.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAQ5B,MAAM,WAAW,4BAA4B;IAI3C,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IAKpC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAKnC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAK9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAK5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAMD,qBAAa,iBAAiB;IAIrB,MAAM,CAAC,IAAI,EAAE,4BAA4B,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC;IAQxE,OAAO,CAAC,aAAa;IAkCrB,OAAO,CAAC,eAAe;IAqBvB,OAAO,CAAC,4BAA4B;IAkDpC,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,sBAAsB;IAa9B,OAAO,CAAC,qBAAqB;CA2C9B"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AnalyticsRenderer = void 0;
|
|
7
|
+
const typescript_1 = __importDefault(require("typescript"));
|
|
8
|
+
const ts_1 = require("../../_infra/ts");
|
|
9
|
+
const factory = typescript_1.default.factory;
|
|
10
|
+
class AnalyticsRenderer {
|
|
11
|
+
render(opts) {
|
|
12
|
+
const imports = this.createImports(opts.constructClassName, opts.constructFileName);
|
|
13
|
+
const branchNameConst = ts_1.TS.createBranchNameDeclaration();
|
|
14
|
+
const exportStatement = this.createExportStatement(opts);
|
|
15
|
+
return factory.createNodeArray([...imports, ts_1.newLineIdentifier, branchNameConst, ts_1.newLineIdentifier, exportStatement]);
|
|
16
|
+
}
|
|
17
|
+
createImports(constructClassName, constructFileName) {
|
|
18
|
+
const cfnStreamImport = factory.createImportDeclaration(undefined, factory.createImportClause(false, undefined, factory.createNamedImports([factory.createImportSpecifier(false, undefined, factory.createIdentifier('CfnStream'))])), factory.createStringLiteral('aws-cdk-lib/aws-kinesis'));
|
|
19
|
+
const constructImport = factory.createImportDeclaration(undefined, factory.createImportClause(false, undefined, factory.createNamedImports([factory.createImportSpecifier(false, undefined, factory.createIdentifier(constructClassName))])), factory.createStringLiteral(`./${constructFileName}`));
|
|
20
|
+
const backendImport = factory.createImportDeclaration(undefined, factory.createImportClause(false, undefined, factory.createNamedImports([factory.createImportSpecifier(false, undefined, factory.createIdentifier('Backend'))])), factory.createStringLiteral('@aws-amplify/backend'));
|
|
21
|
+
return [cfnStreamImport, constructImport, backendImport];
|
|
22
|
+
}
|
|
23
|
+
createStackCall() {
|
|
24
|
+
return factory.createVariableStatement(undefined, factory.createVariableDeclarationList([
|
|
25
|
+
factory.createVariableDeclaration('analyticsStack', undefined, undefined, factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier('backend'), factory.createIdentifier('createStack')), undefined, [factory.createStringLiteral('analytics')])),
|
|
26
|
+
], typescript_1.default.NodeFlags.Const));
|
|
27
|
+
}
|
|
28
|
+
createConstructInstantiation(opts) {
|
|
29
|
+
const { constructClassName, resourceName, shardCount } = opts;
|
|
30
|
+
return factory.createVariableStatement(undefined, factory.createVariableDeclarationList([
|
|
31
|
+
factory.createVariableDeclaration('analytics', undefined, undefined, factory.createNewExpression(factory.createIdentifier(constructClassName), undefined, [
|
|
32
|
+
factory.createIdentifier('analyticsStack'),
|
|
33
|
+
factory.createStringLiteral(resourceName),
|
|
34
|
+
factory.createObjectLiteralExpression([
|
|
35
|
+
factory.createPropertyAssignment(factory.createIdentifier('kinesisStreamName'), factory.createStringLiteral(resourceName)),
|
|
36
|
+
factory.createPropertyAssignment(factory.createIdentifier('kinesisStreamShardCount'), factory.createNumericLiteral(shardCount)),
|
|
37
|
+
factory.createPropertyAssignment(factory.createIdentifier('authPolicyName'), factory.createTemplateExpression(factory.createTemplateHead(`${resourceName}-auth-policy-`), [
|
|
38
|
+
factory.createTemplateSpan(factory.createIdentifier('branchName'), factory.createTemplateTail('')),
|
|
39
|
+
])),
|
|
40
|
+
factory.createPropertyAssignment(factory.createIdentifier('unauthPolicyName'), factory.createTemplateExpression(factory.createTemplateHead(`${resourceName}-unauth-policy-`), [
|
|
41
|
+
factory.createTemplateSpan(factory.createIdentifier('branchName'), factory.createTemplateTail('')),
|
|
42
|
+
])),
|
|
43
|
+
factory.createPropertyAssignment(factory.createIdentifier('authRoleName'), this.createAuthRoleAccess()),
|
|
44
|
+
factory.createPropertyAssignment(factory.createIdentifier('unauthRoleName'), this.createUnauthRoleAccess()),
|
|
45
|
+
factory.createShorthandPropertyAssignment(factory.createIdentifier('branchName')),
|
|
46
|
+
], true),
|
|
47
|
+
])),
|
|
48
|
+
], typescript_1.default.NodeFlags.Const));
|
|
49
|
+
}
|
|
50
|
+
createAuthRoleAccess() {
|
|
51
|
+
return factory.createPropertyAccessExpression(factory.createPropertyAccessExpression(factory.createPropertyAccessExpression(factory.createPropertyAccessExpression(factory.createIdentifier('backend'), factory.createIdentifier('auth')), factory.createIdentifier('resources')), factory.createIdentifier('authenticatedUserIamRole')), factory.createIdentifier('roleName'));
|
|
52
|
+
}
|
|
53
|
+
createUnauthRoleAccess() {
|
|
54
|
+
return factory.createPropertyAccessExpression(factory.createPropertyAccessExpression(factory.createPropertyAccessExpression(factory.createPropertyAccessExpression(factory.createIdentifier('backend'), factory.createIdentifier('auth')), factory.createIdentifier('resources')), factory.createIdentifier('unauthenticatedUserIamRole')), factory.createIdentifier('roleName'));
|
|
55
|
+
}
|
|
56
|
+
createExportStatement(opts) {
|
|
57
|
+
const { streamName } = opts;
|
|
58
|
+
const returnStatement = factory.createReturnStatement(factory.createIdentifier('analytics'));
|
|
59
|
+
const postRefactorComment = typescript_1.default.addSyntheticLeadingComment(returnStatement, typescript_1.default.SyntaxKind.SingleLineCommentTrivia, 'Use this kinesis stream name post-refactor', true);
|
|
60
|
+
const postRefactorCode = typescript_1.default.addSyntheticLeadingComment(postRefactorComment, typescript_1.default.SyntaxKind.SingleLineCommentTrivia, `(analytics.node.findChild('KinesisStream') as CfnStream).name = "${streamName}"`, false);
|
|
61
|
+
const arrowFunction = factory.createArrowFunction(undefined, undefined, [
|
|
62
|
+
factory.createParameterDeclaration(undefined, undefined, factory.createIdentifier('backend'), undefined, factory.createTypeReferenceNode(factory.createIdentifier('Backend'), [factory.createKeywordTypeNode(typescript_1.default.SyntaxKind.AnyKeyword)])),
|
|
63
|
+
], undefined, factory.createToken(typescript_1.default.SyntaxKind.EqualsGreaterThanToken), factory.createBlock([this.createStackCall(), this.createConstructInstantiation(opts), postRefactorCode], true));
|
|
64
|
+
return factory.createVariableStatement([factory.createModifier(typescript_1.default.SyntaxKind.ExportKeyword)], factory.createVariableDeclarationList([factory.createVariableDeclaration(factory.createIdentifier('defineAnalytics'), undefined, undefined, arrowFunction)], typescript_1.default.NodeFlags.Const));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.AnalyticsRenderer = AnalyticsRenderer;
|
|
68
|
+
//# sourceMappingURL=kinesis.renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kinesis.renderer.js","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,wCAAwD;AAExD,MAAM,OAAO,GAAG,oBAAE,CAAC,OAAO,CAAC;AAoC3B,MAAa,iBAAiB;IAIrB,MAAM,CAAC,IAAkC;QAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACpF,MAAM,eAAe,GAAG,OAAE,CAAC,2BAA2B,EAAE,CAAC;QACzD,MAAM,eAAe,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAEzD,OAAO,OAAO,CAAC,eAAe,CAAC,CAAC,GAAG,OAAO,EAAE,sBAAiB,EAAE,eAAe,EAAE,sBAAiB,EAAE,eAAe,CAAC,CAAC,CAAC;IACvH,CAAC;IAEO,aAAa,CAAC,kBAA0B,EAAE,iBAAyB;QACzE,MAAM,eAAe,GAAG,OAAO,CAAC,uBAAuB,CACrD,SAAS,EACT,OAAO,CAAC,kBAAkB,CACxB,KAAK,EACL,SAAS,EACT,OAAO,CAAC,kBAAkB,CAAC,CAAC,OAAO,CAAC,qBAAqB,CAAC,KAAK,EAAE,S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