@aws/nx-plugin 1.0.0-rc.79 → 1.0.0-rc.80

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 (469) hide show
  1. package/generators.json +10 -0
  2. package/migrations.json +1 -1
  3. package/package.json +1 -1
  4. package/src/agentcore-gateway/agent-connection/generator.d.ts +1 -1
  5. package/src/agentcore-gateway/agent-connection/generator.js.map +1 -1
  6. package/src/agentcore-gateway/agent-connection/schema.d.js.map +1 -1
  7. package/src/agentcore-gateway/agent-connection/schema.d.ts +1 -1
  8. package/src/agentcore-gateway/attach-upstream.js.map +1 -1
  9. package/src/agentcore-gateway/gateway-connection/generator.d.ts +1 -1
  10. package/src/agentcore-gateway/gateway-connection/generator.js.map +1 -1
  11. package/src/agentcore-gateway/gateway-connection/schema.d.js.map +1 -1
  12. package/src/agentcore-gateway/gateway-connection/schema.d.ts +1 -1
  13. package/src/agentcore-gateway/generator.d.ts +3 -3
  14. package/src/agentcore-gateway/generator.js.map +1 -1
  15. package/src/agentcore-gateway/mcp-connection/generator.d.ts +1 -1
  16. package/src/agentcore-gateway/mcp-connection/generator.js.map +1 -1
  17. package/src/agentcore-gateway/mcp-connection/schema.d.js.map +1 -1
  18. package/src/agentcore-gateway/mcp-connection/schema.d.ts +1 -1
  19. package/src/agentcore-gateway/react-connection/generator.d.ts +1 -1
  20. package/src/agentcore-gateway/react-connection/generator.js.map +1 -1
  21. package/src/agentcore-gateway/react-connection/schema.d.js.map +1 -1
  22. package/src/agentcore-gateway/react-connection/schema.d.ts +1 -1
  23. package/src/agentcore-gateway/schema.d.js.map +1 -1
  24. package/src/agentcore-gateway/schema.d.ts +1 -1
  25. package/src/agentcore-harness/generator.d.ts +4 -4
  26. package/src/agentcore-harness/generator.js.map +1 -1
  27. package/src/agentcore-harness/schema.d.js.map +1 -1
  28. package/src/agentcore-harness/schema.d.ts +1 -1
  29. package/src/connection/agent-local-dev.d.ts +1 -1
  30. package/src/connection/agent-local-dev.js.map +1 -1
  31. package/src/connection/agent-runtime-config.js.map +1 -1
  32. package/src/connection/gateway-runtime-config.js.map +1 -1
  33. package/src/connection/generator.d.ts +2 -2
  34. package/src/connection/generator.js.map +1 -1
  35. package/src/connection/local-dev.js.map +1 -1
  36. package/src/connection/scaffold-catalog.d.ts +1 -1
  37. package/src/connection/scaffold-catalog.js +6 -6
  38. package/src/connection/scaffold-catalog.js.map +1 -1
  39. package/src/connection/schema-resolver.d.ts +1 -1
  40. package/src/connection/schema-resolver.js.map +1 -1
  41. package/src/index.d.ts +1 -1
  42. package/src/index.js.map +1 -1
  43. package/src/infra/app/generator.d.ts +7 -7
  44. package/src/infra/app/generator.js.map +1 -1
  45. package/src/init/generator.d.ts +3 -3
  46. package/src/init/generator.js.map +1 -1
  47. package/src/init/schema.d.js.map +1 -1
  48. package/src/init/schema.d.ts +2 -2
  49. package/src/internal/test-matrix/generator.js.map +1 -1
  50. package/src/license/config-types.d.ts +2 -2
  51. package/src/license/config-types.js.map +1 -1
  52. package/src/license/config.d.ts +2 -2
  53. package/src/license/config.js.map +1 -1
  54. package/src/license/dependency-check/check.d.ts +2 -2
  55. package/src/license/dependency-check/check.js.map +1 -1
  56. package/src/license/dependency-check/collectors/collector.js.map +1 -1
  57. package/src/license/dependency-check/collectors/python-collector.js.map +1 -1
  58. package/src/license/dependency-check/evaluator.d.ts +1 -1
  59. package/src/license/dependency-check/evaluator.js.map +1 -1
  60. package/src/license/dependency-check/executor.js.map +1 -1
  61. package/src/license/dependency-check/pre-approved.d.ts +1 -1
  62. package/src/license/dependency-check/pre-approved.js.map +1 -1
  63. package/src/license/dependency-check/types.d.ts +1 -1
  64. package/src/license/dependency-check/types.js.map +1 -1
  65. package/src/license/generator.d.ts +1 -1
  66. package/src/license/generator.js.map +1 -1
  67. package/src/license/index.d.ts +4 -4
  68. package/src/license/index.js.map +1 -1
  69. package/src/license/known-exceptions.d.ts +1 -1
  70. package/src/license/known-exceptions.js.map +1 -1
  71. package/src/license/sync/generator.js.map +1 -1
  72. package/src/license/sync/project-file-sync.d.ts +1 -1
  73. package/src/license/sync/project-file-sync.js.map +1 -1
  74. package/src/mcp-server/dev-server.js.map +1 -1
  75. package/src/mcp-server/generator-info.d.ts +3 -3
  76. package/src/mcp-server/generator-info.js.map +1 -1
  77. package/src/mcp-server/guide-pipeline.d.ts +1 -1
  78. package/src/mcp-server/guide-pipeline.js.map +1 -1
  79. package/src/mcp-server/guide-render.js.map +1 -1
  80. package/src/mcp-server/index.js.map +1 -1
  81. package/src/mcp-server/mdx-ast.js.map +1 -1
  82. package/src/mcp-server/server.js.map +1 -1
  83. package/src/mcp-server/tools/add-to-existing-project.d.ts +1 -1
  84. package/src/mcp-server/tools/add-to-existing-project.js.map +1 -1
  85. package/src/mcp-server/tools/create-workspace-command.js.map +1 -1
  86. package/src/mcp-server/tools/general-guidance.d.ts +1 -1
  87. package/src/mcp-server/tools/general-guidance.js +1 -1
  88. package/src/mcp-server/tools/general-guidance.js.map +1 -1
  89. package/src/mcp-server/tools/generator-guide.d.ts +1 -1
  90. package/src/mcp-server/tools/generator-guide.js.map +1 -1
  91. package/src/mcp-server/tools/list-generators.d.ts +1 -1
  92. package/src/mcp-server/tools/list-generators.js.map +1 -1
  93. package/src/mcp-server/tools/upgrade-workspace.d.ts +1 -1
  94. package/src/mcp-server/tools/upgrade-workspace.js.map +1 -1
  95. package/src/migrations/latest/apt-security-updates-in-container-images/migration.js.map +1 -1
  96. package/src/migrations/latest/dynamodb-configurable-encryption/migration.js.map +1 -1
  97. package/src/migrations/latest/py-agent-ag-ui-hooks/migration.js.map +1 -1
  98. package/src/migrations/latest/py-agent-session-id-middleware-extraction/migration.js.map +1 -1
  99. package/src/migrations/latest/remove-mcp-inspector-license-exceptions/migration.js.map +1 -1
  100. package/src/migrations/latest/static-website-configurable-waf-encryption/migration.js.map +1 -1
  101. package/src/migrations/latest/ts-agent-session-id-middleware-extraction/migration.js.map +1 -1
  102. package/src/migrations/latest/user-identity-configurable-mfa/migration.js.map +1 -1
  103. package/src/migrations/v1.0.0-rc.50/0001-modernize-function-props-cast/migration.js.map +1 -1
  104. package/src/migrations/v1.0.0-rc.50/0002-restrict-cors-to-custom-domains/migration.js.map +1 -1
  105. package/src/migrations/v1.0.0-rc.50/0003-terraform-bootstrap-adopt-existing-bucket/migration.js.map +1 -1
  106. package/src/migrations/v1.0.0-rc.52/0001-user-identity-waf-allow-localhost-callback/migration.js.map +1 -1
  107. package/src/migrations/v1.0.0-rc.54/0001-order-access-log-delivery-after-bucket-policy/migration.js.map +1 -1
  108. package/src/migrations/v1.0.0-rc.55/0001-backfill-generator-metadata/migration.d.ts +1 -1
  109. package/src/migrations/v1.0.0-rc.55/0001-backfill-generator-metadata/migration.js.map +1 -1
  110. package/src/migrations/v1.0.0-rc.56/0001-dynamodb-local-remove-optimize-flag/migration.js.map +1 -1
  111. package/src/migrations/v1.0.0-rc.57/0001-ts-agent-session-management-support/migration.js.map +1 -1
  112. package/src/migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/migration.js.map +1 -1
  113. package/src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/migration.js.map +1 -1
  114. package/src/migrations/v1.0.0-rc.60/0001-gateway-cognito-passthrough/migration.js.map +1 -1
  115. package/src/migrations/v1.0.0-rc.60/0002-waf-log-group-removal/migration.js.map +1 -1
  116. package/src/migrations/v1.0.0-rc.60/0003-strip-pip-from-python-images/migration.js.map +1 -1
  117. package/src/migrations/v1.0.0-rc.61/0001-py-agent-lifespan-construction/migration.js.map +1 -1
  118. package/src/migrations/v1.0.0-rc.62/0001-rename-load-runtime-config-target/migration.js.map +1 -1
  119. package/src/migrations/v1.0.0-rc.63/0001-add-deploy-sandbox-target/migration.js.map +1 -1
  120. package/src/migrations/v1.0.0-rc.64/0001-smithy-build-without-docker/migration.js.map +1 -1
  121. package/src/migrations/v1.0.0-rc.65/0001-vite-config-import-meta-dirname/migration.js.map +1 -1
  122. package/src/migrations/v1.0.0-rc.65/0002-rolldown-code-splitting/migration.js.map +1 -1
  123. package/src/migrations/v1.0.0-rc.67/0001-smithy-server-package-rename/migration.js.map +1 -1
  124. package/src/migrations/v1.0.0-rc.68/0001-translate-script-whole-file-writes/migration.js.map +1 -1
  125. package/src/migrations/v1.0.0-rc.70/0001-py-agent-a2a-lifespan-construction/migration.js.map +1 -1
  126. package/src/migrations/v1.0.0-rc.71/0001-py-agent-a2a-httpx-client-per-call/migration.js.map +1 -1
  127. package/src/migrations/v1.0.0-rc.72/0001-py-agent-session-management-support/migration.js.map +1 -1
  128. package/src/open-api/ts-client/generator.d.ts +1 -1
  129. package/src/open-api/ts-client/generator.js.map +1 -1
  130. package/src/open-api/ts-hooks/generator.d.ts +1 -1
  131. package/src/open-api/ts-hooks/generator.js.map +1 -1
  132. package/src/open-api/ts-hooks/generator.spec.tsx +6 -6
  133. package/src/open-api/ts-metadata/generator.d.ts +1 -1
  134. package/src/open-api/ts-metadata/generator.js.map +1 -1
  135. package/src/open-api/utils/codegen-data/languages.d.ts +1 -1
  136. package/src/open-api/utils/codegen-data/languages.js.map +1 -1
  137. package/src/open-api/utils/codegen-data.d.ts +2 -2
  138. package/src/open-api/utils/codegen-data.js.map +1 -1
  139. package/src/open-api/utils/normalise.d.ts +1 -1
  140. package/src/open-api/utils/normalise.js.map +1 -1
  141. package/src/open-api/utils/parse.d.ts +1 -1
  142. package/src/open-api/utils/parse.js.map +1 -1
  143. package/src/open-api/utils/parser.d.ts +2 -2
  144. package/src/open-api/utils/parser.js.map +1 -1
  145. package/src/open-api/utils/refs.d.ts +1 -1
  146. package/src/open-api/utils/refs.js.map +1 -1
  147. package/src/preset/generator.d.ts +3 -3
  148. package/src/preset/generator.js.map +1 -1
  149. package/src/preset/schema.d.js.map +1 -1
  150. package/src/preset/schema.d.ts +3 -3
  151. package/src/py/agent/a2a-connection/generator.d.ts +3 -3
  152. package/src/py/agent/a2a-connection/generator.js.map +1 -1
  153. package/src/py/agent/a2a-connection/schema.d.js.map +1 -1
  154. package/src/py/agent/a2a-connection/schema.d.ts +1 -1
  155. package/src/py/agent/gateway-connection/generator.d.ts +3 -3
  156. package/src/py/agent/gateway-connection/generator.js.map +1 -1
  157. package/src/py/agent/gateway-connection/schema.d.js.map +1 -1
  158. package/src/py/agent/gateway-connection/schema.d.ts +1 -1
  159. package/src/py/agent/generator.d.ts +3 -3
  160. package/src/py/agent/generator.js.map +1 -1
  161. package/src/py/agent/mcp-connection/generator.d.ts +3 -3
  162. package/src/py/agent/mcp-connection/generator.js.map +1 -1
  163. package/src/py/agent/mcp-connection/schema.d.js.map +1 -1
  164. package/src/py/agent/mcp-connection/schema.d.ts +1 -1
  165. package/src/py/agent/react-connection/generator.d.ts +12 -12
  166. package/src/py/agent/react-connection/generator.js.map +1 -1
  167. package/src/py/agent/react-connection/local-dev.d.ts +1 -1
  168. package/src/py/agent/react-connection/local-dev.js.map +1 -1
  169. package/src/py/agent/react-connection/schema.d.js.map +1 -1
  170. package/src/py/agent/react-connection/schema.d.ts +1 -1
  171. package/src/py/agent/schema.d.js.map +1 -1
  172. package/src/py/agent/schema.d.ts +1 -1
  173. package/src/py/api/generator.d.ts +1 -1
  174. package/src/py/api/generator.js.map +1 -1
  175. package/src/py/api/schema.d.js.map +1 -1
  176. package/src/py/api/schema.d.ts +1 -1
  177. package/src/py/dynamodb/agent-connection/generator.d.ts +1 -1
  178. package/src/py/dynamodb/agent-connection/generator.js.map +1 -1
  179. package/src/py/dynamodb/agent-connection/schema.d.js.map +1 -1
  180. package/src/py/dynamodb/agent-connection/schema.d.ts +1 -1
  181. package/src/py/dynamodb/fast-api-connection/generator.d.ts +1 -1
  182. package/src/py/dynamodb/fast-api-connection/generator.js.map +1 -1
  183. package/src/py/dynamodb/generator.d.ts +4 -4
  184. package/src/py/dynamodb/generator.js.map +1 -1
  185. package/src/py/dynamodb/mcp-server-connection/generator.d.ts +1 -1
  186. package/src/py/dynamodb/mcp-server-connection/generator.js.map +1 -1
  187. package/src/py/dynamodb/mcp-server-connection/schema.d.js.map +1 -1
  188. package/src/py/dynamodb/mcp-server-connection/schema.d.ts +1 -1
  189. package/src/py/dynamodb/schema.d.js.map +1 -1
  190. package/src/py/dynamodb/schema.d.ts +1 -1
  191. package/src/py/fast-api/generator.d.ts +3 -3
  192. package/src/py/fast-api/generator.js.map +1 -1
  193. package/src/py/fast-api/react/generator.d.ts +3 -3
  194. package/src/py/fast-api/react/generator.js.map +1 -1
  195. package/src/py/fast-api/react/open-api.js.map +1 -1
  196. package/src/py/fast-api/schema.d.js.map +1 -1
  197. package/src/py/fast-api/schema.d.ts +1 -1
  198. package/src/py/lambda-function/files/handler/__lambdaFunctionSnakeCase__.py.template +1 -1
  199. package/src/py/lambda-function/generator.d.ts +10 -4
  200. package/src/py/lambda-function/generator.js +8 -1
  201. package/src/py/lambda-function/generator.js.map +1 -1
  202. package/src/py/lambda-function/schema.d.js.map +1 -1
  203. package/src/py/lambda-function/schema.d.ts +2 -2
  204. package/src/py/lambda-function/schema.json +1 -1
  205. package/src/py/mcp-server/generator.d.ts +3 -3
  206. package/src/py/mcp-server/generator.js.map +1 -1
  207. package/src/py/mcp-server/schema.d.js.map +1 -1
  208. package/src/py/mcp-server/schema.d.ts +1 -1
  209. package/src/py/project/generator.d.ts +2 -2
  210. package/src/py/project/generator.js.map +1 -1
  211. package/src/py/project/schema.json +1 -0
  212. package/src/py/rdb/agent-connection/generator.d.ts +1 -1
  213. package/src/py/rdb/agent-connection/generator.js.map +1 -1
  214. package/src/py/rdb/agent-connection/schema.d.js.map +1 -1
  215. package/src/py/rdb/agent-connection/schema.d.ts +1 -1
  216. package/src/py/rdb/fast-api-connection/generator.d.ts +1 -1
  217. package/src/py/rdb/fast-api-connection/generator.js.map +1 -1
  218. package/src/py/rdb/generator.d.ts +3 -3
  219. package/src/py/rdb/generator.js.map +1 -1
  220. package/src/py/rdb/mcp-server-connection/generator.d.ts +1 -1
  221. package/src/py/rdb/mcp-server-connection/generator.js.map +1 -1
  222. package/src/py/rdb/mcp-server-connection/schema.d.js.map +1 -1
  223. package/src/py/rdb/mcp-server-connection/schema.d.ts +1 -1
  224. package/src/sdk/agentcore-gateway.d.ts +1 -1
  225. package/src/sdk/agentcore-gateway.js.map +1 -1
  226. package/src/sdk/agentcore-harness.d.ts +1 -1
  227. package/src/sdk/agentcore-harness.js.map +1 -1
  228. package/src/sdk/connection.d.ts +1 -1
  229. package/src/sdk/connection.js.map +1 -1
  230. package/src/sdk/license.d.ts +3 -3
  231. package/src/sdk/license.js.map +1 -1
  232. package/src/sdk/open-api.d.ts +3 -3
  233. package/src/sdk/open-api.js.map +1 -1
  234. package/src/sdk/py.d.ts +7 -7
  235. package/src/sdk/py.js.map +1 -1
  236. package/src/sdk/smithy.d.ts +1 -1
  237. package/src/sdk/smithy.js.map +1 -1
  238. package/src/sdk/terraform.d.ts +1 -1
  239. package/src/sdk/terraform.js.map +1 -1
  240. package/src/sdk/ts.d.ts +18 -18
  241. package/src/sdk/ts.js.map +1 -1
  242. package/src/sdk/utils/ast.d.ts +1 -1
  243. package/src/sdk/utils/ast.js.map +1 -1
  244. package/src/sdk/utils/format.d.ts +1 -1
  245. package/src/sdk/utils/format.js.map +1 -1
  246. package/src/sdk/utils/test.d.ts +1 -1
  247. package/src/sdk/utils/test.js.map +1 -1
  248. package/src/smithy/project/generator.d.ts +4 -4
  249. package/src/smithy/project/generator.js.map +1 -1
  250. package/src/smithy/react-connection/generator.d.ts +3 -3
  251. package/src/smithy/react-connection/generator.js.map +1 -1
  252. package/src/smithy/ts/api/generator.d.ts +3 -3
  253. package/src/smithy/ts/api/generator.js.map +1 -1
  254. package/src/smithy/ts/api/schema.d.js.map +1 -1
  255. package/src/smithy/ts/api/schema.d.ts +1 -1
  256. package/src/terraform/project/generator.d.ts +5 -5
  257. package/src/terraform/project/generator.js.map +1 -1
  258. package/src/trpc/backend/generator.d.ts +3 -3
  259. package/src/trpc/backend/generator.js.map +1 -1
  260. package/src/trpc/backend/schema.d.js.map +1 -1
  261. package/src/trpc/backend/schema.d.ts +1 -1
  262. package/src/trpc/react/generator.d.ts +3 -3
  263. package/src/trpc/react/generator.js.map +1 -1
  264. package/src/ts/agent/a2a-connection/generator.d.ts +3 -3
  265. package/src/ts/agent/a2a-connection/generator.js.map +1 -1
  266. package/src/ts/agent/a2a-connection/schema.d.js.map +1 -1
  267. package/src/ts/agent/a2a-connection/schema.d.ts +1 -1
  268. package/src/ts/agent/gateway-connection/generator.d.ts +3 -3
  269. package/src/ts/agent/gateway-connection/generator.js.map +1 -1
  270. package/src/ts/agent/gateway-connection/schema.d.js.map +1 -1
  271. package/src/ts/agent/gateway-connection/schema.d.ts +1 -1
  272. package/src/ts/agent/generator.d.ts +3 -3
  273. package/src/ts/agent/generator.js.map +1 -1
  274. package/src/ts/agent/mcp-connection/generator.d.ts +3 -3
  275. package/src/ts/agent/mcp-connection/generator.js.map +1 -1
  276. package/src/ts/agent/mcp-connection/schema.d.js.map +1 -1
  277. package/src/ts/agent/mcp-connection/schema.d.ts +1 -1
  278. package/src/ts/agent/react-connection/generator.d.ts +11 -11
  279. package/src/ts/agent/react-connection/generator.js.map +1 -1
  280. package/src/ts/agent/react-connection/local-dev.d.ts +1 -1
  281. package/src/ts/agent/react-connection/local-dev.js.map +1 -1
  282. package/src/ts/agent/react-connection/schema.d.js.map +1 -1
  283. package/src/ts/agent/react-connection/schema.d.ts +1 -1
  284. package/src/ts/agent/schema.d.js.map +1 -1
  285. package/src/ts/agent/schema.d.ts +1 -1
  286. package/src/ts/api/generator.d.ts +1 -1
  287. package/src/ts/api/generator.js.map +1 -1
  288. package/src/ts/api/schema.d.js.map +1 -1
  289. package/src/ts/api/schema.d.ts +1 -1
  290. package/src/ts/astro-docs/generator.d.ts +3 -3
  291. package/src/ts/astro-docs/generator.js.map +1 -1
  292. package/src/ts/dcr-proxy/generator.d.ts +5 -5
  293. package/src/ts/dcr-proxy/generator.js.map +1 -1
  294. package/src/ts/dcr-proxy/schema.d.js.map +1 -1
  295. package/src/ts/dcr-proxy/schema.d.ts +1 -1
  296. package/src/ts/docs/generator.d.ts +1 -1
  297. package/src/ts/docs/generator.js.map +1 -1
  298. package/src/ts/dynamodb/agent-connection/generator.d.ts +1 -1
  299. package/src/ts/dynamodb/agent-connection/generator.js.map +1 -1
  300. package/src/ts/dynamodb/agent-connection/schema.d.js.map +1 -1
  301. package/src/ts/dynamodb/agent-connection/schema.d.ts +1 -1
  302. package/src/ts/dynamodb/generator.d.ts +5 -5
  303. package/src/ts/dynamodb/generator.js +1 -0
  304. package/src/ts/dynamodb/generator.js.map +1 -1
  305. package/src/ts/dynamodb/mcp-server-connection/generator.d.ts +1 -1
  306. package/src/ts/dynamodb/mcp-server-connection/generator.js.map +1 -1
  307. package/src/ts/dynamodb/mcp-server-connection/schema.d.js.map +1 -1
  308. package/src/ts/dynamodb/mcp-server-connection/schema.d.ts +1 -1
  309. package/src/ts/dynamodb/schema.d.js.map +1 -1
  310. package/src/ts/dynamodb/schema.d.ts +1 -1
  311. package/src/ts/dynamodb/smithy-connection/generator.d.ts +1 -1
  312. package/src/ts/dynamodb/smithy-connection/generator.js.map +1 -1
  313. package/src/ts/dynamodb/trpc-connection/generator.d.ts +1 -1
  314. package/src/ts/dynamodb/trpc-connection/generator.js.map +1 -1
  315. package/src/ts/lambda-function/generator.d.ts +5 -5
  316. package/src/ts/lambda-function/generator.js.map +1 -1
  317. package/src/ts/lambda-function/schema.d.js.map +1 -1
  318. package/src/ts/lambda-function/schema.d.ts +1 -1
  319. package/src/ts/lib/biome.d.ts +1 -1
  320. package/src/ts/lib/biome.js.map +1 -1
  321. package/src/ts/lib/generator.d.ts +3 -3
  322. package/src/ts/lib/generator.js.map +1 -1
  323. package/src/ts/lib/ts-project-utils.d.ts +3 -3
  324. package/src/ts/lib/ts-project-utils.js.map +1 -1
  325. package/src/ts/lib/vitest.d.ts +2 -2
  326. package/src/ts/lib/vitest.js.map +1 -1
  327. package/src/ts/mcp-server/generator.d.ts +3 -3
  328. package/src/ts/mcp-server/generator.js.map +1 -1
  329. package/src/ts/mcp-server/schema.d.js.map +1 -1
  330. package/src/ts/mcp-server/schema.d.ts +1 -1
  331. package/src/ts/nx-generator/generator.d.ts +2 -2
  332. package/src/ts/nx-generator/generator.js.map +1 -1
  333. package/src/ts/nx-migration/generator.d.ts +3 -3
  334. package/src/ts/nx-migration/generator.js.map +1 -1
  335. package/src/ts/nx-plugin/generator.d.ts +3 -3
  336. package/src/ts/nx-plugin/generator.js.map +1 -1
  337. package/src/ts/nx-plugin/utils.d.ts +1 -1
  338. package/src/ts/nx-plugin/utils.js.map +1 -1
  339. package/src/ts/rdb/agent-connection/generator.d.ts +1 -1
  340. package/src/ts/rdb/agent-connection/generator.js.map +1 -1
  341. package/src/ts/rdb/agent-connection/schema.d.js.map +1 -1
  342. package/src/ts/rdb/agent-connection/schema.d.ts +1 -1
  343. package/src/ts/rdb/generator.d.ts +4 -4
  344. package/src/ts/rdb/generator.js +1 -0
  345. package/src/ts/rdb/generator.js.map +1 -1
  346. package/src/ts/rdb/mcp-server-connection/generator.d.ts +1 -1
  347. package/src/ts/rdb/mcp-server-connection/generator.js.map +1 -1
  348. package/src/ts/rdb/mcp-server-connection/schema.d.js.map +1 -1
  349. package/src/ts/rdb/mcp-server-connection/schema.d.ts +1 -1
  350. package/src/ts/rdb/schema.d.js.map +1 -1
  351. package/src/ts/rdb/schema.d.ts +1 -1
  352. package/src/ts/rdb/smithy-connection/generator.d.ts +1 -1
  353. package/src/ts/rdb/smithy-connection/generator.js.map +1 -1
  354. package/src/ts/rdb/trpc-connection/generator.d.ts +1 -1
  355. package/src/ts/rdb/trpc-connection/generator.js.map +1 -1
  356. package/src/ts/react-website/agui/generator.d.ts +2 -2
  357. package/src/ts/react-website/agui/generator.js.map +1 -1
  358. package/src/ts/react-website/app/generator.d.ts +3 -3
  359. package/src/ts/react-website/app/generator.js.map +1 -1
  360. package/src/ts/react-website/app/schema.d.js.map +1 -1
  361. package/src/ts/react-website/app/schema.d.ts +2 -2
  362. package/src/ts/react-website/cognito-auth/generator.d.ts +5 -5
  363. package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
  364. package/src/ts/react-website/cognito-auth/schema.d.js.map +1 -1
  365. package/src/ts/react-website/cognito-auth/schema.d.ts +1 -1
  366. package/src/ts/react-website/cognito-auth/utils.js.map +1 -1
  367. package/src/ts/react-website/runtime-config/generator.d.ts +1 -1
  368. package/src/ts/react-website/runtime-config/generator.js.map +1 -1
  369. package/src/ts/sync/generator.d.ts +1 -1
  370. package/src/ts/sync/generator.js.map +1 -1
  371. package/src/ts/website/app/generator.d.ts +1 -1
  372. package/src/ts/website/app/generator.js.map +1 -1
  373. package/src/ts/website/app/schema.d.js.map +1 -1
  374. package/src/ts/website/app/schema.d.ts +2 -2
  375. package/src/ts/website/auth/generator.d.ts +1 -1
  376. package/src/ts/website/auth/generator.js.map +1 -1
  377. package/src/ts/website/auth/schema.d.js.map +1 -1
  378. package/src/ts/website/auth/schema.d.ts +1 -1
  379. package/src/utils/add-dependencies.d.ts +1 -1
  380. package/src/utils/add-dependencies.js.map +1 -1
  381. package/src/utils/agent-chat/agent-chat.js.map +1 -1
  382. package/src/utils/agent-connection/agent-connection.d.ts +2 -2
  383. package/src/utils/agent-connection/agent-connection.js.map +1 -1
  384. package/src/utils/agent-core-constructs/agent-core-constructs.d.ts +4 -4
  385. package/src/utils/agent-core-constructs/agent-core-constructs.js.map +1 -1
  386. package/src/utils/api-constructs/api-constructs.d.ts +3 -3
  387. package/src/utils/api-constructs/api-constructs.js.map +1 -1
  388. package/src/utils/api-constructs/open-api-metadata.d.ts +1 -1
  389. package/src/utils/api-constructs/open-api-metadata.js.map +1 -1
  390. package/src/utils/ast/website.js.map +1 -1
  391. package/src/utils/ast.js +6 -0
  392. package/src/utils/ast.js.map +1 -1
  393. package/src/utils/bundle/bundle.d.ts +1 -1
  394. package/src/utils/bundle/bundle.js.map +1 -1
  395. package/src/utils/commands.d.ts +1 -1
  396. package/src/utils/commands.js.map +1 -1
  397. package/src/utils/config/index.d.ts +6 -6
  398. package/src/utils/config/index.js.map +1 -1
  399. package/src/utils/config/utils.d.ts +1 -1
  400. package/src/utils/config/utils.js.map +1 -1
  401. package/src/utils/connection/open-api/react.d.ts +1 -1
  402. package/src/utils/connection/open-api/react.js.map +1 -1
  403. package/src/utils/containers.js.map +1 -1
  404. package/src/utils/dcr-proxy-constructs/dcr-proxy-constructs.d.ts +1 -1
  405. package/src/utils/dcr-proxy-constructs/dcr-proxy-constructs.js.map +1 -1
  406. package/src/utils/declared-dependencies.d.ts +1 -1
  407. package/src/utils/declared-dependencies.js.map +1 -1
  408. package/src/utils/dependencies.js.map +1 -1
  409. package/src/utils/docker.d.ts +1 -1
  410. package/src/utils/docker.js.map +1 -1
  411. package/src/utils/dynamodb-constructs/dynamodb-constructs.d.ts +1 -1
  412. package/src/utils/dynamodb-constructs/dynamodb-constructs.js.map +1 -1
  413. package/src/utils/format.js.map +1 -1
  414. package/src/utils/fs.d.ts +1 -1
  415. package/src/utils/fs.js.map +1 -1
  416. package/src/utils/function-constructs/function-constructs.d.ts +1 -1
  417. package/src/utils/function-constructs/function-constructs.js.map +1 -1
  418. package/src/utils/iac.d.ts +2 -2
  419. package/src/utils/iac.js.map +1 -1
  420. package/src/utils/identity-constructs/identity-constructs.d.ts +2 -2
  421. package/src/utils/identity-constructs/identity-constructs.js.map +1 -1
  422. package/src/utils/init.d.ts +3 -3
  423. package/src/utils/init.js.map +1 -1
  424. package/src/utils/install.d.ts +1 -1
  425. package/src/utils/install.js.map +1 -1
  426. package/src/utils/mcp.js.map +1 -1
  427. package/src/utils/metrics.d.ts +1 -1
  428. package/src/utils/metrics.js.map +1 -1
  429. package/src/utils/migration-manifest.d.ts +1 -1
  430. package/src/utils/migration-manifest.js.map +1 -1
  431. package/src/utils/nx.d.ts +3 -3
  432. package/src/utils/nx.js.map +1 -1
  433. package/src/utils/paths.js.map +1 -1
  434. package/src/utils/pkg-manager.d.ts +1 -1
  435. package/src/utils/pkg-manager.js.map +1 -1
  436. package/src/utils/pnpm-workspace.js.map +1 -1
  437. package/src/utils/project-package-json.js.map +1 -1
  438. package/src/utils/py.d.ts +2 -2
  439. package/src/utils/py.js.map +1 -1
  440. package/src/utils/rdb-constructs/rdb-constructs.d.ts +2 -2
  441. package/src/utils/rdb-constructs/rdb-constructs.js.map +1 -1
  442. package/src/utils/shared-constructs-constants.js.map +1 -1
  443. package/src/utils/shared-constructs.d.ts +3 -3
  444. package/src/utils/shared-constructs.js.map +1 -1
  445. package/src/utils/shared-dynamodb-scripts.d.ts +1 -1
  446. package/src/utils/shared-dynamodb-scripts.js.map +1 -1
  447. package/src/utils/shared-infra-config.js.map +1 -1
  448. package/src/utils/shared-infra-scripts.d.ts +2 -2
  449. package/src/utils/shared-infra-scripts.js.map +1 -1
  450. package/src/utils/shared-rdb-scripts.d.ts +1 -1
  451. package/src/utils/shared-rdb-scripts.js.map +1 -1
  452. package/src/utils/shared-scripts.js.map +1 -1
  453. package/src/utils/shared-shadcn.d.ts +1 -1
  454. package/src/utils/shared-shadcn.js.map +1 -1
  455. package/src/utils/smithy.js.map +1 -1
  456. package/src/utils/test.js.map +1 -1
  457. package/src/utils/version-upgrade-migration/migration.js.map +1 -1
  458. package/src/utils/version-upgrade-migration/nx-package-updates.js.map +1 -1
  459. package/src/utils/version-upgrade-migration/owned-dependencies.d.ts +1 -1
  460. package/src/utils/version-upgrade-migration/owned-dependencies.js.map +1 -1
  461. package/src/utils/version-upgrade-migration/register.js.map +1 -1
  462. package/src/utils/version-upgrade-migration/sync-embedded-versions.d.ts +1 -1
  463. package/src/utils/version-upgrade-migration/sync-embedded-versions.js.map +1 -1
  464. package/src/utils/version-upgrade-migration/sync-metrics-version.js.map +1 -1
  465. package/src/utils/version-upgrade-migration/sync-vended-versions.js.map +1 -1
  466. package/src/utils/versions.d.ts +1 -1
  467. package/src/utils/versions.js.map +1 -1
  468. package/src/utils/website-constructs/website-constructs.d.ts +2 -2
  469. package/src/utils/website-constructs/website-constructs.js.map +1 -1
@@ -3,9 +3,9 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { type GeneratorCallback, type Tree } from '@nx/devkit';
6
- import { type NxGeneratorInfo } from '../../utils/nx';
6
+ import { type NxGeneratorInfo } from '../../utils/nx.js';
7
7
  import type { TsInfraGeneratorSchema } from './schema';
8
- export declare const DEPENDENCIES: import("../../utils/declared-dependencies").DependencyDeclaration<readonly [{
8
+ export declare const DEPENDENCIES: import("../../utils/declared-dependencies.js").DependencyDeclaration<readonly [{
9
9
  readonly name: "aws-cdk-lib";
10
10
  }, {
11
11
  readonly name: "constructs";
@@ -25,12 +25,12 @@ export declare const DEPENDENCIES: import("../../utils/declared-dependencies").D
25
25
  readonly root: true;
26
26
  }, {
27
27
  readonly name: "constructs";
28
- readonly when: (m: import("../../utils/shared-constructs-constants").IacMetadata) => boolean;
28
+ readonly when: (m: import("../../utils/shared-constructs-constants.js").IacMetadata) => boolean;
29
29
  } & {
30
30
  versionOnly: true;
31
31
  }, {
32
32
  readonly name: "aws-cdk-lib";
33
- readonly when: (m: import("../../utils/shared-constructs-constants").IacMetadata) => boolean;
33
+ readonly when: (m: import("../../utils/shared-constructs-constants.js").IacMetadata) => boolean;
34
34
  } & {
35
35
  versionOnly: true;
36
36
  }, {
@@ -39,15 +39,15 @@ export declare const DEPENDENCIES: import("../../utils/declared-dependencies").D
39
39
  versionOnly: true;
40
40
  }, {
41
41
  readonly name: "@aws-sdk/client-sts";
42
- readonly when: (m: import("../../utils/shared-constructs-constants").IacMetadata) => boolean;
42
+ readonly when: (m: import("../../utils/shared-constructs-constants.js").IacMetadata) => boolean;
43
43
  } & {
44
44
  versionOnly: true;
45
45
  }, {
46
46
  readonly name: "@aws-sdk/credential-providers";
47
- readonly when: (m: import("../../utils/shared-constructs-constants").IacMetadata) => boolean;
47
+ readonly when: (m: import("../../utils/shared-constructs-constants.js").IacMetadata) => boolean;
48
48
  } & {
49
49
  versionOnly: true;
50
- }], readonly import("../../utils/declared-dependencies").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aiosqlite" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "langgraph-checkpoint-aws" | "langgraph-checkpoint-sqlite" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", Record<string, never>>[]>;
50
+ }], readonly import("../../utils/declared-dependencies.js").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aiosqlite" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "langgraph-checkpoint-aws" | "langgraph-checkpoint-sqlite" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", Record<string, never>>[]>;
51
51
  export declare const INFRA_APP_GENERATOR_INFO: NxGeneratorInfo;
52
52
  export declare function tsInfraGenerator(tree: Tree, schema: TsInfraGeneratorSchema): Promise<GeneratorCallback>;
53
53
  export default tsInfraGenerator;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../packages/nx-plugin/src/infra/app/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n type GeneratorCallback,\n generateFiles,\n joinPathFragments,\n OverwriteStrategy,\n type ProjectConfiguration,\n readProjectConfiguration,\n type Tree,\n updateJson,\n} from '@nx/devkit';\nimport path from 'path';\nimport tsProjectGenerator, { getTsLibDetails } from '../../ts/lib/generator';\nimport { mergeTsReferences } from '../../ts/lib/ts-project-utils';\nimport { addTsDependencies } from '../../utils/add-dependencies';\nimport { resolveContainers } from '../../utils/containers';\nimport {\n declareDependencies,\n ownedElsewhere,\n} from '../../utils/declared-dependencies';\nimport { formatFilesInSubtree } from '../../utils/format';\nimport { installDependencies } from '../../utils/install';\nimport { addGeneratorMetricsIfApplicable } from '../../utils/metrics';\nimport { esmVars } from '../../utils/module-format';\nimport { kebabCase } from '../../utils/names';\nimport { getNpmScopePrefix } from '../../utils/npm-scope';\nimport {\n addDependencyToTargetIfNotPresent,\n addGeneratorMetadata,\n getGeneratorInfo,\n type NxGeneratorInfo,\n projectExists,\n} from '../../utils/nx';\nimport { sortObjectKeys } from '../../utils/object';\nimport { getPackageManagerDisplayCommands } from '../../utils/pkg-manager';\nimport { uvxCommand } from '../../utils/py';\nimport {\n SHARED_CONSTRUCTS_DEPENDENCIES,\n sharedConstructsGenerator,\n} from '../../utils/shared-constructs';\nimport {\n PACKAGES_DIR,\n SHARED_CONSTRUCTS_DIR,\n SHARED_INFRA_CONFIG_DIR,\n} from '../../utils/shared-constructs-constants';\nimport { sharedInfraConfigGenerator } from '../../utils/shared-infra-config';\nimport {\n SHARED_INFRA_SCRIPTS_DEPENDENCIES,\n sharedInfraScriptsGenerator,\n} from '../../utils/shared-infra-scripts';\nimport type { TsInfraGeneratorSchema } from './schema';\n\n// This generator records no metadata, so nothing a predicate could read: the\n// CDK app always needs the app libraries, and the CLI, bundler and tsx are\n// shared tooling.\nexport const DEPENDENCIES = declareDependencies()({\n ts: [\n { name: 'aws-cdk-lib' },\n { name: 'constructs' },\n { name: 'source-map-support' },\n // The `aws-cdk` CLI, esbuild (CDK bundling) and tsx are shared tooling.\n { name: 'aws-cdk', dev: true, root: true },\n { name: 'esbuild', dev: true, root: true },\n { name: 'tsx', dev: true, root: true },\n ...ownedElsewhere(SHARED_CONSTRUCTS_DEPENDENCIES),\n ...ownedElsewhere(SHARED_INFRA_SCRIPTS_DEPENDENCIES),\n ],\n});\n\nexport const INFRA_APP_GENERATOR_INFO: NxGeneratorInfo = getGeneratorInfo(\n import.meta.filename,\n);\n\nexport async function tsInfraGenerator(\n tree: Tree,\n schema: TsInfraGeneratorSchema,\n): Promise<GeneratorCallback> {\n const lib = getTsLibDetails(tree, schema);\n\n if (!projectExists(tree, lib.fullyQualifiedName)) {\n await tsProjectGenerator(tree, {\n ...schema,\n preferInstallDependencies: false,\n });\n }\n\n // CDK shells out to a container engine to build image assets. Default\n // (docker) needs no env override; finch is set via CDK_DOCKER per\n // https://docs.aws.amazon.com/cdk/v2/guide/build-containers.html#build-container-replace.\n const containers = await resolveContainers(tree, 'inherit');\n const cdkEnv: Record<string, string> | undefined =\n containers === 'docker' ? undefined : { CDK_DOCKER: containers };\n const withCdkEnv = <T extends Record<string, unknown>>(opts: T): T => {\n if (!cdkEnv) return opts;\n const existingEnv = (opts.env as Record<string, string> | undefined) ?? {};\n return { ...opts, env: { ...existingEnv, ...cdkEnv } } as T;\n };\n\n // This generator IS the CDK infrastructure project, so the provider is fixed.\n addGeneratorMetadata(tree, lib.fullyQualifiedName, INFRA_APP_GENERATOR_INFO, {\n iac: 'cdk',\n });\n\n // Shared constructs always in CDK for typescript infra generator\n await sharedConstructsGenerator(\n tree,\n {\n iac: 'cdk',\n },\n DEPENDENCIES,\n );\n\n // Shared infra-config and infra-scripts packages (lazy creation, only when enabled)\n const stageConfig = schema.stageConfig ?? false;\n if (stageConfig) {\n await sharedInfraConfigGenerator(tree);\n await sharedInfraScriptsGenerator(tree, DEPENDENCIES);\n }\n\n const synthDirFromRoot = `/dist/${lib.dir}/cdk.out`;\n const synthDirFromProject =\n lib.dir\n .split('/')\n .map(() => '..')\n .join('/') + `/dist/${lib.dir}/cdk.out`;\n const distDirFromProjectRoot =\n lib.dir\n .split('/')\n .map(() => '..')\n .join('/') + '/dist/{projectRoot}/cdk.out';\n const projectConfig = readProjectConfiguration(tree, lib.fullyQualifiedName);\n const libraryRoot = projectConfig.root;\n const npmScopePrefix = getNpmScopePrefix(tree);\n const scopeAlias = npmScopePrefix;\n const fullyQualifiedName = `${npmScopePrefix}${schema.name}`;\n const namespace = kebabCase(fullyQualifiedName);\n // The stage instantiated in main.ts. Quoted so the shell does not glob `*`.\n const sandboxStagePattern = `\"${namespace}-sandbox/*\"`;\n tree.delete(joinPathFragments(libraryRoot, 'src'));\n\n generateFiles(\n tree, // the virtual file system\n joinPathFragments(import.meta.dirname, './files/app'), // path to the file templates\n libraryRoot, // destination path of the files\n {\n synthDir: synthDirFromProject,\n scopeAlias: scopeAlias,\n namespace,\n fullyQualifiedName,\n pkgMgrCmd: getPackageManagerDisplayCommands().exec,\n dir: lib.dir,\n stageConfig,\n ...schema,\n ...esmVars(tree),\n },\n {\n overwriteStrategy: OverwriteStrategy.Overwrite,\n },\n );\n\n updateJson(\n tree,\n `${libraryRoot}/project.json`,\n (config: ProjectConfiguration) => {\n config.projectType = 'application';\n addDependencyToTargetIfNotPresent(config, 'build', 'synth');\n addDependencyToTargetIfNotPresent(config, 'build', 'checkov');\n config.targets.compile.outputs = [\n '{workspaceRoot}/dist/{projectRoot}/tsc',\n ];\n config.targets.synth = {\n cache: true,\n executor: 'nx:run-commands',\n inputs: ['default'],\n outputs: ['{workspaceRoot}/dist/{projectRoot}/cdk.out'],\n dependsOn: ['^build', 'compile'], // compile clobbers dist directory, so ensure synth runs afterwards\n options: withCdkEnv({\n cwd: '{projectRoot}',\n command: 'cdk synth',\n }),\n };\n config.targets.checkov = {\n cache: true,\n executor: 'nx:run-commands',\n inputs: ['{workspaceRoot}/dist/{projectRoot}/cdk.out'],\n outputs: ['{workspaceRoot}/dist/{projectRoot}/checkov'],\n dependsOn: ['synth'],\n options: {\n command: uvxCommand(\n 'checkov',\n '--config-file {projectRoot}/checkov.yml --directory dist/{projectRoot}/cdk.out --framework cloudformation',\n ),\n },\n };\n config.targets.deploy = {\n executor: 'nx:run-commands',\n dependsOn: ['^build', 'compile'],\n options: stageConfig\n ? withCdkEnv({\n command: `tsx packages/common/scripts/src/infra/infra-deploy.ts ${libraryRoot}`,\n })\n : withCdkEnv({\n cwd: '{projectRoot}',\n command: 'cdk deploy --require-approval=never',\n }),\n };\n config.targets['deploy-sandbox'] = {\n executor: 'nx:run-commands',\n dependsOn: ['^build', 'compile'],\n options: stageConfig\n ? withCdkEnv({\n command: `tsx packages/common/scripts/src/infra/infra-deploy.ts ${libraryRoot} ${sandboxStagePattern}`,\n })\n : withCdkEnv({\n cwd: '{projectRoot}',\n command: `cdk deploy --require-approval=never ${sandboxStagePattern}`,\n }),\n };\n config.targets['deploy-ci'] = {\n executor: 'nx:run-commands',\n options: withCdkEnv({\n cwd: '{projectRoot}',\n command: `cdk deploy --require-approval=never --app ${distDirFromProjectRoot}`,\n }),\n };\n config.targets.destroy = {\n executor: 'nx:run-commands',\n dependsOn: ['^build', 'compile'],\n options: stageConfig\n ? withCdkEnv({\n command: `tsx packages/common/scripts/src/infra/infra-destroy.ts ${libraryRoot}`,\n })\n : withCdkEnv({\n cwd: '{projectRoot}',\n command: 'cdk destroy --require-approval=never',\n }),\n };\n config.targets['destroy-ci'] = {\n executor: 'nx:run-commands',\n options: withCdkEnv({\n cwd: '{projectRoot}',\n command: `cdk destroy --require-approval=never --app ${distDirFromProjectRoot}`,\n }),\n };\n config.targets.cdk = {\n executor: 'nx:run-commands',\n options: withCdkEnv({\n cwd: '{projectRoot}',\n command: 'cdk',\n }),\n };\n config.targets.bootstrap = {\n executor: 'nx:run-commands',\n options: withCdkEnv({\n cwd: '{projectRoot}',\n command: 'cdk bootstrap',\n }),\n };\n config.targets = sortObjectKeys(config.targets);\n return config;\n },\n );\n\n addTsDependencies(tree, DEPENDENCIES, { projectRoot: libraryRoot });\n\n updateJson(tree, `${libraryRoot}/tsconfig.lib.json`, (tsConfig) => ({\n ...tsConfig,\n references: mergeTsReferences(tsConfig.references, [\n {\n path: `${path.relative(\n libraryRoot,\n `${tree.root}/${PACKAGES_DIR}`,\n )}/${SHARED_CONSTRUCTS_DIR}/tsconfig.lib.json`,\n },\n ...(stageConfig\n ? [\n {\n path: `${path.relative(\n libraryRoot,\n `${tree.root}/${PACKAGES_DIR}`,\n )}/${SHARED_INFRA_CONFIG_DIR}/tsconfig.json`,\n },\n ]\n : []),\n ]),\n }));\n\n await addGeneratorMetricsIfApplicable(tree, [INFRA_APP_GENERATOR_INFO]);\n\n await formatFilesInSubtree(tree);\n return () =>\n installDependencies(tree, schema.preferInstallDependencies, {\n languages: ['typescript'],\n });\n}\nexport default tsInfraGenerator;\n"],"names":["generateFiles","joinPathFragments","OverwriteStrategy","readProjectConfiguration","updateJson","path","tsProjectGenerator","getTsLibDetails","mergeTsReferences","addTsDependencies","resolveContainers","declareDependencies","ownedElsewhere","formatFilesInSubtree","installDependencies","addGeneratorMetricsIfApplicable","esmVars","kebabCase","getNpmScopePrefix","addDependencyToTargetIfNotPresent","addGeneratorMetadata","getGeneratorInfo","projectExists","sortObjectKeys","getPackageManagerDisplayCommands","uvxCommand","SHARED_CONSTRUCTS_DEPENDENCIES","sharedConstructsGenerator","PACKAGES_DIR","SHARED_CONSTRUCTS_DIR","SHARED_INFRA_CONFIG_DIR","sharedInfraConfigGenerator","SHARED_INFRA_SCRIPTS_DEPENDENCIES","sharedInfraScriptsGenerator","DEPENDENCIES","ts","name","dev","root","INFRA_APP_GENERATOR_INFO","filename","tsInfraGenerator","tree","schema","lib","fullyQualifiedName","preferInstallDependencies","containers","cdkEnv","undefined","CDK_DOCKER","withCdkEnv","opts","existingEnv","env","iac","stageConfig","synthDirFromRoot","dir","synthDirFromProject","split","map","join","distDirFromProjectRoot","projectConfig","libraryRoot","npmScopePrefix","scopeAlias","namespace","sandboxStagePattern","delete","dirname","synthDir","pkgMgrCmd","exec","overwriteStrategy","Overwrite","config","projectType","targets","compile","outputs","synth","cache","executor","inputs","dependsOn","options","cwd","command","checkov","deploy","destroy","cdk","bootstrap","projectRoot","tsConfig","references","relative","languages"],"mappings":"AAAA;;;CAGC,GACD,SAEEA,aAAa,EACbC,iBAAiB,EACjBC,iBAAiB,EAEjBC,wBAAwB,EAExBC,UAAU,QACL,aAAa;AACpB,OAAOC,UAAU,OAAO;AACxB,OAAOC,sBAAsBC,eAAe,QAAQ,4BAAyB;AAC7E,SAASC,iBAAiB,QAAQ,mCAAgC;AAClE,SAASC,iBAAiB,QAAQ,kCAA+B;AACjE,SAASC,iBAAiB,QAAQ,4BAAyB;AAC3D,SACEC,mBAAmB,EACnBC,cAAc,QACT,uCAAoC;AAC3C,SAASC,oBAAoB,QAAQ,wBAAqB;AAC1D,SAASC,mBAAmB,QAAQ,yBAAsB;AAC1D,SAASC,+BAA+B,QAAQ,yBAAsB;AACtE,SAASC,OAAO,QAAQ,+BAA4B;AACpD,SAASC,SAAS,QAAQ,uBAAoB;AAC9C,SAASC,iBAAiB,QAAQ,2BAAwB;AAC1D,SACEC,iCAAiC,EACjCC,oBAAoB,EACpBC,gBAAgB,EAEhBC,aAAa,QACR,oBAAiB;AACxB,SAASC,cAAc,QAAQ,wBAAqB;AACpD,SAASC,gCAAgC,QAAQ,6BAA0B;AAC3E,SAASC,UAAU,QAAQ,oBAAiB;AAC5C,SACEC,8BAA8B,EAC9BC,yBAAyB,QACpB,mCAAgC;AACvC,SACEC,YAAY,EACZC,qBAAqB,EACrBC,uBAAuB,QAClB,6CAA0C;AACjD,SAASC,0BAA0B,QAAQ,qCAAkC;AAC7E,SACEC,iCAAiC,EACjCC,2BAA2B,QACtB,sCAAmC;AAG1C,6EAA6E;AAC7E,2EAA2E;AAC3E,kBAAkB;AAClB,OAAO,MAAMC,eAAevB,sBAAsB;IAChDwB,IAAI;QACF;YAAEC,MAAM;QAAc;QACtB;YAAEA,MAAM;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LC,SAAS,CAAC,2CAA2C,EAAE1B,wBAAwB;YACjF;QACF;QACAc,OAAOE,OAAO,CAACc,GAAG,GAAG;YACnBT,UAAU;YACVG,SAASpC,WAAW;gBAClBqC,KAAK;gBACLC,SAAS;YACX;QACF;QACAZ,OAAOE,OAAO,CAACe,SAAS,GAAG;YACzBV,UAAU;YACVG,SAASpC,WAAW;gBAClBqC,KAAK;gBACLC,SAAS;YACX;QACF;QACAZ,OAAOE,OAAO,GAAGxD,eAAesD,OAAOE,OAAO;QAC9C,OAAOF;IACT;IAGFpE,kBAAkBiC,MAAMR,cAAc;QAAE6D,aAAa9B;IAAY;IAEjE7D,WAAWsC,MAAM,GAAGuB,YAAY,kBAAkB,CAAC,EAAE,CAAC+B,WAAc,CAAA;YAClE,GAAGA,QAAQ;YACXC,YAAYzF,kBAAkBwF,SAASC,UAAU,EAAE;gBACjD;oBACE5F,MAAM,GAAGA,KAAK6F,QAAQ,CACpBjC,aACA,GAAGvB,KAAKJ,IAAI,CAAC,CAAC,EAAEV,cAAc,EAC9B,CAAC,EAAEC,sBAAsB,kBAAkB,CAAC;gBAChD;mBACI2B,cACA;oBACE;wBACEnD,MAAM,GAAGA,KAAK6F,QAAQ,CACpBjC,aACA,GAAGvB,KAAKJ,IAAI,CAAC,CAAC,EAAEV,cAAc,EAC9B,CAAC,EAAEE,wBAAwB,cAAc,CAAC;oBAC9C;iBACD,GACD,EAAE;aACP;QACH,CAAA;IAEA,MAAMf,gCAAgC2B,MAAM;QAACH;KAAyB;IAEtE,MAAM1B,qBAAqB6B;IAC3B,OAAO,IACL5B,oBAAoB4B,MAAMC,OAAOG,yBAAyB,EAAE;YAC1DqD,WAAW;gBAAC;aAAa;QAC3B;AACJ;AACA,eAAe1D,iBAAiB"}
1
+ {"version":3,"sources":["../../../../../../packages/nx-plugin/src/infra/app/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n type GeneratorCallback,\n generateFiles,\n joinPathFragments,\n OverwriteStrategy,\n type ProjectConfiguration,\n readProjectConfiguration,\n type Tree,\n updateJson,\n} from '@nx/devkit';\nimport path from 'path';\nimport tsProjectGenerator, { getTsLibDetails } from '../../ts/lib/generator.js';\nimport { mergeTsReferences } from '../../ts/lib/ts-project-utils.js';\nimport { addTsDependencies } from '../../utils/add-dependencies.js';\nimport { resolveContainers } from '../../utils/containers.js';\nimport {\n declareDependencies,\n ownedElsewhere,\n} from '../../utils/declared-dependencies.js';\nimport { formatFilesInSubtree } from '../../utils/format.js';\nimport { installDependencies } from '../../utils/install.js';\nimport { addGeneratorMetricsIfApplicable } from '../../utils/metrics.js';\nimport { esmVars } from '../../utils/module-format.js';\nimport { kebabCase } from '../../utils/names.js';\nimport { getNpmScopePrefix } from '../../utils/npm-scope.js';\nimport {\n addDependencyToTargetIfNotPresent,\n addGeneratorMetadata,\n getGeneratorInfo,\n type NxGeneratorInfo,\n projectExists,\n} from '../../utils/nx.js';\nimport { sortObjectKeys } from '../../utils/object.js';\nimport { getPackageManagerDisplayCommands } from '../../utils/pkg-manager.js';\nimport { uvxCommand } from '../../utils/py.js';\nimport {\n SHARED_CONSTRUCTS_DEPENDENCIES,\n sharedConstructsGenerator,\n} from '../../utils/shared-constructs.js';\nimport {\n PACKAGES_DIR,\n SHARED_CONSTRUCTS_DIR,\n SHARED_INFRA_CONFIG_DIR,\n} from '../../utils/shared-constructs-constants.js';\nimport { sharedInfraConfigGenerator } from '../../utils/shared-infra-config.js';\nimport {\n SHARED_INFRA_SCRIPTS_DEPENDENCIES,\n sharedInfraScriptsGenerator,\n} from '../../utils/shared-infra-scripts.js';\nimport type { TsInfraGeneratorSchema } from './schema';\n\n// This generator records no metadata, so nothing a predicate could read: the\n// CDK app always needs the app libraries, and the CLI, bundler and tsx are\n// shared tooling.\nexport const DEPENDENCIES = declareDependencies()({\n ts: [\n { name: 'aws-cdk-lib' },\n { name: 'constructs' },\n { name: 'source-map-support' },\n // The `aws-cdk` CLI, esbuild (CDK bundling) and tsx are shared tooling.\n { name: 'aws-cdk', dev: true, root: true },\n { name: 'esbuild', dev: true, root: true },\n { name: 'tsx', dev: true, root: true },\n ...ownedElsewhere(SHARED_CONSTRUCTS_DEPENDENCIES),\n ...ownedElsewhere(SHARED_INFRA_SCRIPTS_DEPENDENCIES),\n ],\n});\n\nexport const INFRA_APP_GENERATOR_INFO: NxGeneratorInfo = getGeneratorInfo(\n import.meta.filename,\n);\n\nexport async function tsInfraGenerator(\n tree: Tree,\n schema: TsInfraGeneratorSchema,\n): Promise<GeneratorCallback> {\n const lib = getTsLibDetails(tree, schema);\n\n if (!projectExists(tree, lib.fullyQualifiedName)) {\n await tsProjectGenerator(tree, {\n ...schema,\n preferInstallDependencies: false,\n });\n }\n\n // CDK shells out to a container engine to build image assets. Default\n // (docker) needs no env override; finch is set via CDK_DOCKER per\n // https://docs.aws.amazon.com/cdk/v2/guide/build-containers.html#build-container-replace.\n const containers = await resolveContainers(tree, 'inherit');\n const cdkEnv: Record<string, string> | undefined =\n containers === 'docker' ? undefined : { CDK_DOCKER: containers };\n const withCdkEnv = <T extends Record<string, unknown>>(opts: T): T => {\n if (!cdkEnv) return opts;\n const existingEnv = (opts.env as Record<string, string> | undefined) ?? {};\n return { ...opts, env: { ...existingEnv, ...cdkEnv } } as T;\n };\n\n // This generator IS the CDK infrastructure project, so the provider is fixed.\n addGeneratorMetadata(tree, lib.fullyQualifiedName, INFRA_APP_GENERATOR_INFO, {\n iac: 'cdk',\n });\n\n // Shared constructs always in CDK for typescript infra generator\n await sharedConstructsGenerator(\n tree,\n {\n iac: 'cdk',\n },\n DEPENDENCIES,\n );\n\n // Shared infra-config and infra-scripts packages (lazy creation, only when enabled)\n const stageConfig = schema.stageConfig ?? false;\n if (stageConfig) {\n await sharedInfraConfigGenerator(tree);\n await sharedInfraScriptsGenerator(tree, DEPENDENCIES);\n }\n\n const synthDirFromRoot = `/dist/${lib.dir}/cdk.out`;\n const synthDirFromProject =\n lib.dir\n .split('/')\n .map(() => '..')\n .join('/') + `/dist/${lib.dir}/cdk.out`;\n const distDirFromProjectRoot =\n lib.dir\n .split('/')\n .map(() => '..')\n .join('/') + '/dist/{projectRoot}/cdk.out';\n const projectConfig = readProjectConfiguration(tree, lib.fullyQualifiedName);\n const libraryRoot = projectConfig.root;\n const npmScopePrefix = getNpmScopePrefix(tree);\n const scopeAlias = npmScopePrefix;\n const fullyQualifiedName = `${npmScopePrefix}${schema.name}`;\n const namespace = kebabCase(fullyQualifiedName);\n // The stage instantiated in main.ts. Quoted so the shell does not glob `*`.\n const sandboxStagePattern = `\"${namespace}-sandbox/*\"`;\n tree.delete(joinPathFragments(libraryRoot, 'src'));\n\n generateFiles(\n tree, // the virtual file system\n joinPathFragments(import.meta.dirname, './files/app'), // path to the file templates\n libraryRoot, // destination path of the files\n {\n synthDir: synthDirFromProject,\n scopeAlias: scopeAlias,\n namespace,\n fullyQualifiedName,\n pkgMgrCmd: getPackageManagerDisplayCommands().exec,\n dir: lib.dir,\n stageConfig,\n ...schema,\n ...esmVars(tree),\n },\n {\n overwriteStrategy: OverwriteStrategy.Overwrite,\n },\n );\n\n updateJson(\n tree,\n `${libraryRoot}/project.json`,\n (config: ProjectConfiguration) => {\n config.projectType = 'application';\n addDependencyToTargetIfNotPresent(config, 'build', 'synth');\n addDependencyToTargetIfNotPresent(config, 'build', 'checkov');\n config.targets.compile.outputs = [\n '{workspaceRoot}/dist/{projectRoot}/tsc',\n ];\n config.targets.synth = {\n cache: true,\n executor: 'nx:run-commands',\n inputs: ['default'],\n outputs: ['{workspaceRoot}/dist/{projectRoot}/cdk.out'],\n dependsOn: ['^build', 'compile'], // compile clobbers dist directory, so ensure synth runs afterwards\n options: withCdkEnv({\n cwd: '{projectRoot}',\n command: 'cdk synth',\n }),\n };\n config.targets.checkov = {\n cache: true,\n executor: 'nx:run-commands',\n inputs: ['{workspaceRoot}/dist/{projectRoot}/cdk.out'],\n outputs: ['{workspaceRoot}/dist/{projectRoot}/checkov'],\n dependsOn: ['synth'],\n options: {\n command: uvxCommand(\n 'checkov',\n '--config-file {projectRoot}/checkov.yml --directory dist/{projectRoot}/cdk.out --framework cloudformation',\n ),\n },\n };\n config.targets.deploy = {\n executor: 'nx:run-commands',\n dependsOn: ['^build', 'compile'],\n options: stageConfig\n ? withCdkEnv({\n command: `tsx packages/common/scripts/src/infra/infra-deploy.ts ${libraryRoot}`,\n })\n : withCdkEnv({\n cwd: '{projectRoot}',\n command: 'cdk deploy --require-approval=never',\n }),\n };\n config.targets['deploy-sandbox'] = {\n executor: 'nx:run-commands',\n dependsOn: ['^build', 'compile'],\n options: stageConfig\n ? withCdkEnv({\n command: `tsx packages/common/scripts/src/infra/infra-deploy.ts ${libraryRoot} ${sandboxStagePattern}`,\n })\n : withCdkEnv({\n cwd: '{projectRoot}',\n command: `cdk deploy --require-approval=never ${sandboxStagePattern}`,\n }),\n };\n config.targets['deploy-ci'] = {\n executor: 'nx:run-commands',\n options: withCdkEnv({\n cwd: '{projectRoot}',\n command: `cdk deploy --require-approval=never --app ${distDirFromProjectRoot}`,\n }),\n };\n config.targets.destroy = {\n executor: 'nx:run-commands',\n dependsOn: ['^build', 'compile'],\n options: stageConfig\n ? withCdkEnv({\n command: `tsx packages/common/scripts/src/infra/infra-destroy.ts ${libraryRoot}`,\n })\n : withCdkEnv({\n cwd: '{projectRoot}',\n command: 'cdk destroy --require-approval=never',\n }),\n };\n config.targets['destroy-ci'] = {\n executor: 'nx:run-commands',\n options: withCdkEnv({\n cwd: '{projectRoot}',\n command: `cdk destroy --require-approval=never --app ${distDirFromProjectRoot}`,\n }),\n };\n config.targets.cdk = {\n executor: 'nx:run-commands',\n options: withCdkEnv({\n cwd: '{projectRoot}',\n command: 'cdk',\n }),\n };\n config.targets.bootstrap = {\n executor: 'nx:run-commands',\n options: withCdkEnv({\n cwd: '{projectRoot}',\n command: 'cdk bootstrap',\n }),\n };\n config.targets = sortObjectKeys(config.targets);\n return config;\n },\n );\n\n addTsDependencies(tree, DEPENDENCIES, { projectRoot: libraryRoot });\n\n updateJson(tree, `${libraryRoot}/tsconfig.lib.json`, (tsConfig) => ({\n ...tsConfig,\n references: mergeTsReferences(tsConfig.references, [\n {\n path: `${path.relative(\n libraryRoot,\n `${tree.root}/${PACKAGES_DIR}`,\n )}/${SHARED_CONSTRUCTS_DIR}/tsconfig.lib.json`,\n },\n ...(stageConfig\n ? [\n {\n path: `${path.relative(\n libraryRoot,\n `${tree.root}/${PACKAGES_DIR}`,\n )}/${SHARED_INFRA_CONFIG_DIR}/tsconfig.json`,\n },\n ]\n : []),\n ]),\n }));\n\n await addGeneratorMetricsIfApplicable(tree, [INFRA_APP_GENERATOR_INFO]);\n\n await formatFilesInSubtree(tree);\n return () =>\n installDependencies(tree, schema.preferInstallDependencies, {\n languages: ['typescript'],\n });\n}\nexport default tsInfraGenerator;\n"],"names":["generateFiles","joinPathFragments","OverwriteStrategy","readProjectConfiguration","updateJson","path","tsProjectGenerator","getTsLibDetails","mergeTsReferences","addTsDependencies","resolveContainers","declareDependencies","ownedElsewhere","formatFilesInSubtree","installDependencies","addGeneratorMetricsIfApplicable","esmVars","kebabCase","getNpmScopePrefix","addDependencyToTargetIfNotPresent","addGeneratorMetadata","getGeneratorInfo","projectExists","sortObjectKeys","getPackageManagerDisplayCommands","uvxCommand","SHARED_CONSTRUCTS_DEPENDENCIES","sharedConstructsGenerator","PACKAGES_DIR","SHARED_CONSTRUCTS_DIR","SHARED_INFRA_CONFIG_DIR","sharedInfraConfigGenerator","SHARED_INFRA_SCRIPTS_DEPENDENCIES","sharedInfraScriptsGenerator","DEPENDENCIES","ts","name","dev","root","INFRA_APP_GENERATOR_INFO","filename","tsInfraGenerator","tree","schema","lib","fullyQualifiedName","preferInstallDependencies","containers","cdkEnv","undefined","CDK_DOCKER","withCdkEnv","opts","existingEnv","env","iac","stageConfig","synthDirFromRoot","dir","synthDirFromProject","split","map","join","distDirFromProjectRoot","projectConfig","libraryRoot","npmScopePrefix","scopeAlias","namespace","sandboxStagePattern","delete","dirname","synthDir","pkgMgrCmd","exec","overwriteStrategy","Overwrite","config","projectType","targets","compile","outputs","synth","cache","executor","inputs","dependsOn","options","cwd","command","checkov","deploy","destroy","cdk","bootstrap","projectRoot","tsConfig","references","relative","languages"],"mappings":"AAAA;;;CAGC,GACD,SAEEA,aAAa,EACbC,iBAAiB,EACjBC,iBAAiB,EAEjBC,wBAAwB,EAExBC,UAAU,QACL,aAAa;AACpB,OAAOC,UAAU,OAAO;AACxB,OAAOC,sBAAsBC,eAAe,QAAQ,4BAA4B;AAChF,SAASC,iBAAiB,QAAQ,mCAAmC;AACrE,SAASC,iBAAiB,QAAQ,kCAAkC;AACpE,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,SACEC,mBAAmB,EACnBC,cAAc,QACT,uCAAuC;AAC9C,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,+BAA+B,QAAQ,yBAAyB;AACzE,SAASC,OAAO,QAAQ,+BAA+B;AACvD,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,iBAAiB,QAAQ,2BAA2B;AAC7D,SACEC,iCAAiC,EACjCC,oBAAoB,EACpBC,gBAAgB,EAEhBC,aAAa,QACR,oBAAoB;AAC3B,SAASC,cAAc,QAAQ,wBAAwB;AACvD,SAASC,gCAAgC,QAAQ,6BAA6B;AAC9E,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SACEC,8BAA8B,EAC9BC,yBAAyB,QACpB,mCAAmC;AAC1C,SACEC,YAAY,EACZC,qBAAqB,EACrBC,uBAAuB,QAClB,6CAA6C;AACpD,SAASC,0BAA0B,QAAQ,qCAAqC;AAChF,SACEC,iCAAiC,EACjCC,2BAA2B,QACtB,sCAAsC;AAG7C,6EAA6E;AAC7E,2EAA2E;AAC3E,kBAAkB;AAClB,OAAO,MAAMC,eAAevB,sBAAsB;IAChDwB,IAAI;QACF;YAAE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,SAASpC,WAAW;gBAClBqC,KAAK;gBACLC,SAAS,CAAC,2CAA2C,EAAE1B,wBAAwB;YACjF;QACF;QACAc,OAAOE,OAAO,CAACc,GAAG,GAAG;YACnBT,UAAU;YACVG,SAASpC,WAAW;gBAClBqC,KAAK;gBACLC,SAAS;YACX;QACF;QACAZ,OAAOE,OAAO,CAACe,SAAS,GAAG;YACzBV,UAAU;YACVG,SAASpC,WAAW;gBAClBqC,KAAK;gBACLC,SAAS;YACX;QACF;QACAZ,OAAOE,OAAO,GAAGxD,eAAesD,OAAOE,OAAO;QAC9C,OAAOF;IACT;IAGFpE,kBAAkBiC,MAAMR,cAAc;QAAE6D,aAAa9B;IAAY;IAEjE7D,WAAWsC,MAAM,GAAGuB,YAAY,kBAAkB,CAAC,EAAE,CAAC+B,WAAc,CAAA;YAClE,GAAGA,QAAQ;YACXC,YAAYzF,kBAAkBwF,SAASC,UAAU,EAAE;gBACjD;oBACE5F,MAAM,GAAGA,KAAK6F,QAAQ,CACpBjC,aACA,GAAGvB,KAAKJ,IAAI,CAAC,CAAC,EAAEV,cAAc,EAC9B,CAAC,EAAEC,sBAAsB,kBAAkB,CAAC;gBAChD;mBACI2B,cACA;oBACE;wBACEnD,MAAM,GAAGA,KAAK6F,QAAQ,CACpBjC,aACA,GAAGvB,KAAKJ,IAAI,CAAC,CAAC,EAAEV,cAAc,EAC9B,CAAC,EAAEE,wBAAwB,cAAc,CAAC;oBAC9C;iBACD,GACD,EAAE;aACP;QACH,CAAA;IAEA,MAAMf,gCAAgC2B,MAAM;QAACH;KAAyB;IAEtE,MAAM1B,qBAAqB6B;IAC3B,OAAO,IACL5B,oBAAoB4B,MAAMC,OAAOG,yBAAyB,EAAE;YAC1DqD,WAAW;gBAAC;aAAa;QAC3B;AACJ;AACA,eAAe1D,iBAAiB"}
@@ -3,9 +3,9 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import type { GeneratorCallback, Tree } from '@nx/devkit';
6
- import { type NxGeneratorInfo } from '../utils/nx';
6
+ import { type NxGeneratorInfo } from '../utils/nx.js';
7
7
  import type { InitGeneratorSchema } from './schema';
8
- export declare const DEPENDENCIES: import("../utils/declared-dependencies").DependencyDeclaration<readonly [{
8
+ export declare const DEPENDENCIES: import("../utils/declared-dependencies.js").DependencyDeclaration<readonly [{
9
9
  readonly name: "husky";
10
10
  }, {
11
11
  readonly name: "nx";
@@ -17,7 +17,7 @@ export declare const DEPENDENCIES: import("../utils/declared-dependencies").Depe
17
17
  readonly name: "typescript";
18
18
  }, {
19
19
  readonly name: "@biomejs/biome";
20
- }], readonly import("../utils/declared-dependencies").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aiosqlite" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "langgraph-checkpoint-aws" | "langgraph-checkpoint-sqlite" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", Record<string, never>>[]>;
20
+ }], readonly import("../utils/declared-dependencies.js").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aiosqlite" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "langgraph-checkpoint-aws" | "langgraph-checkpoint-sqlite" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", Record<string, never>>[]>;
21
21
  export declare const INIT_GENERATOR_INFO: NxGeneratorInfo;
22
22
  /**
23
23
  * Configure an existing Nx workspace to use the @aws/nx-plugin.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../packages/nx-plugin/src/init/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport type { GeneratorCallback, Tree } from '@nx/devkit';\nimport { declareDependencies } from '../utils/declared-dependencies';\nimport { formatFilesInSubtree } from '../utils/format';\nimport { applyWorkspaceInit, INIT_DEPENDENCIES } from '../utils/init';\nimport { installDependencies } from '../utils/install';\nimport { addGeneratorMetricsIfApplicable } from '../utils/metrics';\nimport { getGeneratorInfo, type NxGeneratorInfo } from '../utils/nx';\nimport type { InitGeneratorSchema } from './schema';\n\n// `husky` comes from the preset, which is discovered as init: both mark the\n// workspace by writing aws-nx-plugin.config.mts, and only init has an id there.\nexport const DEPENDENCIES = declareDependencies()({\n ts: [{ name: 'husky' }, ...INIT_DEPENDENCIES],\n});\n\nexport const INIT_GENERATOR_INFO: NxGeneratorInfo = getGeneratorInfo(\n import.meta.filename,\n);\n\n/**\n * Configure an existing Nx workspace to use the @aws/nx-plugin.\n *\n * Runs the same deterministic setup the workspace preset performs, so teams\n * with an established Nx workspace can adopt the plugin without recreating\n * their workspace. Every step is idempotent — re-running against an\n * already-initialised workspace is a safe no-op.\n */\nexport const initGenerator = async (\n tree: Tree,\n { iac, mcp, containers, preferInstallDependencies }: InitGeneratorSchema,\n): Promise<GeneratorCallback> => {\n await applyWorkspaceInit(tree, { iac, containers, mcp }, DEPENDENCIES);\n\n await addGeneratorMetricsIfApplicable(tree, [INIT_GENERATOR_INFO]);\n\n await formatFilesInSubtree(tree);\n return () =>\n installDependencies(tree, preferInstallDependencies, {\n languages: ['typescript'],\n });\n};\n\nexport default initGenerator;\n"],"names":["declareDependencies","formatFilesInSubtree","applyWorkspaceInit","INIT_DEPENDENCIES","installDependencies","addGeneratorMetricsIfApplicable","getGeneratorInfo","DEPENDENCIES","ts","name","INIT_GENERATOR_INFO","filename","initGenerator","tree","iac","mcp","containers","preferInstallDependencies","languages"],"mappings":"AAAA;;;CAGC,GAED,SAASA,mBAAmB,QAAQ,oCAAiC;AACrE,SAASC,oBAAoB,QAAQ,qBAAkB;AACvD,SAASC,kBAAkB,EAAEC,iBAAiB,QAAQ,mBAAgB;AACtE,SAASC,mBAAmB,QAAQ,sBAAmB;AACvD,SAASC,+BAA+B,QAAQ,sBAAmB;AACnE,SAASC,gBAAgB,QAA8B,iBAAc;AAGrE,4EAA4E;AAC5E,gFAAgF;AAChF,OAAO,MAAMC,eAAeP,sBAAsB;IAChDQ,IAAI;QAAC;YAAEC,MAAM;QAAQ;WAAMN;KAAkB;AAC/C,GAAG;AAEH,OAAO,MAAMO,sBAAuCJ,iBAClD,YAAYK,QAAQ,EACpB;AAEF;;;;;;;CAOC,GACD,OAAO,MAAMC,gBAAgB,OAC3BC,MACA,EAAEC,GAAG,EAAEC,GAAG,EAAEC,UAAU,EAAEC,yBAAyB,EAAuB;IAExE,MAAMf,mBAAmBW,MAAM;QAAEC;QAAKE;QAAYD;IAAI,GAAGR;IAEzD,MAAMF,gCAAgCQ,MAAM;QAACH;KAAoB;IAEjE,MAAMT,qBAAqBY;IAC3B,OAAO,IACLT,oBAAoBS,MAAMI,2BAA2B;YACnDC,WAAW;gBAAC;aAAa;QAC3B;AACJ,EAAE;AAEF,eAAeN,cAAc"}
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/init/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport type { GeneratorCallback, Tree } from '@nx/devkit';\nimport { declareDependencies } from '../utils/declared-dependencies.js';\nimport { formatFilesInSubtree } from '../utils/format.js';\nimport { applyWorkspaceInit, INIT_DEPENDENCIES } from '../utils/init.js';\nimport { installDependencies } from '../utils/install.js';\nimport { addGeneratorMetricsIfApplicable } from '../utils/metrics.js';\nimport { getGeneratorInfo, type NxGeneratorInfo } from '../utils/nx.js';\nimport type { InitGeneratorSchema } from './schema';\n\n// `husky` comes from the preset, which is discovered as init: both mark the\n// workspace by writing aws-nx-plugin.config.mts, and only init has an id there.\nexport const DEPENDENCIES = declareDependencies()({\n ts: [{ name: 'husky' }, ...INIT_DEPENDENCIES],\n});\n\nexport const INIT_GENERATOR_INFO: NxGeneratorInfo = getGeneratorInfo(\n import.meta.filename,\n);\n\n/**\n * Configure an existing Nx workspace to use the @aws/nx-plugin.\n *\n * Runs the same deterministic setup the workspace preset performs, so teams\n * with an established Nx workspace can adopt the plugin without recreating\n * their workspace. Every step is idempotent — re-running against an\n * already-initialised workspace is a safe no-op.\n */\nexport const initGenerator = async (\n tree: Tree,\n { iac, mcp, containers, preferInstallDependencies }: InitGeneratorSchema,\n): Promise<GeneratorCallback> => {\n await applyWorkspaceInit(tree, { iac, containers, mcp }, DEPENDENCIES);\n\n await addGeneratorMetricsIfApplicable(tree, [INIT_GENERATOR_INFO]);\n\n await formatFilesInSubtree(tree);\n return () =>\n installDependencies(tree, preferInstallDependencies, {\n languages: ['typescript'],\n });\n};\n\nexport default initGenerator;\n"],"names":["declareDependencies","formatFilesInSubtree","applyWorkspaceInit","INIT_DEPENDENCIES","installDependencies","addGeneratorMetricsIfApplicable","getGeneratorInfo","DEPENDENCIES","ts","name","INIT_GENERATOR_INFO","filename","initGenerator","tree","iac","mcp","containers","preferInstallDependencies","languages"],"mappings":"AAAA;;;CAGC,GAED,SAASA,mBAAmB,QAAQ,oCAAoC;AACxE,SAASC,oBAAoB,QAAQ,qBAAqB;AAC1D,SAASC,kBAAkB,EAAEC,iBAAiB,QAAQ,mBAAmB;AACzE,SAASC,mBAAmB,QAAQ,sBAAsB;AAC1D,SAASC,+BAA+B,QAAQ,sBAAsB;AACtE,SAASC,gBAAgB,QAA8B,iBAAiB;AAGxE,4EAA4E;AAC5E,gFAAgF;AAChF,OAAO,MAAMC,eAAeP,sBAAsB;IAChDQ,IAAI;QAAC;YAAEC,MAAM;QAAQ;WAAMN;KAAkB;AAC/C,GAAG;AAEH,OAAO,MAAMO,sBAAuCJ,iBAClD,YAAYK,QAAQ,EACpB;AAEF;;;;;;;CAOC,GACD,OAAO,MAAMC,gBAAgB,OAC3BC,MACA,EAAEC,GAAG,EAAEC,GAAG,EAAEC,UAAU,EAAEC,yBAAyB,EAAuB;IAExE,MAAMf,mBAAmBW,MAAM;QAAEC;QAAKE;QAAYD;IAAI,GAAGR;IAEzD,MAAMF,gCAAgCQ,MAAM;QAACH;KAAoB;IAEjE,MAAMT,qBAAqBY;IAC3B,OAAO,IACLT,oBAAoBS,MAAMI,2BAA2B;YACnDC,WAAW;gBAAC;aAAa;QAC3B;AACJ,EAAE;AAEF,eAAeN,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../packages/nx-plugin/src/init/schema.d.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Containers } from '../utils/containers';\nimport { Iac } from '../utils/iac';\n\nexport type InitContainersOption = Containers | 'infer';\n\nexport interface InitGeneratorSchema {\n readonly iac: Iac;\n readonly mcp?: boolean;\n readonly containers?: InitContainersOption;\n readonly preferInstallDependencies?: boolean;\n}\n"],"names":[],"mappings":"AAAA;;;CAGC,GAOD,WAKC"}
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/init/schema.d.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Containers } from '../utils/containers.js';\nimport { Iac } from '../utils/iac.js';\n\nexport type InitContainersOption = Containers | 'infer';\n\nexport interface InitGeneratorSchema {\n readonly iac: Iac;\n readonly mcp?: boolean;\n readonly containers?: InitContainersOption;\n readonly preferInstallDependencies?: boolean;\n}\n"],"names":[],"mappings":"AAAA;;;CAGC,GAOD,WAKC"}
@@ -3,8 +3,8 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
 
6
- import { Containers } from '../utils/containers';
7
- import { Iac } from '../utils/iac';
6
+ import { Containers } from '../utils/containers.js';
7
+ import { Iac } from '../utils/iac.js';
8
8
 
9
9
  export type InitContainersOption = Containers | 'infer';
10
10
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../packages/nx-plugin/src/internal/test-matrix/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport type { GeneratorCallback, Tree } from '@nx/devkit';\nimport { agentcoreGatewayGenerator } from '../../sdk/agentcore-gateway';\nimport { agentcoreHarnessGenerator } from '../../sdk/agentcore-harness';\nimport {\n type ConnectionGeneratorSchema,\n connectionGenerator,\n} from '../../sdk/connection';\nimport { licenseGenerator } from '../../sdk/license';\nimport {\n type PyAgentGeneratorSchema,\n type PyApiGeneratorSchema,\n type PyRdbGeneratorSchema,\n pyAgentGenerator,\n pyApiGenerator,\n pyDynamoDBGenerator,\n pyLambdaFunctionGenerator,\n pyMcpServerGenerator,\n pyProjectGenerator,\n pyRdbGenerator,\n} from '../../sdk/py';\nimport { smithyProjectGenerator } from '../../sdk/smithy';\nimport { terraformProjectGenerator } from '../../sdk/terraform';\nimport {\n type TsAgentGeneratorSchema,\n type TsApiGeneratorSchema,\n type TsNxMigrationGeneratorSchema,\n type TsRdbGeneratorSchema,\n tsAgentGenerator,\n tsApiGenerator,\n tsAstroDocsGenerator,\n tsDcrProxyGenerator,\n tsDynamoDBGenerator,\n tsInfraGenerator,\n tsLambdaFunctionGenerator,\n tsMcpServerGenerator,\n tsNxGeneratorGenerator,\n tsNxMigrationGenerator,\n tsNxPluginGenerator,\n tsProjectGenerator,\n tsRdbGenerator,\n tsWebsiteAuthGenerator,\n tsWebsiteGenerator,\n} from '../../sdk/ts';\nimport { installDependencies } from '../../utils/install';\nimport { toSnakeCase } from '../../utils/names';\nimport { getNpmScope, getNpmScopePrefix } from '../../utils/npm-scope';\nimport type { InternalTestMatrixGeneratorSchema } from './schema';\n\n/**\n * Scaffolds every generator, component and connection permutation the e2e tests\n * cover, by composing the generators in-process on a single tree.\n *\n * This ships with the plugin so each released version carries the matrix of the\n * generators *it* had. A test upgrading an old workspace scaffolds with the\n * released version's own matrix and never has to reason about which generators\n * existed when — driving the CLI from the test repo instead would couple the\n * test to a generator list that only describes today's plugin.\n *\n * Hidden and undocumented: it exists for the e2e suite, not for users.\n *\n * Options are typed against each generator's schema, so adding a required option\n * or changing an enum breaks the build here rather than silently reducing\n * coverage.\n *\n * Projects are generated with `preferInstallDependencies: false` by default and\n * the returned callback installs once. Nothing composed here reads the project\n * graph (only `ts#sync` does, which is not part of the matrix), so no\n * intermediate install is needed.\n */\nexport const internalTestMatrixGenerator = async (\n tree: Tree,\n options: InternalTestMatrixGeneratorSchema = {},\n): Promise<GeneratorCallback> => {\n const preferInstallDependencies = options.preferInstallDependencies ?? false;\n const defaults = { preferInstallDependencies };\n const projectDefaults = { ...defaults, directory: 'packages' };\n // Fully-qualified project names, which differ per language: TypeScript\n // projects are scope-prefixed, Python ones are dotted snake_case. Derived from\n // the workspace rather than hardcoded, so the matrix works in any workspace.\n const ts = (name: string) => `${getNpmScopePrefix(tree)}${name}`;\n const py = (name: string) =>\n `${toSnakeCase(getNpmScope(tree))}.${toSnakeCase(name)}`;\n\n // The infrastructure project every other generator deploys into. Which\n // generator owns it depends on the workspace's IaC provider, so the caller\n // asks for the one matching the workspace it created.\n if (options.infra === 'terraform') {\n await terraformProjectGenerator(tree, {\n name: 'infra',\n type: 'application',\n ...projectDefaults,\n });\n } else {\n await tsInfraGenerator(tree, { name: 'infra', ...projectDefaults });\n // A second CDK app with stage config, which only ts#infra offers.\n await tsInfraGenerator(tree, {\n name: 'infra-with-stages',\n stageConfig: true,\n ...projectDefaults,\n });\n }\n\n // Websites (with and without TanStack Router), a docs site, and auth on each.\n await tsWebsiteGenerator(tree, {\n name: 'website',\n iac: 'inherit',\n ...projectDefaults,\n });\n await tsWebsiteGenerator(tree, {\n name: 'website-no-router',\n tanstackRouter: false,\n iac: 'inherit',\n ...projectDefaults,\n });\n await tsAstroDocsGenerator(tree, { name: 'docs-site', ...defaults });\n await tsWebsiteAuthGenerator(tree, {\n project: ts('website'),\n cognitoDomain: 'test',\n allowSignup: true,\n iac: 'inherit',\n ...defaults,\n });\n await tsWebsiteAuthGenerator(tree, {\n project: ts('website-no-router'),\n cognitoDomain: 'test-no-router',\n allowSignup: true,\n iac: 'inherit',\n ...defaults,\n });\n\n // tRPC APIs — REST + HTTP, with Cognito and custom auth.\n const tsApis: TsApiGeneratorSchema[] = [\n { name: 'my-api', infra: 'rest-lambda', auth: 'iam', iac: 'inherit' },\n { name: 'my-api-http', infra: 'http-lambda', auth: 'iam', iac: 'inherit' },\n {\n name: 'my-api-custom',\n infra: 'rest-lambda',\n auth: 'custom',\n iac: 'inherit',\n },\n {\n name: 'my-api-custom-http',\n infra: 'http-lambda',\n auth: 'custom',\n iac: 'inherit',\n },\n {\n name: 'my-smithy-api',\n framework: 'smithy',\n infra: 'rest-lambda',\n auth: 'iam',\n iac: 'inherit',\n },\n ];\n for (const api of tsApis) {\n await tsApiGenerator(tree, { ...api, ...projectDefaults });\n }\n\n // A Smithy shape library; `my-smithy-api` covers consuming one.\n await smithyProjectGenerator(tree, {\n name: 'my-shapes',\n type: 'shapes',\n ...projectDefaults,\n });\n\n // Python FastAPI — REST + HTTP, with Cognito and custom auth.\n const pyApis: PyApiGeneratorSchema[] = [\n { name: 'py-api', infra: 'rest-lambda', auth: 'iam', iac: 'inherit' },\n { name: 'py-api-http', infra: 'http-lambda', auth: 'iam', iac: 'inherit' },\n {\n name: 'py-api-custom',\n infra: 'rest-lambda',\n auth: 'custom',\n iac: 'inherit',\n },\n {\n name: 'py-api-custom-http',\n infra: 'http-lambda',\n auth: 'custom',\n iac: 'inherit',\n },\n ];\n for (const api of pyApis) {\n await pyApiGenerator(tree, { ...api, ...projectDefaults });\n }\n\n // Library projects hosting the components below, each with a lambda function.\n await pyProjectGenerator(tree, {\n name: 'py-project',\n type: 'application',\n ...projectDefaults,\n });\n await tsProjectGenerator(tree, { name: 'ts-project', ...projectDefaults });\n await pyLambdaFunctionGenerator(tree, {\n project: py('py-project'),\n name: 'my-function',\n event: 'Any',\n iac: 'inherit',\n ...defaults,\n });\n await tsLambdaFunctionGenerator(tree, {\n project: 'ts-project',\n name: 'my-function',\n event: 'Any',\n iac: 'inherit',\n ...defaults,\n });\n\n // MCP servers — uninfra'd and hosted on AgentCore.\n await pyMcpServerGenerator(tree, {\n project: 'py_project',\n name: 'my-mcp-server',\n infra: 'agentcore',\n iac: 'inherit',\n ...defaults,\n });\n await tsMcpServerGenerator(tree, {\n project: 'ts-project',\n name: 'my-mcp-server',\n infra: 'none',\n iac: 'inherit',\n ...defaults,\n });\n await tsMcpServerGenerator(tree, {\n project: 'ts-project',\n name: 'hosted-mcp-server',\n infra: 'agentcore',\n iac: 'inherit',\n ...defaults,\n });\n\n // OAuth DCR proxy for Cognito-authenticated MCP servers.\n await tsDcrProxyGenerator(tree, {\n name: 'my-dcr-proxy',\n iac: 'inherit',\n ...projectDefaults,\n });\n\n // TypeScript agents across every protocol and auth permutation. The unnamed\n // one takes the generator's default name, which the connections below use.\n const tsAgents: TsAgentGeneratorSchema[] = [\n {\n project: 'ts-project',\n name: 'my-ts-agent',\n infra: 'none',\n iac: 'inherit',\n },\n { project: 'ts-project', infra: 'agentcore', iac: 'inherit' },\n {\n project: 'ts-project',\n name: 'my-ts-a2a-agent',\n protocol: 'a2a',\n infra: 'agentcore',\n iac: 'inherit',\n },\n {\n project: 'ts-project',\n name: 'my-ts-a2a-agent-cognito',\n protocol: 'a2a',\n auth: 'cognito',\n infra: 'agentcore',\n iac: 'inherit',\n },\n {\n project: 'ts-project',\n name: 'my-ts-agui-agent',\n protocol: 'ag-ui',\n infra: 'agentcore',\n iac: 'inherit',\n },\n ];\n for (const agent of tsAgents) {\n await tsAgentGenerator(tree, { ...agent, ...defaults });\n }\n\n // Python agents: Strands across every protocol, plus LangChain in its own\n // project — langchain's dependency closure would push the zip-bundled Lambda\n // in py-project past its unzipped size limit.\n const pyAgents: PyAgentGeneratorSchema[] = [\n {\n project: 'py_project',\n name: 'my-agent',\n infra: 'agentcore',\n iac: 'inherit',\n },\n {\n project: 'py_project',\n name: 'my-py-a2a-agent',\n protocol: 'a2a',\n infra: 'agentcore',\n iac: 'inherit',\n },\n {\n project: 'py_project',\n name: 'my-py-a2a-agent-cognito',\n protocol: 'a2a',\n auth: 'cognito',\n infra: 'agentcore',\n iac: 'inherit',\n },\n {\n project: 'py_project',\n name: 'my-py-agui-agent',\n protocol: 'ag-ui',\n infra: 'agentcore',\n iac: 'inherit',\n },\n ];\n for (const agent of pyAgents) {\n await pyAgentGenerator(tree, { ...agent, ...defaults });\n }\n await pyProjectGenerator(tree, {\n name: 'py-langchain-project',\n type: 'application',\n ...projectDefaults,\n });\n const langchainAgents: PyAgentGeneratorSchema[] = [\n {\n project: 'py_langchain_project',\n name: 'my-py-langchain-agent',\n protocol: 'ag-ui',\n iac: 'inherit',\n },\n {\n project: 'py_langchain_project',\n name: 'my-py-langchain-http-agent',\n protocol: 'http',\n iac: 'inherit',\n },\n {\n project: 'py_langchain_project',\n name: 'my-py-langchain-a2a-agent',\n protocol: 'a2a',\n iac: 'inherit',\n },\n ];\n for (const agent of langchainAgents) {\n await pyAgentGenerator(tree, {\n ...agent,\n framework: 'langchain',\n infra: 'agentcore',\n ...defaults,\n });\n }\n\n // AgentCore gateways, including a parent fronting the first (chained), and\n // an http-protocol gateway fronting agent runtime targets.\n await agentcoreGatewayGenerator(tree, {\n name: 'my-gateway',\n iac: 'inherit',\n ...projectDefaults,\n });\n await agentcoreGatewayGenerator(tree, {\n name: 'parent-gateway',\n iac: 'inherit',\n ...projectDefaults,\n });\n await agentcoreGatewayGenerator(tree, {\n name: 'agent-gateway',\n protocol: 'http',\n iac: 'inherit',\n ...projectDefaults,\n });\n\n // AgentCore Harness — a standalone invocation project.\n await agentcoreHarnessGenerator(tree, {\n name: 'my-harness',\n infra: 'agentcore',\n iac: 'inherit',\n ...projectDefaults,\n });\n\n // Databases — DynamoDB, plus Aurora across both engines and ORMs.\n await tsDynamoDBGenerator(tree, {\n name: 'my-table',\n framework: 'electrodb',\n infra: 'dynamodb',\n iac: 'inherit',\n ...projectDefaults,\n });\n await pyDynamoDBGenerator(tree, {\n name: 'my-py-table',\n framework: 'pynamodb',\n infra: 'dynamodb',\n iac: 'inherit',\n ...projectDefaults,\n });\n const tsRdbs: TsRdbGeneratorSchema[] = [\n {\n name: 'postgres-db',\n infra: 'aurora',\n engine: 'postgres',\n framework: 'prisma',\n iac: 'inherit',\n },\n {\n name: 'my-sql-db',\n infra: 'aurora',\n engine: 'mysql',\n framework: 'prisma',\n iac: 'inherit',\n },\n ];\n for (const rdb of tsRdbs) {\n await tsRdbGenerator(tree, { ...rdb, ...projectDefaults });\n }\n const pyRdbs: PyRdbGeneratorSchema[] = [\n {\n name: 'py-postgres-db',\n infra: 'aurora',\n engine: 'postgres',\n framework: 'sqlmodel',\n iac: 'inherit',\n },\n {\n name: 'py-mysql-db',\n infra: 'aurora',\n engine: 'mysql',\n framework: 'sqlmodel',\n iac: 'inherit',\n },\n ];\n for (const rdb of pyRdbs) {\n await pyRdbGenerator(tree, { ...rdb, ...projectDefaults });\n }\n\n // Every connection edge the matrix covers.\n const connections: ConnectionGeneratorSchema[] = [\n // Website -> API\n { sourceProject: ts('website'), targetProject: ts('my-api') },\n { sourceProject: ts('website-no-router'), targetProject: ts('my-api') },\n { sourceProject: 'website', targetProject: 'py_api' },\n { sourceProject: 'website', targetProject: 'my-smithy-api' },\n // Agent -> MCP server\n {\n sourceProject: 'ts-project',\n sourceComponent: 'agent',\n targetProject: 'ts-project',\n targetComponent: 'hosted-mcp-server',\n },\n {\n sourceProject: 'ts-project',\n sourceComponent: 'my-ts-agui-agent',\n targetProject: 'ts-project',\n targetComponent: 'hosted-mcp-server',\n },\n {\n sourceProject: 'ts-project',\n sourceComponent: 'agent',\n targetProject: 'py_project',\n targetComponent: 'my-mcp-server',\n },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-agent',\n targetProject: 'py_project',\n targetComponent: 'my-mcp-server',\n },\n {\n sourceProject: 'py_langchain_project',\n sourceComponent: 'my-py-langchain-agent',\n targetProject: 'py_project',\n targetComponent: 'my-mcp-server',\n },\n // HTTP agent <-> A2A agent\n {\n sourceProject: 'ts-project',\n sourceComponent: 'agent',\n targetProject: 'ts-project',\n targetComponent: 'my-ts-a2a-agent',\n },\n {\n sourceProject: 'ts-project',\n sourceComponent: 'agent',\n targetProject: 'py_project',\n targetComponent: 'my-py-a2a-agent',\n },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-agent',\n targetProject: 'ts-project',\n targetComponent: 'my-ts-a2a-agent',\n },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-agent',\n targetProject: 'py_project',\n targetComponent: 'my-py-a2a-agent',\n },\n {\n sourceProject: 'py_langchain_project',\n sourceComponent: 'my-py-langchain-agent',\n targetProject: 'py_project',\n targetComponent: 'my-py-a2a-agent',\n },\n // Agent -> gateway, gateway -> MCP server, gateway -> gateway\n {\n sourceProject: 'ts-project',\n sourceComponent: 'agent',\n targetProject: ts('my-gateway'),\n },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-agent',\n targetProject: ts('my-gateway'),\n },\n {\n sourceProject: 'py_langchain_project',\n sourceComponent: 'my-py-langchain-agent',\n targetProject: ts('my-gateway'),\n },\n {\n sourceProject: ts('my-gateway'),\n targetProject: 'ts-project',\n targetComponent: 'hosted-mcp-server',\n },\n {\n sourceProject: ts('my-gateway'),\n targetProject: 'py_project',\n targetComponent: 'my-mcp-server',\n },\n { sourceProject: ts('parent-gateway'), targetProject: ts('my-gateway') },\n // Gateway -> agent (http gateway fronting agent runtime targets: every\n // supported protocol permutation), then website -> gateway.\n {\n sourceProject: ts('agent-gateway'),\n targetProject: 'ts-project',\n targetComponent: 'my-ts-agui-agent',\n },\n {\n sourceProject: ts('agent-gateway'),\n targetProject: 'ts-project',\n targetComponent: 'my-ts-a2a-agent',\n },\n {\n sourceProject: ts('agent-gateway'),\n targetProject: 'py_project',\n targetComponent: 'my-py-agui-agent',\n },\n {\n sourceProject: ts('agent-gateway'),\n targetProject: 'py_project',\n targetComponent: 'my-agent',\n },\n {\n sourceProject: ts('agent-gateway'),\n targetProject: 'py_project',\n targetComponent: 'my-py-a2a-agent',\n },\n {\n sourceProject: ts('website-no-router'),\n targetProject: ts('agent-gateway'),\n },\n // Website -> agent\n {\n sourceProject: ts('website'),\n targetProject: 'ts-project',\n targetComponent: 'agent',\n },\n {\n sourceProject: ts('website'),\n targetProject: 'ts-project',\n targetComponent: 'my-ts-agui-agent',\n },\n {\n sourceProject: ts('website'),\n targetProject: 'py_project',\n targetComponent: 'my-agent',\n },\n {\n sourceProject: ts('website'),\n targetProject: 'py_project',\n targetComponent: 'my-py-agui-agent',\n },\n {\n sourceProject: ts('website'),\n targetProject: 'py_langchain_project',\n targetComponent: 'my-py-langchain-agent',\n },\n {\n sourceProject: ts('website'),\n targetProject: 'py_langchain_project',\n targetComponent: 'my-py-langchain-http-agent',\n },\n // DynamoDB\n { sourceProject: 'my-api', targetProject: ts('my-table') },\n { sourceProject: 'my-smithy-api', targetProject: ts('my-table') },\n {\n sourceProject: 'ts-project',\n sourceComponent: 'my-ts-agent',\n targetProject: ts('my-table'),\n },\n {\n sourceProject: 'ts-project',\n sourceComponent: 'my-mcp-server',\n targetProject: ts('my-table'),\n },\n { sourceProject: 'py_api', targetProject: 'my_py_table' },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-agent',\n targetProject: 'my_py_table',\n },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-mcp-server',\n targetProject: 'my_py_table',\n },\n {\n sourceProject: 'py_langchain_project',\n sourceComponent: 'my-py-langchain-http-agent',\n targetProject: 'my_py_table',\n },\n // Relational databases\n { sourceProject: 'py_api', targetProject: 'py_postgres_db' },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-agent',\n targetProject: 'py_postgres_db',\n },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-mcp-server',\n targetProject: 'py_postgres_db',\n },\n ];\n for (const connection of connections) {\n await connectionGenerator(tree, { ...connection, ...defaults });\n }\n\n // Licensing, then an Nx plugin with a custom generator.\n await licenseGenerator(tree, {\n license: 'Apache-2.0',\n copyrightHolder: 'Amazon.com, Inc. or its affiliates',\n ...defaults,\n });\n await tsNxPluginGenerator(tree, {\n ...projectDefaults,\n name: 'plugin',\n directory: 'tools',\n });\n await tsNxGeneratorGenerator(tree, {\n project: ts('plugin'),\n name: 'my#generator',\n ...defaults,\n });\n\n // A migration of each kind, so the scaffolded codemods compile and the\n // plugin's migrations.json (created by the first run) registers all three.\n const migrations: Omit<TsNxMigrationGeneratorSchema, 'project'>[] = [\n {\n name: 'rename-foo-target',\n description: 'Rename the foo target to bar',\n },\n {\n name: 'migrate-custom-handlers',\n description: 'Update custom handlers for the new API',\n kind: 'agentic',\n },\n {\n name: 'upgrade-framework',\n description: 'Upgrade the framework and reconcile call sites',\n kind: 'hybrid',\n },\n ];\n for (const migration of migrations) {\n await tsNxMigrationGenerator(tree, {\n ...migration,\n project: ts('plugin'),\n ...defaults,\n });\n }\n\n return () =>\n installDependencies(tree, preferInstallDependencies, {\n languages: ['typescript', 'python'],\n });\n};\n\nexport default internalTestMatrixGenerator;\n"],"names":["agentcoreGatewayGenerator","agentcoreHarnessGenerator","connectionGenerator","licenseGenerator","pyAgentGenerator","pyApiGenerator","pyDynamoDBGenerator","pyLambdaFunctionGenerator","pyMcpServerGenerator","pyProjectGenerator","pyRdbGenerator","smithyProjectGenerator","terraformProjectGenerator","tsAgentGenerator","tsApiGenerator","tsAstroDocsGenerator","tsDcrProxyGenerator","tsDynamoDBGenerator","tsInfraGenerator","tsLambdaFunctionGenerator","tsMcpServerGenerator","tsNxGeneratorGenerator","tsNxMigrationGenerator","tsNxPluginGenerator","tsProjectGenerator","tsRdbGenerator","tsWebsiteAuthGenerator","tsWebsiteGenerator","installDependencies","toSnakeCase","getNpmScope","getNpmScopePrefix","internalTestMatrixGenerator","tree","options","preferInstallDependencies","defaults","projectDefaults","directory","ts","name","py","infra","type","stageConfig","iac","tanstackRouter","project","cognitoDomain","allowSignup","tsApis","auth","framework","api","pyApis","event","tsAgents","protocol","agent","pyAgents","langchainAgents","tsRdbs","engine","rdb","pyRdbs","connections","sourceProject","targetProject","sourceComponent","targetComponent","connection","license","copyrightHolder","migrations","description","kind","migration","languages"],"mappings":"AAAA;;;CAGC,GAED,SAASA,yBAAyB,QAAQ,iCAA8B;AACxE,SAASC,yBAAyB,QAAQ,iCAA8B;AACxE,SAEEC,mBAAmB,QACd,0BAAuB;AAC9B,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SAIEC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,EACnBC,yBAAyB,EACzBC,oBAAoB,EACpBC,kBAAkB,EAClBC,cAAc,QACT,kBAAe;AACtB,SAASC,sBAAsB,QAAQ,sBAAmB;AAC1D,SAASC,yBAAyB,QAAQ,yBAAsB;AAChE,SAKEC,gBAAgB,EAChBC,cAAc,EACdC,oBAAoB,EACpBC,mBAAmB,EACnBC,mBAAmB,EACnBC,gBAAgB,EAChBC,yBAAyB,EACzBC,oBAAoB,EACpBC,sBAAsB,EACtBC,sBAAsB,EACtBC,mBAAmB,EACnBC,kBAAkB,EAClBC,cAAc,EACdC,sBAAsB,EACtBC,kBAAkB,QACb,kBAAe;AACtB,SAASC,mBAAmB,QAAQ,yBAAsB;AAC1D,SAASC,WAAW,QAAQ,uBAAoB;AAChD,SAASC,WAAW,EAAEC,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,SAASR,GAAG;QACZC,MAAM;QACN,GAAGJ,QAAQ;IACb;IAEA,uEAAuE;IACvE,2EAA2E;IAC3E,MAAMqC,aAA8D;QAClE;YACEjC,MAAM;YACNkC,aAAa;QACf;QACA;YACElC,MAAM;YACNkC,aAAa;YACbC,MAAM;QACR;QACA;YACEnC,MAAM;YACNkC,aAAa;YACbC,MAAM;QACR;KACD;IACD,KAAK,MAAMC,aAAaH,WAAY;QAClC,MAAMnD,uBAAuBW,MAAM;YACjC,GAAG2C,SAAS;YACZ7B,SAASR,GAAG;YACZ,GAAGH,QAAQ;QACb;IACF;IAEA,OAAO,IACLR,oBAAoBK,MAAME,2BAA2B;YACnD0C,WAAW;gBAAC;gBAAc;aAAS;QACrC;AACJ,EAAE;AAEF,eAAe7C,4BAA4B"}
1
+ {"version":3,"sources":["../../../../../../packages/nx-plugin/src/internal/test-matrix/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport type { GeneratorCallback, Tree } from '@nx/devkit';\nimport { agentcoreGatewayGenerator } from '../../sdk/agentcore-gateway.js';\nimport { agentcoreHarnessGenerator } from '../../sdk/agentcore-harness.js';\nimport {\n type ConnectionGeneratorSchema,\n connectionGenerator,\n} from '../../sdk/connection.js';\nimport { licenseGenerator } from '../../sdk/license.js';\nimport {\n type PyAgentGeneratorSchema,\n type PyApiGeneratorSchema,\n type PyRdbGeneratorSchema,\n pyAgentGenerator,\n pyApiGenerator,\n pyDynamoDBGenerator,\n pyLambdaFunctionGenerator,\n pyMcpServerGenerator,\n pyProjectGenerator,\n pyRdbGenerator,\n} from '../../sdk/py.js';\nimport { smithyProjectGenerator } from '../../sdk/smithy.js';\nimport { terraformProjectGenerator } from '../../sdk/terraform.js';\nimport {\n type TsAgentGeneratorSchema,\n type TsApiGeneratorSchema,\n type TsNxMigrationGeneratorSchema,\n type TsRdbGeneratorSchema,\n tsAgentGenerator,\n tsApiGenerator,\n tsAstroDocsGenerator,\n tsDcrProxyGenerator,\n tsDynamoDBGenerator,\n tsInfraGenerator,\n tsLambdaFunctionGenerator,\n tsMcpServerGenerator,\n tsNxGeneratorGenerator,\n tsNxMigrationGenerator,\n tsNxPluginGenerator,\n tsProjectGenerator,\n tsRdbGenerator,\n tsWebsiteAuthGenerator,\n tsWebsiteGenerator,\n} from '../../sdk/ts.js';\nimport { installDependencies } from '../../utils/install.js';\nimport { toSnakeCase } from '../../utils/names.js';\nimport { getNpmScope, getNpmScopePrefix } from '../../utils/npm-scope.js';\nimport type { InternalTestMatrixGeneratorSchema } from './schema';\n\n/**\n * Scaffolds every generator, component and connection permutation the e2e tests\n * cover, by composing the generators in-process on a single tree.\n *\n * This ships with the plugin so each released version carries the matrix of the\n * generators *it* had. A test upgrading an old workspace scaffolds with the\n * released version's own matrix and never has to reason about which generators\n * existed when — driving the CLI from the test repo instead would couple the\n * test to a generator list that only describes today's plugin.\n *\n * Hidden and undocumented: it exists for the e2e suite, not for users.\n *\n * Options are typed against each generator's schema, so adding a required option\n * or changing an enum breaks the build here rather than silently reducing\n * coverage.\n *\n * Projects are generated with `preferInstallDependencies: false` by default and\n * the returned callback installs once. Nothing composed here reads the project\n * graph (only `ts#sync` does, which is not part of the matrix), so no\n * intermediate install is needed.\n */\nexport const internalTestMatrixGenerator = async (\n tree: Tree,\n options: InternalTestMatrixGeneratorSchema = {},\n): Promise<GeneratorCallback> => {\n const preferInstallDependencies = options.preferInstallDependencies ?? false;\n const defaults = { preferInstallDependencies };\n const projectDefaults = { ...defaults, directory: 'packages' };\n // Fully-qualified project names, which differ per language: TypeScript\n // projects are scope-prefixed, Python ones are dotted snake_case. Derived from\n // the workspace rather than hardcoded, so the matrix works in any workspace.\n const ts = (name: string) => `${getNpmScopePrefix(tree)}${name}`;\n const py = (name: string) =>\n `${toSnakeCase(getNpmScope(tree))}.${toSnakeCase(name)}`;\n\n // The infrastructure project every other generator deploys into. Which\n // generator owns it depends on the workspace's IaC provider, so the caller\n // asks for the one matching the workspace it created.\n if (options.infra === 'terraform') {\n await terraformProjectGenerator(tree, {\n name: 'infra',\n type: 'application',\n ...projectDefaults,\n });\n } else {\n await tsInfraGenerator(tree, { name: 'infra', ...projectDefaults });\n // A second CDK app with stage config, which only ts#infra offers.\n await tsInfraGenerator(tree, {\n name: 'infra-with-stages',\n stageConfig: true,\n ...projectDefaults,\n });\n }\n\n // Websites (with and without TanStack Router), a docs site, and auth on each.\n await tsWebsiteGenerator(tree, {\n name: 'website',\n iac: 'inherit',\n ...projectDefaults,\n });\n await tsWebsiteGenerator(tree, {\n name: 'website-no-router',\n tanstackRouter: false,\n iac: 'inherit',\n ...projectDefaults,\n });\n await tsAstroDocsGenerator(tree, { name: 'docs-site', ...defaults });\n await tsWebsiteAuthGenerator(tree, {\n project: ts('website'),\n cognitoDomain: 'test',\n allowSignup: true,\n iac: 'inherit',\n ...defaults,\n });\n await tsWebsiteAuthGenerator(tree, {\n project: ts('website-no-router'),\n cognitoDomain: 'test-no-router',\n allowSignup: true,\n iac: 'inherit',\n ...defaults,\n });\n\n // tRPC APIs — REST + HTTP, with Cognito and custom auth.\n const tsApis: TsApiGeneratorSchema[] = [\n { name: 'my-api', infra: 'rest-lambda', auth: 'iam', iac: 'inherit' },\n { name: 'my-api-http', infra: 'http-lambda', auth: 'iam', iac: 'inherit' },\n {\n name: 'my-api-custom',\n infra: 'rest-lambda',\n auth: 'custom',\n iac: 'inherit',\n },\n {\n name: 'my-api-custom-http',\n infra: 'http-lambda',\n auth: 'custom',\n iac: 'inherit',\n },\n {\n name: 'my-smithy-api',\n framework: 'smithy',\n infra: 'rest-lambda',\n auth: 'iam',\n iac: 'inherit',\n },\n ];\n for (const api of tsApis) {\n await tsApiGenerator(tree, { ...api, ...projectDefaults });\n }\n\n // A Smithy shape library; `my-smithy-api` covers consuming one.\n await smithyProjectGenerator(tree, {\n name: 'my-shapes',\n type: 'shapes',\n ...projectDefaults,\n });\n\n // Python FastAPI — REST + HTTP, with Cognito and custom auth.\n const pyApis: PyApiGeneratorSchema[] = [\n { name: 'py-api', infra: 'rest-lambda', auth: 'iam', iac: 'inherit' },\n { name: 'py-api-http', infra: 'http-lambda', auth: 'iam', iac: 'inherit' },\n {\n name: 'py-api-custom',\n infra: 'rest-lambda',\n auth: 'custom',\n iac: 'inherit',\n },\n {\n name: 'py-api-custom-http',\n infra: 'http-lambda',\n auth: 'custom',\n iac: 'inherit',\n },\n ];\n for (const api of pyApis) {\n await pyApiGenerator(tree, { ...api, ...projectDefaults });\n }\n\n // Library projects hosting the components below, each with a lambda function.\n await pyProjectGenerator(tree, {\n name: 'py-project',\n type: 'application',\n ...projectDefaults,\n });\n await tsProjectGenerator(tree, { name: 'ts-project', ...projectDefaults });\n await pyLambdaFunctionGenerator(tree, {\n project: py('py-project'),\n name: 'my-function',\n event: 'Any',\n iac: 'inherit',\n ...defaults,\n });\n await tsLambdaFunctionGenerator(tree, {\n project: 'ts-project',\n name: 'my-function',\n event: 'Any',\n iac: 'inherit',\n ...defaults,\n });\n\n // MCP servers — uninfra'd and hosted on AgentCore.\n await pyMcpServerGenerator(tree, {\n project: 'py_project',\n name: 'my-mcp-server',\n infra: 'agentcore',\n iac: 'inherit',\n ...defaults,\n });\n await tsMcpServerGenerator(tree, {\n project: 'ts-project',\n name: 'my-mcp-server',\n infra: 'none',\n iac: 'inherit',\n ...defaults,\n });\n await tsMcpServerGenerator(tree, {\n project: 'ts-project',\n name: 'hosted-mcp-server',\n infra: 'agentcore',\n iac: 'inherit',\n ...defaults,\n });\n\n // OAuth DCR proxy for Cognito-authenticated MCP servers.\n await tsDcrProxyGenerator(tree, {\n name: 'my-dcr-proxy',\n iac: 'inherit',\n ...projectDefaults,\n });\n\n // TypeScript agents across every protocol and auth permutation. The unnamed\n // one takes the generator's default name, which the connections below use.\n const tsAgents: TsAgentGeneratorSchema[] = [\n {\n project: 'ts-project',\n name: 'my-ts-agent',\n infra: 'none',\n iac: 'inherit',\n },\n { project: 'ts-project', infra: 'agentcore', iac: 'inherit' },\n {\n project: 'ts-project',\n name: 'my-ts-a2a-agent',\n protocol: 'a2a',\n infra: 'agentcore',\n iac: 'inherit',\n },\n {\n project: 'ts-project',\n name: 'my-ts-a2a-agent-cognito',\n protocol: 'a2a',\n auth: 'cognito',\n infra: 'agentcore',\n iac: 'inherit',\n },\n {\n project: 'ts-project',\n name: 'my-ts-agui-agent',\n protocol: 'ag-ui',\n infra: 'agentcore',\n iac: 'inherit',\n },\n ];\n for (const agent of tsAgents) {\n await tsAgentGenerator(tree, { ...agent, ...defaults });\n }\n\n // Python agents: Strands across every protocol, plus LangChain in its own\n // project — langchain's dependency closure would push the zip-bundled Lambda\n // in py-project past its unzipped size limit.\n const pyAgents: PyAgentGeneratorSchema[] = [\n {\n project: 'py_project',\n name: 'my-agent',\n infra: 'agentcore',\n iac: 'inherit',\n },\n {\n project: 'py_project',\n name: 'my-py-a2a-agent',\n protocol: 'a2a',\n infra: 'agentcore',\n iac: 'inherit',\n },\n {\n project: 'py_project',\n name: 'my-py-a2a-agent-cognito',\n protocol: 'a2a',\n auth: 'cognito',\n infra: 'agentcore',\n iac: 'inherit',\n },\n {\n project: 'py_project',\n name: 'my-py-agui-agent',\n protocol: 'ag-ui',\n infra: 'agentcore',\n iac: 'inherit',\n },\n ];\n for (const agent of pyAgents) {\n await pyAgentGenerator(tree, { ...agent, ...defaults });\n }\n await pyProjectGenerator(tree, {\n name: 'py-langchain-project',\n type: 'application',\n ...projectDefaults,\n });\n const langchainAgents: PyAgentGeneratorSchema[] = [\n {\n project: 'py_langchain_project',\n name: 'my-py-langchain-agent',\n protocol: 'ag-ui',\n iac: 'inherit',\n },\n {\n project: 'py_langchain_project',\n name: 'my-py-langchain-http-agent',\n protocol: 'http',\n iac: 'inherit',\n },\n {\n project: 'py_langchain_project',\n name: 'my-py-langchain-a2a-agent',\n protocol: 'a2a',\n iac: 'inherit',\n },\n ];\n for (const agent of langchainAgents) {\n await pyAgentGenerator(tree, {\n ...agent,\n framework: 'langchain',\n infra: 'agentcore',\n ...defaults,\n });\n }\n\n // AgentCore gateways, including a parent fronting the first (chained), and\n // an http-protocol gateway fronting agent runtime targets.\n await agentcoreGatewayGenerator(tree, {\n name: 'my-gateway',\n iac: 'inherit',\n ...projectDefaults,\n });\n await agentcoreGatewayGenerator(tree, {\n name: 'parent-gateway',\n iac: 'inherit',\n ...projectDefaults,\n });\n await agentcoreGatewayGenerator(tree, {\n name: 'agent-gateway',\n protocol: 'http',\n iac: 'inherit',\n ...projectDefaults,\n });\n\n // AgentCore Harness — a standalone invocation project.\n await agentcoreHarnessGenerator(tree, {\n name: 'my-harness',\n infra: 'agentcore',\n iac: 'inherit',\n ...projectDefaults,\n });\n\n // Databases — DynamoDB, plus Aurora across both engines and ORMs.\n await tsDynamoDBGenerator(tree, {\n name: 'my-table',\n framework: 'electrodb',\n infra: 'dynamodb',\n iac: 'inherit',\n ...projectDefaults,\n });\n await pyDynamoDBGenerator(tree, {\n name: 'my-py-table',\n framework: 'pynamodb',\n infra: 'dynamodb',\n iac: 'inherit',\n ...projectDefaults,\n });\n const tsRdbs: TsRdbGeneratorSchema[] = [\n {\n name: 'postgres-db',\n infra: 'aurora',\n engine: 'postgres',\n framework: 'prisma',\n iac: 'inherit',\n },\n {\n name: 'my-sql-db',\n infra: 'aurora',\n engine: 'mysql',\n framework: 'prisma',\n iac: 'inherit',\n },\n ];\n for (const rdb of tsRdbs) {\n await tsRdbGenerator(tree, { ...rdb, ...projectDefaults });\n }\n const pyRdbs: PyRdbGeneratorSchema[] = [\n {\n name: 'py-postgres-db',\n infra: 'aurora',\n engine: 'postgres',\n framework: 'sqlmodel',\n iac: 'inherit',\n },\n {\n name: 'py-mysql-db',\n infra: 'aurora',\n engine: 'mysql',\n framework: 'sqlmodel',\n iac: 'inherit',\n },\n ];\n for (const rdb of pyRdbs) {\n await pyRdbGenerator(tree, { ...rdb, ...projectDefaults });\n }\n\n // Every connection edge the matrix covers.\n const connections: ConnectionGeneratorSchema[] = [\n // Website -> API\n { sourceProject: ts('website'), targetProject: ts('my-api') },\n { sourceProject: ts('website-no-router'), targetProject: ts('my-api') },\n { sourceProject: 'website', targetProject: 'py_api' },\n { sourceProject: 'website', targetProject: 'my-smithy-api' },\n // Agent -> MCP server\n {\n sourceProject: 'ts-project',\n sourceComponent: 'agent',\n targetProject: 'ts-project',\n targetComponent: 'hosted-mcp-server',\n },\n {\n sourceProject: 'ts-project',\n sourceComponent: 'my-ts-agui-agent',\n targetProject: 'ts-project',\n targetComponent: 'hosted-mcp-server',\n },\n {\n sourceProject: 'ts-project',\n sourceComponent: 'agent',\n targetProject: 'py_project',\n targetComponent: 'my-mcp-server',\n },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-agent',\n targetProject: 'py_project',\n targetComponent: 'my-mcp-server',\n },\n {\n sourceProject: 'py_langchain_project',\n sourceComponent: 'my-py-langchain-agent',\n targetProject: 'py_project',\n targetComponent: 'my-mcp-server',\n },\n // HTTP agent <-> A2A agent\n {\n sourceProject: 'ts-project',\n sourceComponent: 'agent',\n targetProject: 'ts-project',\n targetComponent: 'my-ts-a2a-agent',\n },\n {\n sourceProject: 'ts-project',\n sourceComponent: 'agent',\n targetProject: 'py_project',\n targetComponent: 'my-py-a2a-agent',\n },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-agent',\n targetProject: 'ts-project',\n targetComponent: 'my-ts-a2a-agent',\n },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-agent',\n targetProject: 'py_project',\n targetComponent: 'my-py-a2a-agent',\n },\n {\n sourceProject: 'py_langchain_project',\n sourceComponent: 'my-py-langchain-agent',\n targetProject: 'py_project',\n targetComponent: 'my-py-a2a-agent',\n },\n // Agent -> gateway, gateway -> MCP server, gateway -> gateway\n {\n sourceProject: 'ts-project',\n sourceComponent: 'agent',\n targetProject: ts('my-gateway'),\n },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-agent',\n targetProject: ts('my-gateway'),\n },\n {\n sourceProject: 'py_langchain_project',\n sourceComponent: 'my-py-langchain-agent',\n targetProject: ts('my-gateway'),\n },\n {\n sourceProject: ts('my-gateway'),\n targetProject: 'ts-project',\n targetComponent: 'hosted-mcp-server',\n },\n {\n sourceProject: ts('my-gateway'),\n targetProject: 'py_project',\n targetComponent: 'my-mcp-server',\n },\n { sourceProject: ts('parent-gateway'), targetProject: ts('my-gateway') },\n // Gateway -> agent (http gateway fronting agent runtime targets: every\n // supported protocol permutation), then website -> gateway.\n {\n sourceProject: ts('agent-gateway'),\n targetProject: 'ts-project',\n targetComponent: 'my-ts-agui-agent',\n },\n {\n sourceProject: ts('agent-gateway'),\n targetProject: 'ts-project',\n targetComponent: 'my-ts-a2a-agent',\n },\n {\n sourceProject: ts('agent-gateway'),\n targetProject: 'py_project',\n targetComponent: 'my-py-agui-agent',\n },\n {\n sourceProject: ts('agent-gateway'),\n targetProject: 'py_project',\n targetComponent: 'my-agent',\n },\n {\n sourceProject: ts('agent-gateway'),\n targetProject: 'py_project',\n targetComponent: 'my-py-a2a-agent',\n },\n {\n sourceProject: ts('website-no-router'),\n targetProject: ts('agent-gateway'),\n },\n // Website -> agent\n {\n sourceProject: ts('website'),\n targetProject: 'ts-project',\n targetComponent: 'agent',\n },\n {\n sourceProject: ts('website'),\n targetProject: 'ts-project',\n targetComponent: 'my-ts-agui-agent',\n },\n {\n sourceProject: ts('website'),\n targetProject: 'py_project',\n targetComponent: 'my-agent',\n },\n {\n sourceProject: ts('website'),\n targetProject: 'py_project',\n targetComponent: 'my-py-agui-agent',\n },\n {\n sourceProject: ts('website'),\n targetProject: 'py_langchain_project',\n targetComponent: 'my-py-langchain-agent',\n },\n {\n sourceProject: ts('website'),\n targetProject: 'py_langchain_project',\n targetComponent: 'my-py-langchain-http-agent',\n },\n // DynamoDB\n { sourceProject: 'my-api', targetProject: ts('my-table') },\n { sourceProject: 'my-smithy-api', targetProject: ts('my-table') },\n {\n sourceProject: 'ts-project',\n sourceComponent: 'my-ts-agent',\n targetProject: ts('my-table'),\n },\n {\n sourceProject: 'ts-project',\n sourceComponent: 'my-mcp-server',\n targetProject: ts('my-table'),\n },\n { sourceProject: 'py_api', targetProject: 'my_py_table' },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-agent',\n targetProject: 'my_py_table',\n },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-mcp-server',\n targetProject: 'my_py_table',\n },\n {\n sourceProject: 'py_langchain_project',\n sourceComponent: 'my-py-langchain-http-agent',\n targetProject: 'my_py_table',\n },\n // Relational databases\n { sourceProject: 'py_api', targetProject: 'py_postgres_db' },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-agent',\n targetProject: 'py_postgres_db',\n },\n {\n sourceProject: 'py_project',\n sourceComponent: 'my-mcp-server',\n targetProject: 'py_postgres_db',\n },\n ];\n for (const connection of connections) {\n await connectionGenerator(tree, { ...connection, ...defaults });\n }\n\n // Licensing, then an Nx plugin with a custom generator.\n await licenseGenerator(tree, {\n license: 'Apache-2.0',\n copyrightHolder: 'Amazon.com, Inc. or its affiliates',\n ...defaults,\n });\n await tsNxPluginGenerator(tree, {\n ...projectDefaults,\n name: 'plugin',\n directory: 'tools',\n });\n await tsNxGeneratorGenerator(tree, {\n project: ts('plugin'),\n name: 'my#generator',\n ...defaults,\n });\n\n // A migration of each kind, so the scaffolded codemods compile and the\n // plugin's migrations.json (created by the first run) registers all three.\n const migrations: Omit<TsNxMigrationGeneratorSchema, 'project'>[] = [\n {\n name: 'rename-foo-target',\n description: 'Rename the foo target to bar',\n },\n {\n name: 'migrate-custom-handlers',\n description: 'Update custom handlers for the new API',\n kind: 'agentic',\n },\n {\n name: 'upgrade-framework',\n description: 'Upgrade the framework and reconcile call sites',\n kind: 'hybrid',\n },\n ];\n for (const migration of migrations) {\n await tsNxMigrationGenerator(tree, {\n ...migration,\n project: ts('plugin'),\n ...defaults,\n });\n }\n\n return () =>\n installDependencies(tree, preferInstallDependencies, {\n languages: ['typescript', 'python'],\n });\n};\n\nexport default internalTestMatrixGenerator;\n"],"names":["agentcoreGatewayGenerator","agentcoreHarnessGenerator","connectionGenerator","licenseGenerator","pyAgentGenerator","pyApiGenerator","pyDynamoDBGenerator","pyLambdaFunctionGenerator","pyMcpServerGenerator","pyProjectGenerator","pyRdbGenerator","smithyProjectGenerator","terraformProjectGenerator","tsAgentGenerator","tsApiGenerator","tsAstroDocsGenerator","tsDcrProxyGenerator","tsDynamoDBGenerator","tsInfraGenerator","tsLambdaFunctionGenerator","tsMcpServerGenerator","tsNxGeneratorGenerator","tsNxMigrationGenerator","tsNxPluginGenerator","tsProjectGenerator","tsRdbGenerator","tsWebsiteAuthGenerator","tsWebsiteGenerator","installDependencies","toSnakeCase","getNpmScope","getNpmScopePrefix","internalTestMatrixGenerator","tree","options","preferInstallDependencies","defaults","projectDefaults","directory","ts","name","py","infra","type","stageConfig","iac","tanstackRouter","project","cognitoDomain","allowSignup","tsApis","auth","framework","api","pyApis","event","tsAgents","protocol","agent","pyAgents","langchainAgents","tsRdbs","engine","rdb","pyRdbs","connections","sourceProject","targetProject","sourceComponent","targetComponent","connection","license","copyrightHolder","migrations","description","kind","migration","languages"],"mappings":"AAAA;;;CAGC,GAED,SAASA,yBAAyB,QAAQ,iCAAiC;AAC3E,SAASC,yBAAyB,QAAQ,iCAAiC;AAC3E,SAEEC,mBAAmB,QACd,0BAA0B;AACjC,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAIEC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,EACnBC,yBAAyB,EACzBC,oBAAoB,EACpBC,kBAAkB,EAClBC,cAAc,QACT,kBAAkB;AACzB,SAASC,sBAAsB,QAAQ,sBAAsB;AAC7D,SAASC,yBAAyB,QAAQ,yBAAyB;AACnE,SAKEC,gBAAgB,EAChBC,cAAc,EACdC,oBAAoB,EACpBC,mBAAmB,EACnBC,mBAAmB,EACnBC,gBAAgB,EAChBC,yBAAyB,EACzBC,oBAAoB,EACpBC,sBAAsB,EACtBC,sBAAsB,EACtBC,mBAAmB,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AC3BsC,SAAS;QACTC,iBAAiB;QACjB,GAAGpC,QAAQ;IACb;IACA,MAAMb,oBAAoBU,MAAM;QAC9B,GAAGI,eAAe;QAClBG,MAAM;QACNF,WAAW;IACb;IACA,MAAMjB,uBAAuBY,MAAM;QACjCc,SAASR,GAAG;QACZC,MAAM;QACN,GAAGJ,QAAQ;IACb;IAEA,uEAAuE;IACvE,2EAA2E;IAC3E,MAAMqC,aAA8D;QAClE;YACEjC,MAAM;YACNkC,aAAa;QACf;QACA;YACElC,MAAM;YACNkC,aAAa;YACbC,MAAM;QACR;QACA;YACEnC,MAAM;YACNkC,aAAa;YACbC,MAAM;QACR;KACD;IACD,KAAK,MAAMC,aAAaH,WAAY;QAClC,MAAMnD,uBAAuBW,MAAM;YACjC,GAAG2C,SAAS;YACZ7B,SAASR,GAAG;YACZ,GAAGH,QAAQ;QACb;IACF;IAEA,OAAO,IACLR,oBAAoBK,MAAME,2BAA2B;YACnD0C,WAAW;gBAAC;gBAAc;aAAS;QACrC;AACJ,EAAE;AAEF,eAAe7C,4BAA4B"}
@@ -2,7 +2,7 @@
2
2
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- import type { DependencyCheckConfig } from './dependency-check/types';
5
+ import type { DependencyCheckConfig } from './dependency-check/types.js';
6
6
  import type { SPDXLicenseIdentifier } from './schema';
7
7
  export interface LicenseConfig {
8
8
  /**
@@ -43,7 +43,7 @@ export interface LicenseSourceConfig {
43
43
  */
44
44
  files?: LicenseFileConfig;
45
45
  }
46
- export type { AllowlistEntry, DependencyCheckConfig, DependencyCheckException, } from './dependency-check/types';
46
+ export type { AllowlistEntry, DependencyCheckConfig, DependencyCheckException, } from './dependency-check/types.js';
47
47
  /**
48
48
  * Configuration for the LICENSE file sync
49
49
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../packages/nx-plugin/src/license/config-types.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { DependencyCheckConfig } from './dependency-check/types';\nimport type { SPDXLicenseIdentifier } from './schema';\n\nexport interface LicenseConfig {\n /**\n * Configuration for licensing your own source code: license headers and\n * LICENSE files. Omit to disable source license header and file syncing.\n */\n source?: LicenseSourceConfig;\n /**\n * Configuration for checking your dependencies' licenses against an\n * allowlist. Omit to disable dependency license checking.\n */\n dependencies?: DependencyCheckConfig;\n}\n\n/**\n * Configuration for licensing your own source code (headers and LICENSE files).\n */\nexport interface LicenseSourceConfig {\n /**\n * The SPDX license identifier for your chosen license.\n * License files will be synchronised according to the chosen SPDX\n */\n spdx: SPDXLicenseIdentifier;\n /**\n * The copyright holder for the license\n */\n copyrightHolder: string;\n /**\n * The copyright year (if any)\n */\n copyrightYear?: number;\n /**\n * Configuration for source code license headers\n * Omit if you do not want any source code license headers to be synced\n */\n header?: LicenseHeaderConfig;\n /**\n * Configuration for LICENSE files\n */\n files?: LicenseFileConfig;\n}\n\nexport type {\n AllowlistEntry,\n DependencyCheckConfig,\n DependencyCheckException,\n} from './dependency-check/types';\n\n/**\n * Configuration for the LICENSE file sync\n */\nexport interface LicenseFileConfig {\n /**\n * Exclude LICENSE file sync checks for the given glob patterns\n */\n exclude?: string[];\n}\n\n/**\n * Specifies license content as a path to a file\n */\nexport interface LicenseFilePathContent {\n /**\n * Load the license text from the specified file (relative to the workspace root)\n */\n filePath: string;\n}\n\n/**\n * Specifies license content inline\n */\nexport interface LicenseLinesContent {\n /**\n * Inline license text\n */\n lines: string[];\n}\n\n/**\n * Configuration for source code license header sync\n */\nexport interface LicenseHeaderConfig {\n /**\n * Content of the license header\n */\n content: LicenseFilePathContent | LicenseLinesContent;\n /**\n * Specifies the license header format for given glob patterns\n */\n format: {\n [filePattern: string]: LicenseHeaderFormat;\n };\n /**\n * Exclude out of sync source code license header checks for the given glob patterns\n */\n exclude?: string[];\n /**\n * User-specified comment syntax for file types we don't have config for\n */\n commentSyntax?: {\n [ext: string]: CommentSyntax;\n };\n}\n\n/**\n * Format settings for source code license headers\n */\nexport interface LicenseHeaderFormat {\n /**\n * Text written to the line prior to the license lines\n * Use this to start a block comment if desired\n */\n blockStart?: string;\n /**\n * Text written to the start of each line of the license\n */\n lineStart?: string;\n /**\n * Text written to the end of each line of the license\n */\n lineEnd?: string;\n /**\n * Text written to the line after the license lines\n * Use this to end a block comment if desired\n */\n blockEnd?: string;\n}\n\n/**\n * Defines comment syntax for a particular language\n * Used to instruct the license sync generator to find the first comment in a file\n */\nexport interface CommentSyntax {\n /**\n * If the language supports line comments, specify the character(s) used to start a line comment\n */\n line?: string;\n /**\n * If the language supports block comments, specify the character(s) used to start and end the block comment\n */\n block?: {\n start: string;\n end: string;\n };\n}\n"],"names":[],"mappings":"AAAA;;;CAGC,GAoID;;;CAGC,GACD,WAYC"}
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/license/config-types.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { DependencyCheckConfig } from './dependency-check/types.js';\nimport type { SPDXLicenseIdentifier } from './schema';\n\nexport interface LicenseConfig {\n /**\n * Configuration for licensing your own source code: license headers and\n * LICENSE files. Omit to disable source license header and file syncing.\n */\n source?: LicenseSourceConfig;\n /**\n * Configuration for checking your dependencies' licenses against an\n * allowlist. Omit to disable dependency license checking.\n */\n dependencies?: DependencyCheckConfig;\n}\n\n/**\n * Configuration for licensing your own source code (headers and LICENSE files).\n */\nexport interface LicenseSourceConfig {\n /**\n * The SPDX license identifier for your chosen license.\n * License files will be synchronised according to the chosen SPDX\n */\n spdx: SPDXLicenseIdentifier;\n /**\n * The copyright holder for the license\n */\n copyrightHolder: string;\n /**\n * The copyright year (if any)\n */\n copyrightYear?: number;\n /**\n * Configuration for source code license headers\n * Omit if you do not want any source code license headers to be synced\n */\n header?: LicenseHeaderConfig;\n /**\n * Configuration for LICENSE files\n */\n files?: LicenseFileConfig;\n}\n\nexport type {\n AllowlistEntry,\n DependencyCheckConfig,\n DependencyCheckException,\n} from './dependency-check/types.js';\n\n/**\n * Configuration for the LICENSE file sync\n */\nexport interface LicenseFileConfig {\n /**\n * Exclude LICENSE file sync checks for the given glob patterns\n */\n exclude?: string[];\n}\n\n/**\n * Specifies license content as a path to a file\n */\nexport interface LicenseFilePathContent {\n /**\n * Load the license text from the specified file (relative to the workspace root)\n */\n filePath: string;\n}\n\n/**\n * Specifies license content inline\n */\nexport interface LicenseLinesContent {\n /**\n * Inline license text\n */\n lines: string[];\n}\n\n/**\n * Configuration for source code license header sync\n */\nexport interface LicenseHeaderConfig {\n /**\n * Content of the license header\n */\n content: LicenseFilePathContent | LicenseLinesContent;\n /**\n * Specifies the license header format for given glob patterns\n */\n format: {\n [filePattern: string]: LicenseHeaderFormat;\n };\n /**\n * Exclude out of sync source code license header checks for the given glob patterns\n */\n exclude?: string[];\n /**\n * User-specified comment syntax for file types we don't have config for\n */\n commentSyntax?: {\n [ext: string]: CommentSyntax;\n };\n}\n\n/**\n * Format settings for source code license headers\n */\nexport interface LicenseHeaderFormat {\n /**\n * Text written to the line prior to the license lines\n * Use this to start a block comment if desired\n */\n blockStart?: string;\n /**\n * Text written to the start of each line of the license\n */\n lineStart?: string;\n /**\n * Text written to the end of each line of the license\n */\n lineEnd?: string;\n /**\n * Text written to the line after the license lines\n * Use this to end a block comment if desired\n */\n blockEnd?: string;\n}\n\n/**\n * Defines comment syntax for a particular language\n * Used to instruct the license sync generator to find the first comment in a file\n */\nexport interface CommentSyntax {\n /**\n * If the language supports line comments, specify the character(s) used to start a line comment\n */\n line?: string;\n /**\n * If the language supports block comments, specify the character(s) used to start and end the block comment\n */\n block?: {\n start: string;\n end: string;\n };\n}\n"],"names":[],"mappings":"AAAA;;;CAGC,GAoID;;;CAGC,GACD,WAYC"}
@@ -3,8 +3,8 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { type Tree } from '@nx/devkit';
6
- import type { CommentSyntax, LicenseConfig, LicenseSourceConfig } from './config-types';
7
- import type { DependencyCheckException } from './dependency-check/types';
6
+ import type { CommentSyntax, LicenseConfig, LicenseSourceConfig } from './config-types.js';
7
+ import type { DependencyCheckException } from './dependency-check/types.js';
8
8
  import type { SPDXLicenseIdentifier } from './schema';
9
9
  /**
10
10
  * Defines the comment syntax for popular programming languages
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../packages/nx-plugin/src/license/config.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n getProjects,\n type ProjectConfiguration,\n readProjectConfiguration,\n type Tree,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport {\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n readAwsNxPluginConfig,\n updateAwsNxPluginConfig,\n} from '../utils/config/utils';\nimport { formatFilesInSubtree } from '../utils/format';\nimport { addDependencyToTargetIfNotPresent } from '../utils/nx';\nimport type {\n CommentSyntax,\n LicenseConfig,\n LicenseSourceConfig,\n} from './config-types';\nimport type { DependencyCheckException } from './dependency-check/types';\nimport type { SPDXLicenseIdentifier } from './schema';\n\n/**\n * Licenses containing a placeholder for the copyright year.\n */\nconst LICENSES_WITH_YEAR: Set<SPDXLicenseIdentifier> = new Set(['MIT']);\n\n/**\n * Defines the comment syntax for popular programming languages\n */\nexport const LANGUAGE_COMMENT_SYNTAX: { [ext: string]: CommentSyntax } = {\n // C++ style comments\n ...Object.fromEntries(\n [\n // Node\n 'js',\n 'ts',\n 'cjs',\n 'mjs',\n 'cts',\n 'mts',\n // React\n 'jsx',\n 'tsx',\n // Web\n 'sass',\n 'scss',\n 'php',\n // Java\n 'java',\n // TypeSpec\n 'tsp',\n // Golang\n 'go',\n // Rust\n 'rs',\n // C and C++\n 'c',\n 'cpp',\n 'cxx',\n 'cc',\n 'h',\n 'hpp',\n // C#\n 'cs',\n // Scala\n 'scala',\n 'sc',\n 'sbt',\n // Kotlin\n 'kt',\n // Swift\n 'swift',\n ].map((ext) => [ext, { line: '//', block: { start: '/*', end: '*/' } }]),\n ),\n // Bash style comments\n ...Object.fromEntries(\n [\n // Bash\n 'sh',\n // Perl\n 'pl',\n // YAML\n 'yaml',\n 'yml',\n // R\n 'r',\n ].map((ext) => [ext, { line: '#' }]),\n ),\n // Docker\n Dockerfile: { line: '#' },\n // Python\n py: { line: '#', block: { start: '\"\"\"', end: '\"\"\"' } },\n // Web\n html: { block: { start: '<!--', end: '-->' } },\n css: { block: { start: '/*', end: '*/' } },\n // Ruby\n rb: { line: '#', block: { start: '=begin', end: '=end' } },\n // F#\n ...Object.fromEntries(\n ['fs', 'fsx'].map((ext) => [\n ext,\n { line: '//', block: { start: '(*', end: '*)' } },\n ]),\n ),\n // Visual Basic\n vb: { line: \"' \" },\n // Lua\n lua: { line: '--', block: { start: '--[[', end: ']]' } },\n // PowerShell\n ps1: { line: '#', block: { start: '<#', end: '#>' } },\n psm1: { line: '#', block: { start: '<#', end: '#>' } },\n // Markdown\n md: { block: { start: '<!--', end: '-->' } },\n // Terraform\n tf: { line: '#', block: { start: '/*', end: '*/' } },\n // Smithy\n smithy: { line: '//' },\n};\n\n/**\n * Module specifier for the license helpers exported by this package, used by\n * imports written into the user's config file.\n */\nconst LICENSE_SDK_MODULE = '@aws/nx-plugin/sdk/license';\n\n/**\n * Build the object literal source for a dependency check exception.\n * `JSON.stringify` produces valid string literals for arbitrary text (quotes,\n * backslashes, newlines all escaped); prettier later normalises quote style.\n */\nconst exceptionLiteral = (exception: DependencyCheckException): string => {\n const parts = [`package: ${JSON.stringify(exception.package)}`];\n if (exception.version !== undefined) {\n parts.push(`version: ${JSON.stringify(exception.version)}`);\n }\n parts.push(`reason: ${JSON.stringify(exception.reason)}`);\n if (exception.spdx !== undefined) {\n parts.push(`spdx: ${JSON.stringify(exception.spdx)}`);\n }\n return `{ ${parts.join(', ')} }`;\n};\n\n/**\n * GritQL `or` block that appends `$ins` (the insert placeholder) to the named\n * array inside the matched `$scope`, without ever producing an array hole:\n * - empty `key: []` → `key: [$ins]` (a list-append `+=` does not match an\n * empty array, so the empty case is rewritten directly)\n * - otherwise → list-append `+=` of `, $ins`; the leading comma is the\n * element separator and `+=` places it correctly for single inline,\n * single-with-trailing-comma and multi-element arrays alike\n */\nconst appendToArray = (key: string, ins: string) =>\n `or {\n $scope <: contains \\`${key}: []\\` => \\`${key}: [${ins}]\\`,\n $scope <: contains \\`${key}: [$items]\\` where { $items += \\`, ${ins}\\` }\n }`;\n\n/**\n * Insert `property` (TypeScript source like `dependencies: { ... }`) as the\n * first property of the `license` object literal.\n *\n * Prepending is comma-safe for every shape — empty `{}`, single- or multi-line.\n * `+=` appending is not: it omits the separator when the last property's value\n * is an object/array literal (e.g. `source: { ... }`), corrupting the file. The\n * property text is routed through a placeholder so its content never enters the\n * GritQL pattern. Returns true if the file changed (a `license` object existed).\n */\nconst prependLicenseProperty = async (\n tree: Tree,\n property: string,\n): Promise<boolean> => {\n const { insertViaGritQL, GRIT_INSERT_PLACEHOLDER } = await import(\n '../utils/ast'\n );\n\n // Non-empty license object: insert before the first existing property.\n const intoNonEmpty = await insertViaGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n `\\`license: { $props }\\` where { $props => \\`${GRIT_INSERT_PLACEHOLDER}, $props\\` }`,\n property,\n );\n if (intoNonEmpty) return true;\n\n // Empty license object: `{ $props }` doesn't match `{}`, so fill it directly.\n return insertViaGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n `\\`license: {}\\` => \\`license: { ${GRIT_INSERT_PLACEHOLDER} }\\``,\n property,\n );\n};\n\n/**\n * Whether `license.dependencies` (the dependency-check block) is configured.\n * Scoped within `license` so a `dependencies`-shaped object elsewhere in the\n * file isn't mistaken for it.\n */\nconst hasDependenciesBlock = async (tree: Tree): Promise<boolean> => {\n if (!tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)) return false;\n const { matchGritQL } = await import('../utils/ast');\n return matchGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n '`license: { $l }` where { $l <: contains `dependencies: $_` }',\n );\n};\n\n/**\n * Workspace-root npm-ecosystem lockfiles. Each is added to the license-check\n * cache inputs only when present, so the cache invalidates on dependency\n * changes without listing lockfiles for package managers the workspace doesn't\n * use.\n */\nconst NPM_LOCKFILES = [\n 'pnpm-lock.yaml',\n 'yarn.lock',\n 'package-lock.json',\n 'bun.lockb',\n];\n\n/**\n * Recompute the `inputs` of the root `license-check` target from what's\n * currently in the workspace: the present npm lockfiles, the config file, and\n * a recursive uv.lock glob when the dependency check uses a Python collector.\n *\n * The uv lockfile is keyed off the collector (not file presence) because it is\n * created by `uv` *after* the generator runs, and may live in a subdirectory of\n * a uv workspace. Callers run this whenever they change the relevant state, so\n * the inputs stay correct regardless of generator order. No-op if the\n * license-check target doesn't exist yet.\n */\nexport const updateLicenseCheckTargetInputs = async (\n tree: Tree,\n): Promise<void> => {\n const rootProjectJsonPath = 'project.json';\n if (!tree.exists(rootProjectJsonPath)) return;\n\n const rootProject = JSON.parse(tree.read(rootProjectJsonPath, 'utf-8')!);\n const target = rootProject.targets?.['license-check'];\n if (!target) return;\n\n const inputs = NPM_LOCKFILES.filter((f) => tree.exists(f)).map(\n (f) => `{workspaceRoot}/${f}`,\n );\n\n if (await hasPythonCollector(tree)) {\n inputs.push('{workspaceRoot}/**/uv.lock');\n }\n\n inputs.push('{workspaceRoot}/aws-nx-plugin.config.mts');\n\n target.inputs = inputs;\n tree.write(rootProjectJsonPath, JSON.stringify(rootProject, null, 2));\n};\n\n/**\n * Whether the dependency check config has a `pythonCollector` configured.\n */\nconst hasPythonCollector = async (tree: Tree): Promise<boolean> => {\n if (!tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)) return false;\n const { matchGritQL } = await import('../utils/ast');\n return matchGritQL(tree, AWS_NX_PLUGIN_CONFIG_FILE_NAME, '`pythonCollector`');\n};\n\n/**\n * The name of the project that owns the root `license-check` target, or\n * undefined if no project defines it.\n */\nconst findLicenseCheckProjectName = (tree: Tree): string | undefined => {\n for (const [name, config] of getProjects(tree)) {\n if (config.targets?.['license-check']) return name;\n }\n return undefined;\n};\n\n/**\n * Make a project's `lint` target depend on the root `license-check` target, so\n * license checking runs as part of lint/build. No-op when the project has no\n * `lint` target or there's no license-check target to depend on. Idempotent.\n *\n * Callers format afterwards (generators call `formatFilesInSubtree` at the end),\n * so the rewritten project.json matches prettier.\n */\nexport const addLicenseCheckToLintTarget = (\n tree: Tree,\n projectName: string,\n): void => {\n const licenseCheckProject = findLicenseCheckProjectName(tree);\n if (!licenseCheckProject) return;\n\n let project: ProjectConfiguration;\n try {\n project = readProjectConfiguration(tree, projectName);\n } catch {\n return;\n }\n\n // Only wire projects that actually lint, and never the license-check project\n // itself (a target can't depend on its own project's target).\n if (!project.targets?.lint || projectName === licenseCheckProject) return;\n\n addDependencyToTargetIfNotPresent(project, 'lint', {\n projects: [licenseCheckProject],\n target: 'license-check',\n });\n updateProjectConfiguration(tree, projectName, project);\n};\n\n/**\n * Wire every project's `lint` target to the root `license-check` target.\n * Called by the license generator so existing projects pick up the dependency\n * regardless of the order generators ran in.\n */\nexport const addLicenseCheckToAllLintTargets = (tree: Tree): void => {\n for (const [name] of getProjects(tree)) {\n addLicenseCheckToLintTarget(tree, name);\n }\n};\n\nexport interface EnsureDependencyCheckBlockOptions {\n includeCollectors?: 'npm' | 'npm+python';\n}\n\n/**\n * Ensure the `dependencies` block (dependency license checking) exists within\n * the `license` config. If one already exists it is left untouched, so user\n * customizations survive.\n */\nexport const ensureDependencyCheckBlock = async (\n tree: Tree,\n options?: EnsureDependencyCheckBlockOptions,\n): Promise<void> => {\n if (!tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)) return;\n\n const { addDestructuredImport } = await import('../utils/ast');\n\n if (await hasDependenciesBlock(tree)) {\n return;\n }\n\n const withPython = options?.includeCollectors === 'npm+python';\n const collectors = withPython\n ? 'collectors: [npmCollector(), pythonCollector()]'\n : 'collectors: [npmCollector()]';\n\n const block = `dependencies: { allow: DEFAULT_LICENSE_ALLOWLIST, ${collectors}, exceptions: [] }`;\n\n // Prepend the block as the first property of the license object. Prepending\n // (rather than `+=` appending) is comma-safe for every shape: GritQL's `+=`\n // omits the separator when the last existing property's value is an object\n // literal (e.g. `source: { ... }`), which would corrupt the file.\n const added = await prependLicenseProperty(tree, block);\n\n // Only add the imports if the block was actually written (i.e. a license\n // object literal existed to attach it to).\n if (added) {\n await addDestructuredImport(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n withPython\n ? ['DEFAULT_LICENSE_ALLOWLIST', 'npmCollector', 'pythonCollector']\n : ['DEFAULT_LICENSE_ALLOWLIST', 'npmCollector'],\n LICENSE_SDK_MODULE,\n );\n await formatFilesInSubtree(tree, AWS_NX_PLUGIN_CONFIG_FILE_NAME);\n }\n};\n\n/**\n * Ensure license exceptions are present in `license.dependencies.exceptions`.\n * An exception whose package is already listed is skipped (so existing reasons\n * are never overwritten). Other exceptions, collectors and the allowlist are\n * left untouched.\n *\n * The `dependencies: { $scope }` scope keeps edits within the dependency-check\n * block, so an `exceptions` array elsewhere in the file isn't matched.\n */\nexport const ensureLicenseExceptions = async (\n tree: Tree,\n exceptions: DependencyCheckException[],\n): Promise<void> => {\n if (!tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)) return;\n\n const { insertViaGritQL, GRIT_INSERT_PLACEHOLDER } = await import(\n '../utils/ast'\n );\n\n if (!(await hasDependenciesBlock(tree))) {\n return;\n }\n\n let modified = false;\n for (const exception of exceptions) {\n const pkg = JSON.stringify(exception.package);\n const inserted = await insertViaGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n `\\`dependencies: { $scope }\\` where {\n $scope <: not contains \\`package: ${pkg}\\`,\n ${appendToArray('exceptions', GRIT_INSERT_PLACEHOLDER)}\n }`,\n exceptionLiteral(exception),\n );\n modified ||= inserted;\n }\n\n if (modified) {\n await formatFilesInSubtree(tree, AWS_NX_PLUGIN_CONFIG_FILE_NAME);\n }\n};\n\n/**\n * Remove the exceptions for the named packages from\n * `license.dependencies.exceptions`, whatever reason or spdx each carries.\n * Packages that aren't listed are left alone, as are all other exceptions.\n *\n * Scoped to `dependencies: { $scope }` like {@link ensureLicenseExceptions}, so\n * an `exceptions` array elsewhere in the file isn't matched.\n */\nexport const removeLicenseExceptions = async (\n tree: Tree,\n packages: string[],\n): Promise<void> => {\n if (!tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)) return;\n\n const { applyGritQL } = await import('../utils/ast');\n\n let modified = false;\n for (const pkg of packages) {\n const removed = await applyGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n `\\`dependencies: { $scope }\\` where {\n $scope <: contains bubble or {\n \\`[$items]\\` where {\n $items <: some bubble \\`{ $props }\\` as $entry where {\n $props <: contains \\`package: ${JSON.stringify(pkg)}\\`,\n $entry => .\n }\n }\n }\n }`,\n );\n modified ||= removed;\n }\n\n if (modified) {\n await formatFilesInSubtree(tree, AWS_NX_PLUGIN_CONFIG_FILE_NAME);\n }\n};\n\n/**\n * Add `pythonCollector()` to `license.dependencies.collectors`, unless one is\n * already configured.\n */\nexport const ensurePythonLicenseCollector = async (\n tree: Tree,\n): Promise<void> => {\n if (!tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)) return;\n\n const { addDestructuredImport, insertViaGritQL, GRIT_INSERT_PLACEHOLDER } =\n await import('../utils/ast');\n\n if (!(await hasDependenciesBlock(tree))) {\n return;\n }\n\n const added = await insertViaGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n `\\`dependencies: { $scope }\\` where {\n $scope <: not contains \\`pythonCollector\\`,\n ${appendToArray('collectors', GRIT_INSERT_PLACEHOLDER)}\n }`,\n 'pythonCollector()',\n );\n\n if (added) {\n await addDestructuredImport(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n ['pythonCollector'],\n LICENSE_SDK_MODULE,\n );\n await formatFilesInSubtree(tree, AWS_NX_PLUGIN_CONFIG_FILE_NAME);\n // Now that a Python collector is configured, ensure uv.lock is a cache\n // input. Runs here (not only in the license generator) so it's added\n // whenever the collector is — e.g. when py#project runs after license.\n await updateLicenseCheckTargetInputs(tree);\n }\n};\n\n/**\n * Build the default `license.source` config for a given license\n */\nexport const defaultLicenseConfig = (\n spdx: SPDXLicenseIdentifier,\n copyrightHolder: string,\n): LicenseSourceConfig => {\n switch (spdx) {\n case 'ASL': {\n // For ASL, we use a \"box\" style license header\n const rawContent = [\n `Copyright ${copyrightHolder}. All Rights Reserved.`,\n '',\n 'Licensed under the Amazon Software License (the \"License\"). You may not use this file except in compliance',\n 'with the License. A copy of the License is located at',\n '',\n ' https://aws.amazon.com/asl/',\n '',\n 'or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES',\n 'OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions',\n 'and limitations under the License.',\n ];\n const maxLen = Math.max(...rawContent.map((line) => line.length));\n const lines = rawContent.map(\n (line) => `${line}${' '.repeat(maxLen - line.length)}`,\n );\n return {\n spdx,\n copyrightHolder,\n header: {\n content: { lines },\n format: {\n '**/*.{js,ts,jsx,tsx,mjs,mts}': {\n blockStart: `/***${'*'.repeat(maxLen)}**`,\n lineStart: ' * ',\n lineEnd: ' *',\n blockEnd: ` ***${'*'.repeat(maxLen)}**/`,\n },\n '**/*.{py,sh,tf}': {\n blockStart: `###${'#'.repeat(maxLen)}##`,\n lineStart: '# ',\n lineEnd: ' #',\n blockEnd: `###${'#'.repeat(maxLen)}##`,\n },\n },\n exclude: ['**/*.gen.*'],\n },\n };\n }\n default: {\n return {\n spdx,\n copyrightHolder,\n ...(LICENSES_WITH_YEAR.has(spdx)\n ? {\n copyrightYear: new Date().getFullYear(),\n }\n : {}),\n header: {\n content: {\n lines: [\n `Copyright ${copyrightHolder}. All Rights Reserved.`,\n `SPDX-License-Identifier: ${spdx}`,\n ],\n },\n format: {\n '**/*.{js,ts,jsx,tsx,mjs,mts}': {\n blockStart: '/**',\n lineStart: ' * ',\n blockEnd: ' */',\n },\n '**/*.{py,sh,tf}': {\n blockStart: '#',\n lineStart: '# ',\n blockEnd: '#',\n },\n },\n exclude: ['**/*.gen.*'],\n },\n };\n }\n }\n};\n\n/**\n * Write the `license.source` config (headers + LICENSE files) to the aws nx\n * plugin config.\n *\n * The `source` block is (re)written, but any existing `license.dependencies`\n * block — a user-customized allowlist, collectors and exceptions — is\n * preserved, so re-running the license generator (e.g. to change the copyright\n * holder) never clobbers dependency-check customizations.\n */\nexport const writeLicenseConfig = async (\n tree: Tree,\n source: LicenseSourceConfig,\n) => {\n const { captureGritQL } = await import('../utils/ast');\n\n // Capture the existing `dependencies: { ... }` block before overwriting the\n // license value, so we can re-attach it afterwards. It's managed by the\n // ensure* helpers, never written from here.\n const preserved = tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)\n ? await captureGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n '`dependencies: $_`',\n )\n : undefined;\n\n await updateAwsNxPluginConfig(tree, { license: { source } });\n\n // Re-attach the preserved block. The captured text may contain backticks,\n // `${...}` or quotes — prependLicenseProperty routes it through a placeholder\n // so it never enters the GritQL pattern.\n if (preserved) {\n await prependLicenseProperty(tree, preserved);\n await formatFilesInSubtree(tree, AWS_NX_PLUGIN_CONFIG_FILE_NAME);\n }\n};\n\n/**\n * Read license configuration\n */\nexport const readLicenseConfig = async (\n tree: Tree,\n): Promise<LicenseConfig | undefined> => {\n return readAwsNxPluginConfig(tree)?.license;\n};\n"],"names":["getProjects","readProjectConfiguration","updateProjectConfiguration","AWS_NX_PLUGIN_CONFIG_FILE_NAME","readAwsNxPluginConfig","updateAwsNxPluginConfig","formatFilesInSubtree","addDependencyToTargetIfNotPresent","LICENSES_WITH_YEAR","Set","LANGUAGE_COMMENT_SYNTAX","Object","fromEntries","map","ext","line","block","start","end","Dockerfile","py","html","css","rb","vb","lua","ps1","psm1","md","tf","smithy","LICENSE_SDK_MODULE","exceptionLiteral","exception","parts","JSON","stringify","package","version","undefined","push","reason","spdx","join","appendToArray","key","ins","prependLicenseProperty","tree","property","insertViaGritQL","GRIT_INSERT_PLACEHOLDER","intoNonEmpty","hasDependenciesBlock","exists","matchGritQL","NPM_LOCKFILES","updateLicenseCheckTargetInputs","rootProjectJsonPath","rootProject","parse","read","target","targets","inputs","filter","f","hasPythonCollector","write","findLicenseCheckProjectName","name","config","addLicenseCheckToLintTarget","projectName","licenseCheckProject","project","lint","projects","addLicenseCheckToAllLintTargets","ensureDependencyCheckBlock","options","addDestructuredImport","withPython","includeCollectors","collectors","added","ensureLicenseExceptions","exceptions","modified","pkg","inserted","removeLicenseExceptions","packages","applyGritQL","removed","ensurePythonLicenseCollector","defaultLicenseConfig","copyrightHolder","rawContent","maxLen","Math","max","length","lines","repeat","header","content","format","blockStart","lineStart","lineEnd","blockEnd","exclude","has","copyrightYear","Date","getFullYear","writeLicenseConfig","source","captureGritQL","preserved","license","readLicenseConfig"],"mappings":"AAAA;;;CAGC,GACD,SACEA,WAAW,EAEXC,wBAAwB,EAExBC,0BAA0B,QACrB,aAAa;AACpB,SACEC,8BAA8B,EAC9BC,qBAAqB,EACrBC,uBAAuB,QAClB,2BAAwB;AAC/B,SAASC,oBAAoB,QAAQ,qBAAkB;AACvD,SAASC,iCAAiC,QAAQ,iBAAc;AAShE;;CAEC,GACD,MAAMC,qBAAiD,IAAIC,IAAI;IAAC;CAAM;AAEtE;;CAEC,GACD,OAAO,MAAMC,0BAA4D;IACvE,qBAAqB;IACrB,GAAGC,OAAOC,WAAW,CACnB;QACE,OAAO;QACP;QACA;QACA;QACA;QACA;QACA;QACA,QAAQ;QACR;QACA;QACA,MAAM;QACN;QACA;QACA;QACA,OAAO;QACP;QACA,WAAW;QACX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AAMwE;QACnC,MAAMlH,qBAAqB0C,MAAM7C;IACnC;AACF,EAAE;AAEF;;CAEC,GACD,OAAO,MAAMuH,oBAAoB,OAC/B1E;IAEA,OAAO5C,sBAAsB4C,OAAOyE;AACtC,EAAE"}
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/license/config.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n getProjects,\n type ProjectConfiguration,\n readProjectConfiguration,\n type Tree,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport {\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n readAwsNxPluginConfig,\n updateAwsNxPluginConfig,\n} from '../utils/config/utils.js';\nimport { formatFilesInSubtree } from '../utils/format.js';\nimport { addDependencyToTargetIfNotPresent } from '../utils/nx.js';\nimport type {\n CommentSyntax,\n LicenseConfig,\n LicenseSourceConfig,\n} from './config-types.js';\nimport type { DependencyCheckException } from './dependency-check/types.js';\nimport type { SPDXLicenseIdentifier } from './schema';\n\n/**\n * Licenses containing a placeholder for the copyright year.\n */\nconst LICENSES_WITH_YEAR: Set<SPDXLicenseIdentifier> = new Set(['MIT']);\n\n/**\n * Defines the comment syntax for popular programming languages\n */\nexport const LANGUAGE_COMMENT_SYNTAX: { [ext: string]: CommentSyntax } = {\n // C++ style comments\n ...Object.fromEntries(\n [\n // Node\n 'js',\n 'ts',\n 'cjs',\n 'mjs',\n 'cts',\n 'mts',\n // React\n 'jsx',\n 'tsx',\n // Web\n 'sass',\n 'scss',\n 'php',\n // Java\n 'java',\n // TypeSpec\n 'tsp',\n // Golang\n 'go',\n // Rust\n 'rs',\n // C and C++\n 'c',\n 'cpp',\n 'cxx',\n 'cc',\n 'h',\n 'hpp',\n // C#\n 'cs',\n // Scala\n 'scala',\n 'sc',\n 'sbt',\n // Kotlin\n 'kt',\n // Swift\n 'swift',\n ].map((ext) => [ext, { line: '//', block: { start: '/*', end: '*/' } }]),\n ),\n // Bash style comments\n ...Object.fromEntries(\n [\n // Bash\n 'sh',\n // Perl\n 'pl',\n // YAML\n 'yaml',\n 'yml',\n // R\n 'r',\n ].map((ext) => [ext, { line: '#' }]),\n ),\n // Docker\n Dockerfile: { line: '#' },\n // Python\n py: { line: '#', block: { start: '\"\"\"', end: '\"\"\"' } },\n // Web\n html: { block: { start: '<!--', end: '-->' } },\n css: { block: { start: '/*', end: '*/' } },\n // Ruby\n rb: { line: '#', block: { start: '=begin', end: '=end' } },\n // F#\n ...Object.fromEntries(\n ['fs', 'fsx'].map((ext) => [\n ext,\n { line: '//', block: { start: '(*', end: '*)' } },\n ]),\n ),\n // Visual Basic\n vb: { line: \"' \" },\n // Lua\n lua: { line: '--', block: { start: '--[[', end: ']]' } },\n // PowerShell\n ps1: { line: '#', block: { start: '<#', end: '#>' } },\n psm1: { line: '#', block: { start: '<#', end: '#>' } },\n // Markdown\n md: { block: { start: '<!--', end: '-->' } },\n // Terraform\n tf: { line: '#', block: { start: '/*', end: '*/' } },\n // Smithy\n smithy: { line: '//' },\n};\n\n/**\n * Module specifier for the license helpers exported by this package, used by\n * imports written into the user's config file.\n */\nconst LICENSE_SDK_MODULE = '@aws/nx-plugin/sdk/license';\n\n/**\n * Build the object literal source for a dependency check exception.\n * `JSON.stringify` produces valid string literals for arbitrary text (quotes,\n * backslashes, newlines all escaped); prettier later normalises quote style.\n */\nconst exceptionLiteral = (exception: DependencyCheckException): string => {\n const parts = [`package: ${JSON.stringify(exception.package)}`];\n if (exception.version !== undefined) {\n parts.push(`version: ${JSON.stringify(exception.version)}`);\n }\n parts.push(`reason: ${JSON.stringify(exception.reason)}`);\n if (exception.spdx !== undefined) {\n parts.push(`spdx: ${JSON.stringify(exception.spdx)}`);\n }\n return `{ ${parts.join(', ')} }`;\n};\n\n/**\n * GritQL `or` block that appends `$ins` (the insert placeholder) to the named\n * array inside the matched `$scope`, without ever producing an array hole:\n * - empty `key: []` → `key: [$ins]` (a list-append `+=` does not match an\n * empty array, so the empty case is rewritten directly)\n * - otherwise → list-append `+=` of `, $ins`; the leading comma is the\n * element separator and `+=` places it correctly for single inline,\n * single-with-trailing-comma and multi-element arrays alike\n */\nconst appendToArray = (key: string, ins: string) =>\n `or {\n $scope <: contains \\`${key}: []\\` => \\`${key}: [${ins}]\\`,\n $scope <: contains \\`${key}: [$items]\\` where { $items += \\`, ${ins}\\` }\n }`;\n\n/**\n * Insert `property` (TypeScript source like `dependencies: { ... }`) as the\n * first property of the `license` object literal.\n *\n * Prepending is comma-safe for every shape — empty `{}`, single- or multi-line.\n * `+=` appending is not: it omits the separator when the last property's value\n * is an object/array literal (e.g. `source: { ... }`), corrupting the file. The\n * property text is routed through a placeholder so its content never enters the\n * GritQL pattern. Returns true if the file changed (a `license` object existed).\n */\nconst prependLicenseProperty = async (\n tree: Tree,\n property: string,\n): Promise<boolean> => {\n const { insertViaGritQL, GRIT_INSERT_PLACEHOLDER } = await import(\n '../utils/ast.js'\n );\n\n // Non-empty license object: insert before the first existing property.\n const intoNonEmpty = await insertViaGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n `\\`license: { $props }\\` where { $props => \\`${GRIT_INSERT_PLACEHOLDER}, $props\\` }`,\n property,\n );\n if (intoNonEmpty) return true;\n\n // Empty license object: `{ $props }` doesn't match `{}`, so fill it directly.\n return insertViaGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n `\\`license: {}\\` => \\`license: { ${GRIT_INSERT_PLACEHOLDER} }\\``,\n property,\n );\n};\n\n/**\n * Whether `license.dependencies` (the dependency-check block) is configured.\n * Scoped within `license` so a `dependencies`-shaped object elsewhere in the\n * file isn't mistaken for it.\n */\nconst hasDependenciesBlock = async (tree: Tree): Promise<boolean> => {\n if (!tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)) return false;\n const { matchGritQL } = await import('../utils/ast.js');\n return matchGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n '`license: { $l }` where { $l <: contains `dependencies: $_` }',\n );\n};\n\n/**\n * Workspace-root npm-ecosystem lockfiles. Each is added to the license-check\n * cache inputs only when present, so the cache invalidates on dependency\n * changes without listing lockfiles for package managers the workspace doesn't\n * use.\n */\nconst NPM_LOCKFILES = [\n 'pnpm-lock.yaml',\n 'yarn.lock',\n 'package-lock.json',\n 'bun.lockb',\n];\n\n/**\n * Recompute the `inputs` of the root `license-check` target from what's\n * currently in the workspace: the present npm lockfiles, the config file, and\n * a recursive uv.lock glob when the dependency check uses a Python collector.\n *\n * The uv lockfile is keyed off the collector (not file presence) because it is\n * created by `uv` *after* the generator runs, and may live in a subdirectory of\n * a uv workspace. Callers run this whenever they change the relevant state, so\n * the inputs stay correct regardless of generator order. No-op if the\n * license-check target doesn't exist yet.\n */\nexport const updateLicenseCheckTargetInputs = async (\n tree: Tree,\n): Promise<void> => {\n const rootProjectJsonPath = 'project.json';\n if (!tree.exists(rootProjectJsonPath)) return;\n\n const rootProject = JSON.parse(tree.read(rootProjectJsonPath, 'utf-8')!);\n const target = rootProject.targets?.['license-check'];\n if (!target) return;\n\n const inputs = NPM_LOCKFILES.filter((f) => tree.exists(f)).map(\n (f) => `{workspaceRoot}/${f}`,\n );\n\n if (await hasPythonCollector(tree)) {\n inputs.push('{workspaceRoot}/**/uv.lock');\n }\n\n inputs.push('{workspaceRoot}/aws-nx-plugin.config.mts');\n\n target.inputs = inputs;\n tree.write(rootProjectJsonPath, JSON.stringify(rootProject, null, 2));\n};\n\n/**\n * Whether the dependency check config has a `pythonCollector` configured.\n */\nconst hasPythonCollector = async (tree: Tree): Promise<boolean> => {\n if (!tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)) return false;\n const { matchGritQL } = await import('../utils/ast.js');\n return matchGritQL(tree, AWS_NX_PLUGIN_CONFIG_FILE_NAME, '`pythonCollector`');\n};\n\n/**\n * The name of the project that owns the root `license-check` target, or\n * undefined if no project defines it.\n */\nconst findLicenseCheckProjectName = (tree: Tree): string | undefined => {\n for (const [name, config] of getProjects(tree)) {\n if (config.targets?.['license-check']) return name;\n }\n return undefined;\n};\n\n/**\n * Make a project's `lint` target depend on the root `license-check` target, so\n * license checking runs as part of lint/build. No-op when the project has no\n * `lint` target or there's no license-check target to depend on. Idempotent.\n *\n * Callers format afterwards (generators call `formatFilesInSubtree` at the end),\n * so the rewritten project.json matches prettier.\n */\nexport const addLicenseCheckToLintTarget = (\n tree: Tree,\n projectName: string,\n): void => {\n const licenseCheckProject = findLicenseCheckProjectName(tree);\n if (!licenseCheckProject) return;\n\n let project: ProjectConfiguration;\n try {\n project = readProjectConfiguration(tree, projectName);\n } catch {\n return;\n }\n\n // Only wire projects that actually lint, and never the license-check project\n // itself (a target can't depend on its own project's target).\n if (!project.targets?.lint || projectName === licenseCheckProject) return;\n\n addDependencyToTargetIfNotPresent(project, 'lint', {\n projects: [licenseCheckProject],\n target: 'license-check',\n });\n updateProjectConfiguration(tree, projectName, project);\n};\n\n/**\n * Wire every project's `lint` target to the root `license-check` target.\n * Called by the license generator so existing projects pick up the dependency\n * regardless of the order generators ran in.\n */\nexport const addLicenseCheckToAllLintTargets = (tree: Tree): void => {\n for (const [name] of getProjects(tree)) {\n addLicenseCheckToLintTarget(tree, name);\n }\n};\n\nexport interface EnsureDependencyCheckBlockOptions {\n includeCollectors?: 'npm' | 'npm+python';\n}\n\n/**\n * Ensure the `dependencies` block (dependency license checking) exists within\n * the `license` config. If one already exists it is left untouched, so user\n * customizations survive.\n */\nexport const ensureDependencyCheckBlock = async (\n tree: Tree,\n options?: EnsureDependencyCheckBlockOptions,\n): Promise<void> => {\n if (!tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)) return;\n\n const { addDestructuredImport } = await import('../utils/ast.js');\n\n if (await hasDependenciesBlock(tree)) {\n return;\n }\n\n const withPython = options?.includeCollectors === 'npm+python';\n const collectors = withPython\n ? 'collectors: [npmCollector(), pythonCollector()]'\n : 'collectors: [npmCollector()]';\n\n const block = `dependencies: { allow: DEFAULT_LICENSE_ALLOWLIST, ${collectors}, exceptions: [] }`;\n\n // Prepend the block as the first property of the license object. Prepending\n // (rather than `+=` appending) is comma-safe for every shape: GritQL's `+=`\n // omits the separator when the last existing property's value is an object\n // literal (e.g. `source: { ... }`), which would corrupt the file.\n const added = await prependLicenseProperty(tree, block);\n\n // Only add the imports if the block was actually written (i.e. a license\n // object literal existed to attach it to).\n if (added) {\n await addDestructuredImport(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n withPython\n ? ['DEFAULT_LICENSE_ALLOWLIST', 'npmCollector', 'pythonCollector']\n : ['DEFAULT_LICENSE_ALLOWLIST', 'npmCollector'],\n LICENSE_SDK_MODULE,\n );\n await formatFilesInSubtree(tree, AWS_NX_PLUGIN_CONFIG_FILE_NAME);\n }\n};\n\n/**\n * Ensure license exceptions are present in `license.dependencies.exceptions`.\n * An exception whose package is already listed is skipped (so existing reasons\n * are never overwritten). Other exceptions, collectors and the allowlist are\n * left untouched.\n *\n * The `dependencies: { $scope }` scope keeps edits within the dependency-check\n * block, so an `exceptions` array elsewhere in the file isn't matched.\n */\nexport const ensureLicenseExceptions = async (\n tree: Tree,\n exceptions: DependencyCheckException[],\n): Promise<void> => {\n if (!tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)) return;\n\n const { insertViaGritQL, GRIT_INSERT_PLACEHOLDER } = await import(\n '../utils/ast.js'\n );\n\n if (!(await hasDependenciesBlock(tree))) {\n return;\n }\n\n let modified = false;\n for (const exception of exceptions) {\n const pkg = JSON.stringify(exception.package);\n const inserted = await insertViaGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n `\\`dependencies: { $scope }\\` where {\n $scope <: not contains \\`package: ${pkg}\\`,\n ${appendToArray('exceptions', GRIT_INSERT_PLACEHOLDER)}\n }`,\n exceptionLiteral(exception),\n );\n modified ||= inserted;\n }\n\n if (modified) {\n await formatFilesInSubtree(tree, AWS_NX_PLUGIN_CONFIG_FILE_NAME);\n }\n};\n\n/**\n * Remove the exceptions for the named packages from\n * `license.dependencies.exceptions`, whatever reason or spdx each carries.\n * Packages that aren't listed are left alone, as are all other exceptions.\n *\n * Scoped to `dependencies: { $scope }` like {@link ensureLicenseExceptions}, so\n * an `exceptions` array elsewhere in the file isn't matched.\n */\nexport const removeLicenseExceptions = async (\n tree: Tree,\n packages: string[],\n): Promise<void> => {\n if (!tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)) return;\n\n const { applyGritQL } = await import('../utils/ast.js');\n\n let modified = false;\n for (const pkg of packages) {\n const removed = await applyGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n `\\`dependencies: { $scope }\\` where {\n $scope <: contains bubble or {\n \\`[$items]\\` where {\n $items <: some bubble \\`{ $props }\\` as $entry where {\n $props <: contains \\`package: ${JSON.stringify(pkg)}\\`,\n $entry => .\n }\n }\n }\n }`,\n );\n modified ||= removed;\n }\n\n if (modified) {\n await formatFilesInSubtree(tree, AWS_NX_PLUGIN_CONFIG_FILE_NAME);\n }\n};\n\n/**\n * Add `pythonCollector()` to `license.dependencies.collectors`, unless one is\n * already configured.\n */\nexport const ensurePythonLicenseCollector = async (\n tree: Tree,\n): Promise<void> => {\n if (!tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)) return;\n\n const { addDestructuredImport, insertViaGritQL, GRIT_INSERT_PLACEHOLDER } =\n await import('../utils/ast.js');\n\n if (!(await hasDependenciesBlock(tree))) {\n return;\n }\n\n const added = await insertViaGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n `\\`dependencies: { $scope }\\` where {\n $scope <: not contains \\`pythonCollector\\`,\n ${appendToArray('collectors', GRIT_INSERT_PLACEHOLDER)}\n }`,\n 'pythonCollector()',\n );\n\n if (added) {\n await addDestructuredImport(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n ['pythonCollector'],\n LICENSE_SDK_MODULE,\n );\n await formatFilesInSubtree(tree, AWS_NX_PLUGIN_CONFIG_FILE_NAME);\n // Now that a Python collector is configured, ensure uv.lock is a cache\n // input. Runs here (not only in the license generator) so it's added\n // whenever the collector is — e.g. when py#project runs after license.\n await updateLicenseCheckTargetInputs(tree);\n }\n};\n\n/**\n * Build the default `license.source` config for a given license\n */\nexport const defaultLicenseConfig = (\n spdx: SPDXLicenseIdentifier,\n copyrightHolder: string,\n): LicenseSourceConfig => {\n switch (spdx) {\n case 'ASL': {\n // For ASL, we use a \"box\" style license header\n const rawContent = [\n `Copyright ${copyrightHolder}. All Rights Reserved.`,\n '',\n 'Licensed under the Amazon Software License (the \"License\"). You may not use this file except in compliance',\n 'with the License. A copy of the License is located at',\n '',\n ' https://aws.amazon.com/asl/',\n '',\n 'or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES',\n 'OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions',\n 'and limitations under the License.',\n ];\n const maxLen = Math.max(...rawContent.map((line) => line.length));\n const lines = rawContent.map(\n (line) => `${line}${' '.repeat(maxLen - line.length)}`,\n );\n return {\n spdx,\n copyrightHolder,\n header: {\n content: { lines },\n format: {\n '**/*.{js,ts,jsx,tsx,mjs,mts}': {\n blockStart: `/***${'*'.repeat(maxLen)}**`,\n lineStart: ' * ',\n lineEnd: ' *',\n blockEnd: ` ***${'*'.repeat(maxLen)}**/`,\n },\n '**/*.{py,sh,tf}': {\n blockStart: `###${'#'.repeat(maxLen)}##`,\n lineStart: '# ',\n lineEnd: ' #',\n blockEnd: `###${'#'.repeat(maxLen)}##`,\n },\n },\n exclude: ['**/*.gen.*'],\n },\n };\n }\n default: {\n return {\n spdx,\n copyrightHolder,\n ...(LICENSES_WITH_YEAR.has(spdx)\n ? {\n copyrightYear: new Date().getFullYear(),\n }\n : {}),\n header: {\n content: {\n lines: [\n `Copyright ${copyrightHolder}. All Rights Reserved.`,\n `SPDX-License-Identifier: ${spdx}`,\n ],\n },\n format: {\n '**/*.{js,ts,jsx,tsx,mjs,mts}': {\n blockStart: '/**',\n lineStart: ' * ',\n blockEnd: ' */',\n },\n '**/*.{py,sh,tf}': {\n blockStart: '#',\n lineStart: '# ',\n blockEnd: '#',\n },\n },\n exclude: ['**/*.gen.*'],\n },\n };\n }\n }\n};\n\n/**\n * Write the `license.source` config (headers + LICENSE files) to the aws nx\n * plugin config.\n *\n * The `source` block is (re)written, but any existing `license.dependencies`\n * block — a user-customized allowlist, collectors and exceptions — is\n * preserved, so re-running the license generator (e.g. to change the copyright\n * holder) never clobbers dependency-check customizations.\n */\nexport const writeLicenseConfig = async (\n tree: Tree,\n source: LicenseSourceConfig,\n) => {\n const { captureGritQL } = await import('../utils/ast.js');\n\n // Capture the existing `dependencies: { ... }` block before overwriting the\n // license value, so we can re-attach it afterwards. It's managed by the\n // ensure* helpers, never written from here.\n const preserved = tree.exists(AWS_NX_PLUGIN_CONFIG_FILE_NAME)\n ? await captureGritQL(\n tree,\n AWS_NX_PLUGIN_CONFIG_FILE_NAME,\n '`dependencies: $_`',\n )\n : undefined;\n\n await updateAwsNxPluginConfig(tree, { license: { source } });\n\n // Re-attach the preserved block. The captured text may contain backticks,\n // `${...}` or quotes — prependLicenseProperty routes it through a placeholder\n // so it never enters the GritQL pattern.\n if (preserved) {\n await prependLicenseProperty(tree, preserved);\n await formatFilesInSubtree(tree, AWS_NX_PLUGIN_CONFIG_FILE_NAME);\n }\n};\n\n/**\n * Read license configuration\n */\nexport const readLicenseConfig = async (\n tree: Tree,\n): Promise<LicenseConfig | undefined> => {\n return readAwsNxPluginConfig(tree)?.license;\n};\n"],"names":["getProjects","readProjectConfiguration","updateProjectConfiguration","AWS_NX_PLUGIN_CONFIG_FILE_NAME","readAwsNxPluginConfig","updateAwsNxPluginConfig","formatFilesInSubtree","addDependencyToTargetIfNotPresent","LICENSES_WITH_YEAR","Set","LANGUAGE_COMMENT_SYNTAX","Object","fromEntries","map","ext","line","block","start","end","Dockerfile","py","html","css","rb","vb","lua","ps1","psm1","md","tf","smithy","LICENSE_SDK_MODULE","exceptionLiteral","exception","parts","JSON","stringify","package","version","undefined","push","reason","spdx","join","appendToArray","key","ins","prependLicenseProperty","tree","property","insertViaGritQL","GRIT_INSERT_PLACEHOLDER","intoNonEmpty","hasDependenciesBlock","exists","matchGritQL","NPM_LOCKFILES","updateLicenseCheckTargetInputs","rootProjectJsonPath","rootProject","parse","read","target","targets","inputs","filter","f","hasPythonCollector","write","findLicenseCheckProjectName","name","config","addLicenseCheckToLintTarget","projectName","licenseCheckProject","project","lint","projects","addLicenseCheckToAllLintTargets","ensureDependencyCheckBlock","options","addDestructuredImport","withPython","includeCollectors","collectors","added","ensureLicenseExceptions","exceptions","modified","pkg","inserted","removeLicenseExceptions","packages","applyGritQL","removed","ensurePythonLicenseCollector","defaultLicenseConfig","copyrightHolder","rawContent","maxLen","Math","max","length","lines","repeat","header","content","format","blockStart","lineStart","lineEnd","blockEnd","exclude","has","copyrightYear","Date","getFullYear","writeLicenseConfig","source","captureGritQL","preserved","license","readLicenseConfig"],"mappings":"AAAA;;;CAGC,GACD,SACEA,WAAW,EAEXC,wBAAwB,EAExBC,0BAA0B,QACrB,aAAa;AACpB,SACEC,8BAA8B,EAC9BC,qBAAqB,EACrBC,uBAAuB,QAClB,2BAA2B;AAClC,SAASC,oBAAoB,QAAQ,qBAAqB;AAC1D,SAASC,iCAAiC,QAAQ,iBAAiB;AASnE;;CAEC,GACD,MAAMC,qBAAiD,IAAIC,IAAI;IAAC;CAAM;AAEtE;;CAEC,GACD,OAAO,MAAMC,0BAA4D;IACvE,qBAAqB;IACrB,GAAGC,OAAOC,WAAW,CACnB;QACE,OAAO;QACP;QACA;QACA;QACA;QACA;QACA;QACA,QAAQ;QACR;QACA;QACA,MAAM;QACN;QACA;QACA;QACA,OAAO;QACP;QACA,WAAW;QACX;QACA,SAAS;QACT;QACA,OAAO;QACP;QACA,YAAY;QACZ;QACA;QACA;QACA;QACA;QACA;QACA,KAAK;QACL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