@aws/create-nx-workspace 1.0.0-rc.4 → 1.0.0-rc.41
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/bin/index.cjs +102 -86
- package/package.json +1 -1
package/bin/index.cjs
CHANGED
|
@@ -9,128 +9,132 @@ let path = require("path");
|
|
|
9
9
|
* SPDX-License-Identifier: Apache-2.0
|
|
10
10
|
*/
|
|
11
11
|
const NX_VERSION = {
|
|
12
|
-
"@a2a-js/sdk": "0.3.
|
|
13
|
-
"@aws/aws-distro-opentelemetry-node-autoinstrumentation": "0.
|
|
14
|
-
"@aws-sdk/client-dynamodb": "3.
|
|
15
|
-
"@aws-sdk/client-bedrock-runtime": "3.
|
|
16
|
-
"@aws-sdk/client-s3": "3.
|
|
17
|
-
"@aws-sdk/client-sts": "3.
|
|
18
|
-
"@aws-sdk/credential-providers": "3.
|
|
19
|
-
"@aws-sdk/credential-provider-cognito-identity": "3.972.
|
|
20
|
-
"@aws-sdk/client-secrets-manager": "3.
|
|
21
|
-
"@aws-sdk/rds-signer": "3.
|
|
12
|
+
"@a2a-js/sdk": "0.3.14",
|
|
13
|
+
"@aws/aws-distro-opentelemetry-node-autoinstrumentation": "0.12.0",
|
|
14
|
+
"@aws-sdk/client-dynamodb": "3.1085.0",
|
|
15
|
+
"@aws-sdk/client-bedrock-runtime": "3.1085.0",
|
|
16
|
+
"@aws-sdk/client-s3": "3.1085.0",
|
|
17
|
+
"@aws-sdk/client-sts": "3.1085.0",
|
|
18
|
+
"@aws-sdk/credential-providers": "3.1085.0",
|
|
19
|
+
"@aws-sdk/credential-provider-cognito-identity": "3.972.56",
|
|
20
|
+
"@aws-sdk/client-secrets-manager": "3.1085.0",
|
|
21
|
+
"@aws-sdk/rds-signer": "3.1085.0",
|
|
22
22
|
"@aws-smithy/server-apigateway": "1.0.0-alpha.10",
|
|
23
23
|
"@aws-smithy/server-node": "1.0.0-alpha.10",
|
|
24
|
-
"@aws-lambda-powertools/logger": "2.
|
|
25
|
-
"@aws-lambda-powertools/metrics": "2.
|
|
26
|
-
"@aws-lambda-powertools/parameters": "2.
|
|
27
|
-
"@aws-lambda-powertools/tracer": "2.
|
|
28
|
-
"@aws-lambda-powertools/parser": "2.
|
|
29
|
-
"@aws-sdk/client-appconfigdata": "3.
|
|
30
|
-
"@middy/core": "7.
|
|
31
|
-
"@nxlv/python": "22.1
|
|
32
|
-
"@nx-extend/terraform": "10.
|
|
33
|
-
"@nx/devkit": "
|
|
34
|
-
"@nx/react": "
|
|
35
|
-
"create-nx-workspace": "
|
|
24
|
+
"@aws-lambda-powertools/logger": "2.34.0",
|
|
25
|
+
"@aws-lambda-powertools/metrics": "2.34.0",
|
|
26
|
+
"@aws-lambda-powertools/parameters": "2.34.0",
|
|
27
|
+
"@aws-lambda-powertools/tracer": "2.34.0",
|
|
28
|
+
"@aws-lambda-powertools/parser": "2.34.0",
|
|
29
|
+
"@aws-sdk/client-appconfigdata": "3.1085.0",
|
|
30
|
+
"@middy/core": "7.7.0",
|
|
31
|
+
"@nxlv/python": "22.2.1",
|
|
32
|
+
"@nx-extend/terraform": "10.3.0",
|
|
33
|
+
"@nx/devkit": "23.1.0",
|
|
34
|
+
"@nx/react": "23.1.0",
|
|
35
|
+
"create-nx-workspace": "23.1.0",
|
|
36
|
+
"@swc-node/register": "1.11.1",
|
|
37
|
+
"@swc/core": "1.15.43",
|
|
36
38
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
37
|
-
"@modelcontextprotocol/inspector": "0.
|
|
38
|
-
"@ag-ui/aws-strands": "0.
|
|
39
|
-
"@ag-ui/client": "0.0.
|
|
40
|
-
"@ag-ui/core": "0.0.
|
|
41
|
-
"@ag-ui/encoder": "0.0.
|
|
42
|
-
"agent-chat-cli": "0.
|
|
43
|
-
"@copilotkit/react-core": "1.
|
|
39
|
+
"@modelcontextprotocol/inspector": "0.22.0",
|
|
40
|
+
"@ag-ui/aws-strands": "0.2.3",
|
|
41
|
+
"@ag-ui/client": "0.0.57",
|
|
42
|
+
"@ag-ui/core": "0.0.57",
|
|
43
|
+
"@ag-ui/encoder": "0.0.57",
|
|
44
|
+
"agent-chat-cli": "0.3.0",
|
|
45
|
+
"@copilotkit/react-core": "1.62.3",
|
|
44
46
|
rxjs: "7.8.2",
|
|
45
|
-
"@strands-agents/sdk": "1.
|
|
46
|
-
"@tanstack/react-router": "1.170.
|
|
47
|
-
"@tanstack/router-plugin": "1.168.
|
|
48
|
-
"@tanstack/router-generator": "1.167.
|
|
47
|
+
"@strands-agents/sdk": "1.9.0",
|
|
48
|
+
"@tanstack/react-router": "1.170.17",
|
|
49
|
+
"@tanstack/router-plugin": "1.168.19",
|
|
50
|
+
"@tanstack/router-generator": "1.167.18",
|
|
49
51
|
"@tanstack/virtual-file-routes": "1.162.0",
|
|
50
|
-
"@tanstack/router-utils": "1.162.
|
|
51
|
-
"@cloudscape-design/board-components": "3.0.
|
|
52
|
-
"@cloudscape-design/chat-components": "1.0.
|
|
53
|
-
"@cloudscape-design/components": "3.0.
|
|
54
|
-
"@cloudscape-design/global-styles": "1.0.
|
|
55
|
-
"@tanstack/react-query": "5.
|
|
56
|
-
"@tanstack/react-query-devtools": "5.
|
|
57
|
-
"@trpc/tanstack-react-query": "11.
|
|
58
|
-
"@trpc/client": "11.
|
|
59
|
-
"@trpc/server": "11.
|
|
60
|
-
"@types/node": "
|
|
61
|
-
"@types/aws-lambda": "8.10.
|
|
52
|
+
"@tanstack/router-utils": "1.162.2",
|
|
53
|
+
"@cloudscape-design/board-components": "3.0.201",
|
|
54
|
+
"@cloudscape-design/chat-components": "1.0.149",
|
|
55
|
+
"@cloudscape-design/components": "3.0.1325",
|
|
56
|
+
"@cloudscape-design/global-styles": "1.0.62",
|
|
57
|
+
"@tanstack/react-query": "5.101.2",
|
|
58
|
+
"@tanstack/react-query-devtools": "5.101.2",
|
|
59
|
+
"@trpc/tanstack-react-query": "11.18.0",
|
|
60
|
+
"@trpc/client": "11.18.0",
|
|
61
|
+
"@trpc/server": "11.18.0",
|
|
62
|
+
"@types/node": "26.1.1",
|
|
63
|
+
"@types/aws-lambda": "8.10.162",
|
|
62
64
|
"@types/cors": "2.8.19",
|
|
63
65
|
"@types/pg": "8.20.0",
|
|
64
66
|
"@types/ws": "8.18.1",
|
|
65
67
|
"@types/express": "5.0.6",
|
|
66
|
-
"@smithy/config-resolver": "4.
|
|
67
|
-
"@smithy/node-config-provider": "4.
|
|
68
|
-
"@smithy/node-http-handler": "4.
|
|
69
|
-
"@smithy/types": "4.
|
|
70
|
-
"@vitest/coverage-v8": "4.1.
|
|
71
|
-
"@vitest/ui": "4.1.
|
|
72
|
-
"@astrojs/react": "
|
|
73
|
-
"@astrojs/starlight": "0.
|
|
74
|
-
astro: "
|
|
68
|
+
"@smithy/config-resolver": "4.6.8",
|
|
69
|
+
"@smithy/node-config-provider": "4.5.8",
|
|
70
|
+
"@smithy/node-http-handler": "4.9.5",
|
|
71
|
+
"@smithy/types": "4.16.1",
|
|
72
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
73
|
+
"@vitest/ui": "4.1.10",
|
|
74
|
+
"@astrojs/react": "6.0.1",
|
|
75
|
+
"@astrojs/starlight": "0.41.3",
|
|
76
|
+
astro: "7.0.7",
|
|
75
77
|
aws4fetch: "1.0.20",
|
|
76
|
-
"aws-cdk": "2.
|
|
77
|
-
"aws-cdk-lib": "2.
|
|
78
|
+
"aws-cdk": "2.1130.0",
|
|
79
|
+
"aws-cdk-lib": "2.261.0",
|
|
78
80
|
"aws-xray-sdk-core": "3.12.0",
|
|
79
81
|
constructs: "10.6.0",
|
|
80
82
|
cors: "2.8.6",
|
|
81
83
|
chalk: "5.6.2",
|
|
82
84
|
"class-variance-authority": "0.7.1",
|
|
83
85
|
clsx: "2.1.1",
|
|
84
|
-
commander: "
|
|
85
|
-
electrodb: "3.9.
|
|
86
|
-
esbuild: "0.28.
|
|
86
|
+
commander: "15.0.0",
|
|
87
|
+
electrodb: "3.9.1",
|
|
88
|
+
esbuild: "0.28.1",
|
|
87
89
|
"event-source-polyfill": "1.0.31",
|
|
88
90
|
"@types/event-source-polyfill": "1.0.5",
|
|
89
|
-
"@
|
|
90
|
-
"@typescript-eslint/parser": "8.60.1",
|
|
91
|
+
"@biomejs/biome": "2.5.3",
|
|
91
92
|
"@prisma/adapter-mariadb": "7.8.0",
|
|
92
93
|
"@prisma/adapter-pg": "7.8.0",
|
|
93
94
|
"@prisma/client": "7.8.0",
|
|
94
|
-
|
|
95
|
+
ejs: "6.0.1",
|
|
96
|
+
"@types/ejs": "3.1.5",
|
|
95
97
|
express: "5.2.1",
|
|
96
98
|
"fast-glob": "3.3.3",
|
|
97
99
|
husky: "9.1.7",
|
|
98
|
-
"fs-extra": "11.3.
|
|
100
|
+
"fs-extra": "11.3.6",
|
|
99
101
|
"@types/fs-extra": "11.0.4",
|
|
100
|
-
"jsonc-eslint-parser": "3.1.0",
|
|
101
|
-
"typescript-eslint": "8.60.1",
|
|
102
102
|
"make-dir-cli": "4.0.0",
|
|
103
|
-
mariadb: "3.5.
|
|
103
|
+
mariadb: "3.5.3",
|
|
104
104
|
ncp: "2.0.0",
|
|
105
|
-
|
|
105
|
+
npm: "12.0.1",
|
|
106
|
+
"npm-check-updates": "22.2.9",
|
|
106
107
|
"oidc-client-ts": "3.5.0",
|
|
107
|
-
|
|
108
|
-
pg: "8.21.0",
|
|
108
|
+
pg: "8.22.0",
|
|
109
109
|
prisma: "7.8.0",
|
|
110
110
|
"react-oidc-context": "3.3.1",
|
|
111
111
|
react: "19.2.7",
|
|
112
112
|
"react-dom": "19.2.7",
|
|
113
113
|
rimraf: "6.1.3",
|
|
114
|
-
rolldown: "1.
|
|
114
|
+
rolldown: "1.1.5",
|
|
115
115
|
"simple-git": "3.36.0",
|
|
116
116
|
"source-map-support": "0.5.21",
|
|
117
|
-
"starlight-blog": "0.
|
|
118
|
-
tailwindcss: "4.3.
|
|
119
|
-
"@tailwindcss/vite": "4.3.
|
|
120
|
-
tsx: "4.
|
|
121
|
-
"lucide-react": "1.
|
|
122
|
-
"radix-ui": "1.
|
|
123
|
-
shadcn: "4.
|
|
117
|
+
"starlight-blog": "0.28.0",
|
|
118
|
+
tailwindcss: "4.3.2",
|
|
119
|
+
"@tailwindcss/vite": "4.3.2",
|
|
120
|
+
tsx: "4.23.0",
|
|
121
|
+
"lucide-react": "1.24.0",
|
|
122
|
+
"radix-ui": "1.6.2",
|
|
123
|
+
shadcn: "4.13.0",
|
|
124
124
|
"tw-animate-css": "1.4.0",
|
|
125
125
|
"tailwind-merge": "3.6.0",
|
|
126
|
-
vite: "8.
|
|
126
|
+
vite: "8.1.4",
|
|
127
127
|
typescript: "6.0.3",
|
|
128
|
-
vitest: "4.1.
|
|
128
|
+
vitest: "4.1.10",
|
|
129
129
|
zod: "4.4.3",
|
|
130
130
|
ws: "8.21.0"
|
|
131
131
|
}["create-nx-workspace"];
|
|
132
132
|
const PRESET = `@aws/nx-plugin@${JSON.parse((0, fs.readFileSync)((0, path.resolve)(__dirname, "..", "package.json"), "utf-8")).version}`;
|
|
133
|
-
const DEFAULT_FLAGS = [
|
|
133
|
+
const DEFAULT_FLAGS = [
|
|
134
|
+
"--ci=skip",
|
|
135
|
+
"--analytics=false",
|
|
136
|
+
"--trustThirdPartyPreset"
|
|
137
|
+
];
|
|
134
138
|
/**
|
|
135
139
|
* Detect the package manager from the npm_config_user_agent environment variable.
|
|
136
140
|
* This is set by package managers when running scripts/bins.
|
|
@@ -144,6 +148,18 @@ const detectPackageManager = () => {
|
|
|
144
148
|
if (userAgent.startsWith("npm/")) return "npm";
|
|
145
149
|
};
|
|
146
150
|
const shouldSkipGit = (flagArgs) => flagArgs.some((a) => a === "--skipGit" || a === "--skipGit=true");
|
|
151
|
+
/**
|
|
152
|
+
* Determine whether the given directory is already inside a git repository.
|
|
153
|
+
*/
|
|
154
|
+
const isGitRepo = (dir) => {
|
|
155
|
+
if (!(0, fs.existsSync)(dir)) return false;
|
|
156
|
+
const result = (0, child_process.spawnSync)("git", ["rev-parse", "--is-inside-work-tree"], {
|
|
157
|
+
cwd: dir,
|
|
158
|
+
stdio: "pipe",
|
|
159
|
+
shell: process.platform === "win32"
|
|
160
|
+
});
|
|
161
|
+
return result.status === 0 && result.stdout?.toString().trim() === "true";
|
|
162
|
+
};
|
|
147
163
|
const buildArgs = (args) => {
|
|
148
164
|
const positionalArgs = args.filter((a) => !a.startsWith("-"));
|
|
149
165
|
const flagArgs = args.filter((a) => a.startsWith("-"));
|
|
@@ -194,7 +210,8 @@ const createNxWorkspace = (args) => {
|
|
|
194
210
|
console.error("Error: --preset cannot be used with @aws/create-nx-workspace.\nThis package always creates a workspace with the @aws/nx-plugin preset.\nTo use a different preset, run create-nx-workspace directly:\n\n npx create-nx-workspace <name> --preset=<your-preset>\n");
|
|
195
211
|
return 1;
|
|
196
212
|
}
|
|
197
|
-
const
|
|
213
|
+
const flagArgs = args.filter((a) => a.startsWith("-"));
|
|
214
|
+
const skipGit = shouldSkipGit(flagArgs);
|
|
198
215
|
const allArgs = buildArgs(args);
|
|
199
216
|
const result = (0, child_process.spawnSync)("npx", [
|
|
200
217
|
"-y",
|
|
@@ -202,16 +219,15 @@ const createNxWorkspace = (args) => {
|
|
|
202
219
|
...allArgs
|
|
203
220
|
], {
|
|
204
221
|
stdio: "inherit",
|
|
205
|
-
env: {
|
|
206
|
-
...process.env,
|
|
207
|
-
pnpm_config_strict_dep_builds: "false"
|
|
208
|
-
},
|
|
209
222
|
shell: process.platform === "win32"
|
|
210
223
|
});
|
|
211
224
|
if (result.status !== 0) return result.status ?? 1;
|
|
212
225
|
if (!skipGit) {
|
|
213
226
|
const workspaceName = args.filter((a) => !a.startsWith("-"))[0];
|
|
214
|
-
if (workspaceName)
|
|
227
|
+
if (workspaceName) {
|
|
228
|
+
const workspaceDir = (0, path.resolve)(workspaceName);
|
|
229
|
+
if (!isGitRepo(workspaceDir)) initGitRepo(workspaceDir);
|
|
230
|
+
}
|
|
215
231
|
}
|
|
216
232
|
return 0;
|
|
217
233
|
};
|