@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
|
@@ -1,92 +1,210 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AmplifyMigrationLockStep = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const amplify_cli_core_1 = require("@aws-amplify/amplify-cli-core");
|
|
4
|
+
const step_1 = require("./_infra/step");
|
|
5
|
+
const plan_1 = require("./_infra/plan");
|
|
7
6
|
const client_cloudformation_1 = require("@aws-sdk/client-cloudformation");
|
|
8
7
|
const client_amplify_1 = require("@aws-sdk/client-amplify");
|
|
9
8
|
const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
const GEN2_MIGRATION_ENVIRONMENT_NAME = 'GEN2_MIGRATION_ENVIRONMENT_NAME';
|
|
10
|
+
const LOCK_STATEMENT = {
|
|
11
|
+
Effect: 'Deny',
|
|
12
|
+
Action: 'Update:*',
|
|
13
|
+
Principal: '*',
|
|
14
|
+
Resource: '*',
|
|
15
|
+
};
|
|
16
|
+
const isLockStatement = (statement) => statement.Effect === LOCK_STATEMENT.Effect &&
|
|
17
|
+
statement.Action === LOCK_STATEMENT.Action &&
|
|
18
|
+
statement.Principal === LOCK_STATEMENT.Principal &&
|
|
19
|
+
statement.Resource === LOCK_STATEMENT.Resource;
|
|
20
|
+
const ALLOW_ALL_POLICY = {
|
|
21
|
+
Statement: [
|
|
22
|
+
{
|
|
23
|
+
Effect: 'Allow',
|
|
24
|
+
Action: 'Update:*',
|
|
25
|
+
Principal: '*',
|
|
26
|
+
Resource: '*',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
class AmplifyMigrationLockStep extends step_1.AmplifyMigrationStep {
|
|
31
|
+
async forward() {
|
|
32
|
+
const operations = [];
|
|
33
|
+
operations.push({
|
|
34
|
+
describe: async () => [],
|
|
35
|
+
validate: () => ({ description: 'Environment Status', run: () => this.validateDeploymentStatus() }),
|
|
36
|
+
execute: async () => { },
|
|
37
|
+
});
|
|
38
|
+
operations.push({
|
|
39
|
+
describe: async () => [],
|
|
40
|
+
validate: () => ({ description: 'Drift', run: () => this.validateDrift() }),
|
|
41
|
+
execute: async () => { },
|
|
42
|
+
});
|
|
43
|
+
for (const tableName of await this.dynamoTableNames()) {
|
|
44
|
+
operations.push({
|
|
45
|
+
validate: () => undefined,
|
|
46
|
+
describe: async () => [`Enable deletion protection for table '${tableName}'`],
|
|
47
|
+
execute: async () => {
|
|
48
|
+
await this.gen1App.clients.dynamoDB.send(new client_dynamodb_1.UpdateTableCommand({
|
|
49
|
+
TableName: tableName,
|
|
50
|
+
DeletionProtectionEnabled: true,
|
|
51
|
+
}));
|
|
52
|
+
this.logger.info(`Enabled deletion protection for table '${tableName}'`);
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
operations.push({
|
|
57
|
+
validate: () => undefined,
|
|
58
|
+
describe: async () => [`Add environment variable '${GEN2_MIGRATION_ENVIRONMENT_NAME}' (value: ${this.gen1App.envName})`],
|
|
59
|
+
execute: async () => {
|
|
60
|
+
var _a;
|
|
61
|
+
const app = await this.gen1App.clients.amplify.send(new client_amplify_1.GetAppCommand({ appId: this.gen1App.appId }));
|
|
62
|
+
const environmentVariables = { ...((_a = app.app.environmentVariables) !== null && _a !== void 0 ? _a : {}), [GEN2_MIGRATION_ENVIRONMENT_NAME]: this.gen1App.envName };
|
|
63
|
+
await this.gen1App.clients.amplify.send(new client_amplify_1.UpdateAppCommand({ appId: this.gen1App.appId, environmentVariables }));
|
|
64
|
+
this.logger.info(`Added '${GEN2_MIGRATION_ENVIRONMENT_NAME}' environment variable (value: ${this.gen1App.envName})`);
|
|
27
65
|
},
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
66
|
+
});
|
|
67
|
+
operations.push({
|
|
68
|
+
validate: () => undefined,
|
|
69
|
+
describe: async () => {
|
|
70
|
+
return [`Add lock statement to stack policy on '${this.gen1App.rootStackName}': ${JSON.stringify(LOCK_STATEMENT)}`];
|
|
71
|
+
},
|
|
72
|
+
execute: async () => {
|
|
73
|
+
const existingPolicy = await this.getExistingStackPolicy();
|
|
74
|
+
const alreadyLocked = existingPolicy.Statement.some(isLockStatement);
|
|
75
|
+
if (alreadyLocked) {
|
|
76
|
+
this.logger.info(`Lock statement already exists in stack policy on '${this.gen1App.rootStackName}', skipping`);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
existingPolicy.Statement.push(LOCK_STATEMENT);
|
|
80
|
+
const mergedPolicy = JSON.stringify(existingPolicy);
|
|
81
|
+
await this.gen1App.clients.cloudFormation.send(new client_cloudformation_1.SetStackPolicyCommand({
|
|
82
|
+
StackName: this.gen1App.rootStackName,
|
|
83
|
+
StackPolicyBody: mergedPolicy,
|
|
37
84
|
}));
|
|
38
|
-
this.logger.info(`
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
85
|
+
this.logger.info(`Successfully added lock statement to stack policy on '${this.gen1App.rootStackName}'`);
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
return new plan_1.Plan({
|
|
89
|
+
operations,
|
|
90
|
+
logger: this.logger,
|
|
91
|
+
title: 'Execute',
|
|
92
|
+
implications: [
|
|
93
|
+
`You will not be able to run 'amplify push' on environment '${this.gen1App.envName}'`,
|
|
94
|
+
`You will not be able to migrate another environment until migration of '${this.gen1App.envName}' is complete or rolled back`,
|
|
49
95
|
],
|
|
50
|
-
};
|
|
51
|
-
const cfnClient = new client_cloudformation_1.CloudFormationClient({});
|
|
52
|
-
await cfnClient.send(new client_cloudformation_1.SetStackPolicyCommand({
|
|
53
|
-
StackName: this.rootStackName,
|
|
54
|
-
StackPolicyBody: JSON.stringify(stackPolicy),
|
|
55
|
-
}));
|
|
56
|
-
this.logger.info(`Root stack '${this.rootStackName}' has been locked`);
|
|
96
|
+
});
|
|
57
97
|
}
|
|
58
98
|
async rollback() {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
99
|
+
const operations = [];
|
|
100
|
+
for (const tableName of await this.dynamoTableNames()) {
|
|
101
|
+
operations.push({
|
|
102
|
+
validate: () => undefined,
|
|
103
|
+
describe: async () => [`Preserve deletion protection for table '${tableName}'`],
|
|
104
|
+
execute: async () => { },
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
operations.push({
|
|
108
|
+
validate: () => undefined,
|
|
109
|
+
describe: async () => [`Remove environment variable '${GEN2_MIGRATION_ENVIRONMENT_NAME}'`],
|
|
110
|
+
execute: async () => {
|
|
111
|
+
var _a;
|
|
112
|
+
const app = await this.gen1App.clients.amplify.send(new client_amplify_1.GetAppCommand({ appId: this.gen1App.appId }));
|
|
113
|
+
const environmentVariables = (_a = app.app.environmentVariables) !== null && _a !== void 0 ? _a : {};
|
|
114
|
+
delete environmentVariables[GEN2_MIGRATION_ENVIRONMENT_NAME];
|
|
115
|
+
await this.gen1App.clients.amplify.send(new client_amplify_1.UpdateAppCommand({ appId: this.gen1App.appId, environmentVariables }));
|
|
116
|
+
this.logger.info(`Removed ${GEN2_MIGRATION_ENVIRONMENT_NAME} environment variable`);
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
operations.push({
|
|
120
|
+
validate: () => undefined,
|
|
121
|
+
describe: async () => {
|
|
122
|
+
return [`Remove lock statement from stack policy on '${this.gen1App.rootStackName}': ${JSON.stringify(LOCK_STATEMENT)}`];
|
|
123
|
+
},
|
|
124
|
+
execute: async () => {
|
|
125
|
+
const existingPolicy = await this.getExistingStackPolicy();
|
|
126
|
+
const index = existingPolicy.Statement.findIndex(isLockStatement);
|
|
127
|
+
if (index === -1) {
|
|
128
|
+
this.logger.info(`Lock statement not found in stack policy on '${this.gen1App.rootStackName}'`);
|
|
129
|
+
return;
|
|
69
130
|
}
|
|
70
|
-
|
|
131
|
+
existingPolicy.Statement.splice(index, 1);
|
|
132
|
+
const restoredPolicy = existingPolicy.Statement.length > 0 ? JSON.stringify(existingPolicy) : JSON.stringify(ALLOW_ALL_POLICY);
|
|
133
|
+
await this.gen1App.clients.cloudFormation.send(new client_cloudformation_1.SetStackPolicyCommand({
|
|
134
|
+
StackName: this.gen1App.rootStackName,
|
|
135
|
+
StackPolicyBody: restoredPolicy,
|
|
136
|
+
}));
|
|
137
|
+
this.logger.info(`Successfully removed lock statement from stack policy on '${this.gen1App.rootStackName}': ${JSON.stringify(LOCK_STATEMENT)}`);
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
return new plan_1.Plan({
|
|
141
|
+
operations,
|
|
142
|
+
logger: this.logger,
|
|
143
|
+
title: 'Rollback',
|
|
144
|
+
implications: [
|
|
145
|
+
`You will be able to run 'amplify push' on environment '${this.gen1App.envName}'`,
|
|
146
|
+
`You will be able to start migration of another environment`,
|
|
147
|
+
],
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
async validateDeploymentStatus() {
|
|
151
|
+
try {
|
|
152
|
+
await this.validations.validateDeploymentStatus();
|
|
153
|
+
return { valid: true };
|
|
71
154
|
}
|
|
72
|
-
|
|
73
|
-
|
|
155
|
+
catch (e) {
|
|
156
|
+
return { valid: false, report: e.message };
|
|
74
157
|
}
|
|
75
|
-
|
|
158
|
+
}
|
|
159
|
+
async validateDrift() {
|
|
160
|
+
try {
|
|
161
|
+
await this.validations.validateDrift();
|
|
162
|
+
return { valid: true };
|
|
163
|
+
}
|
|
164
|
+
catch (e) {
|
|
165
|
+
return { valid: false, report: e.message };
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
async findGraphQLApiId() {
|
|
169
|
+
const graphQL = this.gen1App.discover().find((r) => r.category === 'api' && r.service === 'AppSync');
|
|
170
|
+
if (!graphQL) {
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
return this.gen1App.metaOutput(graphQL.category, graphQL.resourceName, 'GraphQLAPIIdOutput');
|
|
76
174
|
}
|
|
77
175
|
async fetchGraphQLModelTables(graphQLApiId) {
|
|
78
176
|
var _a;
|
|
79
177
|
const tables = [];
|
|
80
|
-
const
|
|
81
|
-
for await (const page of (0, client_dynamodb_1.paginateListTables)({ client: dynamoClient }, {})) {
|
|
178
|
+
for await (const page of (0, client_dynamodb_1.paginateListTables)({ client: this.gen1App.clients.dynamoDB }, {})) {
|
|
82
179
|
for (const tableName of (_a = page.TableNames) !== null && _a !== void 0 ? _a : []) {
|
|
83
|
-
if (tableName.includes(`-${graphQLApiId}-${this.
|
|
180
|
+
if (tableName.includes(`-${graphQLApiId}-${this.gen1App.envName}`)) {
|
|
84
181
|
tables.push(tableName);
|
|
85
182
|
}
|
|
86
183
|
}
|
|
87
184
|
}
|
|
88
185
|
return tables;
|
|
89
186
|
}
|
|
187
|
+
async dynamoTableNames() {
|
|
188
|
+
if (!this._dynamoTableNames) {
|
|
189
|
+
const graphQLApiId = await this.findGraphQLApiId();
|
|
190
|
+
if (!graphQLApiId) {
|
|
191
|
+
this._dynamoTableNames = [];
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
this._dynamoTableNames = await this.fetchGraphQLModelTables(graphQLApiId);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return this._dynamoTableNames;
|
|
198
|
+
}
|
|
199
|
+
async getExistingStackPolicy() {
|
|
200
|
+
const response = await this.gen1App.clients.cloudFormation.send(new client_cloudformation_1.GetStackPolicyCommand({
|
|
201
|
+
StackName: this.gen1App.rootStackName,
|
|
202
|
+
}));
|
|
203
|
+
if (response.StackPolicyBody) {
|
|
204
|
+
return JSON.parse(response.StackPolicyBody);
|
|
205
|
+
}
|
|
206
|
+
return { Statement: [] };
|
|
207
|
+
}
|
|
90
208
|
}
|
|
91
209
|
exports.AmplifyMigrationLockStep = AmplifyMigrationLockStep;
|
|
92
210
|
//# sourceMappingURL=lock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../../src/commands/gen2-migration/lock.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../../src/commands/gen2-migration/lock.ts"],"names":[],"mappings":";;;AAAA,wCAAqD;AAErD,wCAAqC;AAErC,0EAA8F;AAC9F,4DAA0E;AAC1E,8DAAkF;AAGlF,MAAM,+BAA+B,GAAG,iCAAiC,CAAC;AAE1E,MAAM,cAAc,GAAG;IACrB,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,UAAU;IAClB,SAAS,EAAE,GAAG;IACd,QAAQ,EAAE,GAAG;CACd,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,SAAiC,EAAW,EAAE,CACrE,SAAS,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM;IAC1C,SAAS,CAAC,MAAM,KAAK,cAAc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EAAE,EAAE,EAAE,CAAC;IAC3B,CAAC;CACF;AA9MD,4DA8MC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ForwardCategoryRefactorer } from '../workflow/forward-category-refactorer';
|
|
2
|
+
export declare const KINESIS_STREAM_TYPE = "AWS::Kinesis::Stream";
|
|
3
|
+
export declare const ANALYTICS_RESOURCE_TYPES: string[];
|
|
4
|
+
export declare class AnalyticsKinesisForwardRefactorer extends ForwardCategoryRefactorer {
|
|
5
|
+
protected fetchSourceStackId(): Promise<string | undefined>;
|
|
6
|
+
protected fetchDestStackId(): Promise<string | undefined>;
|
|
7
|
+
protected resourceTypes(): string[];
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=analytics-forward.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics-forward.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/refactor/analytics/analytics-forward.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAE1D,eAAO,MAAM,wBAAwB,UAAwB,CAAC;AAO9D,qBAAa,iCAAkC,SAAQ,yBAAyB;cAC9D,kBAAkB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;cAIjD,gBAAgB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAI/D,SAAS,CAAC,aAAa,IAAI,MAAM,EAAE;CAGpC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AnalyticsKinesisForwardRefactorer = exports.ANALYTICS_RESOURCE_TYPES = exports.KINESIS_STREAM_TYPE = void 0;
|
|
4
|
+
const forward_category_refactorer_1 = require("../workflow/forward-category-refactorer");
|
|
5
|
+
exports.KINESIS_STREAM_TYPE = 'AWS::Kinesis::Stream';
|
|
6
|
+
exports.ANALYTICS_RESOURCE_TYPES = [exports.KINESIS_STREAM_TYPE];
|
|
7
|
+
class AnalyticsKinesisForwardRefactorer extends forward_category_refactorer_1.ForwardCategoryRefactorer {
|
|
8
|
+
async fetchSourceStackId() {
|
|
9
|
+
return this.findNestedStack(this.gen1Env, 'analytics');
|
|
10
|
+
}
|
|
11
|
+
async fetchDestStackId() {
|
|
12
|
+
return this.findNestedStack(this.gen2Branch, 'analytics');
|
|
13
|
+
}
|
|
14
|
+
resourceTypes() {
|
|
15
|
+
return exports.ANALYTICS_RESOURCE_TYPES;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.AnalyticsKinesisForwardRefactorer = AnalyticsKinesisForwardRefactorer;
|
|
19
|
+
//# sourceMappingURL=analytics-forward.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics-forward.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/refactor/analytics/analytics-forward.ts"],"names":[],"mappings":";;;AAAA,yFAAoF;AAEvE,QAAA,mBAAmB,GAAG,sBAAsB,CAAC;AAE7C,QAAA,wBAAwB,GAAG,CAAC,2BAAmB,CAAC,CAAC;AAO9D,MAAa,iCAAkC,SAAQ,uDAAyB;IACpE,KAAK,CAAC,kBAAkB;QAChC,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACzD,CAAC;IAES,KAAK,CAAC,gBAAgB;QAC9B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAC5D,CAAC;IAES,aAAa;QACrB,OAAO,gCAAwB,CAAC;IAClC,CAAC;CACF;AAZD,8EAYC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CFNResource } from '../../_infra/cfn-template';
|
|
2
|
+
import { RollbackCategoryRefactorer } from '../workflow/rollback-category-refactorer';
|
|
3
|
+
export declare class AnalyticsKinesisRollbackRefactorer extends RollbackCategoryRefactorer {
|
|
4
|
+
protected fetchSourceStackId(): Promise<string | undefined>;
|
|
5
|
+
protected fetchDestStackId(): Promise<string | undefined>;
|
|
6
|
+
protected resourceTypes(): string[];
|
|
7
|
+
protected targetLogicalId(sourceId: string, sourceResource: CFNResource): string | undefined;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=analytics-rollback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics-rollback.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/refactor/analytics/analytics-rollback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAQtF,qBAAa,kCAAmC,SAAQ,0BAA0B;cAChE,kBAAkB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;cAIjD,gBAAgB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAI/D,SAAS,CAAC,aAAa,IAAI,MAAM,EAAE;IAInC,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS;CAQ7F"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AnalyticsKinesisRollbackRefactorer = void 0;
|
|
4
|
+
const rollback_category_refactorer_1 = require("../workflow/rollback-category-refactorer");
|
|
5
|
+
const analytics_forward_1 = require("./analytics-forward");
|
|
6
|
+
class AnalyticsKinesisRollbackRefactorer extends rollback_category_refactorer_1.RollbackCategoryRefactorer {
|
|
7
|
+
async fetchSourceStackId() {
|
|
8
|
+
return this.findNestedStack(this.gen2Branch, 'analytics');
|
|
9
|
+
}
|
|
10
|
+
async fetchDestStackId() {
|
|
11
|
+
return this.findNestedStack(this.gen1Env, 'analytics');
|
|
12
|
+
}
|
|
13
|
+
resourceTypes() {
|
|
14
|
+
return analytics_forward_1.ANALYTICS_RESOURCE_TYPES;
|
|
15
|
+
}
|
|
16
|
+
targetLogicalId(sourceId, sourceResource) {
|
|
17
|
+
switch (sourceResource.Type) {
|
|
18
|
+
case analytics_forward_1.KINESIS_STREAM_TYPE:
|
|
19
|
+
return 'KinesisStream';
|
|
20
|
+
default:
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.AnalyticsKinesisRollbackRefactorer = AnalyticsKinesisRollbackRefactorer;
|
|
26
|
+
//# sourceMappingURL=analytics-rollback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics-rollback.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/refactor/analytics/analytics-rollback.ts"],"names":[],"mappings":";;;AACA,2FAAsF;AACtF,2DAAoF;AAOpF,MAAa,kCAAmC,SAAQ,yDAA0B;IACtE,KAAK,CAAC,kBAAkB;QAChC,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAC5D,CAAC;IAES,KAAK,CAAC,gBAAgB;QAC9B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACzD,CAAC;IAES,aAAa;QACrB,OAAO,4CAAwB,CAAC;IAClC,CAAC;IAES,eAAe,CAAC,QAAgB,EAAE,cAA2B;QACrE,QAAQ,cAAc,CAAC,IAAI,EAAE,CAAC;YAC5B,KAAK,uCAAmB;gBACtB,OAAO,eAAe,CAAC;YACzB;gBACE,OAAO,SAAS,CAAC;QACrB,CAAC;IACH,CAAC;CACF;AArBD,gFAqBC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Output, Parameter } from '@aws-sdk/client-cloudformation';
|
|
2
|
+
import { ForwardCategoryRefactorer } from '../workflow/forward-category-refactorer';
|
|
3
|
+
import { CFNResource } from '../../_infra/cfn-template';
|
|
4
|
+
export declare const GEN1_NATIVE_APP_CLIENT = "UserPoolClient";
|
|
5
|
+
export declare const GEN1_WEB_CLIENT = "UserPoolClientWeb";
|
|
6
|
+
export declare const GEN2_NATIVE_APP_CLIENT = "UserPoolNativeAppClient";
|
|
7
|
+
export declare const GEN2_WEB_CLIENT = "UserPoolAppClient";
|
|
8
|
+
export declare const USER_POOL_CLIENT_TYPE = "AWS::Cognito::UserPoolClient";
|
|
9
|
+
export declare const USER_POOL_TYPE = "AWS::Cognito::UserPool";
|
|
10
|
+
export declare const IDENTITY_POOL_TYPE = "AWS::Cognito::IdentityPool";
|
|
11
|
+
export declare const IDENTITY_POOL_ROLE_ATTACHMENT_TYPE = "AWS::Cognito::IdentityPoolRoleAttachment";
|
|
12
|
+
export declare const USER_POOL_DOMAIN_TYPE = "AWS::Cognito::UserPoolDomain";
|
|
13
|
+
export declare const RESOURCE_TYPES: string[];
|
|
14
|
+
export declare class AuthCognitoForwardRefactorer extends ForwardCategoryRefactorer {
|
|
15
|
+
protected resourceTypes(): string[];
|
|
16
|
+
protected resolveOAuthParameters(parameters: Parameter[], outputs: Output[]): Promise<Parameter[]>;
|
|
17
|
+
protected match(sourceId: string, sourceResource: CFNResource, targetId: string, targetResource: CFNResource): boolean;
|
|
18
|
+
protected fetchSourceStackId(): Promise<string | undefined>;
|
|
19
|
+
protected fetchDestStackId(): Promise<string | undefined>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=auth-cognito-forward.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-cognito-forward.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/refactor/auth/auth-cognito-forward.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAGnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAMxD,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,eAAO,MAAM,eAAe,sBAAsB,CAAC;AAEnD,eAAO,MAAM,sBAAsB,4BAA4B,CAAC;AAChE,eAAO,MAAM,eAAe,sBAAsB,CAAC;AAEnD,eAAO,MAAM,qBAAqB,iCAAiC,CAAC;AACpE,eAAO,MAAM,cAAc,2BAA2B,CAAC;AACvD,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAC/D,eAAO,MAAM,kCAAkC,6CAA6C,CAAC;AAC7F,eAAO,MAAM,qBAAqB,iCAAiC,CAAC;AAEpE,eAAO,MAAM,cAAc,UAM1B,CAAC;AAOF,qBAAa,4BAA6B,SAAQ,yBAAyB;IACzE,SAAS,CAAC,aAAa,IAAI,MAAM,EAAE;cAOV,sBAAsB,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;cA8B9F,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,GAAG,OAAO;cAsB/G,kBAAkB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;cAIjD,gBAAgB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAIhE"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthCognitoForwardRefactorer = exports.RESOURCE_TYPES = exports.USER_POOL_DOMAIN_TYPE = exports.IDENTITY_POOL_ROLE_ATTACHMENT_TYPE = exports.IDENTITY_POOL_TYPE = exports.USER_POOL_TYPE = exports.USER_POOL_CLIENT_TYPE = exports.GEN2_WEB_CLIENT = exports.GEN2_NATIVE_APP_CLIENT = exports.GEN1_WEB_CLIENT = exports.GEN1_NATIVE_APP_CLIENT = void 0;
|
|
4
|
+
const amplify_cli_core_1 = require("@aws-amplify/amplify-cli-core");
|
|
5
|
+
const oauth_values_retriever_1 = require("../oauth-values-retriever");
|
|
6
|
+
const forward_category_refactorer_1 = require("../workflow/forward-category-refactorer");
|
|
7
|
+
const HOSTED_PROVIDER_META_PARAMETER_NAME = 'hostedUIProviderMeta';
|
|
8
|
+
const HOSTED_PROVIDER_CREDENTIALS_PARAMETER_NAME = 'hostedUIProviderCreds';
|
|
9
|
+
const USER_POOL_ID_OUTPUT_KEY_NAME = 'UserPoolId';
|
|
10
|
+
exports.GEN1_NATIVE_APP_CLIENT = 'UserPoolClient';
|
|
11
|
+
exports.GEN1_WEB_CLIENT = 'UserPoolClientWeb';
|
|
12
|
+
exports.GEN2_NATIVE_APP_CLIENT = 'UserPoolNativeAppClient';
|
|
13
|
+
exports.GEN2_WEB_CLIENT = 'UserPoolAppClient';
|
|
14
|
+
exports.USER_POOL_CLIENT_TYPE = 'AWS::Cognito::UserPoolClient';
|
|
15
|
+
exports.USER_POOL_TYPE = 'AWS::Cognito::UserPool';
|
|
16
|
+
exports.IDENTITY_POOL_TYPE = 'AWS::Cognito::IdentityPool';
|
|
17
|
+
exports.IDENTITY_POOL_ROLE_ATTACHMENT_TYPE = 'AWS::Cognito::IdentityPoolRoleAttachment';
|
|
18
|
+
exports.USER_POOL_DOMAIN_TYPE = 'AWS::Cognito::UserPoolDomain';
|
|
19
|
+
exports.RESOURCE_TYPES = [
|
|
20
|
+
exports.USER_POOL_TYPE,
|
|
21
|
+
exports.USER_POOL_CLIENT_TYPE,
|
|
22
|
+
exports.IDENTITY_POOL_TYPE,
|
|
23
|
+
exports.IDENTITY_POOL_ROLE_ATTACHMENT_TYPE,
|
|
24
|
+
exports.USER_POOL_DOMAIN_TYPE,
|
|
25
|
+
];
|
|
26
|
+
class AuthCognitoForwardRefactorer extends forward_category_refactorer_1.ForwardCategoryRefactorer {
|
|
27
|
+
resourceTypes() {
|
|
28
|
+
return exports.RESOURCE_TYPES;
|
|
29
|
+
}
|
|
30
|
+
async resolveOAuthParameters(parameters, outputs) {
|
|
31
|
+
var _a;
|
|
32
|
+
const oAuthParam = parameters.find((p) => p.ParameterKey === HOSTED_PROVIDER_META_PARAMETER_NAME);
|
|
33
|
+
if (!oAuthParam)
|
|
34
|
+
return parameters;
|
|
35
|
+
const userPoolId = (_a = outputs.find((o) => o.OutputKey === USER_POOL_ID_OUTPUT_KEY_NAME)) === null || _a === void 0 ? void 0 : _a.OutputValue;
|
|
36
|
+
if (!userPoolId) {
|
|
37
|
+
throw new amplify_cli_core_1.AmplifyError('MissingExpectedParameterError', {
|
|
38
|
+
message: `Auth stack output '${USER_POOL_ID_OUTPUT_KEY_NAME}' not found — required for OAuth credential retrieval`,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const oAuthValues = await (0, oauth_values_retriever_1.retrieveOAuthValues)({
|
|
42
|
+
ssmClient: this.gen1App.clients.ssm,
|
|
43
|
+
cognitoIdpClient: this.gen1App.clients.cognitoIdentityProvider,
|
|
44
|
+
oAuthParameter: oAuthParam,
|
|
45
|
+
userPoolId,
|
|
46
|
+
appId: this.gen1App.appId,
|
|
47
|
+
environmentName: this.gen1App.envName,
|
|
48
|
+
});
|
|
49
|
+
const credsParam = parameters.find((p) => p.ParameterKey === HOSTED_PROVIDER_CREDENTIALS_PARAMETER_NAME);
|
|
50
|
+
if (!credsParam) {
|
|
51
|
+
throw new amplify_cli_core_1.AmplifyError('MissingExpectedParameterError', {
|
|
52
|
+
message: `Auth stack parameter '${HOSTED_PROVIDER_CREDENTIALS_PARAMETER_NAME}' not found`,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
credsParam.ParameterValue = JSON.stringify(oAuthValues);
|
|
56
|
+
return parameters;
|
|
57
|
+
}
|
|
58
|
+
match(sourceId, sourceResource, targetId, targetResource) {
|
|
59
|
+
if (sourceResource.Type !== targetResource.Type) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
switch (sourceResource.Type) {
|
|
63
|
+
case exports.USER_POOL_CLIENT_TYPE: {
|
|
64
|
+
switch (sourceId) {
|
|
65
|
+
case exports.GEN1_WEB_CLIENT:
|
|
66
|
+
return targetId.includes(exports.GEN2_WEB_CLIENT);
|
|
67
|
+
case exports.GEN1_NATIVE_APP_CLIENT:
|
|
68
|
+
return targetId.includes(exports.GEN2_NATIVE_APP_CLIENT);
|
|
69
|
+
default:
|
|
70
|
+
throw new amplify_cli_core_1.AmplifyError('MigrationError', {
|
|
71
|
+
message: `Unexpected source logical id ${sourceId} for resource of type ${exports.USER_POOL_CLIENT_TYPE}`,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
default:
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
async fetchSourceStackId() {
|
|
80
|
+
return this.findNestedStack(this.gen1Env, `auth${this.resource.resourceName}`);
|
|
81
|
+
}
|
|
82
|
+
async fetchDestStackId() {
|
|
83
|
+
return this.findNestedStack(this.gen2Branch, 'auth');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.AuthCognitoForwardRefactorer = AuthCognitoForwardRefactorer;
|
|
87
|
+
//# sourceMappingURL=auth-cognito-forward.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-cognito-forward.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/refactor/auth/auth-cognito-forward.ts"],"names":[],"mappings":";;;AACA,oEAA6D;AAC7D,sEAAgE;AAChE,yFAAoF;AAGpF,MAAM,mCAAmC,GAAG,sBAAsB,CAAC;AACnE,MAAM,0CAA0C,GAAG,uBAAuB,CAAC;AAC3E,MAAM,4BAA4B,GAAG,YAAY,CAAC;AAErC,QAAA,sBAAsB,GAAG,gBAAgB,CAAC;AAC1C,QAAA,eAAe,GAAG,mBAAmB,CAAC;AAEtC,QAA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,CAAC,YAAY,EAAE,CAAC,CAAC;IACjF,CAAC;IAES,KAAK,CAAC,gBAAgB;QAE9B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;CACF;AApED,oEAoEC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CFNResource } from '../../_infra/cfn-template';
|
|
2
|
+
import { RollbackCategoryRefactorer } from '../workflow/rollback-category-refactorer';
|
|
3
|
+
export declare class AuthCognitoRollbackRefactorer extends RollbackCategoryRefactorer {
|
|
4
|
+
protected resourceTypes(): string[];
|
|
5
|
+
protected fetchSourceStackId(): Promise<string | undefined>;
|
|
6
|
+
protected fetchDestStackId(): Promise<string | undefined>;
|
|
7
|
+
protected targetLogicalId(sourceId: string, sourceResource: CFNResource): string | undefined;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=auth-cognito-rollback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-cognito-rollback.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/refactor/auth/auth-cognito-rollback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAmBtF,qBAAa,6BAA8B,SAAQ,0BAA0B;IAC3E,SAAS,CAAC,aAAa,IAAI,MAAM,EAAE;cAInB,kBAAkB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;cAIjD,gBAAgB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAI/D,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS;CAyB7F"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthCognitoRollbackRefactorer = void 0;
|
|
4
|
+
const amplify_cli_core_1 = require("@aws-amplify/amplify-cli-core");
|
|
5
|
+
const rollback_category_refactorer_1 = require("../workflow/rollback-category-refactorer");
|
|
6
|
+
const auth_cognito_forward_1 = require("./auth-cognito-forward");
|
|
7
|
+
class AuthCognitoRollbackRefactorer extends rollback_category_refactorer_1.RollbackCategoryRefactorer {
|
|
8
|
+
resourceTypes() {
|
|
9
|
+
return auth_cognito_forward_1.RESOURCE_TYPES;
|
|
10
|
+
}
|
|
11
|
+
async fetchSourceStackId() {
|
|
12
|
+
return this.findNestedStack(this.gen2Branch, 'auth');
|
|
13
|
+
}
|
|
14
|
+
async fetchDestStackId() {
|
|
15
|
+
return this.findNestedStack(this.gen1Env, `auth${this.resource.resourceName}`);
|
|
16
|
+
}
|
|
17
|
+
targetLogicalId(sourceId, sourceResource) {
|
|
18
|
+
switch (sourceResource.Type) {
|
|
19
|
+
case auth_cognito_forward_1.USER_POOL_CLIENT_TYPE: {
|
|
20
|
+
if (sourceId.includes(auth_cognito_forward_1.GEN2_NATIVE_APP_CLIENT)) {
|
|
21
|
+
return auth_cognito_forward_1.GEN1_NATIVE_APP_CLIENT;
|
|
22
|
+
}
|
|
23
|
+
if (sourceId.includes(auth_cognito_forward_1.GEN2_WEB_CLIENT)) {
|
|
24
|
+
return auth_cognito_forward_1.GEN1_WEB_CLIENT;
|
|
25
|
+
}
|
|
26
|
+
throw new amplify_cli_core_1.AmplifyError('MigrationError', {
|
|
27
|
+
message: `Unable to determine Gen1 logical ID for UserPoolClient '${sourceId}' — expected logical ID to contain '${auth_cognito_forward_1.GEN2_NATIVE_APP_CLIENT}' or '${auth_cognito_forward_1.GEN2_WEB_CLIENT}'`,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
case auth_cognito_forward_1.USER_POOL_TYPE:
|
|
31
|
+
return 'UserPool';
|
|
32
|
+
case auth_cognito_forward_1.IDENTITY_POOL_TYPE:
|
|
33
|
+
return 'IdentityPool';
|
|
34
|
+
case auth_cognito_forward_1.IDENTITY_POOL_ROLE_ATTACHMENT_TYPE:
|
|
35
|
+
return 'IdentityPoolRoleMap';
|
|
36
|
+
case auth_cognito_forward_1.USER_POOL_DOMAIN_TYPE:
|
|
37
|
+
return 'UserPoolDomain';
|
|
38
|
+
default:
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.AuthCognitoRollbackRefactorer = AuthCognitoRollbackRefactorer;
|
|
44
|
+
//# sourceMappingURL=auth-cognito-rollback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-cognito-rollback.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/refactor/auth/auth-cognito-rollback.ts"],"names":[],"mappings":";;;AAAA,oEAA6D;AAE7D,2FAAsF;AACtF,iEAWgC;AAOhC,MAAa,6BAA8B,SAAQ,yDAA0B;IACjE,aAAa;QACrB,OAAO,qCAAc,CAAC;IACxB,CAAC;IAES,KAAK,CAAC,kBAAkB;QAChC,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;IAES,KAAK,CAAC,gBAAgB;QAC9B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;IACjF,CAAC;IAES,eAAe,CAAC,QAAgB,EAAE,cAA2B;QACrE,QAAQ,cAAc,CAAC,IAAI,EAAE,CAAC;YAC5B,KAAK,4CAAqB,CAAC,CAAC,CAAC;gBAC3B,IAAI,QAAQ,CAAC,QAAQ,CAAC,6CAAsB,CAAC,EAAE,CAAC;oBAC9C,OAAO,6CAAsB,CAAC;gBAChC,CAAC;gBACD,IAAI,QAAQ,CAAC,QAAQ,CAAC,sCAAe,CAAC,EAAE,CAAC;oBACvC,OAAO,sCAAe,CAAC;gBACzB,CAAC;gBACD,MAAM,IAAI,+BAAY,CAAC,gBAAgB,EAAE;oBACvC,OAAO,EAAE,2DAA2D,QAAQ,uCAAuC,6CAAsB,SAAS,sCAAe,GAAG;iBACrK,CAAC,CAAC;YACL,CAAC;YACD,KAAK,qCAAc;gBACjB,OAAO,UAAU,CAAC;YACpB,KAAK,yCAAkB;gBACrB,OAAO,cAAc,CAAC;YACxB,KAAK,yDAAkC;gBACrC,OAAO,qBAAqB,CAAC;YAC/B,KAAK,4CAAqB;gBACxB,OAAO,gBAAgB,CAAC;YAC1B;gBACE,OAAO,SAAS,CAAC;QACrB,CAAC;IACH,CAAC;CACF;AAtCD,sEAsCC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CFNResource } from '../../_infra/cfn-template';
|
|
2
|
+
import { ForwardCategoryRefactorer } from '../workflow/forward-category-refactorer';
|
|
3
|
+
export declare const USER_POOL_GROUP_TYPE = "AWS::Cognito::UserPoolGroup";
|
|
4
|
+
export declare const RESOURCE_TYPES: string[];
|
|
5
|
+
export declare class AuthUserPoolGroupsForwardRefactorer extends ForwardCategoryRefactorer {
|
|
6
|
+
protected resourceTypes(): string[];
|
|
7
|
+
protected fetchSourceStackId(): Promise<string | undefined>;
|
|
8
|
+
protected fetchDestStackId(): Promise<string | undefined>;
|
|
9
|
+
protected match(_sourceId: string, sourceResource: CFNResource, _targetId: string, targetResource: CFNResource): boolean;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=auth-user-pool-groups-forward.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-user-pool-groups-forward.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,eAAO,MAAM,oBAAoB,gCAAgC,CAAC;AAElE,eAAO,MAAM,cAAc,UAAyB,CAAC;AAOrD,qBAAa,mCAAoC,SAAQ,yBAAyB;IAChF,SAAS,CAAC,aAAa,IAAI,MAAM,EAAE;cAInB,kBAAkB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;cAIjD,gBAAgB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;cAK5C,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,GAAG,OAAO;CAclI"}
|