@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.
Files changed (987) hide show
  1. package/API.md +108 -0
  2. package/CHANGELOG.md +4959 -0
  3. package/amplify-plugin.json +35 -0
  4. package/aws-amplify-cli-internal-gen2-migration-experimental-alpha-0.1.0.tgz +0 -0
  5. package/bin/amplify +11 -0
  6. package/bin/amplify.production.template +12 -0
  7. package/lib/amplify-exception-handler.d.ts +6 -0
  8. package/lib/amplify-exception-handler.d.ts.map +1 -0
  9. package/lib/amplify-exception-handler.js +158 -0
  10. package/lib/amplify-exception-handler.js.map +1 -0
  11. package/lib/amplify-service-helper.d.ts +4 -0
  12. package/lib/amplify-service-helper.d.ts.map +1 -0
  13. package/lib/amplify-service-helper.js +78 -0
  14. package/lib/amplify-service-helper.js.map +1 -0
  15. package/lib/app-config/config.d.ts +18 -0
  16. package/lib/app-config/config.d.ts.map +1 -0
  17. package/lib/app-config/config.js +89 -0
  18. package/lib/app-config/config.js.map +1 -0
  19. package/lib/app-config/debug-config.d.ts +14 -0
  20. package/lib/app-config/debug-config.d.ts.map +1 -0
  21. package/lib/app-config/debug-config.js +70 -0
  22. package/lib/app-config/debug-config.js.map +1 -0
  23. package/lib/app-config/getPath.d.ts +3 -0
  24. package/lib/app-config/getPath.d.ts.map +1 -0
  25. package/lib/app-config/getPath.js +47 -0
  26. package/lib/app-config/getPath.js.map +1 -0
  27. package/lib/app-config/index.d.ts +2 -0
  28. package/lib/app-config/index.d.ts.map +1 -0
  29. package/lib/app-config/index.js +18 -0
  30. package/lib/app-config/index.js.map +1 -0
  31. package/lib/attach-backend-steps/a10-queryProvider.d.ts +2 -0
  32. package/lib/attach-backend-steps/a10-queryProvider.d.ts.map +1 -0
  33. package/lib/attach-backend-steps/a10-queryProvider.js +99 -0
  34. package/lib/attach-backend-steps/a10-queryProvider.js.map +1 -0
  35. package/lib/attach-backend-steps/a20-analyzeProject.d.ts +3 -0
  36. package/lib/attach-backend-steps/a20-analyzeProject.d.ts.map +1 -0
  37. package/lib/attach-backend-steps/a20-analyzeProject.js +38 -0
  38. package/lib/attach-backend-steps/a20-analyzeProject.js.map +1 -0
  39. package/lib/attach-backend-steps/a30-initFrontend.d.ts +2 -0
  40. package/lib/attach-backend-steps/a30-initFrontend.d.ts.map +1 -0
  41. package/lib/attach-backend-steps/a30-initFrontend.js +83 -0
  42. package/lib/attach-backend-steps/a30-initFrontend.js.map +1 -0
  43. package/lib/attach-backend-steps/a40-generateFiles.d.ts +3 -0
  44. package/lib/attach-backend-steps/a40-generateFiles.d.ts.map +1 -0
  45. package/lib/attach-backend-steps/a40-generateFiles.js +129 -0
  46. package/lib/attach-backend-steps/a40-generateFiles.js.map +1 -0
  47. package/lib/attach-backend.d.ts +3 -0
  48. package/lib/attach-backend.d.ts.map +1 -0
  49. package/lib/attach-backend.js +230 -0
  50. package/lib/attach-backend.js.map +1 -0
  51. package/lib/commands/amplify.d.ts +2 -0
  52. package/lib/commands/amplify.d.ts.map +1 -0
  53. package/lib/commands/amplify.js +9 -0
  54. package/lib/commands/amplify.js.map +1 -0
  55. package/lib/commands/build.d.ts +8 -0
  56. package/lib/commands/build.d.ts.map +1 -0
  57. package/lib/commands/build.js +74 -0
  58. package/lib/commands/build.js.map +1 -0
  59. package/lib/commands/categories.d.ts +2 -0
  60. package/lib/commands/categories.d.ts.map +1 -0
  61. package/lib/commands/categories.js +8 -0
  62. package/lib/commands/categories.js.map +1 -0
  63. package/lib/commands/configure.d.ts +3 -0
  64. package/lib/commands/configure.d.ts.map +1 -0
  65. package/lib/commands/configure.js +105 -0
  66. package/lib/commands/configure.js.map +1 -0
  67. package/lib/commands/console.d.ts +3 -0
  68. package/lib/commands/console.d.ts.map +1 -0
  69. package/lib/commands/console.js +78 -0
  70. package/lib/commands/console.js.map +1 -0
  71. package/lib/commands/delete.d.ts +3 -0
  72. package/lib/commands/delete.d.ts.map +1 -0
  73. package/lib/commands/delete.js +16 -0
  74. package/lib/commands/delete.js.map +1 -0
  75. package/lib/commands/diagnose.d.ts +4 -0
  76. package/lib/commands/diagnose.d.ts.map +1 -0
  77. package/lib/commands/diagnose.js +236 -0
  78. package/lib/commands/diagnose.js.map +1 -0
  79. package/lib/commands/drift-detection/detect-local-drift.d.ts +22 -0
  80. package/lib/commands/drift-detection/detect-local-drift.d.ts.map +1 -0
  81. package/lib/commands/drift-detection/detect-local-drift.js +47 -0
  82. package/lib/commands/drift-detection/detect-local-drift.js.map +1 -0
  83. package/lib/commands/drift-detection/detect-stack-drift.d.ts +11 -0
  84. package/lib/commands/drift-detection/detect-stack-drift.d.ts.map +1 -0
  85. package/lib/commands/drift-detection/detect-stack-drift.js +230 -0
  86. package/lib/commands/drift-detection/detect-stack-drift.js.map +1 -0
  87. package/lib/commands/drift-detection/detect-template-drift.d.ts +27 -0
  88. package/lib/commands/drift-detection/detect-template-drift.d.ts.map +1 -0
  89. package/lib/commands/drift-detection/detect-template-drift.js +252 -0
  90. package/lib/commands/drift-detection/detect-template-drift.js.map +1 -0
  91. package/lib/commands/drift-detection/index.d.ts +4 -0
  92. package/lib/commands/drift-detection/index.d.ts.map +1 -0
  93. package/lib/commands/drift-detection/index.js +11 -0
  94. package/lib/commands/drift-detection/index.js.map +1 -0
  95. package/lib/commands/drift-detection/services/amplify-config-service.d.ts +7 -0
  96. package/lib/commands/drift-detection/services/amplify-config-service.d.ts.map +1 -0
  97. package/lib/commands/drift-detection/services/amplify-config-service.js +49 -0
  98. package/lib/commands/drift-detection/services/amplify-config-service.js.map +1 -0
  99. package/lib/commands/drift-detection/services/cloudformation-service.d.ts +13 -0
  100. package/lib/commands/drift-detection/services/cloudformation-service.d.ts.map +1 -0
  101. package/lib/commands/drift-detection/services/cloudformation-service.js +120 -0
  102. package/lib/commands/drift-detection/services/cloudformation-service.js.map +1 -0
  103. package/lib/commands/drift-detection/services/drift-formatter.d.ts +73 -0
  104. package/lib/commands/drift-detection/services/drift-formatter.d.ts.map +1 -0
  105. package/lib/commands/drift-detection/services/drift-formatter.js +651 -0
  106. package/lib/commands/drift-detection/services/drift-formatter.js.map +1 -0
  107. package/lib/commands/drift-detection/services/file-service.d.ts +7 -0
  108. package/lib/commands/drift-detection/services/file-service.d.ts.map +1 -0
  109. package/lib/commands/drift-detection/services/file-service.js +53 -0
  110. package/lib/commands/drift-detection/services/file-service.js.map +1 -0
  111. package/lib/commands/drift-detection/services/index.d.ts +5 -0
  112. package/lib/commands/drift-detection/services/index.d.ts.map +1 -0
  113. package/lib/commands/drift-detection/services/index.js +12 -0
  114. package/lib/commands/drift-detection/services/index.js.map +1 -0
  115. package/lib/commands/drift.d.ts +29 -0
  116. package/lib/commands/drift.d.ts.map +1 -0
  117. package/lib/commands/drift.js +228 -0
  118. package/lib/commands/drift.js.map +1 -0
  119. package/lib/commands/env/add.d.ts +3 -0
  120. package/lib/commands/env/add.d.ts.map +1 -0
  121. package/lib/commands/env/add.js +21 -0
  122. package/lib/commands/env/add.js.map +1 -0
  123. package/lib/commands/env/checkout.d.ts +3 -0
  124. package/lib/commands/env/checkout.d.ts.map +1 -0
  125. package/lib/commands/env/checkout.js +51 -0
  126. package/lib/commands/env/checkout.js.map +1 -0
  127. package/lib/commands/env/get.d.ts +3 -0
  128. package/lib/commands/env/get.d.ts.map +1 -0
  129. package/lib/commands/env/get.js +32 -0
  130. package/lib/commands/env/get.js.map +1 -0
  131. package/lib/commands/env/import.d.ts +3 -0
  132. package/lib/commands/env/import.d.ts.map +1 -0
  133. package/lib/commands/env/import.js +87 -0
  134. package/lib/commands/env/import.js.map +1 -0
  135. package/lib/commands/env/list.d.ts +2 -0
  136. package/lib/commands/env/list.d.ts.map +1 -0
  137. package/lib/commands/env/list.js +49 -0
  138. package/lib/commands/env/list.js.map +1 -0
  139. package/lib/commands/env/pull.d.ts +2 -0
  140. package/lib/commands/env/pull.d.ts.map +1 -0
  141. package/lib/commands/env/pull.js +12 -0
  142. package/lib/commands/env/pull.js.map +1 -0
  143. package/lib/commands/env/remove.d.ts +3 -0
  144. package/lib/commands/env/remove.d.ts.map +1 -0
  145. package/lib/commands/env/remove.js +63 -0
  146. package/lib/commands/env/remove.js.map +1 -0
  147. package/lib/commands/env/update.d.ts +3 -0
  148. package/lib/commands/env/update.d.ts.map +1 -0
  149. package/lib/commands/env/update.js +9 -0
  150. package/lib/commands/env/update.js.map +1 -0
  151. package/lib/commands/env.d.ts +2 -0
  152. package/lib/commands/env.d.ts.map +1 -0
  153. package/lib/commands/env.js +129 -0
  154. package/lib/commands/env.js.map +1 -0
  155. package/lib/commands/export.d.ts +3 -0
  156. package/lib/commands/export.d.ts.map +1 -0
  157. package/lib/commands/export.js +141 -0
  158. package/lib/commands/export.js.map +1 -0
  159. package/lib/commands/gen2-migration/_step.d.ts +16 -0
  160. package/lib/commands/gen2-migration/_step.d.ts.map +1 -0
  161. package/lib/commands/gen2-migration/_step.js +15 -0
  162. package/lib/commands/gen2-migration/_step.js.map +1 -0
  163. package/lib/commands/gen2-migration/_validations.d.ts +22 -0
  164. package/lib/commands/gen2-migration/_validations.d.ts.map +1 -0
  165. package/lib/commands/gen2-migration/_validations.js +227 -0
  166. package/lib/commands/gen2-migration/_validations.js.map +1 -0
  167. package/lib/commands/gen2-migration/cleanup.d.ts +8 -0
  168. package/lib/commands/gen2-migration/cleanup.d.ts.map +1 -0
  169. package/lib/commands/gen2-migration/cleanup.js +21 -0
  170. package/lib/commands/gen2-migration/cleanup.js.map +1 -0
  171. package/lib/commands/gen2-migration/clone.d.ts +8 -0
  172. package/lib/commands/gen2-migration/clone.d.ts.map +1 -0
  173. package/lib/commands/gen2-migration/clone.js +21 -0
  174. package/lib/commands/gen2-migration/clone.js.map +1 -0
  175. package/lib/commands/gen2-migration/codegen-custom-resources/generator/backend-updater.d.ts +7 -0
  176. package/lib/commands/gen2-migration/codegen-custom-resources/generator/backend-updater.d.ts.map +1 -0
  177. package/lib/commands/gen2-migration/codegen-custom-resources/generator/backend-updater.js +84 -0
  178. package/lib/commands/gen2-migration/codegen-custom-resources/generator/backend-updater.js.map +1 -0
  179. package/lib/commands/gen2-migration/codegen-custom-resources/generator/dependency-merger.d.ts +8 -0
  180. package/lib/commands/gen2-migration/codegen-custom-resources/generator/dependency-merger.d.ts.map +1 -0
  181. package/lib/commands/gen2-migration/codegen-custom-resources/generator/dependency-merger.js +105 -0
  182. package/lib/commands/gen2-migration/codegen-custom-resources/generator/dependency-merger.js.map +1 -0
  183. package/lib/commands/gen2-migration/codegen-custom-resources/generator/file-converter.d.ts +5 -0
  184. package/lib/commands/gen2-migration/codegen-custom-resources/generator/file-converter.d.ts.map +1 -0
  185. package/lib/commands/gen2-migration/codegen-custom-resources/generator/file-converter.js +88 -0
  186. package/lib/commands/gen2-migration/codegen-custom-resources/generator/file-converter.js.map +1 -0
  187. package/lib/commands/gen2-migration/codegen-custom-resources/generator/gen2-file-generator.d.ts +8 -0
  188. package/lib/commands/gen2-migration/codegen-custom-resources/generator/gen2-file-generator.d.ts.map +1 -0
  189. package/lib/commands/gen2-migration/codegen-custom-resources/generator/gen2-file-generator.js +36 -0
  190. package/lib/commands/gen2-migration/codegen-custom-resources/generator/gen2-file-generator.js.map +1 -0
  191. package/lib/commands/gen2-migration/codegen-custom-resources/parser/cdk-stack-parser.d.ts +5 -0
  192. package/lib/commands/gen2-migration/codegen-custom-resources/parser/cdk-stack-parser.d.ts.map +1 -0
  193. package/lib/commands/gen2-migration/codegen-custom-resources/parser/cdk-stack-parser.js +81 -0
  194. package/lib/commands/gen2-migration/codegen-custom-resources/parser/cdk-stack-parser.js.map +1 -0
  195. package/lib/commands/gen2-migration/codegen-custom-resources/parser/pattern-detector.d.ts +15 -0
  196. package/lib/commands/gen2-migration/codegen-custom-resources/parser/pattern-detector.d.ts.map +1 -0
  197. package/lib/commands/gen2-migration/codegen-custom-resources/parser/pattern-detector.js +35 -0
  198. package/lib/commands/gen2-migration/codegen-custom-resources/parser/pattern-detector.js.map +1 -0
  199. package/lib/commands/gen2-migration/codegen-custom-resources/scanner/custom-resource-scanner.d.ts +5 -0
  200. package/lib/commands/gen2-migration/codegen-custom-resources/scanner/custom-resource-scanner.d.ts.map +1 -0
  201. package/lib/commands/gen2-migration/codegen-custom-resources/scanner/custom-resource-scanner.js +66 -0
  202. package/lib/commands/gen2-migration/codegen-custom-resources/scanner/custom-resource-scanner.js.map +1 -0
  203. package/lib/commands/gen2-migration/codegen-custom-resources/transformer/amplify-helper-transformer.d.ts +6 -0
  204. package/lib/commands/gen2-migration/codegen-custom-resources/transformer/amplify-helper-transformer.d.ts.map +1 -0
  205. package/lib/commands/gen2-migration/codegen-custom-resources/transformer/amplify-helper-transformer.js +156 -0
  206. package/lib/commands/gen2-migration/codegen-custom-resources/transformer/amplify-helper-transformer.js.map +1 -0
  207. package/lib/commands/gen2-migration/codegen-custom-resources/types.d.ts +38 -0
  208. package/lib/commands/gen2-migration/codegen-custom-resources/types.d.ts.map +1 -0
  209. package/lib/commands/gen2-migration/codegen-custom-resources/types.js +3 -0
  210. package/lib/commands/gen2-migration/codegen-custom-resources/types.js.map +1 -0
  211. package/lib/commands/gen2-migration/decommission.d.ts +9 -0
  212. package/lib/commands/gen2-migration/decommission.d.ts.map +1 -0
  213. package/lib/commands/gen2-migration/decommission.js +70 -0
  214. package/lib/commands/gen2-migration/decommission.js.map +1 -0
  215. package/lib/commands/gen2-migration/generate.d.ts +8 -0
  216. package/lib/commands/gen2-migration/generate.d.ts.map +1 -0
  217. package/lib/commands/gen2-migration/generate.js +23 -0
  218. package/lib/commands/gen2-migration/generate.js.map +1 -0
  219. package/lib/commands/gen2-migration/lock.d.ts +10 -0
  220. package/lib/commands/gen2-migration/lock.d.ts.map +1 -0
  221. package/lib/commands/gen2-migration/lock.js +92 -0
  222. package/lib/commands/gen2-migration/lock.js.map +1 -0
  223. package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.d.ts +5 -0
  224. package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.d.ts.map +1 -0
  225. package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.js +76 -0
  226. package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.js.map +1 -0
  227. package/lib/commands/gen2-migration/refactor/cfn-stack-updater.d.ts +6 -0
  228. package/lib/commands/gen2-migration/refactor/cfn-stack-updater.d.ts.map +1 -0
  229. package/lib/commands/gen2-migration/refactor/cfn-stack-updater.js +52 -0
  230. package/lib/commands/gen2-migration/refactor/cfn-stack-updater.js.map +1 -0
  231. package/lib/commands/gen2-migration/refactor/generators/category-template-generator.d.ts +40 -0
  232. package/lib/commands/gen2-migration/refactor/generators/category-template-generator.d.ts.map +1 -0
  233. package/lib/commands/gen2-migration/refactor/generators/category-template-generator.js +312 -0
  234. package/lib/commands/gen2-migration/refactor/generators/category-template-generator.js.map +1 -0
  235. package/lib/commands/gen2-migration/refactor/generators/template-generator.d.ts +49 -0
  236. package/lib/commands/gen2-migration/refactor/generators/template-generator.d.ts.map +1 -0
  237. package/lib/commands/gen2-migration/refactor/generators/template-generator.js +518 -0
  238. package/lib/commands/gen2-migration/refactor/generators/template-generator.js.map +1 -0
  239. package/lib/commands/gen2-migration/refactor/index.d.ts +2 -0
  240. package/lib/commands/gen2-migration/refactor/index.d.ts.map +1 -0
  241. package/lib/commands/gen2-migration/refactor/index.js +6 -0
  242. package/lib/commands/gen2-migration/refactor/index.js.map +1 -0
  243. package/lib/commands/gen2-migration/refactor/oauth-values-retriever.d.ts +16 -0
  244. package/lib/commands/gen2-migration/refactor/oauth-values-retriever.d.ts.map +1 -0
  245. package/lib/commands/gen2-migration/refactor/oauth-values-retriever.js +69 -0
  246. package/lib/commands/gen2-migration/refactor/oauth-values-retriever.js.map +1 -0
  247. package/lib/commands/gen2-migration/refactor/refactor.d.ts +19 -0
  248. package/lib/commands/gen2-migration/refactor/refactor.d.ts.map +1 -0
  249. package/lib/commands/gen2-migration/refactor/refactor.js +223 -0
  250. package/lib/commands/gen2-migration/refactor/refactor.js.map +1 -0
  251. package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.d.ts +13 -0
  252. package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.d.ts.map +1 -0
  253. package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.js +137 -0
  254. package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.js.map +1 -0
  255. package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.d.ts +8 -0
  256. package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.d.ts.map +1 -0
  257. package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.js +27 -0
  258. package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.js.map +1 -0
  259. package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.d.ts +14 -0
  260. package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.d.ts.map +1 -0
  261. package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.js +137 -0
  262. package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.js.map +1 -0
  263. package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.d.ts +10 -0
  264. package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.d.ts.map +1 -0
  265. package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.js +49 -0
  266. package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.js.map +1 -0
  267. package/lib/commands/gen2-migration/refactor/types.d.ts +125 -0
  268. package/lib/commands/gen2-migration/refactor/types.d.ts.map +1 -0
  269. package/lib/commands/gen2-migration/refactor/types.js +55 -0
  270. package/lib/commands/gen2-migration/refactor/types.js.map +1 -0
  271. package/lib/commands/gen2-migration/refactor/utils.d.ts +2 -0
  272. package/lib/commands/gen2-migration/refactor/utils.d.ts.map +1 -0
  273. package/lib/commands/gen2-migration/refactor/utils.js +7 -0
  274. package/lib/commands/gen2-migration/refactor/utils.js.map +1 -0
  275. package/lib/commands/gen2-migration/shift.d.ts +8 -0
  276. package/lib/commands/gen2-migration/shift.d.ts.map +1 -0
  277. package/lib/commands/gen2-migration/shift.js +21 -0
  278. package/lib/commands/gen2-migration/shift.js.map +1 -0
  279. package/lib/commands/gen2-migration/stateful-resources.d.ts +2 -0
  280. package/lib/commands/gen2-migration/stateful-resources.d.ts.map +1 -0
  281. package/lib/commands/gen2-migration/stateful-resources.js +34 -0
  282. package/lib/commands/gen2-migration/stateful-resources.js.map +1 -0
  283. package/lib/commands/gen2-migration.d.ts +15 -0
  284. package/lib/commands/gen2-migration.d.ts.map +1 -0
  285. package/lib/commands/gen2-migration.js +181 -0
  286. package/lib/commands/gen2-migration.js.map +1 -0
  287. package/lib/commands/help.d.ts +3 -0
  288. package/lib/commands/help.d.ts.map +1 -0
  289. package/lib/commands/help.js +9 -0
  290. package/lib/commands/help.js.map +1 -0
  291. package/lib/commands/helpers/collect-files.d.ts +9 -0
  292. package/lib/commands/helpers/collect-files.d.ts.map +1 -0
  293. package/lib/commands/helpers/collect-files.js +141 -0
  294. package/lib/commands/helpers/collect-files.js.map +1 -0
  295. package/lib/commands/helpers/encryption-helpers.d.ts +7 -0
  296. package/lib/commands/helpers/encryption-helpers.d.ts.map +1 -0
  297. package/lib/commands/helpers/encryption-helpers.js +37 -0
  298. package/lib/commands/helpers/encryption-helpers.js.map +1 -0
  299. package/lib/commands/helpers/envUtils.d.ts +2 -0
  300. package/lib/commands/helpers/envUtils.d.ts.map +1 -0
  301. package/lib/commands/helpers/envUtils.js +21 -0
  302. package/lib/commands/helpers/envUtils.js.map +1 -0
  303. package/lib/commands/helpers/projectUtils.d.ts +2 -0
  304. package/lib/commands/helpers/projectUtils.d.ts.map +1 -0
  305. package/lib/commands/helpers/projectUtils.js +17 -0
  306. package/lib/commands/helpers/projectUtils.js.map +1 -0
  307. package/lib/commands/helpers/reporter-apis.d.ts +3 -0
  308. package/lib/commands/helpers/reporter-apis.d.ts.map +1 -0
  309. package/lib/commands/helpers/reporter-apis.js +29 -0
  310. package/lib/commands/helpers/reporter-apis.js.map +1 -0
  311. package/lib/commands/init.d.ts +3 -0
  312. package/lib/commands/init.d.ts.map +1 -0
  313. package/lib/commands/init.js +53 -0
  314. package/lib/commands/init.js.map +1 -0
  315. package/lib/commands/logout.d.ts +3 -0
  316. package/lib/commands/logout.d.ts.map +1 -0
  317. package/lib/commands/logout.js +33 -0
  318. package/lib/commands/logout.js.map +1 -0
  319. package/lib/commands/migrate.d.ts +2 -0
  320. package/lib/commands/migrate.d.ts.map +1 -0
  321. package/lib/commands/migrate.js +9 -0
  322. package/lib/commands/migrate.js.map +1 -0
  323. package/lib/commands/plugin/add.d.ts +3 -0
  324. package/lib/commands/plugin/add.d.ts.map +1 -0
  325. package/lib/commands/plugin/add.js +239 -0
  326. package/lib/commands/plugin/add.js.map +1 -0
  327. package/lib/commands/plugin/configure.d.ts +5 -0
  328. package/lib/commands/plugin/configure.d.ts.map +1 -0
  329. package/lib/commands/plugin/configure.js +326 -0
  330. package/lib/commands/plugin/configure.js.map +1 -0
  331. package/lib/commands/plugin/help.d.ts +3 -0
  332. package/lib/commands/plugin/help.d.ts.map +1 -0
  333. package/lib/commands/plugin/help.js +9 -0
  334. package/lib/commands/plugin/help.js.map +1 -0
  335. package/lib/commands/plugin/list.d.ts +3 -0
  336. package/lib/commands/plugin/list.d.ts.map +1 -0
  337. package/lib/commands/plugin/list.js +93 -0
  338. package/lib/commands/plugin/list.js.map +1 -0
  339. package/lib/commands/plugin/new.d.ts +3 -0
  340. package/lib/commands/plugin/new.d.ts.map +1 -0
  341. package/lib/commands/plugin/new.js +93 -0
  342. package/lib/commands/plugin/new.js.map +1 -0
  343. package/lib/commands/plugin/remove.d.ts +3 -0
  344. package/lib/commands/plugin/remove.d.ts.map +1 -0
  345. package/lib/commands/plugin/remove.js +113 -0
  346. package/lib/commands/plugin/remove.js.map +1 -0
  347. package/lib/commands/plugin/scan.d.ts +2 -0
  348. package/lib/commands/plugin/scan.d.ts.map +1 -0
  349. package/lib/commands/plugin/scan.js +9 -0
  350. package/lib/commands/plugin/scan.js.map +1 -0
  351. package/lib/commands/plugin/verify.d.ts +3 -0
  352. package/lib/commands/plugin/verify.d.ts.map +1 -0
  353. package/lib/commands/plugin/verify.js +19 -0
  354. package/lib/commands/plugin/verify.js.map +1 -0
  355. package/lib/commands/plugin.d.ts +3 -0
  356. package/lib/commands/plugin.d.ts.map +1 -0
  357. package/lib/commands/plugin.js +63 -0
  358. package/lib/commands/plugin.js.map +1 -0
  359. package/lib/commands/publish.d.ts +2 -0
  360. package/lib/commands/publish.d.ts.map +1 -0
  361. package/lib/commands/publish.js +43 -0
  362. package/lib/commands/publish.js.map +1 -0
  363. package/lib/commands/pull.d.ts +3 -0
  364. package/lib/commands/pull.d.ts.map +1 -0
  365. package/lib/commands/pull.js +68 -0
  366. package/lib/commands/pull.js.map +1 -0
  367. package/lib/commands/push.d.ts +3 -0
  368. package/lib/commands/push.d.ts.map +1 -0
  369. package/lib/commands/push.js +26 -0
  370. package/lib/commands/push.js.map +1 -0
  371. package/lib/commands/run.d.ts +3 -0
  372. package/lib/commands/run.d.ts.map +1 -0
  373. package/lib/commands/run.js +12 -0
  374. package/lib/commands/run.js.map +1 -0
  375. package/lib/commands/status.d.ts +3 -0
  376. package/lib/commands/status.d.ts.map +1 -0
  377. package/lib/commands/status.js +79 -0
  378. package/lib/commands/status.js.map +1 -0
  379. package/lib/commands/uninstall.d.ts +3 -0
  380. package/lib/commands/uninstall.d.ts.map +1 -0
  381. package/lib/commands/uninstall.js +92 -0
  382. package/lib/commands/uninstall.js.map +1 -0
  383. package/lib/commands/upgrade.d.ts +3 -0
  384. package/lib/commands/upgrade.d.ts.map +1 -0
  385. package/lib/commands/upgrade.js +121 -0
  386. package/lib/commands/upgrade.js.map +1 -0
  387. package/lib/commands/version.d.ts +2 -0
  388. package/lib/commands/version.d.ts.map +1 -0
  389. package/lib/commands/version.js +10 -0
  390. package/lib/commands/version.js.map +1 -0
  391. package/lib/conditional-local-logging-init.d.ts +3 -0
  392. package/lib/conditional-local-logging-init.d.ts.map +1 -0
  393. package/lib/conditional-local-logging-init.js +14 -0
  394. package/lib/conditional-local-logging-init.js.map +1 -0
  395. package/lib/config-steps/c0-analyzeProject.d.ts +2 -0
  396. package/lib/config-steps/c0-analyzeProject.d.ts.map +1 -0
  397. package/lib/config-steps/c0-analyzeProject.js +151 -0
  398. package/lib/config-steps/c0-analyzeProject.js.map +1 -0
  399. package/lib/config-steps/c1-configFrontend.d.ts +2 -0
  400. package/lib/config-steps/c1-configFrontend.d.ts.map +1 -0
  401. package/lib/config-steps/c1-configFrontend.js +73 -0
  402. package/lib/config-steps/c1-configFrontend.js.map +1 -0
  403. package/lib/config-steps/c2-configProviders.d.ts +2 -0
  404. package/lib/config-steps/c2-configProviders.d.ts.map +1 -0
  405. package/lib/config-steps/c2-configProviders.js +97 -0
  406. package/lib/config-steps/c2-configProviders.js.map +1 -0
  407. package/lib/config-steps/c9-onFailure.d.ts +2 -0
  408. package/lib/config-steps/c9-onFailure.d.ts.map +1 -0
  409. package/lib/config-steps/c9-onFailure.js +43 -0
  410. package/lib/config-steps/c9-onFailure.js.map +1 -0
  411. package/lib/config-steps/c9-onSuccess.d.ts +2 -0
  412. package/lib/config-steps/c9-onSuccess.d.ts.map +1 -0
  413. package/lib/config-steps/c9-onSuccess.js +17 -0
  414. package/lib/config-steps/c9-onSuccess.js.map +1 -0
  415. package/lib/configure-new-user.d.ts +2 -0
  416. package/lib/configure-new-user.d.ts.map +1 -0
  417. package/lib/configure-new-user.js +61 -0
  418. package/lib/configure-new-user.js.map +1 -0
  419. package/lib/context-manager.d.ts +6 -0
  420. package/lib/context-manager.d.ts.map +1 -0
  421. package/lib/context-manager.js +101 -0
  422. package/lib/context-manager.js.map +1 -0
  423. package/lib/display-banner-messages.d.ts +3 -0
  424. package/lib/display-banner-messages.d.ts.map +1 -0
  425. package/lib/display-banner-messages.js +51 -0
  426. package/lib/display-banner-messages.js.map +1 -0
  427. package/lib/domain/add-plugin-result.d.ts +12 -0
  428. package/lib/domain/add-plugin-result.d.ts.map +1 -0
  429. package/lib/domain/add-plugin-result.js +17 -0
  430. package/lib/domain/add-plugin-result.js.map +1 -0
  431. package/lib/domain/amplify-plugin-type.d.ts +7 -0
  432. package/lib/domain/amplify-plugin-type.d.ts.map +1 -0
  433. package/lib/domain/amplify-plugin-type.js +11 -0
  434. package/lib/domain/amplify-plugin-type.js.map +1 -0
  435. package/lib/domain/amplify-toolkit.d.ts +84 -0
  436. package/lib/domain/amplify-toolkit.d.ts.map +1 -0
  437. package/lib/domain/amplify-toolkit.js +244 -0
  438. package/lib/domain/amplify-toolkit.js.map +1 -0
  439. package/lib/domain/amplify-usageData/FlowReport.d.ts +30 -0
  440. package/lib/domain/amplify-usageData/FlowReport.d.ts.map +1 -0
  441. package/lib/domain/amplify-usageData/FlowReport.js +99 -0
  442. package/lib/domain/amplify-usageData/FlowReport.js.map +1 -0
  443. package/lib/domain/amplify-usageData/NoFlowReport.d.ts +12 -0
  444. package/lib/domain/amplify-usageData/NoFlowReport.d.ts.map +1 -0
  445. package/lib/domain/amplify-usageData/NoFlowReport.js +21 -0
  446. package/lib/domain/amplify-usageData/NoFlowReport.js.map +1 -0
  447. package/lib/domain/amplify-usageData/NoUsageData.d.ts +24 -0
  448. package/lib/domain/amplify-usageData/NoUsageData.d.ts.map +1 -0
  449. package/lib/domain/amplify-usageData/NoUsageData.js +69 -0
  450. package/lib/domain/amplify-usageData/NoUsageData.js.map +1 -0
  451. package/lib/domain/amplify-usageData/SerializableError.d.ts +16 -0
  452. package/lib/domain/amplify-usageData/SerializableError.d.ts.map +1 -0
  453. package/lib/domain/amplify-usageData/SerializableError.js +129 -0
  454. package/lib/domain/amplify-usageData/SerializableError.js.map +1 -0
  455. package/lib/domain/amplify-usageData/Timer.d.ts +8 -0
  456. package/lib/domain/amplify-usageData/Timer.d.ts.map +1 -0
  457. package/lib/domain/amplify-usageData/Timer.js +17 -0
  458. package/lib/domain/amplify-usageData/Timer.js.map +1 -0
  459. package/lib/domain/amplify-usageData/UsageData.d.ts +45 -0
  460. package/lib/domain/amplify-usageData/UsageData.d.ts.map +1 -0
  461. package/lib/domain/amplify-usageData/UsageData.js +163 -0
  462. package/lib/domain/amplify-usageData/UsageData.js.map +1 -0
  463. package/lib/domain/amplify-usageData/UsageDataPayload.d.ts +26 -0
  464. package/lib/domain/amplify-usageData/UsageDataPayload.d.ts.map +1 -0
  465. package/lib/domain/amplify-usageData/UsageDataPayload.js +69 -0
  466. package/lib/domain/amplify-usageData/UsageDataPayload.js.map +1 -0
  467. package/lib/domain/amplify-usageData/VersionManager.d.ts +3 -0
  468. package/lib/domain/amplify-usageData/VersionManager.d.ts.map +1 -0
  469. package/lib/domain/amplify-usageData/VersionManager.js +29 -0
  470. package/lib/domain/amplify-usageData/VersionManager.js.map +1 -0
  471. package/lib/domain/amplify-usageData/getUsageDataUrl.d.ts +4 -0
  472. package/lib/domain/amplify-usageData/getUsageDataUrl.d.ts.map +1 -0
  473. package/lib/domain/amplify-usageData/getUsageDataUrl.js +27 -0
  474. package/lib/domain/amplify-usageData/getUsageDataUrl.js.map +1 -0
  475. package/lib/domain/amplify-usageData/identifiable-input-regex.d.ts +3 -0
  476. package/lib/domain/amplify-usageData/identifiable-input-regex.d.ts.map +1 -0
  477. package/lib/domain/amplify-usageData/identifiable-input-regex.js +80 -0
  478. package/lib/domain/amplify-usageData/identifiable-input-regex.js.map +1 -0
  479. package/lib/domain/amplify-usageData/index.d.ts +4 -0
  480. package/lib/domain/amplify-usageData/index.d.ts.map +1 -0
  481. package/lib/domain/amplify-usageData/index.js +8 -0
  482. package/lib/domain/amplify-usageData/index.js.map +1 -0
  483. package/lib/domain/command-input.d.ts +12 -0
  484. package/lib/domain/command-input.d.ts.map +1 -0
  485. package/lib/domain/command-input.js +11 -0
  486. package/lib/domain/command-input.js.map +1 -0
  487. package/lib/domain/context.d.ts +11 -0
  488. package/lib/domain/context.d.ts.map +1 -0
  489. package/lib/domain/context.js +13 -0
  490. package/lib/domain/context.js.map +1 -0
  491. package/lib/domain/error.d.ts +1 -0
  492. package/lib/domain/error.d.ts.map +1 -0
  493. package/lib/domain/error.js +1 -0
  494. package/lib/domain/error.js.map +1 -0
  495. package/lib/domain/input-verification-result.d.ts +7 -0
  496. package/lib/domain/input-verification-result.d.ts.map +1 -0
  497. package/lib/domain/input-verification-result.js +12 -0
  498. package/lib/domain/input-verification-result.js.map +1 -0
  499. package/lib/domain/inquirer-helper.d.ts +7 -0
  500. package/lib/domain/inquirer-helper.d.ts.map +1 -0
  501. package/lib/domain/inquirer-helper.js +5 -0
  502. package/lib/domain/inquirer-helper.js.map +1 -0
  503. package/lib/execution-manager.d.ts +9 -0
  504. package/lib/execution-manager.d.ts.map +1 -0
  505. package/lib/execution-manager.js +339 -0
  506. package/lib/execution-manager.js.map +1 -0
  507. package/lib/extensions/amplify-helpers/apply-auth-mode.d.ts +5 -0
  508. package/lib/extensions/amplify-helpers/apply-auth-mode.d.ts.map +1 -0
  509. package/lib/extensions/amplify-helpers/apply-auth-mode.js +63 -0
  510. package/lib/extensions/amplify-helpers/apply-auth-mode.js.map +1 -0
  511. package/lib/extensions/amplify-helpers/auto-updates.d.ts +2 -0
  512. package/lib/extensions/amplify-helpers/auto-updates.d.ts.map +1 -0
  513. package/lib/extensions/amplify-helpers/auto-updates.js +13 -0
  514. package/lib/extensions/amplify-helpers/auto-updates.js.map +1 -0
  515. package/lib/extensions/amplify-helpers/confirm-prompt.d.ts +2 -0
  516. package/lib/extensions/amplify-helpers/confirm-prompt.d.ts.map +1 -0
  517. package/lib/extensions/amplify-helpers/confirm-prompt.js +47 -0
  518. package/lib/extensions/amplify-helpers/confirm-prompt.js.map +1 -0
  519. package/lib/extensions/amplify-helpers/constants.d.ts +25 -0
  520. package/lib/extensions/amplify-helpers/constants.d.ts.map +1 -0
  521. package/lib/extensions/amplify-helpers/constants.js +28 -0
  522. package/lib/extensions/amplify-helpers/constants.js.map +1 -0
  523. package/lib/extensions/amplify-helpers/construct-exeInfo.d.ts +3 -0
  524. package/lib/extensions/amplify-helpers/construct-exeInfo.d.ts.map +1 -0
  525. package/lib/extensions/amplify-helpers/construct-exeInfo.js +23 -0
  526. package/lib/extensions/amplify-helpers/construct-exeInfo.js.map +1 -0
  527. package/lib/extensions/amplify-helpers/copy-batch.d.ts +3 -0
  528. package/lib/extensions/amplify-helpers/copy-batch.d.ts.map +1 -0
  529. package/lib/extensions/amplify-helpers/copy-batch.js +31 -0
  530. package/lib/extensions/amplify-helpers/copy-batch.js.map +1 -0
  531. package/lib/extensions/amplify-helpers/current-cloud-backend-utils.d.ts +4 -0
  532. package/lib/extensions/amplify-helpers/current-cloud-backend-utils.d.ts.map +1 -0
  533. package/lib/extensions/amplify-helpers/current-cloud-backend-utils.js +76 -0
  534. package/lib/extensions/amplify-helpers/current-cloud-backend-utils.js.map +1 -0
  535. package/lib/extensions/amplify-helpers/delete-project.d.ts +8 -0
  536. package/lib/extensions/amplify-helpers/delete-project.d.ts.map +1 -0
  537. package/lib/extensions/amplify-helpers/delete-project.js +89 -0
  538. package/lib/extensions/amplify-helpers/delete-project.js.map +1 -0
  539. package/lib/extensions/amplify-helpers/docs-manager.d.ts +2 -0
  540. package/lib/extensions/amplify-helpers/docs-manager.d.ts.map +1 -0
  541. package/lib/extensions/amplify-helpers/docs-manager.js +20 -0
  542. package/lib/extensions/amplify-helpers/docs-manager.js.map +1 -0
  543. package/lib/extensions/amplify-helpers/editor-selection.d.ts +7 -0
  544. package/lib/extensions/amplify-helpers/editor-selection.d.ts.map +1 -0
  545. package/lib/extensions/amplify-helpers/editor-selection.js +134 -0
  546. package/lib/extensions/amplify-helpers/editor-selection.js.map +1 -0
  547. package/lib/extensions/amplify-helpers/envResourceParams.d.ts +6 -0
  548. package/lib/extensions/amplify-helpers/envResourceParams.d.ts.map +1 -0
  549. package/lib/extensions/amplify-helpers/envResourceParams.js +89 -0
  550. package/lib/extensions/amplify-helpers/envResourceParams.js.map +1 -0
  551. package/lib/extensions/amplify-helpers/execute-provider-utils.d.ts +3 -0
  552. package/lib/extensions/amplify-helpers/execute-provider-utils.d.ts.map +1 -0
  553. package/lib/extensions/amplify-helpers/execute-provider-utils.js +43 -0
  554. package/lib/extensions/amplify-helpers/execute-provider-utils.js.map +1 -0
  555. package/lib/extensions/amplify-helpers/get-all-category-pluginInfos.d.ts +6 -0
  556. package/lib/extensions/amplify-helpers/get-all-category-pluginInfos.d.ts.map +1 -0
  557. package/lib/extensions/amplify-helpers/get-all-category-pluginInfos.js +16 -0
  558. package/lib/extensions/amplify-helpers/get-all-category-pluginInfos.js.map +1 -0
  559. package/lib/extensions/amplify-helpers/get-all-envs.d.ts +2 -0
  560. package/lib/extensions/amplify-helpers/get-all-envs.d.ts.map +1 -0
  561. package/lib/extensions/amplify-helpers/get-all-envs.js +10 -0
  562. package/lib/extensions/amplify-helpers/get-all-envs.js.map +1 -0
  563. package/lib/extensions/amplify-helpers/get-amplify-appId.d.ts +2 -0
  564. package/lib/extensions/amplify-helpers/get-amplify-appId.d.ts.map +1 -0
  565. package/lib/extensions/amplify-helpers/get-amplify-appId.js +11 -0
  566. package/lib/extensions/amplify-helpers/get-amplify-appId.js.map +1 -0
  567. package/lib/extensions/amplify-helpers/get-amplify-version.d.ts +2 -0
  568. package/lib/extensions/amplify-helpers/get-amplify-version.d.ts.map +1 -0
  569. package/lib/extensions/amplify-helpers/get-amplify-version.js +44 -0
  570. package/lib/extensions/amplify-helpers/get-amplify-version.js.map +1 -0
  571. package/lib/extensions/amplify-helpers/get-category-pluginInfo.d.ts +3 -0
  572. package/lib/extensions/amplify-helpers/get-category-pluginInfo.d.ts.map +1 -0
  573. package/lib/extensions/amplify-helpers/get-category-pluginInfo.js +29 -0
  574. package/lib/extensions/amplify-helpers/get-category-pluginInfo.js.map +1 -0
  575. package/lib/extensions/amplify-helpers/get-cloud-init-status.d.ts +5 -0
  576. package/lib/extensions/amplify-helpers/get-cloud-init-status.d.ts.map +1 -0
  577. package/lib/extensions/amplify-helpers/get-cloud-init-status.js +54 -0
  578. package/lib/extensions/amplify-helpers/get-cloud-init-status.js.map +1 -0
  579. package/lib/extensions/amplify-helpers/get-env-details.d.ts +3 -0
  580. package/lib/extensions/amplify-helpers/get-env-details.d.ts.map +1 -0
  581. package/lib/extensions/amplify-helpers/get-env-details.js +13 -0
  582. package/lib/extensions/amplify-helpers/get-env-details.js.map +1 -0
  583. package/lib/extensions/amplify-helpers/get-env-info.d.ts +3 -0
  584. package/lib/extensions/amplify-helpers/get-env-info.d.ts.map +1 -0
  585. package/lib/extensions/amplify-helpers/get-env-info.js +15 -0
  586. package/lib/extensions/amplify-helpers/get-env-info.js.map +1 -0
  587. package/lib/extensions/amplify-helpers/get-frontend-plugins.d.ts +3 -0
  588. package/lib/extensions/amplify-helpers/get-frontend-plugins.d.ts.map +1 -0
  589. package/lib/extensions/amplify-helpers/get-frontend-plugins.js +19 -0
  590. package/lib/extensions/amplify-helpers/get-frontend-plugins.js.map +1 -0
  591. package/lib/extensions/amplify-helpers/get-imported-auth-properties.d.ts +10 -0
  592. package/lib/extensions/amplify-helpers/get-imported-auth-properties.d.ts.map +1 -0
  593. package/lib/extensions/amplify-helpers/get-imported-auth-properties.js +43 -0
  594. package/lib/extensions/amplify-helpers/get-imported-auth-properties.js.map +1 -0
  595. package/lib/extensions/amplify-helpers/get-plugin-instance.d.ts +3 -0
  596. package/lib/extensions/amplify-helpers/get-plugin-instance.d.ts.map +1 -0
  597. package/lib/extensions/amplify-helpers/get-plugin-instance.js +15 -0
  598. package/lib/extensions/amplify-helpers/get-plugin-instance.js.map +1 -0
  599. package/lib/extensions/amplify-helpers/get-plugin.d.ts +2 -0
  600. package/lib/extensions/amplify-helpers/get-plugin.d.ts.map +1 -0
  601. package/lib/extensions/amplify-helpers/get-plugin.js +15 -0
  602. package/lib/extensions/amplify-helpers/get-plugin.js.map +1 -0
  603. package/lib/extensions/amplify-helpers/get-project-config.d.ts +2 -0
  604. package/lib/extensions/amplify-helpers/get-project-config.d.ts.map +1 -0
  605. package/lib/extensions/amplify-helpers/get-project-config.js +8 -0
  606. package/lib/extensions/amplify-helpers/get-project-config.js.map +1 -0
  607. package/lib/extensions/amplify-helpers/get-project-details.d.ts +9 -0
  608. package/lib/extensions/amplify-helpers/get-project-details.d.ts.map +1 -0
  609. package/lib/extensions/amplify-helpers/get-project-details.js +25 -0
  610. package/lib/extensions/amplify-helpers/get-project-details.js.map +1 -0
  611. package/lib/extensions/amplify-helpers/get-project-meta.d.ts +3 -0
  612. package/lib/extensions/amplify-helpers/get-project-meta.d.ts.map +1 -0
  613. package/lib/extensions/amplify-helpers/get-project-meta.js +12 -0
  614. package/lib/extensions/amplify-helpers/get-project-meta.js.map +1 -0
  615. package/lib/extensions/amplify-helpers/get-provider-plugins.d.ts +5 -0
  616. package/lib/extensions/amplify-helpers/get-provider-plugins.d.ts.map +1 -0
  617. package/lib/extensions/amplify-helpers/get-provider-plugins.js +66 -0
  618. package/lib/extensions/amplify-helpers/get-provider-plugins.js.map +1 -0
  619. package/lib/extensions/amplify-helpers/get-resource-outputs.d.ts +14 -0
  620. package/lib/extensions/amplify-helpers/get-resource-outputs.d.ts.map +1 -0
  621. package/lib/extensions/amplify-helpers/get-resource-outputs.js +70 -0
  622. package/lib/extensions/amplify-helpers/get-resource-outputs.js.map +1 -0
  623. package/lib/extensions/amplify-helpers/get-root-stack-id.d.ts +2 -0
  624. package/lib/extensions/amplify-helpers/get-root-stack-id.d.ts.map +1 -0
  625. package/lib/extensions/amplify-helpers/get-root-stack-id.js +15 -0
  626. package/lib/extensions/amplify-helpers/get-root-stack-id.js.map +1 -0
  627. package/lib/extensions/amplify-helpers/get-tags.d.ts +4 -0
  628. package/lib/extensions/amplify-helpers/get-tags.d.ts.map +1 -0
  629. package/lib/extensions/amplify-helpers/get-tags.js +39 -0
  630. package/lib/extensions/amplify-helpers/get-tags.js.map +1 -0
  631. package/lib/extensions/amplify-helpers/get-userpoolgroup-list.d.ts +3 -0
  632. package/lib/extensions/amplify-helpers/get-userpoolgroup-list.d.ts.map +1 -0
  633. package/lib/extensions/amplify-helpers/get-userpoolgroup-list.js +50 -0
  634. package/lib/extensions/amplify-helpers/get-userpoolgroup-list.js.map +1 -0
  635. package/lib/extensions/amplify-helpers/get-when-function.d.ts +2 -0
  636. package/lib/extensions/amplify-helpers/get-when-function.d.ts.map +1 -0
  637. package/lib/extensions/amplify-helpers/get-when-function.js +62 -0
  638. package/lib/extensions/amplify-helpers/get-when-function.js.map +1 -0
  639. package/lib/extensions/amplify-helpers/git-manager.d.ts +2 -0
  640. package/lib/extensions/amplify-helpers/git-manager.d.ts.map +1 -0
  641. package/lib/extensions/amplify-helpers/git-manager.js +103 -0
  642. package/lib/extensions/amplify-helpers/git-manager.js.map +1 -0
  643. package/lib/extensions/amplify-helpers/hash-dir.d.ts +2 -0
  644. package/lib/extensions/amplify-helpers/hash-dir.d.ts.map +1 -0
  645. package/lib/extensions/amplify-helpers/hash-dir.js +11 -0
  646. package/lib/extensions/amplify-helpers/hash-dir.js.map +1 -0
  647. package/lib/extensions/amplify-helpers/input-validation.d.ts +2 -0
  648. package/lib/extensions/amplify-helpers/input-validation.d.ts.map +1 -0
  649. package/lib/extensions/amplify-helpers/input-validation.js +30 -0
  650. package/lib/extensions/amplify-helpers/input-validation.js.map +1 -0
  651. package/lib/extensions/amplify-helpers/invoke-delete-env-params.d.ts +3 -0
  652. package/lib/extensions/amplify-helpers/invoke-delete-env-params.d.ts.map +1 -0
  653. package/lib/extensions/amplify-helpers/invoke-delete-env-params.js +13 -0
  654. package/lib/extensions/amplify-helpers/invoke-delete-env-params.js.map +1 -0
  655. package/lib/extensions/amplify-helpers/invoke-plugin-method.d.ts +3 -0
  656. package/lib/extensions/amplify-helpers/invoke-plugin-method.d.ts.map +1 -0
  657. package/lib/extensions/amplify-helpers/invoke-plugin-method.js +56 -0
  658. package/lib/extensions/amplify-helpers/invoke-plugin-method.js.map +1 -0
  659. package/lib/extensions/amplify-helpers/leave-breadcrumbs.d.ts +2 -0
  660. package/lib/extensions/amplify-helpers/leave-breadcrumbs.d.ts.map +1 -0
  661. package/lib/extensions/amplify-helpers/leave-breadcrumbs.js +44 -0
  662. package/lib/extensions/amplify-helpers/leave-breadcrumbs.js.map +1 -0
  663. package/lib/extensions/amplify-helpers/list-categories.d.ts +2 -0
  664. package/lib/extensions/amplify-helpers/list-categories.d.ts.map +1 -0
  665. package/lib/extensions/amplify-helpers/list-categories.js +8 -0
  666. package/lib/extensions/amplify-helpers/list-categories.js.map +1 -0
  667. package/lib/extensions/amplify-helpers/load-runtime-plugin.d.ts +3 -0
  668. package/lib/extensions/amplify-helpers/load-runtime-plugin.d.ts.map +1 -0
  669. package/lib/extensions/amplify-helpers/load-runtime-plugin.js +53 -0
  670. package/lib/extensions/amplify-helpers/load-runtime-plugin.js.map +1 -0
  671. package/lib/extensions/amplify-helpers/make-id.d.ts +2 -0
  672. package/lib/extensions/amplify-helpers/make-id.d.ts.map +1 -0
  673. package/lib/extensions/amplify-helpers/make-id.js +12 -0
  674. package/lib/extensions/amplify-helpers/make-id.js.map +1 -0
  675. package/lib/extensions/amplify-helpers/on-category-outputs-change.d.ts +3 -0
  676. package/lib/extensions/amplify-helpers/on-category-outputs-change.d.ts.map +1 -0
  677. package/lib/extensions/amplify-helpers/on-category-outputs-change.js +123 -0
  678. package/lib/extensions/amplify-helpers/on-category-outputs-change.js.map +1 -0
  679. package/lib/extensions/amplify-helpers/open-editor.d.ts +3 -0
  680. package/lib/extensions/amplify-helpers/open-editor.d.ts.map +1 -0
  681. package/lib/extensions/amplify-helpers/open-editor.js +111 -0
  682. package/lib/extensions/amplify-helpers/open-editor.js.map +1 -0
  683. package/lib/extensions/amplify-helpers/path-manager.d.ts +17 -0
  684. package/lib/extensions/amplify-helpers/path-manager.d.ts.map +1 -0
  685. package/lib/extensions/amplify-helpers/path-manager.js +116 -0
  686. package/lib/extensions/amplify-helpers/path-manager.js.map +1 -0
  687. package/lib/extensions/amplify-helpers/permission-flow.d.ts +2 -0
  688. package/lib/extensions/amplify-helpers/permission-flow.d.ts.map +1 -0
  689. package/lib/extensions/amplify-helpers/permission-flow.js +62 -0
  690. package/lib/extensions/amplify-helpers/permission-flow.js.map +1 -0
  691. package/lib/extensions/amplify-helpers/press-enter-to-continue.d.ts +2 -0
  692. package/lib/extensions/amplify-helpers/press-enter-to-continue.d.ts.map +1 -0
  693. package/lib/extensions/amplify-helpers/press-enter-to-continue.js +15 -0
  694. package/lib/extensions/amplify-helpers/press-enter-to-continue.js.map +1 -0
  695. package/lib/extensions/amplify-helpers/print.d.ts +16 -0
  696. package/lib/extensions/amplify-helpers/print.d.ts.map +1 -0
  697. package/lib/extensions/amplify-helpers/print.js +115 -0
  698. package/lib/extensions/amplify-helpers/print.js.map +1 -0
  699. package/lib/extensions/amplify-helpers/project-name-validation.d.ts +5 -0
  700. package/lib/extensions/amplify-helpers/project-name-validation.d.ts.map +1 -0
  701. package/lib/extensions/amplify-helpers/project-name-validation.js +27 -0
  702. package/lib/extensions/amplify-helpers/project-name-validation.js.map +1 -0
  703. package/lib/extensions/amplify-helpers/push-resources.d.ts +6 -0
  704. package/lib/extensions/amplify-helpers/push-resources.d.ts.map +1 -0
  705. package/lib/extensions/amplify-helpers/push-resources.js +149 -0
  706. package/lib/extensions/amplify-helpers/push-resources.js.map +1 -0
  707. package/lib/extensions/amplify-helpers/read-breadcrumbs.d.ts +2 -0
  708. package/lib/extensions/amplify-helpers/read-breadcrumbs.d.ts.map +1 -0
  709. package/lib/extensions/amplify-helpers/read-breadcrumbs.js +57 -0
  710. package/lib/extensions/amplify-helpers/read-breadcrumbs.js.map +1 -0
  711. package/lib/extensions/amplify-helpers/read-json-file.d.ts +3 -0
  712. package/lib/extensions/amplify-helpers/read-json-file.d.ts.map +1 -0
  713. package/lib/extensions/amplify-helpers/read-json-file.js +10 -0
  714. package/lib/extensions/amplify-helpers/read-json-file.js.map +1 -0
  715. package/lib/extensions/amplify-helpers/remove-env-from-cloud.d.ts +2 -0
  716. package/lib/extensions/amplify-helpers/remove-env-from-cloud.d.ts.map +1 -0
  717. package/lib/extensions/amplify-helpers/remove-env-from-cloud.js +71 -0
  718. package/lib/extensions/amplify-helpers/remove-env-from-cloud.js.map +1 -0
  719. package/lib/extensions/amplify-helpers/remove-pinpoint-policy.d.ts +2 -0
  720. package/lib/extensions/amplify-helpers/remove-pinpoint-policy.d.ts.map +1 -0
  721. package/lib/extensions/amplify-helpers/remove-pinpoint-policy.js +60 -0
  722. package/lib/extensions/amplify-helpers/remove-pinpoint-policy.js.map +1 -0
  723. package/lib/extensions/amplify-helpers/remove-resource.d.ts +15 -0
  724. package/lib/extensions/amplify-helpers/remove-resource.d.ts.map +1 -0
  725. package/lib/extensions/amplify-helpers/remove-resource.js +113 -0
  726. package/lib/extensions/amplify-helpers/remove-resource.js.map +1 -0
  727. package/lib/extensions/amplify-helpers/resource-status-data.d.ts +40 -0
  728. package/lib/extensions/amplify-helpers/resource-status-data.d.ts.map +1 -0
  729. package/lib/extensions/amplify-helpers/resource-status-data.js +467 -0
  730. package/lib/extensions/amplify-helpers/resource-status-data.js.map +1 -0
  731. package/lib/extensions/amplify-helpers/resource-status-diff.d.ts +64 -0
  732. package/lib/extensions/amplify-helpers/resource-status-diff.d.ts.map +1 -0
  733. package/lib/extensions/amplify-helpers/resource-status-diff.js +210 -0
  734. package/lib/extensions/amplify-helpers/resource-status-diff.js.map +1 -0
  735. package/lib/extensions/amplify-helpers/resource-status-view.d.ts +8 -0
  736. package/lib/extensions/amplify-helpers/resource-status-view.d.ts.map +1 -0
  737. package/lib/extensions/amplify-helpers/resource-status-view.js +70 -0
  738. package/lib/extensions/amplify-helpers/resource-status-view.js.map +1 -0
  739. package/lib/extensions/amplify-helpers/resource-status.d.ts +6 -0
  740. package/lib/extensions/amplify-helpers/resource-status.d.ts.map +1 -0
  741. package/lib/extensions/amplify-helpers/resource-status.js +43 -0
  742. package/lib/extensions/amplify-helpers/resource-status.js.map +1 -0
  743. package/lib/extensions/amplify-helpers/root-stack-status.d.ts +3 -0
  744. package/lib/extensions/amplify-helpers/root-stack-status.d.ts.map +1 -0
  745. package/lib/extensions/amplify-helpers/root-stack-status.js +74 -0
  746. package/lib/extensions/amplify-helpers/root-stack-status.js.map +1 -0
  747. package/lib/extensions/amplify-helpers/service-select-prompt.d.ts +3 -0
  748. package/lib/extensions/amplify-helpers/service-select-prompt.d.ts.map +1 -0
  749. package/lib/extensions/amplify-helpers/service-select-prompt.js +103 -0
  750. package/lib/extensions/amplify-helpers/service-select-prompt.js.map +1 -0
  751. package/lib/extensions/amplify-helpers/shared-questions.d.ts +10 -0
  752. package/lib/extensions/amplify-helpers/shared-questions.d.ts.map +1 -0
  753. package/lib/extensions/amplify-helpers/shared-questions.js +13 -0
  754. package/lib/extensions/amplify-helpers/shared-questions.js.map +1 -0
  755. package/lib/extensions/amplify-helpers/show-all-help.d.ts +2 -0
  756. package/lib/extensions/amplify-helpers/show-all-help.d.ts.map +1 -0
  757. package/lib/extensions/amplify-helpers/show-all-help.js +102 -0
  758. package/lib/extensions/amplify-helpers/show-all-help.js.map +1 -0
  759. package/lib/extensions/amplify-helpers/show-help.d.ts +2 -0
  760. package/lib/extensions/amplify-helpers/show-help.d.ts.map +1 -0
  761. package/lib/extensions/amplify-helpers/show-help.js +15 -0
  762. package/lib/extensions/amplify-helpers/show-help.js.map +1 -0
  763. package/lib/extensions/amplify-helpers/show-helpful-provider-links.d.ts +3 -0
  764. package/lib/extensions/amplify-helpers/show-helpful-provider-links.d.ts.map +1 -0
  765. package/lib/extensions/amplify-helpers/show-helpful-provider-links.js +51 -0
  766. package/lib/extensions/amplify-helpers/show-helpful-provider-links.js.map +1 -0
  767. package/lib/extensions/amplify-helpers/trigger-flow.d.ts +20 -0
  768. package/lib/extensions/amplify-helpers/trigger-flow.d.ts.map +1 -0
  769. package/lib/extensions/amplify-helpers/trigger-flow.js +416 -0
  770. package/lib/extensions/amplify-helpers/trigger-flow.js.map +1 -0
  771. package/lib/extensions/amplify-helpers/update-amplify-meta.d.ts +21 -0
  772. package/lib/extensions/amplify-helpers/update-amplify-meta.d.ts.map +1 -0
  773. package/lib/extensions/amplify-helpers/update-amplify-meta.js +252 -0
  774. package/lib/extensions/amplify-helpers/update-amplify-meta.js.map +1 -0
  775. package/lib/extensions/amplify-helpers/update-backend-config.d.ts +5 -0
  776. package/lib/extensions/amplify-helpers/update-backend-config.d.ts.map +1 -0
  777. package/lib/extensions/amplify-helpers/update-backend-config.js +43 -0
  778. package/lib/extensions/amplify-helpers/update-backend-config.js.map +1 -0
  779. package/lib/extensions/amplify-helpers/update-project-config.d.ts +3 -0
  780. package/lib/extensions/amplify-helpers/update-project-config.d.ts.map +1 -0
  781. package/lib/extensions/amplify-helpers/update-project-config.js +13 -0
  782. package/lib/extensions/amplify-helpers/update-project-config.js.map +1 -0
  783. package/lib/extensions/amplify-helpers/update-tracked-files.d.ts +3 -0
  784. package/lib/extensions/amplify-helpers/update-tracked-files.d.ts.map +1 -0
  785. package/lib/extensions/amplify-helpers/update-tracked-files.js +87 -0
  786. package/lib/extensions/amplify-helpers/update-tracked-files.js.map +1 -0
  787. package/lib/extensions/amplify-helpers/write-object-as-json.d.ts +2 -0
  788. package/lib/extensions/amplify-helpers/write-object-as-json.d.ts.map +1 -0
  789. package/lib/extensions/amplify-helpers/write-object-as-json.js +10 -0
  790. package/lib/extensions/amplify-helpers/write-object-as-json.js.map +1 -0
  791. package/lib/global-prefix.d.ts +2 -0
  792. package/lib/global-prefix.d.ts.map +1 -0
  793. package/lib/global-prefix.js +141 -0
  794. package/lib/global-prefix.js.map +1 -0
  795. package/lib/index.d.ts +7 -0
  796. package/lib/index.d.ts.map +1 -0
  797. package/lib/index.js +207 -0
  798. package/lib/index.js.map +1 -0
  799. package/lib/init-steps/postInitSetup.d.ts +3 -0
  800. package/lib/init-steps/postInitSetup.d.ts.map +1 -0
  801. package/lib/init-steps/postInitSetup.js +85 -0
  802. package/lib/init-steps/postInitSetup.js.map +1 -0
  803. package/lib/init-steps/preInitSetup.d.ts +5 -0
  804. package/lib/init-steps/preInitSetup.d.ts.map +1 -0
  805. package/lib/init-steps/preInitSetup.js +153 -0
  806. package/lib/init-steps/preInitSetup.js.map +1 -0
  807. package/lib/init-steps/s0-analyzeProject.d.ts +6 -0
  808. package/lib/init-steps/s0-analyzeProject.d.ts.map +1 -0
  809. package/lib/init-steps/s0-analyzeProject.js +308 -0
  810. package/lib/init-steps/s0-analyzeProject.js.map +1 -0
  811. package/lib/init-steps/s1-initFrontend.d.ts +4 -0
  812. package/lib/init-steps/s1-initFrontend.d.ts.map +1 -0
  813. package/lib/init-steps/s1-initFrontend.js +92 -0
  814. package/lib/init-steps/s1-initFrontend.js.map +1 -0
  815. package/lib/init-steps/s2-initProviders.d.ts +2 -0
  816. package/lib/init-steps/s2-initProviders.d.ts.map +1 -0
  817. package/lib/init-steps/s2-initProviders.js +95 -0
  818. package/lib/init-steps/s2-initProviders.js.map +1 -0
  819. package/lib/init-steps/s8-scaffoldHeadless.d.ts +3 -0
  820. package/lib/init-steps/s8-scaffoldHeadless.d.ts.map +1 -0
  821. package/lib/init-steps/s8-scaffoldHeadless.js +68 -0
  822. package/lib/init-steps/s8-scaffoldHeadless.js.map +1 -0
  823. package/lib/init-steps/s9-onFailure.d.ts +2 -0
  824. package/lib/init-steps/s9-onFailure.d.ts.map +1 -0
  825. package/lib/init-steps/s9-onFailure.js +45 -0
  826. package/lib/init-steps/s9-onFailure.js.map +1 -0
  827. package/lib/init-steps/s9-onSuccess.d.ts +6 -0
  828. package/lib/init-steps/s9-onSuccess.d.ts.map +1 -0
  829. package/lib/init-steps/s9-onSuccess.js +216 -0
  830. package/lib/init-steps/s9-onSuccess.js.map +1 -0
  831. package/lib/initialize-env.d.ts +3 -0
  832. package/lib/initialize-env.d.ts.map +1 -0
  833. package/lib/initialize-env.js +170 -0
  834. package/lib/initialize-env.js.map +1 -0
  835. package/lib/input-manager.d.ts +6 -0
  836. package/lib/input-manager.d.ts.map +1 -0
  837. package/lib/input-manager.js +253 -0
  838. package/lib/input-manager.js.map +1 -0
  839. package/lib/input-params-manager.d.ts +5 -0
  840. package/lib/input-params-manager.d.ts.map +1 -0
  841. package/lib/input-params-manager.js +77 -0
  842. package/lib/input-params-manager.js.map +1 -0
  843. package/lib/migrate-project.d.ts +3 -0
  844. package/lib/migrate-project.d.ts.map +1 -0
  845. package/lib/migrate-project.js +258 -0
  846. package/lib/migrate-project.js.map +1 -0
  847. package/lib/plugin-helpers/access-plugins-file.d.ts +4 -0
  848. package/lib/plugin-helpers/access-plugins-file.d.ts.map +1 -0
  849. package/lib/plugin-helpers/access-plugins-file.js +66 -0
  850. package/lib/plugin-helpers/access-plugins-file.js.map +1 -0
  851. package/lib/plugin-helpers/compare-plugins.d.ts +3 -0
  852. package/lib/plugin-helpers/compare-plugins.d.ts.map +1 -0
  853. package/lib/plugin-helpers/compare-plugins.js +13 -0
  854. package/lib/plugin-helpers/compare-plugins.js.map +1 -0
  855. package/lib/plugin-helpers/create-new-plugin.d.ts +3 -0
  856. package/lib/plugin-helpers/create-new-plugin.d.ts.map +1 -0
  857. package/lib/plugin-helpers/create-new-plugin.js +234 -0
  858. package/lib/plugin-helpers/create-new-plugin.js.map +1 -0
  859. package/lib/plugin-helpers/display-plugin-platform.d.ts +15 -0
  860. package/lib/plugin-helpers/display-plugin-platform.d.ts.map +1 -0
  861. package/lib/plugin-helpers/display-plugin-platform.js +102 -0
  862. package/lib/plugin-helpers/display-plugin-platform.js.map +1 -0
  863. package/lib/plugin-helpers/platform-health-check.d.ts +12 -0
  864. package/lib/plugin-helpers/platform-health-check.d.ts.map +1 -0
  865. package/lib/plugin-helpers/platform-health-check.js +138 -0
  866. package/lib/plugin-helpers/platform-health-check.js.map +1 -0
  867. package/lib/plugin-helpers/scan-plugin-platform.d.ts +7 -0
  868. package/lib/plugin-helpers/scan-plugin-platform.d.ts.map +1 -0
  869. package/lib/plugin-helpers/scan-plugin-platform.js +188 -0
  870. package/lib/plugin-helpers/scan-plugin-platform.js.map +1 -0
  871. package/lib/plugin-helpers/verify-plugin.d.ts +8 -0
  872. package/lib/plugin-helpers/verify-plugin.d.ts.map +1 -0
  873. package/lib/plugin-helpers/verify-plugin.js +125 -0
  874. package/lib/plugin-helpers/verify-plugin.js.map +1 -0
  875. package/lib/plugin-manager.d.ts +18 -0
  876. package/lib/plugin-manager.d.ts.map +1 -0
  877. package/lib/plugin-manager.js +252 -0
  878. package/lib/plugin-manager.js.map +1 -0
  879. package/lib/pre-deployment-pull.d.ts +3 -0
  880. package/lib/pre-deployment-pull.d.ts.map +1 -0
  881. package/lib/pre-deployment-pull.js +82 -0
  882. package/lib/pre-deployment-pull.js.map +1 -0
  883. package/lib/project-config-version-check.d.ts +3 -0
  884. package/lib/project-config-version-check.d.ts.map +1 -0
  885. package/lib/project-config-version-check.js +153 -0
  886. package/lib/project-config-version-check.js.map +1 -0
  887. package/lib/pull-backend.d.ts +3 -0
  888. package/lib/pull-backend.d.ts.map +1 -0
  889. package/lib/pull-backend.js +45 -0
  890. package/lib/pull-backend.js.map +1 -0
  891. package/lib/rewireDeprecatedCommands.d.ts +3 -0
  892. package/lib/rewireDeprecatedCommands.d.ts.map +1 -0
  893. package/lib/rewireDeprecatedCommands.js +19 -0
  894. package/lib/rewireDeprecatedCommands.js.map +1 -0
  895. package/lib/utils/global-prefix.d.ts +2 -0
  896. package/lib/utils/global-prefix.d.ts.map +1 -0
  897. package/lib/utils/global-prefix.js +109 -0
  898. package/lib/utils/global-prefix.js.map +1 -0
  899. package/lib/utils/headless-input-utils.d.ts +5 -0
  900. package/lib/utils/headless-input-utils.d.ts.map +1 -0
  901. package/lib/utils/headless-input-utils.js +37 -0
  902. package/lib/utils/headless-input-utils.js.map +1 -0
  903. package/lib/utils/is-child-path.d.ts +2 -0
  904. package/lib/utils/is-child-path.d.ts.map +1 -0
  905. package/lib/utils/is-child-path.js +46 -0
  906. package/lib/utils/is-child-path.js.map +1 -0
  907. package/lib/utils/mobilehub-support.d.ts +3 -0
  908. package/lib/utils/mobilehub-support.d.ts.map +1 -0
  909. package/lib/utils/mobilehub-support.js +45 -0
  910. package/lib/utils/mobilehub-support.js.map +1 -0
  911. package/lib/utils/post-install-initialization.d.ts +2 -0
  912. package/lib/utils/post-install-initialization.d.ts.map +1 -0
  913. package/lib/utils/post-install-initialization.js +75 -0
  914. package/lib/utils/post-install-initialization.js.map +1 -0
  915. package/lib/utils/set-ops.d.ts +4 -0
  916. package/lib/utils/set-ops.d.ts.map +1 -0
  917. package/lib/utils/set-ops.js +44 -0
  918. package/lib/utils/set-ops.js.map +1 -0
  919. package/lib/utils/team-provider-migrate.d.ts +3 -0
  920. package/lib/utils/team-provider-migrate.d.ts.map +1 -0
  921. package/lib/utils/team-provider-migrate.js +76 -0
  922. package/lib/utils/team-provider-migrate.js.map +1 -0
  923. package/lib/utils/verify-expected-env-params.d.ts +3 -0
  924. package/lib/utils/verify-expected-env-params.d.ts.map +1 -0
  925. package/lib/utils/verify-expected-env-params.js +51 -0
  926. package/lib/utils/verify-expected-env-params.js.map +1 -0
  927. package/lib/utils/win-constants.d.ts +4 -0
  928. package/lib/utils/win-constants.d.ts.map +1 -0
  929. package/lib/utils/win-constants.js +43 -0
  930. package/lib/utils/win-constants.js.map +1 -0
  931. package/lib/utils/win-utils.d.ts +3 -0
  932. package/lib/utils/win-utils.d.ts.map +1 -0
  933. package/lib/utils/win-utils.js +113 -0
  934. package/lib/utils/win-utils.js.map +1 -0
  935. package/lib/version-notifier.d.ts +3 -0
  936. package/lib/version-notifier.d.ts.map +1 -0
  937. package/lib/version-notifier.js +21 -0
  938. package/lib/version-notifier.js.map +1 -0
  939. package/package.json +293 -0
  940. package/readme.md +4 -0
  941. package/resources/sample-hooks/hooks-readme.md +7 -0
  942. package/resources/sample-hooks/post-push.sh.sample +24 -0
  943. package/resources/sample-hooks/pre-push.js.sample +27 -0
  944. package/sample-headless-scripts/headless_add_external_env.sh +30 -0
  945. package/sample-headless-scripts/headless_configure_project.sh +35 -0
  946. package/sample-headless-scripts/headless_init_env.sh +47 -0
  947. package/sample-headless-scripts/headless_init_env_auth.sh +30 -0
  948. package/sample-headless-scripts/headless_init_new_project.sh +34 -0
  949. package/sample-headless-scripts/headless_publish.sh +15 -0
  950. package/sample-headless-scripts/headless_push.sh +15 -0
  951. package/scripts/post-install.js +34 -0
  952. package/templates/amplify-skeleton/.config/project-config__android.json +11 -0
  953. package/templates/amplify-skeleton/.config/project-config__flutter.json +11 -0
  954. package/templates/amplify-skeleton/.config/project-config__ios.json +6 -0
  955. package/templates/amplify-skeleton/.config/project-config__javascript.json +15 -0
  956. package/templates/amplify-skeleton/backend/api/amplifyDatasource/parameters.json +5 -0
  957. package/templates/amplify-skeleton/backend/api/amplifyDatasource/schema.graphql +10 -0
  958. package/templates/amplify-skeleton/backend/api/amplifyDatasource/stacks/CustomResources.json +58 -0
  959. package/templates/amplify-skeleton/backend/api/amplifyDatasource/transform.conf.json +9 -0
  960. package/templates/amplify-skeleton/backend/backend-config.json +20 -0
  961. package/templates/plugin-template/amplify-plugin.json +6 -0
  962. package/templates/plugin-template/commands/help.js +8 -0
  963. package/templates/plugin-template/commands/version.js +8 -0
  964. package/templates/plugin-template/event-handlers/handle-PostInit.js +10 -0
  965. package/templates/plugin-template/event-handlers/handle-PostPush.js +10 -0
  966. package/templates/plugin-template/event-handlers/handle-PreInit.js +10 -0
  967. package/templates/plugin-template/event-handlers/handle-PrePush.js +10 -0
  968. package/templates/plugin-template/index.js +20 -0
  969. package/templates/plugin-template/package.json +11 -0
  970. package/templates/plugin-template-frontend/amplify-plugin.json +6 -0
  971. package/templates/plugin-template-frontend/commands/help.js +8 -0
  972. package/templates/plugin-template-frontend/commands/version.js +8 -0
  973. package/templates/plugin-template-frontend/event-handlers/handle-PostInit.js +10 -0
  974. package/templates/plugin-template-frontend/event-handlers/handle-PostPush.js +10 -0
  975. package/templates/plugin-template-frontend/event-handlers/handle-PreInit.js +10 -0
  976. package/templates/plugin-template-frontend/event-handlers/handle-PrePush.js +10 -0
  977. package/templates/plugin-template-frontend/index.js +62 -0
  978. package/templates/plugin-template-frontend/package.json +11 -0
  979. package/templates/plugin-template-provider/amplify-plugin.json +6 -0
  980. package/templates/plugin-template-provider/commands/help.js +8 -0
  981. package/templates/plugin-template-provider/commands/version.js +8 -0
  982. package/templates/plugin-template-provider/event-handlers/handle-PostInit.js +10 -0
  983. package/templates/plugin-template-provider/event-handlers/handle-PostPush.js +10 -0
  984. package/templates/plugin-template-provider/event-handlers/handle-PreInit.js +10 -0
  985. package/templates/plugin-template-provider/event-handlers/handle-PrePush.js +10 -0
  986. package/templates/plugin-template-provider/index.js +50 -0
  987. 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
+ {"version":3,"file":"platform-health-check.js","sourceRoot":"","sources":["../../src/plugin-helpers/platform-health-check.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,kDAiEC;AAeD,gDAwBC;AA5HD,2CAA6B;AAC7B,kDAA0B;AAC1B,oEAAkG;AAClG,mCAAmC;AAYnC,MAAM,MAAM,GAAG,MAAM,CAAC;AAKf,KAAK,UAAU,mBAAmB,CAAC,cAA8B;IACtE,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,CAAC;IAC7C,MAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;IAC7C,MAAM,sBAAsB,GAA6B,EAAE,CAAC;IAC5D,MAAM,yBAAyB,GAA6B,EAAE,CAAC;IAE/D,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,UAAkB,EAAE,EAAE;QAC1D,IAAI,aAAa,GAA6B,EAAE,CAAC;QACjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;YAChD,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAsB,CAAC,CAAC;QACvE,CAAC;aAAM,CAAC;YACN,aAAa,GAAG,eAAe,CAAC,UAAU,CAA6B,CAAC;QAC1E,CAAC;QAED,IAAI,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9B,MAAM,WAAW,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;YAE9C,aAAa,CAAC,OAAO,CAAC,CAAC,cAAiC,EAAE,EAAE;gBAC1D,IAAI,UAAU,GAAG,CAAC,CAAC;gBACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW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,SAAgB,kBAAkB;IAChC,MAAM,mBAAmB,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,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,GAAG,CACtE,CAAC,aAAa,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,MAAM,YAAY,CAA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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,CA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AK,UAAU,mBAAmB,CAAC,OAA4B;;IAC7D,IAAI,UAAU,GAAG,IAAI,CAAC;IACtB,IAAI,OAAO,CAAC,QAAS,CAAC,aAAa,IAAI,OAAO,CAAC,QAAS,CAAC,aAAa,CAAC,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,MAAM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