gsd-code-first 1.0.0 → 1.0.3
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.
|
@@ -913,8 +913,12 @@ async function runCommand(command, args, cwd, raw) {
|
|
|
913
913
|
|
|
914
914
|
case 'extract-tags': {
|
|
915
915
|
const allArgs = args.slice(1);
|
|
916
|
-
const
|
|
917
|
-
const
|
|
916
|
+
const namedFlags = ['phase', 'type', 'format', 'output'];
|
|
917
|
+
const { phase: phaseFilter, type: typeFilter, format, output: outputFile } = parseNamedArgs(allArgs, namedFlags);
|
|
918
|
+
// Filter out --flag tokens and their values so positional arg detection works
|
|
919
|
+
const consumed = new Set();
|
|
920
|
+
for (const f of namedFlags) { const i = allArgs.indexOf(`--${f}`); if (i !== -1) { consumed.add(i); if (allArgs[i + 1] && !allArgs[i + 1].startsWith('--')) consumed.add(i + 1); } }
|
|
921
|
+
const targetPath = allArgs.filter((_, i) => !consumed.has(i) && !allArgs[i].startsWith('--'))[0] || cwd;
|
|
918
922
|
arcScanner.cmdExtractTags(cwd, targetPath, {
|
|
919
923
|
phaseFilter,
|
|
920
924
|
typeFilter,
|
|
@@ -146,14 +146,14 @@ Proceed to install step (treat as version 0.0.0 for comparison).
|
|
|
146
146
|
Check npm for latest version:
|
|
147
147
|
|
|
148
148
|
```bash
|
|
149
|
-
npm view
|
|
149
|
+
npm view gsd-code-first version 2>/dev/null
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
**If npm check fails:**
|
|
153
153
|
```
|
|
154
154
|
Couldn't check for updates (offline or npm unavailable).
|
|
155
155
|
|
|
156
|
-
To update manually: `npx
|
|
156
|
+
To update manually: `npx gsd-code-first --global`
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
Exit.
|
|
@@ -252,17 +252,17 @@ RUNTIME_FLAG="--$TARGET_RUNTIME"
|
|
|
252
252
|
|
|
253
253
|
**If LOCAL install:**
|
|
254
254
|
```bash
|
|
255
|
-
npx -y
|
|
255
|
+
npx -y gsd-code-first@latest "$RUNTIME_FLAG" --local
|
|
256
256
|
```
|
|
257
257
|
|
|
258
258
|
**If GLOBAL install:**
|
|
259
259
|
```bash
|
|
260
|
-
npx -y
|
|
260
|
+
npx -y gsd-code-first@latest "$RUNTIME_FLAG" --global
|
|
261
261
|
```
|
|
262
262
|
|
|
263
263
|
**If UNKNOWN install:**
|
|
264
264
|
```bash
|
|
265
|
-
npx -y
|
|
265
|
+
npx -y gsd-code-first@latest --claude --global
|
|
266
266
|
```
|
|
267
267
|
|
|
268
268
|
Capture output. If install fails, show error and exit.
|
|
@@ -93,7 +93,7 @@ const child = spawn(process.execPath, ['-e', `
|
|
|
93
93
|
|
|
94
94
|
let latest = null;
|
|
95
95
|
try {
|
|
96
|
-
latest = execSync('npm view
|
|
96
|
+
latest = execSync('npm view gsd-code-first version', { encoding: 'utf8', timeout: 10000, windowsHide: true }).trim();
|
|
97
97
|
} catch (e) {}
|
|
98
98
|
|
|
99
99
|
const result = {
|