doctor: build dependencies (JDK with the version the project needs, Android SDK command-line tools, CocoaPods, Node, Bun, bundletool), too-old status, doctor --install <tool> --yes runs the package-manager command (never sudo); desktop Dependencies shows too old; gen-flags works on Windows paths
This commit is contained in:
parent
a8a889fb35
commit
2598c4953a
10 changed files with 137 additions and 14 deletions
|
|
@ -9,7 +9,7 @@
|
|||
// bun tools/gen-flags.ts write cli/data/flags.json
|
||||
// bun tools/gen-flags.ts --check exit 1 when the file is stale (tests/cli-help.test.ts runs it)
|
||||
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
||||
import { dirname, join, relative, resolve } from 'node:path';
|
||||
import { dirname, join, relative, resolve, sep } from 'node:path';
|
||||
|
||||
const ROOT = resolve(import.meta.dir, '..');
|
||||
const CLI = join(ROOT, 'cli');
|
||||
|
|
@ -48,9 +48,9 @@ function scan(entry: string, errors: string[]): Set<string> {
|
|||
const f = todo.pop()!;
|
||||
if (seen.has(f)) continue;
|
||||
seen.add(f);
|
||||
const rel = relative(CLI, f);
|
||||
const rel = relative(CLI, f).split(sep).join('/');
|
||||
// lib/embedded.ts holds file texts (templates, shots pages: their own scripts read URL params), not flag reads
|
||||
if (rel === 'index.ts' || rel === 'commands.ts' || rel === join('lib', 'embedded.ts')) continue;
|
||||
if (rel === 'index.ts' || rel === 'commands.ts' || rel === 'lib/embedded.ts') continue;
|
||||
const src = readFileSync(f, 'utf8');
|
||||
for (const m of src.matchAll(READ)) if (!NOT_ARGS.test(m[1]!)) flags.add(m[3]!);
|
||||
for (const fl of DYNAMIC[rel] ?? []) flags.add(fl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue