@aws-amplify/cli-internal-gen2-migration-experimental-alpha 0.1.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/API.md +108 -0
- package/CHANGELOG.md +4959 -0
- package/amplify-plugin.json +35 -0
- package/aws-amplify-cli-internal-gen2-migration-experimental-alpha-0.1.0.tgz +0 -0
- package/bin/amplify +11 -0
- package/bin/amplify.production.template +12 -0
- package/lib/amplify-exception-handler.d.ts +6 -0
- package/lib/amplify-exception-handler.d.ts.map +1 -0
- package/lib/amplify-exception-handler.js +158 -0
- package/lib/amplify-exception-handler.js.map +1 -0
- package/lib/amplify-service-helper.d.ts +4 -0
- package/lib/amplify-service-helper.d.ts.map +1 -0
- package/lib/amplify-service-helper.js +78 -0
- package/lib/amplify-service-helper.js.map +1 -0
- package/lib/app-config/config.d.ts +18 -0
- package/lib/app-config/config.d.ts.map +1 -0
- package/lib/app-config/config.js +89 -0
- package/lib/app-config/config.js.map +1 -0
- package/lib/app-config/debug-config.d.ts +14 -0
- package/lib/app-config/debug-config.d.ts.map +1 -0
- package/lib/app-config/debug-config.js +70 -0
- package/lib/app-config/debug-config.js.map +1 -0
- package/lib/app-config/getPath.d.ts +3 -0
- package/lib/app-config/getPath.d.ts.map +1 -0
- package/lib/app-config/getPath.js +47 -0
- package/lib/app-config/getPath.js.map +1 -0
- package/lib/app-config/index.d.ts +2 -0
- package/lib/app-config/index.d.ts.map +1 -0
- package/lib/app-config/index.js +18 -0
- package/lib/app-config/index.js.map +1 -0
- package/lib/attach-backend-steps/a10-queryProvider.d.ts +2 -0
- package/lib/attach-backend-steps/a10-queryProvider.d.ts.map +1 -0
- package/lib/attach-backend-steps/a10-queryProvider.js +99 -0
- package/lib/attach-backend-steps/a10-queryProvider.js.map +1 -0
- package/lib/attach-backend-steps/a20-analyzeProject.d.ts +3 -0
- package/lib/attach-backend-steps/a20-analyzeProject.d.ts.map +1 -0
- package/lib/attach-backend-steps/a20-analyzeProject.js +38 -0
- package/lib/attach-backend-steps/a20-analyzeProject.js.map +1 -0
- package/lib/attach-backend-steps/a30-initFrontend.d.ts +2 -0
- package/lib/attach-backend-steps/a30-initFrontend.d.ts.map +1 -0
- package/lib/attach-backend-steps/a30-initFrontend.js +83 -0
- package/lib/attach-backend-steps/a30-initFrontend.js.map +1 -0
- package/lib/attach-backend-steps/a40-generateFiles.d.ts +3 -0
- package/lib/attach-backend-steps/a40-generateFiles.d.ts.map +1 -0
- package/lib/attach-backend-steps/a40-generateFiles.js +129 -0
- package/lib/attach-backend-steps/a40-generateFiles.js.map +1 -0
- package/lib/attach-backend.d.ts +3 -0
- package/lib/attach-backend.d.ts.map +1 -0
- package/lib/attach-backend.js +230 -0
- package/lib/attach-backend.js.map +1 -0
- package/lib/commands/amplify.d.ts +2 -0
- package/lib/commands/amplify.d.ts.map +1 -0
- package/lib/commands/amplify.js +9 -0
- package/lib/commands/amplify.js.map +1 -0
- package/lib/commands/build.d.ts +8 -0
- package/lib/commands/build.d.ts.map +1 -0
- package/lib/commands/build.js +74 -0
- package/lib/commands/build.js.map +1 -0
- package/lib/commands/categories.d.ts +2 -0
- package/lib/commands/categories.d.ts.map +1 -0
- package/lib/commands/categories.js +8 -0
- package/lib/commands/categories.js.map +1 -0
- package/lib/commands/configure.d.ts +3 -0
- package/lib/commands/configure.d.ts.map +1 -0
- package/lib/commands/configure.js +105 -0
- package/lib/commands/configure.js.map +1 -0
- package/lib/commands/console.d.ts +3 -0
- package/lib/commands/console.d.ts.map +1 -0
- package/lib/commands/console.js +78 -0
- package/lib/commands/console.js.map +1 -0
- package/lib/commands/delete.d.ts +3 -0
- package/lib/commands/delete.d.ts.map +1 -0
- package/lib/commands/delete.js +16 -0
- package/lib/commands/delete.js.map +1 -0
- package/lib/commands/diagnose.d.ts +4 -0
- package/lib/commands/diagnose.d.ts.map +1 -0
- package/lib/commands/diagnose.js +236 -0
- package/lib/commands/diagnose.js.map +1 -0
- package/lib/commands/drift-detection/detect-local-drift.d.ts +22 -0
- package/lib/commands/drift-detection/detect-local-drift.d.ts.map +1 -0
- package/lib/commands/drift-detection/detect-local-drift.js +47 -0
- package/lib/commands/drift-detection/detect-local-drift.js.map +1 -0
- package/lib/commands/drift-detection/detect-stack-drift.d.ts +11 -0
- package/lib/commands/drift-detection/detect-stack-drift.d.ts.map +1 -0
- package/lib/commands/drift-detection/detect-stack-drift.js +230 -0
- package/lib/commands/drift-detection/detect-stack-drift.js.map +1 -0
- package/lib/commands/drift-detection/detect-template-drift.d.ts +27 -0
- package/lib/commands/drift-detection/detect-template-drift.d.ts.map +1 -0
- package/lib/commands/drift-detection/detect-template-drift.js +252 -0
- package/lib/commands/drift-detection/detect-template-drift.js.map +1 -0
- package/lib/commands/drift-detection/index.d.ts +4 -0
- package/lib/commands/drift-detection/index.d.ts.map +1 -0
- package/lib/commands/drift-detection/index.js +11 -0
- package/lib/commands/drift-detection/index.js.map +1 -0
- package/lib/commands/drift-detection/services/amplify-config-service.d.ts +7 -0
- package/lib/commands/drift-detection/services/amplify-config-service.d.ts.map +1 -0
- package/lib/commands/drift-detection/services/amplify-config-service.js +49 -0
- package/lib/commands/drift-detection/services/amplify-config-service.js.map +1 -0
- package/lib/commands/drift-detection/services/cloudformation-service.d.ts +13 -0
- package/lib/commands/drift-detection/services/cloudformation-service.d.ts.map +1 -0
- package/lib/commands/drift-detection/services/cloudformation-service.js +120 -0
- package/lib/commands/drift-detection/services/cloudformation-service.js.map +1 -0
- package/lib/commands/drift-detection/services/drift-formatter.d.ts +73 -0
- package/lib/commands/drift-detection/services/drift-formatter.d.ts.map +1 -0
- package/lib/commands/drift-detection/services/drift-formatter.js +651 -0
- package/lib/commands/drift-detection/services/drift-formatter.js.map +1 -0
- package/lib/commands/drift-detection/services/file-service.d.ts +7 -0
- package/lib/commands/drift-detection/services/file-service.d.ts.map +1 -0
- package/lib/commands/drift-detection/services/file-service.js +53 -0
- package/lib/commands/drift-detection/services/file-service.js.map +1 -0
- package/lib/commands/drift-detection/services/index.d.ts +5 -0
- package/lib/commands/drift-detection/services/index.d.ts.map +1 -0
- package/lib/commands/drift-detection/services/index.js +12 -0
- package/lib/commands/drift-detection/services/index.js.map +1 -0
- package/lib/commands/drift.d.ts +29 -0
- package/lib/commands/drift.d.ts.map +1 -0
- package/lib/commands/drift.js +228 -0
- package/lib/commands/drift.js.map +1 -0
- package/lib/commands/env/add.d.ts +3 -0
- package/lib/commands/env/add.d.ts.map +1 -0
- package/lib/commands/env/add.js +21 -0
- package/lib/commands/env/add.js.map +1 -0
- package/lib/commands/env/checkout.d.ts +3 -0
- package/lib/commands/env/checkout.d.ts.map +1 -0
- package/lib/commands/env/checkout.js +51 -0
- package/lib/commands/env/checkout.js.map +1 -0
- package/lib/commands/env/get.d.ts +3 -0
- package/lib/commands/env/get.d.ts.map +1 -0
- package/lib/commands/env/get.js +32 -0
- package/lib/commands/env/get.js.map +1 -0
- package/lib/commands/env/import.d.ts +3 -0
- package/lib/commands/env/import.d.ts.map +1 -0
- package/lib/commands/env/import.js +87 -0
- package/lib/commands/env/import.js.map +1 -0
- package/lib/commands/env/list.d.ts +2 -0
- package/lib/commands/env/list.d.ts.map +1 -0
- package/lib/commands/env/list.js +49 -0
- package/lib/commands/env/list.js.map +1 -0
- package/lib/commands/env/pull.d.ts +2 -0
- package/lib/commands/env/pull.d.ts.map +1 -0
- package/lib/commands/env/pull.js +12 -0
- package/lib/commands/env/pull.js.map +1 -0
- package/lib/commands/env/remove.d.ts +3 -0
- package/lib/commands/env/remove.d.ts.map +1 -0
- package/lib/commands/env/remove.js +63 -0
- package/lib/commands/env/remove.js.map +1 -0
- package/lib/commands/env/update.d.ts +3 -0
- package/lib/commands/env/update.d.ts.map +1 -0
- package/lib/commands/env/update.js +9 -0
- package/lib/commands/env/update.js.map +1 -0
- package/lib/commands/env.d.ts +2 -0
- package/lib/commands/env.d.ts.map +1 -0
- package/lib/commands/env.js +129 -0
- package/lib/commands/env.js.map +1 -0
- package/lib/commands/export.d.ts +3 -0
- package/lib/commands/export.d.ts.map +1 -0
- package/lib/commands/export.js +141 -0
- package/lib/commands/export.js.map +1 -0
- package/lib/commands/gen2-migration/_step.d.ts +16 -0
- package/lib/commands/gen2-migration/_step.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_step.js +15 -0
- package/lib/commands/gen2-migration/_step.js.map +1 -0
- package/lib/commands/gen2-migration/_validations.d.ts +22 -0
- package/lib/commands/gen2-migration/_validations.d.ts.map +1 -0
- package/lib/commands/gen2-migration/_validations.js +227 -0
- package/lib/commands/gen2-migration/_validations.js.map +1 -0
- package/lib/commands/gen2-migration/cleanup.d.ts +8 -0
- package/lib/commands/gen2-migration/cleanup.d.ts.map +1 -0
- package/lib/commands/gen2-migration/cleanup.js +21 -0
- package/lib/commands/gen2-migration/cleanup.js.map +1 -0
- package/lib/commands/gen2-migration/clone.d.ts +8 -0
- package/lib/commands/gen2-migration/clone.d.ts.map +1 -0
- package/lib/commands/gen2-migration/clone.js +21 -0
- package/lib/commands/gen2-migration/clone.js.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/backend-updater.d.ts +7 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/backend-updater.d.ts.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/backend-updater.js +84 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/backend-updater.js.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/dependency-merger.d.ts +8 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/dependency-merger.d.ts.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/dependency-merger.js +105 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/dependency-merger.js.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/file-converter.d.ts +5 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/file-converter.d.ts.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/file-converter.js +88 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/file-converter.js.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/gen2-file-generator.d.ts +8 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/gen2-file-generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/gen2-file-generator.js +36 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/generator/gen2-file-generator.js.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/parser/cdk-stack-parser.d.ts +5 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/parser/cdk-stack-parser.d.ts.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/parser/cdk-stack-parser.js +81 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/parser/cdk-stack-parser.js.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/parser/pattern-detector.d.ts +15 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/parser/pattern-detector.d.ts.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/parser/pattern-detector.js +35 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/parser/pattern-detector.js.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/scanner/custom-resource-scanner.d.ts +5 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/scanner/custom-resource-scanner.d.ts.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/scanner/custom-resource-scanner.js +66 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/scanner/custom-resource-scanner.js.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/transformer/amplify-helper-transformer.d.ts +6 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/transformer/amplify-helper-transformer.d.ts.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/transformer/amplify-helper-transformer.js +156 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/transformer/amplify-helper-transformer.js.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/types.d.ts +38 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/types.d.ts.map +1 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/types.js +3 -0
- package/lib/commands/gen2-migration/codegen-custom-resources/types.js.map +1 -0
- package/lib/commands/gen2-migration/decommission.d.ts +9 -0
- package/lib/commands/gen2-migration/decommission.d.ts.map +1 -0
- package/lib/commands/gen2-migration/decommission.js +70 -0
- package/lib/commands/gen2-migration/decommission.js.map +1 -0
- package/lib/commands/gen2-migration/generate.d.ts +8 -0
- package/lib/commands/gen2-migration/generate.d.ts.map +1 -0
- package/lib/commands/gen2-migration/generate.js +23 -0
- package/lib/commands/gen2-migration/generate.js.map +1 -0
- package/lib/commands/gen2-migration/lock.d.ts +10 -0
- package/lib/commands/gen2-migration/lock.d.ts.map +1 -0
- package/lib/commands/gen2-migration/lock.js +92 -0
- package/lib/commands/gen2-migration/lock.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.d.ts +5 -0
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.js +76 -0
- package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.d.ts +6 -0
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.js +52 -0
- package/lib/commands/gen2-migration/refactor/cfn-stack-updater.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.d.ts +40 -0
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.js +312 -0
- package/lib/commands/gen2-migration/refactor/generators/category-template-generator.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/generators/template-generator.d.ts +49 -0
- package/lib/commands/gen2-migration/refactor/generators/template-generator.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/generators/template-generator.js +518 -0
- package/lib/commands/gen2-migration/refactor/generators/template-generator.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/index.d.ts +2 -0
- package/lib/commands/gen2-migration/refactor/index.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/index.js +6 -0
- package/lib/commands/gen2-migration/refactor/index.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.d.ts +16 -0
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.js +69 -0
- package/lib/commands/gen2-migration/refactor/oauth-values-retriever.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/refactor.d.ts +19 -0
- package/lib/commands/gen2-migration/refactor/refactor.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/refactor.js +223 -0
- package/lib/commands/gen2-migration/refactor/refactor.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.d.ts +13 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.js +137 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.d.ts +8 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.js +27 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.d.ts +14 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.js +137 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.d.ts +10 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.js +49 -0
- package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/types.d.ts +125 -0
- package/lib/commands/gen2-migration/refactor/types.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/types.js +55 -0
- package/lib/commands/gen2-migration/refactor/types.js.map +1 -0
- package/lib/commands/gen2-migration/refactor/utils.d.ts +2 -0
- package/lib/commands/gen2-migration/refactor/utils.d.ts.map +1 -0
- package/lib/commands/gen2-migration/refactor/utils.js +7 -0
- package/lib/commands/gen2-migration/refactor/utils.js.map +1 -0
- package/lib/commands/gen2-migration/shift.d.ts +8 -0
- package/lib/commands/gen2-migration/shift.d.ts.map +1 -0
- package/lib/commands/gen2-migration/shift.js +21 -0
- package/lib/commands/gen2-migration/shift.js.map +1 -0
- package/lib/commands/gen2-migration/stateful-resources.d.ts +2 -0
- package/lib/commands/gen2-migration/stateful-resources.d.ts.map +1 -0
- package/lib/commands/gen2-migration/stateful-resources.js +34 -0
- package/lib/commands/gen2-migration/stateful-resources.js.map +1 -0
- package/lib/commands/gen2-migration.d.ts +15 -0
- package/lib/commands/gen2-migration.d.ts.map +1 -0
- package/lib/commands/gen2-migration.js +181 -0
- package/lib/commands/gen2-migration.js.map +1 -0
- package/lib/commands/help.d.ts +3 -0
- package/lib/commands/help.d.ts.map +1 -0
- package/lib/commands/help.js +9 -0
- package/lib/commands/help.js.map +1 -0
- package/lib/commands/helpers/collect-files.d.ts +9 -0
- package/lib/commands/helpers/collect-files.d.ts.map +1 -0
- package/lib/commands/helpers/collect-files.js +141 -0
- package/lib/commands/helpers/collect-files.js.map +1 -0
- package/lib/commands/helpers/encryption-helpers.d.ts +7 -0
- package/lib/commands/helpers/encryption-helpers.d.ts.map +1 -0
- package/lib/commands/helpers/encryption-helpers.js +37 -0
- package/lib/commands/helpers/encryption-helpers.js.map +1 -0
- package/lib/commands/helpers/envUtils.d.ts +2 -0
- package/lib/commands/helpers/envUtils.d.ts.map +1 -0
- package/lib/commands/helpers/envUtils.js +21 -0
- package/lib/commands/helpers/envUtils.js.map +1 -0
- package/lib/commands/helpers/projectUtils.d.ts +2 -0
- package/lib/commands/helpers/projectUtils.d.ts.map +1 -0
- package/lib/commands/helpers/projectUtils.js +17 -0
- package/lib/commands/helpers/projectUtils.js.map +1 -0
- package/lib/commands/helpers/reporter-apis.d.ts +3 -0
- package/lib/commands/helpers/reporter-apis.d.ts.map +1 -0
- package/lib/commands/helpers/reporter-apis.js +29 -0
- package/lib/commands/helpers/reporter-apis.js.map +1 -0
- package/lib/commands/init.d.ts +3 -0
- package/lib/commands/init.d.ts.map +1 -0
- package/lib/commands/init.js +53 -0
- package/lib/commands/init.js.map +1 -0
- package/lib/commands/logout.d.ts +3 -0
- package/lib/commands/logout.d.ts.map +1 -0
- package/lib/commands/logout.js +33 -0
- package/lib/commands/logout.js.map +1 -0
- package/lib/commands/migrate.d.ts +2 -0
- package/lib/commands/migrate.d.ts.map +1 -0
- package/lib/commands/migrate.js +9 -0
- package/lib/commands/migrate.js.map +1 -0
- package/lib/commands/plugin/add.d.ts +3 -0
- package/lib/commands/plugin/add.d.ts.map +1 -0
- package/lib/commands/plugin/add.js +239 -0
- package/lib/commands/plugin/add.js.map +1 -0
- package/lib/commands/plugin/configure.d.ts +5 -0
- package/lib/commands/plugin/configure.d.ts.map +1 -0
- package/lib/commands/plugin/configure.js +326 -0
- package/lib/commands/plugin/configure.js.map +1 -0
- package/lib/commands/plugin/help.d.ts +3 -0
- package/lib/commands/plugin/help.d.ts.map +1 -0
- package/lib/commands/plugin/help.js +9 -0
- package/lib/commands/plugin/help.js.map +1 -0
- package/lib/commands/plugin/list.d.ts +3 -0
- package/lib/commands/plugin/list.d.ts.map +1 -0
- package/lib/commands/plugin/list.js +93 -0
- package/lib/commands/plugin/list.js.map +1 -0
- package/lib/commands/plugin/new.d.ts +3 -0
- package/lib/commands/plugin/new.d.ts.map +1 -0
- package/lib/commands/plugin/new.js +93 -0
- package/lib/commands/plugin/new.js.map +1 -0
- package/lib/commands/plugin/remove.d.ts +3 -0
- package/lib/commands/plugin/remove.d.ts.map +1 -0
- package/lib/commands/plugin/remove.js +113 -0
- package/lib/commands/plugin/remove.js.map +1 -0
- package/lib/commands/plugin/scan.d.ts +2 -0
- package/lib/commands/plugin/scan.d.ts.map +1 -0
- package/lib/commands/plugin/scan.js +9 -0
- package/lib/commands/plugin/scan.js.map +1 -0
- package/lib/commands/plugin/verify.d.ts +3 -0
- package/lib/commands/plugin/verify.d.ts.map +1 -0
- package/lib/commands/plugin/verify.js +19 -0
- package/lib/commands/plugin/verify.js.map +1 -0
- package/lib/commands/plugin.d.ts +3 -0
- package/lib/commands/plugin.d.ts.map +1 -0
- package/lib/commands/plugin.js +63 -0
- package/lib/commands/plugin.js.map +1 -0
- package/lib/commands/publish.d.ts +2 -0
- package/lib/commands/publish.d.ts.map +1 -0
- package/lib/commands/publish.js +43 -0
- package/lib/commands/publish.js.map +1 -0
- package/lib/commands/pull.d.ts +3 -0
- package/lib/commands/pull.d.ts.map +1 -0
- package/lib/commands/pull.js +68 -0
- package/lib/commands/pull.js.map +1 -0
- package/lib/commands/push.d.ts +3 -0
- package/lib/commands/push.d.ts.map +1 -0
- package/lib/commands/push.js +26 -0
- package/lib/commands/push.js.map +1 -0
- package/lib/commands/run.d.ts +3 -0
- package/lib/commands/run.d.ts.map +1 -0
- package/lib/commands/run.js +12 -0
- package/lib/commands/run.js.map +1 -0
- package/lib/commands/status.d.ts +3 -0
- package/lib/commands/status.d.ts.map +1 -0
- package/lib/commands/status.js +79 -0
- package/lib/commands/status.js.map +1 -0
- package/lib/commands/uninstall.d.ts +3 -0
- package/lib/commands/uninstall.d.ts.map +1 -0
- package/lib/commands/uninstall.js +92 -0
- package/lib/commands/uninstall.js.map +1 -0
- package/lib/commands/upgrade.d.ts +3 -0
- package/lib/commands/upgrade.d.ts.map +1 -0
- package/lib/commands/upgrade.js +121 -0
- package/lib/commands/upgrade.js.map +1 -0
- package/lib/commands/version.d.ts +2 -0
- package/lib/commands/version.d.ts.map +1 -0
- package/lib/commands/version.js +10 -0
- package/lib/commands/version.js.map +1 -0
- package/lib/conditional-local-logging-init.d.ts +3 -0
- package/lib/conditional-local-logging-init.d.ts.map +1 -0
- package/lib/conditional-local-logging-init.js +14 -0
- package/lib/conditional-local-logging-init.js.map +1 -0
- package/lib/config-steps/c0-analyzeProject.d.ts +2 -0
- package/lib/config-steps/c0-analyzeProject.d.ts.map +1 -0
- package/lib/config-steps/c0-analyzeProject.js +151 -0
- package/lib/config-steps/c0-analyzeProject.js.map +1 -0
- package/lib/config-steps/c1-configFrontend.d.ts +2 -0
- package/lib/config-steps/c1-configFrontend.d.ts.map +1 -0
- package/lib/config-steps/c1-configFrontend.js +73 -0
- package/lib/config-steps/c1-configFrontend.js.map +1 -0
- package/lib/config-steps/c2-configProviders.d.ts +2 -0
- package/lib/config-steps/c2-configProviders.d.ts.map +1 -0
- package/lib/config-steps/c2-configProviders.js +97 -0
- package/lib/config-steps/c2-configProviders.js.map +1 -0
- package/lib/config-steps/c9-onFailure.d.ts +2 -0
- package/lib/config-steps/c9-onFailure.d.ts.map +1 -0
- package/lib/config-steps/c9-onFailure.js +43 -0
- package/lib/config-steps/c9-onFailure.js.map +1 -0
- package/lib/config-steps/c9-onSuccess.d.ts +2 -0
- package/lib/config-steps/c9-onSuccess.d.ts.map +1 -0
- package/lib/config-steps/c9-onSuccess.js +17 -0
- package/lib/config-steps/c9-onSuccess.js.map +1 -0
- package/lib/configure-new-user.d.ts +2 -0
- package/lib/configure-new-user.d.ts.map +1 -0
- package/lib/configure-new-user.js +61 -0
- package/lib/configure-new-user.js.map +1 -0
- package/lib/context-manager.d.ts +6 -0
- package/lib/context-manager.d.ts.map +1 -0
- package/lib/context-manager.js +101 -0
- package/lib/context-manager.js.map +1 -0
- package/lib/display-banner-messages.d.ts +3 -0
- package/lib/display-banner-messages.d.ts.map +1 -0
- package/lib/display-banner-messages.js +51 -0
- package/lib/display-banner-messages.js.map +1 -0
- package/lib/domain/add-plugin-result.d.ts +12 -0
- package/lib/domain/add-plugin-result.d.ts.map +1 -0
- package/lib/domain/add-plugin-result.js +17 -0
- package/lib/domain/add-plugin-result.js.map +1 -0
- package/lib/domain/amplify-plugin-type.d.ts +7 -0
- package/lib/domain/amplify-plugin-type.d.ts.map +1 -0
- package/lib/domain/amplify-plugin-type.js +11 -0
- package/lib/domain/amplify-plugin-type.js.map +1 -0
- package/lib/domain/amplify-toolkit.d.ts +84 -0
- package/lib/domain/amplify-toolkit.d.ts.map +1 -0
- package/lib/domain/amplify-toolkit.js +244 -0
- package/lib/domain/amplify-toolkit.js.map +1 -0
- package/lib/domain/amplify-usageData/FlowReport.d.ts +30 -0
- package/lib/domain/amplify-usageData/FlowReport.d.ts.map +1 -0
- package/lib/domain/amplify-usageData/FlowReport.js +99 -0
- package/lib/domain/amplify-usageData/FlowReport.js.map +1 -0
- package/lib/domain/amplify-usageData/NoFlowReport.d.ts +12 -0
- package/lib/domain/amplify-usageData/NoFlowReport.d.ts.map +1 -0
- package/lib/domain/amplify-usageData/NoFlowReport.js +21 -0
- package/lib/domain/amplify-usageData/NoFlowReport.js.map +1 -0
- package/lib/domain/amplify-usageData/NoUsageData.d.ts +24 -0
- package/lib/domain/amplify-usageData/NoUsageData.d.ts.map +1 -0
- package/lib/domain/amplify-usageData/NoUsageData.js +69 -0
- package/lib/domain/amplify-usageData/NoUsageData.js.map +1 -0
- package/lib/domain/amplify-usageData/SerializableError.d.ts +16 -0
- package/lib/domain/amplify-usageData/SerializableError.d.ts.map +1 -0
- package/lib/domain/amplify-usageData/SerializableError.js +129 -0
- package/lib/domain/amplify-usageData/SerializableError.js.map +1 -0
- package/lib/domain/amplify-usageData/Timer.d.ts +8 -0
- package/lib/domain/amplify-usageData/Timer.d.ts.map +1 -0
- package/lib/domain/amplify-usageData/Timer.js +17 -0
- package/lib/domain/amplify-usageData/Timer.js.map +1 -0
- package/lib/domain/amplify-usageData/UsageData.d.ts +45 -0
- package/lib/domain/amplify-usageData/UsageData.d.ts.map +1 -0
- package/lib/domain/amplify-usageData/UsageData.js +163 -0
- package/lib/domain/amplify-usageData/UsageData.js.map +1 -0
- package/lib/domain/amplify-usageData/UsageDataPayload.d.ts +26 -0
- package/lib/domain/amplify-usageData/UsageDataPayload.d.ts.map +1 -0
- package/lib/domain/amplify-usageData/UsageDataPayload.js +69 -0
- package/lib/domain/amplify-usageData/UsageDataPayload.js.map +1 -0
- package/lib/domain/amplify-usageData/VersionManager.d.ts +3 -0
- package/lib/domain/amplify-usageData/VersionManager.d.ts.map +1 -0
- package/lib/domain/amplify-usageData/VersionManager.js +29 -0
- package/lib/domain/amplify-usageData/VersionManager.js.map +1 -0
- package/lib/domain/amplify-usageData/getUsageDataUrl.d.ts +4 -0
- package/lib/domain/amplify-usageData/getUsageDataUrl.d.ts.map +1 -0
- package/lib/domain/amplify-usageData/getUsageDataUrl.js +27 -0
- package/lib/domain/amplify-usageData/getUsageDataUrl.js.map +1 -0
- package/lib/domain/amplify-usageData/identifiable-input-regex.d.ts +3 -0
- package/lib/domain/amplify-usageData/identifiable-input-regex.d.ts.map +1 -0
- package/lib/domain/amplify-usageData/identifiable-input-regex.js +80 -0
- package/lib/domain/amplify-usageData/identifiable-input-regex.js.map +1 -0
- package/lib/domain/amplify-usageData/index.d.ts +4 -0
- package/lib/domain/amplify-usageData/index.d.ts.map +1 -0
- package/lib/domain/amplify-usageData/index.js +8 -0
- package/lib/domain/amplify-usageData/index.js.map +1 -0
- package/lib/domain/command-input.d.ts +12 -0
- package/lib/domain/command-input.d.ts.map +1 -0
- package/lib/domain/command-input.js +11 -0
- package/lib/domain/command-input.js.map +1 -0
- package/lib/domain/context.d.ts +11 -0
- package/lib/domain/context.d.ts.map +1 -0
- package/lib/domain/context.js +13 -0
- package/lib/domain/context.js.map +1 -0
- package/lib/domain/error.d.ts +1 -0
- package/lib/domain/error.d.ts.map +1 -0
- package/lib/domain/error.js +1 -0
- package/lib/domain/error.js.map +1 -0
- package/lib/domain/input-verification-result.d.ts +7 -0
- package/lib/domain/input-verification-result.d.ts.map +1 -0
- package/lib/domain/input-verification-result.js +12 -0
- package/lib/domain/input-verification-result.js.map +1 -0
- package/lib/domain/inquirer-helper.d.ts +7 -0
- package/lib/domain/inquirer-helper.d.ts.map +1 -0
- package/lib/domain/inquirer-helper.js +5 -0
- package/lib/domain/inquirer-helper.js.map +1 -0
- package/lib/execution-manager.d.ts +9 -0
- package/lib/execution-manager.d.ts.map +1 -0
- package/lib/execution-manager.js +339 -0
- package/lib/execution-manager.js.map +1 -0
- package/lib/extensions/amplify-helpers/apply-auth-mode.d.ts +5 -0
- package/lib/extensions/amplify-helpers/apply-auth-mode.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/apply-auth-mode.js +63 -0
- package/lib/extensions/amplify-helpers/apply-auth-mode.js.map +1 -0
- package/lib/extensions/amplify-helpers/auto-updates.d.ts +2 -0
- package/lib/extensions/amplify-helpers/auto-updates.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/auto-updates.js +13 -0
- package/lib/extensions/amplify-helpers/auto-updates.js.map +1 -0
- package/lib/extensions/amplify-helpers/confirm-prompt.d.ts +2 -0
- package/lib/extensions/amplify-helpers/confirm-prompt.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/confirm-prompt.js +47 -0
- package/lib/extensions/amplify-helpers/confirm-prompt.js.map +1 -0
- package/lib/extensions/amplify-helpers/constants.d.ts +25 -0
- package/lib/extensions/amplify-helpers/constants.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/constants.js +28 -0
- package/lib/extensions/amplify-helpers/constants.js.map +1 -0
- package/lib/extensions/amplify-helpers/construct-exeInfo.d.ts +3 -0
- package/lib/extensions/amplify-helpers/construct-exeInfo.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/construct-exeInfo.js +23 -0
- package/lib/extensions/amplify-helpers/construct-exeInfo.js.map +1 -0
- package/lib/extensions/amplify-helpers/copy-batch.d.ts +3 -0
- package/lib/extensions/amplify-helpers/copy-batch.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/copy-batch.js +31 -0
- package/lib/extensions/amplify-helpers/copy-batch.js.map +1 -0
- package/lib/extensions/amplify-helpers/current-cloud-backend-utils.d.ts +4 -0
- package/lib/extensions/amplify-helpers/current-cloud-backend-utils.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/current-cloud-backend-utils.js +76 -0
- package/lib/extensions/amplify-helpers/current-cloud-backend-utils.js.map +1 -0
- package/lib/extensions/amplify-helpers/delete-project.d.ts +8 -0
- package/lib/extensions/amplify-helpers/delete-project.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/delete-project.js +89 -0
- package/lib/extensions/amplify-helpers/delete-project.js.map +1 -0
- package/lib/extensions/amplify-helpers/docs-manager.d.ts +2 -0
- package/lib/extensions/amplify-helpers/docs-manager.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/docs-manager.js +20 -0
- package/lib/extensions/amplify-helpers/docs-manager.js.map +1 -0
- package/lib/extensions/amplify-helpers/editor-selection.d.ts +7 -0
- package/lib/extensions/amplify-helpers/editor-selection.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/editor-selection.js +134 -0
- package/lib/extensions/amplify-helpers/editor-selection.js.map +1 -0
- package/lib/extensions/amplify-helpers/envResourceParams.d.ts +6 -0
- package/lib/extensions/amplify-helpers/envResourceParams.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/envResourceParams.js +89 -0
- package/lib/extensions/amplify-helpers/envResourceParams.js.map +1 -0
- package/lib/extensions/amplify-helpers/execute-provider-utils.d.ts +3 -0
- package/lib/extensions/amplify-helpers/execute-provider-utils.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/execute-provider-utils.js +43 -0
- package/lib/extensions/amplify-helpers/execute-provider-utils.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-all-category-pluginInfos.d.ts +6 -0
- package/lib/extensions/amplify-helpers/get-all-category-pluginInfos.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-all-category-pluginInfos.js +16 -0
- package/lib/extensions/amplify-helpers/get-all-category-pluginInfos.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-all-envs.d.ts +2 -0
- package/lib/extensions/amplify-helpers/get-all-envs.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-all-envs.js +10 -0
- package/lib/extensions/amplify-helpers/get-all-envs.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-amplify-appId.d.ts +2 -0
- package/lib/extensions/amplify-helpers/get-amplify-appId.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-amplify-appId.js +11 -0
- package/lib/extensions/amplify-helpers/get-amplify-appId.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-amplify-version.d.ts +2 -0
- package/lib/extensions/amplify-helpers/get-amplify-version.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-amplify-version.js +44 -0
- package/lib/extensions/amplify-helpers/get-amplify-version.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-category-pluginInfo.d.ts +3 -0
- package/lib/extensions/amplify-helpers/get-category-pluginInfo.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-category-pluginInfo.js +29 -0
- package/lib/extensions/amplify-helpers/get-category-pluginInfo.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-cloud-init-status.d.ts +5 -0
- package/lib/extensions/amplify-helpers/get-cloud-init-status.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-cloud-init-status.js +54 -0
- package/lib/extensions/amplify-helpers/get-cloud-init-status.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-env-details.d.ts +3 -0
- package/lib/extensions/amplify-helpers/get-env-details.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-env-details.js +13 -0
- package/lib/extensions/amplify-helpers/get-env-details.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-env-info.d.ts +3 -0
- package/lib/extensions/amplify-helpers/get-env-info.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-env-info.js +15 -0
- package/lib/extensions/amplify-helpers/get-env-info.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-frontend-plugins.d.ts +3 -0
- package/lib/extensions/amplify-helpers/get-frontend-plugins.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-frontend-plugins.js +19 -0
- package/lib/extensions/amplify-helpers/get-frontend-plugins.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-imported-auth-properties.d.ts +10 -0
- package/lib/extensions/amplify-helpers/get-imported-auth-properties.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-imported-auth-properties.js +43 -0
- package/lib/extensions/amplify-helpers/get-imported-auth-properties.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-plugin-instance.d.ts +3 -0
- package/lib/extensions/amplify-helpers/get-plugin-instance.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-plugin-instance.js +15 -0
- package/lib/extensions/amplify-helpers/get-plugin-instance.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-plugin.d.ts +2 -0
- package/lib/extensions/amplify-helpers/get-plugin.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-plugin.js +15 -0
- package/lib/extensions/amplify-helpers/get-plugin.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-project-config.d.ts +2 -0
- package/lib/extensions/amplify-helpers/get-project-config.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-project-config.js +8 -0
- package/lib/extensions/amplify-helpers/get-project-config.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-project-details.d.ts +9 -0
- package/lib/extensions/amplify-helpers/get-project-details.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-project-details.js +25 -0
- package/lib/extensions/amplify-helpers/get-project-details.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-project-meta.d.ts +3 -0
- package/lib/extensions/amplify-helpers/get-project-meta.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-project-meta.js +12 -0
- package/lib/extensions/amplify-helpers/get-project-meta.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-provider-plugins.d.ts +5 -0
- package/lib/extensions/amplify-helpers/get-provider-plugins.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-provider-plugins.js +66 -0
- package/lib/extensions/amplify-helpers/get-provider-plugins.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-resource-outputs.d.ts +14 -0
- package/lib/extensions/amplify-helpers/get-resource-outputs.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-resource-outputs.js +70 -0
- package/lib/extensions/amplify-helpers/get-resource-outputs.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-root-stack-id.d.ts +2 -0
- package/lib/extensions/amplify-helpers/get-root-stack-id.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-root-stack-id.js +15 -0
- package/lib/extensions/amplify-helpers/get-root-stack-id.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-tags.d.ts +4 -0
- package/lib/extensions/amplify-helpers/get-tags.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-tags.js +39 -0
- package/lib/extensions/amplify-helpers/get-tags.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-userpoolgroup-list.d.ts +3 -0
- package/lib/extensions/amplify-helpers/get-userpoolgroup-list.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-userpoolgroup-list.js +50 -0
- package/lib/extensions/amplify-helpers/get-userpoolgroup-list.js.map +1 -0
- package/lib/extensions/amplify-helpers/get-when-function.d.ts +2 -0
- package/lib/extensions/amplify-helpers/get-when-function.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/get-when-function.js +62 -0
- package/lib/extensions/amplify-helpers/get-when-function.js.map +1 -0
- package/lib/extensions/amplify-helpers/git-manager.d.ts +2 -0
- package/lib/extensions/amplify-helpers/git-manager.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/git-manager.js +103 -0
- package/lib/extensions/amplify-helpers/git-manager.js.map +1 -0
- package/lib/extensions/amplify-helpers/hash-dir.d.ts +2 -0
- package/lib/extensions/amplify-helpers/hash-dir.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/hash-dir.js +11 -0
- package/lib/extensions/amplify-helpers/hash-dir.js.map +1 -0
- package/lib/extensions/amplify-helpers/input-validation.d.ts +2 -0
- package/lib/extensions/amplify-helpers/input-validation.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/input-validation.js +30 -0
- package/lib/extensions/amplify-helpers/input-validation.js.map +1 -0
- package/lib/extensions/amplify-helpers/invoke-delete-env-params.d.ts +3 -0
- package/lib/extensions/amplify-helpers/invoke-delete-env-params.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/invoke-delete-env-params.js +13 -0
- package/lib/extensions/amplify-helpers/invoke-delete-env-params.js.map +1 -0
- package/lib/extensions/amplify-helpers/invoke-plugin-method.d.ts +3 -0
- package/lib/extensions/amplify-helpers/invoke-plugin-method.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/invoke-plugin-method.js +56 -0
- package/lib/extensions/amplify-helpers/invoke-plugin-method.js.map +1 -0
- package/lib/extensions/amplify-helpers/leave-breadcrumbs.d.ts +2 -0
- package/lib/extensions/amplify-helpers/leave-breadcrumbs.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/leave-breadcrumbs.js +44 -0
- package/lib/extensions/amplify-helpers/leave-breadcrumbs.js.map +1 -0
- package/lib/extensions/amplify-helpers/list-categories.d.ts +2 -0
- package/lib/extensions/amplify-helpers/list-categories.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/list-categories.js +8 -0
- package/lib/extensions/amplify-helpers/list-categories.js.map +1 -0
- package/lib/extensions/amplify-helpers/load-runtime-plugin.d.ts +3 -0
- package/lib/extensions/amplify-helpers/load-runtime-plugin.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/load-runtime-plugin.js +53 -0
- package/lib/extensions/amplify-helpers/load-runtime-plugin.js.map +1 -0
- package/lib/extensions/amplify-helpers/make-id.d.ts +2 -0
- package/lib/extensions/amplify-helpers/make-id.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/make-id.js +12 -0
- package/lib/extensions/amplify-helpers/make-id.js.map +1 -0
- package/lib/extensions/amplify-helpers/on-category-outputs-change.d.ts +3 -0
- package/lib/extensions/amplify-helpers/on-category-outputs-change.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/on-category-outputs-change.js +123 -0
- package/lib/extensions/amplify-helpers/on-category-outputs-change.js.map +1 -0
- package/lib/extensions/amplify-helpers/open-editor.d.ts +3 -0
- package/lib/extensions/amplify-helpers/open-editor.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/open-editor.js +111 -0
- package/lib/extensions/amplify-helpers/open-editor.js.map +1 -0
- package/lib/extensions/amplify-helpers/path-manager.d.ts +17 -0
- package/lib/extensions/amplify-helpers/path-manager.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/path-manager.js +116 -0
- package/lib/extensions/amplify-helpers/path-manager.js.map +1 -0
- package/lib/extensions/amplify-helpers/permission-flow.d.ts +2 -0
- package/lib/extensions/amplify-helpers/permission-flow.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/permission-flow.js +62 -0
- package/lib/extensions/amplify-helpers/permission-flow.js.map +1 -0
- package/lib/extensions/amplify-helpers/press-enter-to-continue.d.ts +2 -0
- package/lib/extensions/amplify-helpers/press-enter-to-continue.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/press-enter-to-continue.js +15 -0
- package/lib/extensions/amplify-helpers/press-enter-to-continue.js.map +1 -0
- package/lib/extensions/amplify-helpers/print.d.ts +16 -0
- package/lib/extensions/amplify-helpers/print.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/print.js +115 -0
- package/lib/extensions/amplify-helpers/print.js.map +1 -0
- package/lib/extensions/amplify-helpers/project-name-validation.d.ts +5 -0
- package/lib/extensions/amplify-helpers/project-name-validation.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/project-name-validation.js +27 -0
- package/lib/extensions/amplify-helpers/project-name-validation.js.map +1 -0
- package/lib/extensions/amplify-helpers/push-resources.d.ts +6 -0
- package/lib/extensions/amplify-helpers/push-resources.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/push-resources.js +149 -0
- package/lib/extensions/amplify-helpers/push-resources.js.map +1 -0
- package/lib/extensions/amplify-helpers/read-breadcrumbs.d.ts +2 -0
- package/lib/extensions/amplify-helpers/read-breadcrumbs.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/read-breadcrumbs.js +57 -0
- package/lib/extensions/amplify-helpers/read-breadcrumbs.js.map +1 -0
- package/lib/extensions/amplify-helpers/read-json-file.d.ts +3 -0
- package/lib/extensions/amplify-helpers/read-json-file.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/read-json-file.js +10 -0
- package/lib/extensions/amplify-helpers/read-json-file.js.map +1 -0
- package/lib/extensions/amplify-helpers/remove-env-from-cloud.d.ts +2 -0
- package/lib/extensions/amplify-helpers/remove-env-from-cloud.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/remove-env-from-cloud.js +71 -0
- package/lib/extensions/amplify-helpers/remove-env-from-cloud.js.map +1 -0
- package/lib/extensions/amplify-helpers/remove-pinpoint-policy.d.ts +2 -0
- package/lib/extensions/amplify-helpers/remove-pinpoint-policy.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/remove-pinpoint-policy.js +60 -0
- package/lib/extensions/amplify-helpers/remove-pinpoint-policy.js.map +1 -0
- package/lib/extensions/amplify-helpers/remove-resource.d.ts +15 -0
- package/lib/extensions/amplify-helpers/remove-resource.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/remove-resource.js +113 -0
- package/lib/extensions/amplify-helpers/remove-resource.js.map +1 -0
- package/lib/extensions/amplify-helpers/resource-status-data.d.ts +40 -0
- package/lib/extensions/amplify-helpers/resource-status-data.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/resource-status-data.js +467 -0
- package/lib/extensions/amplify-helpers/resource-status-data.js.map +1 -0
- package/lib/extensions/amplify-helpers/resource-status-diff.d.ts +64 -0
- package/lib/extensions/amplify-helpers/resource-status-diff.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/resource-status-diff.js +210 -0
- package/lib/extensions/amplify-helpers/resource-status-diff.js.map +1 -0
- package/lib/extensions/amplify-helpers/resource-status-view.d.ts +8 -0
- package/lib/extensions/amplify-helpers/resource-status-view.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/resource-status-view.js +70 -0
- package/lib/extensions/amplify-helpers/resource-status-view.js.map +1 -0
- package/lib/extensions/amplify-helpers/resource-status.d.ts +6 -0
- package/lib/extensions/amplify-helpers/resource-status.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/resource-status.js +43 -0
- package/lib/extensions/amplify-helpers/resource-status.js.map +1 -0
- package/lib/extensions/amplify-helpers/root-stack-status.d.ts +3 -0
- package/lib/extensions/amplify-helpers/root-stack-status.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/root-stack-status.js +74 -0
- package/lib/extensions/amplify-helpers/root-stack-status.js.map +1 -0
- package/lib/extensions/amplify-helpers/service-select-prompt.d.ts +3 -0
- package/lib/extensions/amplify-helpers/service-select-prompt.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/service-select-prompt.js +103 -0
- package/lib/extensions/amplify-helpers/service-select-prompt.js.map +1 -0
- package/lib/extensions/amplify-helpers/shared-questions.d.ts +10 -0
- package/lib/extensions/amplify-helpers/shared-questions.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/shared-questions.js +13 -0
- package/lib/extensions/amplify-helpers/shared-questions.js.map +1 -0
- package/lib/extensions/amplify-helpers/show-all-help.d.ts +2 -0
- package/lib/extensions/amplify-helpers/show-all-help.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/show-all-help.js +102 -0
- package/lib/extensions/amplify-helpers/show-all-help.js.map +1 -0
- package/lib/extensions/amplify-helpers/show-help.d.ts +2 -0
- package/lib/extensions/amplify-helpers/show-help.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/show-help.js +15 -0
- package/lib/extensions/amplify-helpers/show-help.js.map +1 -0
- package/lib/extensions/amplify-helpers/show-helpful-provider-links.d.ts +3 -0
- package/lib/extensions/amplify-helpers/show-helpful-provider-links.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/show-helpful-provider-links.js +51 -0
- package/lib/extensions/amplify-helpers/show-helpful-provider-links.js.map +1 -0
- package/lib/extensions/amplify-helpers/trigger-flow.d.ts +20 -0
- package/lib/extensions/amplify-helpers/trigger-flow.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/trigger-flow.js +416 -0
- package/lib/extensions/amplify-helpers/trigger-flow.js.map +1 -0
- package/lib/extensions/amplify-helpers/update-amplify-meta.d.ts +21 -0
- package/lib/extensions/amplify-helpers/update-amplify-meta.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/update-amplify-meta.js +252 -0
- package/lib/extensions/amplify-helpers/update-amplify-meta.js.map +1 -0
- package/lib/extensions/amplify-helpers/update-backend-config.d.ts +5 -0
- package/lib/extensions/amplify-helpers/update-backend-config.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/update-backend-config.js +43 -0
- package/lib/extensions/amplify-helpers/update-backend-config.js.map +1 -0
- package/lib/extensions/amplify-helpers/update-project-config.d.ts +3 -0
- package/lib/extensions/amplify-helpers/update-project-config.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/update-project-config.js +13 -0
- package/lib/extensions/amplify-helpers/update-project-config.js.map +1 -0
- package/lib/extensions/amplify-helpers/update-tracked-files.d.ts +3 -0
- package/lib/extensions/amplify-helpers/update-tracked-files.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/update-tracked-files.js +87 -0
- package/lib/extensions/amplify-helpers/update-tracked-files.js.map +1 -0
- package/lib/extensions/amplify-helpers/write-object-as-json.d.ts +2 -0
- package/lib/extensions/amplify-helpers/write-object-as-json.d.ts.map +1 -0
- package/lib/extensions/amplify-helpers/write-object-as-json.js +10 -0
- package/lib/extensions/amplify-helpers/write-object-as-json.js.map +1 -0
- package/lib/global-prefix.d.ts +2 -0
- package/lib/global-prefix.d.ts.map +1 -0
- package/lib/global-prefix.js +141 -0
- package/lib/global-prefix.js.map +1 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +207 -0
- package/lib/index.js.map +1 -0
- package/lib/init-steps/postInitSetup.d.ts +3 -0
- package/lib/init-steps/postInitSetup.d.ts.map +1 -0
- package/lib/init-steps/postInitSetup.js +85 -0
- package/lib/init-steps/postInitSetup.js.map +1 -0
- package/lib/init-steps/preInitSetup.d.ts +5 -0
- package/lib/init-steps/preInitSetup.d.ts.map +1 -0
- package/lib/init-steps/preInitSetup.js +153 -0
- package/lib/init-steps/preInitSetup.js.map +1 -0
- package/lib/init-steps/s0-analyzeProject.d.ts +6 -0
- package/lib/init-steps/s0-analyzeProject.d.ts.map +1 -0
- package/lib/init-steps/s0-analyzeProject.js +308 -0
- package/lib/init-steps/s0-analyzeProject.js.map +1 -0
- package/lib/init-steps/s1-initFrontend.d.ts +4 -0
- package/lib/init-steps/s1-initFrontend.d.ts.map +1 -0
- package/lib/init-steps/s1-initFrontend.js +92 -0
- package/lib/init-steps/s1-initFrontend.js.map +1 -0
- package/lib/init-steps/s2-initProviders.d.ts +2 -0
- package/lib/init-steps/s2-initProviders.d.ts.map +1 -0
- package/lib/init-steps/s2-initProviders.js +95 -0
- package/lib/init-steps/s2-initProviders.js.map +1 -0
- package/lib/init-steps/s8-scaffoldHeadless.d.ts +3 -0
- package/lib/init-steps/s8-scaffoldHeadless.d.ts.map +1 -0
- package/lib/init-steps/s8-scaffoldHeadless.js +68 -0
- package/lib/init-steps/s8-scaffoldHeadless.js.map +1 -0
- package/lib/init-steps/s9-onFailure.d.ts +2 -0
- package/lib/init-steps/s9-onFailure.d.ts.map +1 -0
- package/lib/init-steps/s9-onFailure.js +45 -0
- package/lib/init-steps/s9-onFailure.js.map +1 -0
- package/lib/init-steps/s9-onSuccess.d.ts +6 -0
- package/lib/init-steps/s9-onSuccess.d.ts.map +1 -0
- package/lib/init-steps/s9-onSuccess.js +216 -0
- package/lib/init-steps/s9-onSuccess.js.map +1 -0
- package/lib/initialize-env.d.ts +3 -0
- package/lib/initialize-env.d.ts.map +1 -0
- package/lib/initialize-env.js +170 -0
- package/lib/initialize-env.js.map +1 -0
- package/lib/input-manager.d.ts +6 -0
- package/lib/input-manager.d.ts.map +1 -0
- package/lib/input-manager.js +253 -0
- package/lib/input-manager.js.map +1 -0
- package/lib/input-params-manager.d.ts +5 -0
- package/lib/input-params-manager.d.ts.map +1 -0
- package/lib/input-params-manager.js +77 -0
- package/lib/input-params-manager.js.map +1 -0
- package/lib/migrate-project.d.ts +3 -0
- package/lib/migrate-project.d.ts.map +1 -0
- package/lib/migrate-project.js +258 -0
- package/lib/migrate-project.js.map +1 -0
- package/lib/plugin-helpers/access-plugins-file.d.ts +4 -0
- package/lib/plugin-helpers/access-plugins-file.d.ts.map +1 -0
- package/lib/plugin-helpers/access-plugins-file.js +66 -0
- package/lib/plugin-helpers/access-plugins-file.js.map +1 -0
- package/lib/plugin-helpers/compare-plugins.d.ts +3 -0
- package/lib/plugin-helpers/compare-plugins.d.ts.map +1 -0
- package/lib/plugin-helpers/compare-plugins.js +13 -0
- package/lib/plugin-helpers/compare-plugins.js.map +1 -0
- package/lib/plugin-helpers/create-new-plugin.d.ts +3 -0
- package/lib/plugin-helpers/create-new-plugin.d.ts.map +1 -0
- package/lib/plugin-helpers/create-new-plugin.js +234 -0
- package/lib/plugin-helpers/create-new-plugin.js.map +1 -0
- package/lib/plugin-helpers/display-plugin-platform.d.ts +15 -0
- package/lib/plugin-helpers/display-plugin-platform.d.ts.map +1 -0
- package/lib/plugin-helpers/display-plugin-platform.js +102 -0
- package/lib/plugin-helpers/display-plugin-platform.js.map +1 -0
- package/lib/plugin-helpers/platform-health-check.d.ts +12 -0
- package/lib/plugin-helpers/platform-health-check.d.ts.map +1 -0
- package/lib/plugin-helpers/platform-health-check.js +138 -0
- package/lib/plugin-helpers/platform-health-check.js.map +1 -0
- package/lib/plugin-helpers/scan-plugin-platform.d.ts +7 -0
- package/lib/plugin-helpers/scan-plugin-platform.d.ts.map +1 -0
- package/lib/plugin-helpers/scan-plugin-platform.js +188 -0
- package/lib/plugin-helpers/scan-plugin-platform.js.map +1 -0
- package/lib/plugin-helpers/verify-plugin.d.ts +8 -0
- package/lib/plugin-helpers/verify-plugin.d.ts.map +1 -0
- package/lib/plugin-helpers/verify-plugin.js +125 -0
- package/lib/plugin-helpers/verify-plugin.js.map +1 -0
- package/lib/plugin-manager.d.ts +18 -0
- package/lib/plugin-manager.d.ts.map +1 -0
- package/lib/plugin-manager.js +252 -0
- package/lib/plugin-manager.js.map +1 -0
- package/lib/pre-deployment-pull.d.ts +3 -0
- package/lib/pre-deployment-pull.d.ts.map +1 -0
- package/lib/pre-deployment-pull.js +82 -0
- package/lib/pre-deployment-pull.js.map +1 -0
- package/lib/project-config-version-check.d.ts +3 -0
- package/lib/project-config-version-check.d.ts.map +1 -0
- package/lib/project-config-version-check.js +153 -0
- package/lib/project-config-version-check.js.map +1 -0
- package/lib/pull-backend.d.ts +3 -0
- package/lib/pull-backend.d.ts.map +1 -0
- package/lib/pull-backend.js +45 -0
- package/lib/pull-backend.js.map +1 -0
- package/lib/rewireDeprecatedCommands.d.ts +3 -0
- package/lib/rewireDeprecatedCommands.d.ts.map +1 -0
- package/lib/rewireDeprecatedCommands.js +19 -0
- package/lib/rewireDeprecatedCommands.js.map +1 -0
- package/lib/utils/global-prefix.d.ts +2 -0
- package/lib/utils/global-prefix.d.ts.map +1 -0
- package/lib/utils/global-prefix.js +109 -0
- package/lib/utils/global-prefix.js.map +1 -0
- package/lib/utils/headless-input-utils.d.ts +5 -0
- package/lib/utils/headless-input-utils.d.ts.map +1 -0
- package/lib/utils/headless-input-utils.js +37 -0
- package/lib/utils/headless-input-utils.js.map +1 -0
- package/lib/utils/is-child-path.d.ts +2 -0
- package/lib/utils/is-child-path.d.ts.map +1 -0
- package/lib/utils/is-child-path.js +46 -0
- package/lib/utils/is-child-path.js.map +1 -0
- package/lib/utils/mobilehub-support.d.ts +3 -0
- package/lib/utils/mobilehub-support.d.ts.map +1 -0
- package/lib/utils/mobilehub-support.js +45 -0
- package/lib/utils/mobilehub-support.js.map +1 -0
- package/lib/utils/post-install-initialization.d.ts +2 -0
- package/lib/utils/post-install-initialization.d.ts.map +1 -0
- package/lib/utils/post-install-initialization.js +75 -0
- package/lib/utils/post-install-initialization.js.map +1 -0
- package/lib/utils/set-ops.d.ts +4 -0
- package/lib/utils/set-ops.d.ts.map +1 -0
- package/lib/utils/set-ops.js +44 -0
- package/lib/utils/set-ops.js.map +1 -0
- package/lib/utils/team-provider-migrate.d.ts +3 -0
- package/lib/utils/team-provider-migrate.d.ts.map +1 -0
- package/lib/utils/team-provider-migrate.js +76 -0
- package/lib/utils/team-provider-migrate.js.map +1 -0
- package/lib/utils/verify-expected-env-params.d.ts +3 -0
- package/lib/utils/verify-expected-env-params.d.ts.map +1 -0
- package/lib/utils/verify-expected-env-params.js +51 -0
- package/lib/utils/verify-expected-env-params.js.map +1 -0
- package/lib/utils/win-constants.d.ts +4 -0
- package/lib/utils/win-constants.d.ts.map +1 -0
- package/lib/utils/win-constants.js +43 -0
- package/lib/utils/win-constants.js.map +1 -0
- package/lib/utils/win-utils.d.ts +3 -0
- package/lib/utils/win-utils.d.ts.map +1 -0
- package/lib/utils/win-utils.js +113 -0
- package/lib/utils/win-utils.js.map +1 -0
- package/lib/version-notifier.d.ts +3 -0
- package/lib/version-notifier.d.ts.map +1 -0
- package/lib/version-notifier.js +21 -0
- package/lib/version-notifier.js.map +1 -0
- package/package.json +293 -0
- package/readme.md +4 -0
- package/resources/sample-hooks/hooks-readme.md +7 -0
- package/resources/sample-hooks/post-push.sh.sample +24 -0
- package/resources/sample-hooks/pre-push.js.sample +27 -0
- package/sample-headless-scripts/headless_add_external_env.sh +30 -0
- package/sample-headless-scripts/headless_configure_project.sh +35 -0
- package/sample-headless-scripts/headless_init_env.sh +47 -0
- package/sample-headless-scripts/headless_init_env_auth.sh +30 -0
- package/sample-headless-scripts/headless_init_new_project.sh +34 -0
- package/sample-headless-scripts/headless_publish.sh +15 -0
- package/sample-headless-scripts/headless_push.sh +15 -0
- package/scripts/post-install.js +34 -0
- package/templates/amplify-skeleton/.config/project-config__android.json +11 -0
- package/templates/amplify-skeleton/.config/project-config__flutter.json +11 -0
- package/templates/amplify-skeleton/.config/project-config__ios.json +6 -0
- package/templates/amplify-skeleton/.config/project-config__javascript.json +15 -0
- package/templates/amplify-skeleton/backend/api/amplifyDatasource/parameters.json +5 -0
- package/templates/amplify-skeleton/backend/api/amplifyDatasource/schema.graphql +10 -0
- package/templates/amplify-skeleton/backend/api/amplifyDatasource/stacks/CustomResources.json +58 -0
- package/templates/amplify-skeleton/backend/api/amplifyDatasource/transform.conf.json +9 -0
- package/templates/amplify-skeleton/backend/backend-config.json +20 -0
- package/templates/plugin-template/amplify-plugin.json +6 -0
- package/templates/plugin-template/commands/help.js +8 -0
- package/templates/plugin-template/commands/version.js +8 -0
- package/templates/plugin-template/event-handlers/handle-PostInit.js +10 -0
- package/templates/plugin-template/event-handlers/handle-PostPush.js +10 -0
- package/templates/plugin-template/event-handlers/handle-PreInit.js +10 -0
- package/templates/plugin-template/event-handlers/handle-PrePush.js +10 -0
- package/templates/plugin-template/index.js +20 -0
- package/templates/plugin-template/package.json +11 -0
- package/templates/plugin-template-frontend/amplify-plugin.json +6 -0
- package/templates/plugin-template-frontend/commands/help.js +8 -0
- package/templates/plugin-template-frontend/commands/version.js +8 -0
- package/templates/plugin-template-frontend/event-handlers/handle-PostInit.js +10 -0
- package/templates/plugin-template-frontend/event-handlers/handle-PostPush.js +10 -0
- package/templates/plugin-template-frontend/event-handlers/handle-PreInit.js +10 -0
- package/templates/plugin-template-frontend/event-handlers/handle-PrePush.js +10 -0
- package/templates/plugin-template-frontend/index.js +62 -0
- package/templates/plugin-template-frontend/package.json +11 -0
- package/templates/plugin-template-provider/amplify-plugin.json +6 -0
- package/templates/plugin-template-provider/commands/help.js +8 -0
- package/templates/plugin-template-provider/commands/version.js +8 -0
- package/templates/plugin-template-provider/event-handlers/handle-PostInit.js +10 -0
- package/templates/plugin-template-provider/event-handlers/handle-PostPush.js +10 -0
- package/templates/plugin-template-provider/event-handlers/handle-PreInit.js +10 -0
- package/templates/plugin-template-provider/event-handlers/handle-PrePush.js +10 -0
- package/templates/plugin-template-provider/index.js +50 -0
- package/templates/plugin-template-provider/package.json +11 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.checkPlatformHealth = checkPlatformHealth;
|
|
40
|
+
exports.getOfficialPlugins = getOfficialPlugins;
|
|
41
|
+
const path = __importStar(require("path"));
|
|
42
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
43
|
+
const amplify_cli_core_1 = require("@aws-amplify/amplify-cli-core");
|
|
44
|
+
const semver_1 = require("semver");
|
|
45
|
+
const indent = ' ';
|
|
46
|
+
async function checkPlatformHealth(pluginPlatform) {
|
|
47
|
+
const activePlugins = pluginPlatform.plugins;
|
|
48
|
+
const officialPlugins = getOfficialPlugins();
|
|
49
|
+
const missingOfficialPlugins = [];
|
|
50
|
+
const mismatchedOfficialPlugins = [];
|
|
51
|
+
Object.keys(officialPlugins).forEach((pluginName) => {
|
|
52
|
+
let officialArray = [];
|
|
53
|
+
if (!Array.isArray(officialPlugins[pluginName])) {
|
|
54
|
+
officialArray.push(officialPlugins[pluginName]);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
officialArray = officialPlugins[pluginName];
|
|
58
|
+
}
|
|
59
|
+
if (activePlugins[pluginName]) {
|
|
60
|
+
const activeArray = activePlugins[pluginName];
|
|
61
|
+
officialArray.forEach((officialPlugin) => {
|
|
62
|
+
let matchLevel = 0;
|
|
63
|
+
for (let i = 0; i < activeArray.length; i++) {
|
|
64
|
+
const activePlugin = activeArray[i];
|
|
65
|
+
if (activePlugin.packageName === officialPlugin.packageName) {
|
|
66
|
+
if (isMatching(officialPlugin, activePlugin)) {
|
|
67
|
+
matchLevel = 2;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
matchLevel = 1;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (matchLevel === 0) {
|
|
76
|
+
missingOfficialPlugins.push(officialPlugin);
|
|
77
|
+
}
|
|
78
|
+
if (matchLevel === 1) {
|
|
79
|
+
mismatchedOfficialPlugins.push(officialPlugin);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
missingOfficialPlugins.push(...officialArray);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
if (missingOfficialPlugins.length > 0) {
|
|
88
|
+
console.log(chalk_1.default.yellow('The following official plugins are missing or inactive:'));
|
|
89
|
+
missingOfficialPlugins.forEach((pluginDescription) => {
|
|
90
|
+
const { name, type, packageName, packageVersion } = pluginDescription;
|
|
91
|
+
console.log(`${indent}${name}: ${type} | ${packageName}@${packageVersion}`);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
if (mismatchedOfficialPlugins.length > 0) {
|
|
95
|
+
console.log(chalk_1.default.yellow('The following official plugins have mismatched packages:'));
|
|
96
|
+
mismatchedOfficialPlugins.forEach((pluginDescription) => {
|
|
97
|
+
const { name, type, packageName, packageVersion } = pluginDescription;
|
|
98
|
+
console.log('Expected:');
|
|
99
|
+
console.log(`${indent}${name}: ${type} | ${packageName}@${packageVersion}`);
|
|
100
|
+
console.log('Found:');
|
|
101
|
+
activePlugins[name].every((pluginInfo) => {
|
|
102
|
+
const { manifest } = pluginInfo;
|
|
103
|
+
console.log(`${indent}${manifest.name}: ${manifest.type} | ${pluginInfo.packageName}@${pluginInfo.packageVersion}`);
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return missingOfficialPlugins.length === 0 && mismatchedOfficialPlugins.length === 0;
|
|
108
|
+
}
|
|
109
|
+
function isMatching(pluginDescription, pluginInfo) {
|
|
110
|
+
let result = pluginDescription.packageName === pluginInfo.packageName && pluginDescription.type === pluginInfo.manifest.type;
|
|
111
|
+
if (result && pluginDescription.packageVersion) {
|
|
112
|
+
result = (0, semver_1.satisfies)(pluginInfo.packageVersion, pluginDescription.packageVersion);
|
|
113
|
+
}
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
function getOfficialPlugins() {
|
|
117
|
+
const packageJsonFilePath = path.normalize(path.join(__dirname, '..', '..', 'package.json'));
|
|
118
|
+
const packageJson = amplify_cli_core_1.JSONUtilities.readJson(packageJsonFilePath);
|
|
119
|
+
const { officialPlugins } = packageJson.amplify;
|
|
120
|
+
const { dependencies } = packageJson;
|
|
121
|
+
Object.keys(officialPlugins).forEach((plugin) => {
|
|
122
|
+
const plugins = Array.isArray(officialPlugins[plugin]) ? officialPlugins[plugin] : [officialPlugins[plugin]];
|
|
123
|
+
plugins.forEach((officialPlugin) => {
|
|
124
|
+
const { packageName } = officialPlugin;
|
|
125
|
+
if (dependencies[packageName]) {
|
|
126
|
+
const version = dependencies[packageName];
|
|
127
|
+
officialPlugin.packageVersion = version;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
delete officialPlugin.packageVersion;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
const coreVersion = packageJson.version;
|
|
135
|
+
officialPlugins.core.packageVersion = coreVersion;
|
|
136
|
+
return officialPlugins;
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=platform-health-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|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AAC,CAAC;IAC7F,MAAM,WAAW,GAAG,gCAAa,CAAC,QAAQ,CAAS,mBAAmB,CAAC,CAAC;IACxE,MAAM,EAAE,eAAe,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC;IAEhD,MAAM,EAAE,YAAY,EAAE,GAAG,WAAW,CAAC;IAErC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,MAAc,EAAE,EAAE;QACtD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;QAC7G,OAAO,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE;YACjC,MAAM,EAAE,WAAW,EAAE,GAAG,cAAc,CAAC;YACvC,IAAI,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC9B,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;gBAC1C,cAAc,CAAC,cAAc,GAAG,OAAO,CAAC;YAC1C,CAAC;iBAAM,CAAC;gBACN,OAAO,cAAc,CAAC,cAAc,CAAC;YACvC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC;IACxC,eAAe,CAAC,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC;IAElD,OAAO,eAAe,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PluginPlatform } from '@aws-amplify/amplify-cli-core';
|
|
2
|
+
export declare function scanPluginPlatform(pluginPlatform?: PluginPlatform): Promise<PluginPlatform>;
|
|
3
|
+
export declare function getCorePluginDirPath(): string;
|
|
4
|
+
export declare function getCorePluginVersion(): string;
|
|
5
|
+
export declare function normalizePluginDirectory(directory: string): string;
|
|
6
|
+
export declare function isUnderScanCoverageSync(pluginPlatform: PluginPlatform, pluginDirPath: string): boolean;
|
|
7
|
+
//# sourceMappingURL=scan-plugin-platform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan-plugin-platform.d.ts","sourceRoot":"","sources":["../../src/plugin-helpers/scan-plugin-platform.ts"],"names":[],"mappings":"AAQA,OAAO,EAKL,cAAc,EAIf,MAAM,+BAA+B,CAAC;AAGvC,wBAAsB,kBAAkB,CAAC,cAAc,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAqDjG;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAI7C;AAiBD,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAelE;AAsCD,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAgBtG"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.scanPluginPlatform = scanPluginPlatform;
|
|
40
|
+
exports.getCorePluginDirPath = getCorePluginDirPath;
|
|
41
|
+
exports.getCorePluginVersion = getCorePluginVersion;
|
|
42
|
+
exports.normalizePluginDirectory = normalizePluginDirectory;
|
|
43
|
+
exports.isUnderScanCoverageSync = isUnderScanCoverageSync;
|
|
44
|
+
const path = __importStar(require("path"));
|
|
45
|
+
const fs = __importStar(require("fs-extra"));
|
|
46
|
+
const global_prefix_1 = require("../utils/global-prefix");
|
|
47
|
+
const verify_plugin_1 = require("./verify-plugin");
|
|
48
|
+
const access_plugins_file_1 = require("./access-plugins-file");
|
|
49
|
+
const compare_plugins_1 = require("./compare-plugins");
|
|
50
|
+
const platform_health_check_1 = require("./platform-health-check");
|
|
51
|
+
const is_child_path_1 = __importDefault(require("../utils/is-child-path"));
|
|
52
|
+
const amplify_cli_core_1 = require("@aws-amplify/amplify-cli-core");
|
|
53
|
+
const promise_sequential_1 = __importDefault(require("promise-sequential"));
|
|
54
|
+
async function scanPluginPlatform(pluginPlatform) {
|
|
55
|
+
const pluginPlatformLocal = pluginPlatform || (0, access_plugins_file_1.readPluginsJsonFile)() || new amplify_cli_core_1.PluginPlatform();
|
|
56
|
+
pluginPlatformLocal.plugins = new amplify_cli_core_1.PluginCollection();
|
|
57
|
+
await addCore(pluginPlatformLocal);
|
|
58
|
+
if (pluginPlatformLocal.userAddedLocations && pluginPlatformLocal.userAddedLocations.length > 0) {
|
|
59
|
+
pluginPlatformLocal.userAddedLocations = pluginPlatformLocal.userAddedLocations.filter((pluginDirPath) => {
|
|
60
|
+
const result = fs.existsSync(pluginDirPath);
|
|
61
|
+
return result;
|
|
62
|
+
});
|
|
63
|
+
const scanUserLocationTasks = pluginPlatformLocal.userAddedLocations.map((pluginDirPath) => async () => await verifyAndAdd(pluginPlatformLocal, pluginDirPath));
|
|
64
|
+
await (0, promise_sequential_1.default)(scanUserLocationTasks);
|
|
65
|
+
}
|
|
66
|
+
if (amplify_cli_core_1.isPackaged && !pluginPlatformLocal.pluginDirectories.includes(amplify_cli_core_1.constants.PACKAGED_NODE_MODULES)) {
|
|
67
|
+
pluginPlatformLocal.pluginDirectories.push(amplify_cli_core_1.constants.PACKAGED_NODE_MODULES);
|
|
68
|
+
}
|
|
69
|
+
if (!pluginPlatformLocal.pluginDirectories.includes(amplify_cli_core_1.constants.DEV_NODE_MODULES)) {
|
|
70
|
+
pluginPlatformLocal.pluginDirectories.push(amplify_cli_core_1.constants.DEV_NODE_MODULES);
|
|
71
|
+
}
|
|
72
|
+
if (pluginPlatformLocal.pluginDirectories.length > 0 && pluginPlatformLocal.pluginPrefixes.length > 0) {
|
|
73
|
+
const scanDirTasks = pluginPlatformLocal.pluginDirectories.map((directory) => async () => {
|
|
74
|
+
directory = normalizePluginDirectory(directory);
|
|
75
|
+
const exists = await fs.pathExists(directory);
|
|
76
|
+
if (exists) {
|
|
77
|
+
const subDirNames = await fs.readdir(directory);
|
|
78
|
+
await addPluginPrefixWithMatchingPattern(subDirNames, directory, pluginPlatformLocal);
|
|
79
|
+
if (subDirNames.includes('@aws-amplify')) {
|
|
80
|
+
const nameSpacedDir = path.join(directory, '@aws-amplify');
|
|
81
|
+
const nameSpacedPackages = await fs.readdir(nameSpacedDir);
|
|
82
|
+
await addPluginPrefixWithMatchingPattern(nameSpacedPackages, nameSpacedDir, pluginPlatformLocal);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
await (0, promise_sequential_1.default)(scanDirTasks);
|
|
87
|
+
}
|
|
88
|
+
pluginPlatformLocal.lastScanTime = new Date();
|
|
89
|
+
(0, access_plugins_file_1.writePluginsJsonFile)(pluginPlatformLocal);
|
|
90
|
+
await (0, platform_health_check_1.checkPlatformHealth)(pluginPlatformLocal);
|
|
91
|
+
return pluginPlatformLocal;
|
|
92
|
+
}
|
|
93
|
+
function getCorePluginDirPath() {
|
|
94
|
+
return path.normalize(path.join(__dirname, '../../'));
|
|
95
|
+
}
|
|
96
|
+
function getCorePluginVersion() {
|
|
97
|
+
const packageJsonFilePath = path.normalize(path.join(__dirname, '..', '..', 'package.json'));
|
|
98
|
+
const packageJson = amplify_cli_core_1.JSONUtilities.readJson(packageJsonFilePath);
|
|
99
|
+
return packageJson.version;
|
|
100
|
+
}
|
|
101
|
+
async function addCore(pluginPlatform) {
|
|
102
|
+
const corePluginDirPath = getCorePluginDirPath();
|
|
103
|
+
const pluginVerificationResult = await (0, verify_plugin_1.verifyPlugin)(corePluginDirPath);
|
|
104
|
+
if (pluginVerificationResult.verified) {
|
|
105
|
+
const manifest = pluginVerificationResult.manifest;
|
|
106
|
+
const { name, version } = pluginVerificationResult.packageJson;
|
|
107
|
+
const pluginInfo = new amplify_cli_core_1.PluginInfo(name, version, corePluginDirPath, manifest);
|
|
108
|
+
pluginPlatform.plugins[manifest.name] = [];
|
|
109
|
+
pluginPlatform.plugins[manifest.name].push(pluginInfo);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
throw new Error('The local Amplify-CLI is corrupted');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function normalizePluginDirectory(directory) {
|
|
116
|
+
switch (directory) {
|
|
117
|
+
case amplify_cli_core_1.constants.PACKAGED_NODE_MODULES:
|
|
118
|
+
return path.normalize(path.join(__dirname, '../../../..'));
|
|
119
|
+
case amplify_cli_core_1.constants.DEV_NODE_MODULES:
|
|
120
|
+
return path.normalize(path.join(__dirname, '../../../../node_modules'));
|
|
121
|
+
case amplify_cli_core_1.constants.LOCAL_NODE_MODULES:
|
|
122
|
+
return path.normalize(path.join(__dirname, '../../node_modules'));
|
|
123
|
+
case amplify_cli_core_1.constants.PARENT_DIRECTORY:
|
|
124
|
+
return path.normalize(path.join(__dirname, '../../../'));
|
|
125
|
+
case amplify_cli_core_1.constants.GLOBAL_NODE_MODULES:
|
|
126
|
+
return (0, global_prefix_1.getGlobalNodeModuleDirPath)();
|
|
127
|
+
default:
|
|
128
|
+
return directory;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function isMatchingNamePattern(pluginPrefixes, pluginDirName) {
|
|
132
|
+
if (pluginPrefixes && pluginPrefixes.length > 0) {
|
|
133
|
+
return pluginPrefixes.some((prefix) => {
|
|
134
|
+
const regex = new RegExp(`^${prefix}`);
|
|
135
|
+
return regex.test(pluginDirName);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
async function verifyAndAdd(pluginPlatform, pluginDirPath) {
|
|
141
|
+
const pluginVerificationResult = await (0, verify_plugin_1.verifyPlugin)(pluginDirPath);
|
|
142
|
+
if (pluginVerificationResult.verified &&
|
|
143
|
+
pluginVerificationResult.manifest.name !== amplify_cli_core_1.constants.CORE) {
|
|
144
|
+
const manifest = pluginVerificationResult.manifest;
|
|
145
|
+
const { name, version } = pluginVerificationResult.packageJson;
|
|
146
|
+
const pluginInfo = new amplify_cli_core_1.PluginInfo(name, version, pluginDirPath, manifest);
|
|
147
|
+
let isPluginExcluded = false;
|
|
148
|
+
if (pluginPlatform.excluded && pluginPlatform.excluded[manifest.name]) {
|
|
149
|
+
isPluginExcluded = pluginPlatform.excluded[manifest.name].some((item) => (0, compare_plugins_1.twoPluginsAreTheSame)(item, pluginInfo));
|
|
150
|
+
}
|
|
151
|
+
if (!isPluginExcluded) {
|
|
152
|
+
pluginPlatform.plugins[manifest.name] = pluginPlatform.plugins[manifest.name] || [];
|
|
153
|
+
const pluginAlreadyAdded = pluginPlatform.plugins[manifest.name].some((item) => (0, compare_plugins_1.twoPluginsAreTheSame)(item, pluginInfo));
|
|
154
|
+
if (!pluginAlreadyAdded) {
|
|
155
|
+
pluginPlatform.plugins[manifest.name].push(pluginInfo);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function isUnderScanCoverageSync(pluginPlatform, pluginDirPath) {
|
|
161
|
+
let result = false;
|
|
162
|
+
pluginDirPath = path.normalize(pluginDirPath);
|
|
163
|
+
const pluginDirName = path.basename(pluginDirPath);
|
|
164
|
+
if (fs.existsSync(pluginDirPath) && isMatchingNamePattern(pluginPlatform.pluginPrefixes, pluginDirName)) {
|
|
165
|
+
result = pluginPlatform.pluginDirectories.some((directory) => {
|
|
166
|
+
directory = normalizePluginDirectory(directory);
|
|
167
|
+
if (fs.existsSync(directory) && (0, is_child_path_1.default)(pluginDirPath, directory)) {
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
170
|
+
return undefined;
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
return result;
|
|
174
|
+
}
|
|
175
|
+
const addPluginPrefixWithMatchingPattern = async (subDirNames, directory, pluginPlatform) => {
|
|
176
|
+
if (subDirNames.length > 0) {
|
|
177
|
+
const scanSubDirTasks = subDirNames.map((subDirName) => {
|
|
178
|
+
return async () => {
|
|
179
|
+
if (isMatchingNamePattern(pluginPlatform.pluginPrefixes, subDirName)) {
|
|
180
|
+
const pluginDirPath = path.join(directory, subDirName);
|
|
181
|
+
await verifyAndAdd(pluginPlatform, pluginDirPath);
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
});
|
|
185
|
+
await (0, promise_sequential_1.default)(scanSubDirTasks);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
//# sourceMappingURL=scan-plugin-platform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan-plugin-platform.js","sourceRoot":"","sources":["../../src/plugin-helpers/scan-plugin-platform.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,gDAqDC;AAED,oDAEC;AAED,oDAIC;AAiBD,4DAeC;AAsCD,0DAgBC;AAzKD,2CAA6B;AAC7B,6CAA+B;AAC/B,0DAAoE;AACpE,mDAA+C;AAC/C,+DAAkF;AAClF,uDAAyD;AACzD,mEAA8D;AAC9D,2EAAiD;AACjD,oEASuC;AACvC,4EAA4C;AAErC,KAAK,UAAU,kBAAkB,CAAC,cAA+B;IACtE,MAAM,mBAAmB,GAAG,cAAc,IAAI,IAAA,yCAAmB,GAAE,IAAI,IAAI,iCAAc,EAAE,CAAC;IAE5F,mBAAmB,CAAC,OAAO,GAAG,IAAI,mCAAgB,EAAE,CAAC;IAErD,MAAM,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAEnC,IAAI,mBAAmB,CAAC,kBAAkB,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAEhG,mBAAmB,CAAC,kBAAkB,GAAG,mBAAmB,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,EAAE;YACvG,MAAM,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YAC5C,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CAAC;QAEH,MAAM,qBAAqB,GAAG,mBAAmB,CAAC,kBAAkB,CAAC,GAA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B,IAAI,qBAAqB,CAAC,cAAc,CAAC,cAAc,EAAE,UAAU,CAAC,EAAE,CAAC;oBACrE,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;oBACvD,MAAM,YAAY,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;gBACpD,CAAC;YACH,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,MAAM,IAAA,4BAAU,EAAC,eAAe,CAAC,CAAC;IACpC,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PluginVerificationResult } from '@aws-amplify/amplify-cli-core';
|
|
2
|
+
export declare function verifyPlugin(pluginDirPath: string): Promise<PluginVerificationResult>;
|
|
3
|
+
export type PluginNameValidationResult = {
|
|
4
|
+
isValid: boolean;
|
|
5
|
+
message?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function validPluginName(pluginName: string): Promise<PluginNameValidationResult>;
|
|
8
|
+
//# sourceMappingURL=verify-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-plugin.d.ts","sourceRoot":"","sources":["../../src/plugin-helpers/verify-plugin.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAUvC,wBAAsB,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAY3F;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAU7F"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.verifyPlugin = verifyPlugin;
|
|
37
|
+
exports.validPluginName = validPluginName;
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const fs = __importStar(require("fs-extra"));
|
|
40
|
+
const amplify_cli_core_1 = require("@aws-amplify/amplify-cli-core");
|
|
41
|
+
async function verifyPlugin(pluginDirPath) {
|
|
42
|
+
let exists = await fs.pathExists(pluginDirPath);
|
|
43
|
+
if (exists) {
|
|
44
|
+
const stat = await fs.stat(pluginDirPath);
|
|
45
|
+
if (!stat.isDirectory()) {
|
|
46
|
+
exists = false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (exists) {
|
|
50
|
+
return verifyNodePackage(pluginDirPath);
|
|
51
|
+
}
|
|
52
|
+
return new amplify_cli_core_1.PluginVerificationResult(false, amplify_cli_core_1.PluginVerificationError.PluginDirPathNotExist);
|
|
53
|
+
}
|
|
54
|
+
async function validPluginName(pluginName) {
|
|
55
|
+
const result = {
|
|
56
|
+
isValid: true,
|
|
57
|
+
};
|
|
58
|
+
const corePluginJson = amplify_cli_core_1.JSONUtilities.readJson(path.normalize(path.join(__dirname, '..', '..', 'amplify-plugin.json')));
|
|
59
|
+
if (corePluginJson && corePluginJson.commands && corePluginJson.commands.includes(pluginName)) {
|
|
60
|
+
result.isValid = false;
|
|
61
|
+
result.message = 'Amplify CLI core command names can not be used as plugin name';
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
65
|
+
async function verifyNodePackage(pluginDirPath) {
|
|
66
|
+
const pluginPackageJsonFilePath = path.join(pluginDirPath, amplify_cli_core_1.constants.PACKAGEJSON_FILE_NAME);
|
|
67
|
+
try {
|
|
68
|
+
const packageJson = amplify_cli_core_1.JSONUtilities.readJson(pluginPackageJsonFilePath);
|
|
69
|
+
const context = {
|
|
70
|
+
pluginDirPath,
|
|
71
|
+
};
|
|
72
|
+
const result = await verifyAmplifyManifest(context);
|
|
73
|
+
result.packageJson = packageJson;
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
return new amplify_cli_core_1.PluginVerificationResult(false, amplify_cli_core_1.PluginVerificationError.InvalidNodePackage, err);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
async function verifyAmplifyManifest(context) {
|
|
81
|
+
const pluginManifestFilePath = path.join(context.pluginDirPath, amplify_cli_core_1.constants.MANIFEST_FILE_NAME);
|
|
82
|
+
let exists = await fs.pathExists(pluginManifestFilePath);
|
|
83
|
+
if (exists) {
|
|
84
|
+
const stat = await fs.stat(pluginManifestFilePath);
|
|
85
|
+
exists = stat.isFile();
|
|
86
|
+
}
|
|
87
|
+
if (!exists) {
|
|
88
|
+
return new amplify_cli_core_1.PluginVerificationResult(false, amplify_cli_core_1.PluginVerificationError.MissingManifest);
|
|
89
|
+
}
|
|
90
|
+
try {
|
|
91
|
+
const manifest = amplify_cli_core_1.JSONUtilities.readJson(pluginManifestFilePath);
|
|
92
|
+
const pluginNameValidationResult = await validPluginName(manifest.name);
|
|
93
|
+
if (pluginNameValidationResult.isValid) {
|
|
94
|
+
context.manifest = manifest;
|
|
95
|
+
let result = verifyCommands();
|
|
96
|
+
result = result.verified ? await verifyEventHandlers(context) : result;
|
|
97
|
+
result.manifest = manifest;
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
100
|
+
return new amplify_cli_core_1.PluginVerificationResult(false, amplify_cli_core_1.PluginVerificationError.InvalidManifest, pluginNameValidationResult.message);
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
return new amplify_cli_core_1.PluginVerificationResult(false, amplify_cli_core_1.PluginVerificationError.InvalidManifest, err);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function verifyCommands() {
|
|
107
|
+
return new amplify_cli_core_1.PluginVerificationResult(true);
|
|
108
|
+
}
|
|
109
|
+
async function verifyEventHandlers(context) {
|
|
110
|
+
var _a;
|
|
111
|
+
let isVerified = true;
|
|
112
|
+
if (context.manifest.eventHandlers && context.manifest.eventHandlers.length > 0) {
|
|
113
|
+
if (!context.pluginModule) {
|
|
114
|
+
context.pluginModule = await Promise.resolve(`${context.pluginDirPath}`).then(s => __importStar(require(s)));
|
|
115
|
+
}
|
|
116
|
+
isVerified =
|
|
117
|
+
Object.prototype.hasOwnProperty.call(context.pluginModule, amplify_cli_core_1.constants.HANDLE_AMPLIFY_EVENT) &&
|
|
118
|
+
typeof ((_a = context.pluginModule) === null || _a === void 0 ? void 0 : _a[amplify_cli_core_1.constants.HANDLE_AMPLIFY_EVENT]) === 'function';
|
|
119
|
+
}
|
|
120
|
+
if (isVerified) {
|
|
121
|
+
return new amplify_cli_core_1.PluginVerificationResult(true);
|
|
122
|
+
}
|
|
123
|
+
return new amplify_cli_core_1.PluginVerificationResult(false, amplify_cli_core_1.PluginVerificationError.MissingHandleAmplifyEventMethod);
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=verify-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-plugin.js","sourceRoot":"","sources":["../../src/plugin-helpers/verify-plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,oCAYC;AAOD,0CAUC;AAhDD,2CAA6B;AAC7B,6CAA+B;AAC/B,oEAOuC;AAUhC,KAAK,UAAU,YAAY,CAAC,aAAqB;IACtD,IAAI,MAAM,GAAG,MAAM,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAChD,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,MAAM,GAAG,KAAK,CAAC;QACjB,CAAC;IACH,CAAC;IACD,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,iBAAiB,CAAC,aAAa,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,IAAI,2CAAwB,CAAC,KAAK,EAAE,0CAAuB,CAAC,qBAAqB,CAAC,CAAC;AAC5F,CAAC;AAOM,KAAK,UAAU,eAAe,CAAC,UAAkB;IACtD,MAAM,MAAM,GAA+B;QACzC,OAAO,EAAE,IAAI;KACd,CAAC;IACF,MAAM,cAAc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AC,MAAM,GAAG,CAAC,EAAE,CAAC;QAElF,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;YAC1B,OAAO,CAAC,YAAY,GAAG,yBAAa,OAAO,CAAC,aAAa,uCAAC,CAAC;QAC7D,CAAC;QAED,UAAU;YACR,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,4BAAS,CAAC,oBAAoB,CAAC;gBAC1F,OAAO,CAAA,MAAA,OAAO,CAAC,YAAY,0CAAG,4BAAS,CAAC,oBAAoB,CAAC,CAAA,KAAK,UAAU,CAAC;IACjF,CAAC;IAED,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,IAAI,2CAAwB,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,IAAI,2CAAwB,CAAC,KAAK,EAAE,0CAAuB,CAAC,+BAA+B,CAAC,CAAC;AACtG,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PluginPlatform, PluginInfo, AmplifyEvent } from '@aws-amplify/amplify-cli-core';
|
|
2
|
+
import { verifyPlugin } from './plugin-helpers/verify-plugin';
|
|
3
|
+
import createNewPlugin from './plugin-helpers/create-new-plugin';
|
|
4
|
+
import { AddPluginResult } from './domain/add-plugin-result';
|
|
5
|
+
export declare function getPluginPlatform(): Promise<PluginPlatform>;
|
|
6
|
+
export declare function getPluginsWithName(pluginPlatform: PluginPlatform, nameOrAlias: string): Array<PluginInfo>;
|
|
7
|
+
export declare function getPluginsWithNameAndCommand(pluginPlatform: PluginPlatform, nameOrAlias: string, command: string): Array<PluginInfo>;
|
|
8
|
+
export declare function getPluginsWithEventHandler(pluginPlatform: PluginPlatform, event: AmplifyEvent): Array<PluginInfo>;
|
|
9
|
+
export declare function getAllPluginNames(pluginPlatform: PluginPlatform): Set<string>;
|
|
10
|
+
export declare function scan(pluginPlatform?: PluginPlatform): Promise<PluginPlatform>;
|
|
11
|
+
export { verifyPlugin };
|
|
12
|
+
export { createNewPlugin };
|
|
13
|
+
export declare function confirmAndScan(pluginPlatform: PluginPlatform): Promise<void>;
|
|
14
|
+
export declare const addUserPluginPackage: (pluginPlatform: PluginPlatform, pluginDirPath: string) => Promise<AddPluginResult>;
|
|
15
|
+
export declare const addExcludedPluginPackage: (pluginPlatform: PluginPlatform, pluginInfo: PluginInfo) => Promise<AddPluginResult>;
|
|
16
|
+
export declare const addPluginPackage: (pluginPlatform: PluginPlatform, pluginDirPath: string) => Promise<AddPluginResult>;
|
|
17
|
+
export declare function removePluginPackage(pluginPlatform: PluginPlatform, pluginInfo: PluginInfo): void;
|
|
18
|
+
//# sourceMappingURL=plugin-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-manager.d.ts","sourceRoot":"","sources":["../src/plugin-manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAoB,MAAM,+BAA+B,CAAC;AAQ3G,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,eAAe,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAkB,MAAM,4BAA4B,CAAC;AAI7E,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,cAAc,CAAC,CA8BjE;AAcD,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,CAgBzG;AAED,wBAAgB,4BAA4B,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,CAiBpI;AAED,wBAAgB,0BAA0B,CAAC,cAAc,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,CAajH;AAED,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,cAAc,GAAG,GAAG,CAAC,MAA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