@aws/nx-plugin 1.0.0-rc.33 → 1.0.0-rc.34

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 (109) hide show
  1. package/LICENSE-THIRD-PARTY +28 -41
  2. package/generators.json +27 -0
  3. package/package.json +6 -6
  4. package/src/connection/generator.js +12 -1
  5. package/src/connection/generator.js.map +1 -1
  6. package/src/connection/supported-connections.d.ts +10 -1
  7. package/src/connection/supported-connections.js +13 -0
  8. package/src/connection/supported-connections.js.map +1 -1
  9. package/src/infra/app/__snapshots__/generator.spec.ts.snap +6 -6
  10. package/src/open-api/ts-client/__snapshots__/generator.complex-types.spec.ts.snap +12 -12
  11. package/src/open-api/ts-client/__snapshots__/generator.composite-types.spec.ts.snap +74 -10
  12. package/src/open-api/ts-client/__snapshots__/generator.content-type.spec.ts.snap +22 -4
  13. package/src/open-api/ts-client/__snapshots__/generator.duplicate-types.spec.ts.snap +53 -8
  14. package/src/open-api/ts-client/__snapshots__/generator.edge-cases.spec.ts.snap +32 -4
  15. package/src/open-api/ts-client/__snapshots__/generator.fast-api-gaps.spec.ts.snap +736 -0
  16. package/src/open-api/ts-client/__snapshots__/generator.fast-api.spec.ts.snap +86 -11
  17. package/src/open-api/ts-client/__snapshots__/generator.multipart.spec.ts.snap +21 -3
  18. package/src/open-api/ts-client/__snapshots__/generator.primitive-types.spec.ts.snap +2 -2
  19. package/src/open-api/ts-client/__snapshots__/generator.request.spec.ts.snap +6 -6
  20. package/src/open-api/ts-client/__snapshots__/generator.reserved-keywords.spec.ts.snap +2 -2
  21. package/src/open-api/ts-client/__snapshots__/generator.spec-compliance.spec.ts.snap +1883 -0
  22. package/src/open-api/ts-client/__snapshots__/generator.tags.spec.ts.snap +4 -4
  23. package/src/open-api/ts-client/files/client.gen.ts.template +195 -12
  24. package/src/open-api/ts-client/files/types.gen.ts.template +2 -0
  25. package/src/open-api/ts-client/generator.js +22 -1
  26. package/src/open-api/ts-client/generator.js.map +1 -1
  27. package/src/open-api/utils/codegen-data/languages.js +6 -0
  28. package/src/open-api/utils/codegen-data/languages.js.map +1 -1
  29. package/src/open-api/utils/codegen-data/types.d.ts +16 -1
  30. package/src/open-api/utils/codegen-data/types.js.map +1 -1
  31. package/src/open-api/utils/codegen-data.js +71 -0
  32. package/src/open-api/utils/codegen-data.js.map +1 -1
  33. package/src/open-api/utils/normalise.js +53 -8
  34. package/src/open-api/utils/normalise.js.map +1 -1
  35. package/src/open-api/utils/parser.js +48 -15
  36. package/src/open-api/utils/parser.js.map +1 -1
  37. package/src/preset/__snapshots__/generator.spec.ts.snap +4 -2
  38. package/src/py/agent/__snapshots__/generator.frameworks.spec.ts.snap +1 -1
  39. package/src/py/rdb/__snapshots__/generator.spec.ts.snap +2038 -0
  40. package/src/py/rdb/agent-connection/__snapshots__/generator.spec.ts.snap +104 -0
  41. package/src/py/rdb/agent-connection/generator.d.ts +10 -0
  42. package/src/py/rdb/agent-connection/generator.js +46 -0
  43. package/src/py/rdb/agent-connection/generator.js.map +1 -0
  44. package/src/py/rdb/agent-connection/schema.d.js +8 -0
  45. package/src/py/rdb/agent-connection/schema.d.js.map +1 -0
  46. package/src/py/rdb/agent-connection/schema.d.ts +15 -0
  47. package/src/py/rdb/agent-connection/schema.json +27 -0
  48. package/src/py/rdb/fast-api-connection/__snapshots__/generator.spec.ts.snap +44 -0
  49. package/src/py/rdb/fast-api-connection/files/__apiModuleName__/dependencies/__rdbNameSnake__.py.template +14 -0
  50. package/src/py/rdb/fast-api-connection/generator.d.ts +10 -0
  51. package/src/py/rdb/fast-api-connection/generator.js +54 -0
  52. package/src/py/rdb/fast-api-connection/generator.js.map +1 -0
  53. package/src/py/rdb/fast-api-connection/schema.d.js +8 -0
  54. package/src/py/rdb/fast-api-connection/schema.d.js.map +1 -0
  55. package/src/py/rdb/fast-api-connection/schema.d.ts +13 -0
  56. package/src/py/rdb/fast-api-connection/schema.json +23 -0
  57. package/src/py/rdb/files/Dockerfile.create-db-user.template +10 -0
  58. package/src/py/rdb/files/Dockerfile.migration.template +10 -0
  59. package/src/py/rdb/files/__name__/__init__.py.template +3 -0
  60. package/src/py/rdb/files/__name__/connection.py.template +55 -0
  61. package/src/py/rdb/files/__name__/create_db_user_handler.py.template +97 -0
  62. package/src/py/rdb/files/__name__/migration_handler.py.template +36 -0
  63. package/src/py/rdb/files/__name__/models/__init__.py.template +3 -0
  64. package/src/py/rdb/files/__name__/models/example.py.template +8 -0
  65. package/src/py/rdb/files/__name__/utils.py.template +104 -0
  66. package/src/py/rdb/files/alembic.ini.template +38 -0
  67. package/src/py/rdb/files/config.json.template +14 -0
  68. package/src/py/rdb/files/migrations/env.py.template +80 -0
  69. package/src/py/rdb/files/migrations/script.py.mako.template +28 -0
  70. package/src/py/rdb/generator.d.ts +6 -0
  71. package/src/py/rdb/generator.js +263 -0
  72. package/src/py/rdb/generator.js.map +1 -0
  73. package/src/py/rdb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +101 -0
  74. package/src/py/rdb/mcp-server-connection/generator.d.ts +10 -0
  75. package/src/py/rdb/mcp-server-connection/generator.js +46 -0
  76. package/src/py/rdb/mcp-server-connection/generator.js.map +1 -0
  77. package/src/py/rdb/mcp-server-connection/schema.d.js +8 -0
  78. package/src/py/rdb/mcp-server-connection/schema.d.js.map +1 -0
  79. package/src/py/rdb/mcp-server-connection/schema.d.ts +15 -0
  80. package/src/py/rdb/mcp-server-connection/schema.json +27 -0
  81. package/src/py/rdb/schema.d.js +6 -0
  82. package/src/py/rdb/schema.d.js.map +1 -0
  83. package/src/py/rdb/schema.d.ts +16 -0
  84. package/src/py/rdb/schema.json +77 -0
  85. package/src/py/rdb/utils.d.ts +6 -0
  86. package/src/py/rdb/utils.js +16 -0
  87. package/src/py/rdb/utils.js.map +1 -0
  88. package/src/sdk/py.d.ts +2 -0
  89. package/src/sdk/py.js +1 -0
  90. package/src/sdk/py.js.map +1 -1
  91. package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +145 -173
  92. package/src/ts/rdb/generator.js +4 -3
  93. package/src/ts/rdb/generator.js.map +1 -1
  94. package/src/ts/rdb/schema.json +1 -1
  95. package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +16 -16
  96. package/src/utils/rdb-constructs/files/cdk/app/dbs/__nameKebabCase__.ts.template +58 -14
  97. package/src/utils/rdb-constructs/files/cdk/core/rdb/aurora.ts.template +68 -78
  98. package/src/utils/rdb-constructs/files/terraform/app/dbs/__nameKebabCase__/__nameKebabCase__.tf.template +88 -8
  99. package/src/utils/rdb-constructs/files/terraform/core/rdb/aurora/aurora.tf.template +5 -32
  100. package/src/utils/rdb-constructs/rdb-constructs.d.ts +11 -1
  101. package/src/utils/rdb-constructs/rdb-constructs.js.map +1 -1
  102. package/src/utils/shared-constructs.js +9 -21
  103. package/src/utils/shared-constructs.js.map +1 -1
  104. package/src/utils/shared-rdb-scripts.js +5 -1
  105. package/src/utils/shared-rdb-scripts.js.map +1 -1
  106. package/src/utils/versions.d.ts +34 -30
  107. package/src/utils/versions.js +34 -30
  108. package/src/utils/versions.js.map +1 -1
  109. package/src/utils/files/terraform/scripts/reset-runtime-config.ts.template +0 -25
@@ -3297,7 +3297,7 @@ SOFTWARE.
3297
3297
 
3298
3298
  ---
3299
3299
 
3300
- The following software may be included in this product: @emnapi/core (1.11.0)
3300
+ The following software may be included in this product: @emnapi/core (1.11.1)
3301
3301
  This software contains the following license and notice below:
3302
3302
 
3303
3303
  MIT License
@@ -3351,7 +3351,7 @@ SOFTWARE.
3351
3351
 
3352
3352
  ---
3353
3353
 
3354
- The following software may be included in this product: @emnapi/runtime (1.11.0)
3354
+ The following software may be included in this product: @emnapi/runtime (1.11.1)
3355
3355
  This software contains the following license and notice below:
3356
3356
 
3357
3357
  MIT License
@@ -4964,7 +4964,7 @@ SOFTWARE.
4964
4964
 
4965
4965
  ---
4966
4966
 
4967
- The following software may be included in this product: @nx/devkit (23.0.1)
4967
+ The following software may be included in this product: @nx/devkit (23.0.2)
4968
4968
  This software contains the following license and notice below:
4969
4969
 
4970
4970
  MIT License
@@ -4988,7 +4988,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
4988
4988
 
4989
4989
  ---
4990
4990
 
4991
- The following software may be included in this product: @nx/eslint (23.0.1)
4991
+ The following software may be included in this product: @nx/eslint (23.0.2)
4992
4992
  This software contains the following license and notice below:
4993
4993
 
4994
4994
  MIT License
@@ -5012,7 +5012,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
5012
5012
 
5013
5013
  ---
5014
5014
 
5015
- The following software may be included in this product: @nx/js (23.0.1)
5015
+ The following software may be included in this product: @nx/js (23.0.2)
5016
5016
  This software contains the following license and notice below:
5017
5017
 
5018
5018
  MIT License
@@ -5036,7 +5036,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
5036
5036
 
5037
5037
  ---
5038
5038
 
5039
- The following software may be included in this product: @nx/module-federation (23.0.1)
5039
+ The following software may be included in this product: @nx/module-federation (23.0.2)
5040
5040
  This software contains the following license and notice below:
5041
5041
 
5042
5042
  MIT License
@@ -5060,7 +5060,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
5060
5060
 
5061
5061
  ---
5062
5062
 
5063
- The following software may be included in this product: @nx/nx-linux-x64-gnu (23.0.1)
5063
+ The following software may be included in this product: @nx/nx-linux-x64-gnu (23.0.2)
5064
5064
  This software contains the following license and notice below:
5065
5065
 
5066
5066
  (The MIT License)
@@ -5088,7 +5088,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5088
5088
 
5089
5089
  ---
5090
5090
 
5091
- The following software may be included in this product: @nx/playwright (23.0.1)
5091
+ The following software may be included in this product: @nx/playwright (23.0.2)
5092
5092
  This software contains the following license and notice below:
5093
5093
 
5094
5094
  MIT License
@@ -5112,7 +5112,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
5112
5112
 
5113
5113
  ---
5114
5114
 
5115
- The following software may be included in this product: @nx/react (23.0.1)
5115
+ The following software may be included in this product: @nx/react (23.0.2)
5116
5116
  This software contains the following license and notice below:
5117
5117
 
5118
5118
  MIT License
@@ -5136,7 +5136,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
5136
5136
 
5137
5137
  ---
5138
5138
 
5139
- The following software may be included in this product: @nx/rollup (23.0.1)
5139
+ The following software may be included in this product: @nx/rollup (23.0.2)
5140
5140
  This software contains the following license and notice below:
5141
5141
 
5142
5142
  MIT License
@@ -5160,7 +5160,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
5160
5160
 
5161
5161
  ---
5162
5162
 
5163
- The following software may be included in this product: @nx/vite (23.0.1)
5163
+ The following software may be included in this product: @nx/vite (23.0.2)
5164
5164
  This software contains the following license and notice below:
5165
5165
 
5166
5166
  MIT License
@@ -5184,7 +5184,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
5184
5184
 
5185
5185
  ---
5186
5186
 
5187
- The following software may be included in this product: @nx/vitest (23.0.1)
5187
+ The following software may be included in this product: @nx/vitest (23.0.2)
5188
5188
  This software contains the following license and notice below:
5189
5189
 
5190
5190
  MIT License
@@ -5208,7 +5208,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
5208
5208
 
5209
5209
  ---
5210
5210
 
5211
- The following software may be included in this product: @nx/web (23.0.1)
5211
+ The following software may be included in this product: @nx/web (23.0.2)
5212
5212
  This software contains the following license and notice below:
5213
5213
 
5214
5214
  MIT License
@@ -5232,7 +5232,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
5232
5232
 
5233
5233
  ---
5234
5234
 
5235
- The following software may be included in this product: @nx/workspace (23.0.1)
5235
+ The following software may be included in this product: @nx/workspace (23.0.2)
5236
5236
  This software contains the following license and notice below:
5237
5237
 
5238
5238
  MIT License
@@ -9439,6 +9439,19 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
9439
9439
 
9440
9440
  ---
9441
9441
 
9442
+ The following software may be included in this product: axios (1.16.1)
9443
+ This software contains the following license and notice below:
9444
+
9445
+ # Copyright (c) 2014-present Matt Zabriskie & Collaborators
9446
+
9447
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9448
+
9449
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9450
+
9451
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9452
+
9453
+ ---
9454
+
9442
9455
  The following software may be included in this product: babel-plugin-const-enum (1.2.0)
9443
9456
  This software contains the following license and notice below:
9444
9457
 
@@ -21040,7 +21053,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
21040
21053
 
21041
21054
  ---
21042
21055
 
21043
- The following software may be included in this product: nx (23.0.1)
21056
+ The following software may be included in this product: nx (23.0.2)
21044
21057
  This software contains the following license and notice below:
21045
21058
 
21046
21059
  (The MIT License)
@@ -22260,32 +22273,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22260
22273
 
22261
22274
  ---
22262
22275
 
22263
- The following software may be included in this product: postcss (8.5.15)
22264
- This software contains the following license and notice below:
22265
-
22266
- The MIT License (MIT)
22267
-
22268
- Copyright 2013 Andrey Sitnik <andrey@sitnik.es>
22269
-
22270
- Permission is hereby granted, free of charge, to any person obtaining a copy of
22271
- this software and associated documentation files (the "Software"), to deal in
22272
- the Software without restriction, including without limitation the rights to
22273
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
22274
- the Software, and to permit persons to whom the Software is furnished to do so,
22275
- subject to the following conditions:
22276
-
22277
- The above copyright notice and this permission notice shall be included in all
22278
- copies or substantial portions of the Software.
22279
-
22280
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22281
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
22282
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22283
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22284
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22285
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22286
-
22287
- ---
22288
-
22289
22276
  The following software may be included in this product: postcss (8.5.16)
22290
22277
  This software contains the following license and notice below:
22291
22278
 
package/generators.json CHANGED
@@ -448,6 +448,33 @@
448
448
  "description": "Connect a py#mcp-server to a py#dynamodb project",
449
449
  "metric": "g55",
450
450
  "hidden": true
451
+ },
452
+ "py#rdb": {
453
+ "factory": "./src/py/rdb/generator",
454
+ "schema": "./src/py/rdb/schema.json",
455
+ "description": "Create a Python relational database project",
456
+ "metric": "g56"
457
+ },
458
+ "py#rdb#fast-api-connection": {
459
+ "factory": "./src/py/rdb/fast-api-connection/generator",
460
+ "schema": "./src/py/rdb/fast-api-connection/schema.json",
461
+ "description": "Connect a py#fast-api project to a py#rdb project",
462
+ "metric": "g57",
463
+ "hidden": true
464
+ },
465
+ "py#rdb#agent-connection": {
466
+ "factory": "./src/py/rdb/agent-connection/generator",
467
+ "schema": "./src/py/rdb/agent-connection/schema.json",
468
+ "description": "Connect a py#agent to a py#rdb project",
469
+ "metric": "g58",
470
+ "hidden": true
471
+ },
472
+ "py#rdb#mcp-server-connection": {
473
+ "factory": "./src/py/rdb/mcp-server-connection/generator",
474
+ "schema": "./src/py/rdb/mcp-server-connection/schema.json",
475
+ "description": "Connect a py#mcp-server to a py#rdb project",
476
+ "metric": "g59",
477
+ "hidden": true
451
478
  }
452
479
  }
453
480
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/nx-plugin",
3
- "version": "1.0.0-rc.33",
3
+ "version": "1.0.0-rc.34",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/awslabs/nx-plugin-for-aws.git",
@@ -36,7 +36,7 @@
36
36
  "node": ">=20.19.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "nx": "23.0.1"
39
+ "nx": "23.0.2"
40
40
  },
41
41
  "dependencies": {
42
42
  "@apidevtools/swagger-parser": "12.1.0",
@@ -45,10 +45,10 @@
45
45
  "@getgrit/gritql": "0.0.3",
46
46
  "@iarna/toml": "2.2.5",
47
47
  "@modelcontextprotocol/sdk": "1.29.0",
48
- "@nx/devkit": "23.0.1",
49
- "@nx/js": "23.0.1",
50
- "@nx/react": "23.0.1",
51
- "@nx/vite": "23.0.1",
48
+ "@nx/devkit": "23.0.2",
49
+ "@nx/js": "23.0.2",
50
+ "@nx/react": "23.0.2",
51
+ "@nx/vite": "23.0.2",
52
52
  "@types/estree": "1.0.9",
53
53
  "@types/js-yaml": "4.0.9",
54
54
  "@types/mdast": "4.0.4",
@@ -13,6 +13,10 @@ import pyDynamoDBAgentConnectionGenerator from "../py/dynamodb/agent-connection/
13
13
  import pyDynamoDBFastApiConnectionGenerator from "../py/dynamodb/fast-api-connection/generator.js";
14
14
  import { PY_DYNAMODB_GENERATOR_INFO } from "../py/dynamodb/generator.js";
15
15
  import pyDynamoDBMcpServerConnectionGenerator from "../py/dynamodb/mcp-server-connection/generator.js";
16
+ import pyRdbAgentConnectionGenerator from "../py/rdb/agent-connection/generator.js";
17
+ import pyRdbFastApiConnectionGenerator from "../py/rdb/fast-api-connection/generator.js";
18
+ import { PY_RDB_GENERATOR_INFO } from "../py/rdb/generator.js";
19
+ import pyRdbMcpServerConnectionGenerator from "../py/rdb/mcp-server-connection/generator.js";
16
20
  import fastApiReactGenerator from "../py/fast-api/react/generator.js";
17
21
  import { SMITHY_PROJECT_GENERATOR_INFO } from "../smithy/project/generator.js";
18
22
  import smithyReactConnectionGenerator from "../smithy/react-connection/generator.js";
@@ -81,7 +85,10 @@ const CONNECTION_GENERATORS = {
81
85
  'agentcore-gateway -> agentcore-gateway': (tree, options)=>agentcoreGatewayGatewayConnectionGenerator(tree, options),
82
86
  'py#fast-api -> py#dynamodb': (tree, options)=>pyDynamoDBFastApiConnectionGenerator(tree, options),
83
87
  'py#agent -> py#dynamodb': (tree, options)=>pyDynamoDBAgentConnectionGenerator(tree, options),
84
- 'py#mcp-server -> py#dynamodb': (tree, options)=>pyDynamoDBMcpServerConnectionGenerator(tree, options)
88
+ 'py#mcp-server -> py#dynamodb': (tree, options)=>pyDynamoDBMcpServerConnectionGenerator(tree, options),
89
+ 'py#fast-api -> py#rdb': (tree, options)=>pyRdbFastApiConnectionGenerator(tree, options),
90
+ 'py#agent -> py#rdb': (tree, options)=>pyRdbAgentConnectionGenerator(tree, options),
91
+ 'py#mcp-server -> py#rdb': (tree, options)=>pyRdbMcpServerConnectionGenerator(tree, options)
85
92
  };
86
93
  /**
87
94
  * Generator for a connection between two projects
@@ -229,6 +236,9 @@ const CONNECTION_GENERATORS = {
229
236
  if (isPyDynamoDB(projectConfiguration)) {
230
237
  return 'py#dynamodb';
231
238
  }
239
+ if (isPyRdb(projectConfiguration)) {
240
+ return 'py#rdb';
241
+ }
232
242
  if (isAgentCoreGateway(projectConfiguration)) {
233
243
  return 'agentcore-gateway';
234
244
  }
@@ -287,6 +297,7 @@ const isSmithyApi = (_tree, projectConfiguration)=>{
287
297
  const isRdb = (projectConfiguration)=>(projectConfiguration.metadata ?? {}).generator === TS_RDB_GENERATOR_INFO.id;
288
298
  const isTsDynamoDB = (projectConfiguration)=>(projectConfiguration.metadata ?? {}).generator === TS_DYNAMODB_GENERATOR_INFO.id;
289
299
  const isPyDynamoDB = (projectConfiguration)=>(projectConfiguration.metadata ?? {}).generator === PY_DYNAMODB_GENERATOR_INFO.id;
300
+ const isPyRdb = (projectConfiguration)=>(projectConfiguration.metadata ?? {}).generator === PY_RDB_GENERATOR_INFO.id;
290
301
  const isAgentCoreGateway = (projectConfiguration)=>(projectConfiguration.metadata ?? {}).generator === AGENTCORE_GATEWAY_GENERATOR_INFO.id;
291
302
  export default connectionGenerator;
292
303
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../packages/nx-plugin/src/connection/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n joinPathFragments,\n type ProjectConfiguration,\n type Tree,\n} from '@nx/devkit';\nimport agentcoreGatewayGatewayConnectionGenerator from '../agentcore-gateway/gateway-connection/generator';\nimport { AGENTCORE_GATEWAY_GENERATOR_INFO } from '../agentcore-gateway/generator';\nimport agentcoreGatewayMcpConnectionGenerator from '../agentcore-gateway/mcp-connection/generator';\nimport pyAgentA2aConnectionGenerator from '../py/agent/a2a-connection/generator';\nimport pyAgentGatewayConnectionGenerator from '../py/agent/gateway-connection/generator';\nimport pyAgentMcpConnectionGenerator from '../py/agent/mcp-connection/generator';\nimport pyAgentReactConnectionGenerator from '../py/agent/react-connection/generator';\nimport pyDynamoDBAgentConnectionGenerator from '../py/dynamodb/agent-connection/generator';\nimport pyDynamoDBFastApiConnectionGenerator from '../py/dynamodb/fast-api-connection/generator';\nimport { PY_DYNAMODB_GENERATOR_INFO } from '../py/dynamodb/generator';\nimport pyDynamoDBMcpServerConnectionGenerator from '../py/dynamodb/mcp-server-connection/generator';\nimport fastApiReactGenerator from '../py/fast-api/react/generator';\nimport { SMITHY_PROJECT_GENERATOR_INFO } from '../smithy/project/generator';\nimport smithyReactConnectionGenerator from '../smithy/react-connection/generator';\nimport { TS_SMITHY_API_GENERATOR_INFO } from '../smithy/ts/api/generator';\nimport trpcReactGenerator from '../trpc/react/generator';\nimport tsAgentA2aConnectionGenerator from '../ts/agent/a2a-connection/generator';\nimport tsAgentGatewayConnectionGenerator from '../ts/agent/gateway-connection/generator';\nimport tsAgentMcpConnectionGenerator from '../ts/agent/mcp-connection/generator';\nimport tsAgentReactConnectionGenerator from '../ts/agent/react-connection/generator';\nimport tsDynamoDBAgentConnectionGenerator from '../ts/dynamodb/agent-connection/generator';\nimport { TS_DYNAMODB_GENERATOR_INFO } from '../ts/dynamodb/generator';\nimport tsDynamoDBMcpServerConnectionGenerator from '../ts/dynamodb/mcp-server-connection/generator';\nimport tsDynamoDBSmithyConnectionGenerator from '../ts/dynamodb/smithy-connection/generator';\nimport tsDynamoDBTrpcConnectionGenerator from '../ts/dynamodb/trpc-connection/generator';\nimport tsRdbAgentConnectionGenerator from '../ts/rdb/agent-connection/generator';\nimport { TS_RDB_GENERATOR_INFO } from '../ts/rdb/generator';\nimport tsRdbMcpServerConnectionGenerator from '../ts/rdb/mcp-server-connection/generator';\nimport tsRdbSmithyConnectionGenerator from '../ts/rdb/smithy-connection/generator';\nimport tsRdbTrpcConnectionGenerator from '../ts/rdb/trpc-connection/generator';\nimport { hasExportDeclaration } from '../utils/ast';\nimport {\n type ComponentMetadata,\n readProjectConfigurationUnqualified,\n} from '../utils/nx';\nimport { readToml } from '../utils/toml';\nimport type { ConnectionGeneratorSchema } from './schema';\nimport {\n type Connection,\n type ConnectionKey,\n SUPPORTED_CONNECTIONS,\n type SUPPORTED_PROJECT_TYPES,\n} from './supported-connections';\n\nexport type { Connection };\n\ntype ProjectType = (typeof SUPPORTED_PROJECT_TYPES)[number];\n\n/**\n * Sentinel value for sourceComponent/targetComponent that means\n * \"use the project-level connection, not a component\".\n */\nexport const PROJECT_COMPONENT_SENTINEL = '.';\n\n/**\n * The result of resolving a connection, including the matched connection\n * and any resolved source/target component metadata.\n */\nexport interface ResolvedConnection {\n readonly connection: Connection;\n readonly sourceComponent?: ComponentMetadata;\n readonly targetComponent?: ComponentMetadata;\n}\n\n/**\n * Generators for each connection type\n */\n/**\n * Options passed to connection generators, including resolved component metadata.\n */\nexport interface ResolvedConnectionOptions {\n sourceProject: string;\n targetProject: string;\n sourceComponent?: ComponentMetadata;\n targetComponent?: ComponentMetadata;\n preferInstallDependencies?: boolean;\n}\n\nconst CONNECTION_GENERATORS = {\n 'ts#trpc-api -> ts#rdb': (tree, options) =>\n tsRdbTrpcConnectionGenerator(tree, options),\n 'ts#agent -> ts#rdb': (tree, options) =>\n tsRdbAgentConnectionGenerator(tree, options),\n 'ts#smithy-api -> ts#rdb': (tree, options) =>\n tsRdbSmithyConnectionGenerator(tree, options),\n 'ts#mcp-server -> ts#rdb': (tree, options) =>\n tsRdbMcpServerConnectionGenerator(tree, options),\n 'ts#trpc-api -> ts#dynamodb': (tree, options) =>\n tsDynamoDBTrpcConnectionGenerator(tree, options),\n 'ts#agent -> ts#dynamodb': (tree, options) =>\n tsDynamoDBAgentConnectionGenerator(tree, options),\n 'ts#smithy-api -> ts#dynamodb': (tree, options) =>\n tsDynamoDBSmithyConnectionGenerator(tree, options),\n 'ts#mcp-server -> ts#dynamodb': (tree, options) =>\n tsDynamoDBMcpServerConnectionGenerator(tree, options),\n 'ts#react-website -> ts#trpc-api': (tree, options) =>\n trpcReactGenerator(tree, {\n frontendProjectName: options.sourceProject,\n backendProjectName: options.targetProject,\n preferInstallDependencies: options.preferInstallDependencies,\n }),\n 'ts#react-website -> py#fast-api': (tree, options) =>\n fastApiReactGenerator(tree, {\n frontendProjectName: options.sourceProject,\n fastApiProjectName: options.targetProject,\n preferInstallDependencies: options.preferInstallDependencies,\n }),\n 'ts#react-website -> ts#smithy-api': (tree, options) =>\n smithyReactConnectionGenerator(tree, {\n frontendProjectName: options.sourceProject,\n smithyModelOrBackendProjectName: options.targetProject,\n preferInstallDependencies: options.preferInstallDependencies,\n }),\n 'ts#react-website -> ts#agent': (tree, options) =>\n tsAgentReactConnectionGenerator(tree, options),\n 'ts#react-website -> py#agent': (tree, options) =>\n pyAgentReactConnectionGenerator(tree, options),\n 'ts#agent -> ts#mcp-server': (tree, options) =>\n tsAgentMcpConnectionGenerator(tree, options),\n 'ts#agent -> py#mcp-server': (tree, options) =>\n tsAgentMcpConnectionGenerator(tree, options),\n 'py#agent -> ts#mcp-server': (tree, options) =>\n pyAgentMcpConnectionGenerator(tree, options),\n 'py#agent -> py#mcp-server': (tree, options) =>\n pyAgentMcpConnectionGenerator(tree, options),\n 'ts#agent -> ts#agent': (tree, options) =>\n tsAgentA2aConnectionGenerator(tree, options),\n 'ts#agent -> py#agent': (tree, options) =>\n tsAgentA2aConnectionGenerator(tree, options),\n 'py#agent -> ts#agent': (tree, options) =>\n pyAgentA2aConnectionGenerator(tree, options),\n 'py#agent -> py#agent': (tree, options) =>\n pyAgentA2aConnectionGenerator(tree, options),\n 'ts#agent -> agentcore-gateway': (tree, options) =>\n tsAgentGatewayConnectionGenerator(tree, options),\n 'py#agent -> agentcore-gateway': (tree, options) =>\n pyAgentGatewayConnectionGenerator(tree, options),\n 'agentcore-gateway -> ts#mcp-server': (tree, options) =>\n agentcoreGatewayMcpConnectionGenerator(tree, options),\n 'agentcore-gateway -> py#mcp-server': (tree, options) =>\n agentcoreGatewayMcpConnectionGenerator(tree, options),\n 'agentcore-gateway -> agentcore-gateway': (tree, options) =>\n agentcoreGatewayGatewayConnectionGenerator(tree, options),\n 'py#fast-api -> py#dynamodb': (tree, options) =>\n pyDynamoDBFastApiConnectionGenerator(tree, options),\n 'py#agent -> py#dynamodb': (tree, options) =>\n pyDynamoDBAgentConnectionGenerator(tree, options),\n 'py#mcp-server -> py#dynamodb': (tree, options) =>\n pyDynamoDBMcpServerConnectionGenerator(tree, options),\n} satisfies Record<\n ConnectionKey,\n (tree: Tree, options: ResolvedConnectionOptions) => Promise<any>\n>;\n\n/**\n * Generator for a connection between two projects\n */\nexport const connectionGenerator = async (\n tree: Tree,\n options: ConnectionGeneratorSchema,\n) => {\n const resolved = await resolveConnection(tree, options);\n\n const connectionKey =\n `${resolved.connection.source} -> ${resolved.connection.target}` as ConnectionKey;\n\n return await CONNECTION_GENERATORS[connectionKey](tree, {\n sourceProject: options.sourceProject,\n targetProject: options.targetProject,\n sourceComponent: resolved.sourceComponent,\n targetComponent: resolved.targetComponent,\n preferInstallDependencies: options.preferInstallDependencies,\n });\n};\n\n/**\n * Find a component in project metadata matching the given reference.\n * Checks by name first, then by path, then by generator.\n */\nexport const findComponentInMetadata = (\n projectConfiguration: ProjectConfiguration,\n componentRef: string,\n): ComponentMetadata | undefined => {\n const components: ComponentMetadata[] =\n (projectConfiguration.metadata as any)?.components ?? [];\n\n return (\n components.find((c) => c.name === componentRef) ??\n components.find((c) => c.path === componentRef) ??\n components.find((c) => c.generator === componentRef)\n );\n};\n\n/**\n * Represents a candidate source or target for a connection, which may be\n * the project itself or a specific component within the project.\n */\ninterface ConnectionCandidate {\n readonly type: string;\n readonly component?: ComponentMetadata;\n}\n\n/**\n * A matched connection between source and target candidates.\n */\ninterface ConnectionMatch {\n readonly connection: Connection;\n readonly sourceComponent?: ComponentMetadata;\n readonly targetComponent?: ComponentMetadata;\n}\n\n/**\n * Gather all connection candidates for a project configuration. This includes:\n * - The project-level type (if it's a supported type)\n * - Each component's generator id as a candidate type\n */\nconst gatherCandidates = async (\n tree: Tree,\n projectConfig: ProjectConfiguration,\n): Promise<ConnectionCandidate[]> => {\n const type = await determineProjectTypeFromConfig(tree, projectConfig);\n const components: ComponentMetadata[] =\n (projectConfig.metadata as any)?.components ?? [];\n\n return [\n ...(type ? [{ type: type }] : []),\n ...components.map((component) => ({\n type: component.generator,\n component,\n })),\n ];\n};\n\n/**\n * Validate that a specified component exists in the project metadata.\n * Skips validation for undefined refs and the project sentinel '.'.\n */\nconst validateComponent = (\n componentRef: string | undefined,\n projectConfig: ProjectConfiguration,\n side: 'source' | 'target',\n) => {\n if (!componentRef || componentRef === PROJECT_COMPONENT_SENTINEL) return;\n const found = findComponentInMetadata(projectConfig, componentRef);\n if (!found) {\n const components: ComponentMetadata[] =\n (projectConfig.metadata as any)?.components ?? [];\n throw new Error(\n `Component '${componentRef}' not found in ${side} project ${projectConfig.name}. ` +\n `Available components: ${components.length > 0 ? components.map((c) => c.name ?? c.generator).join(', ') : 'none'}`,\n );\n }\n};\n\n/**\n * Narrow candidates based on the user's specified component reference.\n */\nconst filterConnectionCandidatesForComponentReference = (\n componentRef: string | undefined,\n projectConfig: ProjectConfiguration,\n candidates: ConnectionCandidate[],\n supportedConnections: readonly Connection[],\n side: 'source' | 'target',\n): ConnectionCandidate[] => {\n if (!componentRef) return candidates;\n if (componentRef === PROJECT_COMPONENT_SENTINEL) {\n return candidates.filter((c) => !c.component);\n }\n const component = findComponentInMetadata(projectConfig, componentRef);\n if (!component) return candidates;\n const isConnectionParticipant = supportedConnections.some(\n (c) => c[side] === component.generator,\n );\n if (!isConnectionParticipant) return candidates;\n // Filter to the specific matched component, not all components with the same generator\n return candidates.filter((c) => c.component === component);\n};\n\n/**\n * Resolve the connection to use, considering source/target projects and components.\n */\nexport const resolveConnection = async (\n tree: Tree,\n options: ConnectionGeneratorSchema,\n supportedConnections: readonly Connection[] = SUPPORTED_CONNECTIONS,\n): Promise<ResolvedConnection> => {\n const sourceConfig = readProjectConfigurationUnqualified(\n tree,\n options.sourceProject,\n );\n const targetConfig = readProjectConfigurationUnqualified(\n tree,\n options.targetProject,\n );\n\n // Validate explicitly specified components exist\n validateComponent(options.sourceComponent, sourceConfig, 'source');\n validateComponent(options.targetComponent, targetConfig, 'target');\n\n // Gather and narrow candidates\n const sourceCandidates = filterConnectionCandidatesForComponentReference(\n options.sourceComponent,\n sourceConfig,\n await gatherCandidates(tree, sourceConfig),\n supportedConnections,\n 'source',\n );\n const targetCandidates = filterConnectionCandidatesForComponentReference(\n options.targetComponent,\n targetConfig,\n await gatherCandidates(tree, targetConfig),\n supportedConnections,\n 'target',\n );\n\n // Cross-product candidates and find supported connections\n const matches: ConnectionMatch[] = [];\n for (const source of sourceCandidates) {\n for (const target of targetCandidates) {\n const match = supportedConnections.find(\n (c) => c.source === source.type && c.target === target.type,\n );\n if (match) {\n matches.push({\n connection: match,\n sourceComponent: source.component,\n targetComponent: target.component,\n });\n }\n }\n }\n\n if (matches.length === 0) {\n const sourceTypes = [...new Set(sourceCandidates.map((c) => c.type))];\n const targetTypes = [...new Set(targetCandidates.map((c) => c.type))];\n throw new Error(\n `This generator does not support a connection from ${options.sourceProject}${sourceTypes.length > 0 ? ` (${sourceTypes.join(', ')})` : ''} to ${options.targetProject}${targetTypes.length > 0 ? ` (${targetTypes.join(', ')})` : ''}`,\n );\n }\n\n if (matches.length > 1) {\n const connectionDescriptions = matches\n .map((m) => {\n const sourceName = m.sourceComponent?.name;\n const targetName = m.targetComponent?.name;\n const sourceLabel = sourceName\n ? `${sourceName} (${m.connection.source})`\n : m.connection.source;\n const targetLabel = targetName\n ? `${targetName} (${m.connection.target})`\n : m.connection.target;\n return `${sourceLabel} -> ${targetLabel}`;\n })\n .join(', ');\n throw new Error(\n `Ambiguous connection from ${options.sourceProject} to ${options.targetProject}. ` +\n `Multiple supported connections found: ${connectionDescriptions}. ` +\n `Please specify sourceComponent and/or targetComponent to disambiguate.`,\n );\n }\n\n return {\n connection: matches[0].connection,\n sourceComponent: matches[0].sourceComponent,\n targetComponent: matches[0].targetComponent,\n };\n};\n\n/**\n * Determine whether the given project is of a known project type\n */\nexport const determineProjectType = async (\n tree: Tree,\n projectName: string,\n): Promise<ProjectType | undefined> => {\n const projectConfiguration = readProjectConfigurationUnqualified(\n tree,\n projectName,\n );\n return await determineProjectTypeFromConfig(tree, projectConfiguration);\n};\n\n/**\n * Determine whether the given project configuration is of a known project type\n */\nconst determineProjectTypeFromConfig = async (\n tree: Tree,\n projectConfiguration: ProjectConfiguration,\n): Promise<ProjectType | undefined> => {\n // NB: if adding new checks, ensure these go from most to least specific\n // eg. react website is more specific than typescript project\n\n if (await isTrpcApi(tree, projectConfiguration)) {\n return 'ts#trpc-api';\n }\n\n if (isFastApi(tree, projectConfiguration)) {\n return 'py#fast-api';\n }\n\n if (isSmithyApi(tree, projectConfiguration)) {\n return 'ts#smithy-api';\n }\n\n if (isReact(tree, projectConfiguration)) {\n return 'ts#react-website';\n }\n\n if (isRdb(projectConfiguration)) {\n return 'ts#rdb';\n }\n\n if (isTsDynamoDB(projectConfiguration)) {\n return 'ts#dynamodb';\n }\n\n if (isPyDynamoDB(projectConfiguration)) {\n return 'py#dynamodb';\n }\n\n if (isAgentCoreGateway(projectConfiguration)) {\n return 'agentcore-gateway';\n }\n\n return undefined;\n};\n\nconst sourceRoot = (projectConfiguration: ProjectConfiguration) =>\n projectConfiguration.sourceRoot ??\n joinPathFragments(projectConfiguration.root, 'src');\n\nconst isTrpcApi = async (\n tree: Tree,\n projectConfiguration: ProjectConfiguration,\n): Promise<boolean> => {\n // If the project.json says it's a trpc api, there's no need for introspection\n if ((projectConfiguration.metadata as any)?.apiType === 'trpc') {\n return true;\n }\n\n // Find the src/index.ts\n const indexTs = tree.read(\n joinPathFragments(sourceRoot(projectConfiguration), 'index.ts'),\n 'utf-8',\n );\n if (indexTs === null) {\n return false;\n }\n\n // If the index file exports an AppRouter, it's a trpc api\n if (await hasExportDeclaration(tree, indexTs, 'AppRouter')) {\n return true;\n }\n\n // If there's a src/router.ts or src/lambdas/router.ts which exports an AppRouter, it's a trpc api\n const trpcRouter =\n tree.read(\n joinPathFragments(sourceRoot(projectConfiguration), 'router.ts'),\n 'utf-8',\n ) ??\n tree.read(\n joinPathFragments(\n sourceRoot(projectConfiguration),\n 'lambdas',\n 'router.ts',\n ),\n 'utf-8',\n );\n\n if (trpcRouter === null) {\n return false;\n }\n\n if (await hasExportDeclaration(tree, trpcRouter, 'AppRouter')) {\n return true;\n }\n\n return false;\n};\n\nconst isReact = (\n tree: Tree,\n projectConfiguration: ProjectConfiguration,\n): boolean => {\n // if there's a main.tsx, it's a react app\n return tree.exists(\n joinPathFragments(sourceRoot(projectConfiguration), 'main.tsx'),\n );\n};\n\nconst isFastApi = (\n tree: Tree,\n projectConfiguration: ProjectConfiguration,\n): boolean => {\n // If the project.json says it's a fast api, there's no need for introspection\n if ((projectConfiguration.metadata as any)?.apiType === 'fast-api') {\n return true;\n }\n\n const pyProjectPath = joinPathFragments(\n projectConfiguration.root,\n 'pyproject.toml',\n );\n if (tree.exists(pyProjectPath)) {\n const pyProject = readToml(tree, pyProjectPath);\n if (((pyProject as any)?.project?.dependencies ?? []).includes('fastapi')) {\n return true;\n }\n }\n\n return false;\n};\n\nconst isSmithyApi = (\n _tree: Tree,\n projectConfiguration: ProjectConfiguration,\n): boolean => {\n // Support selecting either the smithy model or backend project\n return [\n SMITHY_PROJECT_GENERATOR_INFO.id,\n TS_SMITHY_API_GENERATOR_INFO.id,\n ].includes(((projectConfiguration.metadata as any) ?? {}).generator);\n};\n\nconst isRdb = (projectConfiguration: ProjectConfiguration): boolean =>\n ((projectConfiguration.metadata as any) ?? {}).generator ===\n TS_RDB_GENERATOR_INFO.id;\n\nconst isTsDynamoDB = (projectConfiguration: ProjectConfiguration): boolean =>\n ((projectConfiguration.metadata as any) ?? {}).generator ===\n TS_DYNAMODB_GENERATOR_INFO.id;\n\nconst isPyDynamoDB = (projectConfiguration: ProjectConfiguration): boolean =>\n ((projectConfiguration.metadata as any) ?? {}).generator ===\n PY_DYNAMODB_GENERATOR_INFO.id;\n\nconst isAgentCoreGateway = (\n projectConfiguration: ProjectConfiguration,\n): boolean =>\n ((projectConfiguration.metadata as any) ?? {}).generator ===\n AGENTCORE_GATEWAY_GENERATOR_INFO.id;\n\nexport default connectionGenerator;\n"],"names":["joinPathFragments","agentcoreGatewayGatewayConnectionGenerator","AGENTCORE_GATEWAY_GENERATOR_INFO","agentcoreGatewayMcpConnectionGenerator","pyAgentA2aConnectionGenerator","pyAgentGatewayConnectionGenerator","pyAgentMcpConnectionGenerator","pyAgentReactConnectionGenerator","pyDynamoDBAgentConnectionGenerator","pyDynamoDBFastApiConnectionGenerator","PY_DYNAMODB_GENERATOR_INFO","pyDynamoDBMcpServerConnectionGenerator","fastApiReactGenerator","SMITHY_PROJECT_GENERATOR_INFO","smithyReactConnectionGenerator","TS_SMITHY_API_GENERATOR_INFO","trpcReactGenerator","tsAgentA2aConnectionGenerator","tsAgentGatewayConnectionGenerator","tsAgentMcpConnectionGenerator","tsAgentReactConnectionGenerator","tsDynamoDBAgentConnectionGenerator","TS_DYNAMODB_GENERATOR_INFO","tsDynamoDBMcpServerConnectionGenerator","tsDynamoDBSmithyConnectionGenerator","tsDynamoDBTrpcConnectionGenerator","tsRdbAgentConnectionGenerator","TS_RDB_GENERATOR_INFO","tsRdbMcpServerConnectionGenerator","tsRdbSmithyConnectionGenerator","tsRdbTrpcConnectionGenerator","hasExportDeclaration","readProjectConfigurationUnqualified","readToml","SUPPORTED_CONNECTIONS","PROJECT_COMPONENT_SENTINEL","CONNECTION_GENERATORS","tree","options","frontendProjectName","sourceProject","backendProjectName","targetProject","preferInstallDependencies","fastApiProjectName","smithyModelOrBackendProjectName","connectionGenerator","resolved","resolveConnection","connectionKey","connection","source","target","sourceComponent","targetComponent","findComponentInMetadata","projectConfiguration","componentRef","components","metadata","find","c","name","path","generator","gatherCandidates","projectConfig","type","determineProjectTypeFromConfig","map","component","validateComponent","side","found","Error","length","join","filterConnectionCandidatesForComponentReference","candidates","supportedConnections","filter","isConnectionParticipant","some","sourceConfig","targetConfig","sourceCandidates","targetCandidates","matches","match","push","sourceTypes","Set","targetTypes","connectionDescriptions","m","sourceName","targetName","sourceLabel","targetLabel","determineProjectType","projectName","isTrpcApi","isFastApi","isSmithyApi","isReact","isRdb","isTsDynamoDB","isPyDynamoDB","isAgentCoreGateway","undefined","sourceRoot","root","apiType","indexTs","read","trpcRouter","ex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,qBAAqBG,QAAQ,IAAY,CAAC,CAAA,EAAGK,SAAS,KACxD1C,2BAA2BqG,EAAE;AAE/B,MAAMhB,eAAe,CAACnD,uBACpB,AAAC,CAAA,AAACA,qBAAqBG,QAAQ,IAAY,CAAC,CAAA,EAAGK,SAAS,KACxDtD,2BAA2BiH,EAAE;AAE/B,MAAMf,qBAAqB,CACzBpD,uBAEA,AAAC,CAAA,AAACA,qBAAqBG,QAAQ,IAAY,CAAC,CAAA,EAAGK,SAAS,KACxD9D,iCAAiCyH,EAAE;AAErC,eAAe7E,oBAAoB"}
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/connection/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n joinPathFragments,\n type ProjectConfiguration,\n type Tree,\n} from '@nx/devkit';\nimport agentcoreGatewayGatewayConnectionGenerator from '../agentcore-gateway/gateway-connection/generator';\nimport { AGENTCORE_GATEWAY_GENERATOR_INFO } from '../agentcore-gateway/generator';\nimport agentcoreGatewayMcpConnectionGenerator from '../agentcore-gateway/mcp-connection/generator';\nimport pyAgentA2aConnectionGenerator from '../py/agent/a2a-connection/generator';\nimport pyAgentGatewayConnectionGenerator from '../py/agent/gateway-connection/generator';\nimport pyAgentMcpConnectionGenerator from '../py/agent/mcp-connection/generator';\nimport pyAgentReactConnectionGenerator from '../py/agent/react-connection/generator';\nimport pyDynamoDBAgentConnectionGenerator from '../py/dynamodb/agent-connection/generator';\nimport pyDynamoDBFastApiConnectionGenerator from '../py/dynamodb/fast-api-connection/generator';\nimport { PY_DYNAMODB_GENERATOR_INFO } from '../py/dynamodb/generator';\nimport pyDynamoDBMcpServerConnectionGenerator from '../py/dynamodb/mcp-server-connection/generator';\nimport pyRdbAgentConnectionGenerator from '../py/rdb/agent-connection/generator';\nimport pyRdbFastApiConnectionGenerator from '../py/rdb/fast-api-connection/generator';\nimport { PY_RDB_GENERATOR_INFO } from '../py/rdb/generator';\nimport pyRdbMcpServerConnectionGenerator from '../py/rdb/mcp-server-connection/generator';\nimport fastApiReactGenerator from '../py/fast-api/react/generator';\nimport { SMITHY_PROJECT_GENERATOR_INFO } from '../smithy/project/generator';\nimport smithyReactConnectionGenerator from '../smithy/react-connection/generator';\nimport { TS_SMITHY_API_GENERATOR_INFO } from '../smithy/ts/api/generator';\nimport trpcReactGenerator from '../trpc/react/generator';\nimport tsAgentA2aConnectionGenerator from '../ts/agent/a2a-connection/generator';\nimport tsAgentGatewayConnectionGenerator from '../ts/agent/gateway-connection/generator';\nimport tsAgentMcpConnectionGenerator from '../ts/agent/mcp-connection/generator';\nimport tsAgentReactConnectionGenerator from '../ts/agent/react-connection/generator';\nimport tsDynamoDBAgentConnectionGenerator from '../ts/dynamodb/agent-connection/generator';\nimport { TS_DYNAMODB_GENERATOR_INFO } from '../ts/dynamodb/generator';\nimport tsDynamoDBMcpServerConnectionGenerator from '../ts/dynamodb/mcp-server-connection/generator';\nimport tsDynamoDBSmithyConnectionGenerator from '../ts/dynamodb/smithy-connection/generator';\nimport tsDynamoDBTrpcConnectionGenerator from '../ts/dynamodb/trpc-connection/generator';\nimport tsRdbAgentConnectionGenerator from '../ts/rdb/agent-connection/generator';\nimport { TS_RDB_GENERATOR_INFO } from '../ts/rdb/generator';\nimport tsRdbMcpServerConnectionGenerator from '../ts/rdb/mcp-server-connection/generator';\nimport tsRdbSmithyConnectionGenerator from '../ts/rdb/smithy-connection/generator';\nimport tsRdbTrpcConnectionGenerator from '../ts/rdb/trpc-connection/generator';\nimport { hasExportDeclaration } from '../utils/ast';\nimport {\n type ComponentMetadata,\n readProjectConfigurationUnqualified,\n} from '../utils/nx';\nimport { readToml } from '../utils/toml';\nimport type { ConnectionGeneratorSchema } from './schema';\nimport {\n type Connection,\n type ConnectionKey,\n SUPPORTED_CONNECTIONS,\n type SUPPORTED_PROJECT_TYPES,\n} from './supported-connections';\n\nexport type { Connection };\n\ntype ProjectType = (typeof SUPPORTED_PROJECT_TYPES)[number];\n\n/**\n * Sentinel value for sourceComponent/targetComponent that means\n * \"use the project-level connection, not a component\".\n */\nexport const PROJECT_COMPONENT_SENTINEL = '.';\n\n/**\n * The result of resolving a connection, including the matched connection\n * and any resolved source/target component metadata.\n */\nexport interface ResolvedConnection {\n readonly connection: Connection;\n readonly sourceComponent?: ComponentMetadata;\n readonly targetComponent?: ComponentMetadata;\n}\n\n/**\n * Generators for each connection type\n */\n/**\n * Options passed to connection generators, including resolved component metadata.\n */\nexport interface ResolvedConnectionOptions {\n sourceProject: string;\n targetProject: string;\n sourceComponent?: ComponentMetadata;\n targetComponent?: ComponentMetadata;\n preferInstallDependencies?: boolean;\n}\n\nconst CONNECTION_GENERATORS = {\n 'ts#trpc-api -> ts#rdb': (tree, options) =>\n tsRdbTrpcConnectionGenerator(tree, options),\n 'ts#agent -> ts#rdb': (tree, options) =>\n tsRdbAgentConnectionGenerator(tree, options),\n 'ts#smithy-api -> ts#rdb': (tree, options) =>\n tsRdbSmithyConnectionGenerator(tree, options),\n 'ts#mcp-server -> ts#rdb': (tree, options) =>\n tsRdbMcpServerConnectionGenerator(tree, options),\n 'ts#trpc-api -> ts#dynamodb': (tree, options) =>\n tsDynamoDBTrpcConnectionGenerator(tree, options),\n 'ts#agent -> ts#dynamodb': (tree, options) =>\n tsDynamoDBAgentConnectionGenerator(tree, options),\n 'ts#smithy-api -> ts#dynamodb': (tree, options) =>\n tsDynamoDBSmithyConnectionGenerator(tree, options),\n 'ts#mcp-server -> ts#dynamodb': (tree, options) =>\n tsDynamoDBMcpServerConnectionGenerator(tree, options),\n 'ts#react-website -> ts#trpc-api': (tree, options) =>\n trpcReactGenerator(tree, {\n frontendProjectName: options.sourceProject,\n backendProjectName: options.targetProject,\n preferInstallDependencies: options.preferInstallDependencies,\n }),\n 'ts#react-website -> py#fast-api': (tree, options) =>\n fastApiReactGenerator(tree, {\n frontendProjectName: options.sourceProject,\n fastApiProjectName: options.targetProject,\n preferInstallDependencies: options.preferInstallDependencies,\n }),\n 'ts#react-website -> ts#smithy-api': (tree, options) =>\n smithyReactConnectionGenerator(tree, {\n frontendProjectName: options.sourceProject,\n smithyModelOrBackendProjectName: options.targetProject,\n preferInstallDependencies: options.preferInstallDependencies,\n }),\n 'ts#react-website -> ts#agent': (tree, options) =>\n tsAgentReactConnectionGenerator(tree, options),\n 'ts#react-website -> py#agent': (tree, options) =>\n pyAgentReactConnectionGenerator(tree, options),\n 'ts#agent -> ts#mcp-server': (tree, options) =>\n tsAgentMcpConnectionGenerator(tree, options),\n 'ts#agent -> py#mcp-server': (tree, options) =>\n tsAgentMcpConnectionGenerator(tree, options),\n 'py#agent -> ts#mcp-server': (tree, options) =>\n pyAgentMcpConnectionGenerator(tree, options),\n 'py#agent -> py#mcp-server': (tree, options) =>\n pyAgentMcpConnectionGenerator(tree, options),\n 'ts#agent -> ts#agent': (tree, options) =>\n tsAgentA2aConnectionGenerator(tree, options),\n 'ts#agent -> py#agent': (tree, options) =>\n tsAgentA2aConnectionGenerator(tree, options),\n 'py#agent -> ts#agent': (tree, options) =>\n pyAgentA2aConnectionGenerator(tree, options),\n 'py#agent -> py#agent': (tree, options) =>\n pyAgentA2aConnectionGenerator(tree, options),\n 'ts#agent -> agentcore-gateway': (tree, options) =>\n tsAgentGatewayConnectionGenerator(tree, options),\n 'py#agent -> agentcore-gateway': (tree, options) =>\n pyAgentGatewayConnectionGenerator(tree, options),\n 'agentcore-gateway -> ts#mcp-server': (tree, options) =>\n agentcoreGatewayMcpConnectionGenerator(tree, options),\n 'agentcore-gateway -> py#mcp-server': (tree, options) =>\n agentcoreGatewayMcpConnectionGenerator(tree, options),\n 'agentcore-gateway -> agentcore-gateway': (tree, options) =>\n agentcoreGatewayGatewayConnectionGenerator(tree, options),\n 'py#fast-api -> py#dynamodb': (tree, options) =>\n pyDynamoDBFastApiConnectionGenerator(tree, options),\n 'py#agent -> py#dynamodb': (tree, options) =>\n pyDynamoDBAgentConnectionGenerator(tree, options),\n 'py#mcp-server -> py#dynamodb': (tree, options) =>\n pyDynamoDBMcpServerConnectionGenerator(tree, options),\n 'py#fast-api -> py#rdb': (tree, options) =>\n pyRdbFastApiConnectionGenerator(tree, options),\n 'py#agent -> py#rdb': (tree, options) =>\n pyRdbAgentConnectionGenerator(tree, options),\n 'py#mcp-server -> py#rdb': (tree, options) =>\n pyRdbMcpServerConnectionGenerator(tree, options),\n} satisfies Record<\n ConnectionKey,\n (tree: Tree, options: ResolvedConnectionOptions) => Promise<any>\n>;\n\n/**\n * Generator for a connection between two projects\n */\nexport const connectionGenerator = async (\n tree: Tree,\n options: ConnectionGeneratorSchema,\n) => {\n const resolved = await resolveConnection(tree, options);\n\n const connectionKey =\n `${resolved.connection.source} -> ${resolved.connection.target}` as ConnectionKey;\n\n return await CONNECTION_GENERATORS[connectionKey](tree, {\n sourceProject: options.sourceProject,\n targetProject: options.targetProject,\n sourceComponent: resolved.sourceComponent,\n targetComponent: resolved.targetComponent,\n preferInstallDependencies: options.preferInstallDependencies,\n });\n};\n\n/**\n * Find a component in project metadata matching the given reference.\n * Checks by name first, then by path, then by generator.\n */\nexport const findComponentInMetadata = (\n projectConfiguration: ProjectConfiguration,\n componentRef: string,\n): ComponentMetadata | undefined => {\n const components: ComponentMetadata[] =\n (projectConfiguration.metadata as any)?.components ?? [];\n\n return (\n components.find((c) => c.name === componentRef) ??\n components.find((c) => c.path === componentRef) ??\n components.find((c) => c.generator === componentRef)\n );\n};\n\n/**\n * Represents a candidate source or target for a connection, which may be\n * the project itself or a specific component within the project.\n */\ninterface ConnectionCandidate {\n readonly type: string;\n readonly component?: ComponentMetadata;\n}\n\n/**\n * A matched connection between source and target candidates.\n */\ninterface ConnectionMatch {\n readonly connection: Connection;\n readonly sourceComponent?: ComponentMetadata;\n readonly targetComponent?: ComponentMetadata;\n}\n\n/**\n * Gather all connection candidates for a project configuration. This includes:\n * - The project-level type (if it's a supported type)\n * - Each component's generator id as a candidate type\n */\nconst gatherCandidates = async (\n tree: Tree,\n projectConfig: ProjectConfiguration,\n): Promise<ConnectionCandidate[]> => {\n const type = await determineProjectTypeFromConfig(tree, projectConfig);\n const components: ComponentMetadata[] =\n (projectConfig.metadata as any)?.components ?? [];\n\n return [\n ...(type ? [{ type: type }] : []),\n ...components.map((component) => ({\n type: component.generator,\n component,\n })),\n ];\n};\n\n/**\n * Validate that a specified component exists in the project metadata.\n * Skips validation for undefined refs and the project sentinel '.'.\n */\nconst validateComponent = (\n componentRef: string | undefined,\n projectConfig: ProjectConfiguration,\n side: 'source' | 'target',\n) => {\n if (!componentRef || componentRef === PROJECT_COMPONENT_SENTINEL) return;\n const found = findComponentInMetadata(projectConfig, componentRef);\n if (!found) {\n const components: ComponentMetadata[] =\n (projectConfig.metadata as any)?.components ?? [];\n throw new Error(\n `Component '${componentRef}' not found in ${side} project ${projectConfig.name}. ` +\n `Available components: ${components.length > 0 ? components.map((c) => c.name ?? c.generator).join(', ') : 'none'}`,\n );\n }\n};\n\n/**\n * Narrow candidates based on the user's specified component reference.\n */\nconst filterConnectionCandidatesForComponentReference = (\n componentRef: string | undefined,\n projectConfig: ProjectConfiguration,\n candidates: ConnectionCandidate[],\n supportedConnections: readonly Connection[],\n side: 'source' | 'target',\n): ConnectionCandidate[] => {\n if (!componentRef) return candidates;\n if (componentRef === PROJECT_COMPONENT_SENTINEL) {\n return candidates.filter((c) => !c.component);\n }\n const component = findComponentInMetadata(projectConfig, componentRef);\n if (!component) return candidates;\n const isConnectionParticipant = supportedConnections.some(\n (c) => c[side] === component.generator,\n );\n if (!isConnectionParticipant) return candidates;\n // Filter to the specific matched component, not all components with the same generator\n return candidates.filter((c) => c.component === component);\n};\n\n/**\n * Resolve the connection to use, considering source/target projects and components.\n */\nexport const resolveConnection = async (\n tree: Tree,\n options: ConnectionGeneratorSchema,\n supportedConnections: readonly Connection[] = SUPPORTED_CONNECTIONS,\n): Promise<ResolvedConnection> => {\n const sourceConfig = readProjectConfigurationUnqualified(\n tree,\n options.sourceProject,\n );\n const targetConfig = readProjectConfigurationUnqualified(\n tree,\n options.targetProject,\n );\n\n // Validate explicitly specified components exist\n validateComponent(options.sourceComponent, sourceConfig, 'source');\n validateComponent(options.targetComponent, targetConfig, 'target');\n\n // Gather and narrow candidates\n const sourceCandidates = filterConnectionCandidatesForComponentReference(\n options.sourceComponent,\n sourceConfig,\n await gatherCandidates(tree, sourceConfig),\n supportedConnections,\n 'source',\n );\n const targetCandidates = filterConnectionCandidatesForComponentReference(\n options.targetComponent,\n targetConfig,\n await gatherCandidates(tree, targetConfig),\n supportedConnections,\n 'target',\n );\n\n // Cross-product candidates and find supported connections\n const matches: ConnectionMatch[] = [];\n for (const source of sourceCandidates) {\n for (const target of targetCandidates) {\n const match = supportedConnections.find(\n (c) => c.source === source.type && c.target === target.type,\n );\n if (match) {\n matches.push({\n connection: match,\n sourceComponent: source.component,\n targetComponent: target.component,\n });\n }\n }\n }\n\n if (matches.length === 0) {\n const sourceTypes = [...new Set(sourceCandidates.map((c) => c.type))];\n const targetTypes = [...new Set(targetCandidates.map((c) => c.type))];\n throw new Error(\n `This generator does not support a connection from ${options.sourceProject}${sourceTypes.length > 0 ? ` (${sourceTypes.join(', ')})` : ''} to ${options.targetProject}${targetTypes.length > 0 ? ` (${targetTypes.join(', ')})` : ''}`,\n );\n }\n\n if (matches.length > 1) {\n const connectionDescriptions = matches\n .map((m) => {\n const sourceName = m.sourceComponent?.name;\n const targetName = m.targetComponent?.name;\n const sourceLabel = sourceName\n ? `${sourceName} (${m.connection.source})`\n : m.connection.source;\n const targetLabel = targetName\n ? `${targetName} (${m.connection.target})`\n : m.connection.target;\n return `${sourceLabel} -> ${targetLabel}`;\n })\n .join(', ');\n throw new Error(\n `Ambiguous connection from ${options.sourceProject} to ${options.targetProject}. ` +\n `Multiple supported connections found: ${connectionDescriptions}. ` +\n `Please specify sourceComponent and/or targetComponent to disambiguate.`,\n );\n }\n\n return {\n connection: matches[0].connection,\n sourceComponent: matches[0].sourceComponent,\n targetComponent: matches[0].targetComponent,\n };\n};\n\n/**\n * Determine whether the given project is of a known project type\n */\nexport const determineProjectType = async (\n tree: Tree,\n projectName: string,\n): Promise<ProjectType | undefined> => {\n const projectConfiguration = readProjectConfigurationUnqualified(\n tree,\n projectName,\n );\n return await determineProjectTypeFromConfig(tree, projectConfiguration);\n};\n\n/**\n * Determine whether the given project configuration is of a known project type\n */\nconst determineProjectTypeFromConfig = async (\n tree: Tree,\n projectConfiguration: ProjectConfiguration,\n): Promise<ProjectType | undefined> => {\n // NB: if adding new checks, ensure these go from most to least specific\n // eg. react website is more specific than typescript project\n\n if (await isTrpcApi(tree, projectConfiguration)) {\n return 'ts#trpc-api';\n }\n\n if (isFastApi(tree, projectConfiguration)) {\n return 'py#fast-api';\n }\n\n if (isSmithyApi(tree, projectConfiguration)) {\n return 'ts#smithy-api';\n }\n\n if (isReact(tree, projectConfiguration)) {\n return 'ts#react-website';\n }\n\n if (isRdb(projectConfiguration)) {\n return 'ts#rdb';\n }\n\n if (isTsDynamoDB(projectConfiguration)) {\n return 'ts#dynamodb';\n }\n\n if (isPyDynamoDB(projectConfiguration)) {\n return 'py#dynamodb';\n }\n\n if (isPyRdb(projectConfiguration)) {\n return 'py#rdb';\n }\n\n if (isAgentCoreGateway(projectConfiguration)) {\n return 'agentcore-gateway';\n }\n\n return undefined;\n};\n\nconst sourceRoot = (projectConfiguration: ProjectConfiguration) =>\n projectConfiguration.sourceRoot ??\n joinPathFragments(projectConfiguration.root, 'src');\n\nconst isTrpcApi = async (\n tree: Tree,\n projectConfiguration: ProjectConfiguration,\n): Promise<boolean> => {\n // If the project.json says it's a trpc api, there's no need for introspection\n if ((projectConfiguration.metadata as any)?.apiType === 'trpc') {\n return true;\n }\n\n // Find the src/index.ts\n const indexTs = tree.read(\n joinPathFragments(sourceRoot(projectConfiguration), 'index.ts'),\n 'utf-8',\n );\n if (indexTs === null) {\n return false;\n }\n\n // If the index file exports an AppRouter, it's a trpc api\n if (await hasExportDeclaration(tree, indexTs, 'AppRouter')) {\n return true;\n }\n\n // If there's a src/router.ts or src/lambdas/router.ts which exports an AppRouter, it's a trpc api\n const trpcRouter =\n tree.read(\n joinPathFragments(sourceRoot(projectConfiguration), 'router.ts'),\n 'utf-8',\n ) ??\n tree.read(\n joinPathFragments(\n sourceRoot(projectConfiguration),\n 'lambdas',\n 'router.ts',\n ),\n 'utf-8',\n );\n\n if (trpcRouter === null) {\n return false;\n }\n\n if (await hasExportDeclaration(tree, trpcRouter, 'AppRouter')) {\n return true;\n }\n\n return false;\n};\n\nconst isReact = (\n tree: Tree,\n projectConfiguration: ProjectConfiguration,\n): boolean => {\n // if there's a main.tsx, it's a react app\n return tree.exists(\n joinPathFragments(sourceRoot(projectConfiguration), 'main.tsx'),\n );\n};\n\nconst isFastApi = (\n tree: Tree,\n projectConfiguration: ProjectConfiguration,\n): boolean => {\n // If the project.json says it's a fast api, there's no need for introspection\n if ((projectConfiguration.metadata as any)?.apiType === 'fast-api') {\n return true;\n }\n\n const pyProjectPath = joinPathFragments(\n projectConfiguration.root,\n 'pyproject.toml',\n );\n if (tree.exists(pyProjectPath)) {\n const pyProject = readToml(tree, pyProjectPath);\n if (((pyProject as any)?.project?.dependencies ?? []).includes('fastapi')) {\n return true;\n }\n }\n\n return false;\n};\n\nconst isSmithyApi = (\n _tree: Tree,\n projectConfiguration: ProjectConfiguration,\n): boolean => {\n // Support selecting either the smithy model or backend project\n return [\n SMITHY_PROJECT_GENERATOR_INFO.id,\n TS_SMITHY_API_GENERATOR_INFO.id,\n ].includes(((projectConfiguration.metadata as any) ?? {}).generator);\n};\n\nconst isRdb = (projectConfiguration: ProjectConfiguration): boolean =>\n ((projectConfiguration.metadata as any) ?? {}).generator ===\n TS_RDB_GENERATOR_INFO.id;\n\nconst isTsDynamoDB = (projectConfiguration: ProjectConfiguration): boolean =>\n ((projectConfiguration.metadata as any) ?? {}).generator ===\n TS_DYNAMODB_GENERATOR_INFO.id;\n\nconst isPyDynamoDB = (projectConfiguration: ProjectConfiguration): boolean =>\n ((projectConfiguration.metadata as any) ?? {}).generator ===\n PY_DYNAMODB_GENERATOR_INFO.id;\n\nconst isPyRdb = (projectConfiguration: ProjectConfiguration): boolean =>\n ((projectConfiguration.metadata as any) ?? {}).generator ===\n PY_RDB_GENERATOR_INFO.id;\n\nconst isAgentCoreGateway = (\n projectConfiguration: ProjectConfiguration,\n): boolean =>\n ((projectConfiguration.metadata as any) ?? {}).generator ===\n AGENTCORE_GATEWAY_GENERATOR_INFO.id;\n\nexport default connectionGenerator;\n"],"names":["joinPathFragments","agentcoreGatewayGatewayConnectionGenerator","AGENTCORE_GATEWAY_GENERATOR_INFO","agentcoreGatewayMcpConnectionGenerator","pyAgentA2aConnectionGenerator","pyAgentGatewayConnectionGenerator","pyAgentMcpConnectionGenerator","pyAgentReactConnectionGenerator","pyDynamoDBAgentConnectionGenerator","pyDynamoDBFastApiConnectionGenerator","PY_DYNAMODB_GENERATOR_INFO","pyDynamoDBMcpServerConnectionGenerator","pyRdbAgentConnectionGenerator","pyRdbFastApiConnectionGenerator","PY_RDB_GENERATOR_INFO","pyRdbMcpServerConnectionGenerator","fastApiReactGenerator","SMITHY_PROJECT_GENERATOR_INFO","smithyReactConnectionGenerator","TS_SMITHY_API_GENERATOR_INFO","trpcReactGenerator","tsAgentA2aConnectionGenerator","tsAgentGatewayConnectionGenerator","tsAgentMcpConnectionGenerator","tsAgentReactConnectionGenerator","tsDynamoDBAgentConnectionGenerator","TS_DYNAMODB_GENERATOR_INFO","tsDynamoDBMcpServerConnectionGenerator","tsDynamoDBSmithyConnectionGenerator","tsDynamoDBTrpcConnectionGenerator","tsRdbAgentConnectionGenerator","TS_RDB_GENERATOR_INFO","tsRdbMcpServerConnectionGenerator","tsRdbSmithyConnectionGenerator","tsRdbTrpcConnectionGenerator","hasExportDeclaration","readProjectConfigurationUnqualified","readToml","SUPPORTED_CONNECTIONS","PROJECT_COMPONENT_SENTINEL","CONNECTION_GENERATORS","tree","options","frontendProjectName","sourceProject","backendProjectName","targetProject","preferInstallDependencies","fastApiProjectName","smithyModelOrBackendProjectName","connectionGenerator","resolved","resolveConnection","connectionKey","connection","source","target","sourceComponent","targetComponent","findComponentInMetadata","projectConfiguration","componentRef","components","metadata","find","c","name","path","generator","gatherCandidates","projectConfig","type","determineProjectTypeFromConfig","map","component","validateComponent","side","found","Error","length","join","filterConnectionCandidatesForComponentReference","candidates","supportedConnections","filter","isConnectionParticipant","some","sourceConfig","targetConfig","sourceCandidates","targetCandidates","matches","match","push","sourceTypes","Set","targetTypes","connectionDescriptions","m","sourceName","targetName","sourceLabel","targetLabel","determineProjectType","projectName","isTrpcApi","isFastApi","isSmithyApi","isReact","isRdb","isTsDynamoDB","isPyDynamoDB","isPyRdb","isAgentCoreGateway","undefined","sourceRoot","root","apiType","indexTs","read","trpcRouter","exists","pyProjectPath","pyProject","project","dependencies","includes","_tree","id"],"mappings":"AAAA;;;CAGC,GACD,SACEA,iBAAiB,QAGZ,aAAa;AACpB,OAAOC,gDAAgD,uDAAoD;AAC3G,SAASC,gCAAgC,QAAQ,oCAAiC;AAClF,OAAOC,4CAA4C,mDAAgD;AACnG,OAAOC,mCAAmC,0CAAuC;AACjF,OAAOC,uCAAuC,8CAA2C;AACzF,OAAOC,mCAAmC,0CAAuC;AACjF,OAAOC,qCAAqC,4CAAyC;AACrF,OAAOC,wCAAwC,+CAA4C;AAC3F,OAAOC,0CAA0C,kDAA+C;AAChG,SAASC,0BAA0B,QAAQ,8BAA2B;AACtE,OAAOC,4CAA4C,oDAAiD;AACpG,OAAOC,mCAAmC,0CAAuC;AACjF,OAAOC,qCAAqC,6CAA0C;AACtF,SAASC,qBAAqB,QAAQ,yBAAsB;AAC5D,OAAOC,uCAAuC,+CAA4C;AAC1F,OAAOC,2BAA2B,oCAAiC;AACnE,SAASC,6BAA6B,QAAQ,iCAA8B;AAC5E,OAAOC,oCAAoC,0CAAuC;AAClF,SAASC,4BAA4B,QAAQ,gCAA6B;AAC1E,OAAOC,wBAAwB,6BAA0B;AAC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AAqBG,QAAQ,IAAY,CAAC,CAAA,EAAGK,SAAS,KACxDlE,iCAAiC8H,EAAE;AAErC,eAAe9E,oBAAoB"}
@@ -6,7 +6,7 @@ export type Connection = {
6
6
  source: string;
7
7
  target: string;
8
8
  };
9
- export declare const SUPPORTED_PROJECT_TYPES: readonly ["ts#trpc-api", "py#fast-api", "ts#react-website", "ts#smithy-api", "ts#rdb", "ts#dynamodb", "py#dynamodb", "agentcore-gateway"];
9
+ export declare const SUPPORTED_PROJECT_TYPES: readonly ["ts#trpc-api", "py#fast-api", "ts#react-website", "ts#smithy-api", "ts#rdb", "py#rdb", "ts#dynamodb", "py#dynamodb", "agentcore-gateway"];
10
10
  export declare const SUPPORTED_CONNECTIONS: readonly [{
11
11
  readonly source: "ts#trpc-api";
12
12
  readonly target: "ts#rdb";
@@ -94,5 +94,14 @@ export declare const SUPPORTED_CONNECTIONS: readonly [{
94
94
  }, {
95
95
  readonly source: "py#mcp-server";
96
96
  readonly target: "py#dynamodb";
97
+ }, {
98
+ readonly source: "py#fast-api";
99
+ readonly target: "py#rdb";
100
+ }, {
101
+ readonly source: "py#agent";
102
+ readonly target: "py#rdb";
103
+ }, {
104
+ readonly source: "py#mcp-server";
105
+ readonly target: "py#rdb";
97
106
  }];
98
107
  export type ConnectionKey = (typeof SUPPORTED_CONNECTIONS)[number] extends infer C ? C extends Connection ? `${C['source']} -> ${C['target']}` : never : never;
@@ -9,6 +9,7 @@ export const SUPPORTED_PROJECT_TYPES = [
9
9
  'ts#react-website',
10
10
  'ts#smithy-api',
11
11
  'ts#rdb',
12
+ 'py#rdb',
12
13
  'ts#dynamodb',
13
14
  'py#dynamodb',
14
15
  'agentcore-gateway'
@@ -132,6 +133,18 @@ export const SUPPORTED_CONNECTIONS = [
132
133
  {
133
134
  source: 'py#mcp-server',
134
135
  target: 'py#dynamodb'
136
+ },
137
+ {
138
+ source: 'py#fast-api',
139
+ target: 'py#rdb'
140
+ },
141
+ {
142
+ source: 'py#agent',
143
+ target: 'py#rdb'
144
+ },
145
+ {
146
+ source: 'py#mcp-server',
147
+ target: 'py#rdb'
135
148
  }
136
149
  ];
137
150
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../packages/nx-plugin/src/connection/supported-connections.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport type Connection = { source: string; target: string };\n\n// Supported source/target project types: either project-level types (resolved\n// by introspection) or component generator ids (from component metadata).\nexport const SUPPORTED_PROJECT_TYPES = [\n 'ts#trpc-api',\n 'py#fast-api',\n 'ts#react-website',\n 'ts#smithy-api',\n 'ts#rdb',\n 'ts#dynamodb',\n 'py#dynamodb',\n 'agentcore-gateway',\n] as const;\n\n// The single source of truth for supported connections, in a dependency-free\n// module so the e2e connection matrix can import it without pulling in the\n// generator implementation graph.\nexport const SUPPORTED_CONNECTIONS = [\n { source: 'ts#trpc-api', target: 'ts#rdb' },\n { source: 'ts#trpc-api', target: 'ts#dynamodb' },\n { source: 'ts#agent', target: 'ts#rdb' },\n { source: 'ts#smithy-api', target: 'ts#rdb' },\n { source: 'ts#smithy-api', target: 'ts#dynamodb' },\n { source: 'ts#mcp-server', target: 'ts#rdb' },\n { source: 'ts#mcp-server', target: 'ts#dynamodb' },\n { source: 'ts#react-website', target: 'ts#trpc-api' },\n { source: 'ts#react-website', target: 'py#fast-api' },\n { source: 'ts#react-website', target: 'ts#smithy-api' },\n { source: 'ts#react-website', target: 'ts#agent' },\n { source: 'ts#react-website', target: 'py#agent' },\n { source: 'ts#agent', target: 'ts#mcp-server' },\n { source: 'ts#agent', target: 'py#mcp-server' },\n { source: 'ts#agent', target: 'ts#dynamodb' },\n { source: 'py#agent', target: 'ts#mcp-server' },\n { source: 'py#agent', target: 'py#mcp-server' },\n { source: 'ts#agent', target: 'ts#agent' },\n { source: 'ts#agent', target: 'py#agent' },\n { source: 'py#agent', target: 'ts#agent' },\n { source: 'py#agent', target: 'py#agent' },\n { source: 'ts#agent', target: 'agentcore-gateway' },\n { source: 'py#agent', target: 'agentcore-gateway' },\n { source: 'agentcore-gateway', target: 'ts#mcp-server' },\n { source: 'agentcore-gateway', target: 'py#mcp-server' },\n { source: 'agentcore-gateway', target: 'agentcore-gateway' },\n { source: 'py#fast-api', target: 'py#dynamodb' },\n { source: 'py#agent', target: 'py#dynamodb' },\n { source: 'py#mcp-server', target: 'py#dynamodb' },\n] as const satisfies readonly Connection[];\n\n// `<source> -> <target>` string union of every supported connection. Used to\n// key exhaustive maps so a new connection is a compile error until handled.\nexport type ConnectionKey =\n (typeof SUPPORTED_CONNECTIONS)[number] extends infer C\n ? C extends Connection\n ? `${C['source']} -> ${C['target']}`\n : never\n : never;\n"],"names":["SUPPORTED_PROJECT_TYPES","SUPPORTED_CONNECTIONS","source","target"],"mappings":"AAAA;;;CAGC,GAID,8EAA8E;AAC9E,0EAA0E;AAC1E,OAAO,MAAMA,0BAA0B;IACrC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAU;AAEX,6EAA6E;AAC7E,2EAA2E;AAC3E,kCAAkC;AAClC,OAAO,MAAMC,wBAAwB;IACnC;QAAEC,QAAQ;QAAeC,QAAQ;IAAS;IAC1C;QAAED,QAAQ;QAAeC,QAAQ;IAAc;IAC/C;QAAED,QAAQ;QAAYC,QAAQ;IAAS;IACvC;QAAED,QAAQ;QAAiBC,QAAQ;IAAS;IAC5C;QAAED,QAAQ;QAAiBC,QAAQ;IAAc;IACjD;QAAED,QAAQ;QAAiBC,QAAQ;IAAS;IAC5C;QAAED,QAAQ;QAAiBC,QAAQ;IAAc;IACjD;QAAED,QAAQ;QAAoBC,QAAQ;IAAc;IACpD;QAAED,QAAQ;QAAoBC,QAAQ;IAAc;IACpD;QAAED,QAAQ;QAAoBC,QAAQ;IAAgB;IACtD;QAAED,QAAQ;QAAoBC,QAAQ;IAAW;IACjD;QAAED,QAAQ;QAAoBC,QAAQ;IAAW;IACjD;QAAED,QAAQ;QAAYC,QAAQ;IAAgB;IAC9C;QAAED,QAAQ;QAAYC,QAAQ;IAAgB;IAC9C;QAAED,QAAQ;QAAYC,QAAQ;IAAc;IAC5C;QAAED,QAAQ;QAAYC,QAAQ;IAAgB;IAC9C;QAAED,QAAQ;QAAYC,QAAQ;IAAgB;IAC9C;QAAED,QAAQ;QAAYC,QAAQ;IAAW;IACzC;QAAED,QAAQ;QAAYC,QAAQ;IAAW;IACzC;QAAED,QAAQ;QAAYC,QAAQ;IAAW;IACzC;QAAED,QAAQ;QAAYC,QAAQ;IAAW;IACzC;QAAED,QAAQ;QAAYC,QAAQ;IAAoB;IAClD;QAAED,QAAQ;QAAYC,QAAQ;IAAoB;IAClD;QAAED,QAAQ;QAAqBC,QAAQ;IAAgB;IACvD;QAAED,QAAQ;QAAqBC,QAAQ;IAAgB;IACvD;QAAED,QAAQ;QAAqBC,QAAQ;IAAoB;IAC3D;QAAED,QAAQ;QAAeC,QAAQ;IAAc;IAC/C;QAAED,QAAQ;QAAYC,QAAQ;IAAc;IAC5C;QAAED,QAAQ;QAAiBC,QAAQ;IAAc;CAClD,CAA0C"}
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/connection/supported-connections.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport type Connection = { source: string; target: string };\n\n// Supported source/target project types: either project-level types (resolved\n// by introspection) or component generator ids (from component metadata).\nexport const SUPPORTED_PROJECT_TYPES = [\n 'ts#trpc-api',\n 'py#fast-api',\n 'ts#react-website',\n 'ts#smithy-api',\n 'ts#rdb',\n 'py#rdb',\n 'ts#dynamodb',\n 'py#dynamodb',\n 'agentcore-gateway',\n] as const;\n\n// The single source of truth for supported connections, in a dependency-free\n// module so the e2e connection matrix can import it without pulling in the\n// generator implementation graph.\nexport const SUPPORTED_CONNECTIONS = [\n { source: 'ts#trpc-api', target: 'ts#rdb' },\n { source: 'ts#trpc-api', target: 'ts#dynamodb' },\n { source: 'ts#agent', target: 'ts#rdb' },\n { source: 'ts#smithy-api', target: 'ts#rdb' },\n { source: 'ts#smithy-api', target: 'ts#dynamodb' },\n { source: 'ts#mcp-server', target: 'ts#rdb' },\n { source: 'ts#mcp-server', target: 'ts#dynamodb' },\n { source: 'ts#react-website', target: 'ts#trpc-api' },\n { source: 'ts#react-website', target: 'py#fast-api' },\n { source: 'ts#react-website', target: 'ts#smithy-api' },\n { source: 'ts#react-website', target: 'ts#agent' },\n { source: 'ts#react-website', target: 'py#agent' },\n { source: 'ts#agent', target: 'ts#mcp-server' },\n { source: 'ts#agent', target: 'py#mcp-server' },\n { source: 'ts#agent', target: 'ts#dynamodb' },\n { source: 'py#agent', target: 'ts#mcp-server' },\n { source: 'py#agent', target: 'py#mcp-server' },\n { source: 'ts#agent', target: 'ts#agent' },\n { source: 'ts#agent', target: 'py#agent' },\n { source: 'py#agent', target: 'ts#agent' },\n { source: 'py#agent', target: 'py#agent' },\n { source: 'ts#agent', target: 'agentcore-gateway' },\n { source: 'py#agent', target: 'agentcore-gateway' },\n { source: 'agentcore-gateway', target: 'ts#mcp-server' },\n { source: 'agentcore-gateway', target: 'py#mcp-server' },\n { source: 'agentcore-gateway', target: 'agentcore-gateway' },\n { source: 'py#fast-api', target: 'py#dynamodb' },\n { source: 'py#agent', target: 'py#dynamodb' },\n { source: 'py#mcp-server', target: 'py#dynamodb' },\n { source: 'py#fast-api', target: 'py#rdb' },\n { source: 'py#agent', target: 'py#rdb' },\n { source: 'py#mcp-server', target: 'py#rdb' },\n] as const satisfies readonly Connection[];\n\n// `<source> -> <target>` string union of every supported connection. Used to\n// key exhaustive maps so a new connection is a compile error until handled.\nexport type ConnectionKey =\n (typeof SUPPORTED_CONNECTIONS)[number] extends infer C\n ? C extends Connection\n ? `${C['source']} -> ${C['target']}`\n : never\n : never;\n"],"names":["SUPPORTED_PROJECT_TYPES","SUPPORTED_CONNECTIONS","source","target"],"mappings":"AAAA;;;CAGC,GAID,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AqBC,QAAQ;IAAoB;IAC3D;QAAED,QAAQ;QAAeC,QAAQ;IAAc;IAC/C;QAAED,QAAQ;QAAYC,QAAQ;IAAc;IAC5C;QAAED,QAAQ;QAAiBC,QAAQ;IAAc;IACjD;QAAED,QAAQ;QAAeC,QAAQ;IAAS;IAC1C;QAAED,QAAQ;QAAYC,QAAQ;IAAS;IACvC;QAAED,QAAQ;QAAiBC,QAAQ;IAAS;CAC7C,CAA0C"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  exports[`infra generator > should add required dependencies to package.json > dependencies 1`] = `
4
4
  {
5
- "aws-cdk": "2.1129.0",
5
+ "aws-cdk": "2.1130.0",
6
6
  "aws-cdk-lib": "2.261.0",
7
7
  "constructs": "10.6.0",
8
8
  "esbuild": "0.28.1",
@@ -12,8 +12,8 @@ exports[`infra generator > should add required dependencies to package.json > de
12
12
 
13
13
  exports[`infra generator > should add required dependencies to package.json > dev-dependencies 1`] = `
14
14
  {
15
- "@nx/js": "23.0.1",
16
- "@nx/vitest": "23.0.1",
15
+ "@nx/js": "23.0.2",
16
+ "@nx/vitest": "23.0.2",
17
17
  "@swc/helpers": "~0.5.18",
18
18
  "@types/node": "26.1.1",
19
19
  "@vitest/coverage-v8": "4.1.10",
@@ -28,15 +28,15 @@ exports[`infra generator > should add required dependencies to package.json > de
28
28
  exports[`infra generator > should add required dependencies to package.json > package-json 1`] = `
29
29
  {
30
30
  "dependencies": {
31
- "aws-cdk": "2.1129.0",
31
+ "aws-cdk": "2.1130.0",
32
32
  "aws-cdk-lib": "2.261.0",
33
33
  "constructs": "10.6.0",
34
34
  "esbuild": "0.28.1",
35
35
  "source-map-support": "0.5.21",
36
36
  },
37
37
  "devDependencies": {
38
- "@nx/js": "23.0.1",
39
- "@nx/vitest": "23.0.1",
38
+ "@nx/js": "23.0.2",
39
+ "@nx/vitest": "23.0.2",
40
40
  "@swc/helpers": "~0.5.18",
41
41
  "@types/node": "26.1.1",
42
42
  "@vitest/coverage-v8": "4.1.10",