@aws/nx-plugin 1.0.0-rc.65 → 1.0.0-rc.67

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 (101) hide show
  1. package/LICENSE-THIRD-PARTY +59 -87
  2. package/migrations.json +61 -56
  3. package/package.json +4 -4
  4. package/src/agentcore-gateway/__snapshots__/generator.spec.ts.snap +1 -1
  5. package/src/migrations/latest/smithy-server-package-rename/metadata.json +3 -0
  6. package/src/migrations/latest/smithy-server-package-rename/migration.js +123 -0
  7. package/src/migrations/latest/smithy-server-package-rename/migration.js.map +1 -0
  8. package/src/migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/migration.js.map +1 -0
  9. package/src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/migration.js.map +1 -0
  10. package/src/migrations/v1.0.0-rc.60/0001-gateway-cognito-passthrough/migration.js.map +1 -0
  11. package/src/migrations/v1.0.0-rc.60/0002-waf-log-group-removal/migration.js.map +1 -0
  12. package/src/migrations/v1.0.0-rc.60/0003-strip-pip-from-python-images/migration.js.map +1 -0
  13. package/src/migrations/v1.0.0-rc.61/0001-py-agent-lifespan-construction/migration.js.map +1 -0
  14. package/src/migrations/v1.0.0-rc.62/0001-rename-load-runtime-config-target/migration.js.map +1 -0
  15. package/src/migrations/v1.0.0-rc.63/0001-add-deploy-sandbox-target/migration.js.map +1 -0
  16. package/src/migrations/v1.0.0-rc.64/0001-smithy-build-without-docker/migration.js.map +1 -0
  17. package/src/migrations/v1.0.0-rc.65/0001-vite-config-import-meta-dirname/migration.js.map +1 -0
  18. package/src/migrations/v1.0.0-rc.65/0002-rolldown-code-splitting/migration.d.ts +6 -0
  19. package/src/migrations/v1.0.0-rc.65/0002-rolldown-code-splitting/migration.js.map +1 -0
  20. package/src/preset/__snapshots__/generator.spec.ts.snap +2 -2
  21. package/src/py/agent/__snapshots__/generator.constructs.spec.ts.snap +4 -4
  22. package/src/py/agent/__snapshots__/generator.frameworks.spec.ts.snap +3 -3
  23. package/src/py/agent/__snapshots__/generator.protocols.spec.ts.snap +2 -2
  24. package/src/py/agent/a2a-connection/generator.d.ts +1 -1
  25. package/src/py/agent/gateway-connection/generator.d.ts +1 -1
  26. package/src/py/agent/mcp-connection/generator.d.ts +1 -1
  27. package/src/py/dynamodb/__snapshots__/generator.spec.ts.snap +2 -2
  28. package/src/py/fast-api/__snapshots__/generator.terraform.spec.ts.snap +12 -12
  29. package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +2 -2
  30. package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +3 -3
  31. package/src/py/rdb/__snapshots__/generator.spec.ts.snap +3 -3
  32. package/src/smithy/project/__snapshots__/generator.spec.ts.snap +2 -2
  33. package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +10 -10
  34. package/src/smithy/ts/api/files/handler.ts.template +1 -1
  35. package/src/smithy/ts/api/files/local-server.ts.template +1 -1
  36. package/src/smithy/ts/api/generator.d.ts +2 -2
  37. package/src/smithy/ts/api/generator.js +2 -2
  38. package/src/smithy/ts/api/generator.js.map +1 -1
  39. package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +12 -12
  40. package/src/ts/agent/__snapshots__/generator.spec.ts.snap +2 -2
  41. package/src/ts/dcr-proxy/__snapshots__/generator.spec.ts.snap +1 -1
  42. package/src/ts/dynamodb/__snapshots__/generator.spec.ts.snap +2 -2
  43. package/src/ts/lambda-function/__snapshots__/generator.spec.ts.snap +2 -2
  44. package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +2 -2
  45. package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +4 -4
  46. package/src/ts/rdb/smithy-connection/__snapshots__/generator.spec.ts.snap +6 -6
  47. package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +19 -19
  48. package/src/ts/react-website/cognito-auth/__snapshots__/generator.terraform.spec.ts.snap +2 -2
  49. package/src/utils/versions.d.ts +50 -50
  50. package/src/utils/versions.js +49 -49
  51. package/src/utils/versions.js.map +1 -1
  52. package/src/migrations/latest/add-deploy-sandbox-target/migration.js.map +0 -1
  53. package/src/migrations/latest/gateway-agent-targets/migration.js.map +0 -1
  54. package/src/migrations/latest/gateway-cognito-passthrough/migration.js.map +0 -1
  55. package/src/migrations/latest/py-agent-lifespan-construction/migration.js.map +0 -1
  56. package/src/migrations/latest/rename-load-runtime-config-target/migration.js.map +0 -1
  57. package/src/migrations/latest/rolldown-code-splitting/migration.js.map +0 -1
  58. package/src/migrations/latest/smithy-build-without-docker/migration.js.map +0 -1
  59. package/src/migrations/latest/smithy-ssdk-bundle-pins/migration.js.map +0 -1
  60. package/src/migrations/latest/strip-pip-from-python-images/migration.js.map +0 -1
  61. package/src/migrations/latest/vite-config-import-meta-dirname/migration.js.map +0 -1
  62. package/src/migrations/latest/waf-log-group-removal/migration.js.map +0 -1
  63. /package/src/migrations/latest/{add-deploy-sandbox-target → smithy-server-package-rename}/migration.d.ts +0 -0
  64. /package/src/migrations/{latest/smithy-ssdk-bundle-pins → v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins}/metadata.json +0 -0
  65. /package/src/migrations/{latest/py-agent-lifespan-construction → v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins}/migration.d.ts +0 -0
  66. /package/src/migrations/{latest/smithy-ssdk-bundle-pins → v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins}/migration.js +0 -0
  67. /package/src/migrations/{latest/smithy-ssdk-bundle-pins → v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins}/rc57-service.Dockerfile.fixture +0 -0
  68. /package/src/migrations/{latest/gateway-agent-targets → v1.0.0-rc.59/0001-gateway-agent-targets}/__snapshots__/migration.spec.ts.snap +0 -0
  69. /package/src/migrations/{latest/gateway-agent-targets → v1.0.0-rc.59/0001-gateway-agent-targets}/metadata.json +0 -0
  70. /package/src/migrations/{latest/gateway-agent-targets → v1.0.0-rc.59/0001-gateway-agent-targets}/migration.d.ts +0 -0
  71. /package/src/migrations/{latest/gateway-agent-targets → v1.0.0-rc.59/0001-gateway-agent-targets}/migration.js +0 -0
  72. /package/src/migrations/{latest/gateway-cognito-passthrough → v1.0.0-rc.60/0001-gateway-cognito-passthrough}/__snapshots__/migration.spec.ts.snap +0 -0
  73. /package/src/migrations/{latest/gateway-cognito-passthrough → v1.0.0-rc.60/0001-gateway-cognito-passthrough}/metadata.json +0 -0
  74. /package/src/migrations/{latest/gateway-cognito-passthrough → v1.0.0-rc.60/0001-gateway-cognito-passthrough}/migration.d.ts +0 -0
  75. /package/src/migrations/{latest/gateway-cognito-passthrough → v1.0.0-rc.60/0001-gateway-cognito-passthrough}/migration.js +0 -0
  76. /package/src/migrations/{latest/waf-log-group-removal → v1.0.0-rc.60/0002-waf-log-group-removal}/__snapshots__/migration.spec.ts.snap +0 -0
  77. /package/src/migrations/{latest/waf-log-group-removal → v1.0.0-rc.60/0002-waf-log-group-removal}/metadata.json +0 -0
  78. /package/src/migrations/{latest/waf-log-group-removal → v1.0.0-rc.60/0002-waf-log-group-removal}/migration.d.ts +0 -0
  79. /package/src/migrations/{latest/waf-log-group-removal → v1.0.0-rc.60/0002-waf-log-group-removal}/migration.js +0 -0
  80. /package/src/migrations/{latest/strip-pip-from-python-images → v1.0.0-rc.60/0003-strip-pip-from-python-images}/__snapshots__/migration.spec.ts.snap +0 -0
  81. /package/src/migrations/{latest/strip-pip-from-python-images → v1.0.0-rc.60/0003-strip-pip-from-python-images}/metadata.json +0 -0
  82. /package/src/migrations/{latest/rename-load-runtime-config-target → v1.0.0-rc.60/0003-strip-pip-from-python-images}/migration.d.ts +0 -0
  83. /package/src/migrations/{latest/strip-pip-from-python-images → v1.0.0-rc.60/0003-strip-pip-from-python-images}/migration.js +0 -0
  84. /package/src/migrations/{latest/py-agent-lifespan-construction → v1.0.0-rc.61/0001-py-agent-lifespan-construction}/metadata.json +0 -0
  85. /package/src/migrations/{latest/rolldown-code-splitting → v1.0.0-rc.61/0001-py-agent-lifespan-construction}/migration.d.ts +0 -0
  86. /package/src/migrations/{latest/py-agent-lifespan-construction → v1.0.0-rc.61/0001-py-agent-lifespan-construction}/migration.js +0 -0
  87. /package/src/migrations/{latest/rename-load-runtime-config-target → v1.0.0-rc.62/0001-rename-load-runtime-config-target}/metadata.json +0 -0
  88. /package/src/migrations/{latest/smithy-build-without-docker → v1.0.0-rc.62/0001-rename-load-runtime-config-target}/migration.d.ts +0 -0
  89. /package/src/migrations/{latest/rename-load-runtime-config-target → v1.0.0-rc.62/0001-rename-load-runtime-config-target}/migration.js +0 -0
  90. /package/src/migrations/{latest/add-deploy-sandbox-target → v1.0.0-rc.63/0001-add-deploy-sandbox-target}/metadata.json +0 -0
  91. /package/src/migrations/{latest/smithy-ssdk-bundle-pins → v1.0.0-rc.63/0001-add-deploy-sandbox-target}/migration.d.ts +0 -0
  92. /package/src/migrations/{latest/add-deploy-sandbox-target → v1.0.0-rc.63/0001-add-deploy-sandbox-target}/migration.js +0 -0
  93. /package/src/migrations/{latest/smithy-build-without-docker → v1.0.0-rc.64/0001-smithy-build-without-docker}/legacy-service.Dockerfile.fixture +0 -0
  94. /package/src/migrations/{latest/smithy-build-without-docker → v1.0.0-rc.64/0001-smithy-build-without-docker}/metadata.json +0 -0
  95. /package/src/migrations/{latest/strip-pip-from-python-images → v1.0.0-rc.64/0001-smithy-build-without-docker}/migration.d.ts +0 -0
  96. /package/src/migrations/{latest/smithy-build-without-docker → v1.0.0-rc.64/0001-smithy-build-without-docker}/migration.js +0 -0
  97. /package/src/migrations/{latest/vite-config-import-meta-dirname → v1.0.0-rc.65/0001-vite-config-import-meta-dirname}/metadata.json +0 -0
  98. /package/src/migrations/{latest/vite-config-import-meta-dirname → v1.0.0-rc.65/0001-vite-config-import-meta-dirname}/migration.d.ts +0 -0
  99. /package/src/migrations/{latest/vite-config-import-meta-dirname → v1.0.0-rc.65/0001-vite-config-import-meta-dirname}/migration.js +0 -0
  100. /package/src/migrations/{latest/rolldown-code-splitting → v1.0.0-rc.65/0002-rolldown-code-splitting}/metadata.json +0 -0
  101. /package/src/migrations/{latest/rolldown-code-splitting → v1.0.0-rc.65/0002-rolldown-code-splitting}/migration.js +0 -0
@@ -217,7 +217,7 @@ OTHER DEALINGS IN THE SOFTWARE.
217
217
 
218
218
  ---
219
219
 
220
- The following software may be included in this product: @astral-sh/ruff-wasm-nodejs (0.16.1)
220
+ The following software may be included in this product: @astral-sh/ruff-wasm-nodejs (0.16.2)
221
221
  This software contains the following license and notice below:
222
222
 
223
223
  MIT License
@@ -3892,6 +3892,30 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
3892
3892
 
3893
3893
  ---
3894
3894
 
3895
+ The following software may be included in this product: @esbuild/linux-x64 (0.28.2)
3896
+ This software contains the following license and notice below:
3897
+
3898
+ MIT License
3899
+
3900
+ Copyright (c) The maintainers of @esbuild/linux-x64 <https://github.com/evanw/esbuild#readme>
3901
+
3902
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
3903
+ associated documentation files (the "Software"), to deal in the Software without restriction, including
3904
+ without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
3905
+ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
3906
+ following conditions:
3907
+
3908
+ The above copyright notice and this permission notice shall be included in all copies or substantial
3909
+ portions of the Software.
3910
+
3911
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
3912
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
3913
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
3914
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
3915
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
3916
+
3917
+ ---
3918
+
3895
3919
  The following software may be included in this product: @eslint-community/eslint-utils (4.9.1)
3896
3920
  This software contains the following license and notice below:
3897
3921
 
@@ -5770,7 +5794,7 @@ SOFTWARE.
5770
5794
 
5771
5795
  ---
5772
5796
 
5773
- The following software may be included in this product: @oxc-project/types (0.140.0)
5797
+ The following software may be included in this product: @oxc-project/types (0.142.0)
5774
5798
  This software contains the following license and notice below:
5775
5799
 
5776
5800
  MIT License
@@ -6107,7 +6131,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
6107
6131
 
6108
6132
  ---
6109
6133
 
6110
- The following software may be included in this product: @rolldown/binding-linux-x64-gnu (1.2.0)
6134
+ The following software may be included in this product: @rolldown/binding-linux-x64-gnu (1.2.2)
6111
6135
  This software contains the following license and notice below:
6112
6136
 
6113
6137
  MIT License
@@ -7444,34 +7468,7 @@ SOFTWARE
7444
7468
 
7445
7469
  ---
7446
7470
 
7447
- The following software may be included in this product: @types/node (26.1.1)
7448
- This software contains the following license and notice below:
7449
-
7450
- MIT License
7451
-
7452
- Copyright (c) Microsoft Corporation.
7453
-
7454
- Permission is hereby granted, free of charge, to any person obtaining a copy
7455
- of this software and associated documentation files (the "Software"), to deal
7456
- in the Software without restriction, including without limitation the rights
7457
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7458
- copies of the Software, and to permit persons to whom the Software is
7459
- furnished to do so, subject to the following conditions:
7460
-
7461
- The above copyright notice and this permission notice shall be included in all
7462
- copies or substantial portions of the Software.
7463
-
7464
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
7465
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7466
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
7467
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
7468
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
7469
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
7470
- SOFTWARE
7471
-
7472
- ---
7473
-
7474
- The following software may be included in this product: @types/node (26.1.2)
7471
+ The following software may be included in this product: @types/node (26.2.0)
7475
7472
  This software contains the following license and notice below:
7476
7473
 
7477
7474
  MIT License
@@ -13661,6 +13658,33 @@ SOFTWARE.
13661
13658
 
13662
13659
  ---
13663
13660
 
13661
+ The following software may be included in this product: esbuild (0.28.2)
13662
+ This software contains the following license and notice below:
13663
+
13664
+ MIT License
13665
+
13666
+ Copyright (c) 2020 Evan Wallace
13667
+
13668
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13669
+ of this software and associated documentation files (the "Software"), to deal
13670
+ in the Software without restriction, including without limitation the rights
13671
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13672
+ copies of the Software, and to permit persons to whom the Software is
13673
+ furnished to do so, subject to the following conditions:
13674
+
13675
+ The above copyright notice and this permission notice shall be included in all
13676
+ copies or substantial portions of the Software.
13677
+
13678
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13679
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13680
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13681
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
13682
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
13683
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
13684
+ SOFTWARE.
13685
+
13686
+ ---
13687
+
13664
13688
  The following software may be included in this product: escalade (3.2.0)
13665
13689
  This software contains the following license and notice below:
13666
13690
 
@@ -20895,32 +20919,6 @@ SOFTWARE.
20895
20919
 
20896
20920
  ---
20897
20921
 
20898
- The following software may be included in this product: nanoid (3.3.12)
20899
- This software contains the following license and notice below:
20900
-
20901
- The MIT License (MIT)
20902
-
20903
- Copyright 2017 Andrey Sitnik <andrey@sitnik.ru>
20904
-
20905
- Permission is hereby granted, free of charge, to any person obtaining a copy of
20906
- this software and associated documentation files (the "Software"), to deal in
20907
- the Software without restriction, including without limitation the rights to
20908
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
20909
- the Software, and to permit persons to whom the Software is furnished to do so,
20910
- subject to the following conditions:
20911
-
20912
- The above copyright notice and this permission notice shall be included in all
20913
- copies or substantial portions of the Software.
20914
-
20915
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20916
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
20917
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20918
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20919
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20920
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20921
-
20922
- ---
20923
-
20924
20922
  The following software may be included in this product: nanoid (3.3.17)
20925
20923
  This software contains the following license and notice below:
20926
20924
 
@@ -22595,32 +22593,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22595
22593
 
22596
22594
  ---
22597
22595
 
22598
- The following software may be included in this product: postcss (8.5.19)
22599
- This software contains the following license and notice below:
22600
-
22601
- The MIT License (MIT)
22602
-
22603
- Copyright 2013 Andrey Sitnik <andrey@sitnik.es>
22604
-
22605
- Permission is hereby granted, free of charge, to any person obtaining a copy of
22606
- this software and associated documentation files (the "Software"), to deal in
22607
- the Software without restriction, including without limitation the rights to
22608
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
22609
- the Software, and to permit persons to whom the Software is furnished to do so,
22610
- subject to the following conditions:
22611
-
22612
- The above copyright notice and this permission notice shall be included in all
22613
- copies or substantial portions of the Software.
22614
-
22615
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22616
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
22617
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
22618
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22619
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22620
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22621
-
22622
- ---
22623
-
22624
22596
  The following software may be included in this product: postcss (8.5.25)
22625
22597
  This software contains the following license and notice below:
22626
22598
 
@@ -24012,7 +23984,7 @@ IN THE SOFTWARE.
24012
23984
 
24013
23985
  ---
24014
23986
 
24015
- The following software may be included in this product: rolldown (1.2.0)
23987
+ The following software may be included in this product: rolldown (1.2.2)
24016
23988
  This software contains the following license and notice below:
24017
23989
 
24018
23990
  MIT License
@@ -27207,7 +27179,7 @@ SOFTWARE.
27207
27179
 
27208
27180
  ---
27209
27181
 
27210
- The following software may be included in this product: tsx (4.23.5)
27182
+ The following software may be included in this product: tsx (4.23.11)
27211
27183
  This software contains the following license and notice below:
27212
27184
 
27213
27185
  MIT License
@@ -28191,7 +28163,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28191
28163
 
28192
28164
  ---
28193
28165
 
28194
- The following software may be included in this product: vite (8.2.0)
28166
+ The following software may be included in this product: vite (8.2.1)
28195
28167
  This software contains the following license and notice below:
28196
28168
 
28197
28169
  # Vite core license
@@ -29452,7 +29424,7 @@ Repository: https://github.com/lydell/js-tokens
29452
29424
 
29453
29425
  > The MIT License (MIT)
29454
29426
  >
29455
- > Copyright (c) 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Simon Lydell
29427
+ > Copyright (c) 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025 Simon Lydell
29456
29428
  >
29457
29429
  > Permission is hereby granted, free of charge, to any person obtaining a copy
29458
29430
  > of this software and associated documentation files (the "Software"), to deal
package/migrations.json CHANGED
@@ -2,60 +2,10 @@
2
2
  "$schema": "http://json-schema.org/schema",
3
3
  "name": "@aws/nx-plugin",
4
4
  "generators": {
5
- "latest-gateway-agent-targets": {
6
- "version": "1.0.0-rc.59",
7
- "description": "Add agent runtime target support to the vended AgentCoreGateway construct and an agentName member to vended agent constructs",
8
- "implementation": "./src/migrations/latest/gateway-agent-targets/migration"
9
- },
10
- "latest-smithy-ssdk-bundle-pins": {
11
- "version": "1.0.0-rc.58",
12
- "description": "Bump the rolldown and dts plugin pins in the Smithy build.Dockerfile so the bundled SSDK type declaration resolves",
13
- "implementation": "./src/migrations/latest/smithy-ssdk-bundle-pins/migration"
14
- },
15
- "latest-gateway-cognito-passthrough": {
16
- "version": "1.0.0-rc.60",
17
- "description": "Front Cognito agents with an AgentCore Gateway via JWT passthrough: addAgent picks the target credential from the agent's auth, agent constructs gain an auth member, and Cognito runtimes allowlist the Authorization header",
18
- "implementation": "./src/migrations/latest/gateway-cognito-passthrough/migration"
19
- },
20
- "latest-waf-log-group-removal": {
21
- "version": "1.0.0-rc.60",
22
- "description": "Set RemovalPolicy.DESTROY on WAF log groups in the vended AgentCoreGateway and REST API constructs so a rolled-back deploy does not orphan them",
23
- "implementation": "./src/migrations/latest/waf-log-group-removal/migration"
24
- },
25
- "latest-strip-pip-from-python-images": {
26
- "version": "1.0.0-rc.60",
27
- "description": "Remove pip from vended Python agent / MCP server images so its vulnerable vendored packages are not present at runtime",
28
- "implementation": "./src/migrations/latest/strip-pip-from-python-images/migration"
29
- },
30
- "latest-py-agent-lifespan-construction": {
31
- "version": "1.0.0-rc.61",
32
- "description": "Move py#agent HTTP/AG-UI agent construction out of module import time and into a FastAPI lifespan handler, stored on app.state",
33
- "implementation": "./src/migrations/latest/py-agent-lifespan-construction/migration"
34
- },
35
- "latest-rename-load-runtime-config-target": {
36
- "version": "1.0.0-rc.62",
37
- "description": "Clone the react website 'load:runtime-config' target to a 'load-runtime-config' target so it can be run with the verb syntax (nx load-runtime-config <project>)",
38
- "implementation": "./src/migrations/latest/rename-load-runtime-config-target/migration"
39
- },
40
- "latest-add-deploy-sandbox-target": {
41
- "version": "1.0.0-rc.63",
42
- "description": "Add a deploy-sandbox target to CDK infrastructure projects which deploys the sandbox stage",
43
- "implementation": "./src/migrations/latest/add-deploy-sandbox-target/migration"
44
- },
45
- "latest-smithy-build-without-docker": {
46
- "version": "1.0.0-rc.64",
47
- "description": "Build Smithy projects with the Smithy CLI directly rather than in a container, removing the Docker prerequisite",
48
- "implementation": "./src/migrations/latest/smithy-build-without-docker/migration"
49
- },
50
- "latest-vite-config-import-meta-dirname": {
51
- "version": "1.0.0-rc.65",
52
- "description": "Resolve vite and vitest config paths from import.meta.dirname rather than __dirname",
53
- "implementation": "./src/migrations/latest/vite-config-import-meta-dirname/migration"
54
- },
55
- "latest-rolldown-code-splitting": {
56
- "version": "1.0.0-rc.65",
57
- "description": "Replace the deprecated inlineDynamicImports rolldown output option with codeSplitting",
58
- "implementation": "./src/migrations/latest/rolldown-code-splitting/migration"
5
+ "latest-smithy-server-package-rename": {
6
+ "version": "1.0.0-rc.67",
7
+ "description": "Move Smithy APIs onto the renamed @smithy/server-* packages",
8
+ "implementation": "./src/migrations/latest/smithy-server-package-rename/migration"
59
9
  },
60
10
  "v1.0.0-rc.50-0001-modernize-function-props-cast": {
61
11
  "version": "1.0.0-rc.50",
@@ -97,15 +47,70 @@
97
47
  "description": "Add session management support to ts#agent",
98
48
  "implementation": "./src/migrations/v1.0.0-rc.57/0001-ts-agent-session-management-support/migration"
99
49
  },
100
- "sync-vended-versions": {
50
+ "v1.0.0-rc.58-0001-smithy-ssdk-bundle-pins": {
51
+ "version": "1.0.0-rc.58",
52
+ "description": "Bump the rolldown and dts plugin pins in the Smithy build.Dockerfile so the bundled SSDK type declaration resolves",
53
+ "implementation": "./src/migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/migration"
54
+ },
55
+ "v1.0.0-rc.59-0001-gateway-agent-targets": {
56
+ "version": "1.0.0-rc.59",
57
+ "description": "Add agent runtime target support to the vended AgentCoreGateway construct and an agentName member to vended agent constructs",
58
+ "implementation": "./src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/migration"
59
+ },
60
+ "v1.0.0-rc.60-0001-gateway-cognito-passthrough": {
61
+ "version": "1.0.0-rc.60",
62
+ "description": "Front Cognito agents with an AgentCore Gateway via JWT passthrough: addAgent picks the target credential from the agent's auth, agent constructs gain an auth member, and Cognito runtimes allowlist the Authorization header",
63
+ "implementation": "./src/migrations/v1.0.0-rc.60/0001-gateway-cognito-passthrough/migration"
64
+ },
65
+ "v1.0.0-rc.60-0002-waf-log-group-removal": {
66
+ "version": "1.0.0-rc.60",
67
+ "description": "Set RemovalPolicy.DESTROY on WAF log groups in the vended AgentCoreGateway and REST API constructs so a rolled-back deploy does not orphan them",
68
+ "implementation": "./src/migrations/v1.0.0-rc.60/0002-waf-log-group-removal/migration"
69
+ },
70
+ "v1.0.0-rc.60-0003-strip-pip-from-python-images": {
71
+ "version": "1.0.0-rc.60",
72
+ "description": "Remove pip from vended Python agent / MCP server images so its vulnerable vendored packages are not present at runtime",
73
+ "implementation": "./src/migrations/v1.0.0-rc.60/0003-strip-pip-from-python-images/migration"
74
+ },
75
+ "v1.0.0-rc.61-0001-py-agent-lifespan-construction": {
76
+ "version": "1.0.0-rc.61",
77
+ "description": "Move py#agent HTTP/AG-UI agent construction out of module import time and into a FastAPI lifespan handler, stored on app.state",
78
+ "implementation": "./src/migrations/v1.0.0-rc.61/0001-py-agent-lifespan-construction/migration"
79
+ },
80
+ "v1.0.0-rc.62-0001-rename-load-runtime-config-target": {
81
+ "version": "1.0.0-rc.62",
82
+ "description": "Clone the react website 'load:runtime-config' target to a 'load-runtime-config' target so it can be run with the verb syntax (nx load-runtime-config <project>)",
83
+ "implementation": "./src/migrations/v1.0.0-rc.62/0001-rename-load-runtime-config-target/migration"
84
+ },
85
+ "v1.0.0-rc.63-0001-add-deploy-sandbox-target": {
86
+ "version": "1.0.0-rc.63",
87
+ "description": "Add a deploy-sandbox target to CDK infrastructure projects which deploys the sandbox stage",
88
+ "implementation": "./src/migrations/v1.0.0-rc.63/0001-add-deploy-sandbox-target/migration"
89
+ },
90
+ "v1.0.0-rc.64-0001-smithy-build-without-docker": {
91
+ "version": "1.0.0-rc.64",
92
+ "description": "Build Smithy projects with the Smithy CLI directly rather than in a container, removing the Docker prerequisite",
93
+ "implementation": "./src/migrations/v1.0.0-rc.64/0001-smithy-build-without-docker/migration"
94
+ },
95
+ "v1.0.0-rc.65-0001-vite-config-import-meta-dirname": {
101
96
  "version": "1.0.0-rc.65",
97
+ "description": "Resolve vite and vitest config paths from import.meta.dirname rather than __dirname",
98
+ "implementation": "./src/migrations/v1.0.0-rc.65/0001-vite-config-import-meta-dirname/migration"
99
+ },
100
+ "v1.0.0-rc.65-0002-rolldown-code-splitting": {
101
+ "version": "1.0.0-rc.65",
102
+ "description": "Replace the deprecated inlineDynamicImports rolldown output option with codeSplitting",
103
+ "implementation": "./src/migrations/v1.0.0-rc.65/0002-rolldown-code-splitting/migration"
104
+ },
105
+ "sync-vended-versions": {
106
+ "version": "1.0.0-rc.67",
102
107
  "description": "Sync vended dependency versions and the tracked plugin version to those vended by this release",
103
108
  "implementation": "./src/utils/version-upgrade-migration/migration"
104
109
  }
105
110
  },
106
111
  "packageJsonUpdates": {
107
112
  "nx-23.1.1-nx-packages": {
108
- "version": "1.0.0-rc.65",
113
+ "version": "1.0.0-rc.58",
109
114
  "packages": {
110
115
  "nx": {
111
116
  "version": "23.1.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/nx-plugin",
3
- "version": "1.0.0-rc.65",
3
+ "version": "1.0.0-rc.67",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/awslabs/nx-plugin-for-aws.git",
@@ -40,9 +40,9 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@apidevtools/swagger-parser": "12.1.0",
43
- "@astral-sh/ruff-wasm-nodejs": "0.16.1",
43
+ "@astral-sh/ruff-wasm-nodejs": "0.16.2",
44
44
  "@biomejs/js-api": "6.0.0",
45
- "@biomejs/wasm-nodejs": "2.5.6",
45
+ "@biomejs/wasm-nodejs": "2.5.7",
46
46
  "@getgrit/gritql": "0.0.3",
47
47
  "@iarna/toml": "2.2.5",
48
48
  "@modelcontextprotocol/sdk": "1.30.0",
@@ -79,7 +79,7 @@
79
79
  "typescript": "6.0.3",
80
80
  "unified": "11.0.5",
81
81
  "unist-util-visit": "5.1.0",
82
- "vite": "8.2.0",
82
+ "vite": "8.2.1",
83
83
  "vitest": "4.1.10",
84
84
  "zod": "4.4.3"
85
85
  },
@@ -7,7 +7,7 @@ exports[`agentcore-gateway generator > protocol: http > omits protocol_type from
7
7
  required_providers {
8
8
  aws = {
9
9
  source = "hashicorp/aws"
10
- version = "6.57.1"
10
+ version = "6.58.0"
11
11
  }
12
12
  time = {
13
13
  source = "hashicorp/time"
@@ -0,0 +1,3 @@
1
+ {
2
+ "description": "Move Smithy APIs onto the renamed @smithy/server-* packages"
3
+ }
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */ import { getProjects, joinPathFragments, readJson, updateJson } from "@nx/devkit";
5
+ import { applyGritQL, matchGritQL } from "../../../utils/ast.js";
6
+ import { formatFilesInSubtree } from "../../../utils/format.js";
7
+ /**
8
+ * Move a Smithy API onto the renamed `@smithy/server-*` packages.
9
+ *
10
+ * The Smithy server runtime was published as `@aws-smithy/server-*`, stopped at
11
+ * `1.0.0-alpha.10`, and was renamed to `@smithy/server-*`. The Server SDK codegen
12
+ * this release vends generates against the renamed packages, importing
13
+ * `AuthScheme` and `ServerInterceptor` — types the deprecated packages never
14
+ * exported — so a workspace left on them fails to bundle its SSDK.
15
+ *
16
+ * Both the imports and the declarations move: the renamed packages are no longer
17
+ * the same names, so the version sync cannot recognise the old ones and would
18
+ * leave them installed alongside the new.
19
+ *
20
+ * Guardrails:
21
+ * - Scoped to a Smithy API project this plugin generated, found through the
22
+ * metadata the generator records. A file of the user's own that happens to
23
+ * import these packages is left alone.
24
+ * - Imports are rewritten by module specifier, preserving whatever the file
25
+ * imports from it, so a project that imports more than the generated shape
26
+ * keeps its own bindings. Only the two packages the generators vend are
27
+ * matched: `@aws-smithy/server-common` is a transitive dependency of those and
28
+ * is never declared or imported directly.
29
+ * - A manifest is only rewritten where it declares the old package, and the new
30
+ * name takes the field the old one occupied. A workspace that already moved
31
+ * itself is left alone.
32
+ * - Idempotent: nothing matches the old names once they are gone.
33
+ *
34
+ * Every value here is hardcoded rather than read from the generators: this runs
35
+ * once, for the release that renamed the packages, so it has to keep applying
36
+ * that exact change however far the vended versions and generators move
37
+ * afterwards.
38
+ */ /** The id the `ts#smithy-api` generator records on the projects it creates. */ const SMITHY_API_GENERATOR_ID = 'ts#smithy-api';
39
+ /** The renamed packages, old name to new, with the version this release vends. */ const RENAMES = [
40
+ {
41
+ old: '@aws-smithy/server-apigateway',
42
+ renamed: '@smithy/server-apigateway',
43
+ version: '0.2.0'
44
+ },
45
+ {
46
+ old: '@aws-smithy/server-node',
47
+ renamed: '@smithy/server-node',
48
+ version: '0.2.0'
49
+ }
50
+ ];
51
+ /** The source files the generators give these imports. */ const SOURCE_FILES = [
52
+ 'src/handler.ts',
53
+ 'src/local-server.ts'
54
+ ];
55
+ /**
56
+ * Rewrite an import's module specifier, keeping its bindings — `$bindings` holds
57
+ * whatever the file imports, so a binding the project added survives the move.
58
+ */ const importPattern = (from, to)=>`\`import { $bindings } from '${from}'\` => \`import { $bindings } from '${to}'\``;
59
+ /** Whether the file still imports the old package under any other form. */ const hasRemainingImport = (from)=>`\`import $_ from '${from}'\``;
60
+ /** Rename the packages a manifest declares, reporting whether anything changed. */ const renameInManifest = (tree, path)=>{
61
+ if (!tree.exists(path)) {
62
+ return false;
63
+ }
64
+ const json = readJson(tree, path);
65
+ const fields = [
66
+ 'dependencies',
67
+ 'devDependencies'
68
+ ].filter((field)=>RENAMES.some(({ old })=>json[field]?.[old]));
69
+ if (fields.length === 0) {
70
+ return false;
71
+ }
72
+ updateJson(tree, path, (manifest)=>{
73
+ for (const field of fields){
74
+ const declared = manifest[field];
75
+ for (const { old, renamed, version } of RENAMES){
76
+ if (!declared[old]) {
77
+ continue;
78
+ }
79
+ delete declared[old];
80
+ // The vended pin rather than the old specifier: the renamed line
81
+ // restarted at 0.x, so carrying `1.0.0-alpha.10` across resolves nothing.
82
+ declared[renamed] = version;
83
+ }
84
+ }
85
+ return manifest;
86
+ });
87
+ return true;
88
+ };
89
+ const divergedNextStep = (path)=>`${path}: still imports a deprecated '@aws-smithy/server-*' package in a form this migration does not rewrite - update the import to the matching '@smithy/server-*' package by hand.`;
90
+ export default async function migration(tree) {
91
+ const nextSteps = [];
92
+ // Only a Smithy API project this plugin generated carries these packages.
93
+ const projects = [
94
+ ...getProjects(tree).values()
95
+ ].filter((project)=>project.metadata?.generator === SMITHY_API_GENERATOR_ID);
96
+ for (const project of projects){
97
+ for (const sourceFile of SOURCE_FILES){
98
+ const sourcePath = joinPathFragments(project.root, sourceFile);
99
+ if (!tree.exists(sourcePath)) {
100
+ continue;
101
+ }
102
+ for (const { old, renamed } of RENAMES){
103
+ await applyGritQL(tree, sourcePath, importPattern(old, renamed));
104
+ // A namespace or default import of the same package is left as it is —
105
+ // reported rather than rewritten, so a diverged file is never clobbered.
106
+ if (await matchGritQL(tree, sourcePath, hasRemainingImport(old))) {
107
+ nextSteps.push(divergedNextStep(sourcePath));
108
+ }
109
+ }
110
+ }
111
+ renameInManifest(tree, joinPathFragments(project.root, 'package.json'));
112
+ }
113
+ // A workspace may hoist these to the root manifest, which is not an nx project.
114
+ if (projects.length > 0) {
115
+ renameInManifest(tree, 'package.json');
116
+ }
117
+ await formatFilesInSubtree(tree);
118
+ return {
119
+ nextSteps
120
+ };
121
+ }
122
+
123
+ //# sourceMappingURL=migration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/nx-plugin/src/migrations/latest/smithy-server-package-rename/migration.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n getProjects,\n joinPathFragments,\n type MigrationReturnObject,\n readJson,\n type Tree,\n updateJson,\n} from '@nx/devkit';\nimport { applyGritQL, matchGritQL } from '../../../utils/ast';\nimport { formatFilesInSubtree } from '../../../utils/format';\n\n/**\n * Move a Smithy API onto the renamed `@smithy/server-*` packages.\n *\n * The Smithy server runtime was published as `@aws-smithy/server-*`, stopped at\n * `1.0.0-alpha.10`, and was renamed to `@smithy/server-*`. The Server SDK codegen\n * this release vends generates against the renamed packages, importing\n * `AuthScheme` and `ServerInterceptor` — types the deprecated packages never\n * exported — so a workspace left on them fails to bundle its SSDK.\n *\n * Both the imports and the declarations move: the renamed packages are no longer\n * the same names, so the version sync cannot recognise the old ones and would\n * leave them installed alongside the new.\n *\n * Guardrails:\n * - Scoped to a Smithy API project this plugin generated, found through the\n * metadata the generator records. A file of the user's own that happens to\n * import these packages is left alone.\n * - Imports are rewritten by module specifier, preserving whatever the file\n * imports from it, so a project that imports more than the generated shape\n * keeps its own bindings. Only the two packages the generators vend are\n * matched: `@aws-smithy/server-common` is a transitive dependency of those and\n * is never declared or imported directly.\n * - A manifest is only rewritten where it declares the old package, and the new\n * name takes the field the old one occupied. A workspace that already moved\n * itself is left alone.\n * - Idempotent: nothing matches the old names once they are gone.\n *\n * Every value here is hardcoded rather than read from the generators: this runs\n * once, for the release that renamed the packages, so it has to keep applying\n * that exact change however far the vended versions and generators move\n * afterwards.\n */\n\n/** The id the `ts#smithy-api` generator records on the projects it creates. */\nconst SMITHY_API_GENERATOR_ID = 'ts#smithy-api';\n\n/** The renamed packages, old name to new, with the version this release vends. */\nconst RENAMES = [\n {\n old: '@aws-smithy/server-apigateway',\n renamed: '@smithy/server-apigateway',\n version: '0.2.0',\n },\n {\n old: '@aws-smithy/server-node',\n renamed: '@smithy/server-node',\n version: '0.2.0',\n },\n] as const;\n\n/** The source files the generators give these imports. */\nconst SOURCE_FILES = ['src/handler.ts', 'src/local-server.ts'];\n\n/**\n * Rewrite an import's module specifier, keeping its bindings — `$bindings` holds\n * whatever the file imports, so a binding the project added survives the move.\n */\nconst importPattern = (from: string, to: string): string =>\n `\\`import { $bindings } from '${from}'\\` => \\`import { $bindings } from '${to}'\\``;\n\n/** Whether the file still imports the old package under any other form. */\nconst hasRemainingImport = (from: string): string =>\n `\\`import $_ from '${from}'\\``;\n\n/** Rename the packages a manifest declares, reporting whether anything changed. */\nconst renameInManifest = (tree: Tree, path: string): boolean => {\n if (!tree.exists(path)) {\n return false;\n }\n const json = readJson(tree, path);\n const fields = (['dependencies', 'devDependencies'] as const).filter(\n (field) => RENAMES.some(({ old }) => json[field]?.[old]),\n );\n if (fields.length === 0) {\n return false;\n }\n updateJson(tree, path, (manifest) => {\n for (const field of fields) {\n const declared = manifest[field] as Record<string, string>;\n for (const { old, renamed, version } of RENAMES) {\n if (!declared[old]) {\n continue;\n }\n delete declared[old];\n // The vended pin rather than the old specifier: the renamed line\n // restarted at 0.x, so carrying `1.0.0-alpha.10` across resolves nothing.\n declared[renamed] = version;\n }\n }\n return manifest;\n });\n return true;\n};\n\nconst divergedNextStep = (path: string): string =>\n `${path}: still imports a deprecated '@aws-smithy/server-*' package in a form this migration does not rewrite - update the import to the matching '@smithy/server-*' package by hand.`;\n\nexport default async function migration(\n tree: Tree,\n): Promise<MigrationReturnObject> {\n const nextSteps: string[] = [];\n\n // Only a Smithy API project this plugin generated carries these packages.\n const projects = [...getProjects(tree).values()].filter(\n (project) =>\n (project.metadata as { generator?: string } | undefined)?.generator ===\n SMITHY_API_GENERATOR_ID,\n );\n\n for (const project of projects) {\n for (const sourceFile of SOURCE_FILES) {\n const sourcePath = joinPathFragments(project.root, sourceFile);\n if (!tree.exists(sourcePath)) {\n continue;\n }\n for (const { old, renamed } of RENAMES) {\n await applyGritQL(tree, sourcePath, importPattern(old, renamed));\n // A namespace or default import of the same package is left as it is —\n // reported rather than rewritten, so a diverged file is never clobbered.\n if (await matchGritQL(tree, sourcePath, hasRemainingImport(old))) {\n nextSteps.push(divergedNextStep(sourcePath));\n }\n }\n }\n\n renameInManifest(tree, joinPathFragments(project.root, 'package.json'));\n }\n\n // A workspace may hoist these to the root manifest, which is not an nx project.\n if (projects.length > 0) {\n renameInManifest(tree, 'package.json');\n }\n\n await formatFilesInSubtree(tree);\n\n return { nextSteps };\n}\n"],"names":["getProjects","joinPathFragments","readJson","updateJson","applyGritQL","matchGritQL","formatFilesInSubtree","SMITHY_API_GENERATOR_ID","RENAMES","old","renamed","version","SOURCE_FILES","importPattern","from","to","hasRemainingImport","renameInManifest","tree","path","exists","json","fields","filter","field","some","length","manifest","declared","divergedNextStep","migration","nextSteps","projects","values","project","metadata","generator","sourceFile","sourcePath","root","push"],"mappings":"AAAA;;;CAGC,GACD,SACEA,WAAW,EACXC,iBAAiB,EAEjBC,QAAQ,EAERC,UAAU,QACL,aAAa;AACpB,SAASC,WAAW,EAAEC,WAAW,QAAQ,wBAAqB;AAC9D,SAASC,oBAAoB,QAAQ,2BAAwB;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BC,GAED,6EAA6E,GAC7E,MAAMC,0BAA0B;AAEhC,gFAAgF,GAChF,MAAMC,UAAU;IACd;QACEC,KAAK;QACLC,SAAS;QACTC,SAAS;IACX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AAW;WAAIhC,YAAYkB,MAAMe,MAAM;KAAG,CAACV,MAAM,CACrD,CAACW,UACC,AAACA,QAAQC,QAAQ,EAAyCC,cAC1D7B;IAGJ,KAAK,MAAM2B,WAAWF,SAAU;QAC9B,KAAK,MAAMK,cAAczB,aAAc;YACrC,MAAM0B,aAAarC,kBAAkBiC,QAAQK,IAAI,EAAEF;YACnD,IAAI,CAACnB,KAAKE,MAAM,CAACkB,aAAa;gBAC5B;YACF;YACA,KAAK,MAAM,EAAE7B,GAAG,EAAEC,OAAO,EAAE,IAAIF,QAAS;gBACtC,MAAMJ,YAAYc,MAAMoB,YAAYzB,cAAcJ,KAAKC;gBACvD,uEAAuE;gBACvE,yEAAyE;gBACzE,IAAI,MAAML,YAAYa,MAAMoB,YAAYtB,mBAAmBP,OAAO;oBAChEsB,UAAUS,IAAI,CAACX,iBAAiBS;gBAClC;YACF;QACF;QAEArB,iBAAiBC,MAAMjB,kBAAkBiC,QAAQK,IAAI,EAAE;IACzD;IAEA,gFAAgF;IAChF,IAAIP,SAASN,MAAM,GAAG,GAAG;QACvBT,iBAAiBC,MAAM;IACzB;IAEA,MAAMZ,qBAAqBY;IAE3B,OAAO;QAAEa;IAAU;AACrB"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/nx-plugin/src/migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/migration.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n getProjects,\n joinPathFragments,\n type MigrationReturnObject,\n type Tree,\n} from '@nx/devkit';\nimport { SMITHY_PROJECT_GENERATOR_INFO } from '../../../smithy/project/generator';\nimport { applyGritQL } from '../../../utils/ast';\nimport { formatFilesInSubtree } from '../../../utils/format';\nimport { isVendedUpgrade } from '../../../utils/version-upgrade-migration/vended-upgrade';\n\n/**\n * Move a Smithy `build.Dockerfile` onto the SSDK bundle pins this release fixes.\n *\n * `rolldown-plugin-dts` named the bundled declaration after its content hash\n * before 0.20.0, so the generated handler's `./generated/ssdk/index.js` import\n * found no `index.d.ts` beside it and `compile` failed with TS7016. The two pins\n * move together: the plugin release that fixed the naming needs a rolldown past\n * the pin this shipped with.\n *\n * There is no Dockerfile grammar, so each pin is matched as an anchored rewrite\n * over the whole file with the version captured — `${...}` in these patterns is\n * GritQL metavariable syntax, not interpolation.\n */\n\n/** A pin in the file body, and the version this migration moves it to. */\ninterface Pin {\n /** The package as the install command names it. */\n readonly name: string;\n readonly target: string;\n}\n\n/**\n * Hardcoded rather than read from `TS_VERSIONS`: this runs once, for the release\n * that fixed the declaration naming, so it must keep applying that exact change\n * however far the vended versions move afterwards. A workspace on a later release\n * gets the newer pins from the version sync instead.\n */\nconst PINS: readonly Pin[] = [\n { name: 'rolldown', target: '1.2.0' },\n { name: 'rolldown-plugin-dts', target: '0.28.0' },\n { name: '@rollup/plugin-esm-shim', target: '0.1.8' },\n];\n\n/** A version ends at whitespace, a line break or the end of the command. */\nconst VERSION = String.raw`[^\\s\\\\]+`;\n\nconst escapeRegExp = (value: string): string =>\n value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n/**\n * Rewrite every occurrence of one pin to its target version.\n *\n * The pin is matched by name, so a `rolldown-plugin-dts@x` in the same command as\n * `rolldown@y` keeps its own version — the `@` before the version terminates the\n * match, so the shorter name does not match the longer one.\n */\nconst rewritePin = ({ name, target }: Pin): string =>\n `r\"[\\\\s\\\\S]*${escapeRegExp(name)}@(${VERSION})[\\\\s\\\\S]*\"($version) where { $version => \\`${target}\\` }`;\n\n/** Whether the file pins this package behind the target version. */\nconst isBehindTarget = (contents: string, { name, target }: Pin): boolean => {\n const matches = contents.matchAll(\n new RegExp(`${escapeRegExp(name)}@(${VERSION})`, 'g'),\n );\n const declared = [...matches].flatMap((match) =>\n match[1] ? [match[1]] : [],\n );\n // A rewrite replaces every occurrence at once, so this has to hold for all of\n // them. Compared rather than tested for inequality, so a workspace a later\n // release has already moved past the target keeps its newer pin.\n return (\n declared.length > 0 &&\n declared.every((version) => isVendedUpgrade(target, version))\n );\n};\n\nconst divergedNextStep = (path: string): string =>\n `${path}: the Smithy build image's bundle pins have diverged from the generated shape - left untouched. Update \\`rolldown\\` to 1.2.0 and \\`rolldown-plugin-dts\\` to 0.28.0.`;\n\nexport default async function migration(\n tree: Tree,\n): Promise<MigrationReturnObject> {\n const nextSteps: string[] = [];\n\n // Only a Smithy service project bundles the SSDK; the shapes type builds the\n // model alone and pins none of this.\n const buildDockerfiles = [...getProjects(tree).values()]\n .filter((project) => {\n const metadata = project.metadata as\n | { generator?: string; smithyType?: string }\n | undefined;\n return (\n metadata?.generator === SMITHY_PROJECT_GENERATOR_INFO.id &&\n metadata.smithyType === 'service'\n );\n })\n .map((project) => joinPathFragments(project.root, 'build.Dockerfile'))\n .filter((filePath) => tree.exists(filePath));\n\n for (const path of buildDockerfiles) {\n const contents = tree.read(path, 'utf-8') ?? '';\n\n for (const pin of PINS) {\n if (!isBehindTarget(contents, pin)) {\n continue;\n }\n if (!(await applyGritQL(tree, path, rewritePin(pin)))) {\n nextSteps.push(divergedNextStep(path));\n break;\n }\n }\n }\n\n await formatFilesInSubtree(tree);\n\n return { nextSteps };\n}\n"],"names":["getProjects","joinPathFragments","SMITHY_PROJECT_GENERATOR_INFO","applyGritQL","formatFilesInSubtree","isVendedUpgrade","PINS","name","target","VERSION","String","raw","escapeRegExp","value","replace","rewritePin","isBehindTarget","contents","matches","matchAll","RegExp","declared","flatMap","match","length","every","version","divergedNextStep","path","migration","tree","nextSteps","buildDockerfiles","values","filter","project","metadata","generator","id","smithyType","map","root","filePath","exists","read","pin","push"],"mappings":"AAAA;;;CAGC,GACD,SACEA,WAAW,EACXC,iBAAiB,QAGZ,aAAa;AACpB,SAASC,6BAA6B,QAAQ,uCAAoC;AAClF,SAASC,WAAW,QAAQ,wBAAqB;AACjD,SAASC,oBAAoB,QAAQ,2BAAwB;AAC7D,SAASC,eAAe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A,UAAUC,cAAcnC,8BAA8BoC,EAAE,IACxDF,SAASG,UAAU,KAAK;IAE5B,GACCC,GAAG,CAAC,CAACL,UAAYlC,kBAAkBkC,QAAQM,IAAI,EAAE,qBACjDP,MAAM,CAAC,CAACQ,WAAaZ,KAAKa,MAAM,CAACD;IAEpC,KAAK,MAAMd,QAAQI,iBAAkB;QACnC,MAAMf,WAAWa,KAAKc,IAAI,CAAChB,MAAM,YAAY;QAE7C,KAAK,MAAMiB,OAAOvC,KAAM;YACtB,IAAI,CAACU,eAAeC,UAAU4B,MAAM;gBAClC;YACF;YACA,IAAI,CAAE,MAAM1C,YAAY2B,MAAMF,MAAMb,WAAW8B,OAAQ;gBACrDd,UAAUe,IAAI,CAACnB,iBAAiBC;gBAChC;YACF;QACF;IACF;IAEA,MAAMxB,qBAAqB0B;IAE3B,OAAO;QAAEC;IAAU;AACrB"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/nx-plugin/src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/migration.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport type { MigrationReturnObject, Tree } from '@nx/devkit';\nimport {\n applyGritQL,\n GRIT_INSERT_PLACEHOLDER,\n insertViaGritQL,\n matchGritQL,\n} from '../../../utils/ast';\nimport { formatFilesInSubtree } from '../../../utils/format';\nimport {\n PACKAGES_DIR,\n SHARED_CONSTRUCTS_DIR,\n} from '../../../utils/shared-constructs-constants';\n\n/**\n * Bring existing workspaces up to the generators' current gateway-target\n * support, so agents can be attached to an http-protocol AgentCore Gateway:\n *\n * - The vended `AgentCoreGateway` core construct gains the `protocol` prop\n * (http gateways have no protocol type, which AgentCore Runtime targets\n * require) and the `addAgent` / `addAgentTarget` methods.\n * - Vended agent constructs gain the `agentName` member `addAgent` reads as\n * the default gateway target name.\n *\n * Both files are generated with `KeepExisting`, so without this an upgraded\n * workspace pairs new app-level constructs with stale core ones.\n */\n\nconst GATEWAY_CONSTRUCT_FILE = `${PACKAGES_DIR}/${SHARED_CONSTRUCTS_DIR}/src/core/agentcore-gateway/agentcore-gateway.ts`;\n\nconst AGENTS_DIR = `${PACKAGES_DIR}/${SHARED_CONSTRUCTS_DIR}/src/app/agents`;\n\nconst PROTOCOL_PROP = `/**\n * The gateway's protocol. An \\`mcp\\` gateway aggregates MCP server targets\n * into a single MCP endpoint. An \\`http\\` gateway has no protocol type and\n * proxies requests to AgentCore Runtime targets via path-based routing\n * (\\`/<targetName>/invocations\\`) — the target type AgentCore only allows on\n * gateways without a protocol type.\n *\n * @default 'mcp'\n */\n readonly protocol?: 'mcp' | 'http';`;\n\nconst PROTOCOL_CONSTRUCTOR_STATEMENTS = `this.protocol = props?.protocol ?? 'mcp';\n`;\n\nconst PROTOCOL_TYPE_REMOVAL = `\n if (this.protocol === 'http') {\n // AgentCore Runtime targets require a gateway without a protocol type,\n // which the Gateway L2 cannot express — it always renders MCP — so\n // remove the protocol from the underlying CloudFormation resource.\n const cfnGateway = this.gateway.node.defaultChild as agentcore.CfnGateway;\n cfnGateway.addPropertyDeletionOverride('ProtocolType');\n cfnGateway.addPropertyDeletionOverride('ProtocolConfiguration');\n }`;\n\nconst AGENT_TARGET_METHODS = `\n /**\n * Add an agent runtime construct as a target of this Gateway. Requires the\n * \\`http\\` protocol — the gateway proxies requests for the agent under\n * \\`<gatewayUrl>/<targetName>/invocations\\`, without protocol translation.\n *\n * The target name defaults to the agent construct's \\`agentName\\` (its\n * project's class name in kebab-case, e.g. \\`MyAgent\\` -> \\`my-agent\\`). It\n * forms the target's invocation path, so renaming it later is a breaking\n * change for consumers.\n */\n public addAgent(\n agent: Construct & {\n readonly agentCoreRuntime: agentcore.Runtime;\n readonly agentName: string;\n },\n props?: {\n gatewayTargetName?: string;\n },\n ): agentcore.CfnGatewayTarget {\n return this.addAgentTarget({\n gatewayTargetName: props?.gatewayTargetName ?? agent.agentName,\n agentRuntimeArn: agent.agentCoreRuntime.agentRuntimeArn,\n });\n }\n\n /**\n * Register an agent runtime ARN as a Gateway target. Prefer\n * {@link addAgent} when the construct is in scope.\n */\n public addAgentTarget(props: {\n gatewayTargetName: string;\n agentRuntimeArn: string;\n }): agentcore.CfnGatewayTarget {\n if (this.protocol !== 'http') {\n throw new Error(\n \\`Agent runtime targets require an http-protocol gateway, but this gateway uses '\\${this.protocol}'.\\`,\n );\n }\n\n // The construct id is derived from the target name so the two change\n // together — target names are unique per gateway, and replacing a target\n // under an unchanged name fails with AlreadyExists.\n const target = new agentcore.CfnGatewayTarget(\n this,\n \\`Target-\\${props.gatewayTargetName}\\`,\n {\n gatewayIdentifier: this.gateway.gatewayId,\n name: props.gatewayTargetName,\n targetConfiguration: {\n http: {\n agentcoreRuntime: {\n arn: props.agentRuntimeArn,\n qualifier: 'DEFAULT',\n },\n },\n },\n // The bare gateway IAM role credential: runtime targets reject the\n // iamCredentialProvider detail MCP targets carry.\n credentialProviderConfigurations: [\n {\n credentialProviderType: 'GATEWAY_IAM_ROLE',\n },\n ],\n },\n );\n\n // Grant the gateway role invoke access to the target runtime before the\n // target is created — AgentCore validates access to the runtime during\n // target creation.\n const grant = this.gateway.role.addToPrincipalPolicy(\n new iam.PolicyStatement({\n actions: [\n 'bedrock-agentcore:InvokeAgentRuntime',\n 'bedrock-agentcore:InvokeAgentRuntimeWithWebSocketStream',\n // A2A targets additionally serve their agent card via the gateway.\n 'bedrock-agentcore:GetAgentCard',\n ],\n resources: [props.agentRuntimeArn, \\`\\${props.agentRuntimeArn}/*\\`],\n }),\n );\n if (grant.policyDependable) {\n target.node.addDependency(grant.policyDependable);\n }\n\n return target;\n }`;\n\n/**\n * Add the `protocol` prop, its constructor handling and the agent-target\n * methods to the vended `AgentCoreGateway` core construct.\n */\nconst migrateGatewayConstruct = async (\n tree: Tree,\n nextSteps: string[],\n): Promise<void> => {\n if (!tree.exists(GATEWAY_CONSTRUCT_FILE)) {\n // No vended gateway construct in this workspace - nothing to migrate.\n return;\n }\n\n if (\n (tree.read(GATEWAY_CONSTRUCT_FILE, 'utf-8') ?? '').includes(\n 'addAgentTarget',\n )\n ) {\n // Already migrated.\n return;\n }\n\n const divergedMessage = `${GATEWAY_CONSTRUCT_FILE}: the AgentCoreGateway construct has diverged from the generated shape - left untouched. Re-run the agentcore-gateway generator in a fresh workspace to see the current construct, which supports agent runtime targets via a 'protocol' prop and addAgent()/addAgentTarget() methods.`;\n\n // Anchored on the shapes every vended version of the construct carries: the\n // props interface, the class field the protocol field is inserted after,\n // and the Gateway creation in the constructor.\n const hasVendedShape =\n (await matchGritQL(\n tree,\n GATEWAY_CONSTRUCT_FILE,\n '`export interface AgentCoreGatewayProps { $_ }`',\n )) &&\n (await matchGritQL(\n tree,\n GATEWAY_CONSTRUCT_FILE,\n '`private readonly targetRuntimeArns: string[] = []`',\n )) &&\n (await matchGritQL(\n tree,\n GATEWAY_CONSTRUCT_FILE,\n \"`this.gateway = new agentcore.Gateway(this, 'Gateway', $_)`\",\n ));\n\n if (!hasVendedShape) {\n nextSteps.push(divergedMessage);\n return;\n }\n\n // 1. The protocol prop on AgentCoreGatewayProps. The placeholder keeps the\n // prop's doc comment (with its backticks) out of the GritQL pattern.\n await insertViaGritQL(\n tree,\n GATEWAY_CONSTRUCT_FILE,\n `\\`export interface AgentCoreGatewayProps { $members }\\` where {\n $members <: not contains \\`protocol\\`\n} => \\`export interface AgentCoreGatewayProps { $members\n ${GRIT_INSERT_PLACEHOLDER}\n}\\``,\n PROTOCOL_PROP,\n );\n\n // 2. The protocol class field. Matched without the trailing semicolon —\n // GritQL parses the snippet standalone, where the semicolon is not part\n // of the field's AST node.\n await applyGritQL(\n tree,\n GATEWAY_CONSTRUCT_FILE,\n `\\`private readonly targetRuntimeArns: string[] = []\\` as $field where {\n $program <: not contains \\`private readonly protocol\\`\n} => \\`$field;\n private readonly protocol: 'mcp' | 'http'\\``,\n );\n\n // 3. Assign the field and remove the protocol type for http gateways.\n await insertViaGritQL(\n tree,\n GATEWAY_CONSTRUCT_FILE,\n `\\`this.gateway = new agentcore.Gateway($args);\\` as $stmt where {\n $program <: not contains \\`this.protocol = props\\`\n} => \\`${GRIT_INSERT_PLACEHOLDER}\n $stmt\\``,\n PROTOCOL_CONSTRUCTOR_STATEMENTS,\n );\n await insertViaGritQL(\n tree,\n GATEWAY_CONSTRUCT_FILE,\n `\\`this.gateway = new agentcore.Gateway($args);\\` as $stmt where {\n $program <: not contains \\`addPropertyDeletionOverride\\`\n} => \\`$stmt\n${GRIT_INSERT_PLACEHOLDER}\\``,\n PROTOCOL_TYPE_REMOVAL,\n );\n\n // 4. The agent-target methods, inserted after addGatewayTarget (present in\n // every vended version that also has the readiness probe field).\n const addedMethods = await insertViaGritQL(\n tree,\n GATEWAY_CONSTRUCT_FILE,\n `\\`public addGatewayTarget($params): agentcore.CfnGatewayTarget { $body }\\` as $method where {\n $program <: not contains \\`addAgentTarget\\`\n} => \\`$method\n${GRIT_INSERT_PLACEHOLDER}\\``,\n AGENT_TARGET_METHODS,\n );\n\n if (!addedMethods) {\n nextSteps.push(divergedMessage);\n return;\n }\n};\n\n/**\n * Add the `agentName` member to each vended agent construct, which\n * `AgentCoreGateway.addAgent` reads as the default gateway target name.\n */\nconst migrateAgentConstructs = async (\n tree: Tree,\n nextSteps: string[],\n): Promise<void> => {\n if (!tree.exists(AGENTS_DIR)) {\n return;\n }\n for (const dir of tree.children(AGENTS_DIR)) {\n const constructFile = `${AGENTS_DIR}/${dir}/${dir}.ts`;\n if (!tree.exists(constructFile)) {\n continue;\n }\n if ((tree.read(constructFile, 'utf-8') ?? '').includes('agentName')) {\n // Already migrated (or user-added).\n continue;\n }\n const added = await insertViaGritQL(\n tree,\n constructFile,\n `\\`public readonly agentCoreRuntime: Runtime\\` as $field => \\`$field;\n ${GRIT_INSERT_PLACEHOLDER}\\``,\n `/** Default Gateway target name for this agent. */\n public readonly agentName = '${dir}'`,\n );\n if (!added) {\n nextSteps.push(\n `${constructFile}: the agent construct has diverged from the generated shape - left untouched. To attach this agent to a gateway with addAgent(), add a \\`public readonly agentName = '${dir}';\\` member (or use addAgentTarget() with an explicit target name).`,\n );\n }\n }\n};\n\nexport default async function migration(\n tree: Tree,\n): Promise<MigrationReturnObject> {\n const nextSteps: string[] = [];\n\n await migrateGatewayConstruct(tree, nextSteps);\n await migrateAgentConstructs(tree, nextSteps);\n\n await formatFilesInSubtree(tree);\n\n return { nextSteps };\n}\n"],"names":["applyGritQL","GRIT_INSERT_PLACEHOLDER","insertViaGritQL","matchGritQL","formatFilesInSubtree","PACKAGES_DIR","SHARED_CONSTRUCTS_DIR","GATEWAY_CONSTRUCT_FILE","AGENTS_DIR","PROTOCOL_PROP","PROTOCOL_CONSTRUCTOR_STATEMENTS","PROTOCOL_TYPE_REMOVAL","AGENT_TARGET_METHODS","migrateGatewayConstruct","tree","nextSteps","exists","read","includes","divergedMessage","hasVendedShape","push","addedMethods","migrateAgentConstructs","dir","children","constructFile","added","migration"],"mappings":"AAAA;;;CAGC,GAED,SACEA,WAAW,EACXC,uBAAuB,EACvBC,eAAe,EACfC,WAAW,QACN,wBAAqB;AAC5B,SAASC,oBAAoB,QAAQ,2BAAwB;AAC7D,SACEC,YAAY,EACZC,qBAAqB,QAChB,gDAA6C;AAEpD;;;;;;;;;;;;CAYC,GAED,MAAMC,yBAAyB,GAAGF,aAAa,CAAC,EAAEC,sBAAsB,gDAAgD,CAAC;AAEzH,MAAME,aAAa,GAAGH,aAAa,CAAC,EAAEC,sBAAsB,eAAe,CAAC;AAE5E,MAAMG,gBAAgB,CAAC;;;;;;;;;qCASc,CAAC;AAEtC,MAAMC,kCAAkC,CAAC;AACzC,CAAC;AAED,MAAMC,wBAAwB,CAAC;;;;;;;;KAQ1B,CAAC;AAEN,MAAMC,uBAAuB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsF3B,CAAC;AAEJ;;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