@aws/create-nx-workspace 1.0.0-rc.5 → 1.0.0-rc.50

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.
Files changed (2) hide show
  1. package/bin/index.cjs +117 -94
  2. package/package.json +1 -1
package/bin/index.cjs CHANGED
@@ -9,128 +9,138 @@ 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",
13
- "@aws/aws-distro-opentelemetry-node-autoinstrumentation": "0.11.0",
14
- "@aws-sdk/client-dynamodb": "3.1058.0",
15
- "@aws-sdk/client-bedrock-runtime": "3.1058.0",
16
- "@aws-sdk/client-s3": "3.1058.0",
17
- "@aws-sdk/client-sts": "3.1058.0",
18
- "@aws-sdk/credential-providers": "3.1058.0",
19
- "@aws-sdk/credential-provider-cognito-identity": "3.972.38",
20
- "@aws-sdk/client-secrets-manager": "3.1058.0",
21
- "@aws-sdk/rds-signer": "3.1058.0",
12
+ "@a2a-js/sdk": "0.3.14",
13
+ "@aws/aws-distro-opentelemetry-node-autoinstrumentation": "0.12.0",
14
+ "@opentelemetry/propagator-jaeger": "2.9.0",
15
+ minimatch: "10.2.5",
16
+ "@aws-sdk/client-dynamodb": "3.1090.0",
17
+ "@aws-sdk/client-api-gateway": "3.1090.0",
18
+ "@aws-sdk/client-iam": "3.1090.0",
19
+ "@aws-sdk/client-bedrock-agentcore": "3.1090.0",
20
+ "@aws-sdk/client-bedrock-runtime": "3.1090.0",
21
+ "@aws-sdk/client-s3": "3.1090.0",
22
+ "@aws-sdk/client-sts": "3.1090.0",
23
+ "@aws-sdk/credential-providers": "3.1090.0",
24
+ "@aws-sdk/credential-provider-cognito-identity": "3.972.58",
25
+ "@aws-sdk/client-secrets-manager": "3.1090.0",
26
+ "@aws-sdk/rds-signer": "3.1090.0",
22
27
  "@aws-smithy/server-apigateway": "1.0.0-alpha.10",
23
28
  "@aws-smithy/server-node": "1.0.0-alpha.10",
24
- "@aws-lambda-powertools/logger": "2.33.1",
25
- "@aws-lambda-powertools/metrics": "2.33.1",
26
- "@aws-lambda-powertools/parameters": "2.33.1",
27
- "@aws-lambda-powertools/tracer": "2.33.1",
28
- "@aws-lambda-powertools/parser": "2.33.1",
29
- "@aws-sdk/client-appconfigdata": "3.1058.0",
30
- "@middy/core": "7.6.5",
31
- "@nxlv/python": "22.1.4",
32
- "@nx-extend/terraform": "10.2.1",
33
- "@nx/devkit": "22.7.5",
34
- "@nx/react": "22.7.5",
35
- "create-nx-workspace": "22.7.5",
29
+ "@aws-lambda-powertools/logger": "2.34.0",
30
+ "@aws-lambda-powertools/metrics": "2.34.0",
31
+ "@aws-lambda-powertools/parameters": "2.34.0",
32
+ "@aws-lambda-powertools/tracer": "2.34.0",
33
+ "@aws-lambda-powertools/parser": "2.34.0",
34
+ "@aws-sdk/client-appconfigdata": "3.1090.0",
35
+ "@middy/core": "7.7.0",
36
+ "@nxlv/python": "22.2.2",
37
+ "@nx-extend/terraform": "10.3.0",
38
+ "@nx/devkit": "23.1.0",
39
+ "@nx/react": "23.1.0",
40
+ "create-nx-workspace": "23.1.0",
41
+ "@swc-node/register": "1.12.1",
42
+ "@swc/core": "1.15.43",
36
43
  "@modelcontextprotocol/sdk": "1.29.0",
37
- "@modelcontextprotocol/inspector": "0.19.0",
38
- "@ag-ui/aws-strands": "0.1.0",
39
- "@ag-ui/client": "0.0.53",
40
- "@ag-ui/core": "0.0.53",
41
- "@ag-ui/encoder": "0.0.53",
42
- "agent-chat-cli": "0.2.0",
43
- "@copilotkit/react-core": "1.59.2",
44
+ "@modelcontextprotocol/inspector": "0.22.0",
45
+ "@ag-ui/a2ui-toolkit": "0.0.4",
46
+ "@ag-ui/aws-strands": "0.2.3",
47
+ "@ag-ui/client": "0.0.57",
48
+ "@ag-ui/core": "0.0.57",
49
+ "@ag-ui/encoder": "0.0.57",
50
+ "agent-chat-cli": "0.3.0",
51
+ "@copilotkit/react-core": "1.63.1",
44
52
  rxjs: "7.8.2",
45
- "@strands-agents/sdk": "1.3.0",
46
- "@tanstack/react-router": "1.170.10",
47
- "@tanstack/router-plugin": "1.168.13",
48
- "@tanstack/router-generator": "1.167.12",
53
+ "@strands-agents/sdk": "1.10.0",
54
+ "@tanstack/react-router": "1.170.18",
55
+ "@tanstack/router-plugin": "1.168.22",
56
+ "@tanstack/router-generator": "1.167.21",
49
57
  "@tanstack/virtual-file-routes": "1.162.0",
50
- "@tanstack/router-utils": "1.162.1",
51
- "@cloudscape-design/board-components": "3.0.187",
52
- "@cloudscape-design/chat-components": "1.0.136",
53
- "@cloudscape-design/components": "3.0.1304",
54
- "@cloudscape-design/global-styles": "1.0.59",
55
- "@tanstack/react-query": "5.100.14",
56
- "@tanstack/react-query-devtools": "5.100.14",
57
- "@trpc/tanstack-react-query": "11.17.0",
58
- "@trpc/client": "11.17.0",
59
- "@trpc/server": "11.17.0",
60
- "@types/node": "25.9.1",
61
- "@types/aws-lambda": "8.10.161",
58
+ "@tanstack/router-utils": "1.162.2",
59
+ "@cloudscape-design/board-components": "3.0.205",
60
+ "@cloudscape-design/chat-components": "1.0.151",
61
+ "@cloudscape-design/components": "3.0.1330",
62
+ "@cloudscape-design/global-styles": "1.0.62",
63
+ "@tanstack/react-query": "5.101.2",
64
+ "@tanstack/react-query-devtools": "5.101.2",
65
+ "@trpc/tanstack-react-query": "11.18.0",
66
+ "@trpc/client": "11.18.0",
67
+ "@trpc/server": "11.18.0",
68
+ "@types/node": "26.1.1",
69
+ "@types/aws-lambda": "8.10.162",
62
70
  "@types/cors": "2.8.19",
63
71
  "@types/pg": "8.20.0",
64
72
  "@types/ws": "8.18.1",
65
73
  "@types/express": "5.0.6",
66
- "@smithy/config-resolver": "4.5.6",
67
- "@smithy/node-config-provider": "4.4.6",
68
- "@smithy/node-http-handler": "4.7.6",
69
- "@smithy/types": "4.14.3",
70
- "@vitest/coverage-v8": "4.1.7",
71
- "@vitest/ui": "4.1.7",
72
- "@astrojs/react": "5.0.6",
73
- "@astrojs/starlight": "0.39.2",
74
- astro: "6.4.2",
74
+ "@smithy/config-resolver": "4.6.10",
75
+ "@smithy/node-config-provider": "4.5.10",
76
+ "@smithy/node-http-handler": "4.9.7",
77
+ "@smithy/types": "4.16.1",
78
+ "@vitest/coverage-v8": "4.1.10",
79
+ "@vitest/ui": "4.1.10",
80
+ "@astrojs/react": "6.0.1",
81
+ "@astrojs/starlight": "0.41.3",
82
+ astro: "7.1.1",
75
83
  aws4fetch: "1.0.20",
76
- "aws-cdk": "2.1125.0",
77
- "aws-cdk-lib": "2.257.0",
84
+ "aws-cdk": "2.1132.0",
85
+ "aws-cdk-lib": "2.261.0",
78
86
  "aws-xray-sdk-core": "3.12.0",
79
- constructs: "10.6.0",
87
+ constructs: "10.7.0",
80
88
  cors: "2.8.6",
81
89
  chalk: "5.6.2",
82
90
  "class-variance-authority": "0.7.1",
83
91
  clsx: "2.1.1",
84
- commander: "14.0.3",
85
- electrodb: "3.9.0",
86
- esbuild: "0.28.0",
92
+ commander: "15.0.0",
93
+ electrodb: "3.9.1",
94
+ esbuild: "0.28.1",
87
95
  "event-source-polyfill": "1.0.31",
88
96
  "@types/event-source-polyfill": "1.0.5",
89
- "@typescript-eslint/eslint-plugin": "8.60.1",
90
- "@typescript-eslint/parser": "8.60.1",
97
+ "@biomejs/biome": "2.5.4",
91
98
  "@prisma/adapter-mariadb": "7.8.0",
92
99
  "@prisma/adapter-pg": "7.8.0",
93
100
  "@prisma/client": "7.8.0",
94
- "eslint-plugin-prettier": "5.5.6",
101
+ ejs: "6.0.1",
102
+ "@types/ejs": "3.1.5",
95
103
  express: "5.2.1",
96
104
  "fast-glob": "3.3.3",
97
105
  husky: "9.1.7",
98
- "fs-extra": "11.3.5",
106
+ "fs-extra": "11.3.6",
99
107
  "@types/fs-extra": "11.0.4",
100
- "jsonc-eslint-parser": "3.1.0",
101
- "typescript-eslint": "8.60.1",
102
108
  "make-dir-cli": "4.0.0",
103
- mariadb: "3.5.2",
109
+ mariadb: "3.5.3",
104
110
  ncp: "2.0.0",
105
- "npm-check-updates": "19.6.6",
111
+ npm: "12.0.1",
112
+ "npm-check-updates": "22.2.9",
106
113
  "oidc-client-ts": "3.5.0",
107
- prettier: "3.8.3",
108
- pg: "8.21.0",
114
+ pg: "8.22.0",
109
115
  prisma: "7.8.0",
110
116
  "react-oidc-context": "3.3.1",
111
117
  react: "19.2.7",
112
118
  "react-dom": "19.2.7",
113
119
  rimraf: "6.1.3",
114
- rolldown: "1.0.2",
120
+ rolldown: "1.2.0",
115
121
  "simple-git": "3.36.0",
116
122
  "source-map-support": "0.5.21",
117
- "starlight-blog": "0.26.1",
118
- tailwindcss: "4.3.0",
119
- "@tailwindcss/vite": "4.3.0",
120
- tsx: "4.22.4",
121
- "lucide-react": "1.17.0",
122
- "radix-ui": "1.4.3",
123
- shadcn: "4.10.0",
123
+ "starlight-blog": "0.28.0",
124
+ tailwindcss: "4.3.3",
125
+ "@tailwindcss/vite": "4.3.3",
126
+ tsx: "4.23.1",
127
+ "lucide-react": "1.25.0",
128
+ "radix-ui": "1.6.2",
129
+ shadcn: "4.13.1",
124
130
  "tw-animate-css": "1.4.0",
125
131
  "tailwind-merge": "3.6.0",
126
- vite: "8.0.14",
132
+ vite: "8.1.5",
127
133
  typescript: "6.0.3",
128
- vitest: "4.1.7",
134
+ vitest: "4.1.10",
129
135
  zod: "4.4.3",
130
- ws: "8.21.0"
136
+ ws: "8.21.1"
131
137
  }["create-nx-workspace"];
132
138
  const PRESET = `@aws/nx-plugin@${JSON.parse((0, fs.readFileSync)((0, path.resolve)(__dirname, "..", "package.json"), "utf-8")).version}`;
133
- const DEFAULT_FLAGS = ["--ci=skip", "--analytics=false"];
139
+ const DEFAULT_FLAGS = [
140
+ "--ci=skip",
141
+ "--analytics=false",
142
+ "--trustThirdPartyPreset"
143
+ ];
134
144
  /**
135
145
  * Detect the package manager from the npm_config_user_agent environment variable.
136
146
  * This is set by package managers when running scripts/bins.
@@ -144,21 +154,34 @@ const detectPackageManager = () => {
144
154
  if (userAgent.startsWith("npm/")) return "npm";
145
155
  };
146
156
  const shouldSkipGit = (flagArgs) => flagArgs.some((a) => a === "--skipGit" || a === "--skipGit=true");
157
+ /**
158
+ * Determine whether the given directory is already inside a git repository.
159
+ */
160
+ const isGitRepo = (dir) => {
161
+ if (!(0, fs.existsSync)(dir)) return false;
162
+ const result = (0, child_process.spawnSync)("git", ["rev-parse", "--is-inside-work-tree"], {
163
+ cwd: dir,
164
+ stdio: "pipe",
165
+ shell: process.platform === "win32"
166
+ });
167
+ return result.status === 0 && result.stdout?.toString().trim() === "true";
168
+ };
147
169
  const buildArgs = (args) => {
148
- const positionalArgs = args.filter((a) => !a.startsWith("-"));
149
- const flagArgs = args.filter((a) => a.startsWith("-"));
170
+ const firstFlagIndex = args.findIndex((a) => a.startsWith("-"));
171
+ const positionalArgs = firstFlagIndex === -1 ? args : args.slice(0, firstFlagIndex);
172
+ const restArgs = firstFlagIndex === -1 ? [] : args.slice(firstFlagIndex);
150
173
  const defaultFlags = [...DEFAULT_FLAGS, "--skipGit"];
151
- if (!flagArgs.some((a) => a.startsWith("--pm"))) {
174
+ if (!restArgs.some((a) => a.startsWith("--pm"))) {
152
175
  const pm = detectPackageManager();
153
176
  if (pm) defaultFlags.push(`--pm=${pm}`);
154
177
  }
155
- const userFlagsWithoutSkipGit = flagArgs.filter((a) => !a.startsWith("--skipGit"));
156
- const flagsToAdd = defaultFlags.filter((flag) => !userFlagsWithoutSkipGit.some((a) => a.startsWith(flag.split("=")[0])));
178
+ const userArgsWithoutSkipGit = restArgs.filter((a) => !a.startsWith("--skipGit"));
179
+ const flagsToAdd = defaultFlags.filter((flag) => !userArgsWithoutSkipGit.some((a) => a.startsWith(flag.split("=")[0])));
157
180
  return [
158
181
  ...positionalArgs,
159
182
  `--preset=${PRESET}`,
160
183
  ...flagsToAdd,
161
- ...userFlagsWithoutSkipGit
184
+ ...userArgsWithoutSkipGit
162
185
  ];
163
186
  };
164
187
  const initGitRepo = (dir) => {
@@ -194,7 +217,8 @@ const createNxWorkspace = (args) => {
194
217
  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
218
  return 1;
196
219
  }
197
- const skipGit = shouldSkipGit(args.filter((a) => a.startsWith("-")));
220
+ const flagArgs = args.filter((a) => a.startsWith("-"));
221
+ const skipGit = shouldSkipGit(flagArgs);
198
222
  const allArgs = buildArgs(args);
199
223
  const result = (0, child_process.spawnSync)("npx", [
200
224
  "-y",
@@ -202,16 +226,15 @@ const createNxWorkspace = (args) => {
202
226
  ...allArgs
203
227
  ], {
204
228
  stdio: "inherit",
205
- env: {
206
- ...process.env,
207
- pnpm_config_strict_dep_builds: "false"
208
- },
209
229
  shell: process.platform === "win32"
210
230
  });
211
231
  if (result.status !== 0) return result.status ?? 1;
212
232
  if (!skipGit) {
213
233
  const workspaceName = args.filter((a) => !a.startsWith("-"))[0];
214
- if (workspaceName) initGitRepo((0, path.resolve)(workspaceName));
234
+ if (workspaceName) {
235
+ const workspaceDir = (0, path.resolve)(workspaceName);
236
+ if (!isGitRepo(workspaceDir)) initGitRepo(workspaceDir);
237
+ }
215
238
  }
216
239
  return 0;
217
240
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/create-nx-workspace",
3
- "version": "1.0.0-rc.5",
3
+ "version": "1.0.0-rc.50",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/awslabs/nx-plugin-for-aws.git",