@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.
- package/bin/index.cjs +10 -6
- 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
|
|
167
|
-
const
|
|
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 (!
|
|
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
|
|
174
|
-
const flagsToAdd = defaultFlags.filter((flag) => !
|
|
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
|
-
...
|
|
183
|
+
...userArgsWithoutSkipGit
|
|
180
184
|
];
|
|
181
185
|
};
|
|
182
186
|
const initGitRepo = (dir) => {
|