@aws/nx-plugin 1.0.0-rc.87 → 1.0.0-rc.89
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 +9977 -16000
- package/migrations.json +124 -76
- package/package.json +7 -7
- package/src/agentcore-gateway/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +7 -7
- package/src/migrations/latest/nx-parallel-default/metadata.json +3 -0
- package/src/migrations/latest/nx-parallel-default/migration.d.ts +14 -0
- package/src/migrations/latest/nx-parallel-default/migration.js +29 -0
- package/src/migrations/latest/nx-parallel-default/migration.js.map +1 -0
- package/src/migrations/latest/python-version-drop-exact-patch/metadata.json +3 -0
- package/src/migrations/latest/python-version-drop-exact-patch/migration.js +43 -0
- package/src/migrations/latest/python-version-drop-exact-patch/migration.js.map +1 -0
- package/src/migrations/latest/react-website-nx-react-express-override/metadata.json +3 -0
- package/src/migrations/latest/react-website-nx-react-express-override/migration.d.ts +31 -0
- package/src/migrations/latest/react-website-nx-react-express-override/migration.js +74 -0
- package/src/migrations/latest/react-website-nx-react-express-override/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.77/0001-dynamodb-configurable-encryption/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.77/0002-user-identity-configurable-mfa/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.78/0001-static-website-configurable-waf-encryption/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.79/0001-py-agent-ag-ui-hooks/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.82/0001-terraform-load-runtime-config-src-path/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.82/0002-runtime-config-namespace-defaults/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.83/0001-dynamodb-terraform-app-module-outputs/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.83/0002-terraform-data-resource-destroy-protection/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.83/0003-terraform-gateway-cedar-render-root-ejs/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.84/0001-rdb-terraform-aurora-app-module-defaults/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.84/0002-agentcore-harness-no-tools-by-default/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.84/0003-terraform-declare-used-providers/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.84/0004-waf-log-group-cmk-encryption/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.84/0005-terraform-harness-vpc-role-and-memory-grant/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.85/0001-terraform-project-checkov-target-and-bootstrap-destroy/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.85/0001-terraform-project-checkov-target-and-bootstrap-destroy/migration.js.map +1 -0
- package/src/preset/__snapshots__/generator.spec.ts.snap +5 -4
- package/src/py/agent/__snapshots__/generator.constructs.spec.ts.snap +2 -2
- package/src/py/agent/__snapshots__/generator.frameworks.spec.ts.snap +5 -5
- package/src/py/agent/__snapshots__/generator.protocols.spec.ts.snap +4 -4
- 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 +3 -3
- package/src/py/rdb/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/smithy/project/__snapshots__/generator.spec.ts.snap +7 -7
- 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 +3 -3
- 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 +5 -5
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +59 -49
- package/src/ts/react-website/app/generator.d.ts +3 -0
- package/src/ts/react-website/app/generator.js +25 -1
- 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/init.d.ts +1 -0
- package/src/utils/init.js +2 -0
- package/src/utils/init.js.map +1 -1
- package/src/utils/lambda-runtime-resolution.d.ts +0 -21
- package/src/utils/lambda-runtime-resolution.js +0 -14
- package/src/utils/lambda-runtime-resolution.js.map +1 -1
- package/src/utils/version-upgrade-migration/sync-python-language-version.d.ts +2 -2
- package/src/utils/version-upgrade-migration/sync-python-language-version.js +2 -2
- package/src/utils/version-upgrade-migration/sync-python-language-version.js.map +1 -1
- package/src/utils/versions.d.ts +58 -62
- package/src/utils/versions.js +57 -60
- package/src/utils/versions.js.map +1 -1
- package/src/migrations/latest/agentcore-harness-no-tools-by-default/migration.js.map +0 -1
- package/src/migrations/latest/dynamodb-configurable-encryption/migration.js.map +0 -1
- package/src/migrations/latest/dynamodb-terraform-app-module-outputs/migration.js.map +0 -1
- package/src/migrations/latest/py-agent-ag-ui-hooks/migration.js.map +0 -1
- package/src/migrations/latest/rdb-terraform-aurora-app-module-defaults/migration.js.map +0 -1
- package/src/migrations/latest/runtime-config-namespace-defaults/migration.js.map +0 -1
- package/src/migrations/latest/static-website-configurable-waf-encryption/migration.js.map +0 -1
- package/src/migrations/latest/terraform-data-resource-destroy-protection/migration.js.map +0 -1
- package/src/migrations/latest/terraform-declare-used-providers/migration.js.map +0 -1
- package/src/migrations/latest/terraform-gateway-cedar-render-root-ejs/migration.js.map +0 -1
- package/src/migrations/latest/terraform-harness-vpc-role-and-memory-grant/migration.js.map +0 -1
- package/src/migrations/latest/terraform-load-runtime-config-src-path/migration.js.map +0 -1
- package/src/migrations/latest/terraform-project-checkov-target-and-bootstrap-destroy/migration.js.map +0 -1
- package/src/migrations/latest/user-identity-configurable-mfa/migration.js.map +0 -1
- package/src/migrations/latest/waf-log-group-cmk-encryption/migration.js.map +0 -1
- /package/src/migrations/latest/{agentcore-harness-no-tools-by-default → python-version-drop-exact-patch}/migration.d.ts +0 -0
- /package/src/migrations/{latest/dynamodb-configurable-encryption → v1.0.0-rc.77/0001-dynamodb-configurable-encryption}/__snapshots__/migration.spec.ts.snap +0 -0
- /package/src/migrations/{latest/dynamodb-configurable-encryption → v1.0.0-rc.77/0001-dynamodb-configurable-encryption}/metadata.json +0 -0
- /package/src/migrations/{latest/dynamodb-configurable-encryption → v1.0.0-rc.77/0001-dynamodb-configurable-encryption}/migration.d.ts +0 -0
- /package/src/migrations/{latest/dynamodb-configurable-encryption → v1.0.0-rc.77/0001-dynamodb-configurable-encryption}/migration.js +0 -0
- /package/src/migrations/{latest/user-identity-configurable-mfa → v1.0.0-rc.77/0002-user-identity-configurable-mfa}/metadata.json +0 -0
- /package/src/migrations/{latest/terraform-data-resource-destroy-protection → v1.0.0-rc.77/0002-user-identity-configurable-mfa}/migration.d.ts +0 -0
- /package/src/migrations/{latest/user-identity-configurable-mfa → v1.0.0-rc.77/0002-user-identity-configurable-mfa}/migration.js +0 -0
- /package/src/migrations/{latest/static-website-configurable-waf-encryption → v1.0.0-rc.78/0001-static-website-configurable-waf-encryption}/metadata.json +0 -0
- /package/src/migrations/{latest/dynamodb-terraform-app-module-outputs → v1.0.0-rc.78/0001-static-website-configurable-waf-encryption}/migration.d.ts +0 -0
- /package/src/migrations/{latest/static-website-configurable-waf-encryption → v1.0.0-rc.78/0001-static-website-configurable-waf-encryption}/migration.js +0 -0
- /package/src/migrations/{latest/py-agent-ag-ui-hooks → v1.0.0-rc.79/0001-py-agent-ag-ui-hooks}/metadata.json +0 -0
- /package/src/migrations/{latest/py-agent-ag-ui-hooks → v1.0.0-rc.79/0001-py-agent-ag-ui-hooks}/migration.d.ts +0 -0
- /package/src/migrations/{latest/py-agent-ag-ui-hooks → v1.0.0-rc.79/0001-py-agent-ag-ui-hooks}/migration.js +0 -0
- /package/src/migrations/{latest/terraform-load-runtime-config-src-path → v1.0.0-rc.82/0001-terraform-load-runtime-config-src-path}/metadata.json +0 -0
- /package/src/migrations/{latest/rdb-terraform-aurora-app-module-defaults → v1.0.0-rc.82/0001-terraform-load-runtime-config-src-path}/migration.d.ts +0 -0
- /package/src/migrations/{latest/terraform-load-runtime-config-src-path → v1.0.0-rc.82/0001-terraform-load-runtime-config-src-path}/migration.js +0 -0
- /package/src/migrations/{latest/runtime-config-namespace-defaults → v1.0.0-rc.82/0002-runtime-config-namespace-defaults}/metadata.json +0 -0
- /package/src/migrations/{latest/runtime-config-namespace-defaults → v1.0.0-rc.82/0002-runtime-config-namespace-defaults}/migration.d.ts +0 -0
- /package/src/migrations/{latest/runtime-config-namespace-defaults → v1.0.0-rc.82/0002-runtime-config-namespace-defaults}/migration.js +0 -0
- /package/src/migrations/{latest/dynamodb-terraform-app-module-outputs → v1.0.0-rc.83/0001-dynamodb-terraform-app-module-outputs}/metadata.json +0 -0
- /package/src/migrations/{latest/static-website-configurable-waf-encryption → v1.0.0-rc.83/0001-dynamodb-terraform-app-module-outputs}/migration.d.ts +0 -0
- /package/src/migrations/{latest/dynamodb-terraform-app-module-outputs → v1.0.0-rc.83/0001-dynamodb-terraform-app-module-outputs}/migration.js +0 -0
- /package/src/migrations/{latest/terraform-data-resource-destroy-protection → v1.0.0-rc.83/0002-terraform-data-resource-destroy-protection}/__snapshots__/migration.spec.ts.snap +0 -0
- /package/src/migrations/{latest/terraform-data-resource-destroy-protection → v1.0.0-rc.83/0002-terraform-data-resource-destroy-protection}/metadata.json +0 -0
- /package/src/migrations/{latest/user-identity-configurable-mfa → v1.0.0-rc.83/0002-terraform-data-resource-destroy-protection}/migration.d.ts +0 -0
- /package/src/migrations/{latest/terraform-data-resource-destroy-protection → v1.0.0-rc.83/0002-terraform-data-resource-destroy-protection}/migration.js +0 -0
- /package/src/migrations/{latest/terraform-gateway-cedar-render-root-ejs → v1.0.0-rc.83/0003-terraform-gateway-cedar-render-root-ejs}/metadata.json +0 -0
- /package/src/migrations/{latest/terraform-declare-used-providers → v1.0.0-rc.83/0003-terraform-gateway-cedar-render-root-ejs}/migration.d.ts +0 -0
- /package/src/migrations/{latest/terraform-gateway-cedar-render-root-ejs → v1.0.0-rc.83/0003-terraform-gateway-cedar-render-root-ejs}/migration.js +0 -0
- /package/src/migrations/{latest/rdb-terraform-aurora-app-module-defaults → v1.0.0-rc.84/0001-rdb-terraform-aurora-app-module-defaults}/__snapshots__/migration.spec.ts.snap +0 -0
- /package/src/migrations/{latest/rdb-terraform-aurora-app-module-defaults → v1.0.0-rc.84/0001-rdb-terraform-aurora-app-module-defaults}/metadata.json +0 -0
- /package/src/migrations/{latest/terraform-gateway-cedar-render-root-ejs → v1.0.0-rc.84/0001-rdb-terraform-aurora-app-module-defaults}/migration.d.ts +0 -0
- /package/src/migrations/{latest/rdb-terraform-aurora-app-module-defaults → v1.0.0-rc.84/0001-rdb-terraform-aurora-app-module-defaults}/migration.js +0 -0
- /package/src/migrations/{latest/agentcore-harness-no-tools-by-default → v1.0.0-rc.84/0002-agentcore-harness-no-tools-by-default}/__snapshots__/migration.spec.ts.snap +0 -0
- /package/src/migrations/{latest/agentcore-harness-no-tools-by-default → v1.0.0-rc.84/0002-agentcore-harness-no-tools-by-default}/metadata.json +0 -0
- /package/src/migrations/{latest/terraform-harness-vpc-role-and-memory-grant → v1.0.0-rc.84/0002-agentcore-harness-no-tools-by-default}/migration.d.ts +0 -0
- /package/src/migrations/{latest/agentcore-harness-no-tools-by-default → v1.0.0-rc.84/0002-agentcore-harness-no-tools-by-default}/migration.js +0 -0
- /package/src/migrations/{latest/terraform-declare-used-providers → v1.0.0-rc.84/0003-terraform-declare-used-providers}/metadata.json +0 -0
- /package/src/migrations/{latest/terraform-load-runtime-config-src-path → v1.0.0-rc.84/0003-terraform-declare-used-providers}/migration.d.ts +0 -0
- /package/src/migrations/{latest/terraform-declare-used-providers → v1.0.0-rc.84/0003-terraform-declare-used-providers}/migration.js +0 -0
- /package/src/migrations/{latest/waf-log-group-cmk-encryption → v1.0.0-rc.84/0004-waf-log-group-cmk-encryption}/__snapshots__/migration.spec.ts.snap +0 -0
- /package/src/migrations/{latest/waf-log-group-cmk-encryption → v1.0.0-rc.84/0004-waf-log-group-cmk-encryption}/metadata.json +0 -0
- /package/src/migrations/{latest/terraform-project-checkov-target-and-bootstrap-destroy → v1.0.0-rc.84/0004-waf-log-group-cmk-encryption}/migration.d.ts +0 -0
- /package/src/migrations/{latest/waf-log-group-cmk-encryption → v1.0.0-rc.84/0004-waf-log-group-cmk-encryption}/migration.js +0 -0
- /package/src/migrations/{latest/terraform-harness-vpc-role-and-memory-grant → v1.0.0-rc.84/0005-terraform-harness-vpc-role-and-memory-grant}/__snapshots__/migration.spec.ts.snap +0 -0
- /package/src/migrations/{latest/terraform-harness-vpc-role-and-memory-grant → v1.0.0-rc.84/0005-terraform-harness-vpc-role-and-memory-grant}/metadata.json +0 -0
- /package/src/migrations/{latest/waf-log-group-cmk-encryption → v1.0.0-rc.84/0005-terraform-harness-vpc-role-and-memory-grant}/migration.d.ts +0 -0
- /package/src/migrations/{latest/terraform-harness-vpc-role-and-memory-grant → v1.0.0-rc.84/0005-terraform-harness-vpc-role-and-memory-grant}/migration.js +0 -0
- /package/src/migrations/{latest/terraform-project-checkov-target-and-bootstrap-destroy → v1.0.0-rc.85/0001-terraform-project-checkov-target-and-bootstrap-destroy}/metadata.json +0 -0
- /package/src/migrations/{latest/terraform-project-checkov-target-and-bootstrap-destroy → v1.0.0-rc.85/0001-terraform-project-checkov-target-and-bootstrap-destroy}/migration.js +0 -0
package/migrations.json
CHANGED
|
@@ -2,81 +2,6 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"name": "@aws/nx-plugin",
|
|
4
4
|
"generators": {
|
|
5
|
-
"latest-dynamodb-configurable-encryption": {
|
|
6
|
-
"version": "1.0.0-rc.77",
|
|
7
|
-
"description": "Surface encryption and encryptionKey on the vended DynamoDBTable construct/module",
|
|
8
|
-
"implementation": "./src/migrations/latest/dynamodb-configurable-encryption/migration"
|
|
9
|
-
},
|
|
10
|
-
"latest-user-identity-configurable-mfa": {
|
|
11
|
-
"version": "1.0.0-rc.77",
|
|
12
|
-
"description": "Surface mfa and mfaSecondFactor on the vended UserIdentity construct/module",
|
|
13
|
-
"implementation": "./src/migrations/latest/user-identity-configurable-mfa/migration"
|
|
14
|
-
},
|
|
15
|
-
"latest-static-website-configurable-waf-encryption": {
|
|
16
|
-
"version": "1.0.0-rc.78",
|
|
17
|
-
"description": "Surface enableWaf, encryption, encryptionKey and enableKeyRotation on the vended StaticWebsite construct/module",
|
|
18
|
-
"implementation": "./src/migrations/latest/static-website-configurable-waf-encryption/migration"
|
|
19
|
-
},
|
|
20
|
-
"latest-py-agent-ag-ui-hooks": {
|
|
21
|
-
"version": "1.0.0-rc.79",
|
|
22
|
-
"description": "Forward the py#agent Strands hooks to the AG-UI adapter so model and tool errors are reported",
|
|
23
|
-
"implementation": "./src/migrations/latest/py-agent-ag-ui-hooks/migration"
|
|
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
|
-
},
|
|
35
|
-
"latest-dynamodb-terraform-app-module-outputs": {
|
|
36
|
-
"version": "1.0.0-rc.83",
|
|
37
|
-
"description": "Re-export the DynamoDB table and KMS key attributes from the vended Terraform per-table app module",
|
|
38
|
-
"implementation": "./src/migrations/latest/dynamodb-terraform-app-module-outputs/migration"
|
|
39
|
-
},
|
|
40
|
-
"latest-terraform-data-resource-destroy-protection": {
|
|
41
|
-
"version": "1.0.0-rc.83",
|
|
42
|
-
"description": "Add prevent_destroy and a 30 day KMS deletion window to the vended Terraform DynamoDB table and Aurora cluster modules",
|
|
43
|
-
"implementation": "./src/migrations/latest/terraform-data-resource-destroy-protection/migration"
|
|
44
|
-
},
|
|
45
|
-
"latest-terraform-gateway-cedar-render-root-ejs": {
|
|
46
|
-
"version": "1.0.0-rc.83",
|
|
47
|
-
"description": "Declare ejs at the workspace root so the Terraform gateway's Cedar render script resolves it",
|
|
48
|
-
"implementation": "./src/migrations/latest/terraform-gateway-cedar-render-root-ejs/migration"
|
|
49
|
-
},
|
|
50
|
-
"latest-rdb-terraform-aurora-app-module-defaults": {
|
|
51
|
-
"version": "1.0.0-rc.84",
|
|
52
|
-
"description": "Align the vended Terraform Aurora app module variable defaults with the core module, enabling CloudWatch engine log export and exposing enable_key_rotation",
|
|
53
|
-
"implementation": "./src/migrations/latest/rdb-terraform-aurora-app-module-defaults/migration"
|
|
54
|
-
},
|
|
55
|
-
"latest-agentcore-harness-no-tools-by-default": {
|
|
56
|
-
"version": "1.0.0-rc.84",
|
|
57
|
-
"description": "Pin the vended AgentCore Harness construct/module to no tools by default, since AgentCore treats an absent allowedTools as every tool",
|
|
58
|
-
"implementation": "./src/migrations/latest/agentcore-harness-no-tools-by-default/migration"
|
|
59
|
-
},
|
|
60
|
-
"latest-terraform-declare-used-providers": {
|
|
61
|
-
"version": "1.0.0-rc.84",
|
|
62
|
-
"description": "Declare every provider each vended Terraform module uses in its own required_providers",
|
|
63
|
-
"implementation": "./src/migrations/latest/terraform-declare-used-providers/migration"
|
|
64
|
-
},
|
|
65
|
-
"latest-waf-log-group-cmk-encryption": {
|
|
66
|
-
"version": "1.0.0-rc.84",
|
|
67
|
-
"description": "Encrypt vended WAF log groups with a customer-managed KMS key",
|
|
68
|
-
"implementation": "./src/migrations/latest/waf-log-group-cmk-encryption/migration"
|
|
69
|
-
},
|
|
70
|
-
"latest-terraform-harness-vpc-role-and-memory-grant": {
|
|
71
|
-
"version": "1.0.0-rc.84",
|
|
72
|
-
"description": "Add VPC, execution role and native field support to the vended Terraform AgentCore Harness module, and scope its managed-memory grant to the service-assigned ARN",
|
|
73
|
-
"implementation": "./src/migrations/latest/terraform-harness-vpc-role-and-memory-grant/migration"
|
|
74
|
-
},
|
|
75
|
-
"latest-terraform-project-checkov-target-and-bootstrap-destroy": {
|
|
76
|
-
"version": "1.0.0-rc.85",
|
|
77
|
-
"description": "Add the Terraform checkov target and config, make bootstrap-destroy non-interactive, and declare required_version in the vended providers.tf",
|
|
78
|
-
"implementation": "./src/migrations/latest/terraform-project-checkov-target-and-bootstrap-destroy/migration"
|
|
79
|
-
},
|
|
80
5
|
"latest-add-destroy-sandbox-target": {
|
|
81
6
|
"version": "1.0.0-rc.87",
|
|
82
7
|
"description": "Add a destroy-sandbox target to CDK infrastructure projects which destroys the sandbox stage, and drop the --require-approval flag from cdk destroy, which has no such option",
|
|
@@ -87,6 +12,21 @@
|
|
|
87
12
|
"description": "Replace the MySQL RDS Proxy role's admin secret access with the rds-db:connect grant it needs for end-to-end IAM auth",
|
|
88
13
|
"implementation": "./src/migrations/latest/terraform-rdb-proxy-iam-connect-grant/migration"
|
|
89
14
|
},
|
|
15
|
+
"latest-python-version-drop-exact-patch": {
|
|
16
|
+
"version": "1.0.0-rc.88",
|
|
17
|
+
"description": "Drop the exact CPython patch from .python-version to the Lambda runtime's major.minor",
|
|
18
|
+
"implementation": "./src/migrations/latest/python-version-drop-exact-patch/migration"
|
|
19
|
+
},
|
|
20
|
+
"latest-react-website-nx-react-express-override": {
|
|
21
|
+
"version": "1.0.0-rc.88",
|
|
22
|
+
"description": "Add an npm override pinning the express @nx/react resolves to the version generated websites use, so npm can satisfy its optional peer",
|
|
23
|
+
"implementation": "./src/migrations/latest/react-website-nx-react-express-override/migration"
|
|
24
|
+
},
|
|
25
|
+
"latest-nx-parallel-default": {
|
|
26
|
+
"version": "1.0.0-rc.89",
|
|
27
|
+
"description": "Set nx.json parallel to 8 so full builds use available cores, preserving an existing value",
|
|
28
|
+
"implementation": "./src/migrations/latest/nx-parallel-default/migration"
|
|
29
|
+
},
|
|
90
30
|
"v1.0.0-rc.50-0001-modernize-function-props-cast": {
|
|
91
31
|
"version": "1.0.0-rc.50",
|
|
92
32
|
"description": "Replace the legacy angle-bracket FunctionProps type assertion with the modern as syntax in generated API constructs",
|
|
@@ -227,8 +167,83 @@
|
|
|
227
167
|
"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",
|
|
228
168
|
"implementation": "./src/migrations/v1.0.0-rc.75/0001-ts-agent-session-id-middleware-extraction/migration"
|
|
229
169
|
},
|
|
170
|
+
"v1.0.0-rc.77-0001-dynamodb-configurable-encryption": {
|
|
171
|
+
"version": "1.0.0-rc.77",
|
|
172
|
+
"description": "Surface encryption and encryptionKey on the vended DynamoDBTable construct/module",
|
|
173
|
+
"implementation": "./src/migrations/v1.0.0-rc.77/0001-dynamodb-configurable-encryption/migration"
|
|
174
|
+
},
|
|
175
|
+
"v1.0.0-rc.77-0002-user-identity-configurable-mfa": {
|
|
176
|
+
"version": "1.0.0-rc.77",
|
|
177
|
+
"description": "Surface mfa and mfaSecondFactor on the vended UserIdentity construct/module",
|
|
178
|
+
"implementation": "./src/migrations/v1.0.0-rc.77/0002-user-identity-configurable-mfa/migration"
|
|
179
|
+
},
|
|
180
|
+
"v1.0.0-rc.78-0001-static-website-configurable-waf-encryption": {
|
|
181
|
+
"version": "1.0.0-rc.78",
|
|
182
|
+
"description": "Surface enableWaf, encryption, encryptionKey and enableKeyRotation on the vended StaticWebsite construct/module",
|
|
183
|
+
"implementation": "./src/migrations/v1.0.0-rc.78/0001-static-website-configurable-waf-encryption/migration"
|
|
184
|
+
},
|
|
185
|
+
"v1.0.0-rc.79-0001-py-agent-ag-ui-hooks": {
|
|
186
|
+
"version": "1.0.0-rc.79",
|
|
187
|
+
"description": "Forward the py#agent Strands hooks to the AG-UI adapter so model and tool errors are reported",
|
|
188
|
+
"implementation": "./src/migrations/v1.0.0-rc.79/0001-py-agent-ag-ui-hooks/migration"
|
|
189
|
+
},
|
|
190
|
+
"v1.0.0-rc.82-0001-terraform-load-runtime-config-src-path": {
|
|
191
|
+
"version": "1.0.0-rc.82",
|
|
192
|
+
"description": "Point the react website's terraform load-runtime-config target at the runtime-config file the terraform aggregation actually writes",
|
|
193
|
+
"implementation": "./src/migrations/v1.0.0-rc.82/0001-terraform-load-runtime-config-src-path/migration"
|
|
194
|
+
},
|
|
195
|
+
"v1.0.0-rc.82-0002-runtime-config-namespace-defaults": {
|
|
196
|
+
"version": "1.0.0-rc.82",
|
|
197
|
+
"description": "Provision AppConfig configuration profiles for every namespace the vended terraform modules write to",
|
|
198
|
+
"implementation": "./src/migrations/v1.0.0-rc.82/0002-runtime-config-namespace-defaults/migration"
|
|
199
|
+
},
|
|
200
|
+
"v1.0.0-rc.83-0001-dynamodb-terraform-app-module-outputs": {
|
|
201
|
+
"version": "1.0.0-rc.83",
|
|
202
|
+
"description": "Re-export the DynamoDB table and KMS key attributes from the vended Terraform per-table app module",
|
|
203
|
+
"implementation": "./src/migrations/v1.0.0-rc.83/0001-dynamodb-terraform-app-module-outputs/migration"
|
|
204
|
+
},
|
|
205
|
+
"v1.0.0-rc.83-0002-terraform-data-resource-destroy-protection": {
|
|
206
|
+
"version": "1.0.0-rc.83",
|
|
207
|
+
"description": "Add prevent_destroy and a 30 day KMS deletion window to the vended Terraform DynamoDB table and Aurora cluster modules",
|
|
208
|
+
"implementation": "./src/migrations/v1.0.0-rc.83/0002-terraform-data-resource-destroy-protection/migration"
|
|
209
|
+
},
|
|
210
|
+
"v1.0.0-rc.83-0003-terraform-gateway-cedar-render-root-ejs": {
|
|
211
|
+
"version": "1.0.0-rc.83",
|
|
212
|
+
"description": "Declare ejs at the workspace root so the Terraform gateway's Cedar render script resolves it",
|
|
213
|
+
"implementation": "./src/migrations/v1.0.0-rc.83/0003-terraform-gateway-cedar-render-root-ejs/migration"
|
|
214
|
+
},
|
|
215
|
+
"v1.0.0-rc.84-0001-rdb-terraform-aurora-app-module-defaults": {
|
|
216
|
+
"version": "1.0.0-rc.84",
|
|
217
|
+
"description": "Align the vended Terraform Aurora app module variable defaults with the core module, enabling CloudWatch engine log export and exposing enable_key_rotation",
|
|
218
|
+
"implementation": "./src/migrations/v1.0.0-rc.84/0001-rdb-terraform-aurora-app-module-defaults/migration"
|
|
219
|
+
},
|
|
220
|
+
"v1.0.0-rc.84-0002-agentcore-harness-no-tools-by-default": {
|
|
221
|
+
"version": "1.0.0-rc.84",
|
|
222
|
+
"description": "Pin the vended AgentCore Harness construct/module to no tools by default, since AgentCore treats an absent allowedTools as every tool",
|
|
223
|
+
"implementation": "./src/migrations/v1.0.0-rc.84/0002-agentcore-harness-no-tools-by-default/migration"
|
|
224
|
+
},
|
|
225
|
+
"v1.0.0-rc.84-0003-terraform-declare-used-providers": {
|
|
226
|
+
"version": "1.0.0-rc.84",
|
|
227
|
+
"description": "Declare every provider each vended Terraform module uses in its own required_providers",
|
|
228
|
+
"implementation": "./src/migrations/v1.0.0-rc.84/0003-terraform-declare-used-providers/migration"
|
|
229
|
+
},
|
|
230
|
+
"v1.0.0-rc.84-0004-waf-log-group-cmk-encryption": {
|
|
231
|
+
"version": "1.0.0-rc.84",
|
|
232
|
+
"description": "Encrypt vended WAF log groups with a customer-managed KMS key",
|
|
233
|
+
"implementation": "./src/migrations/v1.0.0-rc.84/0004-waf-log-group-cmk-encryption/migration"
|
|
234
|
+
},
|
|
235
|
+
"v1.0.0-rc.84-0005-terraform-harness-vpc-role-and-memory-grant": {
|
|
236
|
+
"version": "1.0.0-rc.84",
|
|
237
|
+
"description": "Add VPC, execution role and native field support to the vended Terraform AgentCore Harness module, and scope its managed-memory grant to the service-assigned ARN",
|
|
238
|
+
"implementation": "./src/migrations/v1.0.0-rc.84/0005-terraform-harness-vpc-role-and-memory-grant/migration"
|
|
239
|
+
},
|
|
240
|
+
"v1.0.0-rc.85-0001-terraform-project-checkov-target-and-bootstrap-destroy": {
|
|
241
|
+
"version": "1.0.0-rc.85",
|
|
242
|
+
"description": "Add the Terraform checkov target and config, make bootstrap-destroy non-interactive, and declare required_version in the vended providers.tf",
|
|
243
|
+
"implementation": "./src/migrations/v1.0.0-rc.85/0001-terraform-project-checkov-target-and-bootstrap-destroy/migration"
|
|
244
|
+
},
|
|
230
245
|
"sync-vended-versions": {
|
|
231
|
-
"version": "1.0.0-rc.
|
|
246
|
+
"version": "1.0.0-rc.89",
|
|
232
247
|
"description": "Sync vended dependency versions and the tracked plugin version to those vended by this release",
|
|
233
248
|
"implementation": "./src/utils/version-upgrade-migration/migration"
|
|
234
249
|
}
|
|
@@ -266,6 +281,39 @@
|
|
|
266
281
|
"alwaysAddToPackageJson": false
|
|
267
282
|
}
|
|
268
283
|
}
|
|
284
|
+
},
|
|
285
|
+
"nx-23.1.2-nx-packages": {
|
|
286
|
+
"version": "1.0.0-rc.89",
|
|
287
|
+
"packages": {
|
|
288
|
+
"nx": {
|
|
289
|
+
"version": "23.1.2",
|
|
290
|
+
"alwaysAddToPackageJson": false
|
|
291
|
+
},
|
|
292
|
+
"@nx/devkit": {
|
|
293
|
+
"version": "23.1.2",
|
|
294
|
+
"alwaysAddToPackageJson": false
|
|
295
|
+
},
|
|
296
|
+
"@nx/js": {
|
|
297
|
+
"version": "23.1.2",
|
|
298
|
+
"alwaysAddToPackageJson": false
|
|
299
|
+
},
|
|
300
|
+
"@nx/react": {
|
|
301
|
+
"version": "23.1.2",
|
|
302
|
+
"alwaysAddToPackageJson": false
|
|
303
|
+
},
|
|
304
|
+
"@nx/vite": {
|
|
305
|
+
"version": "23.1.2",
|
|
306
|
+
"alwaysAddToPackageJson": false
|
|
307
|
+
},
|
|
308
|
+
"@nx/vitest": {
|
|
309
|
+
"version": "23.1.2",
|
|
310
|
+
"alwaysAddToPackageJson": false
|
|
311
|
+
},
|
|
312
|
+
"@nx/workspace": {
|
|
313
|
+
"version": "23.1.2",
|
|
314
|
+
"alwaysAddToPackageJson": false
|
|
315
|
+
}
|
|
316
|
+
}
|
|
269
317
|
}
|
|
270
318
|
}
|
|
271
319
|
}
|
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.89",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/awslabs/nx-plugin-for-aws.git",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"node": ">=20.19.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"nx": "23.1.
|
|
39
|
+
"nx": "23.1.2"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@apidevtools/swagger-parser": "12.1.0",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"@getgrit/gritql": "0.0.3",
|
|
47
47
|
"@iarna/toml": "2.2.5",
|
|
48
48
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
49
|
-
"@nx/devkit": "23.1.
|
|
50
|
-
"@nx/js": "23.1.
|
|
51
|
-
"@nx/react": "23.1.
|
|
52
|
-
"@nx/vite": "23.1.
|
|
49
|
+
"@nx/devkit": "23.1.2",
|
|
50
|
+
"@nx/js": "23.1.2",
|
|
51
|
+
"@nx/react": "23.1.2",
|
|
52
|
+
"@nx/vite": "23.1.2",
|
|
53
53
|
"@nxlv/python": "23.0.0",
|
|
54
54
|
"@phenomnomnominal/tsquery": "6.2.0",
|
|
55
55
|
"@types/estree": "1.0.9",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"enquirer": "2.4.1",
|
|
59
59
|
"fast-glob": "3.3.3",
|
|
60
60
|
"jiti": "2.7.0",
|
|
61
|
-
"js-yaml": "4.3.
|
|
61
|
+
"js-yaml": "4.3.2",
|
|
62
62
|
"license-checker-rseidelsohn": "4.4.2",
|
|
63
63
|
"lodash.camelcase": "4.3.0",
|
|
64
64
|
"lodash.clonedeepwith": "4.5.0",
|
|
@@ -4,8 +4,8 @@ exports[`infra generator > should add required dependencies to package.json > de
|
|
|
4
4
|
|
|
5
5
|
exports[`infra generator > should add required dependencies to package.json > dev-dependencies 1`] = `
|
|
6
6
|
{
|
|
7
|
-
"@nx/js": "23.1.
|
|
8
|
-
"@nx/vitest": "23.1.
|
|
7
|
+
"@nx/js": "23.1.2",
|
|
8
|
+
"@nx/vitest": "23.1.2",
|
|
9
9
|
"@swc/helpers": "~0.5.18",
|
|
10
10
|
"@types/node": "catalog:",
|
|
11
11
|
"@vitest/coverage-v8": "catalog:",
|
|
@@ -23,8 +23,8 @@ exports[`infra generator > should add required dependencies to package.json > pa
|
|
|
23
23
|
{
|
|
24
24
|
"dependencies": {},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@nx/js": "23.1.
|
|
27
|
-
"@nx/vitest": "23.1.
|
|
26
|
+
"@nx/js": "23.1.2",
|
|
27
|
+
"@nx/vitest": "23.1.2",
|
|
28
28
|
"@swc/helpers": "~0.5.18",
|
|
29
29
|
"@types/node": "catalog:",
|
|
30
30
|
"@vitest/coverage-v8": "catalog:",
|
|
@@ -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.15 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.15 checkov --config-file {projectRoot}/checkov.yml --directory dist/{projectRoot}/cdk.out --framework cloudformation",
|
|
154
154
|
},
|
|
155
155
|
"outputs": [
|
|
156
156
|
"{workspaceRoot}/dist/{projectRoot}/checkov",
|
|
@@ -756,7 +756,7 @@ exports[`infra generator > should handle custom project names correctly > custom
|
|
|
756
756
|
"{workspaceRoot}/dist/{projectRoot}/cdk.out",
|
|
757
757
|
],
|
|
758
758
|
"options": {
|
|
759
|
-
"command": "uvx --from checkov==3.3.
|
|
759
|
+
"command": "uvx --from checkov==3.3.15 checkov --config-file {projectRoot}/checkov.yml --directory dist/{projectRoot}/cdk.out --framework cloudformation",
|
|
760
760
|
},
|
|
761
761
|
"outputs": [
|
|
762
762
|
"{workspaceRoot}/dist/{projectRoot}/checkov",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { type MigrationReturnObject, type Tree } from '@nx/devkit';
|
|
6
|
+
/**
|
|
7
|
+
* New workspaces set `parallel` in `nx.json` so a full build uses the available
|
|
8
|
+
* cores rather than Nx's default of 3. Existing workspaces have no value at all,
|
|
9
|
+
* so this backfills it.
|
|
10
|
+
*
|
|
11
|
+
* A workspace that already declares `parallel` has made a deliberate choice —
|
|
12
|
+
* often to bound memory on a smaller machine — so it is left as it is.
|
|
13
|
+
*/
|
|
14
|
+
export default function migration(tree: Tree): Promise<MigrationReturnObject>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/ import { readNxJson, updateNxJson } from "@nx/devkit";
|
|
5
|
+
import { formatFilesInSubtree } from "../../../utils/format.js";
|
|
6
|
+
import { DEFAULT_PARALLEL } from "../../../utils/init.js";
|
|
7
|
+
/**
|
|
8
|
+
* New workspaces set `parallel` in `nx.json` so a full build uses the available
|
|
9
|
+
* cores rather than Nx's default of 3. Existing workspaces have no value at all,
|
|
10
|
+
* so this backfills it.
|
|
11
|
+
*
|
|
12
|
+
* A workspace that already declares `parallel` has made a deliberate choice —
|
|
13
|
+
* often to bound memory on a smaller machine — so it is left as it is.
|
|
14
|
+
*/ export default async function migration(tree) {
|
|
15
|
+
const nextSteps = [];
|
|
16
|
+
const nxJson = readNxJson(tree);
|
|
17
|
+
if (nxJson && nxJson.parallel === undefined) {
|
|
18
|
+
updateNxJson(tree, {
|
|
19
|
+
...nxJson,
|
|
20
|
+
parallel: DEFAULT_PARALLEL
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
await formatFilesInSubtree(tree);
|
|
24
|
+
return {
|
|
25
|
+
nextSteps
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../packages/nx-plugin/src/migrations/latest/nx-parallel-default/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 readNxJson,\n type Tree,\n updateNxJson,\n} from '@nx/devkit';\nimport { formatFilesInSubtree } from '../../../utils/format.js';\nimport { DEFAULT_PARALLEL } from '../../../utils/init.js';\n\n/**\n * New workspaces set `parallel` in `nx.json` so a full build uses the available\n * cores rather than Nx's default of 3. Existing workspaces have no value at all,\n * so this backfills it.\n *\n * A workspace that already declares `parallel` has made a deliberate choice —\n * often to bound memory on a smaller machine — so it is left as it is.\n */\nexport default async function migration(\n tree: Tree,\n): Promise<MigrationReturnObject> {\n const nextSteps: string[] = [];\n\n const nxJson = readNxJson(tree);\n if (nxJson && nxJson.parallel === undefined) {\n updateNxJson(tree, { ...nxJson, parallel: DEFAULT_PARALLEL });\n }\n\n await formatFilesInSubtree(tree);\n\n return { nextSteps };\n}\n"],"names":["readNxJson","updateNxJson","formatFilesInSubtree","DEFAULT_PARALLEL","migration","tree","nextSteps","nxJson","parallel","undefined"],"mappings":"AAAA;;;CAGC,GACD,SAEEA,UAAU,EAEVC,YAAY,QACP,aAAa;AACpB,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,gBAAgB,QAAQ,yBAAyB;AAE1D;;;;;;;CAOC,GACD,eAAe,eAAeC,UAC5BC,IAAU;IAEV,MAAMC,YAAsB,EAAE;IAE9B,MAAMC,SAASP,WAAWK;IAC1B,IAAIE,UAAUA,OAAOC,QAAQ,KAAKC,WAAW;QAC3CR,aAAaI,MAAM;YAAE,GAAGE,MAAM;YAAEC,UAAUL;QAAiB;IAC7D;IAEA,MAAMD,qBAAqBG;IAE3B,OAAO;QAAEC;IAAU;AACrB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { formatFilesInSubtree } from "../../../utils/format.js";
|
|
6
|
+
/**
|
|
7
|
+
* A `.python-version` naming an exact CPython patch resolves only where uv has a
|
|
8
|
+
* build of that patch: `3.14.7` installs on Linux but not on macOS, so `uv sync`
|
|
9
|
+
* fails there on a workspace that works elsewhere.
|
|
10
|
+
*
|
|
11
|
+
* uv reads a bare `major.minor` as a request for any patch of that minor, so
|
|
12
|
+
* dropping the patch lets each platform resolve a build it has. Lambda patches the
|
|
13
|
+
* interpreter itself, so the minor is the whole of what a project needs to pin.
|
|
14
|
+
*
|
|
15
|
+
* Only a patch of the minor the releases in question vended is dropped — another
|
|
16
|
+
* minor is the user's choice of interpreter, and the version sync moves the
|
|
17
|
+
* interpreter forward when the runtime's minor itself changes.
|
|
18
|
+
*/ /**
|
|
19
|
+
* The Python runtime minor those releases vended, spelled out rather than read
|
|
20
|
+
* from `LAMBDA_RUNTIME_VERSIONS`.
|
|
21
|
+
*
|
|
22
|
+
* A migration describes a fixed point in history: it has to keep rewriting the
|
|
23
|
+
* versions those releases actually wrote, whatever the current pin is. Reading the
|
|
24
|
+
* live constant would silently retarget this at whatever minor the plugin vends by
|
|
25
|
+
* the time a user upgrades, and stop correcting the value it exists for.
|
|
26
|
+
*/ const VENDED_MINOR = '3.14';
|
|
27
|
+
export default async function migration(tree) {
|
|
28
|
+
// uv writes a `.python-version` per project as well as at the root, and one
|
|
29
|
+
// left behind fails `uv sync` for that project alone.
|
|
30
|
+
visitNotIgnoredFiles(tree, '.', (path)=>{
|
|
31
|
+
if (path !== '.python-version' && !path.endsWith('/.python-version')) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const declared = (tree.read(path, 'utf-8') ?? '').trim();
|
|
35
|
+
if (/^(\d+\.\d+)\.\d+$/.exec(declared)?.[1] === VENDED_MINOR) {
|
|
36
|
+
tree.write(path, `${VENDED_MINOR}\n`);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
await formatFilesInSubtree(tree);
|
|
40
|
+
return {};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../packages/nx-plugin/src/migrations/latest/python-version-drop-exact-patch/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 { formatFilesInSubtree } from '../../../utils/format.js';\n\n/**\n * A `.python-version` naming an exact CPython patch resolves only where uv has a\n * build of that patch: `3.14.7` installs on Linux but not on macOS, so `uv sync`\n * fails there on a workspace that works elsewhere.\n *\n * uv reads a bare `major.minor` as a request for any patch of that minor, so\n * dropping the patch lets each platform resolve a build it has. Lambda patches the\n * interpreter itself, so the minor is the whole of what a project needs to pin.\n *\n * Only a patch of the minor the releases in question vended is dropped — another\n * minor is the user's choice of interpreter, and the version sync moves the\n * interpreter forward when the runtime's minor itself changes.\n */\n\n/**\n * The Python runtime minor those releases vended, spelled out rather than read\n * from `LAMBDA_RUNTIME_VERSIONS`.\n *\n * A migration describes a fixed point in history: it has to keep rewriting the\n * versions those releases actually wrote, whatever the current pin is. Reading the\n * live constant would silently retarget this at whatever minor the plugin vends by\n * the time a user upgrades, and stop correcting the value it exists for.\n */\nconst VENDED_MINOR = '3.14';\n\nexport default async function migration(\n tree: Tree,\n): Promise<MigrationReturnObject> {\n // uv writes a `.python-version` per project as well as at the root, and one\n // left behind fails `uv sync` for that project alone.\n visitNotIgnoredFiles(tree, '.', (path) => {\n if (path !== '.python-version' && !path.endsWith('/.python-version')) {\n return;\n }\n const declared = (tree.read(path, 'utf-8') ?? '').trim();\n if (/^(\\d+\\.\\d+)\\.\\d+$/.exec(declared)?.[1] === VENDED_MINOR) {\n tree.write(path, `${VENDED_MINOR}\\n`);\n }\n });\n\n await formatFilesInSubtree(tree);\n\n return {};\n}\n"],"names":["visitNotIgnoredFiles","formatFilesInSubtree","VENDED_MINOR","migration","tree","path","endsWith","declared","read","trim","exec","write"],"mappings":"AAAA;;;CAGC,GACD,SAGEA,oBAAoB,QACf,aAAa;AACpB,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE;;;;;;;;;;;;CAYC,GAED;;;;;;;;CAQC,GACD,MAAMC,eAAe;AAErB,eAAe,eAAeC,UAC5BC,IAAU;IAEV,4EAA4E;IAC5E,sDAAsD;IACtDJ,qBAAqBI,MAAM,KAAK,CAACC;QAC/B,IAAIA,SAAS,qBAAqB,CAACA,KAAKC,QAAQ,CAAC,qBAAqB;YACpE;QACF;QACA,MAAMC,WAAW,AAACH,CAAAA,KAAKI,IAAI,CAACH,MAAM,YAAY,EAAC,EAAGI,IAAI;QACtD,IAAI,oBAAoBC,IAAI,CAACH,WAAW,CAAC,EAAE,KAAKL,cAAc;YAC5DE,KAAKO,KAAK,CAACN,MAAM,GAAGH,aAAa,EAAE,CAAC;QACtC;IACF;IAEA,MAAMD,qBAAqBG;IAE3B,OAAO,CAAC;AACV"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* Pin the `express` `@nx/react` resolves to the version generated websites use.
|
|
8
|
+
*
|
|
9
|
+
* `@nx/react` declares an optional `express` peer for its module-federation
|
|
10
|
+
* dev-server, on the major behind the `express` vended here. npm is alone in
|
|
11
|
+
* failing the whole install on an optional peer it cannot satisfy:
|
|
12
|
+
*
|
|
13
|
+
* npm error ERESOLVE could not resolve
|
|
14
|
+
* npm error peerOptional express@"^4.21.2" from @nx/react
|
|
15
|
+
* npm error Conflicting peer dependency: express@5.2.1
|
|
16
|
+
*
|
|
17
|
+
* so an npm workspace with a website cannot install once its nx moves onto a
|
|
18
|
+
* version carrying that peer. pnpm, bun and yarn only warn, and get nothing.
|
|
19
|
+
*
|
|
20
|
+
* Scoped to `@nx/react` rather than pinning `express` workspace-wide: nothing
|
|
21
|
+
* here loads it, the peer only has to be satisfiable, and a bare override would
|
|
22
|
+
* reach every other consumer of express too.
|
|
23
|
+
*
|
|
24
|
+
* Guardrails:
|
|
25
|
+
* - npm only, and only for a workspace that has a website — the root `@nx/react`
|
|
26
|
+
* the generator adds. Anything else needs no override.
|
|
27
|
+
* - A user's own `overrides['@nx/react'].express` is left alone: theirs may pin a
|
|
28
|
+
* version deliberately.
|
|
29
|
+
* - Idempotent: writing the same pin twice is a no-op.
|
|
30
|
+
*/
|
|
31
|
+
export default function migration(tree: Tree): Promise<MigrationReturnObject>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/ import { detectPackageManager, readJson, updateJson } from "@nx/devkit";
|
|
5
|
+
import { formatFilesInSubtree } from "../../../utils/format.js";
|
|
6
|
+
import { TS_VERSIONS } from "../../../utils/versions.js";
|
|
7
|
+
/**
|
|
8
|
+
* Pin the `express` `@nx/react` resolves to the version generated websites use.
|
|
9
|
+
*
|
|
10
|
+
* `@nx/react` declares an optional `express` peer for its module-federation
|
|
11
|
+
* dev-server, on the major behind the `express` vended here. npm is alone in
|
|
12
|
+
* failing the whole install on an optional peer it cannot satisfy:
|
|
13
|
+
*
|
|
14
|
+
* npm error ERESOLVE could not resolve
|
|
15
|
+
* npm error peerOptional express@"^4.21.2" from @nx/react
|
|
16
|
+
* npm error Conflicting peer dependency: express@5.2.1
|
|
17
|
+
*
|
|
18
|
+
* so an npm workspace with a website cannot install once its nx moves onto a
|
|
19
|
+
* version carrying that peer. pnpm, bun and yarn only warn, and get nothing.
|
|
20
|
+
*
|
|
21
|
+
* Scoped to `@nx/react` rather than pinning `express` workspace-wide: nothing
|
|
22
|
+
* here loads it, the peer only has to be satisfiable, and a bare override would
|
|
23
|
+
* reach every other consumer of express too.
|
|
24
|
+
*
|
|
25
|
+
* Guardrails:
|
|
26
|
+
* - npm only, and only for a workspace that has a website — the root `@nx/react`
|
|
27
|
+
* the generator adds. Anything else needs no override.
|
|
28
|
+
* - A user's own `overrides['@nx/react'].express` is left alone: theirs may pin a
|
|
29
|
+
* version deliberately.
|
|
30
|
+
* - Idempotent: writing the same pin twice is a no-op.
|
|
31
|
+
*/ export default async function migration(tree) {
|
|
32
|
+
const nextSteps = [];
|
|
33
|
+
if (detectPackageManager(tree.root) !== 'npm') {
|
|
34
|
+
return {
|
|
35
|
+
nextSteps
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const packageJson = readJson(tree, 'package.json');
|
|
39
|
+
const hasNxReact = Boolean(packageJson.devDependencies?.['@nx/react'] ?? packageJson.dependencies?.['@nx/react']);
|
|
40
|
+
if (!hasNxReact) {
|
|
41
|
+
return {
|
|
42
|
+
nextSteps
|
|
43
|
+
}; // No website in this workspace.
|
|
44
|
+
}
|
|
45
|
+
const scoped = packageJson.overrides?.['@nx/react'];
|
|
46
|
+
// The string form pins `@nx/react` itself, leaving nowhere to nest the peer.
|
|
47
|
+
if (typeof scoped === 'string') {
|
|
48
|
+
nextSteps.push(`package.json: overrides['@nx/react'] pins a version as a string, so the express override could not be nested under it - left untouched. npm fails the install on @nx/react's optional express peer, so add { "@nx/react": { ".": "${scoped}", "express": "${TS_VERSIONS.express}" } } to keep it satisfiable.`);
|
|
49
|
+
return {
|
|
50
|
+
nextSteps
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
if (scoped?.express) {
|
|
54
|
+
return {
|
|
55
|
+
nextSteps
|
|
56
|
+
}; // Already pinned, by this migration or by the user.
|
|
57
|
+
}
|
|
58
|
+
updateJson(tree, 'package.json', (json)=>({
|
|
59
|
+
...json,
|
|
60
|
+
overrides: {
|
|
61
|
+
...json.overrides,
|
|
62
|
+
'@nx/react': {
|
|
63
|
+
...scoped,
|
|
64
|
+
express: TS_VERSIONS.express
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}));
|
|
68
|
+
await formatFilesInSubtree(tree);
|
|
69
|
+
return {
|
|
70
|
+
nextSteps
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../packages/nx-plugin/src/migrations/latest/react-website-nx-react-express-override/migration.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n detectPackageManager,\n type MigrationReturnObject,\n readJson,\n type Tree,\n updateJson,\n} from '@nx/devkit';\nimport { formatFilesInSubtree } from '../../../utils/format';\nimport { TS_VERSIONS } from '../../../utils/versions';\n\n/**\n * Pin the `express` `@nx/react` resolves to the version generated websites use.\n *\n * `@nx/react` declares an optional `express` peer for its module-federation\n * dev-server, on the major behind the `express` vended here. npm is alone in\n * failing the whole install on an optional peer it cannot satisfy:\n *\n * npm error ERESOLVE could not resolve\n * npm error peerOptional express@\"^4.21.2\" from @nx/react\n * npm error Conflicting peer dependency: express@5.2.1\n *\n * so an npm workspace with a website cannot install once its nx moves onto a\n * version carrying that peer. pnpm, bun and yarn only warn, and get nothing.\n *\n * Scoped to `@nx/react` rather than pinning `express` workspace-wide: nothing\n * here loads it, the peer only has to be satisfiable, and a bare override would\n * reach every other consumer of express too.\n *\n * Guardrails:\n * - npm only, and only for a workspace that has a website — the root `@nx/react`\n * the generator adds. Anything else needs no override.\n * - A user's own `overrides['@nx/react'].express` is left alone: theirs may pin a\n * version deliberately.\n * - Idempotent: writing the same pin twice is a no-op.\n */\nexport default async function migration(\n tree: Tree,\n): Promise<MigrationReturnObject> {\n const nextSteps: string[] = [];\n\n if (detectPackageManager(tree.root) !== 'npm') {\n return { nextSteps };\n }\n\n const packageJson = readJson<{\n devDependencies?: Record<string, string>;\n dependencies?: Record<string, string>;\n overrides?: Record<string, unknown>;\n }>(tree, 'package.json');\n\n const hasNxReact = Boolean(\n packageJson.devDependencies?.['@nx/react'] ??\n packageJson.dependencies?.['@nx/react'],\n );\n if (!hasNxReact) {\n return { nextSteps }; // No website in this workspace.\n }\n\n const scoped = packageJson.overrides?.['@nx/react'] as\n | Record<string, string>\n | string\n | undefined;\n\n // The string form pins `@nx/react` itself, leaving nowhere to nest the peer.\n if (typeof scoped === 'string') {\n nextSteps.push(\n `package.json: overrides['@nx/react'] pins a version as a string, so the express override could not be nested under it - left untouched. npm fails the install on @nx/react's optional express peer, so add { \"@nx/react\": { \".\": \"${scoped}\", \"express\": \"${TS_VERSIONS.express}\" } } to keep it satisfiable.`,\n );\n return { nextSteps };\n }\n\n if (scoped?.express) {\n return { nextSteps }; // Already pinned, by this migration or by the user.\n }\n\n updateJson(tree, 'package.json', (json) => ({\n ...json,\n overrides: {\n ...json.overrides,\n '@nx/react': { ...scoped, express: TS_VERSIONS.express },\n },\n }));\n\n await formatFilesInSubtree(tree);\n\n return { nextSteps };\n}\n"],"names":["detectPackageManager","readJson","updateJson","formatFilesInSubtree","TS_VERSIONS","migration","tree","nextSteps","root","packageJson","hasNxReact","Boolean","devDependencies","dependencies","scoped","overrides","push","express","json"],"mappings":"AAAA;;;CAGC,GACD,SACEA,oBAAoB,EAEpBC,QAAQ,EAERC,UAAU,QACL,aAAa;AACpB,SAASC,oBAAoB,QAAQ,2BAAwB;AAC7D,SAASC,WAAW,QAAQ,6BAA0B;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;CAwBC,GACD,eAAe,eAAeC,UAC5BC,IAAU;IAEV,MAAMC,YAAsB,EAAE;IAE9B,IAAIP,qBAAqBM,KAAKE,IAAI,MAAM,OAAO;QAC7C,OAAO;YAAED;QAAU;IACrB;IAEA,MAAME,cAAcR,SAIjBK,MAAM;IAET,MAAMI,aAAaC,QACjBF,YAAYG,eAAe,EAAE,CAAC,YAAY,IACxCH,YAAYI,YAAY,EAAE,CAAC,YAAY;IAE3C,IAAI,CAACH,YAAY;QACf,OAAO;YAAEH;QAAU,GAAG,gCAAgC;IACxD;IAEA,MAAMO,SAASL,YAAYM,SAAS,EAAE,CAAC,YAAY;IAKnD,6EAA6E;IAC7E,IAAI,OAAOD,WAAW,UAAU;QAC9BP,UAAUS,IAAI,CACZ,CAAC,kOAAkO,EAAEF,OAAO,eAAe,EAAEV,YAAYa,OAAO,CAAC,6BAA6B,CAAC;QAEjT,OAAO;YAAEV;QAAU;IACrB;IAEA,IAAIO,QAAQG,SAAS;QACnB,OAAO;YAAEV;QAAU,GAAG,oDAAoD;IAC5E;IAEAL,WAAWI,MAAM,gBAAgB,CAACY,OAAU,CAAA;YAC1C,GAAGA,IAAI;YACPH,WAAW;gBACT,GAAGG,KAAKH,SAAS;gBACjB,aAAa;oBAAE,GAAGD,MAAM;oBAAEG,SAASb,YAAYa,OAAO;gBAAC;YACzD;QACF,CAAA;IAEA,MAAMd,qBAAqBG;IAE3B,OAAO;QAAEC;IAAU;AACrB"}
|