@aws-amplify/cli-internal-gen2-migration-experimental-alpha 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (704) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/adr/001-refactor-gen2-migration-generate.md +413 -0
  3. package/adr/002-refactor-gen2-migration-refactor.md +593 -0
  4. package/adr/003-gen2-migration-assess.md +414 -0
  5. package/adr/004-gen2-migration-validation-modeling.md +336 -0
  6. package/aws-amplify-cli-internal-gen2-migration-experimental-alpha-0.7.0.tgz +0 -0
  7. package/bin/amplify +1 -1
  8. package/lib/commands/drift-detection/detect-local-drift.d.ts +1 -2
  9. package/lib/commands/drift-detection/detect-local-drift.d.ts.map +1 -1
  10. package/lib/commands/drift-detection/detect-local-drift.js +19 -6
  11. package/lib/commands/drift-detection/detect-local-drift.js.map +1 -1
  12. package/lib/commands/drift-detection/detect-stack-drift.d.ts +20 -9
  13. package/lib/commands/drift-detection/detect-stack-drift.d.ts.map +1 -1
  14. package/lib/commands/drift-detection/detect-stack-drift.js +121 -151
  15. package/lib/commands/drift-detection/detect-stack-drift.js.map +1 -1
  16. package/lib/commands/drift-detection/detect-template-drift.d.ts +8 -21
  17. package/lib/commands/drift-detection/detect-template-drift.d.ts.map +1 -1
  18. package/lib/commands/drift-detection/detect-template-drift.js +81 -89
  19. package/lib/commands/drift-detection/detect-template-drift.js.map +1 -1
  20. package/lib/commands/drift-detection/index.d.ts +2 -3
  21. package/lib/commands/drift-detection/index.d.ts.map +1 -1
  22. package/lib/commands/drift-detection/index.js +1 -3
  23. package/lib/commands/drift-detection/index.js.map +1 -1
  24. package/lib/commands/drift-detection/services/amplify-config-service.d.ts +0 -1
  25. package/lib/commands/drift-detection/services/amplify-config-service.d.ts.map +1 -1
  26. package/lib/commands/drift-detection/services/amplify-config-service.js +0 -16
  27. package/lib/commands/drift-detection/services/amplify-config-service.js.map +1 -1
  28. package/lib/commands/drift-detection/services/cloudformation-service.d.ts +2 -4
  29. package/lib/commands/drift-detection/services/cloudformation-service.d.ts.map +1 -1
  30. package/lib/commands/drift-detection/services/cloudformation-service.js +7 -11
  31. package/lib/commands/drift-detection/services/cloudformation-service.js.map +1 -1
  32. package/lib/commands/drift-detection/services/drift-formatter.d.ts +3 -70
  33. package/lib/commands/drift-detection/services/drift-formatter.d.ts.map +1 -1
  34. package/lib/commands/drift-detection/services/drift-formatter.js +148 -603
  35. package/lib/commands/drift-detection/services/drift-formatter.js.map +1 -1
  36. package/lib/commands/drift-detection/services/index.d.ts +1 -2
  37. package/lib/commands/drift-detection/services/index.d.ts.map +1 -1
  38. package/lib/commands/drift-detection/services/index.js +2 -4
  39. package/lib/commands/drift-detection/services/index.js.map +1 -1
  40. package/lib/commands/drift.d.ts +7 -18
  41. package/lib/commands/drift.d.ts.map +1 -1
  42. package/lib/commands/drift.js +71 -172
  43. package/lib/commands/drift.js.map +1 -1
  44. package/lib/commands/gen2-migration/_infra/aws-clients.d.ts +31 -0
  45. package/lib/commands/gen2-migration/_infra/aws-clients.d.ts.map +1 -0
  46. package/lib/commands/gen2-migration/_infra/aws-clients.js +64 -0
  47. package/lib/commands/gen2-migration/_infra/aws-clients.js.map +1 -0
  48. package/lib/commands/gen2-migration/_infra/categories.d.ts +2 -0
  49. package/lib/commands/gen2-migration/_infra/categories.d.ts.map +1 -0
  50. package/lib/commands/gen2-migration/_infra/categories.js +32 -0
  51. package/lib/commands/gen2-migration/_infra/categories.js.map +1 -0
  52. package/lib/commands/gen2-migration/_infra/cfn-template.d.ts +52 -0
  53. package/lib/commands/gen2-migration/_infra/cfn-template.d.ts.map +1 -0
  54. package/lib/commands/gen2-migration/_infra/cfn-template.js +21 -0
  55. package/lib/commands/gen2-migration/_infra/cfn-template.js.map +1 -0
  56. package/lib/commands/gen2-migration/_infra/operation.d.ts +16 -0
  57. package/lib/commands/gen2-migration/_infra/operation.d.ts.map +1 -0
  58. package/lib/commands/gen2-migration/_infra/operation.js +3 -0
  59. package/lib/commands/gen2-migration/_infra/operation.js.map +1 -0
  60. package/lib/commands/gen2-migration/_infra/plan.d.ts +21 -0
  61. package/lib/commands/gen2-migration/_infra/plan.d.ts.map +1 -0
  62. package/lib/commands/gen2-migration/_infra/plan.js +111 -0
  63. package/lib/commands/gen2-migration/_infra/plan.js.map +1 -0
  64. package/lib/commands/gen2-migration/_infra/planner.d.ts +5 -0
  65. package/lib/commands/gen2-migration/_infra/planner.d.ts.map +1 -0
  66. package/lib/commands/gen2-migration/{generate/custom-resources/types.js → _infra/planner.js} +1 -1
  67. package/lib/commands/gen2-migration/_infra/planner.js.map +1 -0
  68. package/lib/commands/gen2-migration/_infra/spinning-logger.d.ts +25 -0
  69. package/lib/commands/gen2-migration/_infra/spinning-logger.d.ts.map +1 -0
  70. package/lib/commands/gen2-migration/_infra/spinning-logger.js +115 -0
  71. package/lib/commands/gen2-migration/_infra/spinning-logger.js.map +1 -0
  72. package/lib/commands/gen2-migration/_infra/stateful-resources.d.ts.map +1 -0
  73. package/lib/commands/gen2-migration/_infra/stateful-resources.js.map +1 -0
  74. package/lib/commands/gen2-migration/_infra/step.d.ts +15 -0
  75. package/lib/commands/gen2-migration/_infra/step.d.ts.map +1 -0
  76. package/lib/commands/gen2-migration/_infra/step.js +13 -0
  77. package/lib/commands/gen2-migration/_infra/step.js.map +1 -0
  78. package/lib/commands/gen2-migration/{_validations.d.ts → _infra/validations.d.ts} +6 -7
  79. package/lib/commands/gen2-migration/_infra/validations.d.ts.map +1 -0
  80. package/lib/commands/gen2-migration/{_validations.js → _infra/validations.js} +24 -60
  81. package/lib/commands/gen2-migration/_infra/validations.js.map +1 -0
  82. package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.d.ts +10 -0
  83. package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.d.ts.map +1 -0
  84. package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.js +15 -0
  85. package/lib/commands/gen2-migration/assess/analytics/kinesis.assessor.js.map +1 -0
  86. package/lib/commands/gen2-migration/assess/api/data.assessor.d.ts +10 -0
  87. package/lib/commands/gen2-migration/assess/api/data.assessor.d.ts.map +1 -0
  88. package/lib/commands/gen2-migration/assess/api/data.assessor.js +25 -0
  89. package/lib/commands/gen2-migration/assess/api/data.assessor.js.map +1 -0
  90. package/lib/commands/gen2-migration/assess/api/rest-api.assessor.d.ts +10 -0
  91. package/lib/commands/gen2-migration/assess/api/rest-api.assessor.d.ts.map +1 -0
  92. package/lib/commands/gen2-migration/assess/api/rest-api.assessor.js +25 -0
  93. package/lib/commands/gen2-migration/assess/api/rest-api.assessor.js.map +1 -0
  94. package/lib/commands/gen2-migration/assess/assessment.d.ts +42 -0
  95. package/lib/commands/gen2-migration/assess/assessment.d.ts.map +1 -0
  96. package/lib/commands/gen2-migration/assess/assessment.js +118 -0
  97. package/lib/commands/gen2-migration/assess/assessment.js.map +1 -0
  98. package/lib/commands/gen2-migration/assess/assessor.d.ts +5 -0
  99. package/lib/commands/gen2-migration/assess/assessor.d.ts.map +1 -0
  100. package/lib/commands/gen2-migration/{generate/types.js → assess/assessor.js} +1 -1
  101. package/lib/commands/gen2-migration/assess/assessor.js.map +1 -0
  102. package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.d.ts +10 -0
  103. package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.d.ts.map +1 -0
  104. package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.js +30 -0
  105. package/lib/commands/gen2-migration/assess/auth/auth-cognito.assessor.js.map +1 -0
  106. package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.d.ts +10 -0
  107. package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.d.ts.map +1 -0
  108. package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.js +24 -0
  109. package/lib/commands/gen2-migration/assess/auth/auth-user-pool-groups.assessor.js.map +1 -0
  110. package/lib/commands/gen2-migration/assess/function/function.assessor.d.ts +12 -0
  111. package/lib/commands/gen2-migration/assess/function/function.assessor.d.ts.map +1 -0
  112. package/lib/commands/gen2-migration/assess/function/function.assessor.js +40 -0
  113. package/lib/commands/gen2-migration/assess/function/function.assessor.js.map +1 -0
  114. package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.d.ts +10 -0
  115. package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.d.ts.map +1 -0
  116. package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.js +19 -0
  117. package/lib/commands/gen2-migration/assess/geo/geo-geofence-collection.assessor.js.map +1 -0
  118. package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.d.ts +10 -0
  119. package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.d.ts.map +1 -0
  120. package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.js +15 -0
  121. package/lib/commands/gen2-migration/assess/geo/geo-map.assessor.js.map +1 -0
  122. package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.d.ts +10 -0
  123. package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.d.ts.map +1 -0
  124. package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.js +15 -0
  125. package/lib/commands/gen2-migration/assess/geo/geo-place-index.assessor.js.map +1 -0
  126. package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.d.ts +10 -0
  127. package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.d.ts.map +1 -0
  128. package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.js +25 -0
  129. package/lib/commands/gen2-migration/assess/storage/dynamodb.assessor.js.map +1 -0
  130. package/lib/commands/gen2-migration/assess/storage/s3.assessor.d.ts +10 -0
  131. package/lib/commands/gen2-migration/assess/storage/s3.assessor.d.ts.map +1 -0
  132. package/lib/commands/gen2-migration/assess/storage/s3.assessor.js +25 -0
  133. package/lib/commands/gen2-migration/assess/storage/s3.assessor.js.map +1 -0
  134. package/lib/commands/gen2-migration/assess.d.ts +9 -0
  135. package/lib/commands/gen2-migration/assess.d.ts.map +1 -0
  136. package/lib/commands/gen2-migration/assess.js +80 -0
  137. package/lib/commands/gen2-migration/assess.js.map +1 -0
  138. package/lib/commands/gen2-migration/decommission.d.ts +6 -5
  139. package/lib/commands/gen2-migration/decommission.d.ts.map +1 -1
  140. package/lib/commands/gen2-migration/decommission.js +82 -25
  141. package/lib/commands/gen2-migration/decommission.js.map +1 -1
  142. package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.d.ts +32 -0
  143. package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.d.ts.map +1 -0
  144. package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.js +136 -0
  145. package/lib/commands/gen2-migration/generate/_infra/aws-fetcher.js.map +1 -0
  146. package/lib/commands/gen2-migration/generate/_infra/files.d.ts +2 -0
  147. package/lib/commands/gen2-migration/generate/_infra/files.d.ts.map +1 -0
  148. package/lib/commands/gen2-migration/generate/{codegen-head/directory_exists.js → _infra/files.js} +4 -5
  149. package/lib/commands/gen2-migration/generate/_infra/files.js.map +1 -0
  150. package/lib/commands/gen2-migration/generate/_infra/gen1-app.d.ts +40 -0
  151. package/lib/commands/gen2-migration/generate/_infra/gen1-app.d.ts.map +1 -0
  152. package/lib/commands/gen2-migration/generate/_infra/gen1-app.js +198 -0
  153. package/lib/commands/gen2-migration/generate/_infra/gen1-app.js.map +1 -0
  154. package/lib/commands/gen2-migration/generate/_infra/ts.d.ts +24 -0
  155. package/lib/commands/gen2-migration/generate/_infra/ts.d.ts.map +1 -0
  156. package/lib/commands/gen2-migration/generate/_infra/ts.js +128 -0
  157. package/lib/commands/gen2-migration/generate/_infra/ts.js.map +1 -0
  158. package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.d.ts +18 -0
  159. package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.d.ts.map +1 -0
  160. package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.js +126 -0
  161. package/lib/commands/gen2-migration/generate/amplify/analytics/cfn-condition-resolver.js.map +1 -0
  162. package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.d.ts +33 -0
  163. package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.d.ts.map +1 -0
  164. package/lib/commands/gen2-migration/generate/{unsupported/cdk-from-cfn.js → amplify/analytics/kinesis-cfn-converter.js} +94 -52
  165. package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis-cfn-converter.js.map +1 -0
  166. package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.d.ts +14 -0
  167. package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.d.ts.map +1 -0
  168. package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.js +69 -0
  169. package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.generator.js.map +1 -0
  170. package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.d.ts +18 -0
  171. package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.d.ts.map +1 -0
  172. package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.js +68 -0
  173. package/lib/commands/gen2-migration/generate/amplify/analytics/kinesis.renderer.js.map +1 -0
  174. package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.d.ts +24 -0
  175. package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.d.ts.map +1 -0
  176. package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.js +233 -0
  177. package/lib/commands/gen2-migration/generate/amplify/auth/auth.generator.js.map +1 -0
  178. package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.d.ts +78 -0
  179. package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.d.ts.map +1 -0
  180. package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.js +491 -0
  181. package/lib/commands/gen2-migration/generate/amplify/auth/auth.renderer.js.map +1 -0
  182. package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.d.ts +15 -0
  183. package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.d.ts.map +1 -0
  184. package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.js +75 -0
  185. package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.generator.js.map +1 -0
  186. package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.d.ts +13 -0
  187. package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.d.ts.map +1 -0
  188. package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.js +33 -0
  189. package/lib/commands/gen2-migration/generate/amplify/auth/reference-auth.renderer.js.map +1 -0
  190. package/lib/commands/gen2-migration/generate/amplify/backend.generator.d.ts +22 -0
  191. package/lib/commands/gen2-migration/generate/amplify/backend.generator.d.ts.map +1 -0
  192. package/lib/commands/gen2-migration/generate/amplify/backend.generator.js +150 -0
  193. package/lib/commands/gen2-migration/generate/amplify/backend.generator.js.map +1 -0
  194. package/lib/commands/gen2-migration/generate/{custom-resources/transformer → amplify/custom-resources}/amplify-helper-transformer.d.ts +4 -0
  195. package/lib/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.d.ts.map +1 -0
  196. package/lib/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.js +333 -0
  197. package/lib/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.js.map +1 -0
  198. package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.d.ts +17 -0
  199. package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.d.ts.map +1 -0
  200. package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.js +190 -0
  201. package/lib/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.js.map +1 -0
  202. package/lib/commands/gen2-migration/generate/amplify/data/data.generator.d.ts +15 -0
  203. package/lib/commands/gen2-migration/generate/amplify/data/data.generator.d.ts.map +1 -0
  204. package/lib/commands/gen2-migration/generate/amplify/data/data.generator.js +112 -0
  205. package/lib/commands/gen2-migration/generate/amplify/data/data.generator.js.map +1 -0
  206. package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.d.ts +22 -0
  207. package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.d.ts.map +1 -0
  208. package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.js +167 -0
  209. package/lib/commands/gen2-migration/generate/amplify/data/data.renderer.js.map +1 -0
  210. package/lib/commands/gen2-migration/generate/amplify/function/function.generator.d.ts +49 -0
  211. package/lib/commands/gen2-migration/generate/amplify/function/function.generator.d.ts.map +1 -0
  212. package/lib/commands/gen2-migration/generate/amplify/function/function.generator.js +626 -0
  213. package/lib/commands/gen2-migration/generate/amplify/function/function.generator.js.map +1 -0
  214. package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.d.ts +21 -0
  215. package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.d.ts.map +1 -0
  216. package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.js +105 -0
  217. package/lib/commands/gen2-migration/generate/amplify/function/function.renderer.js.map +1 -0
  218. package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.d.ts +49 -0
  219. package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.d.ts.map +1 -0
  220. package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.js +239 -0
  221. package/lib/commands/gen2-migration/generate/amplify/geo/geo-cfn-converter.js.map +1 -0
  222. package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.d.ts +14 -0
  223. package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.d.ts.map +1 -0
  224. package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.js +70 -0
  225. package/lib/commands/gen2-migration/generate/amplify/geo/geo.generator.js.map +1 -0
  226. package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.d.ts +13 -0
  227. package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.d.ts.map +1 -0
  228. package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.js +161 -0
  229. package/lib/commands/gen2-migration/generate/amplify/geo/geo.renderer.js.map +1 -0
  230. package/lib/commands/gen2-migration/generate/amplify/package.json.generator.d.ts +8 -0
  231. package/lib/commands/gen2-migration/generate/amplify/package.json.generator.d.ts.map +1 -0
  232. package/lib/commands/gen2-migration/generate/amplify/package.json.generator.js +28 -0
  233. package/lib/commands/gen2-migration/generate/amplify/package.json.generator.js.map +1 -0
  234. package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.d.ts +15 -0
  235. package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.d.ts.map +1 -0
  236. package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.js +162 -0
  237. package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.generator.js.map +1 -0
  238. package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.d.ts +51 -0
  239. package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.d.ts.map +1 -0
  240. package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.js +269 -0
  241. package/lib/commands/gen2-migration/generate/amplify/rest-api/rest-api.renderer.js.map +1 -0
  242. package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.d.ts +14 -0
  243. package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.d.ts.map +1 -0
  244. package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.js +96 -0
  245. package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.generator.js.map +1 -0
  246. package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.d.ts +30 -0
  247. package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.d.ts.map +1 -0
  248. package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.js +90 -0
  249. package/lib/commands/gen2-migration/generate/amplify/storage/dynamodb.renderer.js.map +1 -0
  250. package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.d.ts +22 -0
  251. package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.d.ts.map +1 -0
  252. package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.js +132 -0
  253. package/lib/commands/gen2-migration/generate/amplify/storage/s3.generator.js.map +1 -0
  254. package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.d.ts +31 -0
  255. package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.d.ts.map +1 -0
  256. package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.js +137 -0
  257. package/lib/commands/gen2-migration/generate/amplify/storage/s3.renderer.js.map +1 -0
  258. package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.d.ts +8 -0
  259. package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.d.ts.map +1 -0
  260. package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.js +45 -0
  261. package/lib/commands/gen2-migration/generate/amplify/tsconfig.generator.js.map +1 -0
  262. package/lib/commands/gen2-migration/generate/amplify.yml.generator.d.ts +9 -0
  263. package/lib/commands/gen2-migration/generate/amplify.yml.generator.d.ts.map +1 -0
  264. package/lib/commands/gen2-migration/generate/amplify.yml.generator.js +112 -0
  265. package/lib/commands/gen2-migration/generate/amplify.yml.generator.js.map +1 -0
  266. package/lib/commands/gen2-migration/generate/gitignore.generator.d.ts +6 -0
  267. package/lib/commands/gen2-migration/generate/gitignore.generator.d.ts.map +1 -0
  268. package/lib/commands/gen2-migration/generate/gitignore.generator.js +45 -0
  269. package/lib/commands/gen2-migration/generate/gitignore.generator.js.map +1 -0
  270. package/lib/commands/gen2-migration/generate/package.json.generator.d.ts +12 -0
  271. package/lib/commands/gen2-migration/generate/package.json.generator.d.ts.map +1 -0
  272. package/lib/commands/gen2-migration/generate/package.json.generator.js +83 -0
  273. package/lib/commands/gen2-migration/generate/package.json.generator.js.map +1 -0
  274. package/lib/commands/gen2-migration/generate.d.ts +6 -5
  275. package/lib/commands/gen2-migration/generate.d.ts.map +1 -1
  276. package/lib/commands/gen2-migration/generate.js +232 -17
  277. package/lib/commands/gen2-migration/generate.js.map +1 -1
  278. package/lib/commands/gen2-migration/lock.d.ts +10 -6
  279. package/lib/commands/gen2-migration/lock.d.ts.map +1 -1
  280. package/lib/commands/gen2-migration/lock.js +182 -64
  281. package/lib/commands/gen2-migration/lock.js.map +1 -1
  282. package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.d.ts +9 -0
  283. package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.d.ts.map +1 -0
  284. package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.js +19 -0
  285. package/lib/commands/gen2-migration/refactor/analytics/analytics-forward.js.map +1 -0
  286. package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.d.ts +9 -0
  287. package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.d.ts.map +1 -0
  288. package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.js +26 -0
  289. package/lib/commands/gen2-migration/refactor/analytics/analytics-rollback.js.map +1 -0
  290. package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.d.ts +21 -0
  291. package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.d.ts.map +1 -0
  292. package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.js +87 -0
  293. package/lib/commands/gen2-migration/refactor/auth/auth-cognito-forward.js.map +1 -0
  294. package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.d.ts +9 -0
  295. package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.d.ts.map +1 -0
  296. package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.js +44 -0
  297. package/lib/commands/gen2-migration/refactor/auth/auth-cognito-rollback.js.map +1 -0
  298. package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.d.ts +11 -0
  299. package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.d.ts.map +1 -0
  300. package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.js +33 -0
  301. package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-forward.js.map +1 -0
  302. package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.d.ts +9 -0
  303. package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.d.ts.map +1 -0
  304. package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.js +26 -0
  305. package/lib/commands/gen2-migration/refactor/auth/auth-user-pool-groups-rollback.js.map +1 -0
  306. package/lib/commands/gen2-migration/refactor/cfn.d.ts +41 -0
  307. package/lib/commands/gen2-migration/refactor/cfn.d.ts.map +1 -0
  308. package/lib/commands/gen2-migration/refactor/cfn.js +337 -0
  309. package/lib/commands/gen2-migration/refactor/cfn.js.map +1 -0
  310. package/lib/commands/gen2-migration/refactor/index.d.ts +1 -1
  311. package/lib/commands/gen2-migration/refactor/index.d.ts.map +1 -1
  312. package/lib/commands/gen2-migration/refactor/index.js +1 -1
  313. package/lib/commands/gen2-migration/refactor/index.js.map +1 -1
  314. package/lib/commands/gen2-migration/refactor/oauth-values-retriever.d.ts +23 -11
  315. package/lib/commands/gen2-migration/refactor/oauth-values-retriever.d.ts.map +1 -1
  316. package/lib/commands/gen2-migration/refactor/oauth-values-retriever.js +53 -45
  317. package/lib/commands/gen2-migration/refactor/oauth-values-retriever.js.map +1 -1
  318. package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.d.ts +2 -11
  319. package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.d.ts.map +1 -1
  320. package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.js +89 -123
  321. package/lib/commands/gen2-migration/refactor/resolvers/cfn-condition-resolver.js.map +1 -1
  322. package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.d.ts +2 -7
  323. package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.d.ts.map +1 -1
  324. package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.js +6 -22
  325. package/lib/commands/gen2-migration/refactor/resolvers/cfn-dependency-resolver.js.map +1 -1
  326. package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.d.ts +8 -12
  327. package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.d.ts.map +1 -1
  328. package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.js +105 -127
  329. package/lib/commands/gen2-migration/refactor/resolvers/cfn-output-resolver.js.map +1 -1
  330. package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.d.ts +2 -8
  331. package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.d.ts.map +1 -1
  332. package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.js +36 -41
  333. package/lib/commands/gen2-migration/refactor/resolvers/cfn-parameter-resolver.js.map +1 -1
  334. package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.d.ts +3 -0
  335. package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.d.ts.map +1 -0
  336. package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.js +18 -0
  337. package/lib/commands/gen2-migration/refactor/resolvers/cfn-tree-walker.js.map +1 -0
  338. package/lib/commands/gen2-migration/refactor/stack-facade.d.ts +13 -0
  339. package/lib/commands/gen2-migration/refactor/stack-facade.d.ts.map +1 -0
  340. package/lib/commands/gen2-migration/refactor/stack-facade.js +39 -0
  341. package/lib/commands/gen2-migration/refactor/stack-facade.js.map +1 -0
  342. package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.d.ts +8 -0
  343. package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.d.ts.map +1 -0
  344. package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.js +18 -0
  345. package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-forward.js.map +1 -0
  346. package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.d.ts +9 -0
  347. package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.d.ts.map +1 -0
  348. package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.js +26 -0
  349. package/lib/commands/gen2-migration/refactor/storage/storage-dynamo-rollback.js.map +1 -0
  350. package/lib/commands/gen2-migration/refactor/storage/storage-forward.d.ts +10 -0
  351. package/lib/commands/gen2-migration/refactor/storage/storage-forward.d.ts.map +1 -0
  352. package/lib/commands/gen2-migration/refactor/storage/storage-forward.js +36 -0
  353. package/lib/commands/gen2-migration/refactor/storage/storage-forward.js.map +1 -0
  354. package/lib/commands/gen2-migration/refactor/storage/storage-rollback.d.ts +9 -0
  355. package/lib/commands/gen2-migration/refactor/storage/storage-rollback.d.ts.map +1 -0
  356. package/lib/commands/gen2-migration/refactor/storage/storage-rollback.js +26 -0
  357. package/lib/commands/gen2-migration/refactor/storage/storage-rollback.js.map +1 -0
  358. package/lib/commands/gen2-migration/refactor/utils.d.ts +1 -1
  359. package/lib/commands/gen2-migration/refactor/utils.d.ts.map +1 -1
  360. package/lib/commands/gen2-migration/refactor/utils.js +2 -2
  361. package/lib/commands/gen2-migration/refactor/utils.js.map +1 -1
  362. package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.d.ts +52 -0
  363. package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.d.ts.map +1 -0
  364. package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.js +212 -0
  365. package/lib/commands/gen2-migration/refactor/workflow/category-refactorer.js.map +1 -0
  366. package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.d.ts +15 -0
  367. package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.d.ts.map +1 -0
  368. package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.js +148 -0
  369. package/lib/commands/gen2-migration/refactor/workflow/forward-category-refactorer.js.map +1 -0
  370. package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.d.ts +13 -0
  371. package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.d.ts.map +1 -0
  372. package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.js +123 -0
  373. package/lib/commands/gen2-migration/refactor/workflow/rollback-category-refactorer.js.map +1 -0
  374. package/lib/commands/gen2-migration/refactor.d.ts +11 -0
  375. package/lib/commands/gen2-migration/refactor.d.ts.map +1 -0
  376. package/lib/commands/gen2-migration/refactor.js +189 -0
  377. package/lib/commands/gen2-migration/refactor.js.map +1 -0
  378. package/lib/commands/gen2-migration.d.ts +0 -12
  379. package/lib/commands/gen2-migration.d.ts.map +1 -1
  380. package/lib/commands/gen2-migration.js +82 -111
  381. package/lib/commands/gen2-migration.js.map +1 -1
  382. package/package.json +22 -12
  383. package/aws-amplify-cli-internal-gen2-migration-experimental-alpha-0.5.0.tgz +0 -0
  384. package/lib/commands/drift-detection/services/file-service.d.ts +0 -7
  385. package/lib/commands/drift-detection/services/file-service.d.ts.map +0 -1
  386. package/lib/commands/drift-detection/services/file-service.js +0 -53
  387. package/lib/commands/drift-detection/services/file-service.js.map +0 -1
  388. package/lib/commands/gen2-migration/_step.d.ts +0 -17
  389. package/lib/commands/gen2-migration/_step.d.ts.map +0 -1
  390. package/lib/commands/gen2-migration/_step.js +0 -16
  391. package/lib/commands/gen2-migration/_step.js.map +0 -1
  392. package/lib/commands/gen2-migration/_validations.d.ts.map +0 -1
  393. package/lib/commands/gen2-migration/_validations.js.map +0 -1
  394. package/lib/commands/gen2-migration/cleanup.d.ts +0 -8
  395. package/lib/commands/gen2-migration/cleanup.d.ts.map +0 -1
  396. package/lib/commands/gen2-migration/cleanup.js +0 -21
  397. package/lib/commands/gen2-migration/cleanup.js.map +0 -1
  398. package/lib/commands/gen2-migration/clone.d.ts +0 -8
  399. package/lib/commands/gen2-migration/clone.d.ts.map +0 -1
  400. package/lib/commands/gen2-migration/clone.js +0 -21
  401. package/lib/commands/gen2-migration/clone.js.map +0 -1
  402. package/lib/commands/gen2-migration/generate/adapters/auth/index.d.ts +0 -24
  403. package/lib/commands/gen2-migration/generate/adapters/auth/index.d.ts.map +0 -1
  404. package/lib/commands/gen2-migration/generate/adapters/auth/index.js +0 -297
  405. package/lib/commands/gen2-migration/generate/adapters/auth/index.js.map +0 -1
  406. package/lib/commands/gen2-migration/generate/adapters/auth/index.test.d.ts +0 -2
  407. package/lib/commands/gen2-migration/generate/adapters/auth/index.test.d.ts.map +0 -1
  408. package/lib/commands/gen2-migration/generate/adapters/auth/index.test.js +0 -140
  409. package/lib/commands/gen2-migration/generate/adapters/auth/index.test.js.map +0 -1
  410. package/lib/commands/gen2-migration/generate/adapters/data/index.d.ts +0 -5
  411. package/lib/commands/gen2-migration/generate/adapters/data/index.d.ts.map +0 -1
  412. package/lib/commands/gen2-migration/generate/adapters/data/index.js +0 -17
  413. package/lib/commands/gen2-migration/generate/adapters/data/index.js.map +0 -1
  414. package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.d.ts +0 -10
  415. package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.d.ts.map +0 -1
  416. package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.js +0 -43
  417. package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.js.map +0 -1
  418. package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.d.ts +0 -2
  419. package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.d.ts.map +0 -1
  420. package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.js +0 -34
  421. package/lib/commands/gen2-migration/generate/adapters/functions/api-trigger-detector.test.js.map +0 -1
  422. package/lib/commands/gen2-migration/generate/adapters/functions/index.d.ts +0 -18
  423. package/lib/commands/gen2-migration/generate/adapters/functions/index.d.ts.map +0 -1
  424. package/lib/commands/gen2-migration/generate/adapters/functions/index.js +0 -85
  425. package/lib/commands/gen2-migration/generate/adapters/functions/index.js.map +0 -1
  426. package/lib/commands/gen2-migration/generate/adapters/project/index.d.ts +0 -2
  427. package/lib/commands/gen2-migration/generate/adapters/project/index.d.ts.map +0 -1
  428. package/lib/commands/gen2-migration/generate/adapters/project/index.js +0 -7
  429. package/lib/commands/gen2-migration/generate/adapters/project/index.js.map +0 -1
  430. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.d.ts +0 -31
  431. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.d.ts.map +0 -1
  432. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.js +0 -34
  433. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.js.map +0 -1
  434. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.d.ts +0 -2
  435. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.d.ts.map +0 -1
  436. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.js +0 -181
  437. package/lib/commands/gen2-migration/generate/adapters/storage/gen1_storage_codegen_adapter.test.js.map +0 -1
  438. package/lib/commands/gen2-migration/generate/adapters/storage/index.d.ts +0 -3
  439. package/lib/commands/gen2-migration/generate/adapters/storage/index.d.ts.map +0 -1
  440. package/lib/commands/gen2-migration/generate/adapters/storage/index.js +0 -10
  441. package/lib/commands/gen2-migration/generate/adapters/storage/index.js.map +0 -1
  442. package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.d.ts +0 -25
  443. package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.d.ts.map +0 -1
  444. package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.js +0 -76
  445. package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.js.map +0 -1
  446. package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.d.ts +0 -2
  447. package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.d.ts.map +0 -1
  448. package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.js +0 -125
  449. package/lib/commands/gen2-migration/generate/adapters/storage/storage_access.test.js.map +0 -1
  450. package/lib/commands/gen2-migration/generate/backend/synthesizer.d.ts +0 -91
  451. package/lib/commands/gen2-migration/generate/backend/synthesizer.d.ts.map +0 -1
  452. package/lib/commands/gen2-migration/generate/backend/synthesizer.js +0 -1014
  453. package/lib/commands/gen2-migration/generate/backend/synthesizer.js.map +0 -1
  454. package/lib/commands/gen2-migration/generate/backend/synthesizer.test.d.ts +0 -2
  455. package/lib/commands/gen2-migration/generate/backend/synthesizer.test.d.ts.map +0 -1
  456. package/lib/commands/gen2-migration/generate/backend/synthesizer.test.js +0 -777
  457. package/lib/commands/gen2-migration/generate/backend/synthesizer.test.js.map +0 -1
  458. package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.d.ts +0 -14
  459. package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.d.ts.map +0 -1
  460. package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.js +0 -82
  461. package/lib/commands/gen2-migration/generate/codegen-head/amplify_stack_parser.js.map +0 -1
  462. package/lib/commands/gen2-migration/generate/codegen-head/analytics.d.ts +0 -10
  463. package/lib/commands/gen2-migration/generate/codegen-head/analytics.d.ts.map +0 -1
  464. package/lib/commands/gen2-migration/generate/codegen-head/analytics.js +0 -11
  465. package/lib/commands/gen2-migration/generate/codegen-head/analytics.js.map +0 -1
  466. package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.d.ts +0 -7
  467. package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.d.ts.map +0 -1
  468. package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.js +0 -80
  469. package/lib/commands/gen2-migration/generate/codegen-head/api-cfn-access.js.map +0 -1
  470. package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.d.ts +0 -13
  471. package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.d.ts.map +0 -1
  472. package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.js +0 -59
  473. package/lib/commands/gen2-migration/generate/codegen-head/app_analytics_definition_fetcher.js.map +0 -1
  474. package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.d.ts +0 -24
  475. package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.d.ts.map +0 -1
  476. package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.js +0 -167
  477. package/lib/commands/gen2-migration/generate/codegen-head/app_auth_definition_fetcher.js.map +0 -1
  478. package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.d.ts +0 -21
  479. package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.d.ts.map +0 -1
  480. package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.js +0 -135
  481. package/lib/commands/gen2-migration/generate/codegen-head/app_functions_definition_fetcher.js.map +0 -1
  482. package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.d.ts +0 -23
  483. package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.d.ts.map +0 -1
  484. package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.js +0 -181
  485. package/lib/commands/gen2-migration/generate/codegen-head/app_storage_definition_fetcher.js.map +0 -1
  486. package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.d.ts +0 -12
  487. package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.d.ts.map +0 -1
  488. package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.js +0 -157
  489. package/lib/commands/gen2-migration/generate/codegen-head/auth_access_analyzer.js.map +0 -1
  490. package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.d.ts +0 -10
  491. package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.d.ts.map +0 -1
  492. package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.js +0 -48
  493. package/lib/commands/gen2-migration/generate/codegen-head/backend_downloader.js.map +0 -1
  494. package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.d.ts +0 -11
  495. package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.d.ts.map +0 -1
  496. package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.js +0 -38
  497. package/lib/commands/gen2-migration/generate/codegen-head/backend_environment_selector.js.map +0 -1
  498. package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.d.ts +0 -13
  499. package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.d.ts.map +0 -1
  500. package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.js +0 -498
  501. package/lib/commands/gen2-migration/generate/codegen-head/command-handlers.js.map +0 -1
  502. package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.d.ts +0 -47
  503. package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.d.ts.map +0 -1
  504. package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.js +0 -222
  505. package/lib/commands/gen2-migration/generate/codegen-head/data_definition_fetcher.js.map +0 -1
  506. package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.d.ts +0 -10
  507. package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.d.ts.map +0 -1
  508. package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.js +0 -59
  509. package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.js.map +0 -1
  510. package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.d.ts +0 -2
  511. package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.d.ts.map +0 -1
  512. package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.js +0 -90
  513. package/lib/commands/gen2-migration/generate/codegen-head/data_model_access_parser.test.js.map +0 -1
  514. package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.d.ts +0 -2
  515. package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.d.ts.map +0 -1
  516. package/lib/commands/gen2-migration/generate/codegen-head/directory_exists.js.map +0 -1
  517. package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.d.ts +0 -14
  518. package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.d.ts.map +0 -1
  519. package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.js +0 -100
  520. package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.js.map +0 -1
  521. package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.d.ts +0 -2
  522. package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.d.ts.map +0 -1
  523. package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.js +0 -69
  524. package/lib/commands/gen2-migration/generate/codegen-head/dynamodb_cfn_access_parser.test.js.map +0 -1
  525. package/lib/commands/gen2-migration/generate/codegen-head/format.d.ts +0 -8
  526. package/lib/commands/gen2-migration/generate/codegen-head/format.d.ts.map +0 -1
  527. package/lib/commands/gen2-migration/generate/codegen-head/format.js +0 -66
  528. package/lib/commands/gen2-migration/generate/codegen-head/format.js.map +0 -1
  529. package/lib/commands/gen2-migration/generate/codegen-head/logger.d.ts +0 -15
  530. package/lib/commands/gen2-migration/generate/codegen-head/logger.d.ts.map +0 -1
  531. package/lib/commands/gen2-migration/generate/codegen-head/logger.js +0 -14
  532. package/lib/commands/gen2-migration/generate/codegen-head/logger.js.map +0 -1
  533. package/lib/commands/gen2-migration/generate/codegen-head/printer.d.ts +0 -26
  534. package/lib/commands/gen2-migration/generate/codegen-head/printer.d.ts.map +0 -1
  535. package/lib/commands/gen2-migration/generate/codegen-head/printer.js +0 -103
  536. package/lib/commands/gen2-migration/generate/codegen-head/printer.js.map +0 -1
  537. package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.d.ts +0 -13
  538. package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.d.ts.map +0 -1
  539. package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.js +0 -66
  540. package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.js.map +0 -1
  541. package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.d.ts +0 -2
  542. package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.d.ts.map +0 -1
  543. package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.js +0 -97
  544. package/lib/commands/gen2-migration/generate/codegen-head/s3_cfn_access_parser.test.js.map +0 -1
  545. package/lib/commands/gen2-migration/generate/core/migration-pipeline.d.ts +0 -26
  546. package/lib/commands/gen2-migration/generate/core/migration-pipeline.d.ts.map +0 -1
  547. package/lib/commands/gen2-migration/generate/core/migration-pipeline.js +0 -269
  548. package/lib/commands/gen2-migration/generate/core/migration-pipeline.js.map +0 -1
  549. package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.d.ts +0 -7
  550. package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.d.ts.map +0 -1
  551. package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.js +0 -84
  552. package/lib/commands/gen2-migration/generate/custom-resources/generator/backend-updater.js.map +0 -1
  553. package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.d.ts +0 -8
  554. package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.d.ts.map +0 -1
  555. package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.js +0 -105
  556. package/lib/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.js.map +0 -1
  557. package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.d.ts +0 -5
  558. package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.d.ts.map +0 -1
  559. package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.js +0 -88
  560. package/lib/commands/gen2-migration/generate/custom-resources/generator/file-converter.js.map +0 -1
  561. package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.d.ts +0 -8
  562. package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.d.ts.map +0 -1
  563. package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.js +0 -36
  564. package/lib/commands/gen2-migration/generate/custom-resources/generator/gen2-file-generator.js.map +0 -1
  565. package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.d.ts +0 -5
  566. package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.d.ts.map +0 -1
  567. package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.js +0 -81
  568. package/lib/commands/gen2-migration/generate/custom-resources/parser/cdk-stack-parser.js.map +0 -1
  569. package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.d.ts +0 -15
  570. package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.d.ts.map +0 -1
  571. package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.js +0 -35
  572. package/lib/commands/gen2-migration/generate/custom-resources/parser/pattern-detector.js.map +0 -1
  573. package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.d.ts +0 -5
  574. package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.d.ts.map +0 -1
  575. package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.js +0 -66
  576. package/lib/commands/gen2-migration/generate/custom-resources/scanner/custom-resource-scanner.js.map +0 -1
  577. package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.d.ts.map +0 -1
  578. package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.js +0 -178
  579. package/lib/commands/gen2-migration/generate/custom-resources/transformer/amplify-helper-transformer.js.map +0 -1
  580. package/lib/commands/gen2-migration/generate/custom-resources/types.d.ts +0 -38
  581. package/lib/commands/gen2-migration/generate/custom-resources/types.d.ts.map +0 -1
  582. package/lib/commands/gen2-migration/generate/custom-resources/types.js.map +0 -1
  583. package/lib/commands/gen2-migration/generate/generators/analytics/index.d.ts +0 -9
  584. package/lib/commands/gen2-migration/generate/generators/analytics/index.d.ts.map +0 -1
  585. package/lib/commands/gen2-migration/generate/generators/analytics/index.js +0 -40
  586. package/lib/commands/gen2-migration/generate/generators/analytics/index.js.map +0 -1
  587. package/lib/commands/gen2-migration/generate/generators/auth/index.d.ts +0 -107
  588. package/lib/commands/gen2-migration/generate/generators/auth/index.d.ts.map +0 -1
  589. package/lib/commands/gen2-migration/generate/generators/auth/index.js +0 -313
  590. package/lib/commands/gen2-migration/generate/generators/auth/index.js.map +0 -1
  591. package/lib/commands/gen2-migration/generate/generators/auth/index.test.d.ts +0 -2
  592. package/lib/commands/gen2-migration/generate/generators/auth/index.test.d.ts.map +0 -1
  593. package/lib/commands/gen2-migration/generate/generators/auth/index.test.js +0 -566
  594. package/lib/commands/gen2-migration/generate/generators/auth/index.test.js.map +0 -1
  595. package/lib/commands/gen2-migration/generate/generators/data/index.d.ts +0 -35
  596. package/lib/commands/gen2-migration/generate/generators/data/index.d.ts.map +0 -1
  597. package/lib/commands/gen2-migration/generate/generators/data/index.js +0 -185
  598. package/lib/commands/gen2-migration/generate/generators/data/index.js.map +0 -1
  599. package/lib/commands/gen2-migration/generate/generators/data/index.test.d.ts +0 -2
  600. package/lib/commands/gen2-migration/generate/generators/data/index.test.d.ts.map +0 -1
  601. package/lib/commands/gen2-migration/generate/generators/data/index.test.js +0 -47
  602. package/lib/commands/gen2-migration/generate/generators/data/index.test.js.map +0 -1
  603. package/lib/commands/gen2-migration/generate/generators/functions/index.d.ts +0 -53
  604. package/lib/commands/gen2-migration/generate/generators/functions/index.d.ts.map +0 -1
  605. package/lib/commands/gen2-migration/generate/generators/functions/index.js +0 -125
  606. package/lib/commands/gen2-migration/generate/generators/functions/index.js.map +0 -1
  607. package/lib/commands/gen2-migration/generate/generators/functions/lambda.d.ts +0 -6
  608. package/lib/commands/gen2-migration/generate/generators/functions/lambda.d.ts.map +0 -1
  609. package/lib/commands/gen2-migration/generate/generators/functions/lambda.js +0 -16
  610. package/lib/commands/gen2-migration/generate/generators/functions/lambda.js.map +0 -1
  611. package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.d.ts +0 -3
  612. package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.d.ts.map +0 -1
  613. package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.js +0 -106
  614. package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.js.map +0 -1
  615. package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.d.ts +0 -2
  616. package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.d.ts.map +0 -1
  617. package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.js +0 -120
  618. package/lib/commands/gen2-migration/generate/generators/functions/lambda_env_generator.test.js.map +0 -1
  619. package/lib/commands/gen2-migration/generate/generators/storage/access.d.ts +0 -4
  620. package/lib/commands/gen2-migration/generate/generators/storage/access.d.ts.map +0 -1
  621. package/lib/commands/gen2-migration/generate/generators/storage/access.js +0 -73
  622. package/lib/commands/gen2-migration/generate/generators/storage/access.js.map +0 -1
  623. package/lib/commands/gen2-migration/generate/generators/storage/index.d.ts +0 -37
  624. package/lib/commands/gen2-migration/generate/generators/storage/index.d.ts.map +0 -1
  625. package/lib/commands/gen2-migration/generate/generators/storage/index.js +0 -78
  626. package/lib/commands/gen2-migration/generate/generators/storage/index.js.map +0 -1
  627. package/lib/commands/gen2-migration/generate/npm_package/renderer.d.ts +0 -27
  628. package/lib/commands/gen2-migration/generate/npm_package/renderer.d.ts.map +0 -1
  629. package/lib/commands/gen2-migration/generate/npm_package/renderer.js +0 -28
  630. package/lib/commands/gen2-migration/generate/npm_package/renderer.js.map +0 -1
  631. package/lib/commands/gen2-migration/generate/render_pipeline.d.ts +0 -9
  632. package/lib/commands/gen2-migration/generate/render_pipeline.d.ts.map +0 -1
  633. package/lib/commands/gen2-migration/generate/render_pipeline.js +0 -15
  634. package/lib/commands/gen2-migration/generate/render_pipeline.js.map +0 -1
  635. package/lib/commands/gen2-migration/generate/renderers/ensure_directory.d.ts +0 -7
  636. package/lib/commands/gen2-migration/generate/renderers/ensure_directory.d.ts.map +0 -1
  637. package/lib/commands/gen2-migration/generate/renderers/ensure_directory.js +0 -17
  638. package/lib/commands/gen2-migration/generate/renderers/ensure_directory.js.map +0 -1
  639. package/lib/commands/gen2-migration/generate/renderers/package_json.d.ts +0 -8
  640. package/lib/commands/gen2-migration/generate/renderers/package_json.d.ts.map +0 -1
  641. package/lib/commands/gen2-migration/generate/renderers/package_json.js +0 -15
  642. package/lib/commands/gen2-migration/generate/renderers/package_json.js.map +0 -1
  643. package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.d.ts +0 -11
  644. package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.d.ts.map +0 -1
  645. package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.js +0 -22
  646. package/lib/commands/gen2-migration/generate/renderers/typescript_block_node.js.map +0 -1
  647. package/lib/commands/gen2-migration/generate/resource/resource.d.ts +0 -20
  648. package/lib/commands/gen2-migration/generate/resource/resource.d.ts.map +0 -1
  649. package/lib/commands/gen2-migration/generate/resource/resource.js +0 -60
  650. package/lib/commands/gen2-migration/generate/resource/resource.js.map +0 -1
  651. package/lib/commands/gen2-migration/generate/test_utils/import_regex.d.ts +0 -2
  652. package/lib/commands/gen2-migration/generate/test_utils/import_regex.d.ts.map +0 -1
  653. package/lib/commands/gen2-migration/generate/test_utils/import_regex.js +0 -6
  654. package/lib/commands/gen2-migration/generate/test_utils/import_regex.js.map +0 -1
  655. package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.d.ts +0 -4
  656. package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.d.ts.map +0 -1
  657. package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.js +0 -22
  658. package/lib/commands/gen2-migration/generate/test_utils/ts_node_printer.js.map +0 -1
  659. package/lib/commands/gen2-migration/generate/todo_error.d.ts +0 -3
  660. package/lib/commands/gen2-migration/generate/todo_error.d.ts.map +0 -1
  661. package/lib/commands/gen2-migration/generate/todo_error.js +0 -11
  662. package/lib/commands/gen2-migration/generate/todo_error.js.map +0 -1
  663. package/lib/commands/gen2-migration/generate/ts_factory_utils.d.ts +0 -3
  664. package/lib/commands/gen2-migration/generate/ts_factory_utils.d.ts.map +0 -1
  665. package/lib/commands/gen2-migration/generate/ts_factory_utils.js +0 -10
  666. package/lib/commands/gen2-migration/generate/ts_factory_utils.js.map +0 -1
  667. package/lib/commands/gen2-migration/generate/types.d.ts +0 -4
  668. package/lib/commands/gen2-migration/generate/types.d.ts.map +0 -1
  669. package/lib/commands/gen2-migration/generate/types.js.map +0 -1
  670. package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.d.ts +0 -26
  671. package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.d.ts.map +0 -1
  672. package/lib/commands/gen2-migration/generate/unsupported/cdk-from-cfn.js.map +0 -1
  673. package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.d.ts +0 -5
  674. package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.d.ts.map +0 -1
  675. package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.js +0 -76
  676. package/lib/commands/gen2-migration/refactor/cfn-stack-refactor-updater.js.map +0 -1
  677. package/lib/commands/gen2-migration/refactor/cfn-stack-updater.d.ts +0 -6
  678. package/lib/commands/gen2-migration/refactor/cfn-stack-updater.d.ts.map +0 -1
  679. package/lib/commands/gen2-migration/refactor/cfn-stack-updater.js +0 -52
  680. package/lib/commands/gen2-migration/refactor/cfn-stack-updater.js.map +0 -1
  681. package/lib/commands/gen2-migration/refactor/generators/category-template-generator.d.ts +0 -40
  682. package/lib/commands/gen2-migration/refactor/generators/category-template-generator.d.ts.map +0 -1
  683. package/lib/commands/gen2-migration/refactor/generators/category-template-generator.js +0 -321
  684. package/lib/commands/gen2-migration/refactor/generators/category-template-generator.js.map +0 -1
  685. package/lib/commands/gen2-migration/refactor/generators/template-generator.d.ts +0 -48
  686. package/lib/commands/gen2-migration/refactor/generators/template-generator.d.ts.map +0 -1
  687. package/lib/commands/gen2-migration/refactor/generators/template-generator.js +0 -513
  688. package/lib/commands/gen2-migration/refactor/generators/template-generator.js.map +0 -1
  689. package/lib/commands/gen2-migration/refactor/refactor.d.ts +0 -19
  690. package/lib/commands/gen2-migration/refactor/refactor.d.ts.map +0 -1
  691. package/lib/commands/gen2-migration/refactor/refactor.js +0 -241
  692. package/lib/commands/gen2-migration/refactor/refactor.js.map +0 -1
  693. package/lib/commands/gen2-migration/refactor/types.d.ts +0 -128
  694. package/lib/commands/gen2-migration/refactor/types.d.ts.map +0 -1
  695. package/lib/commands/gen2-migration/refactor/types.js +0 -59
  696. package/lib/commands/gen2-migration/refactor/types.js.map +0 -1
  697. package/lib/commands/gen2-migration/shift.d.ts +0 -8
  698. package/lib/commands/gen2-migration/shift.d.ts.map +0 -1
  699. package/lib/commands/gen2-migration/shift.js +0 -21
  700. package/lib/commands/gen2-migration/shift.js.map +0 -1
  701. package/lib/commands/gen2-migration/stateful-resources.d.ts.map +0 -1
  702. package/lib/commands/gen2-migration/stateful-resources.js.map +0 -1
  703. /package/lib/commands/gen2-migration/{stateful-resources.d.ts → _infra/stateful-resources.d.ts} +0 -0
  704. /package/lib/commands/gen2-migration/{stateful-resources.js → _infra/stateful-resources.js} +0 -0
@@ -1,269 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createGen2Renderer = void 0;
7
- const path_1 = __importDefault(require("path"));
8
- const promises_1 = __importDefault(require("node:fs/promises"));
9
- const renderer_1 = require("../npm_package/renderer");
10
- const render_pipeline_1 = require("../render_pipeline");
11
- const package_json_1 = require("../renderers/package_json");
12
- const typescript_block_node_1 = require("../renderers/typescript_block_node");
13
- const synthesizer_1 = require("../backend/synthesizer");
14
- const ensure_directory_1 = require("../renderers/ensure_directory");
15
- const index_1 = require("../generators/auth/index");
16
- const storage_1 = require("../generators/storage");
17
- const index_2 = require("../generators/data/index");
18
- const api_trigger_detector_1 = require("../adapters/functions/api-trigger-detector");
19
- const index_3 = require("../generators/functions/index");
20
- const assert_1 = __importDefault(require("assert"));
21
- const cdk_from_cfn_1 = require("../unsupported/cdk-from-cfn");
22
- const index_4 = require("../generators/analytics/index");
23
- const createFileWriter = (path) => async (content) => promises_1.default.writeFile(path, content);
24
- const extractGen1FunctionDependencies = async (resourceName) => {
25
- try {
26
- const packageJsonPath = path_1.default.join('amplify', 'backend', 'function', resourceName, 'src', 'package.json');
27
- const packageContent = await promises_1.default.readFile(packageJsonPath, 'utf-8');
28
- const packageJson = JSON.parse(packageContent);
29
- return {
30
- dependencies: packageJson.dependencies,
31
- devDependencies: packageJson.devDependencies,
32
- };
33
- }
34
- catch (_a) {
35
- return {};
36
- }
37
- };
38
- const mergeAllFunctionDependencies = async (functions) => {
39
- const functionDeps = {};
40
- const functionDevDeps = {};
41
- const mergeWithHighestVersion = (target, source) => {
42
- for (const [pkg, version] of Object.entries(source)) {
43
- if (!target[pkg] || version > target[pkg]) {
44
- target[pkg] = version;
45
- }
46
- }
47
- };
48
- for (const func of functions) {
49
- if (func.resourceName) {
50
- const deps = await extractGen1FunctionDependencies(func.resourceName);
51
- mergeWithHighestVersion(functionDeps, deps.dependencies || {});
52
- mergeWithHighestVersion(functionDevDeps, deps.devDependencies || {});
53
- }
54
- }
55
- return { dependencies: functionDeps, devDependencies: functionDevDeps };
56
- };
57
- const copyGen1FunctionFiles = async (resourceName, destDir, fileWriter) => {
58
- try {
59
- const gen1SrcDir = path_1.default.join('amplify', 'backend', 'function', resourceName, 'src');
60
- const srcEntries = await promises_1.default.readdir(gen1SrcDir, { recursive: true, withFileTypes: true });
61
- for (const entry of srcEntries) {
62
- if (entry.isFile()) {
63
- const file = path_1.default.relative(gen1SrcDir, path_1.default.join(entry.parentPath, entry.name));
64
- const fileName = path_1.default.basename(file);
65
- const skipFiles = ['package.json', 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml'];
66
- if (!skipFiles.includes(fileName)) {
67
- const srcPath = path_1.default.join(gen1SrcDir, file);
68
- const content = await promises_1.default.readFile(srcPath, 'utf-8');
69
- const destFile = file;
70
- const destPath = path_1.default.join(destDir, destFile);
71
- await promises_1.default.mkdir(path_1.default.dirname(destPath), { recursive: true });
72
- await fileWriter(content, destPath);
73
- }
74
- }
75
- }
76
- }
77
- catch (error) {
78
- throw new Error(`Failed to copy Gen 1 function files for '${resourceName}': ${error instanceof Error ? error.message : 'Unknown error'}`);
79
- }
80
- };
81
- const createGen2Renderer = ({ outputDir, auth, storage, data, functions, analytics, customResources, backendEnvironmentName, rootStackName, cfnClient, unsupportedCategories, fileWriter = (content, path) => createFileWriter(path)(content), }) => {
82
- var _a;
83
- const ensureOutputDir = new ensure_directory_1.EnsureDirectory(outputDir);
84
- const ensureAmplifyDirectory = new ensure_directory_1.EnsureDirectory(path_1.default.join(outputDir, 'amplify'));
85
- const amplifyPackageJson = new package_json_1.JsonRenderer(async () => {
86
- const { dependencies: functionDeps, devDependencies: functionDevDeps } = (functions === null || functions === void 0 ? void 0 : functions.length)
87
- ? await mergeAllFunctionDependencies(functions)
88
- : { dependencies: {}, devDependencies: {} };
89
- return { type: 'module', dependencies: functionDeps, devDependencies: functionDevDeps };
90
- }, (content) => fileWriter(content, path_1.default.join(outputDir, 'amplify', 'package.json')));
91
- const jsonRenderer = new package_json_1.JsonRenderer(async () => {
92
- let packageJson = {
93
- name: 'my-gen2-app',
94
- };
95
- try {
96
- const packageJsonContents = await promises_1.default.readFile(`./package.json`, { encoding: 'utf-8' });
97
- packageJson = JSON.parse(packageJsonContents);
98
- }
99
- catch (e) {
100
- }
101
- return (0, renderer_1.patchNpmPackageJson)(packageJson, {
102
- 'aws-cdk': '^2',
103
- 'aws-cdk-lib': '^2',
104
- 'ci-info': '^4.3.1',
105
- constructs: '^10.0.0',
106
- '@types/node': '*',
107
- '@aws-amplify/backend': '^1.18.0',
108
- '@aws-amplify/backend-cli': '^1.8.0',
109
- '@aws-amplify/backend-data': '^1.6.2',
110
- tsx: '^4.20.6',
111
- esbuild: '^0.27.0',
112
- });
113
- }, (content) => fileWriter(content, path_1.default.join(outputDir, 'package.json')));
114
- const amplifyTsConfigJson = new package_json_1.JsonRenderer(async () => ({
115
- compilerOptions: {
116
- target: 'es2022',
117
- module: 'es2022',
118
- moduleResolution: 'bundler',
119
- resolveJsonModule: true,
120
- esModuleInterop: true,
121
- forceConsistentCasingInFileNames: true,
122
- strict: true,
123
- skipLibCheck: true,
124
- paths: {
125
- '$amplify/*': ['../.amplify/generated/*'],
126
- },
127
- },
128
- }), (content) => fileWriter(content, path_1.default.join(outputDir, 'amplify', 'tsconfig.json')));
129
- const backendSynthesizer = new synthesizer_1.BackendSynthesizer();
130
- const backendRenderOptions = {};
131
- const renderers = [ensureOutputDir, ensureAmplifyDirectory, amplifyPackageJson, amplifyTsConfigJson, jsonRenderer];
132
- if (unsupportedCategories && unsupportedCategories.size >= 1) {
133
- backendRenderOptions.unsupportedCategories = unsupportedCategories;
134
- }
135
- if (analytics) {
136
- console.log('There are Analytics found in the Gen1 App');
137
- const cdkFromCfn = new cdk_from_cfn_1.CdkFromCfn(outputDir, fileWriter, cfnClient, rootStackName);
138
- const analyticsDir = path_1.default.join(outputDir, 'amplify', 'analytics');
139
- renderers.push(new ensure_directory_1.EnsureDirectory(analyticsDir));
140
- for (const analyticName of Object.keys(analytics)) {
141
- const analyticObj = analytics[analyticName];
142
- analyticObj.name = analyticName;
143
- if (analyticObj.service === 'Kinesis') {
144
- console.log('Analytics backed by Kinesis found, generating L1 Code');
145
- renderers.push(new typescript_block_node_1.TypescriptNodeArrayRenderer(async () => {
146
- const codegenResult = await cdkFromCfn.generateKinesisAnalyticsL1Code(analyticObj);
147
- const analyticsParams = {
148
- stackClassName: codegenResult.stackClassName,
149
- stackFileName: codegenResult.stackFileName,
150
- resourceName: codegenResult.resourceName,
151
- shardCount: codegenResult.shardCount,
152
- };
153
- return (0, index_4.renderAnalytics)(analyticsParams);
154
- }, (content) => fileWriter(content, path_1.default.join(analyticsDir, 'resource.ts'))));
155
- backendRenderOptions.analytics = { importFrom: './analytics/resource' };
156
- }
157
- else {
158
- console.log('Analytics backed by Pinpoint found, still unsupported');
159
- }
160
- }
161
- }
162
- const functionNames = [];
163
- const functionNamesAndCategory = new Map();
164
- const functionsWithApiAccess = new Map();
165
- const functionsWithDataModelAccess = new Map();
166
- const dynamoTriggers = functions ? api_trigger_detector_1.ApiTriggerDetector.detectDynamoTriggers(functions) : [];
167
- if (functions && functions.length) {
168
- const functionEnvironments = new Map();
169
- for (const func of functions) {
170
- if (func.name) {
171
- if (!((_a = func.runtime) === null || _a === void 0 ? void 0 : _a.startsWith('nodejs'))) {
172
- throw new Error(`Function '${func.name}' uses unsupported runtime '${func.runtime}'. Gen 2 migration only supports Node.js functions.`);
173
- }
174
- const resourceName = func.resourceName;
175
- (0, assert_1.default)(resourceName);
176
- const funcCategory = func.category;
177
- (0, assert_1.default)(funcCategory);
178
- functionNamesAndCategory.set(resourceName, funcCategory);
179
- functionNames.push(resourceName);
180
- if (func.filteredEnvironmentVariables && Object.keys(func.filteredEnvironmentVariables).length > 0) {
181
- functionEnvironments.set(resourceName, func.filteredEnvironmentVariables);
182
- }
183
- if (func.apiPermissions &&
184
- (func.apiPermissions.hasQuery || func.apiPermissions.hasMutation || func.apiPermissions.hasSubscription)) {
185
- functionsWithApiAccess.set(resourceName, func.apiPermissions);
186
- }
187
- if (func.dataModelAccess && func.dataModelAccess.length > 0) {
188
- functionsWithDataModelAccess.set(resourceName, func.dataModelAccess);
189
- }
190
- const dirPath = path_1.default.join(outputDir, 'amplify', funcCategory, resourceName);
191
- renderers.push(new ensure_directory_1.EnsureDirectory(dirPath));
192
- renderers.push(new typescript_block_node_1.TypescriptNodeArrayRenderer(async () => (0, index_3.renderFunctions)(func), (content) => {
193
- return fileWriter(content, path_1.default.join(dirPath, 'resource.ts')).then(() => copyGen1FunctionFiles(resourceName, dirPath, fileWriter));
194
- }));
195
- }
196
- }
197
- backendRenderOptions.function = {
198
- importFrom: './function/resource',
199
- functionNamesAndCategories: functionNamesAndCategory,
200
- functionsWithApiAccess: functionsWithApiAccess.size > 0 ? functionsWithApiAccess : undefined,
201
- functionEnvironments: functionEnvironments,
202
- functionsWithDataModelAccess: functionsWithDataModelAccess.size > 0 ? functionsWithDataModelAccess : undefined,
203
- };
204
- }
205
- if (auth) {
206
- const functionCategories = new Map();
207
- if (functions) {
208
- functions.forEach((func) => {
209
- if (func.resourceName && func.category) {
210
- functionCategories.set(func.resourceName, func.category);
211
- }
212
- });
213
- }
214
- renderers.push(new ensure_directory_1.EnsureDirectory(path_1.default.join(outputDir, 'amplify', 'auth')));
215
- renderers.push(new typescript_block_node_1.TypescriptNodeArrayRenderer(async () => (0, index_1.renderAuthNode)(auth, functions, functionCategories), async (content) => {
216
- let cleanedContent = content.replace(/\(allow, _unused\)/g, '(allow: any)');
217
- cleanedContent = cleanedContent.replace(/(access: \(allow: any\) => \[[\s\S]*?\n {4}\])/g, '$1,');
218
- return fileWriter(cleanedContent, path_1.default.join(outputDir, 'amplify', 'auth', 'resource.ts'));
219
- }));
220
- backendRenderOptions.auth = {
221
- importFrom: './auth/resource',
222
- userPoolOverrides: auth === null || auth === void 0 ? void 0 : auth.userPoolOverrides,
223
- guestLogin: auth === null || auth === void 0 ? void 0 : auth.guestLogin,
224
- identityPoolName: auth === null || auth === void 0 ? void 0 : auth.identityPoolName,
225
- oAuthFlows: auth === null || auth === void 0 ? void 0 : auth.oAuthFlows,
226
- readAttributes: auth === null || auth === void 0 ? void 0 : auth.readAttributes,
227
- writeAttributes: auth === null || auth === void 0 ? void 0 : auth.writeAttributes,
228
- referenceAuth: auth === null || auth === void 0 ? void 0 : auth.referenceAuth,
229
- userPoolClient: auth === null || auth === void 0 ? void 0 : auth.userPoolClient,
230
- };
231
- }
232
- if (data) {
233
- renderers.push(new ensure_directory_1.EnsureDirectory(path_1.default.join(outputDir, 'amplify', 'data')));
234
- renderers.push(new typescript_block_node_1.TypescriptNodeArrayRenderer(async () => (0, index_2.generateDataSource)(backendEnvironmentName, data), (content) => fileWriter(content, path_1.default.join(outputDir, 'amplify', 'data', 'resource.ts'))));
235
- backendRenderOptions.data = {
236
- importFrom: './data/resource',
237
- additionalAuthProviders: data.additionalAuthProviders,
238
- restApis: data.restApis,
239
- };
240
- }
241
- if (storage) {
242
- const hasS3Bucket = (storage === null || storage === void 0 ? void 0 : storage.accessPatterns) || (storage === null || storage === void 0 ? void 0 : storage.storageIdentifier);
243
- if (hasS3Bucket) {
244
- renderers.push(new ensure_directory_1.EnsureDirectory(path_1.default.join(outputDir, 'amplify', 'storage')));
245
- renderers.push(new typescript_block_node_1.TypescriptNodeArrayRenderer(async () => (0, storage_1.renderStorage)({ ...storage, functionNamesAndCategories: functionNamesAndCategory }), (content) => fileWriter(content, path_1.default.join(outputDir, 'amplify', 'storage', 'resource.ts'))));
246
- }
247
- backendRenderOptions.storage = {
248
- importFrom: './storage/resource',
249
- dynamoTables: storage.dynamoTables,
250
- dynamoFunctionAccess: storage.dynamoFunctionAccess,
251
- accelerateConfiguration: storage.accelerateConfiguration,
252
- versionConfiguration: storage.versioningConfiguration,
253
- hasS3Bucket: hasS3Bucket,
254
- bucketEncryptionAlgorithm: storage.bucketEncryptionAlgorithm,
255
- bucketName: storage.bucketName,
256
- };
257
- }
258
- if (customResources && customResources.size > 0) {
259
- backendRenderOptions.customResources = customResources;
260
- }
261
- if (dynamoTriggers && dynamoTriggers.length > 0) {
262
- backendRenderOptions.dynamoTriggers = dynamoTriggers;
263
- }
264
- const backendRenderer = new typescript_block_node_1.TypescriptNodeArrayRenderer(async () => backendSynthesizer.render(backendRenderOptions), (content) => fileWriter(content, path_1.default.join(outputDir, 'amplify', 'backend.ts')));
265
- renderers.push(backendRenderer);
266
- return new render_pipeline_1.RenderPipeline(renderers);
267
- };
268
- exports.createGen2Renderer = createGen2Renderer;
269
- //# sourceMappingURL=migration-pipeline.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migration-pipeline.js","sourceRoot":"","sources":["../../../../../src/commands/gen2-migration/generate/core/migration-pipeline.ts"],"names":[],"mappings":";;;;;;AAcA,gDAAwB;AACxB,gEAAkC;AAClC,sDAA2E;AAC3E,wDAA8D;AAC9D,4DAAyD;AACzD,8EAAiF;AACjF,wDAAqF;AACrF,oEAAgE;AAEhE,oDAyBkC;AAClC,mDAQ+B;AAE/B,oDAAgG;AAEhG,qFAAgF;AAEhF,yDAAoF;AACpF,oDAA4B;AAC5B,8DAA6G;AAC7G,yDAA2F;AAsD3F,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,EAAE,OAAe,EAAE,EAAE,CAAC,kBAAE,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAOlG,MAAM,+BAA+B,GAAG,KAAK,EAC3C,YAAoB,EAC0E,EAAE;IAChG,IAAI,CAAC;QACH,MAAM,eAAe,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;QACzG,MAAM,cAAc,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;QACnE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAC/C,OAAO;YACL,YAAY,EAAE,WAAW,CAAC,YAAY;YACtC,eAAe,EAAE,WAAW,CAAC,eAAe;SAC7C,CAAC;IACJ,CAAC;IAAC,WAAM,CAAC;QAEP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC,CAAC;AAOF,MAAM,4BAA4B,GAAG,KAAK,EACxC,SAA+B,EAC6D,EAAE;IAC9F,MAAM,YAAY,GAA2B,EAAE,CAAC;IAChD,MAAM,eAAe,GAA2B,EAAE,CAAC;IAEnD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oB,CAAC,cAAc,GAAG,cAAc,CAAC;IACvD,CAAC;IAGD,MAAM,eAAe,GAAG,IAAI,mDAA2B,CACrD,KAAK,IAAI,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAC3D,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,CAChF,CAAC;IAEF,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAGhC,OAAO,IAAI,gCAAc,CAAC,SAAS,CAAC,CAAC;AACvC,CAAC,CAAC;AA9SW,QAAA,kBAAkB,sBA8S7B"}
@@ -1,7 +0,0 @@
1
- export declare class BackendUpdater {
2
- updateBackendFile(backendFilePath: string, customResources: Map<string, string>): Promise<void>;
3
- private createImport;
4
- private createInstantiation;
5
- private injectIntoBackend;
6
- }
7
- //# sourceMappingURL=backend-updater.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"backend-updater.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/custom-resources/generator/backend-updater.ts"],"names":[],"mappings":"AAGA,qBAAa,cAAc;IAInB,iBAAiB,CAAC,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBrG,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,iBAAiB;CAuB1B"}
@@ -1,84 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.BackendUpdater = void 0;
37
- const fs_1 = require("fs");
38
- const ts = __importStar(require("typescript"));
39
- class BackendUpdater {
40
- async updateBackendFile(backendFilePath, customResources) {
41
- if (customResources.size === 0) {
42
- return;
43
- }
44
- const content = await fs_1.promises.readFile(backendFilePath, 'utf-8');
45
- const sourceFile = ts.createSourceFile(backendFilePath, content, ts.ScriptTarget.Latest, true);
46
- const imports = [];
47
- const instantiations = [];
48
- const entries = Array.from(customResources.entries());
49
- for (let i = 0; i < entries.length; i++) {
50
- const [resourceName, className] = entries[i];
51
- imports.push(this.createImport(resourceName, className));
52
- instantiations.push(this.createInstantiation(resourceName, className));
53
- }
54
- const updatedFile = this.injectIntoBackend(sourceFile, imports, instantiations);
55
- const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed });
56
- const updatedContent = printer.printFile(updatedFile);
57
- await fs_1.promises.writeFile(backendFilePath, updatedContent, 'utf-8');
58
- }
59
- createImport(resourceName, className) {
60
- return ts.factory.createImportDeclaration(undefined, ts.factory.createImportClause(false, undefined, ts.factory.createNamedImports([
61
- ts.factory.createImportSpecifier(false, ts.factory.createIdentifier(className), ts.factory.createIdentifier(resourceName)),
62
- ])), ts.factory.createStringLiteral(`./custom/${resourceName}/resource`));
63
- }
64
- createInstantiation(resourceName, className) {
65
- return ts.factory.createExpressionStatement(ts.factory.createNewExpression(ts.factory.createIdentifier(resourceName), undefined, [
66
- ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(ts.factory.createIdentifier('backend'), 'createStack'), undefined, [ts.factory.createStringLiteral(resourceName)]),
67
- ts.factory.createStringLiteral(resourceName),
68
- ]));
69
- }
70
- injectIntoBackend(sourceFile, imports, instantiations) {
71
- const statements = [...sourceFile.statements];
72
- let lastImportIndex = -1;
73
- for (let i = 0; i < statements.length; i++) {
74
- if (ts.isImportDeclaration(statements[i])) {
75
- lastImportIndex = i;
76
- }
77
- }
78
- statements.splice(lastImportIndex + 1, 0, ...imports);
79
- statements.push(...instantiations);
80
- return ts.factory.updateSourceFile(sourceFile, statements);
81
- }
82
- }
83
- exports.BackendUpdater = BackendUpdater;
84
- //# sourceMappingURL=backend-updater.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"backend-updater.js","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/custom-resources/generator/backend-updater.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAAoC;AACpC,+CAAiC;AAEjC,MAAa,cAAc;IAIzB,KAAK,CAAC,iBAAiB,CAAC,eAAuB,EAAE,eAAoC;QACnF,IAAI,eAAe,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO;QACT,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,aAAE,CAAC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;QAC5D,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CAAC,eAAe,EAAE,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,C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CAAC,CAAC;QAEnC,OAAO,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC7D,CAAC;CACF;AA9ED,wCA8EC"}
@@ -1,8 +0,0 @@
1
- export declare class DependencyMerger {
2
- mergeDependencies(customResourcesPath: string, targetPackageJsonPath: string): Promise<void>;
3
- private collectCustomDependencies;
4
- private readPackageJson;
5
- private mergeDeps;
6
- private isNewerVersion;
7
- }
8
- //# sourceMappingURL=dependency-merger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dependency-merger.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.ts"],"names":[],"mappings":"AAQA,qBAAa,gBAAgB;IAIrB,iBAAiB,CAAC,mBAAmB,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAcpF,yBAAyB;YAwBzB,eAAe;IAK7B,OAAO,CAAC,SAAS;IAgBjB,OAAO,CAAC,cAAc;CAgBvB"}
@@ -1,105 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.DependencyMerger = void 0;
37
- const fs_1 = require("fs");
38
- const path = __importStar(require("path"));
39
- class DependencyMerger {
40
- async mergeDependencies(customResourcesPath, targetPackageJsonPath) {
41
- const customDeps = await this.collectCustomDependencies(customResourcesPath);
42
- if (Object.keys(customDeps.dependencies).length === 0 && Object.keys(customDeps.devDependencies).length === 0) {
43
- return;
44
- }
45
- const targetPackageJson = await this.readPackageJson(targetPackageJsonPath);
46
- targetPackageJson.dependencies = this.mergeDeps(targetPackageJson.dependencies || {}, customDeps.dependencies);
47
- targetPackageJson.devDependencies = this.mergeDeps(targetPackageJson.devDependencies || {}, customDeps.devDependencies);
48
- await fs_1.promises.writeFile(targetPackageJsonPath, JSON.stringify(targetPackageJson, null, 2) + '\n', 'utf-8');
49
- }
50
- async collectCustomDependencies(customResourcesPath) {
51
- const collected = { dependencies: {}, devDependencies: {} };
52
- try {
53
- const resources = await fs_1.promises.readdir(customResourcesPath);
54
- for (let i = 0; i < resources.length; i++) {
55
- const resource = resources[i];
56
- const packageJsonPath = path.join(customResourcesPath, resource, 'package.json');
57
- try {
58
- const pkg = await this.readPackageJson(packageJsonPath);
59
- collected.dependencies = this.mergeDeps(collected.dependencies || {}, pkg.dependencies || {});
60
- collected.devDependencies = this.mergeDeps(collected.devDependencies || {}, pkg.devDependencies || {});
61
- }
62
- catch (_a) {
63
- }
64
- }
65
- }
66
- catch (_b) {
67
- }
68
- return collected;
69
- }
70
- async readPackageJson(filePath) {
71
- const content = await fs_1.promises.readFile(filePath, 'utf-8');
72
- return JSON.parse(content);
73
- }
74
- mergeDeps(target, source) {
75
- const merged = { ...target };
76
- const entries = Object.entries(source);
77
- for (let i = 0; i < entries.length; i++) {
78
- const [pkg, version] = entries[i];
79
- if (!merged[pkg]) {
80
- merged[pkg] = version;
81
- }
82
- else if (this.isNewerVersion(version, merged[pkg])) {
83
- merged[pkg] = version;
84
- }
85
- }
86
- return merged;
87
- }
88
- isNewerVersion(v1, v2) {
89
- const clean1 = v1.replace(/^[\^~]/, '');
90
- const clean2 = v2.replace(/^[\^~]/, '');
91
- const parts1 = clean1.split('.').map(Number);
92
- const parts2 = clean2.split('.').map(Number);
93
- for (let i = 0; i < Math.max(parts1.length, parts2.length); i++) {
94
- const p1 = parts1[i] || 0;
95
- const p2 = parts2[i] || 0;
96
- if (p1 > p2)
97
- return true;
98
- if (p1 < p2)
99
- return false;
100
- }
101
- return false;
102
- }
103
- }
104
- exports.DependencyMerger = DependencyMerger;
105
- //# sourceMappingURL=dependency-merger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dependency-merger.js","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/custom-resources/generator/dependency-merger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAAoC;AACpC,2CAA6B;AAO7B,MAAa,gBAAgB;IAI3B,KAAK,CAAC,iBAAiB,CAAC,mBAA2B,EAAE,qBAA6B;QAChF,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,CAAC;QAC7E,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9G,OAAO;QACT,CAAC;QAED,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;QAE5E,iBA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G,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC7C,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAE7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAChE,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC1B,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC1B,IAAI,EAAE,GAAG,EAAE;gBAAE,OAAO,IAAI,CAAC;YACzB,IAAI,EAAE,GAAG,EAAE;gBAAE,OAAO,KAAK,CAAC;QAC5B,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA/ED,4CA+EC"}
@@ -1,5 +0,0 @@
1
- export declare class FileConverter {
2
- convertCdkStackToResource(customResourcesPath: string): Promise<void>;
3
- removeBuildArtifacts(customResourcesPath: string): Promise<void>;
4
- }
5
- //# sourceMappingURL=file-converter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-converter.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/custom-resources/generator/file-converter.ts"],"names":[],"mappings":"AAGA,qBAAa,aAAa;IAIlB,yBAAyB,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA6BrE,oBAAoB,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CA2BvE"}
@@ -1,88 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.FileConverter = void 0;
37
- const fs_1 = require("fs");
38
- const path = __importStar(require("path"));
39
- class FileConverter {
40
- async convertCdkStackToResource(customResourcesPath) {
41
- try {
42
- const resources = await fs_1.promises.readdir(customResourcesPath);
43
- for (let i = 0; i < resources.length; i++) {
44
- const resource = resources[i];
45
- const resourceDir = path.join(customResourcesPath, resource);
46
- const stat = await fs_1.promises.stat(resourceDir);
47
- if (stat.isDirectory()) {
48
- const cdkStackPath = path.join(resourceDir, 'cdk-stack.ts');
49
- const resourceFilePath = path.join(resourceDir, 'resource.ts');
50
- try {
51
- await fs_1.promises.access(cdkStackPath);
52
- await fs_1.promises.rename(cdkStackPath, resourceFilePath);
53
- }
54
- catch (_a) {
55
- }
56
- }
57
- }
58
- }
59
- catch (_b) {
60
- }
61
- }
62
- async removeBuildArtifacts(customResourcesPath) {
63
- const artifactsToRemove = ['build', 'node_modules', '.npmrc', 'yarn.lock', 'tsconfig.json'];
64
- try {
65
- const resources = await fs_1.promises.readdir(customResourcesPath);
66
- for (let i = 0; i < resources.length; i++) {
67
- const resource = resources[i];
68
- const resourceDir = path.join(customResourcesPath, resource);
69
- const stat = await fs_1.promises.stat(resourceDir);
70
- if (stat.isDirectory()) {
71
- for (let j = 0; j < artifactsToRemove.length; j++) {
72
- const artifact = artifactsToRemove[j];
73
- const artifactPath = path.join(resourceDir, artifact);
74
- try {
75
- await fs_1.promises.rm(artifactPath, { recursive: true, force: true });
76
- }
77
- catch (_a) {
78
- }
79
- }
80
- }
81
- }
82
- }
83
- catch (_b) {
84
- }
85
- }
86
- }
87
- exports.FileConverter = FileConverter;
88
- //# sourceMappingURL=file-converter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-converter.js","sourceRoot":"","sources":["../../../../../../src/commands/gen2-migration/generate/custom-resources/generator/file-converter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAAoC;AACpC,2CAA6B;AAE7B,MAAa,aAAa;IAIxB,KAAK,CAAC,yBAAyB,CAAC,mBAA2B;QACzD,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,MAAM,aAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;YAExD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC1C,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;gBAC9B,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC;gBAC7D,MAAM,IAAI,GAAG,MAAM,aAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAExC,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;oBACvB,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,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AAC;4BACH,MAAM,aAAE,CAAC,EAAE,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;wBAC9D,CAAC;wBAAC,WAAM,CAAC;wBAET,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAAC,WAAM,CAAC;QAET,CAAC;IACH,CAAC;CACF;AA5DD,sCA4DC"}
@@ -1,8 +0,0 @@
1
- import { TransformResult } from '../types';
2
- export declare class Gen2FileGenerator {
3
- generateResourceFile(transform: TransformResult): string;
4
- private generateImports;
5
- private generateClassDeclaration;
6
- private indentCode;
7
- }
8
- //# sourceMappingURL=gen2-file-generator.d.ts.map