@aws-amplify/cli-internal-gen2-migration-experimental-alpha 0.1.0 → 0.3.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 (281) hide show
  1. package/aws-amplify-cli-internal-gen2-migration-experimental-alpha-0.3.0.tgz +0 -0
  2. package/lib/commands/drift-detection/detect-local-drift.d.ts +3 -6
  3. package/lib/commands/drift-detection/detect-local-drift.d.ts.map +1 -1
  4. package/lib/commands/drift-detection/detect-local-drift.js +4 -8
  5. package/lib/commands/drift-detection/detect-local-drift.js.map +1 -1
  6. package/lib/commands/drift-detection/detect-stack-drift.d.ts +3 -2
  7. package/lib/commands/drift-detection/detect-stack-drift.d.ts.map +1 -1
  8. package/lib/commands/drift-detection/detect-stack-drift.js +12 -0
  9. package/lib/commands/drift-detection/detect-stack-drift.js.map +1 -1
  10. package/lib/commands/drift-detection/detect-template-drift.d.ts +4 -5
  11. package/lib/commands/drift-detection/detect-template-drift.d.ts.map +1 -1
  12. package/lib/commands/drift-detection/detect-template-drift.js +122 -94
  13. package/lib/commands/drift-detection/detect-template-drift.js.map +1 -1
  14. package/lib/commands/drift-detection/index.d.ts +3 -2
  15. package/lib/commands/drift-detection/index.d.ts.map +1 -1
  16. package/lib/commands/drift-detection/index.js +3 -1
  17. package/lib/commands/drift-detection/index.js.map +1 -1
  18. package/lib/commands/drift-detection/services/cloudformation-service.d.ts.map +1 -1
  19. package/lib/commands/drift-detection/services/cloudformation-service.js +3 -5
  20. package/lib/commands/drift-detection/services/cloudformation-service.js.map +1 -1
  21. package/lib/commands/drift-detection/services/drift-formatter.d.ts +4 -5
  22. package/lib/commands/drift-detection/services/drift-formatter.d.ts.map +1 -1
  23. package/lib/commands/drift-detection/services/drift-formatter.js +15 -38
  24. package/lib/commands/drift-detection/services/drift-formatter.js.map +1 -1
  25. package/lib/commands/drift.d.ts +0 -2
  26. package/lib/commands/drift.d.ts.map +1 -1
  27. package/lib/commands/drift.js +47 -57
  28. package/lib/commands/drift.js.map +1 -1
  29. package/lib/commands/gen2-migration/_step.d.ts +2 -1
  30. package/lib/commands/gen2-migration/_step.d.ts.map +1 -1
  31. package/lib/commands/gen2-migration/_step.js +2 -1
  32. package/lib/commands/gen2-migration/_step.js.map +1 -1
  33. package/lib/commands/gen2-migration/generate/adapters/auth/index.d.ts +24 -0
  34. package/lib/commands/gen2-migration/generate/adapters/auth/index.d.ts.map +1 -0
  35. package/lib/commands/gen2-migration/generate/adapters/auth/index.js +297 -0
  36. package/lib/commands/gen2-migration/generate/adapters/auth/index.js.map +1 -0
  37. package/lib/commands/gen2-migration/generate/adapters/auth/index.test.d.ts +2 -0
  38. package/lib/commands/gen2-migration/generate/adapters/auth/index.test.d.ts.map +1 -0
  39. package/lib/commands/gen2-migration/generate/adapters/auth/index.test.js +140 -0
  40. package/lib/commands/gen2-migration/generate/adapters/auth/index.test.js.map +1 -0
  41. package/lib/commands/gen2-migration/generate/adapters/data/index.d.ts +5 -0
  42. package/lib/commands/gen2-migration/generate/adapters/data/index.d.ts.map +1 -0
  43. package/lib/commands/gen2-migration/generate/adapters/data/index.js +17 -0
  44. package/lib/commands/gen2-migration/generate/adapters/data/index.js.map +1 -0
  45. package/lib/commands/gen2-migration/generate/adapters/functions/index.d.ts +17 -0
  46. package/lib/commands/gen2-migration/generate/adapters/functions/index.d.ts.map +1 -0
  47. package/lib/commands/gen2-migration/generate/adapters/functions/index.js +46 -0
  48. package/lib/commands/gen2-migration/generate/adapters/functions/index.js.map +1 -0
  49. package/lib/commands/gen2-migration/generate/adapters/project/index.d.ts +2 -0
  50. package/lib/commands/gen2-migration/generate/adapters/project/index.d.ts.map +1 -0
  51. package/lib/commands/gen2-migration/generate/adapters/project/index.js +7 -0
  52. package/lib/commands/gen2-migration/generate/adapters/project/index.js.map +1 -0
  53. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.d.ts +30 -0
  54. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.d.ts.map +1 -0
  55. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.js +18 -0
  56. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.js.map +1 -0
  57. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.d.ts +2 -0
  58. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.d.ts.map +1 -0
  59. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.js +181 -0
  60. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.js.map +1 -0
  61. package/lib/commands/gen2-migration/generate/adapters/storage/index.d.ts +3 -0
  62. package/lib/commands/gen2-migration/generate/adapters/storage/index.d.ts.map +1 -0
  63. package/lib/commands/gen2-migration/generate/adapters/storage/index.js +6 -0
  64. package/lib/commands/gen2-migration/generate/adapters/storage/index.js.map +1 -0
  65. package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.d.ts +14 -0
  66. package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.d.ts.map +1 -0
  67. package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.js +27 -0
  68. package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.js.map +1 -0
  69. package/lib/commands/gen2-migration/generate/backend/synthesizer.d.ts +80 -0
  70. package/lib/commands/gen2-migration/generate/backend/synthesizer.d.ts.map +1 -0
  71. package/lib/commands/gen2-migration/generate/backend/synthesizer.js +899 -0
  72. package/lib/commands/gen2-migration/generate/backend/synthesizer.js.map +1 -0
  73. package/lib/commands/gen2-migration/generate/backend/synthesizer.test.d.ts +2 -0
  74. package/lib/commands/gen2-migration/generate/backend/synthesizer.test.d.ts.map +1 -0
  75. package/lib/commands/gen2-migration/generate/backend/synthesizer.test.js +744 -0
  76. package/lib/commands/gen2-migration/generate/backend/synthesizer.test.js.map +1 -0
  77. package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.d.ts +14 -0
  78. package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.d.ts.map +1 -0
  79. package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.js +82 -0
  80. package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.js.map +1 -0
  81. package/lib/commands/gen2-migration/generate/codegen-head/analytics.d.ts +10 -0
  82. package/lib/commands/gen2-migration/generate/codegen-head/analytics.d.ts.map +1 -0
  83. package/lib/commands/gen2-migration/generate/codegen-head/analytics.js +11 -0
  84. package/lib/commands/gen2-migration/generate/codegen-head/analytics.js.map +1 -0
  85. package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.d.ts +13 -0
  86. package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.d.ts.map +1 -0
  87. package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.js +22 -0
  88. package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.js.map +1 -0
  89. package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.d.ts +24 -0
  90. package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.d.ts.map +1 -0
  91. package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.js +167 -0
  92. package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.js.map +1 -0
  93. package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.d.ts +19 -0
  94. package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.d.ts.map +1 -0
  95. package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.js +133 -0
  96. package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.js.map +1 -0
  97. package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.d.ts +23 -0
  98. package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.d.ts.map +1 -0
  99. package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.js +172 -0
  100. package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.js.map +1 -0
  101. package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.d.ts +10 -0
  102. package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.d.ts.map +1 -0
  103. package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.js +48 -0
  104. package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.js.map +1 -0
  105. package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.d.ts +11 -0
  106. package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.d.ts.map +1 -0
  107. package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.js +38 -0
  108. package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.js.map +1 -0
  109. package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.d.ts +13 -0
  110. package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.d.ts.map +1 -0
  111. package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.js +462 -0
  112. package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.js.map +1 -0
  113. package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.d.ts +47 -0
  114. package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.d.ts.map +1 -0
  115. package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.js +222 -0
  116. package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.js.map +1 -0
  117. package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.d.ts +2 -0
  118. package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.d.ts.map +1 -0
  119. package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.js +15 -0
  120. package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.js.map +1 -0
  121. package/lib/commands/gen2-migration/generate/codegen-head/format.d.ts +8 -0
  122. package/lib/commands/gen2-migration/generate/codegen-head/format.d.ts.map +1 -0
  123. package/lib/commands/gen2-migration/generate/codegen-head/format.js +66 -0
  124. package/lib/commands/gen2-migration/generate/codegen-head/format.js.map +1 -0
  125. package/lib/commands/gen2-migration/generate/codegen-head/logger.d.ts +15 -0
  126. package/lib/commands/gen2-migration/generate/codegen-head/logger.d.ts.map +1 -0
  127. package/lib/commands/gen2-migration/generate/codegen-head/logger.js +14 -0
  128. package/lib/commands/gen2-migration/generate/codegen-head/logger.js.map +1 -0
  129. package/lib/commands/gen2-migration/generate/codegen-head/printer.d.ts +26 -0
  130. package/lib/commands/gen2-migration/generate/codegen-head/printer.d.ts.map +1 -0
  131. package/lib/commands/gen2-migration/generate/codegen-head/printer.js +103 -0
  132. package/lib/commands/gen2-migration/generate/codegen-head/printer.js.map +1 -0
  133. package/lib/commands/gen2-migration/generate/core/migration-pipeline.d.ts +26 -0
  134. package/lib/commands/gen2-migration/generate/core/migration-pipeline.d.ts.map +1 -0
  135. package/lib/commands/gen2-migration/generate/core/migration-pipeline.js +233 -0
  136. package/lib/commands/gen2-migration/generate/core/migration-pipeline.js.map +1 -0
  137. package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.d.ts.map +1 -0
  138. package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.js.map +1 -0
  139. package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.d.ts.map +1 -0
  140. package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.js.map +1 -0
  141. package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.d.ts.map +1 -0
  142. package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.js.map +1 -0
  143. package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.d.ts.map +1 -0
  144. package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.js.map +1 -0
  145. package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.d.ts.map +1 -0
  146. package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.js.map +1 -0
  147. package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.d.ts.map +1 -0
  148. package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.js.map +1 -0
  149. package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.d.ts.map +1 -0
  150. package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.js.map +1 -0
  151. package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.d.ts.map +1 -0
  152. package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/transformer/amplify-helper-transformer.js +25 -3
  153. package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.js.map +1 -0
  154. package/lib/commands/gen2-migration/generate/custom-resources/types.d.ts.map +1 -0
  155. package/lib/commands/gen2-migration/generate/custom-resources/types.js.map +1 -0
  156. package/lib/commands/gen2-migration/generate/generators/analytics/index.d.ts +9 -0
  157. package/lib/commands/gen2-migration/generate/generators/analytics/index.d.ts.map +1 -0
  158. package/lib/commands/gen2-migration/generate/generators/analytics/index.js +40 -0
  159. package/lib/commands/gen2-migration/generate/generators/analytics/index.js.map +1 -0
  160. package/lib/commands/gen2-migration/generate/generators/auth/index.d.ts +106 -0
  161. package/lib/commands/gen2-migration/generate/generators/auth/index.d.ts.map +1 -0
  162. package/lib/commands/gen2-migration/generate/generators/auth/index.js +286 -0
  163. package/lib/commands/gen2-migration/generate/generators/auth/index.js.map +1 -0
  164. package/lib/commands/gen2-migration/generate/generators/auth/index.test.d.ts +2 -0
  165. package/lib/commands/gen2-migration/generate/generators/auth/index.test.d.ts.map +1 -0
  166. package/lib/commands/gen2-migration/generate/generators/auth/index.test.js +437 -0
  167. package/lib/commands/gen2-migration/generate/generators/auth/index.test.js.map +1 -0
  168. package/lib/commands/gen2-migration/generate/generators/data/index.d.ts +35 -0
  169. package/lib/commands/gen2-migration/generate/generators/data/index.d.ts.map +1 -0
  170. package/lib/commands/gen2-migration/generate/generators/data/index.js +199 -0
  171. package/lib/commands/gen2-migration/generate/generators/data/index.js.map +1 -0
  172. package/lib/commands/gen2-migration/generate/generators/data/index.test.d.ts +2 -0
  173. package/lib/commands/gen2-migration/generate/generators/data/index.test.d.ts.map +1 -0
  174. package/lib/commands/gen2-migration/generate/generators/data/index.test.js +50 -0
  175. package/lib/commands/gen2-migration/generate/generators/data/index.test.js.map +1 -0
  176. package/lib/commands/gen2-migration/generate/generators/functions/index.d.ts +17 -0
  177. package/lib/commands/gen2-migration/generate/generators/functions/index.d.ts.map +1 -0
  178. package/lib/commands/gen2-migration/generate/generators/functions/index.js +125 -0
  179. package/lib/commands/gen2-migration/generate/generators/functions/index.js.map +1 -0
  180. package/lib/commands/gen2-migration/generate/generators/functions/lambda.d.ts +6 -0
  181. package/lib/commands/gen2-migration/generate/generators/functions/lambda.d.ts.map +1 -0
  182. package/lib/commands/gen2-migration/generate/generators/functions/lambda.js +16 -0
  183. package/lib/commands/gen2-migration/generate/generators/functions/lambda.js.map +1 -0
  184. package/lib/commands/gen2-migration/generate/generators/storage/access.d.ts +4 -0
  185. package/lib/commands/gen2-migration/generate/generators/storage/access.d.ts.map +1 -0
  186. package/lib/commands/gen2-migration/generate/generators/storage/access.js +53 -0
  187. package/lib/commands/gen2-migration/generate/generators/storage/access.js.map +1 -0
  188. package/lib/commands/gen2-migration/generate/generators/storage/index.d.ts +31 -0
  189. package/lib/commands/gen2-migration/generate/generators/storage/index.d.ts.map +1 -0
  190. package/lib/commands/gen2-migration/generate/generators/storage/index.js +66 -0
  191. package/lib/commands/gen2-migration/generate/generators/storage/index.js.map +1 -0
  192. package/lib/commands/gen2-migration/generate/npm_package/renderer.d.ts +27 -0
  193. package/lib/commands/gen2-migration/generate/npm_package/renderer.d.ts.map +1 -0
  194. package/lib/commands/gen2-migration/generate/npm_package/renderer.js +28 -0
  195. package/lib/commands/gen2-migration/generate/npm_package/renderer.js.map +1 -0
  196. package/lib/commands/gen2-migration/generate/render_pipeline.d.ts +9 -0
  197. package/lib/commands/gen2-migration/generate/render_pipeline.d.ts.map +1 -0
  198. package/lib/commands/gen2-migration/generate/render_pipeline.js +15 -0
  199. package/lib/commands/gen2-migration/generate/render_pipeline.js.map +1 -0
  200. package/lib/commands/gen2-migration/generate/renderers/ensure_directory.d.ts +7 -0
  201. package/lib/commands/gen2-migration/generate/renderers/ensure_directory.d.ts.map +1 -0
  202. package/lib/commands/gen2-migration/generate/renderers/ensure_directory.js +17 -0
  203. package/lib/commands/gen2-migration/generate/renderers/ensure_directory.js.map +1 -0
  204. package/lib/commands/gen2-migration/generate/renderers/package_json.d.ts +8 -0
  205. package/lib/commands/gen2-migration/generate/renderers/package_json.d.ts.map +1 -0
  206. package/lib/commands/gen2-migration/generate/renderers/package_json.js +15 -0
  207. package/lib/commands/gen2-migration/generate/renderers/package_json.js.map +1 -0
  208. package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.d.ts +11 -0
  209. package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.d.ts.map +1 -0
  210. package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.js +22 -0
  211. package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.js.map +1 -0
  212. package/lib/commands/gen2-migration/generate/resource/resource.d.ts +20 -0
  213. package/lib/commands/gen2-migration/generate/resource/resource.d.ts.map +1 -0
  214. package/lib/commands/gen2-migration/generate/resource/resource.js +60 -0
  215. package/lib/commands/gen2-migration/generate/resource/resource.js.map +1 -0
  216. package/lib/commands/gen2-migration/generate/test_utils/import_regex.d.ts +2 -0
  217. package/lib/commands/gen2-migration/generate/test_utils/import_regex.d.ts.map +1 -0
  218. package/lib/commands/gen2-migration/generate/test_utils/import_regex.js +6 -0
  219. package/lib/commands/gen2-migration/generate/test_utils/import_regex.js.map +1 -0
  220. package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.d.ts +4 -0
  221. package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.d.ts.map +1 -0
  222. package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.js +22 -0
  223. package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.js.map +1 -0
  224. package/lib/commands/gen2-migration/generate/todo_error.d.ts +3 -0
  225. package/lib/commands/gen2-migration/generate/todo_error.d.ts.map +1 -0
  226. package/lib/commands/gen2-migration/generate/todo_error.js +11 -0
  227. package/lib/commands/gen2-migration/generate/todo_error.js.map +1 -0
  228. package/lib/commands/gen2-migration/generate/ts_factory_utils.d.ts +3 -0
  229. package/lib/commands/gen2-migration/generate/ts_factory_utils.d.ts.map +1 -0
  230. package/lib/commands/gen2-migration/generate/ts_factory_utils.js +10 -0
  231. package/lib/commands/gen2-migration/generate/ts_factory_utils.js.map +1 -0
  232. package/lib/commands/gen2-migration/generate/types.d.ts +4 -0
  233. package/lib/commands/gen2-migration/generate/types.d.ts.map +1 -0
  234. package/lib/commands/gen2-migration/generate/types.js +3 -0
  235. package/lib/commands/gen2-migration/generate/types.js.map +1 -0
  236. package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.d.ts +26 -0
  237. package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.d.ts.map +1 -0
  238. package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.js +152 -0
  239. package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.js.map +1 -0
  240. package/lib/commands/gen2-migration/generate.js +2 -2
  241. package/lib/commands/gen2-migration/generate.js.map +1 -1
  242. package/lib/commands/gen2-migration.d.ts.map +1 -1
  243. package/lib/commands/gen2-migration.js +2 -1
  244. package/lib/commands/gen2-migration.js.map +1 -1
  245. package/package.json +3 -2
  246. package/aws-amplify-cli-internal-gen2-migration-experimental-alpha-0.1.0.tgz +0 -0
  247. package/lib/commands/gen2-migration/codegen-custom-resources/generator/backend-updater.d.ts.map +0 -1
  248. package/lib/commands/gen2-migration/codegen-custom-resources/generator/backend-updater.js.map +0 -1
  249. package/lib/commands/gen2-migration/codegen-custom-resources/generator/dependency-merger.d.ts.map +0 -1
  250. package/lib/commands/gen2-migration/codegen-custom-resources/generator/dependency-merger.js.map +0 -1
  251. package/lib/commands/gen2-migration/codegen-custom-resources/generator/file-converter.d.ts.map +0 -1
  252. package/lib/commands/gen2-migration/codegen-custom-resources/generator/file-converter.js.map +0 -1
  253. package/lib/commands/gen2-migration/codegen-custom-resources/generator/gen2-file-generator.d.ts.map +0 -1
  254. package/lib/commands/gen2-migration/codegen-custom-resources/generator/gen2-file-generator.js.map +0 -1
  255. package/lib/commands/gen2-migration/codegen-custom-resources/parser/cdk-stack-parser.d.ts.map +0 -1
  256. package/lib/commands/gen2-migration/codegen-custom-resources/parser/cdk-stack-parser.js.map +0 -1
  257. package/lib/commands/gen2-migration/codegen-custom-resources/parser/pattern-detector.d.ts.map +0 -1
  258. package/lib/commands/gen2-migration/codegen-custom-resources/parser/pattern-detector.js.map +0 -1
  259. package/lib/commands/gen2-migration/codegen-custom-resources/scanner/custom-resource-scanner.d.ts.map +0 -1
  260. package/lib/commands/gen2-migration/codegen-custom-resources/scanner/custom-resource-scanner.js.map +0 -1
  261. package/lib/commands/gen2-migration/codegen-custom-resources/transformer/amplify-helper-transformer.d.ts.map +0 -1
  262. package/lib/commands/gen2-migration/codegen-custom-resources/transformer/amplify-helper-transformer.js.map +0 -1
  263. package/lib/commands/gen2-migration/codegen-custom-resources/types.d.ts.map +0 -1
  264. package/lib/commands/gen2-migration/codegen-custom-resources/types.js.map +0 -1
  265. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/generator/backend-updater.d.ts +0 -0
  266. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/generator/backend-updater.js +0 -0
  267. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/generator/dependency-merger.d.ts +0 -0
  268. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/generator/dependency-merger.js +0 -0
  269. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/generator/file-converter.d.ts +0 -0
  270. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/generator/file-converter.js +0 -0
  271. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/generator/gen2-file-generator.d.ts +0 -0
  272. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/generator/gen2-file-generator.js +0 -0
  273. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/parser/cdk-stack-parser.d.ts +0 -0
  274. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/parser/cdk-stack-parser.js +0 -0
  275. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/parser/pattern-detector.d.ts +0 -0
  276. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/parser/pattern-detector.js +0 -0
  277. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/scanner/custom-resource-scanner.d.ts +0 -0
  278. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/scanner/custom-resource-scanner.js +0 -0
  279. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/transformer/amplify-helper-transformer.d.ts +0 -0
  280. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/types.d.ts +0 -0
  281. /package/lib/commands/gen2-migration/{codegen-custom-resources → generate/custom-resources}/types.js +0 -0
@@ -0,0 +1,23 @@
1
+ import { getStorageDefinition } from '../adapters/storage/index';
2
+ import { BackendDownloader } from './backend_downloader';
3
+ import { StorageRenderParameters } from '../core/migration-pipeline';
4
+ import { S3Client } from '@aws-sdk/client-s3';
5
+ import { BackendEnvironmentResolver } from './backend_environment_selector';
6
+ import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
7
+ export interface AppStorageDefinitionFetcher {
8
+ getDefinition(): Promise<ReturnType<typeof getStorageDefinition> | undefined>;
9
+ }
10
+ export declare class AppStorageDefinitionFetcher {
11
+ private backendEnvironmentResolver;
12
+ private ccbFetcher;
13
+ private s3Client;
14
+ private dynamoClient;
15
+ constructor(backendEnvironmentResolver: BackendEnvironmentResolver, ccbFetcher: BackendDownloader, s3Client: S3Client, dynamoClient?: DynamoDBClient);
16
+ private readJsonFile;
17
+ private getFunctionPath;
18
+ private getStorageTriggers;
19
+ private fetchDynamoDBTable;
20
+ private mapAttributeType;
21
+ getDefinition: () => Promise<StorageRenderParameters | undefined>;
22
+ }
23
+ //# sourceMappingURL=app_storage_definition_fetcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app_storage_definition_fetcher.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAA2D,MAAM,2BAA2B,CAAC;AAC1H,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAkE,MAAM,4BAA4B,CAAC;AACrI,OAAO,EAEL,QAAQ,EAKT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAwB,MAAM,0BAA0B,CAAC;AAEhF,MAAM,WAAW,2BAA2B;IAC1C,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,OAAO,oBAAoB,CAAC,GAAG,SAAS,CAAC,CAAC;CAC/E;AAUD,qBAAa,2BAA2B;IAEpC,OAAO,CAAC,0BAA0B;IAClC,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,YAAY;gBAHZ,0BAA0B,EAAE,0BAA0B,EACtD,UAAU,EAAE,iBAAiB,EAC7B,QAAQ,EAAE,QAAQ,EAClB,YAAY,GAAE,cAAuC;IAE/D,OAAO,CAAC,YAAY,CAGlB;IACF,OAAO,CAAC,eAAe,CAErB;IACF,OAAO,CAAC,kBAAkB,CAiBxB;IAGF,OAAO,CAAC,kBAAkB,CAuExB;IAEF,OAAO,CAAC,gBAAgB,CAWtB;IAEF,aAAa,QAAa,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC,CA6EpE;CACH"}
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AppStorageDefinitionFetcher = void 0;
7
+ const promises_1 = __importDefault(require("node:fs/promises"));
8
+ const node_path_1 = __importDefault(require("node:path"));
9
+ const index_1 = require("../adapters/storage/index");
10
+ const client_s3_1 = require("@aws-sdk/client-s3");
11
+ const directory_exists_1 = require("./directory_exists");
12
+ const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
13
+ class AppStorageDefinitionFetcher {
14
+ constructor(backendEnvironmentResolver, ccbFetcher, s3Client, dynamoClient = new client_dynamodb_1.DynamoDBClient({})) {
15
+ this.backendEnvironmentResolver = backendEnvironmentResolver;
16
+ this.ccbFetcher = ccbFetcher;
17
+ this.s3Client = s3Client;
18
+ this.dynamoClient = dynamoClient;
19
+ this.readJsonFile = async (filePath) => {
20
+ const contents = await promises_1.default.readFile(filePath, { encoding: 'utf8' });
21
+ return JSON.parse(contents);
22
+ };
23
+ this.getFunctionPath = (functionName) => {
24
+ return node_path_1.default.join('amplify', 'backend', 'function', functionName, 'src');
25
+ };
26
+ this.getStorageTriggers = (connections) => {
27
+ var _a;
28
+ const triggers = {};
29
+ const lambdaFunctionConfigurations = connections.LambdaFunctionConfigurations || [];
30
+ for (const connection of lambdaFunctionConfigurations) {
31
+ const functionName = connection.LambdaFunctionArn ? (_a = connection.LambdaFunctionArn.split(':').pop()) === null || _a === void 0 ? void 0 : _a.split('-')[0] : '';
32
+ const event = connection.Events ? connection.Events[0] : '';
33
+ if (event.includes('ObjectCreated') && functionName) {
34
+ triggers['onUpload'] = { source: this.getFunctionPath(functionName) };
35
+ }
36
+ else if (event.includes('ObjectRemoved') && functionName) {
37
+ triggers['onDelete'] = { source: this.getFunctionPath(functionName) };
38
+ }
39
+ }
40
+ return triggers;
41
+ };
42
+ this.fetchDynamoDBTable = async (storageName, currentCloudBackendDirectory, storageOutput) => {
43
+ var _a, _b, _c, _d, _e, _f;
44
+ const actualTableName = ((_a = storageOutput.output) === null || _a === void 0 ? void 0 : _a.Name) || storageName;
45
+ const describeResult = await this.dynamoClient.send(new client_dynamodb_1.DescribeTableCommand({ TableName: actualTableName }));
46
+ const table = describeResult.Table;
47
+ const partitionKey = {
48
+ name: table.KeySchema.find((k) => k.KeyType === 'HASH').AttributeName,
49
+ type: this.mapAttributeType(table.AttributeDefinitions.find((a) => a.AttributeName === table.KeySchema.find((k) => k.KeyType === 'HASH').AttributeName)
50
+ .AttributeType),
51
+ };
52
+ let sortKey;
53
+ const sortKeySchema = table.KeySchema.find((k) => k.KeyType === 'RANGE');
54
+ if (sortKeySchema) {
55
+ sortKey = {
56
+ name: sortKeySchema.AttributeName,
57
+ type: this.mapAttributeType(table.AttributeDefinitions.find((a) => a.AttributeName === sortKeySchema.AttributeName).AttributeType),
58
+ };
59
+ }
60
+ const gsis = [];
61
+ if (table.GlobalSecondaryIndexes) {
62
+ table.GlobalSecondaryIndexes.forEach((gsi) => {
63
+ const gsiDef = {
64
+ indexName: gsi.IndexName,
65
+ partitionKey: {
66
+ name: gsi.KeySchema.find((k) => k.KeyType === 'HASH').AttributeName,
67
+ type: this.mapAttributeType(table.AttributeDefinitions.find((a) => a.AttributeName === gsi.KeySchema.find((k) => k.KeyType === 'HASH').AttributeName)
68
+ .AttributeType),
69
+ },
70
+ };
71
+ const gsiSortKey = gsi.KeySchema.find((k) => k.KeyType === 'RANGE');
72
+ if (gsiSortKey) {
73
+ gsiDef.sortKey = {
74
+ name: gsiSortKey.AttributeName,
75
+ type: this.mapAttributeType(table.AttributeDefinitions.find((a) => a.AttributeName === gsiSortKey.AttributeName).AttributeType),
76
+ };
77
+ }
78
+ gsis.push(gsiDef);
79
+ });
80
+ }
81
+ return {
82
+ tableName: actualTableName,
83
+ partitionKey,
84
+ sortKey,
85
+ gsis: gsis.length > 0 ? gsis : undefined,
86
+ billingMode: ((_b = table.BillingModeSummary) === null || _b === void 0 ? void 0 : _b.BillingMode) === 'PAY_PER_REQUEST' ? 'PAY_PER_REQUEST' : 'PROVISIONED',
87
+ readCapacity: ((_c = table.ProvisionedThroughput) === null || _c === void 0 ? void 0 : _c.ReadCapacityUnits) || 5,
88
+ writeCapacity: ((_d = table.ProvisionedThroughput) === null || _d === void 0 ? void 0 : _d.WriteCapacityUnits) || 5,
89
+ streamEnabled: !!((_e = table.StreamSpecification) === null || _e === void 0 ? void 0 : _e.StreamEnabled),
90
+ streamViewType: (_f = table.StreamSpecification) === null || _f === void 0 ? void 0 : _f.StreamViewType,
91
+ };
92
+ };
93
+ this.mapAttributeType = (dynamoType) => {
94
+ switch (dynamoType) {
95
+ case 'S':
96
+ return 'STRING';
97
+ case 'N':
98
+ return 'NUMBER';
99
+ case 'B':
100
+ return 'BINARY';
101
+ default:
102
+ return 'STRING';
103
+ }
104
+ };
105
+ this.getDefinition = async () => {
106
+ var _a;
107
+ const backendEnvironment = await this.backendEnvironmentResolver.selectBackendEnvironment();
108
+ if (!(backendEnvironment === null || backendEnvironment === void 0 ? void 0 : backendEnvironment.deploymentArtifacts))
109
+ return undefined;
110
+ const currentCloudBackendDirectory = await this.ccbFetcher.getCurrentCloudBackend(backendEnvironment.deploymentArtifacts);
111
+ const amplifyMetaPath = node_path_1.default.join(currentCloudBackendDirectory, 'amplify-meta.json');
112
+ if (!(await (0, directory_exists_1.fileOrDirectoryExists)(amplifyMetaPath))) {
113
+ throw new Error('Could not find amplify-meta.json');
114
+ }
115
+ const amplifyMeta = (_a = (await this.readJsonFile(amplifyMetaPath))) !== null && _a !== void 0 ? _a : {};
116
+ let storageOptions = undefined;
117
+ const dynamoTables = [];
118
+ if ('storage' in amplifyMeta && Object.keys(amplifyMeta.storage).length) {
119
+ for (const [storageName, storage] of Object.entries(amplifyMeta.storage)) {
120
+ const cliInputsPath = node_path_1.default.join(currentCloudBackendDirectory, 'storage', storageName, 'cli-inputs.json');
121
+ if (!(await (0, directory_exists_1.fileOrDirectoryExists)(cliInputsPath))) {
122
+ throw new Error(`Could not find cli-inputs.json for ${storageName}`);
123
+ }
124
+ const storageOutput = storage;
125
+ if (storageOutput.service === 'S3') {
126
+ const cliInputs = await this.readJsonFile(cliInputsPath);
127
+ const bucketName = storageOutput.output.BucketName;
128
+ if (!bucketName)
129
+ throw new Error('Could not find bucket name');
130
+ const connections = await this.s3Client.send(new client_s3_1.GetBucketNotificationConfigurationCommand({ Bucket: bucketName }));
131
+ const { Status: accelerateConfiguration } = await this.s3Client.send(new client_s3_1.GetBucketAccelerateConfigurationCommand({ Bucket: bucketName }));
132
+ const { Status: versioningConfiguration } = await this.s3Client.send(new client_s3_1.GetBucketVersioningCommand({ Bucket: bucketName }));
133
+ const { ServerSideEncryptionConfiguration: serverSideEncryptionByDefault } = await this.s3Client.send(new client_s3_1.GetBucketEncryptionCommand({ Bucket: bucketName }));
134
+ const triggers = this.getStorageTriggers(connections);
135
+ const storageDefinition = (0, index_1.getStorageDefinition)({
136
+ cliInputs,
137
+ bucketName,
138
+ triggers,
139
+ });
140
+ if (!storageOptions)
141
+ storageOptions = {};
142
+ storageOptions.accessPatterns = storageDefinition.accessPatterns;
143
+ storageOptions.storageIdentifier = storageDefinition.storageIdentifier;
144
+ storageOptions.triggers = storageDefinition.triggers;
145
+ storageOptions.accelerateConfiguration = accelerateConfiguration;
146
+ storageOptions.versioningConfiguration = versioningConfiguration;
147
+ storageOptions.bucketName = bucketName;
148
+ if (serverSideEncryptionByDefault && serverSideEncryptionByDefault.Rules && serverSideEncryptionByDefault.Rules[0]) {
149
+ const serverSideEncryptionConf = {
150
+ serverSideEncryptionByDefault: serverSideEncryptionByDefault.Rules[0].ApplyServerSideEncryptionByDefault,
151
+ bucketKeyEnabled: serverSideEncryptionByDefault.Rules[0].BucketKeyEnabled,
152
+ };
153
+ storageOptions.bucketEncryptionAlgorithm = serverSideEncryptionConf;
154
+ }
155
+ }
156
+ else if (storageOutput.service === 'DynamoDB') {
157
+ const tableDefinition = await this.fetchDynamoDBTable(storageName, currentCloudBackendDirectory, storageOutput);
158
+ dynamoTables.push(tableDefinition);
159
+ }
160
+ }
161
+ }
162
+ if (dynamoTables.length > 0) {
163
+ if (!storageOptions)
164
+ storageOptions = {};
165
+ storageOptions.dynamoTables = dynamoTables;
166
+ }
167
+ return storageOptions;
168
+ };
169
+ }
170
+ }
171
+ exports.AppStorageDefinitionFetcher = AppStorageDefinitionFetcher;
172
+ //# sourceMappingURL=app_storage_definition_fetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app_storage_definition_fetcher.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAkC;AAClC,0DAA6B;AAC7B,qDAA0H;AAG1H,kDAO4B;AAE5B,yDAA2D;AAC3D,8DAAgF;AAchF,MAAa,2BAA2B;IACtC,YACU,0BAAsD,EACtD,UAA6B,EAC7B,QAAkB,EAClB,eAA+B,IAAI,gCAAc,CAAC,EAAE,CAAC;QAHrD,+BAA0B,GAA1B,0BAA0B,CAA4B;QACtD,eAAU,GAAV,UAAU,CAAmB;QAC7B,aAAQ,GAAR,QAAQ,CAAU;QAClB,iBAAY,GAAZ,YAAY,CAAyC;QAEvD,iBAAY,GAAG,KAAK,EAAE,QAAgB,EAAE,EAAE;YAChD,MAAM,QAAQ,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;YACnE,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC9B,CAAC,CAAC;QACM,oBAAe,GAAG,CAAC,YAAoB,EAAE,EAAE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,EAAE,6BAA6B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,gBAAiB;6BAC3E,CAAC;4BAEF,cAAc,CAAC,yBAAyB,GAAG,wBAAwB,CAAC;wBACtE,CAAC;oBACH,CAAC;yBAAM,IAAI,aAAa,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;wBAChD,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,4BAA4B,EAAE,aAAa,CAAC,CAAC;wBAChH,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;oBACrC,CAAC;gBACH,CAAC;YACH,CAAC;YAED,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC5B,IAAI,CAAC,cAAc;oBAAE,cAAc,GAAG,EAAE,CAAC;gBACzC,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;YAC7C,CAAC;YAED,OAAO,cAAc,CAAC;QACxB,CAAC,CAAC;IA/LC,CAAC;CAgML;AAtMD,kEAsMC"}
@@ -0,0 +1,10 @@
1
+ import { S3Client } from '@aws-sdk/client-s3';
2
+ export declare class BackendDownloader {
3
+ private s3Client;
4
+ constructor(s3Client: S3Client);
5
+ private static ccbDir;
6
+ private static CURRENT_CLOUD_BACKEND;
7
+ private makeTempDirectory;
8
+ getCurrentCloudBackend: (bucket: string) => Promise<string>;
9
+ }
10
+ //# sourceMappingURL=backend_downloader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend_downloader.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/codegen-head/backend_downloader.ts"],"names":[],"mappings":"AAOA,OAAO,EAAoB,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAIhE,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,QAAQ;IACtC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAqB;IAE1C,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAA2B;IAC/D,OAAO,CAAC,iBAAiB,CAIvB;IACF,sBAAsB,GAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,MAAM,CAAC,CAuB9D;CACH"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BackendDownloader = void 0;
7
+ const node_os_1 = __importDefault(require("node:os"));
8
+ const promises_1 = __importDefault(require("node:fs/promises"));
9
+ const node_path_1 = __importDefault(require("node:path"));
10
+ const node_assert_1 = __importDefault(require("node:assert"));
11
+ const unzipper_1 = __importDefault(require("unzipper"));
12
+ const client_s3_1 = require("@aws-sdk/client-s3");
13
+ const directory_exists_1 = require("./directory_exists");
14
+ class BackendDownloader {
15
+ constructor(s3Client) {
16
+ this.s3Client = s3Client;
17
+ this.makeTempDirectory = async () => {
18
+ const tmpDir = node_os_1.default.tmpdir();
19
+ const { sep } = node_path_1.default;
20
+ return await promises_1.default.mkdtemp(`${tmpDir}${sep}`);
21
+ };
22
+ this.getCurrentCloudBackend = async (bucket) => {
23
+ if (BackendDownloader.ccbDir && (await (0, directory_exists_1.fileOrDirectoryExists)(BackendDownloader.ccbDir))) {
24
+ return BackendDownloader.ccbDir;
25
+ }
26
+ const tmpDir = await this.makeTempDirectory();
27
+ const ccbZippedFilename = `#${BackendDownloader.CURRENT_CLOUD_BACKEND}.zip`;
28
+ const ccbZipPath = node_path_1.default.join(tmpDir, ccbZippedFilename);
29
+ const response = await this.s3Client.send(new client_s3_1.GetObjectCommand({
30
+ Key: ccbZippedFilename,
31
+ Bucket: bucket,
32
+ }));
33
+ (0, node_assert_1.default)(response.Body, 'Body is empty');
34
+ await promises_1.default.writeFile(ccbZipPath, response.Body);
35
+ (0, node_assert_1.default)(await (0, directory_exists_1.fileOrDirectoryExists)(ccbZipPath), `${ccbZipPath} does not exist.`);
36
+ const directory = await unzipper_1.default.Open.file(ccbZipPath);
37
+ await directory.extract({
38
+ path: node_path_1.default.join(tmpDir, BackendDownloader.CURRENT_CLOUD_BACKEND),
39
+ });
40
+ const ccbDir = node_path_1.default.join(tmpDir, BackendDownloader.CURRENT_CLOUD_BACKEND);
41
+ BackendDownloader.ccbDir = ccbDir;
42
+ return ccbDir;
43
+ };
44
+ }
45
+ }
46
+ exports.BackendDownloader = BackendDownloader;
47
+ BackendDownloader.CURRENT_CLOUD_BACKEND = 'current-cloud-backend';
48
+ //# sourceMappingURL=backend_downloader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend_downloader.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/codegen-head/backend_downloader.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,gEAAkC;AAClC,0DAA6B;AAC7B,8DAAiC;AAGjC,wDAAgC;AAChC,kDAAgE;AAEhE,yDAA2D;AAE3D,MAAa,iBAAiB;IAC5B,YAAoB,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;QAI9B,sBAAiB,GAAG,KAAK,IAAqB,EAAE;YACtD,MAAM,MAAM,GAAG,iBAAE,CAAC,MAAM,EAAE,CAAC;YAC3B,MAAM,EAAE,GAAG,EAAE,GAAG,mBAAI,CAAC;YACrB,OAAO,MAAM,kBAAE,CAAC,OAAO,CAAC,GAAG,MAAM,GAAG,GAAG,EAAE,CAAC,CAAC;QAC7C,CAAC,CAAC;QACF,2BAAsB,GAAG,KAAK,EAAE,MAAc,EAAmB,EAAE;YACjE,IAAI,iBAAiB,CAAC,MAAM,IAAI,CAAC,MAAM,IAAA,wCAAqB,EAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;gBACxF,OAAO,iBAAiB,CAAC,MAAM,CAAC;YAClC,CAAC;YACD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC9C,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,qBAAqB,MAAM,CAAC;YAC5E,MAAM,UAAU,GAAG,mBAAI,CAAC,IAAI,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;YACxD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CACvC,IAAI,4BAAgB,CAAC;gBACnB,GAAG,EAAE,iBAAiB;gBACtB,MAAM,EAAE,MAAM;aACf,CAAC,CACH,CAAC;YACF,IAAA,qBAAM,EAAC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;YACvC,MAAM,kBAAE,CAAC,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAc,CAAC,CAAC;YACxD,IAAA,qBAAM,EAAC,MAAM,IAAA,wCAAqB,EAAC,UAAU,CAAC,EAAE,GAAG,UAAU,kBAAkB,CAAC,CAAC;YACjF,MAAM,SAAS,GAAG,MAAM,kBAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACvD,MAAM,SAAS,CAAC,OAAO,CAAC;gBACtB,IAAI,EAAE,mBAAI,CAAC,IAAI,CAAC,MAAM,EAAE,iBAAiB,CAAC,qBAAqB,CAAC;aACjE,CAAC,CAAC;YACH,MAAM,MAAM,GAAG,mBAAI,CAAC,IAAI,CAAC,MAAM,EAAE,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;YAC1E,iBAAiB,CAAC,MAAM,GAAG,MAAM,CAAC;YAClC,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;IAhCuC,CAAC;;AAD5C,8CAkCC;AA9BgB,uCAAqB,GAAG,uBAAuB,AAA1B,CAA2B"}
@@ -0,0 +1,11 @@
1
+ import { AmplifyClient, BackendEnvironment } from '@aws-sdk/client-amplify';
2
+ export declare class BackendEnvironmentResolver {
3
+ private appId;
4
+ private envName;
5
+ private amplifyClient;
6
+ constructor(appId: string, envName: string, amplifyClient: AmplifyClient);
7
+ private selectedEnvironment;
8
+ selectBackendEnvironment: () => Promise<BackendEnvironment | undefined>;
9
+ getAllBackendEnvironments: () => Promise<BackendEnvironment[]>;
10
+ }
11
+ //# sourceMappingURL=backend_environment_selector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend_environment_selector.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/codegen-head/backend_environment_selector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAgE,MAAM,yBAAyB,CAAC;AAG1I,qBAAa,0BAA0B;IACzB,OAAO,CAAC,KAAK;IAAU,OAAO,CAAC,OAAO;IAAU,OAAO,CAAC,aAAa;gBAA7D,KAAK,EAAE,MAAM,EAAU,OAAO,EAAE,MAAM,EAAU,aAAa,EAAE,aAAa;IAChG,OAAO,CAAC,mBAAmB,CAAiC;IAC5D,wBAAwB,QAAa,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAW1E;IAEF,yBAAyB,QAAa,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAUjE;CACH"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BackendEnvironmentResolver = void 0;
7
+ const node_assert_1 = __importDefault(require("node:assert"));
8
+ const client_amplify_1 = require("@aws-sdk/client-amplify");
9
+ const get_env_info_1 = require("../../../../extensions/amplify-helpers/get-env-info");
10
+ class BackendEnvironmentResolver {
11
+ constructor(appId, envName, amplifyClient) {
12
+ this.appId = appId;
13
+ this.envName = envName;
14
+ this.amplifyClient = amplifyClient;
15
+ this.selectBackendEnvironment = async () => {
16
+ if (this.selectedEnvironment)
17
+ return this.selectedEnvironment;
18
+ const { backendEnvironment } = await this.amplifyClient.send(new client_amplify_1.GetBackendEnvironmentCommand({
19
+ appId: this.appId,
20
+ environmentName: this.envName,
21
+ }));
22
+ (0, node_assert_1.default)(backendEnvironment, 'No backend environment found');
23
+ this.selectedEnvironment = backendEnvironment;
24
+ return this.selectedEnvironment;
25
+ };
26
+ this.getAllBackendEnvironments = async () => {
27
+ const envInfo = (0, get_env_info_1.getEnvInfo)();
28
+ (0, node_assert_1.default)(envInfo);
29
+ const { backendEnvironments } = await this.amplifyClient.send(new client_amplify_1.ListBackendEnvironmentsCommand({
30
+ appId: this.appId,
31
+ }));
32
+ (0, node_assert_1.default)(backendEnvironments, 'No backend environments found');
33
+ return backendEnvironments;
34
+ };
35
+ }
36
+ }
37
+ exports.BackendEnvironmentResolver = BackendEnvironmentResolver;
38
+ //# sourceMappingURL=backend_environment_selector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend_environment_selector.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/codegen-head/backend_environment_selector.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,4DAA0I;AAC1I,sFAAiF;AAEjF,MAAa,0BAA0B;IACrC,YAAoB,KAAa,EAAU,OAAe,EAAU,aAA4B;QAA5E,UAAK,GAAL,KAAK,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAQ;QAAU,kBAAa,GAAb,aAAa,CAAe;QAEhG,6BAAwB,GAAG,KAAK,IAA6C,EAAE;YAC7E,IAAI,IAAI,CAAC,mBAAmB;gBAAE,OAAO,IAAI,CAAC,mBAAmB,CAAC;YAC9D,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAC1D,IAAI,6CAA4B,CAAC;gBAC/B,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,eAAe,EAAE,IAAI,CAAC,OAAO;aAC9B,CAAC,CACH,CAAC;YACF,IAAA,qBAAM,EAAC,kBAAkB,EAAE,8BAA8B,CAAC,CAAC;YAC3D,IAAI,CAAC,mBAAmB,GAAG,kBAAkB,CAAC;YAC9C,OAAO,IAAI,CAAC,mBAAmB,CAAC;QAClC,CAAC,CAAC;QAEF,8BAAyB,GAAG,KAAK,IAAmC,EAAE;YACpE,MAAM,OAAO,GAAG,IAAA,yBAAU,GAAE,CAAC;YAC7B,IAAA,qBAAM,EAAC,OAAO,CAAC,CAAC;YAChB,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAC3D,IAAI,+CAA8B,CAAC;gBACjC,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CACH,CAAC;YACF,IAAA,qBAAM,EAAC,mBAAmB,EAAE,+BAA+B,CAAC,CAAC;YAC7D,OAAO,mBAAmB,CAAC;QAC7B,CAAC,CAAC;IAzBiG,CAAC;CA0BrG;AA3BD,gEA2BC"}
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import { AmplifyClient, BackendEnvironment } from '@aws-sdk/client-amplify';
3
+ import { LambdaConfigType } from '@aws-sdk/client-cognito-identity-provider';
4
+ import { BackendDownloader } from './backend_downloader';
5
+ import { Logger } from '../../../gen2-migration';
6
+ export declare const GEN1_CONFIGURATION_FILES: string[];
7
+ export declare const getAuthTriggersConnections: (ccbFetcher: BackendDownloader, backendEnvironment: BackendEnvironment) => Promise<Partial<Record<keyof LambdaConfigType, string>>>;
8
+ export declare function updateAmplifyYmlFile(amplifyClient: AmplifyClient, appId: string): Promise<void>;
9
+ export declare function updateGitIgnoreForGen2(): Promise<void>;
10
+ export declare function updateCustomResources(ccbFetcher: BackendDownloader, backendEnvironment: BackendEnvironment): Promise<void>;
11
+ export declare function updateCdkStackFile(customResources: string[], destinationCustomResourcePath: string, rootDir: string): Promise<void>;
12
+ export declare function prepare(logger: Logger, appId: string, envName: string, region: string): Promise<void>;
13
+ //# sourceMappingURL=command-handlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command-handlers.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/codegen-head/command-handlers.ts"],"names":[],"mappings":";AASA,OAAO,EAAE,aAAa,EAAmC,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7G,OAAO,EAAiC,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAO5G,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAsBzD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAyBjD,eAAO,MAAM,wBAAwB,UAA2E,CAAC;AAyHjH,eAAO,MAAM,0BAA0B,GACrC,YAAY,iBAAiB,EAC7B,oBAAoB,kBAAkB,KACrC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAwCzD,CAAC;AAkDF,wBAAsB,oBAAoB,CAAC,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,iBA0BrF;AASD,wBAAsB,sBAAsB,kBAkC3C;AAsCD,wBAAsB,qBAAqB,CAAC,UAAU,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB,iBAgDhH;AAED,wBAAsB,kBAAkB,CAAC,eAAe,EAAE,MAAM,EAAE,EAAE,6BAA6B,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,iBAmEzH;AAwBD,wBAAsB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAkE3F"}