@aws/nx-plugin 0.60.2 → 0.62.0
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 +678 -2016
- package/package.json +11 -11
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +27 -33
- package/src/preset/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +13 -11
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +88 -418
- package/src/py/strands-agent/__snapshots__/generator.spec.ts.snap +88 -414
- package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +14 -12
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +13 -11
- package/src/ts/lib/__snapshots__/generator.spec.ts.snap +4 -4
- package/src/ts/lib/eslint.js +1 -1
- package/src/ts/lib/eslint.js.map +1 -1
- package/src/ts/lib/generator.js +13 -1
- package/src/ts/lib/generator.js.map +1 -1
- package/src/ts/lib/vitest.js +3 -3
- package/src/ts/lib/vitest.js.map +1 -1
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +86 -416
- package/src/ts/nx-plugin/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +112 -94
- package/src/ts/react-website/app/files/app/src/components/AppLayout/index.tsx.template +5 -2
- package/src/ts/react-website/app/generator.js +1 -1
- package/src/ts/react-website/app/generator.js.map +1 -1
- package/src/utils/agent-core-constructs/agent-core-constructs.js +3 -4
- package/src/utils/agent-core-constructs/agent-core-constructs.js.map +1 -1
- package/src/utils/agent-core-constructs/files/cdk/app/agent-core/__nameKebabCase__/__nameKebabCase__.ts.template +23 -19
- package/src/utils/agent-core-constructs/files/terraform/app/agent-core/__nameKebabCase__/__nameKebabCase__.tf.template +5 -3
- package/src/utils/agent-core-constructs/files/terraform/core/agent-core/runtime.tf.template +53 -222
- package/src/utils/api-constructs/files/cdk/app/apis/rest/__apiNameKebabCase__.ts.template +13 -16
- package/src/utils/versions.d.ts +52 -51
- package/src/utils/versions.js +51 -50
- package/src/utils/versions.js.map +1 -1
- package/src/utils/agent-core-constructs/files/cdk/core/agent-core/runtime.ts.template +0 -159
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws/nx-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/awslabs/nx-plugin-for-aws.git",
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
},
|
|
20
20
|
"generators": "./generators.json",
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"nx": "~22.
|
|
23
|
-
"prettier": "^3.
|
|
22
|
+
"nx": "~22.1.3",
|
|
23
|
+
"prettier": "^3.6.2"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@apidevtools/swagger-parser": "^10.1.1",
|
|
27
27
|
"@hey-api/openapi-ts": "0.64.13",
|
|
28
28
|
"@iarna/toml": "^2.2.5",
|
|
29
29
|
"@modelcontextprotocol/sdk": "^1.21.0",
|
|
30
|
-
"@nx/devkit": "~22.
|
|
31
|
-
"@nx/eslint": "~22.
|
|
32
|
-
"@nx/js": "~22.
|
|
33
|
-
"@nx/react": "~22.
|
|
34
|
-
"@nx/vite": "~22.
|
|
30
|
+
"@nx/devkit": "~22.1.3",
|
|
31
|
+
"@nx/eslint": "~22.1.3",
|
|
32
|
+
"@nx/js": "~22.1.3",
|
|
33
|
+
"@nx/react": "~22.1.3",
|
|
34
|
+
"@nx/vite": "~22.1.3",
|
|
35
35
|
"@nxlv/python": "~21.2.0",
|
|
36
36
|
"@phenomnomnominal/tsquery": "6.1.3",
|
|
37
37
|
"enquirer": "^2.4.1",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"openapi-types": "^12.1.3",
|
|
47
47
|
"pip-requirements-js": "^0.2.1",
|
|
48
48
|
"typescript": "~5.9.3",
|
|
49
|
-
"vite": "^
|
|
50
|
-
"vitest": "^
|
|
51
|
-
"zod": "^4.1.
|
|
49
|
+
"vite": "^7.2.4",
|
|
50
|
+
"vitest": "^4.0.14",
|
|
51
|
+
"zod": "^4.1.13",
|
|
52
52
|
"zod-v3": "npm:zod@^3.25.76"
|
|
53
53
|
},
|
|
54
54
|
"types": "./src/index.d.ts"
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`infra generator > should add required dependencies to package.json > dependencies 1`] = `
|
|
4
4
|
{
|
|
5
|
-
"aws-cdk": "2.
|
|
6
|
-
"aws-cdk-lib": "2.
|
|
7
|
-
"constructs": "10.4.
|
|
8
|
-
"esbuild": "0.
|
|
5
|
+
"aws-cdk": "2.1033.0",
|
|
6
|
+
"aws-cdk-lib": "2.229.1",
|
|
7
|
+
"constructs": "10.4.3",
|
|
8
|
+
"esbuild": "0.27.0",
|
|
9
9
|
"source-map-support": "0.5.21",
|
|
10
10
|
}
|
|
11
11
|
`;
|
|
@@ -13,21 +13,18 @@ exports[`infra generator > should add required dependencies to package.json > de
|
|
|
13
13
|
exports[`infra generator > should add required dependencies to package.json > dev-dependencies 1`] = `
|
|
14
14
|
{
|
|
15
15
|
"@eslint/js": "^9.8.0",
|
|
16
|
-
"@nx/eslint": "22.
|
|
17
|
-
"@nx/eslint-plugin": "22.
|
|
18
|
-
"@nx/js": "22.
|
|
19
|
-
"@nx/
|
|
20
|
-
"@nx/web": "22.0.2",
|
|
16
|
+
"@nx/eslint": "22.1.3",
|
|
17
|
+
"@nx/eslint-plugin": "22.1.3",
|
|
18
|
+
"@nx/js": "22.1.3",
|
|
19
|
+
"@nx/vitest": "22.1.3",
|
|
21
20
|
"@swc-node/register": "~1.9.1",
|
|
22
21
|
"@swc/core": "~1.5.7",
|
|
23
22
|
"@swc/helpers": "~0.5.11",
|
|
24
|
-
"@types/node": "22.19.
|
|
25
|
-
"@vitest/coverage-v8": "^
|
|
26
|
-
"@vitest/ui": "^3.0.0",
|
|
23
|
+
"@types/node": "22.19.1",
|
|
24
|
+
"@vitest/coverage-v8": "^4.0.0",
|
|
27
25
|
"eslint": "^9.8.0",
|
|
28
26
|
"eslint-config-prettier": "^10.0.0",
|
|
29
27
|
"eslint-plugin-prettier": "5.5.4",
|
|
30
|
-
"jiti": "2.4.2",
|
|
31
28
|
"jsdom": "~22.1.0",
|
|
32
29
|
"jsonc-eslint-parser": "2.4.1",
|
|
33
30
|
"prettier": "3.6.2",
|
|
@@ -35,36 +32,33 @@ exports[`infra generator > should add required dependencies to package.json > de
|
|
|
35
32
|
"typescript": "~5.9.2",
|
|
36
33
|
"typescript-eslint": "^8.40.0",
|
|
37
34
|
"vite": "^7.0.0",
|
|
38
|
-
"vitest": "^
|
|
35
|
+
"vitest": "^4.0.0",
|
|
39
36
|
}
|
|
40
37
|
`;
|
|
41
38
|
|
|
42
39
|
exports[`infra generator > should add required dependencies to package.json > package-json 1`] = `
|
|
43
40
|
{
|
|
44
41
|
"dependencies": {
|
|
45
|
-
"aws-cdk": "2.
|
|
46
|
-
"aws-cdk-lib": "2.
|
|
47
|
-
"constructs": "10.4.
|
|
48
|
-
"esbuild": "0.
|
|
42
|
+
"aws-cdk": "2.1033.0",
|
|
43
|
+
"aws-cdk-lib": "2.229.1",
|
|
44
|
+
"constructs": "10.4.3",
|
|
45
|
+
"esbuild": "0.27.0",
|
|
49
46
|
"source-map-support": "0.5.21",
|
|
50
47
|
},
|
|
51
48
|
"devDependencies": {
|
|
52
49
|
"@eslint/js": "^9.8.0",
|
|
53
|
-
"@nx/eslint": "22.
|
|
54
|
-
"@nx/eslint-plugin": "22.
|
|
55
|
-
"@nx/js": "22.
|
|
56
|
-
"@nx/
|
|
57
|
-
"@nx/web": "22.0.2",
|
|
50
|
+
"@nx/eslint": "22.1.3",
|
|
51
|
+
"@nx/eslint-plugin": "22.1.3",
|
|
52
|
+
"@nx/js": "22.1.3",
|
|
53
|
+
"@nx/vitest": "22.1.3",
|
|
58
54
|
"@swc-node/register": "~1.9.1",
|
|
59
55
|
"@swc/core": "~1.5.7",
|
|
60
56
|
"@swc/helpers": "~0.5.11",
|
|
61
|
-
"@types/node": "22.19.
|
|
62
|
-
"@vitest/coverage-v8": "^
|
|
63
|
-
"@vitest/ui": "^3.0.0",
|
|
57
|
+
"@types/node": "22.19.1",
|
|
58
|
+
"@vitest/coverage-v8": "^4.0.0",
|
|
64
59
|
"eslint": "^9.8.0",
|
|
65
60
|
"eslint-config-prettier": "^10.0.0",
|
|
66
61
|
"eslint-plugin-prettier": "5.5.4",
|
|
67
|
-
"jiti": "2.4.2",
|
|
68
62
|
"jsdom": "~22.1.0",
|
|
69
63
|
"jsonc-eslint-parser": "2.4.1",
|
|
70
64
|
"prettier": "3.6.2",
|
|
@@ -72,7 +66,7 @@ exports[`infra generator > should add required dependencies to package.json > pa
|
|
|
72
66
|
"typescript": "~5.9.2",
|
|
73
67
|
"typescript-eslint": "^8.40.0",
|
|
74
68
|
"vite": "^7.0.0",
|
|
75
|
-
"vitest": "^
|
|
69
|
+
"vitest": "^4.0.0",
|
|
76
70
|
},
|
|
77
71
|
"name": "@proj/source",
|
|
78
72
|
"type": "module",
|
|
@@ -90,7 +84,7 @@ exports[`infra generator > should configure Checkov target correctly > checkov-t
|
|
|
90
84
|
"{workspaceRoot}/dist/{projectRoot}/cdk.out",
|
|
91
85
|
],
|
|
92
86
|
"options": {
|
|
93
|
-
"command": "uvx checkov==3.2.
|
|
87
|
+
"command": "uvx checkov==3.2.495 --config-file packages/test/checkov.yml --file dist/packages/test/cdk.out/**/*.template.json",
|
|
94
88
|
},
|
|
95
89
|
"outputs": [
|
|
96
90
|
"{workspaceRoot}/dist/{projectRoot}/checkov",
|
|
@@ -175,7 +169,7 @@ exports[`infra generator > should configure project.json with correct targets >
|
|
|
175
169
|
"{workspaceRoot}/dist/{projectRoot}/cdk.out",
|
|
176
170
|
],
|
|
177
171
|
"options": {
|
|
178
|
-
"command": "uvx checkov==3.2.
|
|
172
|
+
"command": "uvx checkov==3.2.495 --config-file packages/test/checkov.yml --file dist/packages/test/cdk.out/**/*.template.json",
|
|
179
173
|
},
|
|
180
174
|
"outputs": [
|
|
181
175
|
"{workspaceRoot}/dist/{projectRoot}/checkov",
|
|
@@ -238,7 +232,7 @@ exports[`infra generator > should configure project.json with correct targets >
|
|
|
238
232
|
],
|
|
239
233
|
},
|
|
240
234
|
"test": {
|
|
241
|
-
"executor": "@nx/
|
|
235
|
+
"executor": "@nx/vitest:test",
|
|
242
236
|
"options": {
|
|
243
237
|
"reportsDirectory": "../../coverage/packages/test",
|
|
244
238
|
},
|
|
@@ -714,7 +708,7 @@ exports[`infra generator > should handle custom project names correctly > custom
|
|
|
714
708
|
"{workspaceRoot}/dist/{projectRoot}/cdk.out",
|
|
715
709
|
],
|
|
716
710
|
"options": {
|
|
717
|
-
"command": "uvx checkov==3.2.
|
|
711
|
+
"command": "uvx checkov==3.2.495 --config-file packages/custom-infra/checkov.yml --file dist/packages/custom-infra/cdk.out/**/*.template.json",
|
|
718
712
|
},
|
|
719
713
|
"outputs": [
|
|
720
714
|
"{workspaceRoot}/dist/{projectRoot}/checkov",
|
|
@@ -777,7 +771,7 @@ exports[`infra generator > should handle custom project names correctly > custom
|
|
|
777
771
|
],
|
|
778
772
|
},
|
|
779
773
|
"test": {
|
|
780
|
-
"executor": "@nx/
|
|
774
|
+
"executor": "@nx/vitest:test",
|
|
781
775
|
"options": {
|
|
782
776
|
"reportsDirectory": "../../coverage/packages/custom-infra",
|
|
783
777
|
},
|
|
@@ -177,8 +177,8 @@ exports[`preset generator > should run successfully > package.json 1`] = `
|
|
|
177
177
|
"name": "@proj/source",
|
|
178
178
|
"dependencies": {},
|
|
179
179
|
"devDependencies": {
|
|
180
|
-
"@nx/js": "22.
|
|
181
|
-
"@nx/workspace": "22.
|
|
180
|
+
"@nx/js": "22.1.3",
|
|
181
|
+
"@nx/workspace": "22.1.3",
|
|
182
182
|
"@swc-node/register": "~1.9.1",
|
|
183
183
|
"@swc/core": "~1.5.7",
|
|
184
184
|
"@swc/helpers": "~0.5.11",
|
|
@@ -813,13 +813,12 @@ import {
|
|
|
813
813
|
Cors,
|
|
814
814
|
LambdaIntegration,
|
|
815
815
|
} from 'aws-cdk-lib/aws-apigateway';
|
|
816
|
-
import { Duration
|
|
816
|
+
import { Duration } from 'aws-cdk-lib';
|
|
817
817
|
import {
|
|
818
818
|
PolicyDocument,
|
|
819
819
|
PolicyStatement,
|
|
820
820
|
Effect,
|
|
821
821
|
AnyPrincipal,
|
|
822
|
-
AccountPrincipal,
|
|
823
822
|
IGrantable,
|
|
824
823
|
Grant,
|
|
825
824
|
} from 'aws-cdk-lib/aws-iam';
|
|
@@ -908,15 +907,6 @@ export class TestApi<
|
|
|
908
907
|
},
|
|
909
908
|
policy: new PolicyDocument({
|
|
910
909
|
statements: [
|
|
911
|
-
// Here we grant any AWS credentials from the account that the project is deployed in to call the api.
|
|
912
|
-
// Machine to machine fine-grained access can be defined here using more specific principals (eg roles or
|
|
913
|
-
// users) and resources (eg which api paths may be invoked by which principal) if required.
|
|
914
|
-
new PolicyStatement({
|
|
915
|
-
effect: Effect.ALLOW,
|
|
916
|
-
principals: [new AccountPrincipal(Stack.of(scope).account)],
|
|
917
|
-
actions: ['execute-api:Invoke'],
|
|
918
|
-
resources: ['execute-api:/*'],
|
|
919
|
-
}),
|
|
920
910
|
// Open up OPTIONS to allow browsers to make unauthenticated preflight requests
|
|
921
911
|
new PolicyStatement({
|
|
922
912
|
effect: Effect.ALLOW,
|
|
@@ -937,6 +927,18 @@ export class TestApi<
|
|
|
937
927
|
* @param grantee - The IAM principal to grant permissions to
|
|
938
928
|
*/
|
|
939
929
|
public grantInvokeAccess(grantee: IGrantable) {
|
|
930
|
+
// Here we grant grantee permission to call the api.
|
|
931
|
+
// Machine to machine fine-grained access can be defined here using more specific principals (eg roles or
|
|
932
|
+
// users) and resources (eg which api paths may be invoked by which principal) if required.
|
|
933
|
+
this.api.addToResourcePolicy(
|
|
934
|
+
new PolicyStatement({
|
|
935
|
+
effect: Effect.ALLOW,
|
|
936
|
+
principals: [grantee.grantPrincipal],
|
|
937
|
+
actions: ['execute-api:Invoke'],
|
|
938
|
+
resources: ['execute-api:/*'],
|
|
939
|
+
}),
|
|
940
|
+
);
|
|
941
|
+
|
|
940
942
|
Grant.addToPrincipal({
|
|
941
943
|
grantee,
|
|
942
944
|
actions: ['execute-api:Invoke'],
|