@aws/nx-plugin 1.0.0-rc.80 → 1.0.0-rc.82
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.
- package/LICENSE-THIRD-PARTY +59 -33
- package/migrations.json +31 -21
- package/package.json +5 -5
- package/src/agentcore-gateway/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/migrations/latest/runtime-config-namespace-defaults/metadata.json +3 -0
- package/src/migrations/latest/runtime-config-namespace-defaults/migration.js +131 -0
- package/src/migrations/latest/runtime-config-namespace-defaults/migration.js.map +1 -0
- package/src/migrations/latest/terraform-load-runtime-config-src-path/metadata.json +3 -0
- package/src/migrations/latest/terraform-load-runtime-config-src-path/migration.d.ts +6 -0
- package/src/migrations/latest/terraform-load-runtime-config-src-path/migration.js +48 -0
- package/src/migrations/latest/terraform-load-runtime-config-src-path/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.73/0001-remove-mcp-inspector-license-exceptions/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.73/0002-apt-security-updates-in-container-images/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.73/0002-apt-security-updates-in-container-images/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.74/0001-py-agent-session-id-middleware-extraction/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.75/0001-ts-agent-session-id-middleware-extraction/migration.js.map +1 -0
- package/src/preset/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/py/agent/__snapshots__/generator.constructs.spec.ts.snap +4 -4
- package/src/py/agent/__snapshots__/generator.frameworks.spec.ts.snap +5 -5
- package/src/py/agent/__snapshots__/generator.protocols.spec.ts.snap +2 -2
- package/src/py/agent/a2a-connection/generator.d.ts +1 -1
- package/src/py/agent/gateway-connection/generator.d.ts +1 -1
- package/src/py/agent/mcp-connection/generator.d.ts +1 -1
- package/src/py/dynamodb/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/py/fast-api/__snapshots__/generator.terraform.spec.ts.snap +12 -12
- package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +4 -4
- package/src/py/rdb/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/smithy/project/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +8 -8
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +12 -12
- package/src/ts/agent/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/ts/astro-docs/generator.d.ts +2 -0
- package/src/ts/astro-docs/generator.js +7 -0
- package/src/ts/astro-docs/generator.js.map +1 -1
- package/src/ts/dcr-proxy/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/ts/dynamodb/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/ts/lambda-function/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +4 -4
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +25 -25
- package/src/ts/react-website/app/generator.js +2 -2
- package/src/ts/react-website/app/generator.js.map +1 -1
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.terraform.spec.ts.snap +2 -2
- package/src/utils/files/terraform/src/core/runtime-config/appconfig/appconfig.tf.template +2 -2
- package/src/utils/files/terraform/src/core/runtime-config/appconfig-deployment/appconfig-deployment.tf.template +1 -1
- package/src/utils/shared-constructs-constants.d.ts +17 -0
- package/src/utils/shared-constructs-constants.js +14 -0
- package/src/utils/shared-constructs-constants.js.map +1 -1
- package/src/utils/versions.d.ts +60 -59
- package/src/utils/versions.js +59 -58
- package/src/utils/versions.js.map +1 -1
- package/src/migrations/latest/apt-security-updates-in-container-images/migration.js.map +0 -1
- package/src/migrations/latest/py-agent-session-id-middleware-extraction/migration.js.map +0 -1
- package/src/migrations/latest/remove-mcp-inspector-license-exceptions/migration.js.map +0 -1
- package/src/migrations/latest/ts-agent-session-id-middleware-extraction/migration.js.map +0 -1
- /package/src/migrations/latest/{apt-security-updates-in-container-images → runtime-config-namespace-defaults}/migration.d.ts +0 -0
- /package/src/migrations/{latest/remove-mcp-inspector-license-exceptions → v1.0.0-rc.73/0001-remove-mcp-inspector-license-exceptions}/metadata.json +0 -0
- /package/src/migrations/{latest/remove-mcp-inspector-license-exceptions → v1.0.0-rc.73/0001-remove-mcp-inspector-license-exceptions}/migration.d.ts +0 -0
- /package/src/migrations/{latest/remove-mcp-inspector-license-exceptions → v1.0.0-rc.73/0001-remove-mcp-inspector-license-exceptions}/migration.js +0 -0
- /package/src/migrations/{latest/apt-security-updates-in-container-images → v1.0.0-rc.73/0002-apt-security-updates-in-container-images}/__snapshots__/migration.spec.ts.snap +0 -0
- /package/src/migrations/{latest/apt-security-updates-in-container-images → v1.0.0-rc.73/0002-apt-security-updates-in-container-images}/metadata.json +0 -0
- /package/src/migrations/{latest/apt-security-updates-in-container-images → v1.0.0-rc.73/0002-apt-security-updates-in-container-images}/migration.js +0 -0
- /package/src/migrations/{latest/py-agent-session-id-middleware-extraction → v1.0.0-rc.74/0001-py-agent-session-id-middleware-extraction}/metadata.json +0 -0
- /package/src/migrations/{latest/py-agent-session-id-middleware-extraction → v1.0.0-rc.74/0001-py-agent-session-id-middleware-extraction}/migration.d.ts +0 -0
- /package/src/migrations/{latest/py-agent-session-id-middleware-extraction → v1.0.0-rc.74/0001-py-agent-session-id-middleware-extraction}/migration.js +0 -0
- /package/src/migrations/{latest/ts-agent-session-id-middleware-extraction → v1.0.0-rc.75/0001-ts-agent-session-id-middleware-extraction}/metadata.json +0 -0
- /package/src/migrations/{latest/ts-agent-session-id-middleware-extraction → v1.0.0-rc.75/0001-ts-agent-session-id-middleware-extraction}/migration.d.ts +0 -0
- /package/src/migrations/{latest/ts-agent-session-id-middleware-extraction → v1.0.0-rc.75/0001-ts-agent-session-id-middleware-extraction}/migration.js +0 -0
package/LICENSE-THIRD-PARTY
CHANGED
|
@@ -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.
|
|
220
|
+
The following software may be included in this product: @astral-sh/ruff-wasm-nodejs (0.16.4)
|
|
221
221
|
This software contains the following license and notice below:
|
|
222
222
|
|
|
223
223
|
MIT License
|
|
@@ -7558,7 +7558,7 @@ SOFTWARE
|
|
|
7558
7558
|
|
|
7559
7559
|
---
|
|
7560
7560
|
|
|
7561
|
-
The following software may be included in this product: @verdaccio/auth (8.1.
|
|
7561
|
+
The following software may be included in this product: @verdaccio/auth (8.1.2)
|
|
7562
7562
|
This software contains the following license and notice below:
|
|
7563
7563
|
|
|
7564
7564
|
MIT License
|
|
@@ -7585,7 +7585,7 @@ SOFTWARE.
|
|
|
7585
7585
|
|
|
7586
7586
|
---
|
|
7587
7587
|
|
|
7588
|
-
The following software may be included in this product: @verdaccio/config (8.2.
|
|
7588
|
+
The following software may be included in this product: @verdaccio/config (8.2.2)
|
|
7589
7589
|
This software contains the following license and notice below:
|
|
7590
7590
|
|
|
7591
7591
|
MIT License
|
|
@@ -7612,7 +7612,7 @@ SOFTWARE.
|
|
|
7612
7612
|
|
|
7613
7613
|
---
|
|
7614
7614
|
|
|
7615
|
-
The following software may be included in this product: @verdaccio/core (8.2.
|
|
7615
|
+
The following software may be included in this product: @verdaccio/core (8.2.2)
|
|
7616
7616
|
This software contains the following license and notice below:
|
|
7617
7617
|
|
|
7618
7618
|
MIT License
|
|
@@ -7666,7 +7666,7 @@ SOFTWARE.
|
|
|
7666
7666
|
|
|
7667
7667
|
---
|
|
7668
7668
|
|
|
7669
|
-
The following software may be included in this product: @verdaccio/hooks (8.1.
|
|
7669
|
+
The following software may be included in this product: @verdaccio/hooks (8.1.3)
|
|
7670
7670
|
This software contains the following license and notice below:
|
|
7671
7671
|
|
|
7672
7672
|
MIT License
|
|
@@ -7693,7 +7693,7 @@ SOFTWARE.
|
|
|
7693
7693
|
|
|
7694
7694
|
---
|
|
7695
7695
|
|
|
7696
|
-
The following software may be included in this product: @verdaccio/loaders (8.1.
|
|
7696
|
+
The following software may be included in this product: @verdaccio/loaders (8.1.2)
|
|
7697
7697
|
This software contains the following license and notice below:
|
|
7698
7698
|
|
|
7699
7699
|
MIT License
|
|
@@ -7720,7 +7720,7 @@ SOFTWARE.
|
|
|
7720
7720
|
|
|
7721
7721
|
---
|
|
7722
7722
|
|
|
7723
|
-
The following software may be included in this product: @verdaccio/local-storage-legacy (11.4.
|
|
7723
|
+
The following software may be included in this product: @verdaccio/local-storage-legacy (11.4.2)
|
|
7724
7724
|
This software contains the following license and notice below:
|
|
7725
7725
|
|
|
7726
7726
|
MIT License
|
|
@@ -7747,7 +7747,7 @@ SOFTWARE.
|
|
|
7747
7747
|
|
|
7748
7748
|
---
|
|
7749
7749
|
|
|
7750
|
-
The following software may be included in this product: @verdaccio/logger (8.1.
|
|
7750
|
+
The following software may be included in this product: @verdaccio/logger (8.1.2)
|
|
7751
7751
|
This software contains the following license and notice below:
|
|
7752
7752
|
|
|
7753
7753
|
MIT License
|
|
@@ -7774,7 +7774,7 @@ SOFTWARE.
|
|
|
7774
7774
|
|
|
7775
7775
|
---
|
|
7776
7776
|
|
|
7777
|
-
The following software may be included in this product: @verdaccio/logger-commons (8.1.
|
|
7777
|
+
The following software may be included in this product: @verdaccio/logger-commons (8.1.2)
|
|
7778
7778
|
This software contains the following license and notice below:
|
|
7779
7779
|
|
|
7780
7780
|
MIT License
|
|
@@ -7828,7 +7828,7 @@ SOFTWARE.
|
|
|
7828
7828
|
|
|
7829
7829
|
---
|
|
7830
7830
|
|
|
7831
|
-
The following software may be included in this product: @verdaccio/middleware (8.1.
|
|
7831
|
+
The following software may be included in this product: @verdaccio/middleware (8.1.2)
|
|
7832
7832
|
This software contains the following license and notice below:
|
|
7833
7833
|
|
|
7834
7834
|
MIT License
|
|
@@ -7855,7 +7855,7 @@ SOFTWARE.
|
|
|
7855
7855
|
|
|
7856
7856
|
---
|
|
7857
7857
|
|
|
7858
|
-
The following software may be included in this product: @verdaccio/package-filter (13.
|
|
7858
|
+
The following software may be included in this product: @verdaccio/package-filter (13.2.0)
|
|
7859
7859
|
This software contains the following license and notice below:
|
|
7860
7860
|
|
|
7861
7861
|
MIT License
|
|
@@ -7909,7 +7909,7 @@ SOFTWARE.
|
|
|
7909
7909
|
|
|
7910
7910
|
---
|
|
7911
7911
|
|
|
7912
|
-
The following software may be included in this product: @verdaccio/signature (8.1.
|
|
7912
|
+
The following software may be included in this product: @verdaccio/signature (8.1.2)
|
|
7913
7913
|
This software contains the following license and notice below:
|
|
7914
7914
|
|
|
7915
7915
|
MIT License
|
|
@@ -7963,7 +7963,7 @@ SOFTWARE.
|
|
|
7963
7963
|
|
|
7964
7964
|
---
|
|
7965
7965
|
|
|
7966
|
-
The following software may be included in this product: @verdaccio/tarball (13.1.
|
|
7966
|
+
The following software may be included in this product: @verdaccio/tarball (13.1.2)
|
|
7967
7967
|
This software contains the following license and notice below:
|
|
7968
7968
|
|
|
7969
7969
|
MIT License
|
|
@@ -7990,7 +7990,7 @@ SOFTWARE.
|
|
|
7990
7990
|
|
|
7991
7991
|
---
|
|
7992
7992
|
|
|
7993
|
-
The following software may be included in this product: @verdaccio/ui-theme (9.0.0-next-9.
|
|
7993
|
+
The following software may be included in this product: @verdaccio/ui-theme (9.0.0-next-9.26)
|
|
7994
7994
|
This software contains the following license and notice below:
|
|
7995
7995
|
|
|
7996
7996
|
MIT License
|
|
@@ -8017,7 +8017,7 @@ SOFTWARE.
|
|
|
8017
8017
|
|
|
8018
8018
|
---
|
|
8019
8019
|
|
|
8020
|
-
The following software may be included in this product: @verdaccio/url (13.1.
|
|
8020
|
+
The following software may be included in this product: @verdaccio/url (13.1.2)
|
|
8021
8021
|
This software contains the following license and notice below:
|
|
8022
8022
|
|
|
8023
8023
|
MIT License
|
|
@@ -8044,7 +8044,7 @@ SOFTWARE.
|
|
|
8044
8044
|
|
|
8045
8045
|
---
|
|
8046
8046
|
|
|
8047
|
-
The following software may be included in this product: @verdaccio/utils (8.2.
|
|
8047
|
+
The following software may be included in this product: @verdaccio/utils (8.2.2)
|
|
8048
8048
|
This software contains the following license and notice below:
|
|
8049
8049
|
|
|
8050
8050
|
MIT License
|
|
@@ -8071,7 +8071,7 @@ SOFTWARE.
|
|
|
8071
8071
|
|
|
8072
8072
|
---
|
|
8073
8073
|
|
|
8074
|
-
The following software may be included in this product: @vitest/coverage-v8 (4.1.
|
|
8074
|
+
The following software may be included in this product: @vitest/coverage-v8 (4.1.11)
|
|
8075
8075
|
This software contains the following license and notice below:
|
|
8076
8076
|
|
|
8077
8077
|
MIT License
|
|
@@ -8098,7 +8098,7 @@ SOFTWARE.
|
|
|
8098
8098
|
|
|
8099
8099
|
---
|
|
8100
8100
|
|
|
8101
|
-
The following software may be included in this product: @vitest/expect (4.1.
|
|
8101
|
+
The following software may be included in this product: @vitest/expect (4.1.11)
|
|
8102
8102
|
This software contains the following license and notice below:
|
|
8103
8103
|
|
|
8104
8104
|
MIT License
|
|
@@ -8125,7 +8125,7 @@ SOFTWARE.
|
|
|
8125
8125
|
|
|
8126
8126
|
---
|
|
8127
8127
|
|
|
8128
|
-
The following software may be included in this product: @vitest/mocker (4.1.
|
|
8128
|
+
The following software may be included in this product: @vitest/mocker (4.1.11)
|
|
8129
8129
|
This software contains the following license and notice below:
|
|
8130
8130
|
|
|
8131
8131
|
MIT License
|
|
@@ -8152,7 +8152,7 @@ SOFTWARE.
|
|
|
8152
8152
|
|
|
8153
8153
|
---
|
|
8154
8154
|
|
|
8155
|
-
The following software may be included in this product: @vitest/pretty-format (4.1.
|
|
8155
|
+
The following software may be included in this product: @vitest/pretty-format (4.1.11)
|
|
8156
8156
|
This software contains the following license and notice below:
|
|
8157
8157
|
|
|
8158
8158
|
MIT License
|
|
@@ -8179,7 +8179,7 @@ SOFTWARE.
|
|
|
8179
8179
|
|
|
8180
8180
|
---
|
|
8181
8181
|
|
|
8182
|
-
The following software may be included in this product: @vitest/runner (4.1.
|
|
8182
|
+
The following software may be included in this product: @vitest/runner (4.1.11)
|
|
8183
8183
|
This software contains the following license and notice below:
|
|
8184
8184
|
|
|
8185
8185
|
MIT License
|
|
@@ -8206,7 +8206,7 @@ SOFTWARE.
|
|
|
8206
8206
|
|
|
8207
8207
|
---
|
|
8208
8208
|
|
|
8209
|
-
The following software may be included in this product: @vitest/snapshot (4.1.
|
|
8209
|
+
The following software may be included in this product: @vitest/snapshot (4.1.11)
|
|
8210
8210
|
This software contains the following license and notice below:
|
|
8211
8211
|
|
|
8212
8212
|
MIT License
|
|
@@ -8233,7 +8233,7 @@ SOFTWARE.
|
|
|
8233
8233
|
|
|
8234
8234
|
---
|
|
8235
8235
|
|
|
8236
|
-
The following software may be included in this product: @vitest/spy (4.1.
|
|
8236
|
+
The following software may be included in this product: @vitest/spy (4.1.11)
|
|
8237
8237
|
This software contains the following license and notice below:
|
|
8238
8238
|
|
|
8239
8239
|
MIT License
|
|
@@ -8260,7 +8260,7 @@ SOFTWARE.
|
|
|
8260
8260
|
|
|
8261
8261
|
---
|
|
8262
8262
|
|
|
8263
|
-
The following software may be included in this product: @vitest/ui (4.1.
|
|
8263
|
+
The following software may be included in this product: @vitest/ui (4.1.11)
|
|
8264
8264
|
This software contains the following license and notice below:
|
|
8265
8265
|
|
|
8266
8266
|
MIT License
|
|
@@ -8287,7 +8287,7 @@ SOFTWARE.
|
|
|
8287
8287
|
|
|
8288
8288
|
---
|
|
8289
8289
|
|
|
8290
|
-
The following software may be included in this product: @vitest/utils (4.1.
|
|
8290
|
+
The following software may be included in this product: @vitest/utils (4.1.11)
|
|
8291
8291
|
This software contains the following license and notice below:
|
|
8292
8292
|
|
|
8293
8293
|
MIT License
|
|
@@ -22492,6 +22492,32 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
22492
22492
|
|
|
22493
22493
|
---
|
|
22494
22494
|
|
|
22495
|
+
The following software may be included in this product: postcss (8.5.26)
|
|
22496
|
+
This software contains the following license and notice below:
|
|
22497
|
+
|
|
22498
|
+
The MIT License (MIT)
|
|
22499
|
+
|
|
22500
|
+
Copyright 2013 Andrey Sitnik <andrey@sitnik.es>
|
|
22501
|
+
|
|
22502
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
22503
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
22504
|
+
the Software without restriction, including without limitation the rights to
|
|
22505
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
22506
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
22507
|
+
subject to the following conditions:
|
|
22508
|
+
|
|
22509
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22510
|
+
copies or substantial portions of the Software.
|
|
22511
|
+
|
|
22512
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22513
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
22514
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
22515
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
22516
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
22517
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22518
|
+
|
|
22519
|
+
---
|
|
22520
|
+
|
|
22495
22521
|
The following software may be included in this product: postcss-modules (6.0.1)
|
|
22496
22522
|
This software contains the following license and notice below:
|
|
22497
22523
|
|
|
@@ -25901,7 +25927,7 @@ SOFTWARE.
|
|
|
25901
25927
|
|
|
25902
25928
|
---
|
|
25903
25929
|
|
|
25904
|
-
The following software may be included in this product: tinyexec (1.
|
|
25930
|
+
The following software may be included in this product: tinyexec (1.2.4)
|
|
25905
25931
|
This software contains the following license and notice below:
|
|
25906
25932
|
|
|
25907
25933
|
MIT License
|
|
@@ -27163,7 +27189,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
27163
27189
|
|
|
27164
27190
|
---
|
|
27165
27191
|
|
|
27166
|
-
The following software may be included in this product: verdaccio (6.
|
|
27192
|
+
The following software may be included in this product: verdaccio (6.10.0)
|
|
27167
27193
|
This software contains the following license and notice below:
|
|
27168
27194
|
|
|
27169
27195
|
MIT License
|
|
@@ -27190,7 +27216,7 @@ SOFTWARE.
|
|
|
27190
27216
|
|
|
27191
27217
|
---
|
|
27192
27218
|
|
|
27193
|
-
The following software may be included in this product: verdaccio-audit (13.1.
|
|
27219
|
+
The following software may be included in this product: verdaccio-audit (13.1.2)
|
|
27194
27220
|
This software contains the following license and notice below:
|
|
27195
27221
|
|
|
27196
27222
|
MIT License
|
|
@@ -27217,7 +27243,7 @@ SOFTWARE.
|
|
|
27217
27243
|
|
|
27218
27244
|
---
|
|
27219
27245
|
|
|
27220
|
-
The following software may be included in this product: verdaccio-htpasswd (13.1.
|
|
27246
|
+
The following software may be included in this product: verdaccio-htpasswd (13.1.2)
|
|
27221
27247
|
This software contains the following license and notice below:
|
|
27222
27248
|
|
|
27223
27249
|
MIT License
|
|
@@ -27324,7 +27350,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
27324
27350
|
|
|
27325
27351
|
---
|
|
27326
27352
|
|
|
27327
|
-
The following software may be included in this product: vite (8.2.
|
|
27353
|
+
The following software may be included in this product: vite (8.2.2)
|
|
27328
27354
|
This software contains the following license and notice below:
|
|
27329
27355
|
|
|
27330
27356
|
# Vite core license
|
|
@@ -29652,7 +29678,7 @@ Repository: https://github.com/sveltejs/zimmerframe
|
|
|
29652
29678
|
|
|
29653
29679
|
---
|
|
29654
29680
|
|
|
29655
|
-
The following software may be included in this product: vitest (4.1.
|
|
29681
|
+
The following software may be included in this product: vitest (4.1.11)
|
|
29656
29682
|
This software contains the following license and notice below:
|
|
29657
29683
|
|
|
29658
29684
|
# Vitest core license
|
|
@@ -33495,7 +33521,7 @@ under the terms of *both* these licenses.
|
|
|
33495
33521
|
|
|
33496
33522
|
---
|
|
33497
33523
|
|
|
33498
|
-
The following software may be included in this product: @swc/core (1.16.
|
|
33524
|
+
The following software may be included in this product: @swc/core (1.16.1)
|
|
33499
33525
|
This software contains the following license and notice below:
|
|
33500
33526
|
|
|
33501
33527
|
Apache License
|
|
@@ -41208,7 +41234,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
41208
41234
|
|
|
41209
41235
|
---
|
|
41210
41236
|
|
|
41211
|
-
The following software may be included in this product: @swc/core-linux-x64-gnu (1.16.
|
|
41237
|
+
The following software may be included in this product: @swc/core-linux-x64-gnu (1.16.1)
|
|
41212
41238
|
This software contains the following license and notice below:
|
|
41213
41239
|
|
|
41214
41240
|
Apache License
|
package/migrations.json
CHANGED
|
@@ -2,26 +2,6 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"name": "@aws/nx-plugin",
|
|
4
4
|
"generators": {
|
|
5
|
-
"latest-remove-mcp-inspector-license-exceptions": {
|
|
6
|
-
"version": "1.0.0-rc.73",
|
|
7
|
-
"description": "Remove the obsolete MCP Inspector license exceptions",
|
|
8
|
-
"implementation": "./src/migrations/latest/remove-mcp-inspector-license-exceptions/migration"
|
|
9
|
-
},
|
|
10
|
-
"latest-apt-security-updates-in-container-images": {
|
|
11
|
-
"version": "1.0.0-rc.73",
|
|
12
|
-
"description": "Apply the distribution's security updates in vended agent / MCP server container images",
|
|
13
|
-
"implementation": "./src/migrations/latest/apt-security-updates-in-container-images/migration"
|
|
14
|
-
},
|
|
15
|
-
"latest-py-agent-session-id-middleware-extraction": {
|
|
16
|
-
"version": "1.0.0-rc.74",
|
|
17
|
-
"description": "Extract the duplicated _SessionIdMiddleware class in py#agent's main.py into a shared middleware/session_id_middleware.py module",
|
|
18
|
-
"implementation": "./src/migrations/latest/py-agent-session-id-middleware-extraction/migration"
|
|
19
|
-
},
|
|
20
|
-
"latest-ts-agent-session-id-middleware-extraction": {
|
|
21
|
-
"version": "1.0.0-rc.75",
|
|
22
|
-
"description": "Extract the duplicated session-id Express middleware in ts#agent's ag-ui/a2a index.ts into a shared middleware/session-id-middleware.ts module",
|
|
23
|
-
"implementation": "./src/migrations/latest/ts-agent-session-id-middleware-extraction/migration"
|
|
24
|
-
},
|
|
25
5
|
"latest-dynamodb-configurable-encryption": {
|
|
26
6
|
"version": "1.0.0-rc.77",
|
|
27
7
|
"description": "Surface encryption and encryptionKey on the vended DynamoDBTable construct/module",
|
|
@@ -42,6 +22,16 @@
|
|
|
42
22
|
"description": "Forward the py#agent Strands hooks to the AG-UI adapter so model and tool errors are reported",
|
|
43
23
|
"implementation": "./src/migrations/latest/py-agent-ag-ui-hooks/migration"
|
|
44
24
|
},
|
|
25
|
+
"latest-terraform-load-runtime-config-src-path": {
|
|
26
|
+
"version": "1.0.0-rc.82",
|
|
27
|
+
"description": "Point the react website's terraform load-runtime-config target at the runtime-config file the terraform aggregation actually writes",
|
|
28
|
+
"implementation": "./src/migrations/latest/terraform-load-runtime-config-src-path/migration"
|
|
29
|
+
},
|
|
30
|
+
"latest-runtime-config-namespace-defaults": {
|
|
31
|
+
"version": "1.0.0-rc.82",
|
|
32
|
+
"description": "Provision AppConfig configuration profiles for every namespace the vended terraform modules write to",
|
|
33
|
+
"implementation": "./src/migrations/latest/runtime-config-namespace-defaults/migration"
|
|
34
|
+
},
|
|
45
35
|
"v1.0.0-rc.50-0001-modernize-function-props-cast": {
|
|
46
36
|
"version": "1.0.0-rc.50",
|
|
47
37
|
"description": "Replace the legacy angle-bracket FunctionProps type assertion with the modern as syntax in generated API constructs",
|
|
@@ -162,8 +152,28 @@
|
|
|
162
152
|
"description": "Add session management support to py#agent",
|
|
163
153
|
"implementation": "./src/migrations/v1.0.0-rc.72/0001-py-agent-session-management-support/migration"
|
|
164
154
|
},
|
|
155
|
+
"v1.0.0-rc.73-0001-remove-mcp-inspector-license-exceptions": {
|
|
156
|
+
"version": "1.0.0-rc.73",
|
|
157
|
+
"description": "Remove the obsolete MCP Inspector license exceptions",
|
|
158
|
+
"implementation": "./src/migrations/v1.0.0-rc.73/0001-remove-mcp-inspector-license-exceptions/migration"
|
|
159
|
+
},
|
|
160
|
+
"v1.0.0-rc.73-0002-apt-security-updates-in-container-images": {
|
|
161
|
+
"version": "1.0.0-rc.73",
|
|
162
|
+
"description": "Apply the distribution's security updates in vended agent / MCP server container images",
|
|
163
|
+
"implementation": "./src/migrations/v1.0.0-rc.73/0002-apt-security-updates-in-container-images/migration"
|
|
164
|
+
},
|
|
165
|
+
"v1.0.0-rc.74-0001-py-agent-session-id-middleware-extraction": {
|
|
166
|
+
"version": "1.0.0-rc.74",
|
|
167
|
+
"description": "Extract the duplicated _SessionIdMiddleware class in py#agent's main.py into a shared middleware/session_id_middleware.py module",
|
|
168
|
+
"implementation": "./src/migrations/v1.0.0-rc.74/0001-py-agent-session-id-middleware-extraction/migration"
|
|
169
|
+
},
|
|
170
|
+
"v1.0.0-rc.75-0001-ts-agent-session-id-middleware-extraction": {
|
|
171
|
+
"version": "1.0.0-rc.75",
|
|
172
|
+
"description": "Extract the duplicated session-id Express middleware in ts#agent's ag-ui/a2a index.ts into a shared middleware/session-id-middleware.ts module",
|
|
173
|
+
"implementation": "./src/migrations/v1.0.0-rc.75/0001-ts-agent-session-id-middleware-extraction/migration"
|
|
174
|
+
},
|
|
165
175
|
"sync-vended-versions": {
|
|
166
|
-
"version": "1.0.0-rc.
|
|
176
|
+
"version": "1.0.0-rc.82",
|
|
167
177
|
"description": "Sync vended dependency versions and the tracked plugin version to those vended by this release",
|
|
168
178
|
"implementation": "./src/utils/version-upgrade-migration/migration"
|
|
169
179
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws/nx-plugin",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.82",
|
|
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.
|
|
43
|
+
"@astral-sh/ruff-wasm-nodejs": "0.16.4",
|
|
44
44
|
"@biomejs/js-api": "6.0.0",
|
|
45
|
-
"@biomejs/wasm-nodejs": "2.5.
|
|
45
|
+
"@biomejs/wasm-nodejs": "2.5.10",
|
|
46
46
|
"@getgrit/gritql": "0.0.3",
|
|
47
47
|
"@iarna/toml": "2.2.5",
|
|
48
48
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"typescript": "6.0.3",
|
|
80
80
|
"unified": "11.0.5",
|
|
81
81
|
"unist-util-visit": "5.1.0",
|
|
82
|
-
"vite": "8.2.
|
|
83
|
-
"vitest": "4.1.
|
|
82
|
+
"vite": "8.2.2",
|
|
83
|
+
"vitest": "4.1.11",
|
|
84
84
|
"zod": "4.4.3"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
@@ -56,7 +56,7 @@ exports[`infra generator > should configure Checkov target correctly > checkov-t
|
|
|
56
56
|
"{workspaceRoot}/dist/{projectRoot}/cdk.out",
|
|
57
57
|
],
|
|
58
58
|
"options": {
|
|
59
|
-
"command": "uvx --from checkov==3.3.
|
|
59
|
+
"command": "uvx --from checkov==3.3.13 checkov --config-file {projectRoot}/checkov.yml --directory dist/{projectRoot}/cdk.out --framework cloudformation",
|
|
60
60
|
},
|
|
61
61
|
"outputs": [
|
|
62
62
|
"{workspaceRoot}/dist/{projectRoot}/checkov",
|
|
@@ -150,7 +150,7 @@ exports[`infra generator > should configure project.json with correct targets >
|
|
|
150
150
|
"{workspaceRoot}/dist/{projectRoot}/cdk.out",
|
|
151
151
|
],
|
|
152
152
|
"options": {
|
|
153
|
-
"command": "uvx --from checkov==3.3.
|
|
153
|
+
"command": "uvx --from checkov==3.3.13 checkov --config-file {projectRoot}/checkov.yml --directory dist/{projectRoot}/cdk.out --framework cloudformation",
|
|
154
154
|
},
|
|
155
155
|
"outputs": [
|
|
156
156
|
"{workspaceRoot}/dist/{projectRoot}/checkov",
|
|
@@ -745,7 +745,7 @@ exports[`infra generator > should handle custom project names correctly > custom
|
|
|
745
745
|
"{workspaceRoot}/dist/{projectRoot}/cdk.out",
|
|
746
746
|
],
|
|
747
747
|
"options": {
|
|
748
|
-
"command": "uvx --from checkov==3.3.
|
|
748
|
+
"command": "uvx --from checkov==3.3.13 checkov --config-file {projectRoot}/checkov.yml --directory dist/{projectRoot}/cdk.out --framework cloudformation",
|
|
749
749
|
},
|
|
750
750
|
"outputs": [
|
|
751
751
|
"{workspaceRoot}/dist/{projectRoot}/checkov",
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/ import { visitNotIgnoredFiles } from "@nx/devkit";
|
|
5
|
+
import { applyGritQL, matchGritQL } from "../../../utils/ast.js";
|
|
6
|
+
import { formatFilesInSubtree } from "../../../utils/format.js";
|
|
7
|
+
import { PACKAGES_DIR, SHARED_TERRAFORM_DIR } from "../../../utils/shared-constructs-constants.js";
|
|
8
|
+
/**
|
|
9
|
+
* Provision AppConfig configuration profiles for every namespace the vended terraform modules write to
|
|
10
|
+
*
|
|
11
|
+
* `core/runtime-config/appconfig` creates one configuration profile per entry in
|
|
12
|
+
* its `namespaces` list, and `appconfig-deployment` aggregates and deploys the
|
|
13
|
+
* same list. A module contributing an entry to a namespace outside that list
|
|
14
|
+
* writes its entry file to disk and nothing more — the value never reaches
|
|
15
|
+
* AppConfig, so a consumer reading it back fails at runtime. The vended defaults
|
|
16
|
+
* now cover `dynamodb` and `database` alongside `connection` and `agentcore`.
|
|
17
|
+
*
|
|
18
|
+
* Root modules that pass `namespaces` explicitly are updated too, since an
|
|
19
|
+
* explicit list overrides the vended default.
|
|
20
|
+
*
|
|
21
|
+
* How to write a migration:
|
|
22
|
+
* - https://nx.dev/docs/kb/migration-generators
|
|
23
|
+
* - What `nextSteps` means: https://nx.dev/docs/reference/devkit/MigrationReturnObject
|
|
24
|
+
*
|
|
25
|
+
* Guardrails:
|
|
26
|
+
* - Transform source with GritQL (`applyGritQL`, `matchGritQL`), not regexes or
|
|
27
|
+
* string replacements: it matches the AST, so it holds up against however the
|
|
28
|
+
* user's copy has been formatted. Use `updateJson` for JSON.
|
|
29
|
+
* - Pattern-match before writing: skip files that have diverged from the shape
|
|
30
|
+
* your generators produce and report them via `nextSteps`, or consider a
|
|
31
|
+
* hybrid migration, rather than clobbering the user's changes.
|
|
32
|
+
* - `nextSteps` is for work left for the user to do by hand, not a log of the
|
|
33
|
+
* edits you made: an edit that applied cleanly needs no entry.
|
|
34
|
+
* - Idempotent: re-running must be a no-op.
|
|
35
|
+
* - Format what you write: finish with `formatFilesInSubtree` so the files your
|
|
36
|
+
* migration wrote are formatted correctly.
|
|
37
|
+
*/ /** Namespaces the vended modules write to that the old defaults omitted. */ const ADDED_NAMESPACES = [
|
|
38
|
+
'database',
|
|
39
|
+
'dynamodb'
|
|
40
|
+
];
|
|
41
|
+
const RUNTIME_CONFIG_DIR = `${PACKAGES_DIR}/${SHARED_TERRAFORM_DIR}/src/core/runtime-config`;
|
|
42
|
+
const APPCONFIG_FILE = `${RUNTIME_CONFIG_DIR}/appconfig/appconfig.tf`;
|
|
43
|
+
const APPCONFIG_DEPLOYMENT_FILE = `${RUNTIME_CONFIG_DIR}/appconfig-deployment/appconfig-deployment.tf`;
|
|
44
|
+
const hcl = (pattern)=>`language hcl\n${pattern}`;
|
|
45
|
+
/** The `namespaces` variable declaration in a vended appconfig module. */ const VENDED_DEFAULT = {
|
|
46
|
+
block: 'variable "namespaces" { $body }',
|
|
47
|
+
attribute: 'default'
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* A call to the vended appconfig module that passes `namespaces` explicitly.
|
|
51
|
+
* `$src` binds the quoted string, so the regex ends at the closing quote — that
|
|
52
|
+
* anchor is what keeps the sibling `appconfig-deployment` call, which takes its
|
|
53
|
+
* namespaces from this module's output, out of scope.
|
|
54
|
+
*/ const ROOT_MODULE_ARGUMENT = {
|
|
55
|
+
block: 'module $name { $body }',
|
|
56
|
+
attribute: 'namespaces',
|
|
57
|
+
clauses: '$body <: contains `source = $src`, $src <: r".*runtime-config/appconfig\\"", $body <: contains `namespaces = $_`'
|
|
58
|
+
};
|
|
59
|
+
/** A GritQL pattern matching the enclosing block, plus any extra clauses. */ const scopePattern = (list, extraClauses)=>{
|
|
60
|
+
const clauses = [
|
|
61
|
+
list.clauses,
|
|
62
|
+
extraClauses
|
|
63
|
+
].filter(Boolean).join(', ');
|
|
64
|
+
return hcl(`\`${list.block}\`${clauses ? ` where { ${clauses} }` : ''}`);
|
|
65
|
+
};
|
|
66
|
+
/** Whether a namespace already appears in the list. */ const listsNamespace = (tree, filePath, list, namespace)=>matchGritQL(tree, filePath, scopePattern(list, `$body <: contains \`"${namespace}"\``));
|
|
67
|
+
/**
|
|
68
|
+
* Append a namespace to the list. Appended within the list rather than
|
|
69
|
+
* re-emitting it, so no trailing hole is introduced.
|
|
70
|
+
*/ const appendNamespace = (tree, filePath, list, namespace)=>applyGritQL(tree, filePath, scopePattern(list, `$body <: contains bubble \`${list.attribute} = [$items]\` where { $items <: [$..., $last], $last += \`, "${namespace}"\` }`));
|
|
71
|
+
/**
|
|
72
|
+
* Add every missing namespace to a list, returning false when one could not be
|
|
73
|
+
* added. Already-listed namespaces are skipped, which is what makes a re-run a
|
|
74
|
+
* no-op.
|
|
75
|
+
*/ const addMissingNamespaces = async (tree, filePath, list)=>{
|
|
76
|
+
for (const namespace of ADDED_NAMESPACES){
|
|
77
|
+
if (await listsNamespace(tree, filePath, list, namespace)) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
if (!await appendNamespace(tree, filePath, list, namespace)) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return true;
|
|
85
|
+
};
|
|
86
|
+
/** The vended module's own description, updated to document the new defaults. */ const DESCRIPTION_REWRITE = scopePattern(VENDED_DEFAULT, '$body <: contains bubble `description = $desc` where { $desc <: r".*one Configuration Profile is created per namespace.*", $desc => `"List of runtime-config namespaces this AppConfig application should expose (one Configuration Profile is created per namespace). The default covers every namespace the generated modules write to, and a namespace with no contributions deploys an empty profile — when adding namespaces of your own, keep the defaults alongside them."` }');
|
|
87
|
+
const missing = ADDED_NAMESPACES.map((n)=>`"${n}"`).join(' and ');
|
|
88
|
+
const divergedNextStep = (filePath)=>`${filePath}: the \`namespaces\` variable has diverged from the generated shape - left untouched. Add ${missing} to its \`default\` list, otherwise no configuration profile is created for them and the entries the vended dynamodb/database modules contribute are never deployed.`;
|
|
89
|
+
const rootModuleNextStep = (filePath)=>`${filePath}: passes \`namespaces\` to the runtime-config appconfig module in a shape this migration could not update - left untouched. Add ${missing} to that list, or drop the argument to take the module's defaults, otherwise the entries the vended dynamodb/database modules contribute are never deployed.`;
|
|
90
|
+
/** Bring one vended appconfig module's `namespaces` default up to date. */ const migrateVendedModule = async (tree, filePath, nextSteps)=>{
|
|
91
|
+
if (!tree.exists(filePath)) {
|
|
92
|
+
return; // This workspace has no Terraform runtime config.
|
|
93
|
+
}
|
|
94
|
+
if (!await addMissingNamespaces(tree, filePath, VENDED_DEFAULT)) {
|
|
95
|
+
nextSteps.push(divergedNextStep(filePath));
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Root modules that pass `namespaces` explicitly override the vended default, so
|
|
100
|
+
* they need the same additions.
|
|
101
|
+
*/ const migrateRootModules = async (tree, nextSteps)=>{
|
|
102
|
+
const terraformFiles = [];
|
|
103
|
+
visitNotIgnoredFiles(tree, '', (filePath)=>{
|
|
104
|
+
if (filePath.endsWith('.tf') && !filePath.startsWith(RUNTIME_CONFIG_DIR)) {
|
|
105
|
+
terraformFiles.push(filePath);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
for (const filePath of terraformFiles){
|
|
109
|
+
if (!await matchGritQL(tree, filePath, scopePattern(ROOT_MODULE_ARGUMENT))) {
|
|
110
|
+
continue; // Takes the module's defaults, so nothing to update.
|
|
111
|
+
}
|
|
112
|
+
if (!await addMissingNamespaces(tree, filePath, ROOT_MODULE_ARGUMENT)) {
|
|
113
|
+
nextSteps.push(rootModuleNextStep(filePath));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
export default async function migration(tree) {
|
|
118
|
+
const nextSteps = [];
|
|
119
|
+
await migrateVendedModule(tree, APPCONFIG_FILE, nextSteps);
|
|
120
|
+
await migrateVendedModule(tree, APPCONFIG_DEPLOYMENT_FILE, nextSteps);
|
|
121
|
+
if (tree.exists(APPCONFIG_FILE)) {
|
|
122
|
+
await applyGritQL(tree, APPCONFIG_FILE, DESCRIPTION_REWRITE);
|
|
123
|
+
}
|
|
124
|
+
await migrateRootModules(tree, nextSteps);
|
|
125
|
+
await formatFilesInSubtree(tree);
|
|
126
|
+
return {
|
|
127
|
+
nextSteps
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../packages/nx-plugin/src/migrations/latest/runtime-config-namespace-defaults/migration.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n type MigrationReturnObject,\n type Tree,\n visitNotIgnoredFiles,\n} from '@nx/devkit';\nimport { applyGritQL, matchGritQL } from '../../../utils/ast.js';\nimport { formatFilesInSubtree } from '../../../utils/format.js';\nimport {\n PACKAGES_DIR,\n SHARED_TERRAFORM_DIR,\n} from '../../../utils/shared-constructs-constants.js';\n\n/**\n * Provision AppConfig configuration profiles for every namespace the vended terraform modules write to\n *\n * `core/runtime-config/appconfig` creates one configuration profile per entry in\n * its `namespaces` list, and `appconfig-deployment` aggregates and deploys the\n * same list. A module contributing an entry to a namespace outside that list\n * writes its entry file to disk and nothing more — the value never reaches\n * AppConfig, so a consumer reading it back fails at runtime. The vended defaults\n * now cover `dynamodb` and `database` alongside `connection` and `agentcore`.\n *\n * Root modules that pass `namespaces` explicitly are updated too, since an\n * explicit list overrides the vended default.\n *\n * How to write a migration:\n * - https://nx.dev/docs/kb/migration-generators\n * - What `nextSteps` means: https://nx.dev/docs/reference/devkit/MigrationReturnObject\n *\n * Guardrails:\n * - Transform source with GritQL (`applyGritQL`, `matchGritQL`), not regexes or\n * string replacements: it matches the AST, so it holds up against however the\n * user's copy has been formatted. Use `updateJson` for JSON.\n * - Pattern-match before writing: skip files that have diverged from the shape\n * your generators produce and report them via `nextSteps`, or consider a\n * hybrid migration, rather than clobbering the user's changes.\n * - `nextSteps` is for work left for the user to do by hand, not a log of the\n * edits you made: an edit that applied cleanly needs no entry.\n * - Idempotent: re-running must be a no-op.\n * - Format what you write: finish with `formatFilesInSubtree` so the files your\n * migration wrote are formatted correctly.\n */\n\n/** Namespaces the vended modules write to that the old defaults omitted. */\nconst ADDED_NAMESPACES = ['database', 'dynamodb'];\n\nconst RUNTIME_CONFIG_DIR = `${PACKAGES_DIR}/${SHARED_TERRAFORM_DIR}/src/core/runtime-config`;\nconst APPCONFIG_FILE = `${RUNTIME_CONFIG_DIR}/appconfig/appconfig.tf`;\nconst APPCONFIG_DEPLOYMENT_FILE = `${RUNTIME_CONFIG_DIR}/appconfig-deployment/appconfig-deployment.tf`;\n\nconst hcl = (pattern: string) => `language hcl\\n${pattern}`;\n\n/**\n * Where a `namespaces` list lives, as the block that encloses it and the\n * attribute holding the list. `clauses` narrows the block further, keeping an\n * unrelated list elsewhere in the file out of scope; `$body` is the block's body\n * in every case, so the clauses below can all be written against it.\n */\ninterface NamespaceList {\n readonly block: string;\n readonly attribute: string;\n readonly clauses?: string;\n}\n\n/** The `namespaces` variable declaration in a vended appconfig module. */\nconst VENDED_DEFAULT: NamespaceList = {\n block: 'variable \"namespaces\" { $body }',\n attribute: 'default',\n};\n\n/**\n * A call to the vended appconfig module that passes `namespaces` explicitly.\n * `$src` binds the quoted string, so the regex ends at the closing quote — that\n * anchor is what keeps the sibling `appconfig-deployment` call, which takes its\n * namespaces from this module's output, out of scope.\n */\nconst ROOT_MODULE_ARGUMENT: NamespaceList = {\n block: 'module $name { $body }',\n attribute: 'namespaces',\n clauses:\n '$body <: contains `source = $src`, $src <: r\".*runtime-config/appconfig\\\\\"\", $body <: contains `namespaces = $_`',\n};\n\n/** A GritQL pattern matching the enclosing block, plus any extra clauses. */\nconst scopePattern = (list: NamespaceList, extraClauses?: string) => {\n const clauses = [list.clauses, extraClauses].filter(Boolean).join(', ');\n return hcl(`\\`${list.block}\\`${clauses ? ` where { ${clauses} }` : ''}`);\n};\n\n/** Whether a namespace already appears in the list. */\nconst listsNamespace = (\n tree: Tree,\n filePath: string,\n list: NamespaceList,\n namespace: string,\n) =>\n matchGritQL(\n tree,\n filePath,\n scopePattern(list, `$body <: contains \\`\"${namespace}\"\\``),\n );\n\n/**\n * Append a namespace to the list. Appended within the list rather than\n * re-emitting it, so no trailing hole is introduced.\n */\nconst appendNamespace = (\n tree: Tree,\n filePath: string,\n list: NamespaceList,\n namespace: string,\n) =>\n applyGritQL(\n tree,\n filePath,\n scopePattern(\n list,\n `$body <: contains bubble \\`${list.attribute} = [$items]\\` where { $items <: [$..., $last], $last += \\`, \"${namespace}\"\\` }`,\n ),\n );\n\n/**\n * Add every missing namespace to a list, returning false when one could not be\n * added. Already-listed namespaces are skipped, which is what makes a re-run a\n * no-op.\n */\nconst addMissingNamespaces = async (\n tree: Tree,\n filePath: string,\n list: NamespaceList,\n): Promise<boolean> => {\n for (const namespace of ADDED_NAMESPACES) {\n if (await listsNamespace(tree, filePath, list, namespace)) {\n continue;\n }\n if (!(await appendNamespace(tree, filePath, list, namespace))) {\n return false;\n }\n }\n return true;\n};\n\n/** The vended module's own description, updated to document the new defaults. */\nconst DESCRIPTION_REWRITE = scopePattern(\n VENDED_DEFAULT,\n '$body <: contains bubble `description = $desc` where { $desc <: r\".*one Configuration Profile is created per namespace.*\", $desc => `\"List of runtime-config namespaces this AppConfig application should expose (one Configuration Profile is created per namespace). The default covers every namespace the generated modules write to, and a namespace with no contributions deploys an empty profile — when adding namespaces of your own, keep the defaults alongside them.\"` }',\n);\n\nconst missing = ADDED_NAMESPACES.map((n) => `\"${n}\"`).join(' and ');\n\nconst divergedNextStep = (filePath: string) =>\n `${filePath}: the \\`namespaces\\` variable has diverged from the generated shape - left untouched. Add ${missing} to its \\`default\\` list, otherwise no configuration profile is created for them and the entries the vended dynamodb/database modules contribute are never deployed.`;\n\nconst rootModuleNextStep = (filePath: string) =>\n `${filePath}: passes \\`namespaces\\` to the runtime-config appconfig module in a shape this migration could not update - left untouched. Add ${missing} to that list, or drop the argument to take the module's defaults, otherwise the entries the vended dynamodb/database modules contribute are never deployed.`;\n\n/** Bring one vended appconfig module's `namespaces` default up to date. */\nconst migrateVendedModule = async (\n tree: Tree,\n filePath: string,\n nextSteps: string[],\n): Promise<void> => {\n if (!tree.exists(filePath)) {\n return; // This workspace has no Terraform runtime config.\n }\n\n if (!(await addMissingNamespaces(tree, filePath, VENDED_DEFAULT))) {\n nextSteps.push(divergedNextStep(filePath));\n }\n};\n\n/**\n * Root modules that pass `namespaces` explicitly override the vended default, so\n * they need the same additions.\n */\nconst migrateRootModules = async (\n tree: Tree,\n nextSteps: string[],\n): Promise<void> => {\n const terraformFiles: string[] = [];\n visitNotIgnoredFiles(tree, '', (filePath) => {\n if (filePath.endsWith('.tf') && !filePath.startsWith(RUNTIME_CONFIG_DIR)) {\n terraformFiles.push(filePath);\n }\n });\n\n for (const filePath of terraformFiles) {\n if (\n !(await matchGritQL(tree, filePath, scopePattern(ROOT_MODULE_ARGUMENT)))\n ) {\n continue; // Takes the module's defaults, so nothing to update.\n }\n\n if (!(await addMissingNamespaces(tree, filePath, ROOT_MODULE_ARGUMENT))) {\n nextSteps.push(rootModuleNextStep(filePath));\n }\n }\n};\n\nexport default async function migration(\n tree: Tree,\n): Promise<MigrationReturnObject> {\n const nextSteps: string[] = [];\n\n await migrateVendedModule(tree, APPCONFIG_FILE, nextSteps);\n await migrateVendedModule(tree, APPCONFIG_DEPLOYMENT_FILE, nextSteps);\n\n if (tree.exists(APPCONFIG_FILE)) {\n await applyGritQL(tree, APPCONFIG_FILE, DESCRIPTION_REWRITE);\n }\n\n await migrateRootModules(tree, nextSteps);\n\n await formatFilesInSubtree(tree);\n\n return { nextSteps };\n}\n"],"names":["visitNotIgnoredFiles","applyGritQL","matchGritQL","formatFilesInSubtree","PACKAGES_DIR","SHARED_TERRAFORM_DIR","ADDED_NAMESPACES","RUNTIME_CONFIG_DIR","APPCONFIG_FILE","APPCONFIG_DEPLOYMENT_FILE","hcl","pattern","VENDED_DEFAULT","block","attribute","ROOT_MODULE_ARGUMENT","clauses","scopePattern","list","extraClauses","filter","Boolean","join","listsNamespace","tree","filePath","namespace","appendNamespace","addMissingNamespaces","DESCRIPTION_REWRITE","missing","map","n","divergedNextStep","rootModuleNextStep","migrateVendedModule","nextSteps","exists","push","migrateRootModules","terraformFiles","endsWith","startsWith","migration"],"mappings":"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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { type MigrationReturnObject, type Tree } from '@nx/devkit';
|
|
6
|
+
export default function migration(tree: Tree): Promise<MigrationReturnObject>;
|