@aws/nx-plugin 0.81.0 → 0.82.1

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 (60) hide show
  1. package/LICENSE-THIRD-PARTY +118 -79
  2. package/package.json +4 -4
  3. package/src/connection/generator.d.ts +32 -2
  4. package/src/connection/generator.js +125 -16
  5. package/src/connection/generator.js.map +1 -1
  6. package/src/connection/schema.d.ts +2 -0
  7. package/src/connection/schema.json +8 -0
  8. package/src/infra/app/__snapshots__/generator.spec.ts.snap +11 -11
  9. package/src/mcp-server/generator-info.d.ts +5 -1
  10. package/src/mcp-server/generator-info.js +52 -8
  11. package/src/mcp-server/generator-info.js.map +1 -1
  12. package/src/py/lambda-function/generator.js +2 -1
  13. package/src/py/lambda-function/generator.js.map +1 -1
  14. package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +1 -1
  15. package/src/py/mcp-server/generator.js +2 -1
  16. package/src/py/mcp-server/generator.js.map +1 -1
  17. package/src/py/strands-agent/__snapshots__/generator.spec.ts.snap +5 -5
  18. package/src/py/strands-agent/generator.js +2 -1
  19. package/src/py/strands-agent/generator.js.map +1 -1
  20. package/src/trpc/react/__snapshots__/generator.spec.ts.snap +2 -3
  21. package/src/trpc/react/generator.js +1 -2
  22. package/src/trpc/react/generator.js.map +1 -1
  23. package/src/ts/lambda-function/generator.js +1 -1
  24. package/src/ts/lambda-function/generator.js.map +1 -1
  25. package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +1 -1
  26. package/src/ts/mcp-server/generator.js +1 -1
  27. package/src/ts/mcp-server/generator.js.map +1 -1
  28. package/src/ts/nx-generator/generator.js +1 -1
  29. package/src/ts/nx-generator/generator.js.map +1 -1
  30. package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +28 -28
  31. package/src/ts/react-website/cognito-auth/generator.js +4 -2
  32. package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
  33. package/src/ts/react-website/runtime-config/generator.js +4 -2
  34. package/src/ts/react-website/runtime-config/generator.js.map +1 -1
  35. package/src/ts/strands-agent/__snapshots__/generator.spec.ts.snap +5 -4
  36. package/src/ts/strands-agent/files/app/router.ts.template +5 -4
  37. package/src/ts/strands-agent/generator.js +1 -1
  38. package/src/ts/strands-agent/generator.js.map +1 -1
  39. package/src/utils/connection/open-api/react.js +1 -2
  40. package/src/utils/connection/open-api/react.js.map +1 -1
  41. package/src/utils/files/common/shadcn/src/components/ui/alert.tsx.template +3 -3
  42. package/src/utils/files/common/shadcn/src/components/ui/breadcrumb.tsx.template +3 -3
  43. package/src/utils/files/common/shadcn/src/components/ui/button.tsx.template +4 -4
  44. package/src/utils/files/common/shadcn/src/components/ui/card.tsx.template +2 -2
  45. package/src/utils/files/common/shadcn/src/components/ui/input.tsx.template +3 -3
  46. package/src/utils/files/common/shadcn/src/components/ui/separator.tsx.template +1 -1
  47. package/src/utils/files/common/shadcn/src/components/ui/sheet.tsx.template +9 -9
  48. package/src/utils/files/common/shadcn/src/components/ui/sidebar.tsx.template +18 -18
  49. package/src/utils/files/common/shadcn/src/components/ui/skeleton.tsx.template +1 -1
  50. package/src/utils/files/common/shadcn/src/components/ui/tooltip.tsx.template +2 -2
  51. package/src/utils/files/website/hooks/sigv4/useSigV4.tsx.template +2 -3
  52. package/src/utils/nx.d.ts +10 -1
  53. package/src/utils/nx.js +3 -5
  54. package/src/utils/nx.js.map +1 -1
  55. package/src/utils/paths.d.ts +5 -1
  56. package/src/utils/paths.js +10 -1
  57. package/src/utils/paths.js.map +1 -1
  58. package/src/utils/versions.d.ts +40 -42
  59. package/src/utils/versions.js +39 -41
  60. package/src/utils/versions.js.map +1 -1
@@ -3218,12 +3218,12 @@ SOFTWARE.
3218
3218
 
3219
3219
  ---
3220
3220
 
3221
- The following software may be included in this product: @esbuild/darwin-arm64 (0.27.3)
3221
+ The following software may be included in this product: @esbuild/linux-x64 (0.27.3)
3222
3222
  This software contains the following license and notice below:
3223
3223
 
3224
3224
  MIT License
3225
3225
 
3226
- Copyright (c) The maintainers of @esbuild/darwin-arm64 <https://github.com/evanw/esbuild#readme>
3226
+ Copyright (c) The maintainers of @esbuild/linux-x64 <https://github.com/evanw/esbuild#readme>
3227
3227
 
3228
3228
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
3229
3229
  associated documentation files (the "Software"), to deal in the Software without restriction, including
@@ -3321,7 +3321,7 @@ THE SOFTWARE.
3321
3321
 
3322
3322
  ---
3323
3323
 
3324
- The following software may be included in this product: @eslint/js (9.39.2)
3324
+ The following software may be included in this product: @eslint/js (9.39.3)
3325
3325
  This software contains the following license and notice below:
3326
3326
 
3327
3327
  Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
@@ -3687,7 +3687,7 @@ THE SOFTWARE.
3687
3687
 
3688
3688
  ---
3689
3689
 
3690
- The following software may be included in this product: @modelcontextprotocol/sdk (1.27.0)
3690
+ The following software may be included in this product: @modelcontextprotocol/sdk (1.27.1)
3691
3691
  This software contains the following license and notice below:
3692
3692
 
3693
3693
  MIT License
@@ -4415,7 +4415,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4415
4415
 
4416
4416
  ---
4417
4417
 
4418
- The following software may be included in this product: @nx/nx-darwin-arm64 (22.5.3)
4418
+ The following software may be included in this product: @nx/nx-linux-x64-gnu (22.5.3)
4419
4419
  This software contains the following license and notice below:
4420
4420
 
4421
4421
  (The MIT License)
@@ -4611,7 +4611,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4611
4611
 
4612
4612
  ---
4613
4613
 
4614
- The following software may be included in this product: @nxlv/python (22.1.0)
4614
+ The following software may be included in this product: @nxlv/python (22.1.1)
4615
4615
  This software contains the following license and notice below:
4616
4616
 
4617
4617
  MIT License
@@ -5133,7 +5133,7 @@ THE SOFTWARE.
5133
5133
 
5134
5134
  ---
5135
5135
 
5136
- The following software may be included in this product: @rollup/rollup-darwin-arm64 (4.50.1)
5136
+ The following software may be included in this product: @rollup/rollup-linux-x64-gnu (4.50.1)
5137
5137
  This software contains the following license and notice below:
5138
5138
 
5139
5139
  MIT License
@@ -5185,7 +5185,7 @@ SOFTWARE.
5185
5185
 
5186
5186
  ---
5187
5187
 
5188
- The following software may be included in this product: @rspack/binding-darwin-arm64 (1.6.8)
5188
+ The following software may be included in this product: @rspack/binding-linux-x64-gnu (1.6.8)
5189
5189
  This software contains the following license and notice below:
5190
5190
 
5191
5191
  MIT License
@@ -5898,7 +5898,7 @@ SOFTWARE
5898
5898
 
5899
5899
  ---
5900
5900
 
5901
- The following software may be included in this product: @types/node (22.19.11)
5901
+ The following software may be included in this product: @types/node (22.19.13)
5902
5902
  This software contains the following license and notice below:
5903
5903
 
5904
5904
  MIT License
@@ -10163,6 +10163,34 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10163
10163
 
10164
10164
  ---
10165
10165
 
10166
+ The following software may be included in this product: cors (2.8.6)
10167
+ This software contains the following license and notice below:
10168
+
10169
+ (The MIT License)
10170
+
10171
+ Copyright (c) 2013 Troy Goode <troygoode@gmail.com>
10172
+
10173
+ Permission is hereby granted, free of charge, to any person obtaining
10174
+ a copy of this software and associated documentation files (the
10175
+ 'Software'), to deal in the Software without restriction, including
10176
+ without limitation the rights to use, copy, modify, merge, publish,
10177
+ distribute, sublicense, and/or sell copies of the Software, and to
10178
+ permit persons to whom the Software is furnished to do so, subject to
10179
+ the following conditions:
10180
+
10181
+ The above copyright notice and this permission notice shall be
10182
+ included in all copies or substantial portions of the Software.
10183
+
10184
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
10185
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
10186
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
10187
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
10188
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
10189
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
10190
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10191
+
10192
+ ---
10193
+
10166
10194
  The following software may be included in this product: corser (2.0.1)
10167
10195
  This software contains the following license and notice below:
10168
10196
 
@@ -11757,7 +11785,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
11757
11785
 
11758
11786
  ---
11759
11787
 
11760
- The following software may be included in this product: eslint (9.39.2)
11788
+ The following software may be included in this product: eslint (9.39.3)
11761
11789
  This software contains the following license and notice below:
11762
11790
 
11763
11791
  Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
@@ -12901,7 +12929,7 @@ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHE
12901
12929
 
12902
12930
  ---
12903
12931
 
12904
- The following software may be included in this product: fs-extra (11.3.3)
12932
+ The following software may be included in this product: fs-extra (11.3.4)
12905
12933
  This software contains the following license and notice below:
12906
12934
 
12907
12935
  (The MIT License)
@@ -12922,34 +12950,6 @@ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHE
12922
12950
 
12923
12951
  ---
12924
12952
 
12925
- The following software may be included in this product: fsevents (2.3.3)
12926
- This software contains the following license and notice below:
12927
-
12928
- MIT License
12929
- -----------
12930
-
12931
- Copyright (C) 2010-2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller
12932
-
12933
- Permission is hereby granted, free of charge, to any person obtaining a copy
12934
- of this software and associated documentation files (the "Software"), to deal
12935
- in the Software without restriction, including without limitation the rights
12936
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12937
- copies of the Software, and to permit persons to whom the Software is
12938
- furnished to do so, subject to the following conditions:
12939
-
12940
- The above copyright notice and this permission notice shall be included in
12941
- all copies or substantial portions of the Software.
12942
-
12943
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12944
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12945
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
12946
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
12947
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
12948
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
12949
- THE SOFTWARE.
12950
-
12951
- ---
12952
-
12953
12953
  The following software may be included in this product: function-bind (1.1.2)
12954
12954
  This software contains the following license and notice below:
12955
12955
 
@@ -15814,6 +15814,59 @@ terms above.
15814
15814
 
15815
15815
  ---
15816
15816
 
15817
+ The following software may be included in this product: lodash (4.17.23)
15818
+ This software contains the following license and notice below:
15819
+
15820
+ Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
15821
+
15822
+ Based on Underscore.js, copyright Jeremy Ashkenas,
15823
+ DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
15824
+
15825
+ This software consists of voluntary contributions made by many
15826
+ individuals. For exact contribution history, see the revision history
15827
+ available at https://github.com/lodash/lodash
15828
+
15829
+ The following license applies to all parts of this software except as
15830
+ documented below:
15831
+
15832
+ ====
15833
+
15834
+ Permission is hereby granted, free of charge, to any person obtaining
15835
+ a copy of this software and associated documentation files (the
15836
+ "Software"), to deal in the Software without restriction, including
15837
+ without limitation the rights to use, copy, modify, merge, publish,
15838
+ distribute, sublicense, and/or sell copies of the Software, and to
15839
+ permit persons to whom the Software is furnished to do so, subject to
15840
+ the following conditions:
15841
+
15842
+ The above copyright notice and this permission notice shall be
15843
+ included in all copies or substantial portions of the Software.
15844
+
15845
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15846
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15847
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15848
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
15849
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
15850
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
15851
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15852
+
15853
+ ====
15854
+
15855
+ Copyright and related rights for sample code are waived via CC0. Sample
15856
+ code is defined as all source code displayed within the prose of the
15857
+ documentation.
15858
+
15859
+ CC0: http://creativecommons.org/publicdomain/zero/1.0/
15860
+
15861
+ ====
15862
+
15863
+ Files located in the node_modules and vendor directories are externally
15864
+ maintained libraries used by this software which have their own
15865
+ licenses; we recommend you read them, as their terms may differ from the
15866
+ terms above.
15867
+
15868
+ ---
15869
+
15817
15870
  The following software may be included in this product: lodash.camelcase (4.3.0)
15818
15871
  This software contains the following license and notice below:
15819
15872
 
@@ -25728,7 +25781,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25728
25781
 
25729
25782
  ---
25730
25783
 
25731
- The following software may be included in this product: verdaccio (6.2.5)
25784
+ The following software may be included in this product: verdaccio (6.2.9)
25732
25785
  This software contains the following license and notice below:
25733
25786
 
25734
25787
  MIT License
@@ -29226,7 +29279,7 @@ SOFTWARE.
29226
29279
 
29227
29280
  ---
29228
29281
 
29229
- The following software may be included in this product: @cypress/request (3.0.9)
29282
+ The following software may be included in this product: @cypress/request (3.0.10)
29230
29283
  This software contains the following license and notice below:
29231
29284
 
29232
29285
  Apache License
@@ -36302,6 +36355,27 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
36302
36355
 
36303
36356
  ---
36304
36357
 
36358
+ The following software may be included in this product: semver (7.7.4)
36359
+ This software contains the following license and notice below:
36360
+
36361
+ The ISC License
36362
+
36363
+ Copyright (c) Isaac Z. Schlueter and Contributors
36364
+
36365
+ Permission to use, copy, modify, and/or distribute this software for any
36366
+ purpose with or without fee is hereby granted, provided that the above
36367
+ copyright notice and this permission notice appear in all copies.
36368
+
36369
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
36370
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
36371
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
36372
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
36373
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
36374
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
36375
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
36376
+
36377
+ ---
36378
+
36305
36379
  The following software may be included in this product: setprototypeof (1.2.0)
36306
36380
  This software contains the following license and notice below:
36307
36381
 
@@ -36919,41 +36993,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36919
36993
 
36920
36994
  ---
36921
36995
 
36922
- The following software may be included in this product: qs (6.14.0)
36923
- This software contains the following license and notice below:
36924
-
36925
- BSD 3-Clause License
36926
-
36927
- Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors)
36928
- All rights reserved.
36929
-
36930
- Redistribution and use in source and binary forms, with or without
36931
- modification, are permitted provided that the following conditions are met:
36932
-
36933
- 1. Redistributions of source code must retain the above copyright notice, this
36934
- list of conditions and the following disclaimer.
36935
-
36936
- 2. Redistributions in binary form must reproduce the above copyright notice,
36937
- this list of conditions and the following disclaimer in the documentation
36938
- and/or other materials provided with the distribution.
36939
-
36940
- 3. Neither the name of the copyright holder nor the names of its
36941
- contributors may be used to endorse or promote products derived from
36942
- this software without specific prior written permission.
36943
-
36944
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
36945
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
36946
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
36947
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
36948
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36949
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
36950
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36951
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36952
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36953
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36954
-
36955
- ---
36956
-
36957
36996
  The following software may be included in this product: qs (6.14.1)
36958
36997
  This software contains the following license and notice below:
36959
36998
 
@@ -38914,7 +38953,7 @@ software or this license, under any kind of legal claim._**
38914
38953
 
38915
38954
  ---
38916
38955
 
38917
- The following software may be included in this product: minimatch (10.2.3)
38956
+ The following software may be included in this product: minimatch (10.2.4)
38918
38957
  This software contains the following license and notice below:
38919
38958
 
38920
38959
  # Blue Oak Model License
@@ -39367,7 +39406,7 @@ permission of its copyright owner.
39367
39406
 
39368
39407
  ---
39369
39408
 
39370
- The following software may be included in this product: lightningcss (1.30.2)
39409
+ The following software may be included in this product: lightningcss (1.31.1)
39371
39410
  This software contains the following license and notice below:
39372
39411
 
39373
39412
  Mozilla Public License Version 2.0
@@ -39746,7 +39785,7 @@ defined by the Mozilla Public License, v. 2.0.
39746
39785
 
39747
39786
  ---
39748
39787
 
39749
- The following software may be included in this product: lightningcss-darwin-arm64 (1.30.2)
39788
+ The following software may be included in this product: lightningcss-linux-x64-gnu (1.31.1)
39750
39789
  This software contains the following license and notice below:
39751
39790
 
39752
39791
  Mozilla Public License Version 2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/nx-plugin",
3
- "version": "0.81.0",
3
+ "version": "0.82.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/awslabs/nx-plugin-for-aws.git",
@@ -26,13 +26,13 @@
26
26
  "@apidevtools/swagger-parser": "10.1.1",
27
27
  "@hey-api/openapi-ts": "0.64.13",
28
28
  "@iarna/toml": "2.2.5",
29
- "@modelcontextprotocol/sdk": "1.27.0",
29
+ "@modelcontextprotocol/sdk": "1.27.1",
30
30
  "@nx/devkit": "22.5.3",
31
31
  "@nx/eslint": "22.5.3",
32
32
  "@nx/js": "22.5.3",
33
33
  "@nx/react": "22.5.3",
34
34
  "@nx/vite": "22.5.3",
35
- "@nxlv/python": "22.1.0",
35
+ "@nxlv/python": "22.1.1",
36
36
  "@phenomnomnominal/tsquery": "6.1.4",
37
37
  "enquirer": "2.4.1",
38
38
  "fast-glob": "3.3.3",
@@ -42,7 +42,7 @@
42
42
  "lodash.orderby": "4.6.0",
43
43
  "lodash.trim": "4.5.1",
44
44
  "lodash.uniqby": "4.7.0",
45
- "minimatch": "10.2.3",
45
+ "minimatch": "10.2.4",
46
46
  "openapi-types": "12.1.3",
47
47
  "pip-requirements-js": "0.2.1",
48
48
  "typescript": "5.9.3",
@@ -2,17 +2,47 @@
2
2
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- import { Tree } from '@nx/devkit';
5
+ import { ProjectConfiguration, Tree } from '@nx/devkit';
6
6
  import { ConnectionGeneratorSchema } from './schema';
7
+ import { ComponentMetadata } from '../utils/nx';
7
8
  /**
8
- * List of supported source and target project types for connections
9
+ * List of supported source and target project types for connections.
10
+ * These can be project-level types (determined by introspection) or
11
+ * component generator ids (from component metadata).
9
12
  */
10
13
  declare const SUPPORTED_PROJECT_TYPES: readonly ["ts#trpc-api", "py#fast-api", "react", "smithy"];
11
14
  type ProjectType = (typeof SUPPORTED_PROJECT_TYPES)[number];
15
+ export type Connection = {
16
+ source: string;
17
+ target: string;
18
+ };
19
+ /**
20
+ * Sentinel value for sourceComponent/targetComponent that means
21
+ * "use the project-level connection, not a component".
22
+ */
23
+ export declare const PROJECT_COMPONENT_SENTINEL = ".";
24
+ /**
25
+ * The result of resolving a connection, including the matched connection
26
+ * and any resolved source/target component metadata.
27
+ */
28
+ export interface ResolvedConnection {
29
+ readonly connection: Connection;
30
+ readonly sourceComponent?: ComponentMetadata;
31
+ readonly targetComponent?: ComponentMetadata;
32
+ }
12
33
  /**
13
34
  * Generator for a connection between two projects
14
35
  */
15
36
  export declare const connectionGenerator: (tree: Tree, options: ConnectionGeneratorSchema) => Promise<() => void>;
37
+ /**
38
+ * Find a component in project metadata matching the given reference.
39
+ * Checks by name first, then by path, then by generator.
40
+ */
41
+ export declare const findComponentInMetadata: (projectConfiguration: ProjectConfiguration, componentRef: string) => ComponentMetadata | undefined;
42
+ /**
43
+ * Resolve the connection to use, considering source/target projects and components.
44
+ */
45
+ export declare const resolveConnection: (tree: Tree, options: ConnectionGeneratorSchema, supportedConnections?: readonly Connection[]) => ResolvedConnection;
16
46
  /**
17
47
  * Determine whether the given project is of a known project type
18
48
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.determineProjectType = exports.connectionGenerator = void 0;
3
+ exports.determineProjectType = exports.resolveConnection = exports.findComponentInMetadata = exports.connectionGenerator = exports.PROJECT_COMPONENT_SENTINEL = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  /**
6
6
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -16,7 +16,9 @@ const generator_3 = require("../smithy/project/generator");
16
16
  const generator_4 = require("../smithy/ts/api/generator");
17
17
  const generator_5 = tslib_1.__importDefault(require("../smithy/react-connection/generator"));
18
18
  /**
19
- * List of supported source and target project types for connections
19
+ * List of supported source and target project types for connections.
20
+ * These can be project-level types (determined by introspection) or
21
+ * component generator ids (from component metadata).
20
22
  */
21
23
  const SUPPORTED_PROJECT_TYPES = [
22
24
  'ts#trpc-api',
@@ -25,7 +27,13 @@ const SUPPORTED_PROJECT_TYPES = [
25
27
  'smithy',
26
28
  ];
27
29
  /**
28
- * Enumerates the supported project connections
30
+ * Sentinel value for sourceComponent/targetComponent that means
31
+ * "use the project-level connection, not a component".
32
+ */
33
+ exports.PROJECT_COMPONENT_SENTINEL = '.';
34
+ /**
35
+ * Enumerates the supported project connections.
36
+ * Source and target can be project-level types or component generator ids.
29
37
  */
30
38
  const SUPPORTED_CONNECTIONS = [
31
39
  { source: 'react', target: 'ts#trpc-api' },
@@ -53,26 +61,128 @@ const CONNECTION_GENERATORS = {
53
61
  * Generator for a connection between two projects
54
62
  */
55
63
  const connectionGenerator = (tree, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
56
- const sourceType = (0, exports.determineProjectType)(tree, options.sourceProject);
57
- const targetType = (0, exports.determineProjectType)(tree, options.targetProject);
58
- if (!sourceType || !SUPPORTED_PROJECT_TYPES.includes(sourceType)) {
59
- throw new Error(`This generator does not support selected source project ${options.sourceProject}`);
64
+ const { connection } = (0, exports.resolveConnection)(tree, options);
65
+ const connectionKey = `${connection.source} -> ${connection.target}`;
66
+ return yield CONNECTION_GENERATORS[connectionKey](tree, options);
67
+ });
68
+ exports.connectionGenerator = connectionGenerator;
69
+ /**
70
+ * Find a component in project metadata matching the given reference.
71
+ * Checks by name first, then by path, then by generator.
72
+ */
73
+ const findComponentInMetadata = (projectConfiguration, componentRef) => {
74
+ var _a, _b, _c, _d;
75
+ const components = (_b = (_a = projectConfiguration.metadata) === null || _a === void 0 ? void 0 : _a.components) !== null && _b !== void 0 ? _b : [];
76
+ return ((_d = (_c = components.find((c) => c.name === componentRef)) !== null && _c !== void 0 ? _c : components.find((c) => c.path === componentRef)) !== null && _d !== void 0 ? _d : components.find((c) => c.generator === componentRef));
77
+ };
78
+ exports.findComponentInMetadata = findComponentInMetadata;
79
+ /**
80
+ * Gather all connection candidates for a project configuration. This includes:
81
+ * - The project-level type (if it's a supported type)
82
+ * - Each component's generator id as a candidate type
83
+ */
84
+ const gatherCandidates = (tree, projectConfig) => {
85
+ var _a, _b;
86
+ const projectType = determineProjectTypeFromConfig(tree, projectConfig);
87
+ const components = (_b = (_a = projectConfig.metadata) === null || _a === void 0 ? void 0 : _a.components) !== null && _b !== void 0 ? _b : [];
88
+ return [
89
+ ...(projectType ? [{ type: projectType }] : []),
90
+ ...components.map((component) => ({
91
+ type: component.generator,
92
+ component,
93
+ })),
94
+ ];
95
+ };
96
+ /**
97
+ * Validate that a specified component exists in the project metadata.
98
+ * Skips validation for undefined refs and the project sentinel '.'.
99
+ */
100
+ const validateComponent = (componentRef, projectConfig, side) => {
101
+ var _a, _b;
102
+ if (!componentRef || componentRef === exports.PROJECT_COMPONENT_SENTINEL)
103
+ return;
104
+ const found = (0, exports.findComponentInMetadata)(projectConfig, componentRef);
105
+ if (!found) {
106
+ const components = (_b = (_a = projectConfig.metadata) === null || _a === void 0 ? void 0 : _a.components) !== null && _b !== void 0 ? _b : [];
107
+ throw new Error(`Component '${componentRef}' not found in ${side} project ${projectConfig.name}. ` +
108
+ `Available components: ${components.length > 0 ? components.map((c) => { var _a; return (_a = c.name) !== null && _a !== void 0 ? _a : c.generator; }).join(', ') : 'none'}`);
109
+ }
110
+ };
111
+ /**
112
+ * Narrow candidates based on the user's specified component reference.
113
+ */
114
+ const filterConnectionCandidatesForComponentReference = (componentRef, projectConfig, candidates, supportedConnections, side) => {
115
+ if (!componentRef)
116
+ return candidates;
117
+ if (componentRef === exports.PROJECT_COMPONENT_SENTINEL) {
118
+ return candidates.filter((c) => !c.component);
60
119
  }
61
- if (!targetType || !SUPPORTED_PROJECT_TYPES.includes(targetType)) {
62
- throw new Error(`This generator does not support selected target project ${options.targetProject}`);
120
+ const component = (0, exports.findComponentInMetadata)(projectConfig, componentRef);
121
+ if (!component)
122
+ return candidates;
123
+ const isConnectionParticipant = supportedConnections.some((c) => c[side] === component.generator);
124
+ if (!isConnectionParticipant)
125
+ return candidates;
126
+ return candidates.filter((c) => { var _a; return ((_a = c.component) === null || _a === void 0 ? void 0 : _a.generator) === component.generator; });
127
+ };
128
+ /**
129
+ * Resolve the connection to use, considering source/target projects and components.
130
+ */
131
+ const resolveConnection = (tree, options, supportedConnections = SUPPORTED_CONNECTIONS) => {
132
+ const sourceConfig = (0, nx_1.readProjectConfigurationUnqualified)(tree, options.sourceProject);
133
+ const targetConfig = (0, nx_1.readProjectConfigurationUnqualified)(tree, options.targetProject);
134
+ // Validate explicitly specified components exist
135
+ validateComponent(options.sourceComponent, sourceConfig, 'source');
136
+ validateComponent(options.targetComponent, targetConfig, 'target');
137
+ // Gather and narrow candidates
138
+ const sourceCandidates = filterConnectionCandidatesForComponentReference(options.sourceComponent, sourceConfig, gatherCandidates(tree, sourceConfig), supportedConnections, 'source');
139
+ const targetCandidates = filterConnectionCandidatesForComponentReference(options.targetComponent, targetConfig, gatherCandidates(tree, targetConfig), supportedConnections, 'target');
140
+ // Cross-product candidates and find supported connections
141
+ const matches = [];
142
+ for (const source of sourceCandidates) {
143
+ for (const target of targetCandidates) {
144
+ const match = supportedConnections.find((c) => c.source === source.type && c.target === target.type);
145
+ if (match) {
146
+ matches.push({
147
+ connection: match,
148
+ sourceComponent: source.component,
149
+ targetComponent: target.component,
150
+ });
151
+ }
152
+ }
63
153
  }
64
- const connection = SUPPORTED_CONNECTIONS.find((c) => c.source === sourceType && c.target === targetType);
65
- if (!connection) {
66
- throw new Error(`This generator does not support a connection from ${options.sourceProject} (${sourceType}) to ${options.targetProject} (${targetType})`);
154
+ if (matches.length === 0) {
155
+ const sourceTypes = [...new Set(sourceCandidates.map((c) => c.type))];
156
+ const targetTypes = [...new Set(targetCandidates.map((c) => c.type))];
157
+ throw new Error(`This generator does not support a connection from ${options.sourceProject}${sourceTypes.length > 0 ? ` (${sourceTypes.join(', ')})` : ''} to ${options.targetProject}${targetTypes.length > 0 ? ` (${targetTypes.join(', ')})` : ''}`);
67
158
  }
68
- return yield CONNECTION_GENERATORS[`${connection.source} -> ${connection.target}`](tree, options);
69
- });
70
- exports.connectionGenerator = connectionGenerator;
159
+ if (matches.length > 1) {
160
+ const connectionDescriptions = matches
161
+ .map((m) => `${m.connection.source} -> ${m.connection.target}`)
162
+ .join(', ');
163
+ throw new Error(`Ambiguous connection from ${options.sourceProject} to ${options.targetProject}. ` +
164
+ `Multiple supported connections found: ${connectionDescriptions}. ` +
165
+ `Please specify sourceComponent and/or targetComponent to disambiguate.`);
166
+ }
167
+ return {
168
+ connection: matches[0].connection,
169
+ sourceComponent: matches[0].sourceComponent,
170
+ targetComponent: matches[0].targetComponent,
171
+ };
172
+ };
173
+ exports.resolveConnection = resolveConnection;
71
174
  /**
72
175
  * Determine whether the given project is of a known project type
73
176
  */
74
177
  const determineProjectType = (tree, projectName) => {
75
178
  const projectConfiguration = (0, nx_1.readProjectConfigurationUnqualified)(tree, projectName);
179
+ return determineProjectTypeFromConfig(tree, projectConfiguration);
180
+ };
181
+ exports.determineProjectType = determineProjectType;
182
+ /**
183
+ * Determine whether the given project configuration is of a known project type
184
+ */
185
+ const determineProjectTypeFromConfig = (tree, projectConfiguration) => {
76
186
  // NB: if adding new checks, ensure these go from most to least specific
77
187
  // eg. react website is more specific than typescript project
78
188
  if (isTrpcApi(tree, projectConfiguration)) {
@@ -89,7 +199,6 @@ const determineProjectType = (tree, projectName) => {
89
199
  }
90
200
  return undefined;
91
201
  };
92
- exports.determineProjectType = determineProjectType;
93
202
  const sourceRoot = (projectConfiguration) => {
94
203
  var _a;
95
204
  return (_a = projectConfiguration.sourceRoot) !== null && _a !== void 0 ? _a : (0, devkit_1.joinPathFragments)(projectConfiguration.root, 'src');
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/connection/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAA2E;AAE3E,gFAAyD;AACzD,sCAAoD;AACpD,wCAAyC;AACzC,uFAAmE;AACnE,oCAAkE;AAClE,2DAA4E;AAC5E,0DAA0E;AAC1E,6FAAkF;AAElF;;GAEG;AACH,MAAM,uBAAuB,GAAG;IAC9B,aAAa;IACb,aAAa;IACb,OAAO;IACP,QAAQ;CACA,CAAC;AAMX;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE;IAC1C,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE;IAC1C,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE;CACf,CAAC;AAQzB;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,sBAAsB,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CACxC,IAAA,mBAAkB,EAAC,IAAI,EAAE;QACvB,mBAAmB,EAAE,OAAO,CAAC,aAAa;QAC1C,kBAAkB,EAAE,OAAO,CAAC,aAAa;KAC1C,CAAC;IACJ,sBAAsB,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CACxC,IAAA,mBAAqB,EAAC,IAAI,EAAE;QAC1B,mBAAmB,EAAE,OAAO,CAAC,aAAa;QAC1C,kBAAkB,EAAE,OAAO,CAAC,aAAa;KAC1C,CAAC;IACJ,iBAAiB,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CACnC,IAAA,mBAA8B,EAAC,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AAC,CAAC;QAChD,IAAI,CAAC,MAAA,MAAC,SAAiB,aAAjB,SAAS,uBAAT,SAAS,CAAU,OAAO,0CAAE,YAAY,mCAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YAC1E,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAClB,KAAW,EACX,oBAA0C,EACjC,EAAE;;IACX,+DAA+D;IAC/D,OAAO;QACL,yCAA6B,CAAC,EAAE;QAChC,wCAA4B,CAAC,EAAE;KAChC,CAAC,QAAQ,CAAC,CAAC,MAAC,oBAAoB,CAAC,QAAgB,mCAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF,kBAAe,2BAAmB,CAAC"}
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/connection/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAA2E;AAE3E,gFAAyD;AACzD,sCAAoD;AACpD,wCAAyC;AACzC,uFAAmE;AACnE,oCAGqB;AACrB,2DAA4E;AAC5E,0DAA0E;AAC1E,6FAAkF;AAElF;;;;GAIG;AACH,MAAM,uBAAuB,GAAG;IAC9B,aAAa;IACb,aAAa;IACb,OAAO;IACP,QAAQ;CACA,CAAC;AAMX;;;GAGG;AACU,QAAA,0BAA0B,GAAG,GAAG,CAAC;AAY9C;;;GAGG;AACH,MAAM,qBAAqB,GAAG;IAC5B,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE;IAC1C,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE;IAC1C,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE;CACG,CAAC;AAQ3C;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,sBAAsB,EAAE,CAAC,I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CAAC;IAED,MAAM,aAAa,GAAG,IAAA,0BAAiB,EACrC,oBAAoB,CAAC,IAAI,EACzB,gBAAgB,CACjB,CAAC;IACF,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAG,IAAA,eAAQ,EAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAChD,IAAI,CAAC,MAAA,MAAC,SAAiB,aAAjB,SAAS,uBAAT,SAAS,CAAU,OAAO,0CAAE,YAAY,mCAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YAC1E,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAClB,KAAW,EACX,oBAA0C,EACjC,EAAE;;IACX,+DAA+D;IAC/D,OAAO;QACL,yCAA6B,CAAC,EAAE;QAChC,wCAA4B,CAAC,EAAE;KAChC,CAAC,QAAQ,CAAC,CAAC,MAAC,oBAAoB,CAAC,QAAgB,mCAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF,kBAAe,2BAAmB,CAAC"}
@@ -6,4 +6,6 @@
6
6
  export interface ConnectionGeneratorSchema {
7
7
  sourceProject: string;
8
8
  targetProject: string;
9
+ sourceComponent?: string;
10
+ targetComponent?: string;
9
11
  }
@@ -19,6 +19,14 @@
19
19
  "description": "The target project to connect to",
20
20
  "x-prompt": "Select the target project to connect to",
21
21
  "x-dropdown": "projects"
22
+ },
23
+ "sourceComponent": {
24
+ "type": "string",
25
+ "description": "The source component to connect from (component name, path relative to source project root, or generator id). Use '.' to explicitly select the project as the source."
26
+ },
27
+ "targetComponent": {
28
+ "type": "string",
29
+ "description": "The target component to connect to (component name, path relative to target project root, or generator id). Use '.' to explicitly select the project as the target."
22
30
  }
23
31
  },
24
32
  "required": ["sourceProject", "targetProject"]