@aws/create-nx-workspace 1.0.0-rc.46 → 1.0.0-rc.47

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 +10 -6
  2. package/package.json +1 -1
package/bin/index.cjs CHANGED
@@ -13,6 +13,9 @@ const NX_VERSION = {
13
13
  "@aws/aws-distro-opentelemetry-node-autoinstrumentation": "0.12.0",
14
14
  "@opentelemetry/propagator-jaeger": "2.9.0",
15
15
  "@aws-sdk/client-dynamodb": "3.1090.0",
16
+ "@aws-sdk/client-api-gateway": "3.1090.0",
17
+ "@aws-sdk/client-iam": "3.1090.0",
18
+ "@aws-sdk/client-bedrock-agentcore": "3.1090.0",
16
19
  "@aws-sdk/client-bedrock-runtime": "3.1090.0",
17
20
  "@aws-sdk/client-s3": "3.1090.0",
18
21
  "@aws-sdk/client-sts": "3.1090.0",
@@ -163,20 +166,21 @@ const isGitRepo = (dir) => {
163
166
  return result.status === 0 && result.stdout?.toString().trim() === "true";
164
167
  };
165
168
  const buildArgs = (args) => {
166
- const positionalArgs = args.filter((a) => !a.startsWith("-"));
167
- const flagArgs = args.filter((a) => a.startsWith("-"));
169
+ const firstFlagIndex = args.findIndex((a) => a.startsWith("-"));
170
+ const positionalArgs = firstFlagIndex === -1 ? args : args.slice(0, firstFlagIndex);
171
+ const restArgs = firstFlagIndex === -1 ? [] : args.slice(firstFlagIndex);
168
172
  const defaultFlags = [...DEFAULT_FLAGS, "--skipGit"];
169
- if (!flagArgs.some((a) => a.startsWith("--pm"))) {
173
+ if (!restArgs.some((a) => a.startsWith("--pm"))) {
170
174
  const pm = detectPackageManager();
171
175
  if (pm) defaultFlags.push(`--pm=${pm}`);
172
176
  }
173
- const userFlagsWithoutSkipGit = flagArgs.filter((a) => !a.startsWith("--skipGit"));
174
- const flagsToAdd = defaultFlags.filter((flag) => !userFlagsWithoutSkipGit.some((a) => a.startsWith(flag.split("=")[0])));
177
+ const userArgsWithoutSkipGit = restArgs.filter((a) => !a.startsWith("--skipGit"));
178
+ const flagsToAdd = defaultFlags.filter((flag) => !userArgsWithoutSkipGit.some((a) => a.startsWith(flag.split("=")[0])));
175
179
  return [
176
180
  ...positionalArgs,
177
181
  `--preset=${PRESET}`,
178
182
  ...flagsToAdd,
179
- ...userFlagsWithoutSkipGit
183
+ ...userArgsWithoutSkipGit
180
184
  ];
181
185
  };
182
186
  const initGitRepo = (dir) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/create-nx-workspace",
3
- "version": "1.0.0-rc.46",
3
+ "version": "1.0.0-rc.47",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/awslabs/nx-plugin-for-aws.git",