@aws/nx-plugin 1.0.0-rc.23 → 1.0.0-rc.24

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 (652) hide show
  1. package/LICENSE-THIRD-PARTY +2088 -971
  2. package/package.json +25 -10
  3. package/src/agentcore-gateway/attach-upstream.d.ts +7 -7
  4. package/src/agentcore-gateway/attach-upstream.js +19 -22
  5. package/src/agentcore-gateway/attach-upstream.js.map +1 -1
  6. package/src/agentcore-gateway/gateway-connection/generator.d.ts +3 -3
  7. package/src/agentcore-gateway/gateway-connection/generator.js +42 -45
  8. package/src/agentcore-gateway/gateway-connection/generator.js.map +1 -1
  9. package/src/agentcore-gateway/gateway-connection/schema.d.js +6 -0
  10. package/src/agentcore-gateway/gateway-connection/schema.d.js.map +1 -0
  11. package/src/agentcore-gateway/generator.js +89 -72
  12. package/src/agentcore-gateway/generator.js.map +1 -1
  13. package/src/agentcore-gateway/mcp-connection/generator.d.ts +2 -2
  14. package/src/agentcore-gateway/mcp-connection/generator.js +24 -30
  15. package/src/agentcore-gateway/mcp-connection/generator.js.map +1 -1
  16. package/src/agentcore-gateway/mcp-connection/schema.d.js +6 -0
  17. package/src/agentcore-gateway/mcp-connection/schema.d.js.map +1 -0
  18. package/src/agentcore-gateway/schema.d.js +6 -0
  19. package/src/agentcore-gateway/schema.d.js.map +1 -0
  20. package/src/bin/aws-nx-mcp.js +14 -0
  21. package/src/bin/aws-nx-mcp.js.map +1 -0
  22. package/src/connection/{agent-serve-local.d.ts → agent-local-dev.d.ts} +5 -5
  23. package/src/connection/agent-local-dev.js +42 -0
  24. package/src/connection/agent-local-dev.js.map +1 -0
  25. package/src/connection/agent-runtime-config.js +9 -14
  26. package/src/connection/agent-runtime-config.js.map +1 -1
  27. package/src/connection/generator.js +262 -207
  28. package/src/connection/generator.js.map +1 -1
  29. package/src/connection/{serve-local.d.ts → local-dev.d.ts} +3 -3
  30. package/src/connection/local-dev.js +37 -0
  31. package/src/connection/local-dev.js.map +1 -0
  32. package/src/connection/schema.d.js +6 -0
  33. package/src/connection/schema.d.js.map +1 -0
  34. package/src/index.js +2 -5
  35. package/src/index.js.map +1 -1
  36. package/src/infra/app/__snapshots__/generator.spec.ts.snap +4 -26
  37. package/src/infra/app/generator.js +133 -123
  38. package/src/infra/app/generator.js.map +1 -1
  39. package/src/infra/app/schema.d.js +6 -0
  40. package/src/infra/app/schema.d.js.map +1 -0
  41. package/src/license/config-types.js +5 -3
  42. package/src/license/config-types.js.map +1 -1
  43. package/src/license/config.d.ts +1 -1
  44. package/src/license/config.js +267 -242
  45. package/src/license/config.js.map +1 -1
  46. package/src/license/dependency-check/check.js +51 -46
  47. package/src/license/dependency-check/check.js.map +1 -1
  48. package/src/license/dependency-check/collectors/collector.js +41 -71
  49. package/src/license/dependency-check/collectors/collector.js.map +1 -1
  50. package/src/license/dependency-check/collectors/npm-collector.js +34 -41
  51. package/src/license/dependency-check/collectors/npm-collector.js.map +1 -1
  52. package/src/license/dependency-check/collectors/python-collector.js +55 -62
  53. package/src/license/dependency-check/collectors/python-collector.js.map +1 -1
  54. package/src/license/dependency-check/evaluator.js +40 -68
  55. package/src/license/dependency-check/evaluator.js.map +1 -1
  56. package/src/license/dependency-check/executor.js +30 -22
  57. package/src/license/dependency-check/executor.js.map +1 -1
  58. package/src/license/dependency-check/pre-approved.js +949 -336
  59. package/src/license/dependency-check/pre-approved.js.map +1 -1
  60. package/src/license/dependency-check/types.js +2 -3
  61. package/src/license/dependency-check/types.js.map +1 -1
  62. package/src/license/generator.js +55 -60
  63. package/src/license/generator.js.map +1 -1
  64. package/src/license/index.js +3 -9
  65. package/src/license/index.js.map +1 -1
  66. package/src/license/known-exceptions.js +14 -13
  67. package/src/license/known-exceptions.js.map +1 -1
  68. package/src/license/schema.d.js +6 -0
  69. package/src/license/schema.d.js.map +1 -0
  70. package/src/license/sync/generator.js +94 -119
  71. package/src/license/sync/generator.js.map +1 -1
  72. package/src/license/sync/project-file-sync.js +28 -35
  73. package/src/license/sync/project-file-sync.js.map +1 -1
  74. package/src/mcp-server/generator-info.js +130 -160
  75. package/src/mcp-server/generator-info.js.map +1 -1
  76. package/src/mcp-server/guide-pipeline.js +184 -206
  77. package/src/mcp-server/guide-pipeline.js.map +1 -1
  78. package/src/mcp-server/guide-render.js +10 -25
  79. package/src/mcp-server/guide-render.js.map +1 -1
  80. package/src/mcp-server/index.js +6 -10
  81. package/src/mcp-server/index.js.map +1 -1
  82. package/src/mcp-server/mdx-ast.js +39 -57
  83. package/src/mcp-server/mdx-ast.js.map +1 -1
  84. package/src/mcp-server/option-filter.js +33 -47
  85. package/src/mcp-server/option-filter.js.map +1 -1
  86. package/src/mcp-server/schema-registry.js +27 -40
  87. package/src/mcp-server/schema-registry.js.map +1 -1
  88. package/src/mcp-server/schema.js +9 -7
  89. package/src/mcp-server/schema.js.map +1 -1
  90. package/src/mcp-server/server.js +20 -24
  91. package/src/mcp-server/server.js.map +1 -1
  92. package/src/mcp-server/tools/create-workspace-command.js +23 -24
  93. package/src/mcp-server/tools/create-workspace-command.js.map +1 -1
  94. package/src/mcp-server/tools/general-guidance.js +28 -25
  95. package/src/mcp-server/tools/general-guidance.js.map +1 -1
  96. package/src/mcp-server/tools/generator-guide.js +29 -37
  97. package/src/mcp-server/tools/generator-guide.js.map +1 -1
  98. package/src/mcp-server/tools/list-generators.js +19 -25
  99. package/src/mcp-server/tools/list-generators.js.map +1 -1
  100. package/src/open-api/ts-client/generator.js +16 -26
  101. package/src/open-api/ts-client/generator.js.map +1 -1
  102. package/src/open-api/ts-client/schema.d.js +6 -0
  103. package/src/open-api/ts-client/schema.d.js.map +1 -0
  104. package/src/open-api/ts-hooks/generator.js +13 -21
  105. package/src/open-api/ts-hooks/generator.js.map +1 -1
  106. package/src/open-api/ts-hooks/schema.d.js +6 -0
  107. package/src/open-api/ts-hooks/schema.d.js.map +1 -0
  108. package/src/open-api/ts-metadata/generator.js +12 -20
  109. package/src/open-api/ts-metadata/generator.js.map +1 -1
  110. package/src/open-api/ts-metadata/schema.d.js +6 -0
  111. package/src/open-api/ts-metadata/schema.d.js.map +1 -0
  112. package/src/open-api/utils/codegen-data/languages.js +42 -60
  113. package/src/open-api/utils/codegen-data/languages.js.map +1 -1
  114. package/src/open-api/utils/codegen-data/types.js +31 -30
  115. package/src/open-api/utils/codegen-data/types.js.map +1 -1
  116. package/src/open-api/utils/codegen-data.js +253 -269
  117. package/src/open-api/utils/codegen-data.js.map +1 -1
  118. package/src/open-api/utils/normalise.js +242 -241
  119. package/src/open-api/utils/normalise.js.map +1 -1
  120. package/src/open-api/utils/parse.js +8 -14
  121. package/src/open-api/utils/parse.js.map +1 -1
  122. package/src/open-api/utils/refs.js +12 -22
  123. package/src/open-api/utils/refs.js.map +1 -1
  124. package/src/open-api/utils/types.js +5 -2
  125. package/src/open-api/utils/types.js.map +1 -1
  126. package/src/preset/__snapshots__/generator.spec.ts.snap +31 -6
  127. package/src/preset/generator.d.ts +1 -1
  128. package/src/preset/generator.js +130 -112
  129. package/src/preset/generator.js.map +1 -1
  130. package/src/preset/schema.d.js +6 -0
  131. package/src/preset/schema.d.js.map +1 -0
  132. package/src/preset/schema.d.ts +0 -1
  133. package/src/preset/schema.json +0 -5
  134. package/src/py/agent/__snapshots__/generator.constructs.spec.ts.snap +304 -0
  135. package/src/py/agent/__snapshots__/{generator.spec.ts.snap → generator.frameworks.spec.ts.snap} +6 -843
  136. package/src/py/agent/__snapshots__/generator.protocols.spec.ts.snap +535 -0
  137. package/src/py/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +1 -2
  138. package/src/py/agent/a2a-connection/files/agent-connection/app/__targetAgentSnakeCase___client_strands.py.template +1 -1
  139. package/src/py/agent/a2a-connection/files/langchain/agent-connection/app/__targetAgentSnakeCase___client_langchain.py.template +1 -1
  140. package/src/py/agent/a2a-connection/generator.js +70 -74
  141. package/src/py/agent/a2a-connection/generator.js.map +1 -1
  142. package/src/py/agent/a2a-connection/schema.d.js +8 -0
  143. package/src/py/agent/a2a-connection/schema.d.js.map +1 -0
  144. package/src/py/agent/gateway-connection/__snapshots__/generator.spec.ts.snap +6 -8
  145. package/src/py/agent/gateway-connection/files/agent-connection/app/__gatewaySnakeCase___client_strands.py.template +3 -3
  146. package/src/py/agent/gateway-connection/files/langchain/agent-connection/app/__gatewaySnakeCase___client_langchain.py.template +3 -3
  147. package/src/py/agent/gateway-connection/generator.js +61 -57
  148. package/src/py/agent/gateway-connection/generator.js.map +1 -1
  149. package/src/py/agent/gateway-connection/schema.d.js +6 -0
  150. package/src/py/agent/gateway-connection/schema.d.js.map +1 -0
  151. package/src/py/agent/generator.js +227 -193
  152. package/src/py/agent/generator.js.map +1 -1
  153. package/src/py/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +5 -12
  154. package/src/py/agent/mcp-connection/files/agent-connection/app/__mcpServerSnakeCase___client_strands.py.template +1 -1
  155. package/src/py/agent/mcp-connection/files/langchain/agent-connection/app/__mcpServerSnakeCase___client_langchain.py.template +1 -1
  156. package/src/py/agent/mcp-connection/generator.js +53 -51
  157. package/src/py/agent/mcp-connection/generator.js.map +1 -1
  158. package/src/py/agent/mcp-connection/schema.d.js +8 -0
  159. package/src/py/agent/mcp-connection/schema.d.js.map +1 -0
  160. package/src/py/agent/react-connection/__snapshots__/generator.spec.ts.snap +3 -2
  161. package/src/py/agent/react-connection/generator.js +51 -58
  162. package/src/py/agent/react-connection/generator.js.map +1 -1
  163. package/src/py/agent/react-connection/{serve-local.d.ts → local-dev.d.ts} +4 -4
  164. package/src/py/agent/react-connection/local-dev.js +36 -0
  165. package/src/py/agent/react-connection/local-dev.js.map +1 -0
  166. package/src/py/agent/react-connection/schema.d.js +8 -0
  167. package/src/py/agent/react-connection/schema.d.js.map +1 -0
  168. package/src/py/agent/schema.d.js +6 -0
  169. package/src/py/agent/schema.d.js.map +1 -0
  170. package/src/py/api/generator.js +12 -12
  171. package/src/py/api/generator.js.map +1 -1
  172. package/src/py/api/schema.d.js +6 -0
  173. package/src/py/api/schema.d.js.map +1 -0
  174. package/src/py/dynamodb/__snapshots__/generator.spec.ts.snap +68 -28
  175. package/src/py/dynamodb/agent-connection/__snapshots__/generator.spec.ts.snap +5 -5
  176. package/src/py/dynamodb/agent-connection/generator.js +27 -29
  177. package/src/py/dynamodb/agent-connection/generator.js.map +1 -1
  178. package/src/py/dynamodb/agent-connection/schema.d.js +8 -0
  179. package/src/py/dynamodb/agent-connection/schema.d.js.map +1 -0
  180. package/src/py/dynamodb/fast-api-connection/__snapshots__/generator.spec.ts.snap +3 -3
  181. package/src/py/dynamodb/fast-api-connection/generator.js +26 -28
  182. package/src/py/dynamodb/fast-api-connection/generator.js.map +1 -1
  183. package/src/py/dynamodb/fast-api-connection/schema.d.js +8 -0
  184. package/src/py/dynamodb/fast-api-connection/schema.d.js.map +1 -0
  185. package/src/py/dynamodb/files/__name__/client.py.template +5 -5
  186. package/src/py/dynamodb/files/__name__/entities/base.py.template +2 -2
  187. package/src/py/dynamodb/files/config.json.template +1 -1
  188. package/src/py/dynamodb/generator.js +63 -62
  189. package/src/py/dynamodb/generator.js.map +1 -1
  190. package/src/py/dynamodb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +5 -5
  191. package/src/py/dynamodb/mcp-server-connection/generator.js +27 -29
  192. package/src/py/dynamodb/mcp-server-connection/generator.js.map +1 -1
  193. package/src/py/dynamodb/mcp-server-connection/schema.d.js +8 -0
  194. package/src/py/dynamodb/mcp-server-connection/schema.d.js.map +1 -0
  195. package/src/py/dynamodb/schema.d.js +6 -0
  196. package/src/py/dynamodb/schema.d.js.map +1 -0
  197. package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +45 -4632
  198. package/src/py/fast-api/__snapshots__/generator.terraform.spec.ts.snap +4833 -0
  199. package/src/py/fast-api/generator.js +79 -85
  200. package/src/py/fast-api/generator.js.map +1 -1
  201. package/src/py/fast-api/react/__snapshots__/generator.spec.ts.snap +3 -2
  202. package/src/py/fast-api/react/generator.js +22 -24
  203. package/src/py/fast-api/react/generator.js.map +1 -1
  204. package/src/py/fast-api/react/open-api.js +28 -29
  205. package/src/py/fast-api/react/open-api.js.map +1 -1
  206. package/src/py/fast-api/react/schema.d.js +6 -0
  207. package/src/py/fast-api/react/schema.d.js.map +1 -0
  208. package/src/py/fast-api/schema.d.js +6 -0
  209. package/src/py/fast-api/schema.d.js.map +1 -0
  210. package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +4 -4
  211. package/src/py/lambda-function/generator.js +57 -58
  212. package/src/py/lambda-function/generator.js.map +1 -1
  213. package/src/py/lambda-function/schema.d.js +6 -0
  214. package/src/py/lambda-function/schema.d.js.map +1 -0
  215. package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +4 -4
  216. package/src/py/mcp-server/generator.js +149 -131
  217. package/src/py/mcp-server/generator.js.map +1 -1
  218. package/src/py/mcp-server/schema.d.js +6 -0
  219. package/src/py/mcp-server/schema.d.js.map +1 -0
  220. package/src/py/project/generator.js +128 -89
  221. package/src/py/project/generator.js.map +1 -1
  222. package/src/py/project/schema.d.js +6 -0
  223. package/src/py/project/schema.d.js.map +1 -0
  224. package/src/sdk/agentcore-gateway.d.ts +6 -0
  225. package/src/sdk/agentcore-gateway.js +7 -0
  226. package/src/sdk/agentcore-gateway.js.map +1 -0
  227. package/src/sdk/connection.d.ts +6 -0
  228. package/src/sdk/connection.js +6 -0
  229. package/src/sdk/connection.js.map +1 -0
  230. package/{sdk → src/sdk}/license.d.ts +4 -4
  231. package/src/sdk/license.js +7 -0
  232. package/src/sdk/license.js.map +1 -0
  233. package/src/sdk/open-api.d.ts +10 -0
  234. package/src/sdk/open-api.js +8 -0
  235. package/src/sdk/open-api.js.map +1 -0
  236. package/src/sdk/py.d.ts +14 -0
  237. package/src/sdk/py.js +10 -0
  238. package/src/sdk/py.js.map +1 -0
  239. package/src/sdk/terraform.d.ts +6 -0
  240. package/src/sdk/terraform.js +7 -0
  241. package/src/sdk/terraform.js.map +1 -0
  242. package/src/sdk/ts.d.ts +33 -0
  243. package/src/sdk/ts.js +35 -0
  244. package/src/sdk/ts.js.map +1 -0
  245. package/{sdk → src/sdk}/utils/ast.d.ts +2 -2
  246. package/src/sdk/utils/ast.js +7 -0
  247. package/src/sdk/utils/ast.js.map +1 -0
  248. package/{sdk → src/sdk}/utils/format.d.ts +1 -1
  249. package/src/sdk/utils/format.js +6 -0
  250. package/src/sdk/utils/format.js.map +1 -0
  251. package/{sdk → src/sdk}/utils/test.d.ts +1 -1
  252. package/src/sdk/utils/test.js +6 -0
  253. package/src/sdk/utils/test.js.map +1 -0
  254. package/src/smithy/project/__snapshots__/generator.spec.ts.snap +2 -8
  255. package/src/smithy/project/files/build.Dockerfile.template +1 -4
  256. package/src/smithy/project/generator.js +44 -42
  257. package/src/smithy/project/generator.js.map +1 -1
  258. package/src/smithy/project/schema.d.js +6 -0
  259. package/src/smithy/project/schema.d.js.map +1 -0
  260. package/src/smithy/react-connection/generator.js +35 -46
  261. package/src/smithy/react-connection/generator.js.map +1 -1
  262. package/src/smithy/react-connection/schema.d.js +6 -0
  263. package/src/smithy/react-connection/schema.d.js.map +1 -0
  264. package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +395 -72
  265. package/src/smithy/ts/api/generator.js +121 -111
  266. package/src/smithy/ts/api/generator.js.map +1 -1
  267. package/src/smithy/ts/api/schema.d.js +6 -0
  268. package/src/smithy/ts/api/schema.d.js.map +1 -0
  269. package/src/terraform/project/files/application/src/providers.tf.template +1 -1
  270. package/src/terraform/project/generator.js +141 -103
  271. package/src/terraform/project/generator.js.map +1 -1
  272. package/src/terraform/project/schema.d.js +9 -0
  273. package/src/terraform/project/schema.d.js.map +1 -0
  274. package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +336 -92
  275. package/src/trpc/backend/generator.js +93 -86
  276. package/src/trpc/backend/generator.js.map +1 -1
  277. package/src/trpc/backend/schema.d.js +6 -0
  278. package/src/trpc/backend/schema.d.js.map +1 -0
  279. package/src/trpc/react/__snapshots__/generator.spec.ts.snap +1 -1
  280. package/src/trpc/react/generator.js +59 -58
  281. package/src/trpc/react/generator.js.map +1 -1
  282. package/src/trpc/react/schema.d.js +6 -0
  283. package/src/trpc/react/schema.d.js.map +1 -0
  284. package/src/ts/agent/__snapshots__/generator.spec.ts.snap +10 -10
  285. package/src/ts/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +1 -1
  286. package/src/ts/agent/a2a-connection/files/agent-connection/app/__targetAgentKebabCase__-client-strands.ts.template +1 -1
  287. package/src/ts/agent/a2a-connection/generator.js +58 -54
  288. package/src/ts/agent/a2a-connection/generator.js.map +1 -1
  289. package/src/ts/agent/a2a-connection/schema.d.js +8 -0
  290. package/src/ts/agent/a2a-connection/schema.d.js.map +1 -0
  291. package/src/ts/agent/gateway-connection/__snapshots__/generator.spec.ts.snap +5 -5
  292. package/src/ts/agent/gateway-connection/files/agent-connection/app/__gatewayKebabCase__-client-strands.ts.template +3 -3
  293. package/src/ts/agent/gateway-connection/generator.js +57 -52
  294. package/src/ts/agent/gateway-connection/generator.js.map +1 -1
  295. package/src/ts/agent/gateway-connection/schema.d.js +6 -0
  296. package/src/ts/agent/gateway-connection/schema.d.js.map +1 -0
  297. package/src/ts/agent/generator.js +165 -136
  298. package/src/ts/agent/generator.js.map +1 -1
  299. package/src/ts/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +1 -1
  300. package/src/ts/agent/mcp-connection/files/agent-connection/app/__mcpServerKebabCase__-client-strands.ts.template +1 -1
  301. package/src/ts/agent/mcp-connection/generator.js +48 -46
  302. package/src/ts/agent/mcp-connection/generator.js.map +1 -1
  303. package/src/ts/agent/mcp-connection/schema.d.js +8 -0
  304. package/src/ts/agent/mcp-connection/schema.d.js.map +1 -0
  305. package/src/ts/agent/react-connection/generator.js +79 -79
  306. package/src/ts/agent/react-connection/generator.js.map +1 -1
  307. package/src/ts/agent/react-connection/{serve-local.d.ts → local-dev.d.ts} +2 -2
  308. package/src/ts/agent/react-connection/local-dev.js +17 -0
  309. package/src/ts/agent/react-connection/local-dev.js.map +1 -0
  310. package/src/ts/agent/react-connection/schema.d.js +8 -0
  311. package/src/ts/agent/react-connection/schema.d.js.map +1 -0
  312. package/src/ts/agent/schema.d.js +6 -0
  313. package/src/ts/agent/schema.d.js.map +1 -0
  314. package/src/ts/api/generator.js +16 -18
  315. package/src/ts/api/generator.js.map +1 -1
  316. package/src/ts/api/schema.d.js +6 -0
  317. package/src/ts/api/schema.d.js.map +1 -0
  318. package/src/ts/astro-docs/__snapshots__/generator.spec.ts.snap +8 -8
  319. package/src/ts/astro-docs/generator.js +59 -48
  320. package/src/ts/astro-docs/generator.js.map +1 -1
  321. package/src/ts/astro-docs/schema.d.js +6 -0
  322. package/src/ts/astro-docs/schema.d.js.map +1 -0
  323. package/src/ts/docs/generator.js +10 -10
  324. package/src/ts/docs/generator.js.map +1 -1
  325. package/src/ts/docs/schema.d.js +6 -0
  326. package/src/ts/docs/schema.d.js.map +1 -0
  327. package/src/ts/dynamodb/__snapshots__/generator.spec.ts.snap +68 -30
  328. package/src/ts/dynamodb/agent-connection/__snapshots__/generator.spec.ts.snap +5 -5
  329. package/src/ts/dynamodb/agent-connection/generator.js +21 -23
  330. package/src/ts/dynamodb/agent-connection/generator.js.map +1 -1
  331. package/src/ts/dynamodb/agent-connection/schema.d.js +8 -0
  332. package/src/ts/dynamodb/agent-connection/schema.d.js.map +1 -0
  333. package/src/ts/dynamodb/files/config.json.template +1 -1
  334. package/src/ts/dynamodb/files/src/client.ts.template +7 -7
  335. package/src/ts/dynamodb/generator.js +64 -63
  336. package/src/ts/dynamodb/generator.js.map +1 -1
  337. package/src/ts/dynamodb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +5 -5
  338. package/src/ts/dynamodb/mcp-server-connection/generator.js +21 -23
  339. package/src/ts/dynamodb/mcp-server-connection/generator.js.map +1 -1
  340. package/src/ts/dynamodb/mcp-server-connection/schema.d.js +8 -0
  341. package/src/ts/dynamodb/mcp-server-connection/schema.d.js.map +1 -0
  342. package/src/ts/dynamodb/schema.d.js +6 -0
  343. package/src/ts/dynamodb/schema.d.js.map +1 -0
  344. package/src/ts/dynamodb/smithy-connection/__snapshots__/generator.spec.ts.snap +3 -3
  345. package/src/ts/dynamodb/smithy-connection/generator.js +20 -22
  346. package/src/ts/dynamodb/smithy-connection/generator.js.map +1 -1
  347. package/src/ts/dynamodb/smithy-connection/schema.d.js +8 -0
  348. package/src/ts/dynamodb/smithy-connection/schema.d.js.map +1 -0
  349. package/src/ts/dynamodb/trpc-connection/__snapshots__/generator.spec.ts.snap +3 -3
  350. package/src/ts/dynamodb/trpc-connection/generator.js +20 -22
  351. package/src/ts/dynamodb/trpc-connection/generator.js.map +1 -1
  352. package/src/ts/dynamodb/trpc-connection/schema.d.js +8 -0
  353. package/src/ts/dynamodb/trpc-connection/schema.d.js.map +1 -0
  354. package/src/ts/lambda-function/__snapshots__/generator.spec.ts.snap +4 -4
  355. package/src/ts/lambda-function/generator.js +55 -55
  356. package/src/ts/lambda-function/generator.js.map +1 -1
  357. package/src/ts/lambda-function/io.js +83 -52
  358. package/src/ts/lambda-function/io.js.map +1 -1
  359. package/src/ts/lambda-function/schema.d.js +6 -0
  360. package/src/ts/lambda-function/schema.d.js.map +1 -0
  361. package/src/ts/lib/__snapshots__/generator.spec.ts.snap +23 -36
  362. package/src/ts/lib/biome.js +37 -37
  363. package/src/ts/lib/biome.js.map +1 -1
  364. package/src/ts/lib/generator.js +75 -77
  365. package/src/ts/lib/generator.js.map +1 -1
  366. package/src/ts/lib/schema.d.js +6 -0
  367. package/src/ts/lib/schema.d.js.map +1 -0
  368. package/src/ts/lib/ts-project-utils.js +65 -70
  369. package/src/ts/lib/ts-project-utils.js.map +1 -1
  370. package/src/ts/lib/types.js +5 -2
  371. package/src/ts/lib/types.js.map +1 -1
  372. package/src/ts/lib/vitest.js +29 -26
  373. package/src/ts/lib/vitest.js.map +1 -1
  374. package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +4 -4
  375. package/src/ts/mcp-server/generator.js +157 -138
  376. package/src/ts/mcp-server/generator.js.map +1 -1
  377. package/src/ts/mcp-server/schema.d.js +6 -0
  378. package/src/ts/mcp-server/schema.d.js.map +1 -0
  379. package/src/ts/nx-generator/__snapshots__/generator.spec.ts.snap +14 -9
  380. package/src/ts/nx-generator/files/local/generator.ts.template +3 -3
  381. package/src/ts/nx-generator/files/nx-plugin-for-aws/generator/generator.ts.template +4 -4
  382. package/src/ts/nx-generator/generator.js +84 -83
  383. package/src/ts/nx-generator/generator.js.map +1 -1
  384. package/src/ts/nx-generator/schema.d.js +6 -0
  385. package/src/ts/nx-generator/schema.d.js.map +1 -0
  386. package/src/ts/nx-plugin/__snapshots__/generator.spec.ts.snap +30 -18
  387. package/src/ts/nx-plugin/files/mcp-server/server.ts.template +5 -5
  388. package/src/ts/nx-plugin/files/mcp-server/tools/create-workspace-command.ts.template +2 -2
  389. package/src/ts/nx-plugin/files/mcp-server/tools/general-guidance.ts.template +1 -1
  390. package/src/ts/nx-plugin/files/mcp-server/tools/generator-guide.ts.template +2 -2
  391. package/src/ts/nx-plugin/files/mcp-server/tools/list-generators.ts.template +2 -2
  392. package/src/ts/nx-plugin/files/mcp-server/utils.ts.template +3 -3
  393. package/src/ts/nx-plugin/generator.js +49 -48
  394. package/src/ts/nx-plugin/generator.js.map +1 -1
  395. package/src/ts/nx-plugin/schema.d.js +9 -0
  396. package/src/ts/nx-plugin/schema.d.js.map +1 -0
  397. package/src/ts/nx-plugin/utils.js +32 -44
  398. package/src/ts/nx-plugin/utils.js.map +1 -1
  399. package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +30 -30
  400. package/src/ts/rdb/agent-connection/__snapshots__/generator.spec.ts.snap +6 -6
  401. package/src/ts/rdb/agent-connection/generator.js +38 -39
  402. package/src/ts/rdb/agent-connection/generator.js.map +1 -1
  403. package/src/ts/rdb/agent-connection/schema.d.js +8 -0
  404. package/src/ts/rdb/agent-connection/schema.d.js.map +1 -0
  405. package/src/ts/rdb/files/config.json.template +1 -1
  406. package/src/ts/rdb/files/prisma.config.ts.template +2 -2
  407. package/src/ts/rdb/files/src/prisma.ts.template +7 -7
  408. package/src/ts/rdb/files/src/utils.ts.template +1 -0
  409. package/src/ts/rdb/generator.js +130 -117
  410. package/src/ts/rdb/generator.js.map +1 -1
  411. package/src/ts/rdb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +6 -6
  412. package/src/ts/rdb/mcp-server-connection/generator.js +36 -37
  413. package/src/ts/rdb/mcp-server-connection/generator.js.map +1 -1
  414. package/src/ts/rdb/mcp-server-connection/schema.d.js +8 -0
  415. package/src/ts/rdb/mcp-server-connection/schema.d.js.map +1 -0
  416. package/src/ts/rdb/schema.d.js +6 -0
  417. package/src/ts/rdb/schema.d.js.map +1 -0
  418. package/src/ts/rdb/smithy-connection/__snapshots__/generator.spec.ts.snap +3 -3
  419. package/src/ts/rdb/smithy-connection/generator.js +46 -43
  420. package/src/ts/rdb/smithy-connection/generator.js.map +1 -1
  421. package/src/ts/rdb/smithy-connection/schema.d.js +8 -0
  422. package/src/ts/rdb/smithy-connection/schema.d.js.map +1 -0
  423. package/src/ts/rdb/trpc-connection/__snapshots__/generator.spec.ts.snap +3 -3
  424. package/src/ts/rdb/trpc-connection/generator.js +36 -31
  425. package/src/ts/rdb/trpc-connection/generator.js.map +1 -1
  426. package/src/ts/rdb/trpc-connection/schema.d.js +8 -0
  427. package/src/ts/rdb/trpc-connection/schema.d.js.map +1 -0
  428. package/src/ts/rdb/utils.js +9 -11
  429. package/src/ts/rdb/utils.js.map +1 -1
  430. package/src/ts/react-website/agui/generator.js +69 -61
  431. package/src/ts/react-website/agui/generator.js.map +1 -1
  432. package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +154 -260
  433. package/src/ts/react-website/app/generator.js +197 -188
  434. package/src/ts/react-website/app/generator.js.map +1 -1
  435. package/src/ts/react-website/app/schema.d.js +6 -0
  436. package/src/ts/react-website/app/schema.d.js.map +1 -0
  437. package/src/ts/react-website/app/schema.json +6 -6
  438. package/src/ts/react-website/cognito-auth/__snapshots__/generator.spec.ts.snap +118 -4
  439. package/src/ts/react-website/cognito-auth/__snapshots__/generator.terraform.spec.ts.snap +10 -3
  440. package/src/ts/react-website/cognito-auth/files/app/components/CognitoAuth/index.tsx.template +2 -2
  441. package/src/ts/react-website/cognito-auth/generator.js +60 -60
  442. package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
  443. package/src/ts/react-website/cognito-auth/schema.d.js +6 -0
  444. package/src/ts/react-website/cognito-auth/schema.d.js.map +1 -0
  445. package/src/ts/react-website/cognito-auth/utils.js +34 -32
  446. package/src/ts/react-website/cognito-auth/utils.js.map +1 -1
  447. package/src/ts/react-website/runtime-config/__snapshots__/generator.spec.ts.snap +2 -2
  448. package/src/ts/react-website/runtime-config/files/app/components/RuntimeConfig/index.tsx.template +2 -2
  449. package/src/ts/react-website/runtime-config/generator.js +29 -31
  450. package/src/ts/react-website/runtime-config/generator.js.map +1 -1
  451. package/src/ts/react-website/runtime-config/schema.d.js +6 -0
  452. package/src/ts/react-website/runtime-config/schema.d.js.map +1 -0
  453. package/src/ts/sync/generator.js +60 -59
  454. package/src/ts/sync/generator.js.map +1 -1
  455. package/src/ts/website/app/generator.js +10 -10
  456. package/src/ts/website/app/generator.js.map +1 -1
  457. package/src/ts/website/app/schema.d.js +6 -0
  458. package/src/ts/website/app/schema.d.js.map +1 -0
  459. package/src/ts/website/app/schema.json +6 -6
  460. package/src/ts/website/auth/generator.js +11 -11
  461. package/src/ts/website/auth/generator.js.map +1 -1
  462. package/src/ts/website/auth/schema.d.js +6 -0
  463. package/src/ts/website/auth/schema.d.js.map +1 -0
  464. package/src/utils/agent-chat/agent-chat.d.ts +1 -1
  465. package/src/utils/agent-chat/agent-chat.js +11 -12
  466. package/src/utils/agent-chat/agent-chat.js.map +1 -1
  467. package/src/utils/agent-chat/files/a2a/chat.ts.template +1 -1
  468. package/src/utils/agent-chat/files/ag-ui/chat.ts.template +1 -1
  469. package/src/utils/agent-chat/files/http-py/chat.ts.template +1 -1
  470. package/src/utils/agent-chat/files/http-ts/chat.ts.template +1 -1
  471. package/src/utils/agent-connection/agent-connection.js +129 -146
  472. package/src/utils/agent-connection/agent-connection.js.map +1 -1
  473. package/src/utils/agent-connection/files/core-gateway/agentcore-gateway-mcp-transport.ts.template +1 -1
  474. package/src/utils/agent-connection/files/core-strands/gateway/agentcore-gateway-mcp-client-strands.ts.template +1 -1
  475. package/src/utils/agent-connection/files/py-core-gateway/agentcore_gateway_mcp_transport.py.template +1 -1
  476. package/src/utils/agent-connection/files/py-core-langchain/gateway/agentcore_gateway_mcp_client_langchain.py.template +1 -1
  477. package/src/utils/agent-connection/files/py-core-strands/gateway/agentcore_gateway_mcp_client_strands.py.template +1 -1
  478. package/src/utils/agent-core-constructs/agent-core-constructs.js +53 -50
  479. package/src/utils/agent-core-constructs/agent-core-constructs.js.map +1 -1
  480. package/src/utils/agent-core-constructs/files/terraform/app/agentcore-gateway/__nameKebabCase__/__nameKebabCase__.tf.template +4 -4
  481. package/src/utils/agent-core-constructs/files/terraform/core/agent-core/runtime.tf.template +4 -4
  482. package/src/utils/agent-core-constructs/files/terraform/core/agentcore-gateway/gateway.tf.template +2 -2
  483. package/src/utils/api-constructs/api-constructs.js +30 -31
  484. package/src/utils/api-constructs/api-constructs.js.map +1 -1
  485. package/src/utils/api-constructs/files/cdk/core/api/http/http-api.ts.template +14 -6
  486. package/src/utils/api-constructs/files/cdk/core/api/rest/api-gateway-account/index.js.template +58 -0
  487. package/src/utils/api-constructs/files/cdk/core/api/rest/api-gateway-account.ts.template +82 -0
  488. package/src/utils/api-constructs/files/cdk/core/api/rest/rest-api.ts.template +28 -14
  489. package/src/utils/api-constructs/files/terraform/app/apis/http/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +1 -8
  490. package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +91 -4
  491. package/src/utils/api-constructs/files/terraform/core/api/http/http-api/http-api.tf.template +1 -1
  492. package/src/utils/api-constructs/files/terraform/core/api/rest/api-gateway-account/api-gateway-account.tf.template +83 -0
  493. package/src/utils/api-constructs/files/terraform/core/api/rest/rest-api/rest-api.tf.template +5 -11
  494. package/src/utils/api-constructs/open-api-metadata.js +22 -22
  495. package/src/utils/api-constructs/open-api-metadata.js.map +1 -1
  496. package/src/utils/ast/website.js +17 -19
  497. package/src/utils/ast/website.js.map +1 -1
  498. package/src/utils/ast.js +72 -97
  499. package/src/utils/ast.js.map +1 -1
  500. package/src/utils/bundle/bundle.js +50 -47
  501. package/src/utils/bundle/bundle.js.map +1 -1
  502. package/src/utils/commands.js +47 -26
  503. package/src/utils/commands.js.map +1 -1
  504. package/src/utils/config/index.d.ts +2 -2
  505. package/src/utils/config/index.js +5 -4
  506. package/src/utils/config/index.js.map +1 -1
  507. package/src/utils/config/utils.js +48 -58
  508. package/src/utils/config/utils.js.map +1 -1
  509. package/src/utils/connection/open-api/react.d.ts +5 -5
  510. package/src/utils/connection/open-api/react.js +81 -77
  511. package/src/utils/connection/open-api/react.js.map +1 -1
  512. package/src/utils/containers.js +22 -23
  513. package/src/utils/containers.js.map +1 -1
  514. package/src/utils/dynamodb-constructs/dynamodb-constructs.js +32 -33
  515. package/src/utils/dynamodb-constructs/dynamodb-constructs.js.map +1 -1
  516. package/src/utils/dynamodb-constructs/files/terraform/app/dynamodb/__nameKebabCase__/__nameKebabCase__.tf.template +12 -2
  517. package/src/utils/dynamodb-constructs/files/terraform/core/dynamodb/dynamodb.tf.template +1 -1
  518. package/src/utils/files/common/scripts/src/dynamodb/create-local-table.ts.template +2 -2
  519. package/src/utils/files/common/scripts/src/dynamodb/pull-image.ts.template +1 -1
  520. package/src/utils/files/common/scripts/src/dynamodb/start-container.ts.template +17 -2
  521. package/src/utils/files/common/scripts/src/rdb/mysql/wait-for-mysql-db.ts.template +32 -0
  522. package/src/utils/files/common/scripts/src/rdb/postgres/wait-for-postgres-db.ts.template +32 -0
  523. package/src/utils/files/common/scripts/src/rdb/{pull-image.ts.template → shared/pull-image.ts.template} +1 -1
  524. package/src/utils/files/common/scripts/src/rdb/{start-container.ts.template → shared/start-container.ts.template} +16 -1
  525. package/src/utils/files/terraform/src/core/asset-bucket/asset-bucket.tf.template +2 -2
  526. package/src/utils/files/terraform/src/core/runtime-config/appconfig/appconfig.tf.template +1 -1
  527. package/src/utils/files/terraform/src/core/runtime-config/appconfig-deployment/appconfig-deployment.tf.template +3 -3
  528. package/src/utils/files/terraform/src/core/runtime-config/entry/entry.tf.template +1 -1
  529. package/src/utils/files/terraform/src/core/runtime-config/read/read.tf.template +2 -2
  530. package/src/utils/files/website/hooks/sigv4/useSigV4.tsx.template +1 -1
  531. package/src/utils/format.js +153 -99
  532. package/src/utils/format.js.map +1 -1
  533. package/src/utils/fs.js +14 -13
  534. package/src/utils/fs.js.map +1 -1
  535. package/src/utils/function-constructs/files/terraform/app/lambda-functions/__nameKebabCase__/__nameKebabCase__.tf.template +2 -2
  536. package/src/utils/function-constructs/function-constructs.js +21 -26
  537. package/src/utils/function-constructs/function-constructs.js.map +1 -1
  538. package/src/utils/generators.js +18 -20
  539. package/src/utils/generators.js.map +1 -1
  540. package/src/utils/git.js +19 -34
  541. package/src/utils/git.js.map +1 -1
  542. package/src/utils/iac-providers.js +5 -5
  543. package/src/utils/iac-providers.js.map +1 -1
  544. package/src/utils/iac.js +12 -14
  545. package/src/utils/iac.js.map +1 -1
  546. package/src/utils/identity-constructs/files/cdk/core/user-identity.ts.template +112 -2
  547. package/src/utils/identity-constructs/files/terraform/core/user-identity/add-callback-url/add-callback-url.tf.template +2 -2
  548. package/src/utils/identity-constructs/files/terraform/core/user-identity/identity/identity.tf.template +104 -2
  549. package/src/utils/identity-constructs/files/terraform/core/user-identity/main.tf.template +7 -0
  550. package/src/utils/identity-constructs/identity-constructs.js +24 -28
  551. package/src/utils/identity-constructs/identity-constructs.js.map +1 -1
  552. package/src/utils/js.js +27 -20
  553. package/src/utils/js.js.map +1 -1
  554. package/src/utils/mcp.js +34 -41
  555. package/src/utils/mcp.js.map +1 -1
  556. package/src/utils/metrics.js +30 -45
  557. package/src/utils/metrics.js.map +1 -1
  558. package/src/utils/mock-project-graph.js +8 -12
  559. package/src/utils/mock-project-graph.js.map +1 -1
  560. package/src/utils/names.js +25 -51
  561. package/src/utils/names.js.map +1 -1
  562. package/src/utils/npm-scope.js +9 -17
  563. package/src/utils/npm-scope.js.map +1 -1
  564. package/src/utils/nx.d.ts +18 -2
  565. package/src/utils/nx.js +111 -74
  566. package/src/utils/nx.js.map +1 -1
  567. package/src/utils/nxlv-python.js +27 -15
  568. package/src/utils/nxlv-python.js.map +1 -1
  569. package/src/utils/object.js +5 -11
  570. package/src/utils/object.js.map +1 -1
  571. package/src/utils/paths.js +11 -15
  572. package/src/utils/paths.js.map +1 -1
  573. package/src/utils/pkg-manager.js +4 -9
  574. package/src/utils/pkg-manager.js.map +1 -1
  575. package/src/utils/pnpm-workspace.js +22 -22
  576. package/src/utils/pnpm-workspace.js.map +1 -1
  577. package/src/utils/port.js +26 -36
  578. package/src/utils/port.js.map +1 -1
  579. package/src/utils/py.js +43 -52
  580. package/src/utils/py.js.map +1 -1
  581. package/src/utils/rdb-constructs/files/terraform/app/dbs/__nameKebabCase__/__nameKebabCase__.tf.template +4 -4
  582. package/src/utils/rdb-constructs/files/terraform/core/rdb/aurora/aurora.tf.template +3 -3
  583. package/src/utils/rdb-constructs/rdb-constructs.js +31 -33
  584. package/src/utils/rdb-constructs/rdb-constructs.js.map +1 -1
  585. package/src/utils/shared-constructs-constants.js +16 -16
  586. package/src/utils/shared-constructs-constants.js.map +1 -1
  587. package/src/utils/shared-constructs.js +57 -54
  588. package/src/utils/shared-constructs.js.map +1 -1
  589. package/src/utils/shared-dynamodb-scripts.js +16 -14
  590. package/src/utils/shared-dynamodb-scripts.js.map +1 -1
  591. package/src/utils/shared-infra-config.js +30 -31
  592. package/src/utils/shared-infra-config.js.map +1 -1
  593. package/src/utils/shared-infra-scripts.js +30 -25
  594. package/src/utils/shared-infra-scripts.js.map +1 -1
  595. package/src/utils/shared-rdb-scripts.d.ts +8 -3
  596. package/src/utils/shared-rdb-scripts.js +21 -13
  597. package/src/utils/shared-rdb-scripts.js.map +1 -1
  598. package/src/utils/shared-scripts.js +12 -17
  599. package/src/utils/shared-scripts.js.map +1 -1
  600. package/src/utils/shared-shadcn.js +64 -60
  601. package/src/utils/shared-shadcn.js.map +1 -1
  602. package/src/utils/test.d.ts +8 -0
  603. package/src/utils/test.js +33 -25
  604. package/src/utils/test.js.map +1 -1
  605. package/src/utils/toml.js +7 -15
  606. package/src/utils/toml.js.map +1 -1
  607. package/src/utils/versions.d.ts +31 -4
  608. package/src/utils/versions.js +40 -23
  609. package/src/utils/versions.js.map +1 -1
  610. package/src/utils/website-constructs/files/terraform/app/static-websites/__websiteNameKebabCase__/__websiteNameKebabCase__.tf.template +1 -1
  611. package/src/utils/website-constructs/files/terraform/core/static-website/static-website.tf.template +4 -4
  612. package/src/utils/website-constructs/website-constructs.js +31 -30
  613. package/src/utils/website-constructs/website-constructs.js.map +1 -1
  614. package/bin/aws-nx-mcp.js +0 -17
  615. package/bin/aws-nx-mcp.js.map +0 -1
  616. package/sdk/agentcore-gateway.d.ts +0 -6
  617. package/sdk/agentcore-gateway.js +0 -11
  618. package/sdk/agentcore-gateway.js.map +0 -1
  619. package/sdk/connection.d.ts +0 -6
  620. package/sdk/connection.js +0 -10
  621. package/sdk/connection.js.map +0 -1
  622. package/sdk/license.js +0 -14
  623. package/sdk/license.js.map +0 -1
  624. package/sdk/open-api.d.ts +0 -10
  625. package/sdk/open-api.js +0 -15
  626. package/sdk/open-api.js.map +0 -1
  627. package/sdk/py.d.ts +0 -14
  628. package/sdk/py.js +0 -18
  629. package/sdk/py.js.map +0 -1
  630. package/sdk/terraform.d.ts +0 -6
  631. package/sdk/terraform.js +0 -11
  632. package/sdk/terraform.js.map +0 -1
  633. package/sdk/ts.d.ts +0 -33
  634. package/sdk/ts.js +0 -53
  635. package/sdk/ts.js.map +0 -1
  636. package/sdk/utils/ast.js +0 -12
  637. package/sdk/utils/ast.js.map +0 -1
  638. package/sdk/utils/format.js +0 -10
  639. package/sdk/utils/format.js.map +0 -1
  640. package/sdk/utils/test.js +0 -10
  641. package/sdk/utils/test.js.map +0 -1
  642. package/src/connection/agent-serve-local.js +0 -48
  643. package/src/connection/agent-serve-local.js.map +0 -1
  644. package/src/connection/serve-local.js +0 -41
  645. package/src/connection/serve-local.js.map +0 -1
  646. package/src/py/agent/react-connection/serve-local.js +0 -38
  647. package/src/py/agent/react-connection/serve-local.js.map +0 -1
  648. package/src/ts/agent/react-connection/serve-local.js +0 -19
  649. package/src/ts/agent/react-connection/serve-local.js.map +0 -1
  650. package/src/utils/files/common/scripts/src/rdb/wait-for-db.ts.template +0 -59
  651. /package/src/agentcore-gateway/files/project/{serve-local.ts.template → local-dev.ts.template} +0 -0
  652. /package/{bin → src/bin}/aws-nx-mcp.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/py/mcp-server/generator.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCASoB;AACpB,iDAA+D;AAC/D,qEAA0E;AAC1E,mGAA4F;AAC5F,sDAAkE;AAClE,uDAA2D;AAC3D,+CAA0D;AAC1D,uCAA4C;AAC5C,yCAA6C;AAC7C,iDAAsE;AACtE,6CAAwE;AACxE,qDAAoD;AACpD,uCAMwB;AACxB,yDAA6D;AAC7D,6CAA0D;AAC1D,2CAA8C;AAC9C,uCAAgE;AAChE,qEAA0E;AAC1E,mDAAoD;AAGvC,QAAA,4BAA4B,GACvC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAExB,MAAM,oBAAoB,GAAG,KAAK,EACvC,IAAU,EACV,OAAmC,EACP,EAAE;IAC9B,MAAM,OAAO,GAAG,IAAA,wCAAmC,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,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, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n addDependenciesToPackageJson,\n type GeneratorCallback,\n generateFiles,\n installPackagesTask,\n joinPathFragments,\n OverwriteStrategy,\n type Tree,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport { ensureLicenseExceptions } from '../../license/config';\nimport { MCP_INSPECTOR_EXCEPTIONS } from '../../license/known-exceptions';\nimport { addMcpServerInfra } from '../../utils/agent-core-constructs/agent-core-constructs';\nimport { addPythonBundleTarget } from '../../utils/bundle/bundle';\nimport { resolveContainers } from '../../utils/containers';\nimport { formatFilesInSubtree } from '../../utils/format';\nimport { FsCommands } from '../../utils/fs';\nimport { resolveIac } from '../../utils/iac';\nimport { addGeneratorMetricsIfApplicable } from '../../utils/metrics';\nimport { kebabCase, toClassName, toSnakeCase } from '../../utils/names';\nimport { getNpmScope } from '../../utils/npm-scope';\nimport {\n addComponentDevTarget,\n addComponentGeneratorMetadata,\n addDependencyToTargetIfNotPresent,\n getGeneratorInfo,\n type NxGeneratorInfo,\n readProjectConfigurationUnqualified,\n} from '../../utils/nx';\nimport { Logger, UVProvider } from '../../utils/nxlv-python';\nimport { toProjectRelativePath } from '../../utils/paths';\nimport { assignPort } from '../../utils/port';\nimport { addDependenciesToPyProjectToml } from '../../utils/py';\nimport { sharedConstructsGenerator } from '../../utils/shared-constructs';\nimport { withVersions } from '../../utils/versions';\nimport type { PyMcpServerGeneratorSchema } from './schema';\n\nexport const PY_MCP_SERVER_GENERATOR_INFO: NxGeneratorInfo = getGeneratorInfo(\n import.meta.filename,\n);\n\nexport const pyMcpServerGenerator = async (\n tree: Tree,\n options: PyMcpServerGeneratorSchema,\n): Promise<GeneratorCallback> => {\n const project = readProjectConfigurationUnqualified(tree, options.project);\n\n const pyProjectPath = joinPathFragments(project.root, 'pyproject.toml');\n\n // Check if the project has a pyproject.toml file\n if (!pyProjectPath) {\n throw new Error(\n `Unsupported project ${options.project}. Expected a Python project (with a pyproject.toml)`,\n );\n }\n\n if (!project.sourceRoot) {\n throw new Error(\n `This project does not have a source root. Please add a source root to the project configuration before running this generator.`,\n );\n }\n\n // Module name is the last part of the source root,\n const sourceParts = project.sourceRoot.split('/');\n const moduleName = sourceParts[sourceParts.length - 1];\n\n const name = kebabCase(\n options.name || `${kebabCase(project.name.split('.').pop())}-mcp-server`,\n );\n const mcpTargetPrefix = options.name ? name : 'mcp-server';\n\n const mcpServerNameSnakeCase = toSnakeCase(options.name || 'mcp-server');\n const mcpServerNameClassName = toClassName(name);\n\n const targetSourceDir = joinPathFragments(\n project.sourceRoot,\n mcpServerNameSnakeCase,\n );\n\n const infra = options.infra ?? 'agentcore';\n\n if (infra === 'none' && options.auth && options.auth !== 'iam') {\n console.warn(\n 'Warning: auth is ignored when no infrastructure is configured (no infrastructure is generated)',\n );\n }\n\n const auth = options.auth ?? 'iam';\n\n // Generate example server\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'app'),\n targetSourceDir,\n {\n name,\n mcpServerNameSnakeCase,\n mcpServerNameClassName,\n moduleName,\n },\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n\n addDependenciesToPyProjectToml(tree, project.root, [\n 'aws-lambda-powertools',\n 'mcp',\n 'uvicorn',\n 'boto3',\n 'aws-opentelemetry-distro',\n ]);\n\n if (infra === 'agentcore') {\n const containers = await resolveContainers(tree, 'inherit');\n const dockerImageTag = `${getNpmScope(tree)}-${name}:latest`;\n\n // Add bundle target\n const { bundleTargetName, bundleOutputDir } = addPythonBundleTarget(\n project,\n {\n pythonPlatform: 'aarch64-manylinux_2_28',\n },\n );\n\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'deploy'),\n targetSourceDir,\n {\n mcpServerNameSnakeCase,\n moduleName,\n bundleOutputDir,\n },\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n\n const dockerOutputDir = joinPathFragments(\n 'dist',\n project.root,\n 'docker',\n name,\n );\n const dockerTargetName = `${mcpTargetPrefix}-docker`;\n\n // Add a docker target that prepares the docker context and builds the image\n const fs = new FsCommands(tree);\n project.targets[dockerTargetName] = {\n cache: true,\n executor: 'nx:run-commands',\n options: {\n commands: [\n fs.rm(dockerOutputDir),\n fs.mkdir(dockerOutputDir),\n fs.cp(bundleOutputDir, dockerOutputDir),\n fs.cp(\n `${targetSourceDir}/Dockerfile`,\n `${dockerOutputDir}/Dockerfile`,\n ),\n `${containers} build --platform linux/arm64 -t ${dockerImageTag} ${dockerOutputDir}`,\n ],\n parallel: false,\n },\n dependsOn: [bundleTargetName],\n };\n\n addDependencyToTargetIfNotPresent(project, 'docker', dockerTargetName);\n addDependencyToTargetIfNotPresent(project, 'build', 'docker');\n\n // Add shared constructs\n const iac = await resolveIac(tree, options.iac);\n await sharedConstructsGenerator(tree, { iac });\n\n // Add the construct to deploy the mcp server\n await addMcpServerInfra(tree, {\n mcpServerNameKebabCase: name,\n mcpServerNameClassName,\n projectName: project.name,\n dockerImageTag,\n dockerOutputDir,\n iac,\n auth,\n containers,\n });\n }\n\n const localDevPort = assignPort(tree, project, 8000, {\n component: { info: PY_MCP_SERVER_GENERATOR_INFO, name: mcpTargetPrefix },\n });\n\n const mcpTargets = {\n ...project.targets,\n // Add targets for running the MCP server\n [`${mcpTargetPrefix}-serve-stdio`]: {\n executor: 'nx:run-commands',\n continuous: true,\n options: {\n commands: [`uv run -m ${moduleName}.${mcpServerNameSnakeCase}.stdio`],\n cwd: '{projectRoot}',\n },\n },\n [`${mcpTargetPrefix}-serve`]: {\n executor: 'nx:run-commands',\n continuous: true,\n options: {\n commands: [\n `uv run uvicorn --reload ${moduleName}.${mcpServerNameSnakeCase}.http:app --host 0.0.0.0 --port ${localDevPort}`,\n ],\n cwd: '{projectRoot}',\n env: {\n PORT: `${localDevPort}`,\n },\n },\n },\n [`${mcpTargetPrefix}-dev`]: {\n executor: 'nx:run-commands',\n continuous: true,\n options: {\n commands: [\n `uv run uvicorn --reload ${moduleName}.${mcpServerNameSnakeCase}.http:app --host 0.0.0.0 --port ${localDevPort}`,\n ],\n cwd: '{projectRoot}',\n env: {\n PORT: `${localDevPort}`,\n LOCAL_DEV: 'true',\n },\n },\n },\n [`${mcpTargetPrefix}-inspect`]: {\n executor: 'nx:run-commands',\n continuous: true,\n // Launch the inspector against the locally served HTTP server. The dev\n // target starts the server and any connected dependencies (e.g. a local\n // database).\n dependsOn: [`${mcpTargetPrefix}-dev`],\n options: {\n commands: [\n `mcp-inspector --transport http --server-url http://localhost:${localDevPort}/mcp`,\n ],\n cwd: '{projectRoot}',\n },\n },\n [`${mcpTargetPrefix}-inspect-stdio`]: {\n executor: 'nx:run-commands',\n continuous: true,\n options: {\n commands: [\n `mcp-inspector -- uv run -m ${moduleName}.${mcpServerNameSnakeCase}.stdio`,\n ],\n cwd: '{projectRoot}',\n },\n },\n };\n\n // Aggregate `<mcp>-dev` under the project-level `dev` target.\n addComponentDevTarget(mcpTargets, `${mcpTargetPrefix}-dev`);\n\n updateProjectConfiguration(tree, project.name, {\n ...project,\n targets: mcpTargets,\n });\n\n addDependenciesToPackageJson(\n tree,\n {},\n withVersions(['@modelcontextprotocol/inspector']),\n );\n\n addComponentGeneratorMetadata(\n tree,\n project.name,\n PY_MCP_SERVER_GENERATOR_INFO,\n toProjectRelativePath(project, targetSourceDir),\n mcpTargetPrefix,\n {\n port: localDevPort,\n rc: mcpServerNameClassName,\n auth,\n },\n );\n\n await addGeneratorMetricsIfApplicable(tree, [PY_MCP_SERVER_GENERATOR_INFO]);\n\n await ensureLicenseExceptions(tree, MCP_INSPECTOR_EXCEPTIONS);\n\n await formatFilesInSubtree(tree);\n return async () => {\n installPackagesTask(tree);\n await new UVProvider(tree.root, new Logger(), tree).install();\n };\n};\n\nexport default pyMcpServerGenerator;\n"],"names":["addDependenciesToPackageJson","generateFiles","installPackagesTask","joinPathFragments","OverwriteStrategy","updateProjectConfiguration","ensureLicenseExceptions","MCP_INSPECTOR_EXCEPTIONS","addMcpServerInfra","addPythonBundleTarget","resolveContainers","formatFilesInSubtree","FsCommands","resolveIac","addGeneratorMetricsIfApplicable","kebabCase","toClassName","toSnakeCase","getNpmScope","addComponentDevTarget","addComponentGeneratorMetadata","addDependencyToTargetIfNotPresent","getGeneratorInfo","readProjectConfigurationUnqualified","Logger","UVProvider","toProjectRelativePath","assignPort","addDependenciesToPyProjectToml","sharedConstructsGenerator","withVersions","PY_MCP_SERVER_GENERATOR_INFO","filename","pyMcpServerGenerator","tree","options","project","pyProjectPath","root","Error","sourceRoot","sourceParts","split","moduleName","length","name","pop","mcpTargetPrefix","mcpServerNameSnakeCase","mcpServerNameClassName","targetSourceDir","infra","auth","console","warn","dirname","overwriteStrategy","KeepExisting","containers","dockerImageTag","bundleTargetName","bundleOutputDir","pythonPlatform","dockerOutputDir","dockerTargetName","fs","targets","cache","executor","commands","rm","mkdir","cp","parallel","dependsOn","iac","mcpServerNameKebabCase","projectName","localDevPort","component","info","mcpTargets","continuous","cwd","env","PORT","LOCAL_DEV","port","rc","install"],"mappings":"AAAA;;;CAGC,GACD,SACEA,4BAA4B,EAE5BC,aAAa,EACbC,mBAAmB,EACnBC,iBAAiB,EACjBC,iBAAiB,EAEjBC,0BAA0B,QACrB,aAAa;AACpB,SAASC,uBAAuB,QAAQ,0BAAuB;AAC/D,SAASC,wBAAwB,QAAQ,oCAAiC;AAC1E,SAASC,iBAAiB,QAAQ,6DAA0D;AAC5F,SAASC,qBAAqB,QAAQ,+BAA4B;AAClE,SAASC,iBAAiB,QAAQ,4BAAyB;AAC3D,SAASC,oBAAoB,QAAQ,wBAAqB;AAC1D,SAASC,UAAU,QAAQ,oBAAiB;AAC5C,SAASC,UAAU,QAAQ,qBAAkB;AAC7C,SAASC,+BAA+B,QAAQ,yBAAsB;AACtE,SAASC,SAAS,EAAEC,WAAW,EAAEC,WAAW,QAAQ,uBAAoB;AACxE,SAASC,WAAW,QAAQ,2BAAwB;AACpD,SACEC,qBAAqB,EACrBC,6BAA6B,EAC7BC,iCAAiC,EACjCC,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served.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */ export { };
5
+
6
+ //# sourceMappingURL=schema.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../packages/nx-plugin/src/py/mcp-server/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 { IacOption } from '../../utils/iac';\n\nexport type PyMcpServerInfra = 'none' | 'agentcore';\n\nexport type PyMcpServerAuth = 'iam' | 'cognito';\n\nexport interface PyMcpServerGeneratorSchema {\n project: string;\n name?: string;\n infra?: PyMcpServerInfra;\n auth?: PyMcpServerAuth;\n iac: IacOption;\n}\n"],"names":[],"mappings":"AAAA;;;CAGC,GAQD,WAMC"}
@@ -1,78 +1,90 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.pyProjectGenerator = exports.getPyProjectDetails = exports.PY_PROJECT_GENERATOR_INFO = void 0;
4
1
  /**
5
2
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
6
3
  * SPDX-License-Identifier: Apache-2.0
7
- */
8
- const devkit_1 = require("@nx/devkit");
9
- const config_1 = require("../../license/config");
10
- const git_1 = require("../../utils/git");
11
- const metrics_1 = require("../../utils/metrics");
12
- const names_1 = require("../../utils/names");
13
- const npm_scope_1 = require("../../utils/npm-scope");
14
- const nx_1 = require("../../utils/nx");
15
- const nxlv_python_1 = require("../../utils/nxlv-python");
16
- const object_1 = require("../../utils/object");
17
- const py_1 = require("../../utils/py");
18
- const toml_1 = require("../../utils/toml");
19
- const versions_1 = require("../../utils/versions");
20
- exports.PY_PROJECT_GENERATOR_INFO = (0, nx_1.getGeneratorInfo)(__filename);
4
+ */ import { addDependenciesToPackageJson, ensurePackage, installPackagesTask, joinPathFragments, readNxJson, readProjectConfiguration, updateNxJson, updateProjectConfiguration } from "@nx/devkit";
5
+ import { addLicenseCheckToLintTarget, ensurePythonLicenseCollector } from "../../license/config.js";
6
+ import { updateGitIgnore } from "../../utils/git.js";
7
+ import { addGeneratorMetricsIfApplicable } from "../../utils/metrics.js";
8
+ import { normalizeDistributionName, toSnakeCase } from "../../utils/names.js";
9
+ import { getNpmScope } from "../../utils/npm-scope.js";
10
+ import { addDependencyToTargetIfNotPresent, addGeneratorMetadata, getGeneratorInfo, projectExists } from "../../utils/nx.js";
11
+ import { Logger, migrateToSharedVenvGenerator, UVProvider, uvProjectGenerator } from "../../utils/nxlv-python.js";
12
+ import { sortObjectKeys } from "../../utils/object.js";
13
+ import { addDependenciesToDependencyGroupInPyProjectToml } from "../../utils/py.js";
14
+ import { updateToml } from "../../utils/toml.js";
15
+ import { withVersions } from "../../utils/versions.js";
16
+ export const PY_PROJECT_GENERATOR_INFO = getGeneratorInfo(import.meta.filename);
17
+ // Transient artifacts that pytest, coverage and ruff create and remove while
18
+ // the test, typecheck and compile targets run concurrently. `.coverage.*` are
19
+ // the per-process data files pytest-cov writes (`.coverage.<host>.<pid>.<rand>`)
20
+ // before combining them. Both `ty` (which respects .gitignore) and the
21
+ // `@nxlv/python:build` copy (which respects `ignorePaths`) would otherwise fail
22
+ // when they read one of these mid-deletion.
23
+ const PYTHON_TRANSIENT_ARTIFACTS = [
24
+ '__pycache__',
25
+ '.coverage',
26
+ '.coverage.*',
27
+ '.pytest_cache',
28
+ 'pytest-cache-files-*',
29
+ '.ruff_cache'
30
+ ];
21
31
  /**
22
32
  * Returns details about the Python project to be created
23
- */
24
- const getPyProjectDetails = (tree, schema) => {
25
- const scope = (0, names_1.toSnakeCase)((0, npm_scope_1.getNpmScope)(tree));
26
- const normalizedName = (0, names_1.toSnakeCase)(schema.name);
27
- const normalizedModuleName = (0, names_1.toSnakeCase)(schema.moduleName ?? `${scope}_${normalizedName}`);
33
+ */ export const getPyProjectDetails = (tree, schema)=>{
34
+ const scope = toSnakeCase(getNpmScope(tree));
35
+ const normalizedName = toSnakeCase(schema.name);
36
+ const normalizedModuleName = toSnakeCase(schema.moduleName ?? `${scope}_${normalizedName}`);
28
37
  const fullyQualifiedName = `${scope}.${normalizedName}`;
29
38
  // The Python distribution name is the PEP 503 normalised form of the
30
39
  // fully qualified name: hyphenated, never dotted. See PyProjectDetails.
31
- const distributionName = (0, names_1.normalizeDistributionName)(fullyQualifiedName);
40
+ const distributionName = normalizeDistributionName(fullyQualifiedName);
32
41
  // NB: interactive nx generator cli can pass empty string
33
- const dir = (0, devkit_1.joinPathFragments)(schema.directory || '.', schema.subDirectory || normalizedName);
34
- return { dir, fullyQualifiedName, distributionName, normalizedModuleName };
42
+ const dir = joinPathFragments(schema.directory || '.', schema.subDirectory || normalizedName);
43
+ return {
44
+ dir,
45
+ fullyQualifiedName,
46
+ distributionName,
47
+ normalizedModuleName
48
+ };
35
49
  };
36
- exports.getPyProjectDetails = getPyProjectDetails;
37
50
  /**
38
51
  * Generates a Python project
39
- */
40
- const pyProjectGenerator = async (tree, schema) => {
41
- const { dir, normalizedModuleName, fullyQualifiedName, distributionName } = (0, exports.getPyProjectDetails)(tree, schema);
42
- const pythonPlugin = (0, versions_1.withVersions)(['@nxlv/python']);
43
- (0, devkit_1.addDependenciesToPackageJson)(tree, {}, pythonPlugin);
44
- Object.entries(pythonPlugin).forEach(([name, version]) => (0, devkit_1.ensurePackage)(name, version));
45
- const nxJson = (0, devkit_1.readNxJson)(tree);
52
+ */ export const pyProjectGenerator = async (tree, schema)=>{
53
+ const { dir, normalizedModuleName, fullyQualifiedName, distributionName } = getPyProjectDetails(tree, schema);
54
+ const pythonPlugin = withVersions([
55
+ '@nxlv/python'
56
+ ]);
57
+ addDependenciesToPackageJson(tree, {}, pythonPlugin);
58
+ Object.entries(pythonPlugin).forEach(([name, version])=>ensurePackage(name, version));
59
+ const nxJson = readNxJson(tree);
46
60
  // Only rewrite nx.json when the plugin needs adding, so re-running does not
47
61
  // reserialize (and reformat) the file when nothing has changed.
48
- if (!nxJson.plugins?.find((p) => typeof p === 'string'
49
- ? p === '@nxlv/python'
50
- : p.plugin === '@nxlv/python')) {
62
+ if (!nxJson.plugins?.find((p)=>typeof p === 'string' ? p === '@nxlv/python' : p.plugin === '@nxlv/python')) {
51
63
  nxJson.plugins = [
52
- ...(nxJson.plugins ?? []),
64
+ ...nxJson.plugins ?? [],
53
65
  {
54
66
  plugin: '@nxlv/python',
55
67
  options: {
56
- packageManager: 'uv',
57
- },
58
- },
68
+ packageManager: 'uv'
69
+ }
70
+ }
59
71
  ];
60
- (0, devkit_1.updateNxJson)(tree, nxJson);
72
+ updateNxJson(tree, nxJson);
61
73
  }
62
74
  // Only scaffold the project when it does not already exist so re-running with
63
75
  // the same name does not throw. The rest of the generator still runs to apply
64
76
  // any changed options to the existing project.
65
- if (!(0, nx_1.projectExists)(tree, fullyQualifiedName)) {
77
+ if (!projectExists(tree, fullyQualifiedName)) {
66
78
  if (!tree.exists('uv.lock')) {
67
- await (0, nxlv_python_1.migrateToSharedVenvGenerator)(tree, {
79
+ await migrateToSharedVenvGenerator(tree, {
68
80
  autoActivate: true,
69
81
  packageManager: 'uv',
70
82
  moveDevDependencies: false,
71
83
  pyenvPythonVersion: '3.14.0',
72
- pyprojectPythonDependency: '>=3.14',
84
+ pyprojectPythonDependency: '>=3.14'
73
85
  });
74
86
  }
75
- await (0, nxlv_python_1.uvProjectGenerator)(tree, {
87
+ await uvProjectGenerator(tree, {
76
88
  // The Nx project id (and `uv.workspace.members` etc.) keys off `name`, so
77
89
  // keep it dotted. `packageName` is the separate PEP 503 distribution name
78
90
  // written to `[project].name` and the root `[tool.uv.sources]` key; it is
@@ -99,19 +111,19 @@ const pyProjectGenerator = async (tree, schema) => {
99
111
  unitTestHtmlReport: true,
100
112
  unitTestJUnitReport: true,
101
113
  buildSystem: 'hatch',
102
- srcDir: false,
114
+ srcDir: false
103
115
  });
104
116
  // Remove generated hello.py and test_hello.py as they are not needed
105
117
  [
106
- (0, devkit_1.joinPathFragments)(dir, normalizedModuleName, 'hello.py'),
107
- (0, devkit_1.joinPathFragments)(dir, 'tests', 'test_hello.py'),
108
- ].forEach((f) => tree.delete(f));
118
+ joinPathFragments(dir, normalizedModuleName, 'hello.py'),
119
+ joinPathFragments(dir, 'tests', 'test_hello.py')
120
+ ].forEach((f)=>tree.delete(f));
109
121
  // Add a placeholder test so pytest doesn't fail with "no tests collected"
110
- tree.write((0, devkit_1.joinPathFragments)(dir, 'tests', 'test_noop.py'), 'def test_noop():\n pass\n');
122
+ tree.write(joinPathFragments(dir, 'tests', 'test_noop.py'), 'def test_noop():\n pass\n');
111
123
  }
112
124
  const outputPath = '{workspaceRoot}/dist/{projectRoot}';
113
- const buildOutputPath = (0, devkit_1.joinPathFragments)(outputPath, 'build');
114
- const projectConfiguration = (0, devkit_1.readProjectConfiguration)(tree, fullyQualifiedName);
125
+ const buildOutputPath = joinPathFragments(outputPath, 'build');
126
+ const projectConfiguration = readProjectConfiguration(tree, fullyQualifiedName);
115
127
  projectConfiguration.name = fullyQualifiedName;
116
128
  // Derive the compile target from the uv build target, and rewrite build to
117
129
  // orchestrate the other targets. This only runs on first creation: on re-run
@@ -121,93 +133,120 @@ const pyProjectGenerator = async (tree, schema) => {
121
133
  const buildTarget = projectConfiguration.targets.build;
122
134
  projectConfiguration.targets.compile = {
123
135
  ...buildTarget,
124
- inputs: ['default', '^production'],
125
- outputs: [buildOutputPath],
136
+ inputs: [
137
+ 'default',
138
+ '^production'
139
+ ],
140
+ outputs: [
141
+ buildOutputPath
142
+ ],
126
143
  options: {
127
144
  ...buildTarget.options,
128
145
  outputPath: buildOutputPath,
129
- },
146
+ // The build executor copies the project to a temp folder; exclude the
147
+ // executor defaults plus transient artifacts so the copy does not race
148
+ // a concurrent test/typecheck target deleting a file mid-copy.
149
+ ignorePaths: [
150
+ '.venv',
151
+ '.tox',
152
+ 'tests',
153
+ ...PYTHON_TRANSIENT_ARTIFACTS
154
+ ]
155
+ }
130
156
  };
131
157
  projectConfiguration.targets.build = {
132
- inputs: ['default', '^production'],
158
+ inputs: [
159
+ 'default',
160
+ '^production'
161
+ ],
133
162
  dependsOn: [
134
163
  'lint',
135
164
  'compile',
136
165
  'test',
137
166
  'typecheck',
138
- ...(buildTarget.dependsOn ?? []),
167
+ ...buildTarget.dependsOn ?? []
139
168
  ],
140
169
  options: {
141
- outputPath,
142
- },
170
+ outputPath
171
+ }
143
172
  };
144
173
  }
145
174
  projectConfiguration.targets.typecheck = {
146
175
  cache: true,
147
- inputs: ['default', '^production'],
176
+ inputs: [
177
+ 'default',
178
+ '^production'
179
+ ],
148
180
  executor: '@nxlv/python:run-commands',
149
181
  options: {
150
182
  command: 'uv run ty check',
151
- cwd: '{projectRoot}',
152
- },
183
+ cwd: '{projectRoot}'
184
+ }
153
185
  };
154
186
  // Set the default line length to 120, as 88 is a little too strict
155
- (0, toml_1.updateToml)(tree, (0, devkit_1.joinPathFragments)(dir, 'pyproject.toml'), (pyProjectToml) => {
187
+ updateToml(tree, joinPathFragments(dir, 'pyproject.toml'), (pyProjectToml)=>{
156
188
  if (pyProjectToml.tool?.ruff) {
157
189
  pyProjectToml.tool.ruff['line-length'] = 120;
158
190
  }
159
191
  return pyProjectToml;
160
192
  });
161
- (0, py_1.addDependenciesToDependencyGroupInPyProjectToml)(tree, '.', 'dev', ['ty']);
193
+ addDependenciesToDependencyGroupInPyProjectToml(tree, '.', 'dev', [
194
+ 'ty'
195
+ ]);
162
196
  // Add a dependency on the format target for lint in order to reduce the number of
163
197
  // fixable lint errors (eg line too long)
164
198
  projectConfiguration.targets.lint = {
165
199
  ...projectConfiguration.targets.lint,
166
200
  cache: true,
167
- inputs: ['default', '^production'],
201
+ inputs: [
202
+ 'default',
203
+ '^production'
204
+ ],
168
205
  configurations: {
169
206
  ...projectConfiguration.targets.lint?.configurations,
170
207
  fix: {
171
- fix: true,
208
+ fix: true
172
209
  },
173
210
  'skip-lint': {
174
- exitZero: true,
175
- },
176
- },
211
+ exitZero: true
212
+ }
213
+ }
177
214
  };
178
215
  // Append `format` without moving an existing entry, so re-running does not
179
216
  // reorder lint dependencies (e.g. relative to a later-added license-check).
180
- (0, nx_1.addDependencyToTargetIfNotPresent)(projectConfiguration, 'lint', 'format');
181
- projectConfiguration.targets = (0, object_1.sortObjectKeys)(projectConfiguration.targets);
182
- (0, devkit_1.updateProjectConfiguration)(tree, fullyQualifiedName, projectConfiguration);
183
- (0, nx_1.addGeneratorMetadata)(tree, fullyQualifiedName, exports.PY_PROJECT_GENERATOR_INFO);
217
+ addDependencyToTargetIfNotPresent(projectConfiguration, 'lint', 'format');
218
+ projectConfiguration.targets = sortObjectKeys(projectConfiguration.targets);
219
+ updateProjectConfiguration(tree, fullyQualifiedName, projectConfiguration);
220
+ addGeneratorMetadata(tree, fullyQualifiedName, PY_PROJECT_GENERATOR_INFO);
184
221
  // Update root .gitignore
185
- (0, git_1.updateGitIgnore)(tree, '.', (patterns) => [...patterns, '/reports']);
222
+ updateGitIgnore(tree, '.', (patterns)=>[
223
+ ...patterns,
224
+ '/reports'
225
+ ]);
186
226
  // Update project level .gitignore. The cache directories are also kept out
187
227
  // of type checking: `ty` respects .gitignore, and pytest creates and removes
188
228
  // transient `pytest-cache-files-*` directories while the test and typecheck
189
229
  // targets run concurrently, which would otherwise make `ty` fail with an I/O
190
230
  // error when it scans one mid-deletion.
191
- (0, git_1.updateGitIgnore)(tree, dir, (patterns) => [
192
- ...patterns,
193
- '**/__pycache__',
194
- '.coverage',
195
- '.pytest_cache',
196
- 'pytest-cache-files-*',
197
- '.ruff_cache',
231
+ updateGitIgnore(tree, dir, (patterns)=>[
232
+ ...patterns,
233
+ '**/__pycache__',
234
+ ...PYTHON_TRANSIENT_ARTIFACTS.filter((p)=>p !== '__pycache__')
235
+ ]);
236
+ await addGeneratorMetricsIfApplicable(tree, [
237
+ PY_PROJECT_GENERATOR_INFO
198
238
  ]);
199
- await (0, metrics_1.addGeneratorMetricsIfApplicable)(tree, [exports.PY_PROJECT_GENERATOR_INFO]);
200
- await (0, config_1.ensurePythonLicenseCollector)(tree);
239
+ await ensurePythonLicenseCollector(tree);
201
240
  // If license checking is configured, make this project's lint target depend
202
241
  // on the root license-check target. No-op if license checking isn't set up;
203
242
  // the license generator wires up existing projects itself, so the dependency
204
243
  // is added regardless of which generator runs first.
205
- (0, config_1.addLicenseCheckToLintTarget)(tree, fullyQualifiedName);
206
- return async () => {
207
- (0, devkit_1.installPackagesTask)(tree);
208
- await new nxlv_python_1.UVProvider(tree.root, new nxlv_python_1.Logger(), tree).install();
244
+ addLicenseCheckToLintTarget(tree, fullyQualifiedName);
245
+ return async ()=>{
246
+ installPackagesTask(tree);
247
+ await new UVProvider(tree.root, new Logger(), tree).install();
209
248
  };
210
249
  };
211
- exports.pyProjectGenerator = pyProjectGenerator;
212
- exports.default = exports.pyProjectGenerator;
250
+ export default pyProjectGenerator;
251
+
213
252
  //# sourceMappingURL=generator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/py/project/generator.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAWoB;AACpB,iDAG8B;AAC9B,yCAAkD;AAClD,iDAAsE;AACtE,6CAA2E;AAC3E,qDAAoD;AACpD,uCAMwB;AAExB,yDAKiC;AACjC,+CAAoD;AACpD,uCAAiF;AACjF,2CAA8C;AAC9C,mDAAoD;AAGvC,QAAA,yBAAyB,GACpC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AA8B/B;;GAEG;AACI,MAAM,mBAAmB,GAAG,CACjC,IAAU,EACV,MAKC,EACiB,EAAE;IACpB,MAAM,KAAK,GAAG,IAAA,mBAAW,EAAC,IAAA,uBAAW,EAAC,IAAI,CAAC,CAAC,CAAC;IAC7C,MAAM,cAAc,GAAG,IAAA,mBAAW,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChD,MAAM,oBAAoB,GAAG,IAAA,mBAAW,EACtC,MAAM,CAAC,UAAU,IAAI,GAAG,KAAK,IAAI,cAAc,EAAE,CAClD,CAAC;IACF,MAAM,kBAAkB,GAA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kB,sBAkN7B;AACF,kBAAe,0BAAkB,CAAC"}
1
+ {"version":3,"sources":["../../../../../../packages/nx-plugin/src/py/project/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n addDependenciesToPackageJson,\n ensurePackage,\n type GeneratorCallback,\n installPackagesTask,\n joinPathFragments,\n readNxJson,\n readProjectConfiguration,\n type Tree,\n updateNxJson,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport {\n addLicenseCheckToLintTarget,\n ensurePythonLicenseCollector,\n} from '../../license/config';\nimport { updateGitIgnore } from '../../utils/git';\nimport { addGeneratorMetricsIfApplicable } from '../../utils/metrics';\nimport { normalizeDistributionName, toSnakeCase } from '../../utils/names';\nimport { getNpmScope } from '../../utils/npm-scope';\nimport {\n addDependencyToTargetIfNotPresent,\n addGeneratorMetadata,\n getGeneratorInfo,\n type NxGeneratorInfo,\n projectExists,\n} from '../../utils/nx';\nimport type { UVPyprojectToml } from '../../utils/nxlv-python';\nimport {\n Logger,\n migrateToSharedVenvGenerator,\n UVProvider,\n uvProjectGenerator,\n} from '../../utils/nxlv-python';\nimport { sortObjectKeys } from '../../utils/object';\nimport { addDependenciesToDependencyGroupInPyProjectToml } from '../../utils/py';\nimport { updateToml } from '../../utils/toml';\nimport { withVersions } from '../../utils/versions';\nimport type { PyProjectGeneratorSchema } from './schema';\n\nexport const PY_PROJECT_GENERATOR_INFO: NxGeneratorInfo = getGeneratorInfo(\n import.meta.filename,\n);\n\n// Transient artifacts that pytest, coverage and ruff create and remove while\n// the test, typecheck and compile targets run concurrently. `.coverage.*` are\n// the per-process data files pytest-cov writes (`.coverage.<host>.<pid>.<rand>`)\n// before combining them. Both `ty` (which respects .gitignore) and the\n// `@nxlv/python:build` copy (which respects `ignorePaths`) would otherwise fail\n// when they read one of these mid-deletion.\nconst PYTHON_TRANSIENT_ARTIFACTS = [\n '__pycache__',\n '.coverage',\n '.coverage.*',\n '.pytest_cache',\n 'pytest-cache-files-*',\n '.ruff_cache',\n];\n\nexport interface PyProjectDetails {\n /**\n * Fully qualified Nx project id including scope, in dot notation (eg foo.bar).\n * This is the identifier Nx uses (readProjectConfiguration, the project\n * graph, target references) and is intentionally kept dotted.\n */\n readonly fullyQualifiedName: string;\n /**\n * PEP 503 normalised Python distribution name (eg foo-bar). This is the name\n * written to the project's `[project].name`, the root `[tool.uv.sources]`\n * key, and any inter-project dependency string. It is hyphenated (not dotted)\n * so `uv` and `@nxlv/python` can match it: uv writes `uv.lock` keyed by the\n * PEP 503 hyphenated name, and `@nxlv/python`'s dependency inference splits a\n * dotted name on `.` and so would otherwise drop the edge entirely. Keeping\n * the distribution name decoupled from `fullyQualifiedName` is what lets the\n * workspace dependency edge appear in the Nx project graph.\n */\n readonly distributionName: string;\n /**\n * Directory of the library relative to the root\n */\n readonly dir: string;\n /**\n * Module name for the project\n */\n readonly normalizedModuleName: string;\n}\n\n/**\n * Returns details about the Python project to be created\n */\nexport const getPyProjectDetails = (\n tree: Tree,\n schema: {\n name: string;\n directory?: string;\n subDirectory?: string;\n moduleName?: string;\n },\n): PyProjectDetails => {\n const scope = toSnakeCase(getNpmScope(tree));\n const normalizedName = toSnakeCase(schema.name);\n const normalizedModuleName = toSnakeCase(\n schema.moduleName ?? `${scope}_${normalizedName}`,\n );\n const fullyQualifiedName = `${scope}.${normalizedName}`;\n // The Python distribution name is the PEP 503 normalised form of the\n // fully qualified name: hyphenated, never dotted. See PyProjectDetails.\n const distributionName = normalizeDistributionName(fullyQualifiedName);\n // NB: interactive nx generator cli can pass empty string\n const dir = joinPathFragments(\n schema.directory || '.',\n schema.subDirectory || normalizedName,\n );\n return { dir, fullyQualifiedName, distributionName, normalizedModuleName };\n};\n\n/**\n * Generates a Python project\n */\nexport const pyProjectGenerator = async (\n tree: Tree,\n schema: PyProjectGeneratorSchema,\n): Promise<GeneratorCallback> => {\n const { dir, normalizedModuleName, fullyQualifiedName, distributionName } =\n getPyProjectDetails(tree, schema);\n\n const pythonPlugin = withVersions(['@nxlv/python']);\n addDependenciesToPackageJson(tree, {}, pythonPlugin);\n\n Object.entries(pythonPlugin).forEach(([name, version]) =>\n ensurePackage(name, version),\n );\n\n const nxJson = readNxJson(tree);\n\n // Only rewrite nx.json when the plugin needs adding, so re-running does not\n // reserialize (and reformat) the file when nothing has changed.\n if (\n !nxJson.plugins?.find((p) =>\n typeof p === 'string'\n ? p === '@nxlv/python'\n : p.plugin === '@nxlv/python',\n )\n ) {\n nxJson.plugins = [\n ...(nxJson.plugins ?? []),\n {\n plugin: '@nxlv/python',\n options: {\n packageManager: 'uv',\n },\n },\n ];\n updateNxJson(tree, nxJson);\n }\n\n // Only scaffold the project when it does not already exist so re-running with\n // the same name does not throw. The rest of the generator still runs to apply\n // any changed options to the existing project.\n if (!projectExists(tree, fullyQualifiedName)) {\n if (!tree.exists('uv.lock')) {\n await migrateToSharedVenvGenerator(tree, {\n autoActivate: true,\n packageManager: 'uv',\n moveDevDependencies: false,\n pyenvPythonVersion: '3.14.0',\n pyprojectPythonDependency: '>=3.14',\n });\n }\n\n await uvProjectGenerator(tree, {\n // The Nx project id (and `uv.workspace.members` etc.) keys off `name`, so\n // keep it dotted. `packageName` is the separate PEP 503 distribution name\n // written to `[project].name` and the root `[tool.uv.sources]` key; it is\n // hyphenated so `@nxlv/python` infers the workspace dependency edge (it\n // splits a dotted name on `.` and would otherwise drop it). This split is\n // the whole fix (see PyProjectDetails.distributionName).\n name: fullyQualifiedName,\n packageName: distributionName,\n publishable: false,\n buildLockedVersions: true,\n buildBundleLocalDependencies: true,\n linter: 'ruff',\n rootPyprojectDependencyGroup: 'main',\n pyenvPythonVersion: '3.14.0',\n pyprojectPythonDependency: '>=3.14',\n projectType: schema.type,\n projectNameAndRootFormat: 'as-provided',\n moduleName: normalizedModuleName,\n directory: dir,\n unitTestRunner: 'pytest',\n codeCoverage: true,\n codeCoverageHtmlReport: true,\n codeCoverageXmlReport: true,\n unitTestHtmlReport: true,\n unitTestJUnitReport: true,\n buildSystem: 'hatch',\n srcDir: false,\n });\n\n // Remove generated hello.py and test_hello.py as they are not needed\n [\n joinPathFragments(dir, normalizedModuleName, 'hello.py'),\n joinPathFragments(dir, 'tests', 'test_hello.py'),\n ].forEach((f) => tree.delete(f));\n\n // Add a placeholder test so pytest doesn't fail with \"no tests collected\"\n tree.write(\n joinPathFragments(dir, 'tests', 'test_noop.py'),\n 'def test_noop():\\n pass\\n',\n );\n }\n\n const outputPath = '{workspaceRoot}/dist/{projectRoot}';\n const buildOutputPath = joinPathFragments(outputPath, 'build');\n const projectConfiguration = readProjectConfiguration(\n tree,\n fullyQualifiedName,\n );\n projectConfiguration.name = fullyQualifiedName;\n // Derive the compile target from the uv build target, and rewrite build to\n // orchestrate the other targets. This only runs on first creation: on re-run\n // build has already been transformed, so re-deriving would corrupt compile\n // and duplicate the build dependencies.\n if (!projectConfiguration.targets.compile) {\n const buildTarget = projectConfiguration.targets.build;\n projectConfiguration.targets.compile = {\n ...buildTarget,\n inputs: ['default', '^production'],\n outputs: [buildOutputPath],\n options: {\n ...buildTarget.options,\n outputPath: buildOutputPath,\n // The build executor copies the project to a temp folder; exclude the\n // executor defaults plus transient artifacts so the copy does not race\n // a concurrent test/typecheck target deleting a file mid-copy.\n ignorePaths: ['.venv', '.tox', 'tests', ...PYTHON_TRANSIENT_ARTIFACTS],\n },\n };\n projectConfiguration.targets.build = {\n inputs: ['default', '^production'],\n dependsOn: [\n 'lint',\n 'compile',\n 'test',\n 'typecheck',\n ...(buildTarget.dependsOn ?? []),\n ],\n options: {\n outputPath,\n },\n };\n }\n projectConfiguration.targets.typecheck = {\n cache: true,\n inputs: ['default', '^production'],\n executor: '@nxlv/python:run-commands',\n options: {\n command: 'uv run ty check',\n cwd: '{projectRoot}',\n },\n };\n\n // Set the default line length to 120, as 88 is a little too strict\n updateToml(\n tree,\n joinPathFragments(dir, 'pyproject.toml'),\n (pyProjectToml: UVPyprojectToml) => {\n if ((pyProjectToml.tool as any)?.ruff) {\n (pyProjectToml.tool as any).ruff['line-length'] = 120;\n }\n return pyProjectToml;\n },\n );\n\n addDependenciesToDependencyGroupInPyProjectToml(tree, '.', 'dev', ['ty']);\n\n // Add a dependency on the format target for lint in order to reduce the number of\n // fixable lint errors (eg line too long)\n projectConfiguration.targets.lint = {\n ...projectConfiguration.targets.lint,\n cache: true,\n inputs: ['default', '^production'],\n configurations: {\n ...projectConfiguration.targets.lint?.configurations,\n fix: {\n fix: true,\n },\n 'skip-lint': {\n exitZero: true,\n },\n },\n };\n // Append `format` without moving an existing entry, so re-running does not\n // reorder lint dependencies (e.g. relative to a later-added license-check).\n addDependencyToTargetIfNotPresent(projectConfiguration, 'lint', 'format');\n\n projectConfiguration.targets = sortObjectKeys(projectConfiguration.targets);\n updateProjectConfiguration(tree, fullyQualifiedName, projectConfiguration);\n\n addGeneratorMetadata(tree, fullyQualifiedName, PY_PROJECT_GENERATOR_INFO);\n\n // Update root .gitignore\n updateGitIgnore(tree, '.', (patterns) => [...patterns, '/reports']);\n\n // Update project level .gitignore. The cache directories are also kept out\n // of type checking: `ty` respects .gitignore, and pytest creates and removes\n // transient `pytest-cache-files-*` directories while the test and typecheck\n // targets run concurrently, which would otherwise make `ty` fail with an I/O\n // error when it scans one mid-deletion.\n updateGitIgnore(tree, dir, (patterns) => [\n ...patterns,\n '**/__pycache__',\n ...PYTHON_TRANSIENT_ARTIFACTS.filter((p) => p !== '__pycache__'),\n ]);\n\n await addGeneratorMetricsIfApplicable(tree, [PY_PROJECT_GENERATOR_INFO]);\n\n await ensurePythonLicenseCollector(tree);\n\n // If license checking is configured, make this project's lint target depend\n // on the root license-check target. No-op if license checking isn't set up;\n // the license generator wires up existing projects itself, so the dependency\n // is added regardless of which generator runs first.\n addLicenseCheckToLintTarget(tree, fullyQualifiedName);\n\n return async () => {\n installPackagesTask(tree);\n await new UVProvider(tree.root, new Logger(), tree).install();\n };\n};\nexport default pyProjectGenerator;\n"],"names":["addDependenciesToPackageJson","ensurePackage","installPackagesTask","joinPathFragments","readNxJson","readProjectConfiguration","updateNxJson","updateProjectConfiguration","addLicenseCheckToLintTarget","ensurePythonLicenseCollector","updateGitIgnore","addGeneratorMetricsIfApplicable","normalizeDistributionName","toSnakeCase","getNpmScope","addDependencyToTargetIfNotPresent","addGeneratorMetadata","getGeneratorInfo","projectExists","Logger","migrateToSharedVenvGenerator","UVProvider","uvProjectGenerator","sortObjectKeys","addDependenciesToDependencyGroupInPyProjectToml","updateToml","withVersions","PY_PROJECT_GENERATOR_INFO","filename","PYTHON_TRANSIENT_ARTIFACTS","getPyProjectDetails","tree","schema","scope","normalizedName","name","normalizedModuleName","moduleName","fullyQualifiedName","distributionName","dir","directory","subDirectory","pyProjectGenerator","pythonPlugin","Object","entries","forEach","version","nxJson","plugins","find","p","plugin","options","packageManager","exists","autoActivate","moveDevDependencies","pyenvPythonVersion","pyprojectPythonDependency","packageName","publishable","buildLockedVersions","buildBundleLocalDependencies","linter","rootPyprojectDependencyGroup","projectType","type","projectNameAndRootFormat","unitTestRunner","codeCoverage","codeCoverageHtmlReport","codeCoverageXmlReport","unitTestHtmlReport","unitTestJUnitReport","buildSystem","srcDir","f","delete","write","outputPath","buildOutputPath","projectConfiguration","targets","compile","buildTarget","build","inputs","outputs","ignorePaths","dependsOn","typecheck","cache","executor","command","cwd","pyProjectToml","tool","ruff","lint","configurations","fix","exitZero","patterns","filter","root","install"],"mappings":"AAAA;;;CAGC,GACD,SACEA,4BAA4B,EAC5BC,aAAa,EAEbC,mBAAmB,EACnBC,iBAAiB,EACjBC,UAAU,EACVC,wBAAwB,EAExBC,YAAY,EACZC,0BAA0B,QACrB,aAAa;AACpB,SACEC,2BAA2B,EAC3BC,4BAA4B,QACvB,0BAAuB;AAC9B,SAASC,eAAe,QAAQ,qBAAkB;AAClD,SAASC,+BAA+B,QAAQ,yBAAsB;AACtE,SAASC,yBAAyB,EAAEC,WAAW,QAAQ,uBAAoB;AAC3E,SAASC,WAAW,QAA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reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */ export { };
5
+
6
+ //# sourceMappingURL=schema.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../packages/nx-plugin/src/py/project/schema.d.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport interface PyProjectGeneratorSchema {\n readonly name: string;\n readonly type: 'application' | 'library';\n readonly directory?: string;\n readonly subDirectory?: string;\n readonly moduleName?: string;\n}\n"],"names":[],"mappings":"AAAA;;;CAGC,GAED,WAMC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ export { agentcoreGatewayGenerator } from '../agentcore-gateway/generator';
6
+ export type { AgentcoreGatewayGeneratorSchema } from '../agentcore-gateway/schema';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */ // AgentCore Gateway Generator
5
+ export { agentcoreGatewayGenerator } from "../agentcore-gateway/generator.js";
6
+
7
+ //# sourceMappingURL=agentcore-gateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/sdk/agentcore-gateway.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// AgentCore Gateway Generator\nexport { agentcoreGatewayGenerator } from '../agentcore-gateway/generator';\nexport type { AgentcoreGatewayGeneratorSchema } from '../agentcore-gateway/schema';\n"],"names":["agentcoreGatewayGenerator"],"mappings":"AAAA;;;CAGC,GAED,8BAA8B;AAC9B,SAASA,yBAAyB,QAAQ,oCAAiC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ export { connectionGenerator } from '../connection/generator';
6
+ export type { ConnectionGeneratorSchema } from '../connection/schema';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */ export { connectionGenerator } from "../connection/generator.js";
5
+
6
+ //# sourceMappingURL=connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/sdk/connection.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { connectionGenerator } from '../connection/generator';\nexport type { ConnectionGeneratorSchema } from '../connection/schema';\n"],"names":["connectionGenerator"],"mappings":"AAAA;;;CAGC,GAED,SAASA,mBAAmB,QAAQ,6BAA0B"}
@@ -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
- export { licenseGenerator } from '../src/license/generator';
6
- export type { AllowlistEntry, CollectedDependency, DependencyCheckConfig, DependencyCheckException, LicenseCollector, } from '../src/license/index';
7
- export { DEFAULT_LICENSE_ALLOWLIST, npmCollector, pythonCollector, } from '../src/license/index';
8
- export type { LicenseGeneratorSchema } from '../src/license/schema';
5
+ export { licenseGenerator } from '../license/generator';
6
+ export type { AllowlistEntry, CollectedDependency, DependencyCheckConfig, DependencyCheckException, LicenseCollector, } from '../license/index';
7
+ export { DEFAULT_LICENSE_ALLOWLIST, npmCollector, pythonCollector, } from '../license/index';
8
+ export type { LicenseGeneratorSchema } from '../license/schema';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */ export { licenseGenerator } from "../license/generator.js";
5
+ export { DEFAULT_LICENSE_ALLOWLIST, npmCollector, pythonCollector } from "../license/index.js";
6
+
7
+ //# sourceMappingURL=license.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/sdk/license.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nexport { licenseGenerator } from '../license/generator';\nexport type {\n AllowlistEntry,\n CollectedDependency,\n DependencyCheckConfig,\n DependencyCheckException,\n LicenseCollector,\n} from '../license/index';\nexport {\n DEFAULT_LICENSE_ALLOWLIST,\n npmCollector,\n pythonCollector,\n} from '../license/index';\nexport type { LicenseGeneratorSchema } from '../license/schema';\n"],"names":["licenseGenerator","DEFAULT_LICENSE_ALLOWLIST","npmCollector","pythonCollector"],"mappings":"AAAA;;;CAGC,GACD,SAASA,gBAAgB,QAAQ,0BAAuB;AAQxD,SACEC,yBAAyB,EACzBC,YAAY,EACZC,eAAe,QACV,sBAAmB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ export { openApiTsClientGenerator, buildOpenApiCodeGenerationData, } from '../open-api/ts-client/generator';
6
+ export type { OpenApiTsClientGeneratorSchema } from '../open-api/ts-client/schema';
7
+ export { openApiTsHooksGenerator } from '../open-api/ts-hooks/generator';
8
+ export type { OpenApiTsHooksGeneratorSchema } from '../open-api/ts-hooks/schema';
9
+ export { openApiTsMetadataGenerator } from '../open-api/ts-metadata/generator';
10
+ export type { OpenApiTsMetadataGeneratorSchema } from '../open-api/ts-metadata/schema';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */ export { openApiTsClientGenerator, buildOpenApiCodeGenerationData } from "../open-api/ts-client/generator.js";
5
+ export { openApiTsHooksGenerator } from "../open-api/ts-hooks/generator.js";
6
+ export { openApiTsMetadataGenerator } from "../open-api/ts-metadata/generator.js";
7
+
8
+ //# sourceMappingURL=open-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/sdk/open-api.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport {\n openApiTsClientGenerator,\n buildOpenApiCodeGenerationData,\n} from '../open-api/ts-client/generator';\nexport type { OpenApiTsClientGeneratorSchema } from '../open-api/ts-client/schema';\n\nexport { openApiTsHooksGenerator } from '../open-api/ts-hooks/generator';\nexport type { OpenApiTsHooksGeneratorSchema } from '../open-api/ts-hooks/schema';\n\nexport { openApiTsMetadataGenerator } from '../open-api/ts-metadata/generator';\nexport type { OpenApiTsMetadataGeneratorSchema } from '../open-api/ts-metadata/schema';\n"],"names":["openApiTsClientGenerator","buildOpenApiCodeGenerationData","openApiTsHooksGenerator","openApiTsMetadataGenerator"],"mappings":"AAAA;;;CAGC,GAED,SACEA,wBAAwB,EACxBC,8BAA8B,QACzB,qCAAkC;AAGzC,SAASC,uBAAuB,QAAQ,oCAAiC;AAGzE,SAASC,0BAA0B,QAAQ,uCAAoC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ export { pyAgentGenerator } from '../py/agent/generator';
6
+ export type { PyAgentGeneratorSchema } from '../py/agent/schema';
7
+ export { pyApiGenerator } from '../py/api/generator';
8
+ export type { PyApiGeneratorSchema } from '../py/api/schema';
9
+ export { pyLambdaFunctionGenerator } from '../py/lambda-function/generator';
10
+ export type { PyLambdaFunctionGeneratorSchema } from '../py/lambda-function/schema';
11
+ export { pyMcpServerGenerator } from '../py/mcp-server/generator';
12
+ export type { PyMcpServerGeneratorSchema } from '../py/mcp-server/schema';
13
+ export { pyProjectGenerator } from '../py/project/generator';
14
+ export type { PyProjectGeneratorSchema } from '../py/project/schema';
package/src/sdk/py.js ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */ export { pyAgentGenerator } from "../py/agent/generator.js";
5
+ export { pyApiGenerator } from "../py/api/generator.js";
6
+ export { pyLambdaFunctionGenerator } from "../py/lambda-function/generator.js";
7
+ export { pyMcpServerGenerator } from "../py/mcp-server/generator.js";
8
+ export { pyProjectGenerator } from "../py/project/generator.js";
9
+
10
+ //# sourceMappingURL=py.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/sdk/py.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { pyAgentGenerator } from '../py/agent/generator';\nexport type { PyAgentGeneratorSchema } from '../py/agent/schema';\n\nexport { pyApiGenerator } from '../py/api/generator';\nexport type { PyApiGeneratorSchema } from '../py/api/schema';\n\nexport { pyLambdaFunctionGenerator } from '../py/lambda-function/generator';\nexport type { PyLambdaFunctionGeneratorSchema } from '../py/lambda-function/schema';\n\nexport { pyMcpServerGenerator } from '../py/mcp-server/generator';\nexport type { PyMcpServerGeneratorSchema } from '../py/mcp-server/schema';\nexport { pyProjectGenerator } from '../py/project/generator';\nexport type { PyProjectGeneratorSchema } from '../py/project/schema';\n"],"names":["pyAgentGenerator","pyApiGenerator","pyLambdaFunctionGenerator","pyMcpServerGenerator","pyProjectGenerator"],"mappings":"AAAA;;;CAGC,GAED,SAASA,gBAAgB,QAAQ,2BAAwB;AAGzD,SAASC,cAAc,QAAQ,yBAAsB;AAGrD,SAASC,yBAAyB,QAAQ,qCAAkC;AAG5E,SAASC,oBAAoB,QAAQ,gCAA6B;AAElE,SAASC,kBAAkB,QAAQ,6BAA0B"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ export { terraformProjectGenerator } from '../terraform/project/generator';
6
+ export type { TerraformProjectGeneratorSchema } from '../terraform/project/schema';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */ // Terraform Project Generator
5
+ export { terraformProjectGenerator } from "../terraform/project/generator.js";
6
+
7
+ //# sourceMappingURL=terraform.js.map