@aws/nx-plugin 0.51.0 → 0.52.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 +84 -336
- package/package.json +9 -9
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +27 -27
- package/src/license/config.js +1 -1
- package/src/mcp-server/tools/create-workspace-command.js +2 -1
- package/src/mcp-server/tools/create-workspace-command.js.map +1 -1
- package/src/preset/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +8 -8
- package/src/py/fast-api/generator.js +2 -2
- package/src/py/fast-api/generator.js.map +1 -1
- package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/py/lambda-function/generator.js +3 -3
- package/src/py/lambda-function/generator.js.map +1 -1
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +18 -10
- package/src/py/mcp-server/files/{Dockerfile.template → deploy/Dockerfile.template} +1 -1
- package/src/py/mcp-server/generator.js +8 -9
- package/src/py/mcp-server/generator.js.map +1 -1
- package/src/py/strands-agent/__snapshots__/generator.spec.ts.snap +14 -10
- package/src/py/strands-agent/files/{Dockerfile.template → deploy/Dockerfile.template} +1 -1
- package/src/py/strands-agent/generator.js +9 -9
- package/src/py/strands-agent/generator.js.map +1 -1
- package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/smithy/ts/api/generator.js +1 -1
- package/src/smithy/ts/api/generator.js.map +1 -1
- package/src/trpc/backend/generator.js +1 -1
- package/src/trpc/backend/generator.js.map +1 -1
- package/src/trpc/react/__snapshots__/generator.spec.ts.snap +9 -3
- package/src/trpc/react/files/src/components/__apiNameClassName__ClientProvider.tsx.template +1 -1
- package/src/ts/lib/__snapshots__/generator.spec.ts.snap +6 -4
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +18 -10
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +115 -67
- package/src/ts/react-website/app/files/app/src/components/AppLayout/index.tsx.template +1 -1
- package/src/utils/agent-core-constructs/files/cdk/app/agent-core/__nameKebabCase__/__nameKebabCase__.ts.template +6 -2
- package/src/utils/api-constructs/api-constructs.d.ts +3 -3
- package/src/utils/api-constructs/files/cdk/app/apis/http/__apiNameKebabCase__.ts.template +2 -2
- package/src/utils/api-constructs/files/cdk/app/apis/rest/__apiNameKebabCase__.ts.template +2 -2
- package/src/utils/api-constructs/files/terraform/app/apis/http/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +1 -1
- package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +1 -1
- package/src/utils/bundle/bundle.d.ts +4 -1
- package/src/utils/bundle/bundle.js +18 -14
- package/src/utils/bundle/bundle.js.map +1 -1
- package/src/utils/versions.d.ts +47 -44
- package/src/utils/versions.js +46 -43
- package/src/utils/versions.js.map +1 -1
- /package/src/py/mcp-server/files/{__init__.py.template → app/__init__.py.template} +0 -0
- /package/src/py/mcp-server/files/{http.py.template → app/http.py.template} +0 -0
- /package/src/py/mcp-server/files/{server.py.template → app/server.py.template} +0 -0
- /package/src/py/mcp-server/files/{stdio.py.template → app/stdio.py.template} +0 -0
- /package/src/py/strands-agent/files/{__init__.py.template → app/__init__.py.template} +0 -0
- /package/src/py/strands-agent/files/{agent.py.template → app/agent.py.template} +0 -0
- /package/src/py/strands-agent/files/{agentcore_mcp_client.py.template → app/agentcore_mcp_client.py.template} +0 -0
- /package/src/py/strands-agent/files/{main.py.template → app/main.py.template} +0 -0
|
@@ -8,6 +8,8 @@ import { tanstackRouter } from '@tanstack/router-plugin/vite';
|
|
|
8
8
|
/// <reference types='vitest' />
|
|
9
9
|
import { defineConfig } from 'vite';
|
|
10
10
|
import react from '@vitejs/plugin-react';
|
|
11
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
12
|
+
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
11
13
|
|
|
12
14
|
export default defineConfig(() => ({
|
|
13
15
|
define: {
|
|
@@ -29,6 +31,8 @@ export default defineConfig(() => ({
|
|
|
29
31
|
generatedRouteTree: resolve(__dirname, 'src/routeTree.gen.ts'),
|
|
30
32
|
}),
|
|
31
33
|
react(),
|
|
34
|
+
nxViteTsPaths(),
|
|
35
|
+
nxCopyAssetsPlugin(['*.md']),
|
|
32
36
|
tailwindcss(),
|
|
33
37
|
tsconfigPaths(),
|
|
34
38
|
],
|
|
@@ -48,7 +52,7 @@ export default defineConfig(() => ({
|
|
|
48
52
|
include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
49
53
|
reporters: ['default'],
|
|
50
54
|
coverage: {
|
|
51
|
-
reportsDirectory: '
|
|
55
|
+
reportsDirectory: '../coverage/test-app',
|
|
52
56
|
provider: 'v8' as const,
|
|
53
57
|
},
|
|
54
58
|
passWithNoTests: true,
|
|
@@ -64,6 +68,8 @@ import { tanstackRouter } from '@tanstack/router-plugin/vite';
|
|
|
64
68
|
/// <reference types='vitest' />
|
|
65
69
|
import { defineConfig } from 'vite';
|
|
66
70
|
import react from '@vitejs/plugin-react';
|
|
71
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
72
|
+
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
67
73
|
|
|
68
74
|
export default defineConfig(() => ({
|
|
69
75
|
define: {
|
|
@@ -85,6 +91,8 @@ export default defineConfig(() => ({
|
|
|
85
91
|
generatedRouteTree: resolve(__dirname, 'src/routeTree.gen.ts'),
|
|
86
92
|
}),
|
|
87
93
|
react(),
|
|
94
|
+
nxViteTsPaths(),
|
|
95
|
+
nxCopyAssetsPlugin(['*.md']),
|
|
88
96
|
tsconfigPaths(),
|
|
89
97
|
],
|
|
90
98
|
build: {
|
|
@@ -103,7 +111,7 @@ export default defineConfig(() => ({
|
|
|
103
111
|
include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
104
112
|
reporters: ['default'],
|
|
105
113
|
coverage: {
|
|
106
|
-
reportsDirectory: '
|
|
114
|
+
reportsDirectory: '../coverage/test-app',
|
|
107
115
|
provider: 'v8' as const,
|
|
108
116
|
},
|
|
109
117
|
passWithNoTests: true,
|
|
@@ -886,6 +894,14 @@ vitest.config.*.timestamp*
|
|
|
886
894
|
runtime-config.json"
|
|
887
895
|
`;
|
|
888
896
|
|
|
897
|
+
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > .prettierignore 1`] = `
|
|
898
|
+
"# Add files here to ignore them from prettier formatting
|
|
899
|
+
/dist
|
|
900
|
+
/coverage
|
|
901
|
+
/.nx/cache
|
|
902
|
+
/.nx/workspace-data"
|
|
903
|
+
`;
|
|
904
|
+
|
|
889
905
|
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > .prettierrc 1`] = `
|
|
890
906
|
"{ "singleQuote": true }
|
|
891
907
|
"
|
|
@@ -990,13 +1006,12 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
990
1006
|
"dependsOn": ["^build"],
|
|
991
1007
|
"inputs": ["default", "^default"]
|
|
992
1008
|
},
|
|
993
|
-
"test": {
|
|
994
|
-
"dependsOn": ["^build"],
|
|
995
|
-
"inputs": ["default"]
|
|
996
|
-
},
|
|
997
1009
|
"compile": {
|
|
998
1010
|
"cache": true,
|
|
999
1011
|
"inputs": ["default"]
|
|
1012
|
+
},
|
|
1013
|
+
"test": {
|
|
1014
|
+
"inputs": ["default"]
|
|
1000
1015
|
}
|
|
1001
1016
|
},
|
|
1002
1017
|
"generators": {
|
|
@@ -1054,31 +1069,31 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1054
1069
|
"{
|
|
1055
1070
|
"name": "@proj/source",
|
|
1056
1071
|
"dependencies": {
|
|
1057
|
-
"@cloudscape-design/board-components": "3.0.
|
|
1058
|
-
"@cloudscape-design/components": "3.0.
|
|
1072
|
+
"@cloudscape-design/board-components": "3.0.119",
|
|
1073
|
+
"@cloudscape-design/components": "3.0.1097",
|
|
1059
1074
|
"@cloudscape-design/global-styles": "1.0.45",
|
|
1060
1075
|
"aws-cdk-lib": "2.217.0",
|
|
1061
1076
|
"constructs": "10.4.2",
|
|
1062
1077
|
"react": "19.0.0",
|
|
1063
1078
|
"react-dom": "19.0.0",
|
|
1064
|
-
"tailwindcss": "4.1.
|
|
1079
|
+
"tailwindcss": "4.1.13"
|
|
1065
1080
|
},
|
|
1066
1081
|
"devDependencies": {
|
|
1067
1082
|
"@eslint/js": "^9.8.0",
|
|
1068
|
-
"@nx/eslint": "21.
|
|
1069
|
-
"@nx/eslint-plugin": "21.
|
|
1070
|
-
"@nx/js": "21.
|
|
1071
|
-
"@nx/react": "21.
|
|
1072
|
-
"@nx/vite": "21.
|
|
1073
|
-
"@nx/web": "21.
|
|
1083
|
+
"@nx/eslint": "21.5.3",
|
|
1084
|
+
"@nx/eslint-plugin": "21.5.3",
|
|
1085
|
+
"@nx/js": "21.5.3",
|
|
1086
|
+
"@nx/react": "21.5.3",
|
|
1087
|
+
"@nx/vite": "21.5.3",
|
|
1088
|
+
"@nx/web": "21.5.3",
|
|
1074
1089
|
"@swc-node/register": "~1.9.1",
|
|
1075
1090
|
"@swc/cli": "~0.6.0",
|
|
1076
1091
|
"@swc/core": "~1.5.7",
|
|
1077
1092
|
"@swc/helpers": "~0.5.11",
|
|
1078
|
-
"@tailwindcss/vite": "4.1.
|
|
1093
|
+
"@tailwindcss/vite": "4.1.13",
|
|
1079
1094
|
"@testing-library/dom": "10.4.0",
|
|
1080
1095
|
"@testing-library/react": "16.1.0",
|
|
1081
|
-
"@types/node": "22.18.
|
|
1096
|
+
"@types/node": "22.18.6",
|
|
1082
1097
|
"@types/react": "19.0.0",
|
|
1083
1098
|
"@types/react-dom": "19.0.0",
|
|
1084
1099
|
"@vitejs/plugin-react": "^4.2.0",
|
|
@@ -1093,11 +1108,11 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1093
1108
|
"eslint-plugin-react-hooks": "5.0.0",
|
|
1094
1109
|
"jiti": "2.4.2",
|
|
1095
1110
|
"jsdom": "~22.1.0",
|
|
1096
|
-
"jsonc-eslint-parser": "2.4.
|
|
1111
|
+
"jsonc-eslint-parser": "2.4.1",
|
|
1097
1112
|
"prettier": "3.6.2",
|
|
1098
|
-
"typescript": "~5.
|
|
1099
|
-
"typescript-eslint": "^8.
|
|
1100
|
-
"vite": "^
|
|
1113
|
+
"typescript": "~5.9.2",
|
|
1114
|
+
"typescript-eslint": "^8.40.0",
|
|
1115
|
+
"vite": "^7.0.0",
|
|
1101
1116
|
"vite-tsconfig-paths": "5.1.4",
|
|
1102
1117
|
"vitest": "^3.0.0"
|
|
1103
1118
|
},
|
|
@@ -1164,6 +1179,9 @@ export default [
|
|
|
1164
1179
|
parser: await import('jsonc-eslint-parser'),
|
|
1165
1180
|
},
|
|
1166
1181
|
},
|
|
1182
|
+
{
|
|
1183
|
+
ignores: ['**/out-tsc'],
|
|
1184
|
+
},
|
|
1167
1185
|
];
|
|
1168
1186
|
"
|
|
1169
1187
|
`;
|
|
@@ -1648,9 +1666,9 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1648
1666
|
|
|
1649
1667
|
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > packages/common/constructs/tsconfig.spec.json 1`] = `
|
|
1650
1668
|
"{
|
|
1651
|
-
"extends": "
|
|
1669
|
+
"extends": "./tsconfig.json",
|
|
1652
1670
|
"compilerOptions": {
|
|
1653
|
-
"outDir": "
|
|
1671
|
+
"outDir": "../../../dist/out-tsc",
|
|
1654
1672
|
"types": [
|
|
1655
1673
|
"vitest/globals",
|
|
1656
1674
|
"vitest/importMeta",
|
|
@@ -1687,11 +1705,13 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1687
1705
|
|
|
1688
1706
|
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > packages/common/constructs/vite.config.ts 1`] = `
|
|
1689
1707
|
"import { defineConfig } from 'vite';
|
|
1708
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
1709
|
+
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
1690
1710
|
|
|
1691
1711
|
export default defineConfig(() => ({
|
|
1692
1712
|
root: __dirname,
|
|
1693
1713
|
cacheDir: '../../../node_modules/.vite/packages/common/constructs',
|
|
1694
|
-
plugins: [],
|
|
1714
|
+
plugins: [nxViteTsPaths(), nxCopyAssetsPlugin(['*.md'])],
|
|
1695
1715
|
// Uncomment this if you are using workers.
|
|
1696
1716
|
// worker: {
|
|
1697
1717
|
// plugins: [ nxViteTsPaths() ],
|
|
@@ -1704,7 +1724,7 @@ export default defineConfig(() => ({
|
|
|
1704
1724
|
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
1705
1725
|
reporters: ['default'],
|
|
1706
1726
|
coverage: {
|
|
1707
|
-
reportsDirectory: '
|
|
1727
|
+
reportsDirectory: '../../../coverage/packages/common/constructs',
|
|
1708
1728
|
provider: 'v8' as const,
|
|
1709
1729
|
},
|
|
1710
1730
|
passWithNoTests: true,
|
|
@@ -2159,9 +2179,9 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2159
2179
|
|
|
2160
2180
|
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > test-app/tsconfig.spec.json 1`] = `
|
|
2161
2181
|
"{
|
|
2162
|
-
"extends": "
|
|
2182
|
+
"extends": "./tsconfig.json",
|
|
2163
2183
|
"compilerOptions": {
|
|
2164
|
-
"outDir": "
|
|
2184
|
+
"outDir": "../dist/out-tsc",
|
|
2165
2185
|
"types": [
|
|
2166
2186
|
"vitest/globals",
|
|
2167
2187
|
"vitest/importMeta",
|
|
@@ -2202,6 +2222,8 @@ import tsconfigPaths from 'vite-tsconfig-paths';
|
|
|
2202
2222
|
/// <reference types='vitest' />
|
|
2203
2223
|
import { defineConfig } from 'vite';
|
|
2204
2224
|
import react from '@vitejs/plugin-react';
|
|
2225
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
2226
|
+
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
2205
2227
|
|
|
2206
2228
|
export default defineConfig(() => ({
|
|
2207
2229
|
define: {
|
|
@@ -2217,7 +2239,13 @@ export default defineConfig(() => ({
|
|
|
2217
2239
|
port: 4300,
|
|
2218
2240
|
host: 'localhost',
|
|
2219
2241
|
},
|
|
2220
|
-
plugins: [
|
|
2242
|
+
plugins: [
|
|
2243
|
+
react(),
|
|
2244
|
+
nxViteTsPaths(),
|
|
2245
|
+
nxCopyAssetsPlugin(['*.md']),
|
|
2246
|
+
tailwindcss(),
|
|
2247
|
+
tsconfigPaths(),
|
|
2248
|
+
],
|
|
2221
2249
|
build: {
|
|
2222
2250
|
outDir: '../dist/test-app',
|
|
2223
2251
|
emptyOutDir: true,
|
|
@@ -2234,7 +2262,7 @@ export default defineConfig(() => ({
|
|
|
2234
2262
|
include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
2235
2263
|
reporters: ['default'],
|
|
2236
2264
|
coverage: {
|
|
2237
|
-
reportsDirectory: '
|
|
2265
|
+
reportsDirectory: '../coverage/test-app',
|
|
2238
2266
|
provider: 'v8' as const,
|
|
2239
2267
|
},
|
|
2240
2268
|
passWithNoTests: true,
|
|
@@ -2286,6 +2314,14 @@ vitest.config.*.timestamp*
|
|
|
2286
2314
|
runtime-config.json"
|
|
2287
2315
|
`;
|
|
2288
2316
|
|
|
2317
|
+
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > .prettierignore 1`] = `
|
|
2318
|
+
"# Add files here to ignore them from prettier formatting
|
|
2319
|
+
/dist
|
|
2320
|
+
/coverage
|
|
2321
|
+
/.nx/cache
|
|
2322
|
+
/.nx/workspace-data"
|
|
2323
|
+
`;
|
|
2324
|
+
|
|
2289
2325
|
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > .prettierrc 1`] = `
|
|
2290
2326
|
"{ "singleQuote": true }
|
|
2291
2327
|
"
|
|
@@ -2390,13 +2426,12 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2390
2426
|
"dependsOn": ["^build"],
|
|
2391
2427
|
"inputs": ["default", "^default"]
|
|
2392
2428
|
},
|
|
2393
|
-
"test": {
|
|
2394
|
-
"dependsOn": ["^build"],
|
|
2395
|
-
"inputs": ["default"]
|
|
2396
|
-
},
|
|
2397
2429
|
"compile": {
|
|
2398
2430
|
"cache": true,
|
|
2399
2431
|
"inputs": ["default"]
|
|
2432
|
+
},
|
|
2433
|
+
"test": {
|
|
2434
|
+
"inputs": ["default"]
|
|
2400
2435
|
}
|
|
2401
2436
|
},
|
|
2402
2437
|
"generators": {
|
|
@@ -2454,36 +2489,36 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2454
2489
|
"{
|
|
2455
2490
|
"name": "@proj/source",
|
|
2456
2491
|
"dependencies": {
|
|
2457
|
-
"@cloudscape-design/board-components": "3.0.
|
|
2458
|
-
"@cloudscape-design/components": "3.0.
|
|
2492
|
+
"@cloudscape-design/board-components": "3.0.119",
|
|
2493
|
+
"@cloudscape-design/components": "3.0.1097",
|
|
2459
2494
|
"@cloudscape-design/global-styles": "1.0.45",
|
|
2460
|
-
"@tanstack/react-router": "1.
|
|
2495
|
+
"@tanstack/react-router": "1.132.7",
|
|
2461
2496
|
"aws-cdk-lib": "2.217.0",
|
|
2462
2497
|
"constructs": "10.4.2",
|
|
2463
2498
|
"react": "19.0.0",
|
|
2464
2499
|
"react-dom": "19.0.0",
|
|
2465
|
-
"tailwindcss": "4.1.
|
|
2500
|
+
"tailwindcss": "4.1.13"
|
|
2466
2501
|
},
|
|
2467
2502
|
"devDependencies": {
|
|
2468
2503
|
"@eslint/js": "^9.8.0",
|
|
2469
|
-
"@nx/eslint": "21.
|
|
2470
|
-
"@nx/eslint-plugin": "21.
|
|
2471
|
-
"@nx/js": "21.
|
|
2472
|
-
"@nx/react": "21.
|
|
2473
|
-
"@nx/vite": "21.
|
|
2474
|
-
"@nx/web": "21.
|
|
2504
|
+
"@nx/eslint": "21.5.3",
|
|
2505
|
+
"@nx/eslint-plugin": "21.5.3",
|
|
2506
|
+
"@nx/js": "21.5.3",
|
|
2507
|
+
"@nx/react": "21.5.3",
|
|
2508
|
+
"@nx/vite": "21.5.3",
|
|
2509
|
+
"@nx/web": "21.5.3",
|
|
2475
2510
|
"@swc-node/register": "~1.9.1",
|
|
2476
2511
|
"@swc/cli": "~0.6.0",
|
|
2477
2512
|
"@swc/core": "~1.5.7",
|
|
2478
2513
|
"@swc/helpers": "~0.5.11",
|
|
2479
|
-
"@tailwindcss/vite": "4.1.
|
|
2480
|
-
"@tanstack/router-generator": "1.
|
|
2481
|
-
"@tanstack/router-plugin": "1.
|
|
2482
|
-
"@tanstack/router-utils": "1.
|
|
2483
|
-
"@tanstack/virtual-file-routes": "1.
|
|
2514
|
+
"@tailwindcss/vite": "4.1.13",
|
|
2515
|
+
"@tanstack/router-generator": "1.132.7",
|
|
2516
|
+
"@tanstack/router-plugin": "1.132.7",
|
|
2517
|
+
"@tanstack/router-utils": "1.132.0",
|
|
2518
|
+
"@tanstack/virtual-file-routes": "1.132.0",
|
|
2484
2519
|
"@testing-library/dom": "10.4.0",
|
|
2485
2520
|
"@testing-library/react": "16.1.0",
|
|
2486
|
-
"@types/node": "22.18.
|
|
2521
|
+
"@types/node": "22.18.6",
|
|
2487
2522
|
"@types/react": "19.0.0",
|
|
2488
2523
|
"@types/react-dom": "19.0.0",
|
|
2489
2524
|
"@vitejs/plugin-react": "^4.2.0",
|
|
@@ -2498,11 +2533,11 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2498
2533
|
"eslint-plugin-react-hooks": "5.0.0",
|
|
2499
2534
|
"jiti": "2.4.2",
|
|
2500
2535
|
"jsdom": "~22.1.0",
|
|
2501
|
-
"jsonc-eslint-parser": "2.4.
|
|
2536
|
+
"jsonc-eslint-parser": "2.4.1",
|
|
2502
2537
|
"prettier": "3.6.2",
|
|
2503
|
-
"typescript": "~5.
|
|
2504
|
-
"typescript-eslint": "^8.
|
|
2505
|
-
"vite": "^
|
|
2538
|
+
"typescript": "~5.9.2",
|
|
2539
|
+
"typescript-eslint": "^8.40.0",
|
|
2540
|
+
"vite": "^7.0.0",
|
|
2506
2541
|
"vite-tsconfig-paths": "5.1.4",
|
|
2507
2542
|
"vitest": "^3.0.0"
|
|
2508
2543
|
},
|
|
@@ -2569,6 +2604,9 @@ export default [
|
|
|
2569
2604
|
parser: await import('jsonc-eslint-parser'),
|
|
2570
2605
|
},
|
|
2571
2606
|
},
|
|
2607
|
+
{
|
|
2608
|
+
ignores: ['**/out-tsc'],
|
|
2609
|
+
},
|
|
2572
2610
|
];
|
|
2573
2611
|
"
|
|
2574
2612
|
`;
|
|
@@ -3053,9 +3091,9 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
3053
3091
|
|
|
3054
3092
|
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > packages/common/constructs/tsconfig.spec.json 1`] = `
|
|
3055
3093
|
"{
|
|
3056
|
-
"extends": "
|
|
3094
|
+
"extends": "./tsconfig.json",
|
|
3057
3095
|
"compilerOptions": {
|
|
3058
|
-
"outDir": "
|
|
3096
|
+
"outDir": "../../../dist/out-tsc",
|
|
3059
3097
|
"types": [
|
|
3060
3098
|
"vitest/globals",
|
|
3061
3099
|
"vitest/importMeta",
|
|
@@ -3092,11 +3130,13 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
3092
3130
|
|
|
3093
3131
|
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > packages/common/constructs/vite.config.ts 1`] = `
|
|
3094
3132
|
"import { defineConfig } from 'vite';
|
|
3133
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
3134
|
+
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
3095
3135
|
|
|
3096
3136
|
export default defineConfig(() => ({
|
|
3097
3137
|
root: __dirname,
|
|
3098
3138
|
cacheDir: '../../../node_modules/.vite/packages/common/constructs',
|
|
3099
|
-
plugins: [],
|
|
3139
|
+
plugins: [nxViteTsPaths(), nxCopyAssetsPlugin(['*.md'])],
|
|
3100
3140
|
// Uncomment this if you are using workers.
|
|
3101
3141
|
// worker: {
|
|
3102
3142
|
// plugins: [ nxViteTsPaths() ],
|
|
@@ -3109,7 +3149,7 @@ export default defineConfig(() => ({
|
|
|
3109
3149
|
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
3110
3150
|
reporters: ['default'],
|
|
3111
3151
|
coverage: {
|
|
3112
|
-
reportsDirectory: '
|
|
3152
|
+
reportsDirectory: '../../../coverage/packages/common/constructs',
|
|
3113
3153
|
provider: 'v8' as const,
|
|
3114
3154
|
},
|
|
3115
3155
|
passWithNoTests: true,
|
|
@@ -3404,7 +3444,7 @@ const getBreadcrumbs = (
|
|
|
3404
3444
|
.replace('//', '/')}\`;
|
|
3405
3445
|
|
|
3406
3446
|
const matched =
|
|
3407
|
-
!availableRoutes || availableRoutes.find((r) => matchByPath(
|
|
3447
|
+
!availableRoutes || availableRoutes.find((r) => matchByPath(href, {}));
|
|
3408
3448
|
|
|
3409
3449
|
return {
|
|
3410
3450
|
href: matched ? \`\${href}\${search}\` : '#',
|
|
@@ -3793,9 +3833,9 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
3793
3833
|
|
|
3794
3834
|
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > test-app/tsconfig.spec.json 1`] = `
|
|
3795
3835
|
"{
|
|
3796
|
-
"extends": "
|
|
3836
|
+
"extends": "./tsconfig.json",
|
|
3797
3837
|
"compilerOptions": {
|
|
3798
|
-
"outDir": "
|
|
3838
|
+
"outDir": "../dist/out-tsc",
|
|
3799
3839
|
"types": [
|
|
3800
3840
|
"vitest/globals",
|
|
3801
3841
|
"vitest/importMeta",
|
|
@@ -3838,6 +3878,8 @@ import { tanstackRouter } from '@tanstack/router-plugin/vite';
|
|
|
3838
3878
|
/// <reference types='vitest' />
|
|
3839
3879
|
import { defineConfig } from 'vite';
|
|
3840
3880
|
import react from '@vitejs/plugin-react';
|
|
3881
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
3882
|
+
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
3841
3883
|
|
|
3842
3884
|
export default defineConfig(() => ({
|
|
3843
3885
|
define: {
|
|
@@ -3859,6 +3901,8 @@ export default defineConfig(() => ({
|
|
|
3859
3901
|
generatedRouteTree: resolve(__dirname, 'src/routeTree.gen.ts'),
|
|
3860
3902
|
}),
|
|
3861
3903
|
react(),
|
|
3904
|
+
nxViteTsPaths(),
|
|
3905
|
+
nxCopyAssetsPlugin(['*.md']),
|
|
3862
3906
|
tailwindcss(),
|
|
3863
3907
|
tsconfigPaths(),
|
|
3864
3908
|
],
|
|
@@ -3878,7 +3922,7 @@ export default defineConfig(() => ({
|
|
|
3878
3922
|
include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
3879
3923
|
reporters: ['default'],
|
|
3880
3924
|
coverage: {
|
|
3881
|
-
reportsDirectory: '
|
|
3925
|
+
reportsDirectory: '../coverage/test-app',
|
|
3882
3926
|
provider: 'v8' as const,
|
|
3883
3927
|
},
|
|
3884
3928
|
passWithNoTests: true,
|
|
@@ -3951,6 +3995,8 @@ import { tanstackRouter } from '@tanstack/router-plugin/vite';
|
|
|
3951
3995
|
/// <reference types='vitest' />
|
|
3952
3996
|
import { defineConfig } from 'vite';
|
|
3953
3997
|
import react from '@vitejs/plugin-react';
|
|
3998
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
3999
|
+
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
3954
4000
|
|
|
3955
4001
|
export default defineConfig(() => ({
|
|
3956
4002
|
define: {
|
|
@@ -3972,6 +4018,8 @@ export default defineConfig(() => ({
|
|
|
3972
4018
|
generatedRouteTree: resolve(__dirname, 'src/routeTree.gen.ts'),
|
|
3973
4019
|
}),
|
|
3974
4020
|
react(),
|
|
4021
|
+
nxViteTsPaths(),
|
|
4022
|
+
nxCopyAssetsPlugin(['*.md']),
|
|
3975
4023
|
tailwindcss(),
|
|
3976
4024
|
tsconfigPaths(),
|
|
3977
4025
|
],
|
|
@@ -3991,7 +4039,7 @@ export default defineConfig(() => ({
|
|
|
3991
4039
|
include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
3992
4040
|
reporters: ['default'],
|
|
3993
4041
|
coverage: {
|
|
3994
|
-
reportsDirectory: '
|
|
4042
|
+
reportsDirectory: '../coverage/test-app',
|
|
3995
4043
|
provider: 'v8' as const,
|
|
3996
4044
|
},
|
|
3997
4045
|
passWithNoTests: true,
|
|
@@ -4037,7 +4085,7 @@ const getBreadcrumbs = (
|
|
|
4037
4085
|
.replace('//', '/')}\`;
|
|
4038
4086
|
|
|
4039
4087
|
const matched =
|
|
4040
|
-
!availableRoutes || availableRoutes.find((r) => matchByPath(
|
|
4088
|
+
!availableRoutes || availableRoutes.find((r) => matchByPath(href, {}));
|
|
4041
4089
|
|
|
4042
4090
|
return {
|
|
4043
4091
|
href: matched ? \`\${href}\${search}\` : '#',
|
|
@@ -4537,14 +4585,14 @@ root &&
|
|
|
4537
4585
|
|
|
4538
4586
|
exports[`react-website generator > should handle npm scope prefix correctly > scoped-dependencies 1`] = `
|
|
4539
4587
|
{
|
|
4540
|
-
"@cloudscape-design/board-components": "3.0.
|
|
4541
|
-
"@cloudscape-design/components": "3.0.
|
|
4588
|
+
"@cloudscape-design/board-components": "3.0.119",
|
|
4589
|
+
"@cloudscape-design/components": "3.0.1097",
|
|
4542
4590
|
"@cloudscape-design/global-styles": "1.0.45",
|
|
4543
|
-
"@tanstack/react-router": "1.
|
|
4591
|
+
"@tanstack/react-router": "1.132.7",
|
|
4544
4592
|
"aws-cdk-lib": "2.217.0",
|
|
4545
4593
|
"constructs": "10.4.2",
|
|
4546
4594
|
"react": "19.0.0",
|
|
4547
4595
|
"react-dom": "19.0.0",
|
|
4548
|
-
"tailwindcss": "4.1.
|
|
4596
|
+
"tailwindcss": "4.1.13",
|
|
4549
4597
|
}
|
|
4550
4598
|
`;
|
|
@@ -34,7 +34,7 @@ const getBreadcrumbs = (
|
|
|
34
34
|
.replace('//', '/')}`;
|
|
35
35
|
|
|
36
36
|
const matched =
|
|
37
|
-
!availableRoutes || availableRoutes.find((r) => matchByPath(
|
|
37
|
+
!availableRoutes || availableRoutes.find((r) => matchByPath(href, {}));
|
|
38
38
|
|
|
39
39
|
return {
|
|
40
40
|
href: matched ? `${href}${search}` : '#',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Lazy, Names } from 'aws-cdk-lib';
|
|
1
2
|
import { DockerImageAsset, Platform } from 'aws-cdk-lib/aws-ecr-assets';
|
|
2
3
|
import { Construct } from 'constructs';
|
|
3
4
|
import { execSync } from 'child_process';
|
|
@@ -29,8 +30,11 @@ export class <%- nameClassName %> extends Construct {
|
|
|
29
30
|
).trim(),
|
|
30
31
|
});
|
|
31
32
|
|
|
32
|
-
this.agentCoreRuntime = new AgentCoreRuntime(this, '
|
|
33
|
-
runtimeName:
|
|
33
|
+
this.agentCoreRuntime = new AgentCoreRuntime(this, '<%- nameClassName %>', {
|
|
34
|
+
runtimeName: Lazy.string({
|
|
35
|
+
produce: () =>
|
|
36
|
+
Names.uniqueResourceName(this.agentCoreRuntime, { maxLength: 40 }),
|
|
37
|
+
}),
|
|
34
38
|
serverProtocol: '<%- serverProtocol %>',
|
|
35
39
|
containerUri: this.dockerImage.imageUri,
|
|
36
40
|
...props,
|
|
@@ -10,16 +10,16 @@ interface BackendOptions {
|
|
|
10
10
|
export interface TrpcBackendOptions extends BackendOptions {
|
|
11
11
|
type: 'trpc';
|
|
12
12
|
projectAlias: string;
|
|
13
|
-
|
|
13
|
+
bundleOutputDir: string;
|
|
14
14
|
}
|
|
15
15
|
export interface FastApiBackendOptions extends BackendOptions {
|
|
16
16
|
type: 'fastapi';
|
|
17
17
|
moduleName: string;
|
|
18
|
-
|
|
18
|
+
bundleOutputDir: string;
|
|
19
19
|
}
|
|
20
20
|
export interface SmithyBackendOptions extends BackendOptions {
|
|
21
21
|
type: 'smithy';
|
|
22
|
-
|
|
22
|
+
bundleOutputDir: string;
|
|
23
23
|
}
|
|
24
24
|
export interface AddApiGatewayConstructOptions {
|
|
25
25
|
apiProjectName: string;
|
|
@@ -100,7 +100,7 @@ export class <%= apiNameClassName %><
|
|
|
100
100
|
code: Code.fromAsset(
|
|
101
101
|
url.fileURLToPath(
|
|
102
102
|
new URL(
|
|
103
|
-
'
|
|
103
|
+
'../../../../../../<%- backend.bundleOutputDir %>',
|
|
104
104
|
import.meta.url,
|
|
105
105
|
),
|
|
106
106
|
),
|
|
@@ -111,7 +111,7 @@ export class <%= apiNameClassName %><
|
|
|
111
111
|
code: Code.fromAsset(
|
|
112
112
|
url.fileURLToPath(
|
|
113
113
|
new URL(
|
|
114
|
-
'
|
|
114
|
+
'../../../../../../<%- backend.bundleOutputDir %>',
|
|
115
115
|
import.meta.url,
|
|
116
116
|
),
|
|
117
117
|
),
|
|
@@ -104,7 +104,7 @@ export class <%= apiNameClassName %><
|
|
|
104
104
|
code: Code.fromAsset(
|
|
105
105
|
url.fileURLToPath(
|
|
106
106
|
new URL(
|
|
107
|
-
'
|
|
107
|
+
'../../../../../../<%- backend.bundleOutputDir %>',
|
|
108
108
|
import.meta.url,
|
|
109
109
|
),
|
|
110
110
|
),
|
|
@@ -115,7 +115,7 @@ export class <%= apiNameClassName %><
|
|
|
115
115
|
code: Code.fromAsset(
|
|
116
116
|
url.fileURLToPath(
|
|
117
117
|
new URL(
|
|
118
|
-
'
|
|
118
|
+
'../../../../../../<%- backend.bundleOutputDir %>',
|
|
119
119
|
import.meta.url,
|
|
120
120
|
),
|
|
121
121
|
),
|
|
@@ -91,7 +91,7 @@ data "aws_caller_identity" "current" {}
|
|
|
91
91
|
# Create Lambda ZIP file from the bundle directory
|
|
92
92
|
data "archive_file" "lambda_zip" {
|
|
93
93
|
type = "zip"
|
|
94
|
-
source_dir = "${path.module}
|
|
94
|
+
source_dir = "${path.module}/../../../../../../../<%- backend.bundleOutputDir %>"
|
|
95
95
|
output_path = "${path.module}/../../../../../../../dist/packages/common/terraform/apis/<%- apiNameKebabCase %>/lambda.zip"
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -74,7 +74,7 @@ data "aws_caller_identity" "current" {}
|
|
|
74
74
|
# Create Lambda ZIP file from the FastAPI bundle directory
|
|
75
75
|
data "archive_file" "lambda_zip" {
|
|
76
76
|
type = "zip"
|
|
77
|
-
source_dir = "${path.module}
|
|
77
|
+
source_dir = "${path.module}/../../../../../../../<%- backend.bundleOutputDir %>"
|
|
78
78
|
output_path = "${path.module}/../../../../../../../dist/packages/common/terraform/apis/<%- apiNameKebabCase %>/lambda.zip"
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -13,7 +13,10 @@ export interface AddPythonBundleTargetOptions {
|
|
|
13
13
|
/**
|
|
14
14
|
* Adds a bundle target to the given project if it does not exist, and updates the build target to depend on it
|
|
15
15
|
*/
|
|
16
|
-
export declare const addPythonBundleTarget: (project: ProjectConfiguration, opts?: AddPythonBundleTargetOptions) =>
|
|
16
|
+
export declare const addPythonBundleTarget: (project: ProjectConfiguration, opts?: AddPythonBundleTargetOptions) => {
|
|
17
|
+
bundleTargetName: string;
|
|
18
|
+
bundleOutputDir: string;
|
|
19
|
+
};
|
|
17
20
|
export interface AddTypeScriptBundleTargetOptions {
|
|
18
21
|
/**
|
|
19
22
|
* Path to the target file relative to the project dir
|
|
@@ -14,15 +14,15 @@ const nx_1 = require("../nx");
|
|
|
14
14
|
/**
|
|
15
15
|
* Create a target for bundling a python project
|
|
16
16
|
*/
|
|
17
|
-
const createPythonBundleTarget = ({ projectDir, packageName, pythonPlatform, }) => {
|
|
17
|
+
const createPythonBundleTarget = ({ projectDir, packageName, pythonPlatform, bundleTargetName, }) => {
|
|
18
18
|
return {
|
|
19
19
|
cache: true,
|
|
20
20
|
executor: 'nx:run-commands',
|
|
21
|
-
outputs: [`{workspaceRoot}/dist/${projectDir}
|
|
21
|
+
outputs: [`{workspaceRoot}/dist/${projectDir}/${bundleTargetName}`],
|
|
22
22
|
options: {
|
|
23
23
|
commands: [
|
|
24
|
-
`uv export --frozen --no-dev --no-editable --project ${projectDir} --package ${packageName} -o dist/${projectDir}/
|
|
25
|
-
`uv pip install -n --no-deps --no-installer-metadata --no-compile-bytecode --python-platform ${pythonPlatform} --target dist/${projectDir}
|
|
24
|
+
`uv export --frozen --no-dev --no-editable --project ${projectDir} --package ${packageName} -o dist/${projectDir}/${bundleTargetName}/requirements.txt`,
|
|
25
|
+
`uv pip install -n --no-deps --no-installer-metadata --no-compile-bytecode --python-platform ${pythonPlatform} --target dist/${projectDir}/${bundleTargetName} -r dist/${projectDir}/${bundleTargetName}/requirements.txt`,
|
|
26
26
|
],
|
|
27
27
|
parallel: false,
|
|
28
28
|
},
|
|
@@ -32,23 +32,27 @@ const createPythonBundleTarget = ({ projectDir, packageName, pythonPlatform, })
|
|
|
32
32
|
* Adds a bundle target to the given project if it does not exist, and updates the build target to depend on it
|
|
33
33
|
*/
|
|
34
34
|
const addPythonBundleTarget = (project, opts) => {
|
|
35
|
-
var _a, _b
|
|
35
|
+
var _a, _b;
|
|
36
36
|
if (!project.targets) {
|
|
37
37
|
project.targets = {};
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
const pythonPlatform = (_a = opts === null || opts === void 0 ? void 0 : opts.pythonPlatform) !== null && _a !== void 0 ? _a : 'x86_64-manylinux2014';
|
|
40
|
+
const bundleTargetName = pythonPlatform === 'aarch64-manylinux2014' ? 'bundle-arm' : 'bundle-x86';
|
|
41
|
+
if (!((_b = project.targets) === null || _b === void 0 ? void 0 : _b[bundleTargetName])) {
|
|
42
|
+
project.targets[bundleTargetName] = Object.assign(Object.assign({}, createPythonBundleTarget({
|
|
41
43
|
projectDir: project.root,
|
|
42
44
|
packageName: project.name,
|
|
43
|
-
pythonPlatform
|
|
45
|
+
pythonPlatform,
|
|
46
|
+
bundleTargetName,
|
|
44
47
|
})), { dependsOn: ['compile'] });
|
|
45
48
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
// Add a "bundle" target which depends on either bundle-arm or bundle-x86 (or both)
|
|
50
|
+
(0, nx_1.addDependencyToTargetIfNotPresent)(project, 'bundle', bundleTargetName);
|
|
51
|
+
(0, nx_1.addDependencyToTargetIfNotPresent)(project, 'build', 'bundle');
|
|
52
|
+
return {
|
|
53
|
+
bundleTargetName,
|
|
54
|
+
bundleOutputDir: (0, devkit_1.joinPathFragments)('dist', project.root, bundleTargetName),
|
|
55
|
+
};
|
|
52
56
|
};
|
|
53
57
|
exports.addPythonBundleTarget = addPythonBundleTarget;
|
|
54
58
|
/**
|