@aws-amplify/cli-internal-gen2-migration-experimental-alpha 0.1.0 → 0.2.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.2.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 +901 -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 +700 -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 +2 -1
  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,66 @@
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.renderStorage = void 0;
7
+ const typescript_1 = __importDefault(require("typescript"));
8
+ const access_1 = require("./access");
9
+ const resource_1 = require("../../resource/resource");
10
+ const lambda_1 = require("../functions/lambda");
11
+ const factory = typescript_1.default.factory;
12
+ const gen2BranchNameVariableName = 'branchName';
13
+ const createVariableStatement = (variableDeclaration) => {
14
+ return factory.createVariableStatement([], factory.createVariableDeclarationList([variableDeclaration], typescript_1.default.NodeFlags.Const));
15
+ };
16
+ const createTemplateLiteral = (templateHead, templateSpan, templateTail) => {
17
+ return factory.createTemplateExpression(factory.createTemplateHead(templateHead), [
18
+ factory.createTemplateSpan(factory.createIdentifier(templateSpan), factory.createTemplateTail(templateTail)),
19
+ ]);
20
+ };
21
+ const renderStorage = (storageParams = {}) => {
22
+ var _a;
23
+ const propertyAssignments = [];
24
+ const namedImports = { '@aws-amplify/backend': new Set() };
25
+ namedImports['@aws-amplify/backend'].add('defineStorage');
26
+ const triggers = storageParams.triggers || {};
27
+ const postImportStatements = [];
28
+ const amplifyGen1EnvStatement = createVariableStatement(factory.createVariableDeclaration(gen2BranchNameVariableName, undefined, undefined, factory.createIdentifier('process.env.AWS_BRANCH ?? "sandbox"')));
29
+ postImportStatements.push(amplifyGen1EnvStatement);
30
+ if (storageParams.storageIdentifier) {
31
+ const splitStorageIdentifier = storageParams.storageIdentifier.split('-');
32
+ const storageNameWithoutBackendEnvName = splitStorageIdentifier.slice(0, -1).join('-');
33
+ const storageNameAssignment = createTemplateLiteral(`${storageNameWithoutBackendEnvName}-`, gen2BranchNameVariableName, '');
34
+ const nameProperty = factory.createPropertyAssignment(factory.createIdentifier('name'), storageNameAssignment);
35
+ propertyAssignments.push(nameProperty);
36
+ }
37
+ if (storageParams.accessPatterns) {
38
+ propertyAssignments.push((0, access_1.getAccessPatterns)(storageParams.accessPatterns));
39
+ }
40
+ if ((_a = storageParams.accessPatterns) === null || _a === void 0 ? void 0 : _a.groups) {
41
+ postImportStatements.push(factory.createJSDocComment(factory.createNodeArray([
42
+ factory.createJSDocText('TODO: Your project uses group permissions. Group permissions have changed in Gen 2. '),
43
+ factory.createJSDocText('In order to grant permissions to groups in Gen 2, please refer to https://docs.amplify.aws/react/build-a-backend/storage/authorization/#for-gen-1-public-protected-and-private-access-pattern.'),
44
+ ])));
45
+ }
46
+ if (Object.keys(triggers).length) {
47
+ propertyAssignments.push((0, lambda_1.createTriggersProperty)(triggers));
48
+ for (const value of Object.values(triggers)) {
49
+ const functionName = value.source.split('/')[3];
50
+ if (!namedImports[`./${functionName}/resource`]) {
51
+ namedImports[`./${functionName}/resource`] = new Set();
52
+ }
53
+ namedImports[`./${functionName}/resource`].add(functionName);
54
+ }
55
+ }
56
+ const storageArgs = factory.createObjectLiteralExpression(propertyAssignments);
57
+ return (0, resource_1.renderResourceTsFile)({
58
+ backendFunctionConstruct: 'defineStorage',
59
+ exportedVariableName: factory.createIdentifier('storage'),
60
+ functionCallParameter: storageArgs,
61
+ postImportStatements,
62
+ additionalImportedBackendIdentifiers: namedImports,
63
+ });
64
+ };
65
+ exports.renderStorage = renderStorage;
66
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/generators/storage/index.ts"],"names":[],"mappings":";;;;;;AAAA,4DAAwE;AACxE,qCAA6C;AAC7C,sDAA+D;AAC/D,gDAAqE;AAErE,MAAM,OAAO,GAAG,oBAAE,CAAC,OAAO,CAAC;AAE3B,MAAM,0BAA0B,GAAG,YAAY,CAAC;AAiChD,MAAM,uBAAuB,GAAG,CAAC,mBAAwC,EAAqB,EAAE;IAC9F,OAAO,OAAO,CAAC,uBAAuB,CAAC,EAAE,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC,mBAAmB,CAAC,EAAE,oBAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/H,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,YAAoB,EAAE,YAAoB,EAAE,YAAoB,EAAE,EAAE;IACjG,OAAO,OAAO,CAAC,wBAAwB,CAAC,OAAO,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE;QAChF,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,kBAAkB,C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+DxB"}
@@ -0,0 +1,27 @@
1
+ export type AmplifyDevDependencies = {
2
+ '@aws-amplify/backend': string;
3
+ '@aws-amplify/backend-cli': string;
4
+ '@aws-amplify/backend-data': string;
5
+ 'aws-cdk': string;
6
+ 'aws-cdk-lib': string;
7
+ 'ci-info': string;
8
+ constructs: string;
9
+ esbuild: string;
10
+ tsx: string;
11
+ typescript: string;
12
+ '@types/node': string;
13
+ };
14
+ export type AmplifyDependencies = {
15
+ 'aws-amplify': string;
16
+ };
17
+ export type AmplifyPackageVersions = AmplifyDevDependencies & AmplifyDependencies;
18
+ export type PackageJsonDependencies = {
19
+ devDependencies?: Record<string, string>;
20
+ dependencies?: Record<string, string>;
21
+ };
22
+ export type PackageJson = {
23
+ name: string;
24
+ scripts?: Record<string, string>;
25
+ } & PackageJsonDependencies;
26
+ export declare const patchNpmPackageJson: (packageJson: PackageJson, packageVersions?: Partial<AmplifyPackageVersions>) => PackageJson;
27
+ //# sourceMappingURL=renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/npm_package/renderer.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;IACnC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,0BAA0B,EAAE,MAAM,CAAC;IACnC,2BAA2B,EAAE,MAAM,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,sBAAsB,GAAG,mBAAmB,CAAC;AAElF,MAAM,MAAM,uBAAuB,GAAG;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,GAAG,uBAAuB,CAAC;AAI5B,eAAO,MAAM,mBAAmB,GAAI,aAAa,WAAW,EAAE,kBAAiB,OAAO,CAAC,sBAAsB,CAAM,KAAG,WAoBrH,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.patchNpmPackageJson = void 0;
4
+ const withDefault = (version) => version !== null && version !== void 0 ? version : '*';
5
+ const patchNpmPackageJson = (packageJson, packageVersions = {}) => {
6
+ var _a, _b;
7
+ return {
8
+ ...packageJson,
9
+ devDependencies: {
10
+ ...((_a = packageJson.devDependencies) !== null && _a !== void 0 ? _a : {}),
11
+ '@aws-amplify/backend': withDefault(packageVersions['@aws-amplify/backend']),
12
+ '@aws-amplify/backend-cli': withDefault(packageVersions['@aws-amplify/backend-cli']),
13
+ '@aws-amplify/backend-data': withDefault(packageVersions['@aws-amplify/backend-data']),
14
+ 'aws-cdk': withDefault(packageVersions['aws-cdk']),
15
+ 'aws-cdk-lib': withDefault(packageVersions['aws-cdk-lib']),
16
+ 'ci-info': withDefault(packageVersions['ci-info']),
17
+ constructs: withDefault(packageVersions.constructs),
18
+ esbuild: withDefault(packageVersions.esbuild),
19
+ tsx: withDefault(packageVersions.tsx),
20
+ '@types/node': withDefault(packageVersions['@types/node']),
21
+ },
22
+ dependencies: {
23
+ ...((_b = packageJson.dependencies) !== null && _b !== void 0 ? _b : {}),
24
+ },
25
+ };
26
+ };
27
+ exports.patchNpmPackageJson = patchNpmPackageJson;
28
+ //# sourceMappingURL=renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/npm_package/renderer.ts"],"names":[],"mappings":";;;AA4BA,MAAM,WAAW,GAAG,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,GAAG,CAAC;AAElD,MAAM,mBAAmB,GAAG,CAAC,WAAwB,EAAE,kBAAmD,EAAE,EAAe,EAAE;;IAClI,OAAO;QACL,GAAG,WAAW;QACd,eAAe,EAAE;YACf,GAAG,CAAC,MAAA,WAAW,CAAC,eAAe,mCAAI,EAAE,CAAC;YACtC,sBAAsB,EAAE,WAAW,CAAC,eAAe,CAAC,sBAAsB,CAAC,CAAC;YAC5E,0BAA0B,EAAE,WAAW,CAAC,eAAe,CAAC,0BAA0B,CAAC,CAAC;YACpF,2BAA2B,EAAE,WAAW,CAAC,eAAe,CAAC,2BAA2B,CAAC,CAAC;YACtF,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;YAClD,aAAa,EAAE,WAAW,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YAC1D,SAAS,EAAE,WAAW,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;YAClD,UAAU,EAAE,WAAW,CAAC,eAAe,CAAC,UAAU,CAAC;YACnD,OAAO,EAAE,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC;YAC7C,GAAG,EAAE,WAAW,CAAC,eAAe,CAAC,GAAG,CAAC;YACrC,aAAa,EAAE,WAAW,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;SAC3D;QACD,YAAY,EAAE;YACZ,GAAG,CAAC,MAAA,WAAW,CAAC,YAAY,mCAAI,EAAE,CAAC;SACpC;KACF,CAAC;AACJ,CAAC,CAAC;AApBW,QAAA,mBAAmB,uBAoB9B"}
@@ -0,0 +1,9 @@
1
+ export interface Renderer {
2
+ render(): Promise<void>;
3
+ }
4
+ export declare class RenderPipeline implements Renderer {
5
+ private renderers;
6
+ constructor(renderers: Renderer[]);
7
+ render: () => Promise<void>;
8
+ }
9
+ //# sourceMappingURL=render_pipeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render_pipeline.d.ts","sourceRoot":"","sources":["../../../../src/commands/gen2-migration/generate/render_pipeline.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AACD,qBAAa,cAAe,YAAW,QAAQ;IACjC,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,QAAQ,EAAE;IAEzC,MAAM,QAAa,OAAO,CAAC,IAAI,CAAC,CAI9B;CACH"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RenderPipeline = void 0;
4
+ class RenderPipeline {
5
+ constructor(renderers) {
6
+ this.renderers = renderers;
7
+ this.render = async () => {
8
+ for (const renderer of this.renderers) {
9
+ await renderer.render();
10
+ }
11
+ };
12
+ }
13
+ }
14
+ exports.RenderPipeline = RenderPipeline;
15
+ //# sourceMappingURL=render_pipeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render_pipeline.js","sourceRoot":"","sources":["../../../../src/commands/gen2-migration/generate/render_pipeline.ts"],"names":[],"mappings":";;;AAGA,MAAa,cAAc;IACzB,YAAoB,SAAqB;QAArB,cAAS,GAAT,SAAS,CAAY;QAEzC,WAAM,GAAG,KAAK,IAAmB,EAAE;YACjC,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBACtC,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAC;YAC1B,CAAC;QACH,CAAC,CAAC;IAN0C,CAAC;CAO9C;AARD,wCAQC"}
@@ -0,0 +1,7 @@
1
+ import { Renderer } from '../render_pipeline';
2
+ export declare class EnsureDirectory implements Renderer {
3
+ private directory;
4
+ constructor(directory: string);
5
+ render: () => Promise<void>;
6
+ }
7
+ //# sourceMappingURL=ensure_directory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure_directory.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/renderers/ensure_directory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,qBAAa,eAAgB,YAAW,QAAQ;IAClC,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,MAAM;IACrC,MAAM,QAAa,OAAO,CAAC,IAAI,CAAC,CAE9B;CACH"}
@@ -0,0 +1,17 @@
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.EnsureDirectory = void 0;
7
+ const promises_1 = __importDefault(require("node:fs/promises"));
8
+ class EnsureDirectory {
9
+ constructor(directory) {
10
+ this.directory = directory;
11
+ this.render = async () => {
12
+ await promises_1.default.mkdir(this.directory, { recursive: true });
13
+ };
14
+ }
15
+ }
16
+ exports.EnsureDirectory = EnsureDirectory;
17
+ //# sourceMappingURL=ensure_directory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure_directory.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/renderers/ensure_directory.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAkC;AAGlC,MAAa,eAAe;IAC1B,YAAoB,SAAiB;QAAjB,cAAS,GAAT,SAAS,CAAQ;QACrC,WAAM,GAAG,KAAK,IAAmB,EAAE;YACjC,MAAM,kBAAE,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACtD,CAAC,CAAC;IAHsC,CAAC;CAI1C;AALD,0CAKC"}
@@ -0,0 +1,8 @@
1
+ import { Renderer } from '../render_pipeline';
2
+ export declare class JsonRenderer implements Renderer {
3
+ private createJson;
4
+ private writeFile;
5
+ constructor(createJson: () => Promise<Record<string, unknown>>, writeFile: (content: string) => Promise<void>);
6
+ render: () => Promise<void>;
7
+ }
8
+ //# sourceMappingURL=package_json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package_json.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/renderers/package_json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,qBAAa,YAAa,YAAW,QAAQ;IAC/B,OAAO,CAAC,UAAU;IAA0C,OAAO,CAAC,SAAS;gBAArE,UAAU,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAU,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;IAE7H,MAAM,QAAa,OAAO,CAAC,IAAI,CAAC,CAG9B;CACH"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JsonRenderer = void 0;
4
+ class JsonRenderer {
5
+ constructor(createJson, writeFile) {
6
+ this.createJson = createJson;
7
+ this.writeFile = writeFile;
8
+ this.render = async () => {
9
+ const packageJson = await this.createJson();
10
+ await this.writeFile(JSON.stringify(packageJson, null, 2));
11
+ };
12
+ }
13
+ }
14
+ exports.JsonRenderer = JsonRenderer;
15
+ //# sourceMappingURL=package_json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package_json.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/renderers/package_json.ts"],"names":[],"mappings":";;;AAEA,MAAa,YAAY;IACvB,YAAoB,UAAkD,EAAU,SAA6C;QAAzG,eAAU,GAAV,UAAU,CAAwC;QAAU,cAAS,GAAT,SAAS,CAAoC;QAE7H,WAAM,GAAG,KAAK,IAAmB,EAAE;YACjC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;YAC5C,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC7D,CAAC,CAAC;IAL8H,CAAC;CAMlI;AAPD,oCAOC"}
@@ -0,0 +1,11 @@
1
+ import ts from 'typescript';
2
+ import { Renderer } from '../render_pipeline';
3
+ export declare class TypescriptNodeArrayRenderer implements Renderer {
4
+ private blockCreator;
5
+ private writer;
6
+ private printer;
7
+ private sourceFile;
8
+ constructor(blockCreator: () => Promise<ts.NodeArray<ts.Node>>, writer: (content: string) => Promise<void>);
9
+ render: () => Promise<void>;
10
+ }
11
+ //# sourceMappingURL=typescript_block_node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript_block_node.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/renderers/typescript_block_node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,qBAAa,2BAA4B,YAAW,QAAQ;IAG9C,OAAO,CAAC,YAAY;IAAwC,OAAO,CAAC,MAAM;IAFtF,OAAO,CAAC,OAAO,CAAa;IAC5B,OAAO,CAAC,UAAU,CAAgB;gBACd,YAAY,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,EAAU,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC;IAI1H,MAAM,QAAa,OAAO,CAAC,IAAI,CAAC,CAI9B;CACH"}
@@ -0,0 +1,22 @@
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.TypescriptNodeArrayRenderer = void 0;
7
+ const typescript_1 = __importDefault(require("typescript"));
8
+ class TypescriptNodeArrayRenderer {
9
+ constructor(blockCreator, writer) {
10
+ this.blockCreator = blockCreator;
11
+ this.writer = writer;
12
+ this.render = async () => {
13
+ const block = await this.blockCreator();
14
+ const source = this.printer.printList(typescript_1.default.ListFormat.MultiLine, block, this.sourceFile);
15
+ await this.writer(source);
16
+ };
17
+ this.printer = typescript_1.default.createPrinter({ newLine: typescript_1.default.NewLineKind.LineFeed });
18
+ this.sourceFile = typescript_1.default.createSourceFile('output.ts', '', typescript_1.default.ScriptTarget.Latest, false, typescript_1.default.ScriptKind.TS);
19
+ }
20
+ }
21
+ exports.TypescriptNodeArrayRenderer = TypescriptNodeArrayRenderer;
22
+ //# sourceMappingURL=typescript_block_node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript_block_node.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/renderers/typescript_block_node.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAE5B,MAAa,2BAA2B;IAGtC,YAAoB,YAAkD,EAAU,MAA0C;QAAtG,iBAAY,GAAZ,YAAY,CAAsC;QAAU,WAAM,GAAN,MAAM,CAAoC;QAI1H,WAAM,GAAG,KAAK,IAAmB,EAAE;YACjC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;YACxC,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,oBAAE,CAAC,UAAU,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;YACvF,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC,CAAC;QAPA,IAAI,CAAC,OAAO,GAAG,oBAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,oBAAE,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtE,IAAI,CAAC,UAAU,GAAG,oBAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,EAAE,EAAE,oBAAE,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,oBAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAC1G,CAAC;CAMF;AAZD,kEAYC"}
@@ -0,0 +1,20 @@
1
+ import ts from 'typescript';
2
+ export type ResourceTsParameters = {
3
+ additionalImportedBackendIdentifiers?: Record<string, Set<string>>;
4
+ backendFunctionConstruct: string;
5
+ functionCallParameter: ts.ObjectLiteralExpression;
6
+ exportedVariableName: ts.Identifier;
7
+ postImportStatements?: ts.Node[];
8
+ postExportStatements?: ts.Node[];
9
+ };
10
+ export declare function renderResourceTsFile({ additionalImportedBackendIdentifiers, backendFunctionConstruct, functionCallParameter, exportedVariableName, postImportStatements, postExportStatements, }: ResourceTsParameters): ts.NodeArray<ts.Node>;
11
+ export type ResourceTsParametersList = {
12
+ additionalImportedBackendIdentifiers?: Record<string, Set<string>>;
13
+ backendFunctionConstruct: string;
14
+ functionCallParameter: ts.ObjectLiteralExpression[];
15
+ exportedVariableName: ts.Identifier[];
16
+ postImportStatements?: ts.Node[];
17
+ postExportStatements?: ts.Node[];
18
+ };
19
+ export declare function renderResourceTsFilesForFunction({ additionalImportedBackendIdentifiers, backendFunctionConstruct, functionCallParameter, exportedVariableName, postImportStatements, postExportStatements, }: ResourceTsParametersList): ts.NodeArray<ts.Node>;
20
+ //# sourceMappingURL=resource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/resource/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,MAAM,MAAM,oBAAoB,GAAG;IACjC,oCAAoC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,wBAAwB,EAAE,MAAM,CAAC;IACjC,qBAAqB,EAAE,EAAE,CAAC,uBAAuB,CAAC;IAClD,oBAAoB,EAAE,EAAE,CAAC,UAAU,CAAC;IACpC,oBAAoB,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;IACjC,oBAAoB,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;CAClC,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,EACnC,oCAAyC,EACzC,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,GACrB,EAAE,oBAAoB,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAiB9C;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,oCAAoC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,wBAAwB,EAAE,MAAM,CAAC;IACjC,qBAAqB,EAAE,EAAE,CAAC,uBAAuB,EAAE,CAAC;IACpD,oBAAoB,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC;IACtC,oBAAoB,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;IACjC,oBAAoB,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;CAClC,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,EAC/C,oCAAyC,EACzC,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,GACrB,EAAE,wBAAwB,GAAG,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAUlD"}
@@ -0,0 +1,60 @@
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.renderResourceTsFile = renderResourceTsFile;
7
+ exports.renderResourceTsFilesForFunction = renderResourceTsFilesForFunction;
8
+ const typescript_1 = __importDefault(require("typescript"));
9
+ const ts_factory_utils_1 = require("../ts_factory_utils");
10
+ const factory = typescript_1.default.factory;
11
+ function renderResourceTsFile({ additionalImportedBackendIdentifiers = {}, backendFunctionConstruct, functionCallParameter, exportedVariableName, postImportStatements, postExportStatements, }) {
12
+ const backendFunctionIdentifier = factory.createIdentifier(backendFunctionConstruct);
13
+ const importStatements = renderImportStatements(additionalImportedBackendIdentifiers);
14
+ const functionCall = factory.createCallExpression(backendFunctionIdentifier, undefined, [functionCallParameter]);
15
+ const exportedVariable = factory.createVariableDeclaration(exportedVariableName, undefined, undefined, functionCall);
16
+ const exportStatement = factory.createVariableStatement([factory.createModifier(typescript_1.default.SyntaxKind.ExportKeyword)], factory.createVariableDeclarationList([exportedVariable], typescript_1.default.NodeFlags.Const));
17
+ return factory.createNodeArray([
18
+ ...importStatements,
19
+ ...(postImportStatements !== undefined && postImportStatements.length > 0 ? [ts_factory_utils_1.newLineIdentifier, ...postImportStatements] : []),
20
+ ts_factory_utils_1.newLineIdentifier,
21
+ exportStatement,
22
+ ...(postExportStatements !== undefined && postExportStatements.length > 0 ? [ts_factory_utils_1.newLineIdentifier, ...postExportStatements] : []),
23
+ ]);
24
+ }
25
+ function renderResourceTsFilesForFunction({ additionalImportedBackendIdentifiers = {}, backendFunctionConstruct, functionCallParameter, exportedVariableName, postImportStatements, postExportStatements, }) {
26
+ const importStatements = renderImportStatements(additionalImportedBackendIdentifiers);
27
+ const exportStatements = renderExportStatementsForFunctions(backendFunctionConstruct, functionCallParameter, exportedVariableName);
28
+ return factory.createNodeArray([
29
+ ...importStatements,
30
+ ...(postImportStatements !== undefined && postImportStatements.length > 0 ? [ts_factory_utils_1.newLineIdentifier, ...postImportStatements] : []),
31
+ ...(exportStatements ? [ts_factory_utils_1.newLineIdentifier, ...exportStatements] : []),
32
+ ...(postExportStatements !== undefined && postExportStatements.length > 0 ? [ts_factory_utils_1.newLineIdentifier, ...postExportStatements] : []),
33
+ ]);
34
+ }
35
+ function renderImportStatements(additionalImportedBackendIdentifiers) {
36
+ const importStatements = [];
37
+ for (const [packageName, identifiers] of Object.entries(additionalImportedBackendIdentifiers)) {
38
+ const importSpecifiers = [];
39
+ identifiers.forEach((identifier) => {
40
+ importSpecifiers.push(factory.createImportSpecifier(false, undefined, factory.createIdentifier(identifier)));
41
+ });
42
+ const importStatement = factory.createImportDeclaration(undefined, factory.createImportClause(false, undefined, factory.createNamedImports(importSpecifiers)), factory.createStringLiteral(packageName));
43
+ importStatements.push(importStatement);
44
+ }
45
+ return importStatements;
46
+ }
47
+ function renderExportStatementsForFunctions(backendFunctionConstruct, functionCallParameter, exportedVariableName) {
48
+ const exportStatementList = [];
49
+ let i = 0;
50
+ for (const functionCallParam of functionCallParameter) {
51
+ const backendFunctionIdentifier = factory.createIdentifier(backendFunctionConstruct);
52
+ const functionCall = factory.createCallExpression(backendFunctionIdentifier, undefined, [functionCallParam]);
53
+ const exportedVariable = factory.createVariableDeclaration(exportedVariableName[i], undefined, undefined, functionCall);
54
+ const exportStatement = factory.createVariableStatement([factory.createModifier(typescript_1.default.SyntaxKind.ExportKeyword)], factory.createVariableDeclarationList([exportedVariable], typescript_1.default.NodeFlags.Const));
55
+ exportStatementList.push(typescript_1.default.addSyntheticLeadingComment(exportStatement, typescript_1.default.SyntaxKind.MultiLineCommentTrivia, `\nSource code for this function can be found in your Amplify Gen 1 Directory.\nSee amplify/backend/function/${exportedVariableName[i].escapedText}/src \n`, true));
56
+ i++;
57
+ }
58
+ return exportStatementList;
59
+ }
60
+ //# sourceMappingURL=resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/resource/resource.ts"],"names":[],"mappings":";;;;;AAYA,oDAwBC;AAWD,4EAiBC;AAhED,4DAA4B;AAC5B,0DAAwD;AACxD,MAAM,OAAO,GAAG,oBAAE,CAAC,OAAO,CAAC;AAU3B,SAAgB,oBAAoB,CAAC,EACnC,oCAAoC,GAAG,EAAE,EACzC,wBAAwB,EACxB,qBA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getImportRegex: (importIdentifier: string, importPackage: string) => RegExp;
2
+ //# sourceMappingURL=import_regex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import_regex.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/test_utils/import_regex.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,GAAI,kBAAkB,MAAM,EAAE,eAAe,MAAM,WACoB,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getImportRegex = void 0;
4
+ const getImportRegex = (importIdentifier, importPackage) => new RegExp(`import[\\s\\{a-zA-Z,]*${importIdentifier}[\\s,a-zA-Z]*\\} from "${importPackage}";`);
5
+ exports.getImportRegex = getImportRegex;
6
+ //# sourceMappingURL=import_regex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"import_regex.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/test_utils/import_regex.ts"],"names":[],"mappings":";;;AAAO,MAAM,cAAc,GAAG,CAAC,gBAAwB,EAAE,aAAqB,EAAE,EAAE,CAChF,IAAI,MAAM,CAAC,yBAAyB,gBAAgB,0BAA0B,aAAa,IAAI,CAAC,CAAC;AADtF,QAAA,cAAc,kBACwE"}
@@ -0,0 +1,4 @@
1
+ import ts from 'typescript';
2
+ export declare const printNode: (node: ts.Node) => string;
3
+ export declare const printNodeArray: (nodeArray: ts.NodeArray<ts.Node>) => string;
4
+ //# sourceMappingURL=ts_node_printer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts_node_printer.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/test_utils/ts_node_printer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,eAAO,MAAM,SAAS,GAAI,MAAM,EAAE,CAAC,IAAI,WAKtC,CAAC;AACF,eAAO,MAAM,cAAc,GAAI,WAAW,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,WAK9D,CAAC"}
@@ -0,0 +1,22 @@
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.printNodeArray = exports.printNode = void 0;
7
+ const typescript_1 = __importDefault(require("typescript"));
8
+ const printNode = (node) => {
9
+ const printer = typescript_1.default.createPrinter({ newLine: typescript_1.default.NewLineKind.LineFeed });
10
+ const sourceFile = typescript_1.default.createSourceFile('output.ts', '', typescript_1.default.ScriptTarget.Latest, false, typescript_1.default.ScriptKind.TS);
11
+ const source = printer.printNode(typescript_1.default.EmitHint.Unspecified, node, sourceFile);
12
+ return source;
13
+ };
14
+ exports.printNode = printNode;
15
+ const printNodeArray = (nodeArray) => {
16
+ const printer = typescript_1.default.createPrinter({ newLine: typescript_1.default.NewLineKind.LineFeed });
17
+ const sourceFile = typescript_1.default.createSourceFile('output.ts', '', typescript_1.default.ScriptTarget.Latest, false, typescript_1.default.ScriptKind.TS);
18
+ const source = printer.printList(typescript_1.default.ListFormat.MultiLine, nodeArray, sourceFile);
19
+ return source;
20
+ };
21
+ exports.printNodeArray = printNodeArray;
22
+ //# sourceMappingURL=ts_node_printer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts_node_printer.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/test_utils/ts_node_printer.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAErB,MAAM,SAAS,GAAG,CAAC,IAAa,EAAE,EAAE;IACzC,MAAM,OAAO,GAAG,oBAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,oBAAE,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvE,MAAM,UAAU,GAAG,oBAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,EAAE,EAAE,oBAAE,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,oBAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IACzG,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,oBAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IAC5E,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AALW,QAAA,SAAS,aAKpB;AACK,MAAM,cAAc,GAAG,CAAC,SAAgC,EAAE,EAAE;IACjE,MAAM,OAAO,GAAG,oBAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,oBAAE,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvE,MAAM,UAAU,GAAG,oBAAE,CAAC,gBAAgB,CAAC,WAAW,EAAE,EAAE,EAAE,oBAAE,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,oBAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IACzG,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,oBAAE,CAAC,UAAU,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IACjF,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AALW,QAAA,cAAc,kBAKzB"}
@@ -0,0 +1,3 @@
1
+ import ts from 'typescript';
2
+ export declare const createTodoError: (todoMessage: string) => ts.ThrowStatement;
3
+ //# sourceMappingURL=todo_error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todo_error.d.ts","sourceRoot":"","sources":["../../../../src/commands/gen2-migration/generate/todo_error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,eAAO,MAAM,eAAe,GAAI,aAAa,MAAM,sBAGhD,CAAC"}
@@ -0,0 +1,11 @@
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.createTodoError = void 0;
7
+ const typescript_1 = __importDefault(require("typescript"));
8
+ const factory = typescript_1.default.factory;
9
+ const createTodoError = (todoMessage) => factory.createThrowStatement(factory.createNewExpression(factory.createIdentifier('Error'), undefined, [factory.createStringLiteral(`TODO: ${todoMessage}`)]));
10
+ exports.createTodoError = createTodoError;
11
+ //# sourceMappingURL=todo_error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todo_error.js","sourceRoot":"","sources":["../../../../src/commands/gen2-migration/generate/todo_error.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,MAAM,OAAO,GAAG,oBAAE,CAAC,OAAO,CAAC;AAEpB,MAAM,eAAe,GAAG,CAAC,WAAmB,EAAE,EAAE,CACrD,OAAO,CAAC,oBAAoB,CAC1B,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,SAAS,WAAW,EAAE,CAAC,CAAC,CAAC,CACjI,CAAC;AAHS,QAAA,eAAe,mBAGxB"}
@@ -0,0 +1,3 @@
1
+ import ts from 'typescript';
2
+ export declare const newLineIdentifier: ts.Identifier;
3
+ //# sourceMappingURL=ts_factory_utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts_factory_utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/gen2-migration/generate/ts_factory_utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAI5B,eAAO,MAAM,iBAAiB,eAAiC,CAAC"}
@@ -0,0 +1,10 @@
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.newLineIdentifier = void 0;
7
+ const typescript_1 = __importDefault(require("typescript"));
8
+ const factory = typescript_1.default.factory;
9
+ exports.newLineIdentifier = factory.createIdentifier('\n');
10
+ //# sourceMappingURL=ts_factory_utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts_factory_utils.js","sourceRoot":"","sources":["../../../../src/commands/gen2-migration/generate/ts_factory_utils.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAE5B,MAAM,OAAO,GAAG,oBAAE,CAAC,OAAO,CAAC;AAEd,QAAA,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export interface Gen1ProjectConfig {
2
+ [key: string]: any;
3
+ }
4
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/commands/gen2-migration/generate/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,iBAAiB;IAEhC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/commands/gen2-migration/generate/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
1
+ import { CloudFormationClient } from '@aws-sdk/client-cloudformation';
2
+ export interface KinesisAnalyticsDefinition {
3
+ name?: string;
4
+ service: 'Kinesis' | 'Pinpoint';
5
+ providerMetadata: {
6
+ s3TemplateURL: string;
7
+ logicalId: string;
8
+ };
9
+ }
10
+ export interface AnalyticsCodegenResult {
11
+ stackClassName: string;
12
+ stackFileName: string;
13
+ resourceName: string;
14
+ shardCount: number;
15
+ }
16
+ export declare class CdkFromCfn {
17
+ private readonly dir;
18
+ private readonly fileWriter;
19
+ private readonly cfnClient?;
20
+ private readonly rootStackName?;
21
+ constructor(dir: string, fileWriter: (content: string, filePath: string) => Promise<void>, cfnClient?: CloudFormationClient, rootStackName?: string);
22
+ private getAnalyticsStackParameters;
23
+ generateKinesisAnalyticsL1Code(definition: KinesisAnalyticsDefinition): Promise<AnalyticsCodegenResult>;
24
+ private preTransmute;
25
+ }
26
+ //# sourceMappingURL=cdk-from-cfn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdk-from-cfn.d.ts","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/unsupported/cdk-from-cfn.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAmE,MAAM,gCAAgC,CAAC;AAMvI,MAAM,WAAW,0BAA0B;IAEzC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,OAAO,EAAE,SAAS,GAAG,UAAU,CAAC;IAEhC,gBAAgB,EAAE;QAChB,aAAa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAKD,MAAM,WAAW,sBAAsB;IAErC,cAAc,EAAE,MAAM,CAAC;IAEvB,aAAa,EAAE,MAAM,CAAC;IAEtB,YAAY,EAAE,MAAM,CAAC;IAErB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,UAAU;IAEnB,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC;gBAHd,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,EAChE,SAAS,CAAC,EAAE,oBAAoB,EAChC,aAAa,CAAC,EAAE,MAAM;YAO3B,2BAA2B;IAkC5B,8BAA8B,CAAC,UAAU,EAAE,0BAA0B,GAAG,OAAO,CAAC,sBAAsB,CAAC;YAiCtG,YAAY;CAkC3B"}