@aws-amplify/cli-internal-gen2-migration-experimental-alpha 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/adr/001-refactor-gen2-migration-generate.md +413 -0
- package/adr/002-refactor-gen2-migration-refactor.md +593 -0
- package/adr/003-gen2-migration-assess.md +414 -0
- package/adr/004-gen2-migration-validation-modeling.md +336 -0
- package/aws-amplify-cli-internal-gen2-migration-experimental-alpha-0.7.0.tgz +0 -0
- package/bin/amplify +1 -1
- package/lib/commands/drift-detection/detect-local-drift.d.ts +1 -2
- package/lib/commands/drift-detection/detect-local-drift.d.ts.map +1 -1
- package/lib/commands/drift-detection/detect-local-drift.js +19 -6
- package/lib/commands/drift-detection/detect-local-drift.js.map +1 -1
- package/lib/commands/drift-detection/detect-stack-drift.d.ts +20 -9
- package/lib/commands/drift-detection/detect-stack-drift.d.ts.map +1 -1
- package/lib/commands/drift-detection/detect-stack-drift.js +121 -151
- package/lib/commands/drift-detection/detect-stack-drift.js.map +1 -1
- package/lib/commands/drift-detection/detect-template-drift.d.ts +8 -21
- package/lib/commands/drift-detection/detect-template-drift.d.ts.map +1 -1
- package/lib/commands/drift-detection/detect-template-drift.js +81 -89
- package/lib/commands/drift-detection/detect-template-drift.js.map +1 -1
- package/lib/commands/drift-detection/index.d.ts +2 -3
- package/lib/commands/drift-detection/index.d.ts.map +1 -1
- package/lib/commands/drift-detection/index.js +1 -3
- package/lib/commands/drift-detection/index.js.map +1 -1
- package/lib/commands/drift-detection/services/amplify-config-service.d.ts +0 -1
- package/lib/commands/drift-detection/services/amplify-config-service.d.ts.map +1 -1
- package/lib/commands/drift-detection/services/amplify-config-service.js +0 -16
- package/lib/commands/drift-detection/services/amplify-config-service.js.map +1 -1
- package/lib/commands/drift-detection/services/cloudformation-service.d.ts +2 -4
- package/lib/commands/drift-detection/services/cloudformation-service.d.ts.map +1 -1
- package/lib/commands/drift-detection/services/cloudformation-service.js +7 -11
- package/lib/commands/drift-detection/services/cloudformation-service.js.map +1 -1
- package/lib/commands/drift-detection/services/drift-formatter.d.ts +3 -70
- package/lib/commands/drift-detection/services/drift-formatter.d.ts.map +1 -1
- package/lib/commands/drift-detection/services/drift-formatter.js +148 -603
- package/lib/commands/drift-detection/services/drift-formatter.js.map +1 -1
- package/lib/commands/drift-detection/services/index.d.ts +1 -2
- package/lib/commands/drift-detection/services/index.d.ts.map +1 -1
- package/lib/commands/drift-detection/services/index.js +2 -4
- package/lib/commands/drift-detection/services/index.js.map +1 -1
- package/lib/commands/drift.d.ts +7 -18
- package/lib/commands/drift.d.ts.map +1 -1
- package/lib/commands/drift.js +71 -172
- package/lib/commands/drift.js.map +1 -1
- package/lib/commands/gen2-migration/_infra/aws-clients.d.ts +31 -0
- package/lib/commands/gen2-migration/_infra/aws-clients.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/aws-clients.js +64 -0
- package/lib/commands/gen2-migration/_infra/aws-clients.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/categories.d.ts +2 -0
- package/lib/commands/gen2-migration/_infra/categories.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/categories.js +32 -0
- package/lib/commands/gen2-migration/_infra/categories.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/cfn-template.d.ts +52 -0
- package/lib/commands/gen2-migration/_infra/cfn-template.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/cfn-template.js +21 -0
- package/lib/commands/gen2-migration/_infra/cfn-template.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/operation.d.ts +16 -0
- package/lib/commands/gen2-migration/_infra/operation.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/operation.js +3 -0
- package/lib/commands/gen2-migration/_infra/operation.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/plan.d.ts +21 -0
- package/lib/commands/gen2-migration/_infra/plan.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/plan.js +111 -0
- package/lib/commands/gen2-migration/_infra/plan.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/planner.d.ts +5 -0
- package/lib/commands/gen2-migration/_infra/planner.d.ts.map +1 -0
- package/lib/commands/gen2-migration/{generate/custom-resources/types.js → _infra/planner.js} +1 -1
- package/lib/commands/gen2-migration/_infra/planner.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/spinning-logger.d.ts +25 -0
- package/lib/commands/gen2-migration/_infra/spinning-logger.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/spinning-logger.js +115 -0
- package/lib/commands/gen2-migration/_infra/spinning-logger.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/stateful-resources.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/stateful-resources.js.map +1 -0
- package/lib/commands/gen2-migration/_infra/step.d.ts +15 -0
- package/lib/commands/gen2-migration/_infra/step.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_infra/step.js +13 -0
- package/lib/commands/gen2-migration/_infra/step.js.map +1 -0
- package/lib/commands/gen2-migration/{_validations.d.ts → _infra/validations.d.ts} +6 -7
- package/lib/commands/gen2-migration/_infra/validations.d.ts.map +1 -0
- package/lib/commands/gen2-migration/{_validations.js → _infra/validations.js} +24 -60
- package/lib/commands/gen2-migration/_infra/validations.js.map +1 -0
- package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.js +15 -0
- package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/api/data.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/api/data.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/api/data.assessor.js +25 -0
- package/lib/commands/gen2-migration/assess/api/data.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/api/rest-api.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/api/rest-api.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/api/rest-api.assessor.js +25 -0
- package/lib/commands/gen2-migration/assess/api/rest-api.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/assessment.d.ts +42 -0
- package/lib/commands/gen2-migration/assess/assessment.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/assessment.js +118 -0
- package/lib/commands/gen2-migration/assess/assessment.js.map +1 -0
- package/lib/commands/gen2-migration/assess/assessor.d.ts +5 -0
- package/lib/commands/gen2-migration/assess/assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/{generate/types.js → assess/assessor.js} +1 -1
- package/lib/commands/gen2-migration/assess/assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.js +30 -0
- package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.js +24 -0
- package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/function/function.assessor.d.ts +12 -0
- package/lib/commands/gen2-migration/assess/function/function.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/function/function.assessor.js +40 -0
- package/lib/commands/gen2-migration/assess/function/function.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.js +19 -0
- package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.js +15 -0
- package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.js +15 -0
- package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.js +25 -0
- package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess/storage/s3.assessor.d.ts +10 -0
- package/lib/commands/gen2-migration/assess/storage/s3.assessor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess/storage/s3.assessor.js +25 -0
- package/lib/commands/gen2-migration/assess/storage/s3.assessor.js.map +1 -0
- package/lib/commands/gen2-migration/assess.d.ts +9 -0
- package/lib/commands/gen2-migration/assess.d.ts.map +1 -0
- package/lib/commands/gen2-migration/assess.js +80 -0
- package/lib/commands/gen2-migration/assess.js.map +1 -0
- package/lib/commands/gen2-migration/decommission.d.ts +6 -5
- package/lib/commands/gen2-migration/decommission.d.ts.map +1 -1
- package/lib/commands/gen2-migration/decommission.js +82 -25
- package/lib/commands/gen2-migration/decommission.js.map +1 -1
- package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.d.ts +32 -0
- package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.js +136 -0
- package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.js.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/files.d.ts +2 -0
- package/lib/commands/gen2-migration/generate/_infra/files.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/{codegen-head/directory_exists.js → _infra/files.js} +4 -5
- package/lib/commands/gen2-migration/generate/_infra/files.js.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/gen1-app.d.ts +40 -0
- package/lib/commands/gen2-migration/generate/_infra/gen1-app.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/gen1-app.js +198 -0
- package/lib/commands/gen2-migration/generate/_infra/gen1-app.js.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/ts.d.ts +24 -0
- package/lib/commands/gen2-migration/generate/_infra/ts.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/_infra/ts.js +128 -0
- package/lib/commands/gen2-migration/generate/_infra/ts.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.d.ts +18 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.js +126 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.d.ts +33 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/{unsupported/cdk-from-cfn.js → amplify/analytics/kinesis-cfn-converter.js} +94 -52
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.d.ts +14 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.js +69 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.d.ts +18 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.js +68 -0
- package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.d.ts +24 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.js +233 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.d.ts +78 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.js +491 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.d.ts +15 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.js +75 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.d.ts +13 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.js +33 -0
- package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/backend.generator.d.ts +22 -0
- package/lib/commands/gen2-migration/generate/amplify/backend.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/backend.generator.js +150 -0
- package/lib/commands/gen2-migration/generate/amplify/backend.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/{custom-resources/transformer → amplify/custom-resources}/amplify-helper-transformer.d.ts +4 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.js +333 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.d.ts +17 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.js +190 -0
- package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.generator.d.ts +15 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.generator.js +112 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.d.ts +22 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.js +167 -0
- package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.generator.d.ts +49 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.generator.js +626 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.d.ts +21 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.js +105 -0
- package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.d.ts +49 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.js +239 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.d.ts +14 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.js +70 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.d.ts +13 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.js +161 -0
- package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/package.json.generator.d.ts +8 -0
- package/lib/commands/gen2-migration/generate/amplify/package.json.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/package.json.generator.js +28 -0
- package/lib/commands/gen2-migration/generate/amplify/package.json.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.d.ts +15 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.js +162 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.d.ts +51 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.js +269 -0
- package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.d.ts +14 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.js +96 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.d.ts +30 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.js +90 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.d.ts +22 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.js +132 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.d.ts +31 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.js +137 -0
- package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.d.ts +8 -0
- package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.js +45 -0
- package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify.yml.generator.d.ts +9 -0
- package/lib/commands/gen2-migration/generate/amplify.yml.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/amplify.yml.generator.js +112 -0
- package/lib/commands/gen2-migration/generate/amplify.yml.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/gitignore.generator.d.ts +6 -0
- package/lib/commands/gen2-migration/generate/gitignore.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/gitignore.generator.js +45 -0
- package/lib/commands/gen2-migration/generate/gitignore.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate/package.json.generator.d.ts +12 -0
- package/lib/commands/gen2-migration/generate/package.json.generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate/package.json.generator.js +83 -0
- package/lib/commands/gen2-migration/generate/package.json.generator.js.map +1 -0
- package/lib/commands/gen2-migration/generate.d.ts +6 -5
- package/lib/commands/gen2-migration/generate.d.ts.map +1 -1
- package/lib/commands/gen2-migration/generate.js +232 -17
- package/lib/commands/gen2-migration/generate.js.map +1 -1
- package/lib/commands/gen2-migration/lock.d.ts +10 -6
- package/lib/commands/gen2-migration/lock.d.ts.map +1 -1
- package/lib/commands/gen2-migration/lock.js +182 -64
- package/lib/commands/gen2-migration/lock.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.js +19 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.js +26 -0
- package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.d.ts +21 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.js +87 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.js +44 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.d.ts +11 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.js +33 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.js +26 -0
- package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/cfn.d.ts +41 -0
- package/lib/commands/gen2-migration/refactor/cfn.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/cfn.js +337 -0
- package/lib/commands/gen2-migration/refactor/cfn.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/index.d.ts +1 -1
- package/lib/commands/gen2-migration/refactor/index.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/index.js +1 -1
- package/lib/commands/gen2-migration/refactor/index.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.d.ts +23 -11
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.js +53 -45
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.d.ts +2 -11
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.js +89 -123
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.d.ts +2 -7
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.js +6 -22
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.d.ts +8 -12
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.js +105 -127
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.d.ts +2 -8
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.js +36 -41
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.d.ts +3 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.js +18 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/stack-facade.d.ts +13 -0
- package/lib/commands/gen2-migration/refactor/stack-facade.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/stack-facade.js +39 -0
- package/lib/commands/gen2-migration/refactor/stack-facade.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.d.ts +8 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.js +18 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.js +26 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-forward.d.ts +10 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-forward.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-forward.js +36 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-forward.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-rollback.d.ts +9 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-rollback.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-rollback.js +26 -0
- package/lib/commands/gen2-migration/refactor/storage/storage-rollback.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/utils.d.ts +1 -1
- package/lib/commands/gen2-migration/refactor/utils.d.ts.map +1 -1
- package/lib/commands/gen2-migration/refactor/utils.js +2 -2
- package/lib/commands/gen2-migration/refactor/utils.js.map +1 -1
- package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.d.ts +52 -0
- package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.js +212 -0
- package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.d.ts +15 -0
- package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.js +148 -0
- package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.d.ts +13 -0
- package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.js +123 -0
- package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.js.map +1 -0
- package/lib/commands/gen2-migration/refactor.d.ts +11 -0
- package/lib/commands/gen2-migration/refactor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor.js +189 -0
- package/lib/commands/gen2-migration/refactor.js.map +1 -0
- package/lib/commands/gen2-migration.d.ts +0 -12
- package/lib/commands/gen2-migration.d.ts.map +1 -1
- package/lib/commands/gen2-migration.js +82 -111
- package/lib/commands/gen2-migration.js.map +1 -1
- package/package.json +22 -12
- package/aws-amplify-cli-internal-gen2-migration-experimental-alpha-0.5.0.tgz +0 -0
- package/lib/commands/drift-detection/services/file-service.d.ts +0 -7
- package/lib/commands/drift-detection/services/file-service.d.ts.map +0 -1
- package/lib/commands/drift-detection/services/file-service.js +0 -53
- package/lib/commands/drift-detection/services/file-service.js.map +0 -1
- package/lib/commands/gen2-migration/_step.d.ts +0 -17
- package/lib/commands/gen2-migration/_step.d.ts.map +0 -1
- package/lib/commands/gen2-migration/_step.js +0 -16
- package/lib/commands/gen2-migration/_step.js.map +0 -1
- package/lib/commands/gen2-migration/_validations.d.ts.map +0 -1
- package/lib/commands/gen2-migration/_validations.js.map +0 -1
- package/lib/commands/gen2-migration/cleanup.d.ts +0 -8
- package/lib/commands/gen2-migration/cleanup.d.ts.map +0 -1
- package/lib/commands/gen2-migration/cleanup.js +0 -21
- package/lib/commands/gen2-migration/cleanup.js.map +0 -1
- package/lib/commands/gen2-migration/clone.d.ts +0 -8
- package/lib/commands/gen2-migration/clone.d.ts.map +0 -1
- package/lib/commands/gen2-migration/clone.js +0 -21
- package/lib/commands/gen2-migration/clone.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/auth/index.d.ts +0 -24
- package/lib/commands/gen2-migration/generate/adapters/auth/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/auth/index.js +0 -297
- package/lib/commands/gen2-migration/generate/adapters/auth/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/auth/index.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/auth/index.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/auth/index.test.js +0 -140
- package/lib/commands/gen2-migration/generate/adapters/auth/index.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/data/index.d.ts +0 -5
- package/lib/commands/gen2-migration/generate/adapters/data/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/data/index.js +0 -17
- package/lib/commands/gen2-migration/generate/adapters/data/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.d.ts +0 -10
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.js +0 -43
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.js +0 -34
- package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/index.d.ts +0 -18
- package/lib/commands/gen2-migration/generate/adapters/functions/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/functions/index.js +0 -85
- package/lib/commands/gen2-migration/generate/adapters/functions/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/project/index.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/project/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/project/index.js +0 -7
- package/lib/commands/gen2-migration/generate/adapters/project/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.d.ts +0 -31
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.js +0 -34
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.js +0 -181
- package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/index.d.ts +0 -3
- package/lib/commands/gen2-migration/generate/adapters/storage/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/index.js +0 -10
- package/lib/commands/gen2-migration/generate/adapters/storage/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.d.ts +0 -25
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.js +0 -76
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.js.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.js +0 -125
- package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/backend/synthesizer.d.ts +0 -91
- package/lib/commands/gen2-migration/generate/backend/synthesizer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/backend/synthesizer.js +0 -1014
- package/lib/commands/gen2-migration/generate/backend/synthesizer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/backend/synthesizer.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/backend/synthesizer.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/backend/synthesizer.test.js +0 -777
- package/lib/commands/gen2-migration/generate/backend/synthesizer.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.d.ts +0 -14
- package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.js +0 -82
- package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/analytics.d.ts +0 -10
- package/lib/commands/gen2-migration/generate/codegen-head/analytics.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/analytics.js +0 -11
- package/lib/commands/gen2-migration/generate/codegen-head/analytics.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.d.ts +0 -7
- package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.js +0 -80
- package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.d.ts +0 -13
- package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.js +0 -59
- package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.d.ts +0 -24
- package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.js +0 -167
- package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.d.ts +0 -21
- package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.js +0 -135
- package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.d.ts +0 -23
- package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.js +0 -181
- package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.d.ts +0 -12
- package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.js +0 -157
- package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.d.ts +0 -10
- package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.js +0 -48
- package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.d.ts +0 -11
- package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.js +0 -38
- package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.d.ts +0 -13
- package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.js +0 -498
- package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.d.ts +0 -47
- package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.js +0 -222
- package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.d.ts +0 -10
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.js +0 -59
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.js +0 -90
- package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.d.ts +0 -14
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.js +0 -100
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.js +0 -69
- package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/format.d.ts +0 -8
- package/lib/commands/gen2-migration/generate/codegen-head/format.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/format.js +0 -66
- package/lib/commands/gen2-migration/generate/codegen-head/format.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/logger.d.ts +0 -15
- package/lib/commands/gen2-migration/generate/codegen-head/logger.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/logger.js +0 -14
- package/lib/commands/gen2-migration/generate/codegen-head/logger.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/printer.d.ts +0 -26
- package/lib/commands/gen2-migration/generate/codegen-head/printer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/printer.js +0 -103
- package/lib/commands/gen2-migration/generate/codegen-head/printer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.d.ts +0 -13
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.js +0 -66
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.js +0 -97
- package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/core/migration-pipeline.d.ts +0 -26
- package/lib/commands/gen2-migration/generate/core/migration-pipeline.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/core/migration-pipeline.js +0 -269
- package/lib/commands/gen2-migration/generate/core/migration-pipeline.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.d.ts +0 -7
- package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.js +0 -84
- package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.d.ts +0 -8
- package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.js +0 -105
- package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.d.ts +0 -5
- package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.js +0 -88
- package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.d.ts +0 -8
- package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.js +0 -36
- package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.d.ts +0 -5
- package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.js +0 -81
- package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.d.ts +0 -15
- package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.js +0 -35
- package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.d.ts +0 -5
- package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.js +0 -66
- package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.js +0 -178
- package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/types.d.ts +0 -38
- package/lib/commands/gen2-migration/generate/custom-resources/types.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/custom-resources/types.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/analytics/index.d.ts +0 -9
- package/lib/commands/gen2-migration/generate/generators/analytics/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/analytics/index.js +0 -40
- package/lib/commands/gen2-migration/generate/generators/analytics/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/auth/index.d.ts +0 -107
- package/lib/commands/gen2-migration/generate/generators/auth/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/auth/index.js +0 -313
- package/lib/commands/gen2-migration/generate/generators/auth/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/auth/index.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/generators/auth/index.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/auth/index.test.js +0 -566
- package/lib/commands/gen2-migration/generate/generators/auth/index.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/data/index.d.ts +0 -35
- package/lib/commands/gen2-migration/generate/generators/data/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/data/index.js +0 -185
- package/lib/commands/gen2-migration/generate/generators/data/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/data/index.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/generators/data/index.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/data/index.test.js +0 -47
- package/lib/commands/gen2-migration/generate/generators/data/index.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/index.d.ts +0 -53
- package/lib/commands/gen2-migration/generate/generators/functions/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/index.js +0 -125
- package/lib/commands/gen2-migration/generate/generators/functions/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda.d.ts +0 -6
- package/lib/commands/gen2-migration/generate/generators/functions/lambda.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda.js +0 -16
- package/lib/commands/gen2-migration/generate/generators/functions/lambda.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.d.ts +0 -3
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.js +0 -106
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.js +0 -120
- package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/storage/access.d.ts +0 -4
- package/lib/commands/gen2-migration/generate/generators/storage/access.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/storage/access.js +0 -73
- package/lib/commands/gen2-migration/generate/generators/storage/access.js.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/storage/index.d.ts +0 -37
- package/lib/commands/gen2-migration/generate/generators/storage/index.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/generators/storage/index.js +0 -78
- package/lib/commands/gen2-migration/generate/generators/storage/index.js.map +0 -1
- package/lib/commands/gen2-migration/generate/npm_package/renderer.d.ts +0 -27
- package/lib/commands/gen2-migration/generate/npm_package/renderer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/npm_package/renderer.js +0 -28
- package/lib/commands/gen2-migration/generate/npm_package/renderer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/render_pipeline.d.ts +0 -9
- package/lib/commands/gen2-migration/generate/render_pipeline.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/render_pipeline.js +0 -15
- package/lib/commands/gen2-migration/generate/render_pipeline.js.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/ensure_directory.d.ts +0 -7
- package/lib/commands/gen2-migration/generate/renderers/ensure_directory.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/ensure_directory.js +0 -17
- package/lib/commands/gen2-migration/generate/renderers/ensure_directory.js.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/package_json.d.ts +0 -8
- package/lib/commands/gen2-migration/generate/renderers/package_json.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/package_json.js +0 -15
- package/lib/commands/gen2-migration/generate/renderers/package_json.js.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.d.ts +0 -11
- package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.js +0 -22
- package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.js.map +0 -1
- package/lib/commands/gen2-migration/generate/resource/resource.d.ts +0 -20
- package/lib/commands/gen2-migration/generate/resource/resource.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/resource/resource.js +0 -60
- package/lib/commands/gen2-migration/generate/resource/resource.js.map +0 -1
- package/lib/commands/gen2-migration/generate/test_utils/import_regex.d.ts +0 -2
- package/lib/commands/gen2-migration/generate/test_utils/import_regex.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/test_utils/import_regex.js +0 -6
- package/lib/commands/gen2-migration/generate/test_utils/import_regex.js.map +0 -1
- package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.d.ts +0 -4
- package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.js +0 -22
- package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.js.map +0 -1
- package/lib/commands/gen2-migration/generate/todo_error.d.ts +0 -3
- package/lib/commands/gen2-migration/generate/todo_error.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/todo_error.js +0 -11
- package/lib/commands/gen2-migration/generate/todo_error.js.map +0 -1
- package/lib/commands/gen2-migration/generate/ts_factory_utils.d.ts +0 -3
- package/lib/commands/gen2-migration/generate/ts_factory_utils.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/ts_factory_utils.js +0 -10
- package/lib/commands/gen2-migration/generate/ts_factory_utils.js.map +0 -1
- package/lib/commands/gen2-migration/generate/types.d.ts +0 -4
- package/lib/commands/gen2-migration/generate/types.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/types.js.map +0 -1
- package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.d.ts +0 -26
- package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.d.ts.map +0 -1
- package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.d.ts +0 -5
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.js +0 -76
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.d.ts +0 -6
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.js +0 -52
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.d.ts +0 -40
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.js +0 -321
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/generators/template-generator.d.ts +0 -48
- package/lib/commands/gen2-migration/refactor/generators/template-generator.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/generators/template-generator.js +0 -513
- package/lib/commands/gen2-migration/refactor/generators/template-generator.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/refactor.d.ts +0 -19
- package/lib/commands/gen2-migration/refactor/refactor.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/refactor.js +0 -241
- package/lib/commands/gen2-migration/refactor/refactor.js.map +0 -1
- package/lib/commands/gen2-migration/refactor/types.d.ts +0 -128
- package/lib/commands/gen2-migration/refactor/types.d.ts.map +0 -1
- package/lib/commands/gen2-migration/refactor/types.js +0 -59
- package/lib/commands/gen2-migration/refactor/types.js.map +0 -1
- package/lib/commands/gen2-migration/shift.d.ts +0 -8
- package/lib/commands/gen2-migration/shift.d.ts.map +0 -1
- package/lib/commands/gen2-migration/shift.js +0 -21
- package/lib/commands/gen2-migration/shift.js.map +0 -1
- package/lib/commands/gen2-migration/stateful-resources.d.ts.map +0 -1
- package/lib/commands/gen2-migration/stateful-resources.js.map +0 -1
- /package/lib/commands/gen2-migration/{stateful-resources.d.ts → _infra/stateful-resources.d.ts} +0 -0
- /package/lib/commands/gen2-migration/{stateful-resources.js → _infra/stateful-resources.js} +0 -0
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAuthDefinition = exports.DEFAULT_PASSWORD_SETTINGS = void 0;
|
|
4
|
-
const client_cognito_identity_provider_1 = require("@aws-sdk/client-cognito-identity-provider");
|
|
5
|
-
exports.DEFAULT_PASSWORD_SETTINGS = {
|
|
6
|
-
MinimumLength: 8,
|
|
7
|
-
RequireLowercase: true,
|
|
8
|
-
RequireUppercase: true,
|
|
9
|
-
RequireNumbers: true,
|
|
10
|
-
TemporaryPasswordValidityDays: 3,
|
|
11
|
-
};
|
|
12
|
-
const COGNITO_TRIGGERS_TO_SKIP = ['PreTokenGenerationConfig'];
|
|
13
|
-
const getPasswordPolicyOverrides = (passwordPolicy) => {
|
|
14
|
-
const policyOverrides = {};
|
|
15
|
-
const passwordOverridePath = (policyKey) => `Policies.PasswordPolicy.${policyKey}`;
|
|
16
|
-
for (const key of Object.keys(passwordPolicy)) {
|
|
17
|
-
const typedKey = key;
|
|
18
|
-
if (passwordPolicy[typedKey] !== undefined) {
|
|
19
|
-
policyOverrides[passwordOverridePath(typedKey)] = passwordPolicy[typedKey];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return policyOverrides;
|
|
23
|
-
};
|
|
24
|
-
const getUserPoolOverrides = (userPool) => {
|
|
25
|
-
var _a, _b;
|
|
26
|
-
const userPoolOverrides = {};
|
|
27
|
-
Object.assign(userPoolOverrides, getPasswordPolicyOverrides((_b = (_a = userPool.Policies) === null || _a === void 0 ? void 0 : _a.PasswordPolicy) !== null && _b !== void 0 ? _b : {}));
|
|
28
|
-
if (userPool.UsernameAttributes === undefined || userPool.UsernameAttributes.length === 0) {
|
|
29
|
-
userPoolOverrides.usernameAttributes = undefined;
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
userPoolOverrides.usernameAttributes = userPool.UsernameAttributes;
|
|
33
|
-
}
|
|
34
|
-
return userPoolOverrides;
|
|
35
|
-
};
|
|
36
|
-
const getMfaConfiguration = (mfaConfig, totpConfig) => {
|
|
37
|
-
const multifactor = {
|
|
38
|
-
mode: 'OFF',
|
|
39
|
-
};
|
|
40
|
-
if (mfaConfig === 'ON') {
|
|
41
|
-
multifactor.mode = 'REQUIRED';
|
|
42
|
-
multifactor.sms = true;
|
|
43
|
-
(totpConfig === null || totpConfig === void 0 ? void 0 : totpConfig.Enabled) ? (multifactor.totp = true) : (multifactor.totp = false);
|
|
44
|
-
}
|
|
45
|
-
else if (mfaConfig === 'OPTIONAL') {
|
|
46
|
-
multifactor.mode = 'OPTIONAL';
|
|
47
|
-
multifactor.sms = true;
|
|
48
|
-
(totpConfig === null || totpConfig === void 0 ? void 0 : totpConfig.Enabled) ? (multifactor.totp = true) : (multifactor.totp = false);
|
|
49
|
-
}
|
|
50
|
-
return multifactor;
|
|
51
|
-
};
|
|
52
|
-
const getEmailConfig = (userPool) => {
|
|
53
|
-
var _a, _b;
|
|
54
|
-
return {
|
|
55
|
-
emailVerificationBody: (_a = userPool.EmailVerificationMessage) !== null && _a !== void 0 ? _a : '',
|
|
56
|
-
emailVerificationSubject: (_b = userPool.EmailVerificationSubject) !== null && _b !== void 0 ? _b : '',
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
const getStandardUserAttributes = (signupAttributes, mappedUserAttributeName) => {
|
|
60
|
-
return ((signupAttributes === null || signupAttributes === void 0 ? void 0 : signupAttributes.reduce((standardAttributes, attribute) => {
|
|
61
|
-
const standardAttribute = {
|
|
62
|
-
required: attribute.Required,
|
|
63
|
-
mutable: attribute.Mutable,
|
|
64
|
-
};
|
|
65
|
-
if (attribute.Name !== undefined && attribute.Name in mappedUserAttributeName && attribute.Required) {
|
|
66
|
-
return {
|
|
67
|
-
...standardAttributes,
|
|
68
|
-
[mappedUserAttributeName[attribute.Name]]: standardAttribute,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
return standardAttributes;
|
|
72
|
-
}, {})) || {});
|
|
73
|
-
};
|
|
74
|
-
const getCustomUserAttributes = (signupAttributes) => {
|
|
75
|
-
return ((signupAttributes === null || signupAttributes === void 0 ? void 0 : signupAttributes.reduce((customAttributes, attribute) => {
|
|
76
|
-
if (attribute.Name !== undefined && attribute.Name.startsWith('custom:')) {
|
|
77
|
-
const customAttribute = {
|
|
78
|
-
mutable: attribute.Mutable,
|
|
79
|
-
dataType: attribute.AttributeDataType,
|
|
80
|
-
};
|
|
81
|
-
if (attribute.NumberAttributeConstraints && Object.keys(attribute.NumberAttributeConstraints).length > 0) {
|
|
82
|
-
customAttribute.min = Number(attribute.NumberAttributeConstraints.MinValue);
|
|
83
|
-
customAttribute.max = Number(attribute.NumberAttributeConstraints.MaxValue);
|
|
84
|
-
}
|
|
85
|
-
else if (attribute.StringAttributeConstraints && Object.keys(attribute.StringAttributeConstraints).length > 0) {
|
|
86
|
-
customAttribute.minLen = Number(attribute.StringAttributeConstraints.MinLength);
|
|
87
|
-
customAttribute.maxLen = Number(attribute.StringAttributeConstraints.MaxLength);
|
|
88
|
-
}
|
|
89
|
-
return {
|
|
90
|
-
...customAttributes,
|
|
91
|
-
[attribute.Name]: customAttribute,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
return customAttributes;
|
|
95
|
-
}, {})) || {});
|
|
96
|
-
};
|
|
97
|
-
const getGroups = (identityGroups) => {
|
|
98
|
-
if (!identityGroups || identityGroups.length === 0) {
|
|
99
|
-
return [];
|
|
100
|
-
}
|
|
101
|
-
const groupsWithPrecedence = identityGroups.filter((group) => group.Precedence !== undefined);
|
|
102
|
-
return groupsWithPrecedence
|
|
103
|
-
.sort((a, b) => (a.Precedence || 0) - (b.Precedence || 0))
|
|
104
|
-
.map((group) => group.GroupName)
|
|
105
|
-
.filter((groupName) => groupName !== undefined);
|
|
106
|
-
};
|
|
107
|
-
const getScopes = (scopes) => {
|
|
108
|
-
return scopes.filter((scope) => ['phone', 'email', 'openid', 'profile', 'aws.cognito.signin.user.admin'].includes(scope));
|
|
109
|
-
};
|
|
110
|
-
const getProviderSpecificScopes = (providerDetails) => {
|
|
111
|
-
const scopeFields = ['authorized_scopes', 'scope', 'scopes'];
|
|
112
|
-
for (const field of scopeFields) {
|
|
113
|
-
if (providerDetails[field]) {
|
|
114
|
-
return providerDetails[field].split(/[\s,]+/).filter((scope) => scope.length > 0);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return [];
|
|
118
|
-
};
|
|
119
|
-
const mappedLambdaConfigKey = (key) => {
|
|
120
|
-
switch (key) {
|
|
121
|
-
case 'PreSignUp':
|
|
122
|
-
return 'preSignUp';
|
|
123
|
-
case 'CustomMessage':
|
|
124
|
-
return 'customMessage';
|
|
125
|
-
case 'UserMigration':
|
|
126
|
-
return 'userMigration';
|
|
127
|
-
case 'PostConfirmation':
|
|
128
|
-
return 'postConfirmation';
|
|
129
|
-
case 'PreAuthentication':
|
|
130
|
-
return 'preAuthentication';
|
|
131
|
-
case 'PostAuthentication':
|
|
132
|
-
return 'postAuthentication';
|
|
133
|
-
case 'PreTokenGeneration':
|
|
134
|
-
return 'preTokenGeneration';
|
|
135
|
-
case 'DefineAuthChallenge':
|
|
136
|
-
return 'defineAuthChallenge';
|
|
137
|
-
case 'CreateAuthChallenge':
|
|
138
|
-
return 'createAuthChallenge';
|
|
139
|
-
case 'VerifyAuthChallengeResponse':
|
|
140
|
-
return 'verifyAuthChallengeResponse';
|
|
141
|
-
default:
|
|
142
|
-
throw new Error(`Could not map the provided key: ${key}`);
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
const getAuthTriggers = (lambdaConfig, triggerSourceFiles) => {
|
|
146
|
-
return (Object.keys(lambdaConfig)
|
|
147
|
-
.filter((triggerName) => !COGNITO_TRIGGERS_TO_SKIP.includes(triggerName))
|
|
148
|
-
.reduce((prev, key) => {
|
|
149
|
-
var _a;
|
|
150
|
-
const typedKey = key;
|
|
151
|
-
prev[mappedLambdaConfigKey(typedKey)] = { source: (_a = triggerSourceFiles[typedKey]) !== null && _a !== void 0 ? _a : '' };
|
|
152
|
-
return prev;
|
|
153
|
-
}, {}));
|
|
154
|
-
};
|
|
155
|
-
function filterAttributeMapping(attributeMapping, mappedUserAttributeName) {
|
|
156
|
-
return Object.fromEntries(Object.entries(attributeMapping)
|
|
157
|
-
.filter(([key]) => Object.keys(mappedUserAttributeName).includes(key))
|
|
158
|
-
.map(([key, value]) => [mappedUserAttributeName[key], value]));
|
|
159
|
-
}
|
|
160
|
-
const getAuthDefinition = ({ userPool, identityPoolName, identityProviders, identityProvidersDetails, identityGroups, webClient, authTriggerConnections, guestLogin, referenceAuth, mfaConfig, totpConfig, userPoolClient, }) => {
|
|
161
|
-
var _a;
|
|
162
|
-
const mappedUserAttributeName = {
|
|
163
|
-
address: 'address',
|
|
164
|
-
birthdate: 'birthdate',
|
|
165
|
-
email: 'email',
|
|
166
|
-
family_name: 'familyName',
|
|
167
|
-
gender: 'gender',
|
|
168
|
-
given_name: 'givenName',
|
|
169
|
-
locale: 'locale',
|
|
170
|
-
middle_name: 'middleName',
|
|
171
|
-
name: 'fullname',
|
|
172
|
-
nickname: 'nickname',
|
|
173
|
-
phone_number: 'phoneNumber',
|
|
174
|
-
picture: 'profilePicture',
|
|
175
|
-
preferred_username: 'preferredUsername',
|
|
176
|
-
profile: 'profilePage',
|
|
177
|
-
zoneinfo: 'timezone',
|
|
178
|
-
updated_at: 'lastUpdateTime',
|
|
179
|
-
website: 'website',
|
|
180
|
-
};
|
|
181
|
-
const loginWith = { email: true };
|
|
182
|
-
const mapIdentityProvider = {
|
|
183
|
-
[client_cognito_identity_provider_1.IdentityProviderTypeType.Google]: ['googleLogin', 'googleAttributes'],
|
|
184
|
-
[client_cognito_identity_provider_1.IdentityProviderTypeType.SignInWithApple]: ['appleLogin', 'appleAttributes'],
|
|
185
|
-
[client_cognito_identity_provider_1.IdentityProviderTypeType.LoginWithAmazon]: ['amazonLogin', 'amazonAttributes'],
|
|
186
|
-
[client_cognito_identity_provider_1.IdentityProviderTypeType.Facebook]: ['facebookLogin', 'facebookAttributes'],
|
|
187
|
-
};
|
|
188
|
-
if (identityProviders !== undefined) {
|
|
189
|
-
identityProviders.forEach((provider) => {
|
|
190
|
-
const loginWithProperty = mapIdentityProvider[provider === null || provider === void 0 ? void 0 : provider.ProviderType];
|
|
191
|
-
if (loginWithProperty !== undefined) {
|
|
192
|
-
const loginProperty = loginWithProperty[0];
|
|
193
|
-
loginWith[loginProperty] = true;
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
if (identityProvidersDetails) {
|
|
198
|
-
const oidcOptions = [];
|
|
199
|
-
let samlOptions;
|
|
200
|
-
for (const provider of identityProvidersDetails) {
|
|
201
|
-
const { ProviderType, ProviderName, ProviderDetails, AttributeMapping } = provider;
|
|
202
|
-
if (ProviderType === client_cognito_identity_provider_1.IdentityProviderTypeType.OIDC && ProviderDetails) {
|
|
203
|
-
const { oidc_issuer, authorize_url, token_url, attributes_url, jwks_uri } = ProviderDetails;
|
|
204
|
-
const oidcOption = {
|
|
205
|
-
issuerUrl: oidc_issuer,
|
|
206
|
-
};
|
|
207
|
-
if (ProviderName)
|
|
208
|
-
oidcOption.name = ProviderName;
|
|
209
|
-
if (authorize_url && token_url && attributes_url && jwks_uri) {
|
|
210
|
-
oidcOption.endpoints = {
|
|
211
|
-
authorization: authorize_url,
|
|
212
|
-
token: token_url,
|
|
213
|
-
userInfo: attributes_url,
|
|
214
|
-
jwksUri: jwks_uri,
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
if (AttributeMapping)
|
|
218
|
-
oidcOption.attributeMapping = filterAttributeMapping(AttributeMapping, mappedUserAttributeName);
|
|
219
|
-
oidcOptions.push(oidcOption);
|
|
220
|
-
}
|
|
221
|
-
else if (ProviderType === client_cognito_identity_provider_1.IdentityProviderTypeType.SAML && ProviderDetails) {
|
|
222
|
-
const { metadataURL, metadataContent } = ProviderDetails;
|
|
223
|
-
samlOptions = {
|
|
224
|
-
metadata: {
|
|
225
|
-
metadataContent: metadataURL || metadataContent,
|
|
226
|
-
metadataType: metadataURL ? 'URL' : 'FILE',
|
|
227
|
-
},
|
|
228
|
-
};
|
|
229
|
-
if (ProviderName)
|
|
230
|
-
samlOptions.name = ProviderName;
|
|
231
|
-
if (AttributeMapping)
|
|
232
|
-
samlOptions.attributeMapping = filterAttributeMapping(AttributeMapping, mappedUserAttributeName);
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
if (AttributeMapping) {
|
|
236
|
-
const attributeOption = mapIdentityProvider[provider === null || provider === void 0 ? void 0 : provider.ProviderType][1];
|
|
237
|
-
loginWith[attributeOption] = filterAttributeMapping(AttributeMapping, mappedUserAttributeName);
|
|
238
|
-
}
|
|
239
|
-
if (ProviderDetails) {
|
|
240
|
-
const providerScopes = getProviderSpecificScopes(ProviderDetails);
|
|
241
|
-
if (providerScopes.length > 0) {
|
|
242
|
-
const scopePropertyMap = {
|
|
243
|
-
[client_cognito_identity_provider_1.IdentityProviderTypeType.Google]: 'googleScopes',
|
|
244
|
-
[client_cognito_identity_provider_1.IdentityProviderTypeType.Facebook]: 'facebookScopes',
|
|
245
|
-
[client_cognito_identity_provider_1.IdentityProviderTypeType.LoginWithAmazon]: 'amazonScopes',
|
|
246
|
-
[client_cognito_identity_provider_1.IdentityProviderTypeType.SignInWithApple]: 'appleScopes',
|
|
247
|
-
};
|
|
248
|
-
const scopeProperty = scopePropertyMap[ProviderType];
|
|
249
|
-
if (scopeProperty) {
|
|
250
|
-
const mappedScopes = providerScopes
|
|
251
|
-
.map((scope) => {
|
|
252
|
-
if (scope === 'public_profile')
|
|
253
|
-
return 'profile';
|
|
254
|
-
return scope;
|
|
255
|
-
})
|
|
256
|
-
.filter((scope) => ['phone', 'email', 'openid', 'profile', 'aws.cognito.signin.user.admin'].includes(scope));
|
|
257
|
-
loginWith[scopeProperty] = mappedScopes;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
loginWith.oidcLogin = oidcOptions;
|
|
264
|
-
loginWith.samlLogin = samlOptions;
|
|
265
|
-
}
|
|
266
|
-
if (userPool.EmailVerificationMessage || userPool.EmailVerificationSubject) {
|
|
267
|
-
loginWith.emailOptions = getEmailConfig(userPool);
|
|
268
|
-
}
|
|
269
|
-
if (webClient === null || webClient === void 0 ? void 0 : webClient.CallbackURLs) {
|
|
270
|
-
loginWith.callbackURLs = webClient === null || webClient === void 0 ? void 0 : webClient.CallbackURLs;
|
|
271
|
-
}
|
|
272
|
-
if (webClient === null || webClient === void 0 ? void 0 : webClient.LogoutURLs) {
|
|
273
|
-
loginWith.logoutURLs = webClient === null || webClient === void 0 ? void 0 : webClient.LogoutURLs;
|
|
274
|
-
}
|
|
275
|
-
if (webClient === null || webClient === void 0 ? void 0 : webClient.AllowedOAuthScopes) {
|
|
276
|
-
loginWith.scopes = getScopes(webClient === null || webClient === void 0 ? void 0 : webClient.AllowedOAuthScopes);
|
|
277
|
-
}
|
|
278
|
-
const userPoolOverrides = getUserPoolOverrides(userPool);
|
|
279
|
-
return {
|
|
280
|
-
loginOptions: loginWith,
|
|
281
|
-
mfa: getMfaConfiguration(mfaConfig, totpConfig),
|
|
282
|
-
standardUserAttributes: getStandardUserAttributes(userPool.SchemaAttributes, mappedUserAttributeName),
|
|
283
|
-
customUserAttributes: getCustomUserAttributes(userPool.SchemaAttributes),
|
|
284
|
-
groups: getGroups(identityGroups),
|
|
285
|
-
userPoolOverrides,
|
|
286
|
-
lambdaTriggers: getAuthTriggers((_a = userPool.LambdaConfig) !== null && _a !== void 0 ? _a : {}, authTriggerConnections !== null && authTriggerConnections !== void 0 ? authTriggerConnections : {}),
|
|
287
|
-
guestLogin,
|
|
288
|
-
identityPoolName,
|
|
289
|
-
oAuthFlows: webClient === null || webClient === void 0 ? void 0 : webClient.AllowedOAuthFlows,
|
|
290
|
-
readAttributes: webClient === null || webClient === void 0 ? void 0 : webClient.ReadAttributes,
|
|
291
|
-
writeAttributes: webClient === null || webClient === void 0 ? void 0 : webClient.WriteAttributes,
|
|
292
|
-
referenceAuth,
|
|
293
|
-
userPoolClient,
|
|
294
|
-
};
|
|
295
|
-
};
|
|
296
|
-
exports.getAuthDefinition = getAuthDefinition;
|
|
297
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/adapters/auth/index.ts"],"names":[],"mappings":";;;AAoBA,gGAYmD;AAwBtC,QAAA,yBAAyB,GAAuB;IAC3D,aAAa,EAAE,CAAC;IAChB,gBAAgB,EAAE,IAAI;IACtB,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE,IAAI;IACpB,6BAA6B,EAAE,CAAC;CACjC,CAAC;AAEF,MAAM,wBAAwB,GAAG,CAAC,0BAA0B,CAAC,CAAC;AAe9D,MAAM,0BAA0B,GAAG,CAAC,cAA2C,EAA4B,EAAE;IAC3G,MAAM,eAAe,GAA6B,EAAE,CAAC;IACrD,MAAM,oBAAoB,GAAG,CAAC,SAAmC,EAAsB,EAAE,CAAC,2BAA2B,SAAS,EAAE,CAAC;IACjI,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC;QAC9C,MAAM,QAAQ,GAA6B,GAA+B,CAAC;QAC3E,IAAI,cAA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ts"],"names":[],"mappings":""}
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("./index");
|
|
4
|
-
const client_cognito_identity_provider_1 = require("@aws-sdk/client-cognito-identity-provider");
|
|
5
|
-
describe('Auth Generator - Provider-Specific Scopes', () => {
|
|
6
|
-
it('should extract provider-specific scopes from ProviderDetails', () => {
|
|
7
|
-
var _a, _b, _c, _d, _e;
|
|
8
|
-
const mockIdentityProvidersDetails = [
|
|
9
|
-
{
|
|
10
|
-
ProviderType: client_cognito_identity_provider_1.IdentityProviderTypeType.Google,
|
|
11
|
-
ProviderName: 'Google',
|
|
12
|
-
ProviderDetails: {
|
|
13
|
-
client_id: '911159018992-rnun5p7a6imtf206ci261m3s0jbap5ng.apps.googleusercontent.com',
|
|
14
|
-
client_secret: 'GOCSPX-...',
|
|
15
|
-
authorized_scopes: 'openid email profile',
|
|
16
|
-
},
|
|
17
|
-
AttributeMapping: {
|
|
18
|
-
email: 'email',
|
|
19
|
-
name: 'name',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
ProviderType: client_cognito_identity_provider_1.IdentityProviderTypeType.Facebook,
|
|
24
|
-
ProviderName: 'Facebook',
|
|
25
|
-
ProviderDetails: {
|
|
26
|
-
client_id: '1412236500618572',
|
|
27
|
-
client_secret: '...',
|
|
28
|
-
authorized_scopes: 'public_profile',
|
|
29
|
-
},
|
|
30
|
-
AttributeMapping: {
|
|
31
|
-
email: 'email',
|
|
32
|
-
name: 'name',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
];
|
|
36
|
-
const mockWebClient = {
|
|
37
|
-
AllowedOAuthScopes: ['aws.cognito.signin.user.admin', 'email', 'openid', 'phone', 'profile'],
|
|
38
|
-
CallbackURLs: ['http://localhost:3000/'],
|
|
39
|
-
LogoutURLs: ['http://localhost:3000/'],
|
|
40
|
-
};
|
|
41
|
-
const mockUserPool = {
|
|
42
|
-
EmailVerificationMessage: null,
|
|
43
|
-
EmailVerificationSubject: null,
|
|
44
|
-
SchemaAttributes: [],
|
|
45
|
-
};
|
|
46
|
-
const result = (0, index_1.getAuthDefinition)({
|
|
47
|
-
userPool: mockUserPool,
|
|
48
|
-
identityProviders: [{ ProviderType: client_cognito_identity_provider_1.IdentityProviderTypeType.Google }, { ProviderType: client_cognito_identity_provider_1.IdentityProviderTypeType.Facebook }],
|
|
49
|
-
identityProvidersDetails: mockIdentityProvidersDetails,
|
|
50
|
-
webClient: mockWebClient,
|
|
51
|
-
});
|
|
52
|
-
expect((_a = result.loginOptions) === null || _a === void 0 ? void 0 : _a.googleScopes).toEqual(['openid', 'email', 'profile']);
|
|
53
|
-
expect((_b = result.loginOptions) === null || _b === void 0 ? void 0 : _b.facebookScopes).toEqual(['profile']);
|
|
54
|
-
expect((_c = result.loginOptions) === null || _c === void 0 ? void 0 : _c.googleLogin).toBe(true);
|
|
55
|
-
expect((_d = result.loginOptions) === null || _d === void 0 ? void 0 : _d.facebookLogin).toBe(true);
|
|
56
|
-
expect((_e = result.loginOptions) === null || _e === void 0 ? void 0 : _e.scopes).toEqual(['aws.cognito.signin.user.admin', 'email', 'openid', 'phone', 'profile']);
|
|
57
|
-
});
|
|
58
|
-
it('should handle providers without scopes gracefully', () => {
|
|
59
|
-
var _a, _b;
|
|
60
|
-
const mockIdentityProvidersDetails = [
|
|
61
|
-
{
|
|
62
|
-
ProviderType: client_cognito_identity_provider_1.IdentityProviderTypeType.Google,
|
|
63
|
-
ProviderName: 'Google',
|
|
64
|
-
ProviderDetails: {
|
|
65
|
-
client_id: '911159018992-rnun5p7a6imtf206ci261m3s0jbap5ng.apps.googleusercontent.com',
|
|
66
|
-
client_secret: 'GOCSPX-...',
|
|
67
|
-
},
|
|
68
|
-
AttributeMapping: {
|
|
69
|
-
email: 'email',
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
];
|
|
73
|
-
const mockUserPool = {
|
|
74
|
-
EmailVerificationMessage: null,
|
|
75
|
-
EmailVerificationSubject: null,
|
|
76
|
-
SchemaAttributes: [],
|
|
77
|
-
};
|
|
78
|
-
const result = (0, index_1.getAuthDefinition)({
|
|
79
|
-
userPool: mockUserPool,
|
|
80
|
-
identityProviders: [{ ProviderType: client_cognito_identity_provider_1.IdentityProviderTypeType.Google }],
|
|
81
|
-
identityProvidersDetails: mockIdentityProvidersDetails,
|
|
82
|
-
webClient: {},
|
|
83
|
-
});
|
|
84
|
-
expect((_a = result.loginOptions) === null || _a === void 0 ? void 0 : _a.googleScopes).toBeUndefined();
|
|
85
|
-
expect((_b = result.loginOptions) === null || _b === void 0 ? void 0 : _b.googleLogin).toBe(true);
|
|
86
|
-
});
|
|
87
|
-
it('should map Facebook public_profile to Cognito profile scope', () => {
|
|
88
|
-
var _a;
|
|
89
|
-
const mockIdentityProvidersDetails = [
|
|
90
|
-
{
|
|
91
|
-
ProviderType: client_cognito_identity_provider_1.IdentityProviderTypeType.Facebook,
|
|
92
|
-
ProviderName: 'Facebook',
|
|
93
|
-
ProviderDetails: {
|
|
94
|
-
client_id: '1412236500618572',
|
|
95
|
-
client_secret: '...',
|
|
96
|
-
authorized_scopes: 'public_profile email',
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
];
|
|
100
|
-
const mockUserPool = {
|
|
101
|
-
EmailVerificationMessage: null,
|
|
102
|
-
EmailVerificationSubject: null,
|
|
103
|
-
SchemaAttributes: [],
|
|
104
|
-
};
|
|
105
|
-
const result = (0, index_1.getAuthDefinition)({
|
|
106
|
-
userPool: mockUserPool,
|
|
107
|
-
identityProviders: [{ ProviderType: client_cognito_identity_provider_1.IdentityProviderTypeType.Facebook }],
|
|
108
|
-
identityProvidersDetails: mockIdentityProvidersDetails,
|
|
109
|
-
webClient: {},
|
|
110
|
-
});
|
|
111
|
-
expect((_a = result.loginOptions) === null || _a === void 0 ? void 0 : _a.facebookScopes).toEqual(['profile', 'email']);
|
|
112
|
-
});
|
|
113
|
-
it('should filter out invalid scopes', () => {
|
|
114
|
-
var _a;
|
|
115
|
-
const mockIdentityProvidersDetails = [
|
|
116
|
-
{
|
|
117
|
-
ProviderType: client_cognito_identity_provider_1.IdentityProviderTypeType.Google,
|
|
118
|
-
ProviderName: 'Google',
|
|
119
|
-
ProviderDetails: {
|
|
120
|
-
client_id: '911159018992-rnun5p7a6imtf206ci261m3s0jbap5ng.apps.googleusercontent.com',
|
|
121
|
-
client_secret: 'GOCSPX-...',
|
|
122
|
-
authorized_scopes: 'openid email profile invalid_scope another_invalid',
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
];
|
|
126
|
-
const mockUserPool = {
|
|
127
|
-
EmailVerificationMessage: null,
|
|
128
|
-
EmailVerificationSubject: null,
|
|
129
|
-
SchemaAttributes: [],
|
|
130
|
-
};
|
|
131
|
-
const result = (0, index_1.getAuthDefinition)({
|
|
132
|
-
userPool: mockUserPool,
|
|
133
|
-
identityProviders: [{ ProviderType: client_cognito_identity_provider_1.IdentityProviderTypeType.Google }],
|
|
134
|
-
identityProvidersDetails: mockIdentityProvidersDetails,
|
|
135
|
-
webClient: {},
|
|
136
|
-
});
|
|
137
|
-
expect((_a = result.loginOptions) === null || _a === void 0 ? void 0 : _a.googleScopes).toEqual(['openid', 'email', 'profile']);
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
//# sourceMappingURL=index.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/adapters/auth/index.test.ts"],"names":[],"mappings":";;AAAA,mCAA4C;AAC5C,gGAAqF;AAErF,QAAQ,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACzD,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;;QACtE,MAAM,4BAA4B,GAAG;YACnC;gBACE,YAAY,EAAE,2DAAwB,CAAC,MAAM;gBAC7C,YAAY,EAAE,QAAQ;gB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iB,EAAC;YAC/B,QAAQ,EAAE,YAAY;YACtB,iBAAiB,EAAE,CAAC,EAAE,YAAY,EAAE,2DAAwB,CAAC,MAAM,EAAE,CAAC;YACtE,wBAAwB,EAAE,4BAA4B;YACtD,SAAS,EAAE,EAAE;SACd,CAAC,CAAC;QAGH,MAAM,CAAC,MAAA,MAAM,CAAC,YAAY,0CAAE,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;IACpF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DataTableMapping } from '../../core/migration-pipeline';
|
|
2
|
-
import { Stack } from '@aws-sdk/client-cloudformation';
|
|
3
|
-
export declare const tableMappingKey = "DataSourceMappingOutput";
|
|
4
|
-
export declare const getDataDefinition: (dataStack: Stack) => DataTableMapping;
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/adapters/data/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAEvD,eAAO,MAAM,eAAe,4BAA4B,CAAC;AAEzD,eAAO,MAAM,iBAAiB,GAAI,WAAW,KAAK,KAAG,gBAKpD,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getDataDefinition = exports.tableMappingKey = void 0;
|
|
7
|
-
const node_assert_1 = __importDefault(require("node:assert"));
|
|
8
|
-
exports.tableMappingKey = 'DataSourceMappingOutput';
|
|
9
|
-
const getDataDefinition = (dataStack) => {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
const rawTableMapping = (_b = (_a = dataStack.Outputs) === null || _a === void 0 ? void 0 : _a.find((o) => o.OutputKey === exports.tableMappingKey)) === null || _b === void 0 ? void 0 : _b.OutputValue;
|
|
12
|
-
(0, node_assert_1.default)(rawTableMapping);
|
|
13
|
-
const tableMapping = JSON.parse(rawTableMapping);
|
|
14
|
-
return tableMapping;
|
|
15
|
-
};
|
|
16
|
-
exports.getDataDefinition = getDataDefinition;
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/adapters/data/index.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AAIpB,QAAA,eAAe,GAAG,yBAAyB,CAAC;AAElD,MAAM,iBAAiB,GAAG,CAAC,SAAgB,EAAoB,EAAE;;IACtE,MAAM,eAAe,GAAG,MAAA,MAAA,SAAS,CAAC,OAAO,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,uBAAe,CAAC,0CAAE,WAAW,CAAC;IACrG,IAAA,qBAAM,EAAC,eAAe,CAAC,CAAC;IACxB,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IACjD,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AALW,QAAA,iBAAiB,qBAK5B"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FunctionDefinition } from '../../core/migration-pipeline';
|
|
2
|
-
export interface DynamoTriggerInfo {
|
|
3
|
-
functionName: string;
|
|
4
|
-
models: string[];
|
|
5
|
-
}
|
|
6
|
-
export declare class ApiTriggerDetector {
|
|
7
|
-
static detectDynamoTriggers(functions: FunctionDefinition[]): DynamoTriggerInfo[];
|
|
8
|
-
private static extractTriggeredModels;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=api-trigger-detector.d.ts.map
|
package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-trigger-detector.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,qBAAa,kBAAkB;IAI7B,MAAM,CAAC,oBAAoB,CAAC,SAAS,EAAE,kBAAkB,EAAE,GAAG,iBAAiB,EAAE;IAwBjF,OAAO,CAAC,MAAM,CAAC,sBAAsB;CAwBtC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ApiTriggerDetector = void 0;
|
|
7
|
-
const amplify_cli_core_1 = require("@aws-amplify/amplify-cli-core");
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
class ApiTriggerDetector {
|
|
10
|
-
static detectDynamoTriggers(functions) {
|
|
11
|
-
const triggers = [];
|
|
12
|
-
for (const func of functions) {
|
|
13
|
-
if (func.resourceName) {
|
|
14
|
-
const models = this.extractTriggeredModels(func.resourceName);
|
|
15
|
-
if (models.length > 0) {
|
|
16
|
-
triggers.push({ functionName: func.resourceName, models });
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return triggers;
|
|
21
|
-
}
|
|
22
|
-
static extractTriggeredModels(functionName) {
|
|
23
|
-
var _a, _b;
|
|
24
|
-
const templatePath = path_1.default.join('amplify', 'backend', 'function', functionName, `${functionName}-cloudformation-template.json`);
|
|
25
|
-
const { cfnTemplate } = (0, amplify_cli_core_1.readCFNTemplate)(templatePath);
|
|
26
|
-
const models = [];
|
|
27
|
-
for (const [, resource] of Object.entries(cfnTemplate.Resources || {})) {
|
|
28
|
-
if (resource.Type === 'AWS::Lambda::EventSourceMapping' && ((_a = resource.Properties) === null || _a === void 0 ? void 0 : _a.EventSourceArn)) {
|
|
29
|
-
const eventSourceArn = resource.Properties.EventSourceArn;
|
|
30
|
-
if ((_b = eventSourceArn['Fn::ImportValue']) === null || _b === void 0 ? void 0 : _b['Fn::Sub']) {
|
|
31
|
-
const importValue = eventSourceArn['Fn::ImportValue']['Fn::Sub'];
|
|
32
|
-
const match = importValue.match(/:GetAtt:(\w+)Table:StreamArn/);
|
|
33
|
-
if (match) {
|
|
34
|
-
models.push(match[1]);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return models;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.ApiTriggerDetector = ApiTriggerDetector;
|
|
43
|
-
//# sourceMappingURL=api-trigger-detector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-trigger-detector.js","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.ts"],"names":[],"mappings":";;;;;;AAAA,oEAAgE;AAChE,gDAAwB;AAQxB,MAAa,kBAAkB;IAI7B,MAAM,CAAC,oBAAoB,CAAC,SAA+B;QACzD,MAAM,QAAQ,GAAwB,EAAE,CAAC;QAEzC,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;YAC7B,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;gBACtB,MAAM,MAAM,GAAG,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gB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ib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-trigger-detector.test.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.ts"],"names":[],"mappings":""}
|
package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const api_trigger_detector_1 = require("./api-trigger-detector");
|
|
4
|
-
const amplify_cli_core_1 = require("@aws-amplify/amplify-cli-core");
|
|
5
|
-
jest.mock('@aws-amplify/amplify-cli-core');
|
|
6
|
-
const mockReadCFNTemplate = amplify_cli_core_1.readCFNTemplate;
|
|
7
|
-
describe('ApiTriggerDetector', () => {
|
|
8
|
-
it('should return empty array when no functions', () => {
|
|
9
|
-
expect(api_trigger_detector_1.ApiTriggerDetector.detectDynamoTriggers([])).toEqual([]);
|
|
10
|
-
});
|
|
11
|
-
it('should detect DynamoDB trigger', () => {
|
|
12
|
-
const functions = [{ resourceName: 'testFunc' }];
|
|
13
|
-
mockReadCFNTemplate.mockReturnValue({
|
|
14
|
-
templateFormat: amplify_cli_core_1.CFNTemplateFormat.JSON,
|
|
15
|
-
cfnTemplate: {
|
|
16
|
-
Resources: {
|
|
17
|
-
LambdaEventSourceMappingPost: {
|
|
18
|
-
Type: 'AWS::Lambda::EventSourceMapping',
|
|
19
|
-
Properties: {
|
|
20
|
-
EventSourceArn: {
|
|
21
|
-
'Fn::ImportValue': {
|
|
22
|
-
'Fn::Sub': '${apidiscussionsfinalGraphQLAPIIdOutput}:GetAtt:PostTable:StreamArn',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
const result = api_trigger_detector_1.ApiTriggerDetector.detectDynamoTriggers(functions);
|
|
31
|
-
expect(result).toEqual([{ functionName: 'testFunc', models: ['Post'] }]);
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=api-trigger-detector.test.js.map
|
package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api-trigger-detector.test.js","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.ts"],"names":[],"mappings":";;AAAA,iEAA4D;AAE5D,oEAAmF;AAEnF,IAAI,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;AAC3C,MAAM,mBAAmB,GAAG,kCAA8D,CAAC;AAE3F,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACrD,MAAM,CAAC,yCAAkB,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE;QACxC,MAAM,SAAS,GAAyB,CAAC,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC,CAAC;QAEvE,mBAAmB,CAAC,eAAe,CAAC;YAClC,cAAc,EAAE,oCAAiB,CAAC,IAAI;YACtC,WAAW,EAAE;gBACX,SAAS,EAAE;oBACT,4BAA4B,EAAE;wBAC5B,IAAI,EAAE,iCAAiC;wBACvC,UAAU,EAAE;4BACV,cAAc,EAAE;gCACd,iBAAiB,EAAE;oCACjB,SAAS,EAAE,qEAAqE;iCACjF;6BACF;yBACF;qBACF;iBACF;aACF;SACF,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,yCAAkB,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;QAClE,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FunctionDefinition } from '../../core/migration-pipeline';
|
|
2
|
-
import { FunctionConfiguration } from '@aws-sdk/client-lambda';
|
|
3
|
-
import { AuthAccess } from '../../generators/functions/index';
|
|
4
|
-
export type AmplifyMetaFunction = {
|
|
5
|
-
service: string;
|
|
6
|
-
providerPlugin: 'awscloudformation';
|
|
7
|
-
output: Record<string, string>;
|
|
8
|
-
};
|
|
9
|
-
type FunctionSchedule = {
|
|
10
|
-
functionName: string;
|
|
11
|
-
scheduleExpression: string | undefined;
|
|
12
|
-
};
|
|
13
|
-
export type AmplifyMetaWithFunction = {
|
|
14
|
-
function: Record<string, AmplifyMetaFunction>;
|
|
15
|
-
};
|
|
16
|
-
export declare const getFunctionDefinition: (functionConfigurations: FunctionConfiguration[], functionSchedules: FunctionSchedule[], functionCategoryMap: Map<string, string>, meta: AmplifyMetaWithFunction, functionAuthAccess?: Map<string, AuthAccess>) => FunctionDefinition[];
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|