@geoql/nuxt-doctor 1.0.0 → 1.1.0
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/README.md +4 -0
- package/dist/index.js +28 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -59,6 +59,10 @@ nuxt-doctor --score
|
|
|
59
59
|
| `--no-respect-inline-disables` | Surface findings even inside `doctor-disable` comments. |
|
|
60
60
|
| `--threshold <n>` | Minimum passing score, integer `0`–`100`. |
|
|
61
61
|
| `--score` | Print only the numeric score, for piping. |
|
|
62
|
+
| `--push` | After the audit, POST privacy-stripped findings to the SaaS. Requires `--api-key`. Negatable with `--no-push`. |
|
|
63
|
+
| `--no-push` | Skip the SaaS push (default). |
|
|
64
|
+
| `--push-url <url>` | SaaS endpoint for `--push` (default: `https://app.the-doctor.report/api/v1/findings`). |
|
|
65
|
+
| `--api-key <key>` | API key for the SaaS, sent as the `x-api-key` header. |
|
|
62
66
|
| `--annotations` | Emit GitHub Actions `::error::` / `::warning::` lines. |
|
|
63
67
|
| `--ci` | Auto-enable CI behavior (annotations on GitHub Actions). |
|
|
64
68
|
| `--no-ci` | Disable CI auto-detection even when a CI env is set. |
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { readFileSync, writeFileSync } from "node:fs";
|
|
|
2
2
|
import { dirname, resolve } from "node:path";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { audit, detectProject, detectSummary, encodeAnnotations, findMonorepoRoot, format, listChangedFiles, listRules, listWorkspacePackages, loadDoctorConfig, loadRuleDoc, mergeCliOverrides, normalizeInitAnswers, planInit, renderVerboseTrace, scoreDiagnostics } from "@geoql/doctor-core";
|
|
5
|
+
import { audit, detectProject, detectSummary, encodeAnnotations, findMonorepoRoot, format, listChangedFiles, listRules, listWorkspacePackages, loadDoctorConfig, loadRuleDoc, mergeCliOverrides, normalizeInitAnswers, planInit, pushFindings, renderVerboseTrace, scoreDiagnostics } from "@geoql/doctor-core";
|
|
6
6
|
import { cac } from "cac";
|
|
7
7
|
import prompts from "prompts";
|
|
8
8
|
//#region src/cli.ts
|
|
@@ -263,6 +263,29 @@ function emitReport(report, reporter, flags) {
|
|
|
263
263
|
const ciAutoDetected = !ciExplicitOptOut && isCiEnvironment();
|
|
264
264
|
if ((flags.annotations === true || ciExplicitOptIn || ciAutoDetected) && (reporter === "agent" || reporter === "pretty") && !flags.quiet && report.diagnostics.length > 0) process.stdout.write(`${encodeAnnotations(report.diagnostics)}\n`);
|
|
265
265
|
}
|
|
266
|
+
async function maybePushFindings(report, flags) {
|
|
267
|
+
if (flags.push !== true) return;
|
|
268
|
+
if (!flags.apiKey) {
|
|
269
|
+
process.stderr.write("nuxt-doctor: --push enabled but --api-key is not set; skipping push (no findings were sent).\n");
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
const url = flags.pushUrl;
|
|
273
|
+
const result = await pushFindings({
|
|
274
|
+
project: "nuxt-doctor",
|
|
275
|
+
score: report.score,
|
|
276
|
+
errorCount: report.errorCount,
|
|
277
|
+
warnCount: report.warnCount,
|
|
278
|
+
infoCount: report.infoCount,
|
|
279
|
+
diagnostics: report.diagnostics,
|
|
280
|
+
url,
|
|
281
|
+
apiKey: flags.apiKey
|
|
282
|
+
});
|
|
283
|
+
if (result.ok) process.stderr.write(`nuxt-doctor: pushed ${report.diagnostics.length} finding${report.diagnostics.length === 1 ? "" : "s"} to ${url} (HTTP ${result.status}).\n`);
|
|
284
|
+
else {
|
|
285
|
+
const detail = result.status !== void 0 ? ` (HTTP ${result.status})` : "";
|
|
286
|
+
process.stderr.write(`nuxt-doctor: --push failed${detail}: ${result.error}. Audit exit code is unchanged.\n`);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
266
289
|
async function runProjectAudits(rootDir, flags, prepared, packages) {
|
|
267
290
|
const requested = flags.project.split(",").map((name) => name.trim()).filter((name) => name.length > 0);
|
|
268
291
|
const byName = new Map(packages.map((p) => [p.name, p]));
|
|
@@ -404,7 +427,7 @@ async function runInteractiveInit(defaultFormat) {
|
|
|
404
427
|
}
|
|
405
428
|
async function run(argv = process.argv) {
|
|
406
429
|
const cli = cac("nuxt-doctor");
|
|
407
|
-
cli.command("[path]", "Audit a Nuxt project").option("--format <kind>", "Output format (agent|pretty|json|json-compact|sarif|html|pr-comment)", { default: "agent" }).option("--json", "Shorthand for --format json").option("--json-compact", "Emit single-line JSON").option("--config <path>", "Path to doctor.config.ts").option("--preset <name>", "Base preset: minimal|recommended|strict|all").option("--fail-on <level>", "Exit non-zero on this severity or worse (error|warn|none)", { default: "error" }).option("--quiet", "Only show the summary").option("--verbose", "Emit per-pass timing and rule diagnostics to stderr").option("--no-color", "Disable colored output").option("--rule <id:level>", "Override a rule (repeatable), e.g. --rule a/b:off").option("--include <glob>", "Glob of files to include (repeatable)").option("--exclude <glob>", "Glob of files to exclude (repeatable)").option("--no-dead-code", "Skip the dead-code (knip) analysis pass").option("--no-lint", "Skip the lint passes (template/SFC/oxlint)").option("--no-respect-inline-disables", "Surface findings even inside doctor-disable comments").option("--threshold <n>", "Minimum passing score (0-100)").option("--score", "Output only the numeric score (for piping)").option("--annotations", "Emit GitHub Actions ::error::/::warning:: lines").option("--ci", "Auto-enable CI behavior (--annotations on GitHub Actions)").option("--no-ci", "Disable CI auto-detection even when CI env is set").option("--diff", "Only report findings in files changed vs HEAD").option("--staged", "Only report findings in staged files").option("--full", "Force a complete scan (overrides --diff/--staged)").option("--project <name>", "Comma-separated workspace project names to audit (monorepo)").option("--output <file>", "Write the report to a file instead of stdout").option("--pr-comment", "Emit a focused Markdown PR-comment body").option("--fix", "Auto-fix oxlint-pass findings in place (built-in vue/* rules only; template/SFC/dead-code/project findings are not fixable). Skipped in --diff/--staged mode.").option("--fix-exclude <ruleId>", "Mark a rule as not-auto-fixable (repeatable). Note: oxlint applies built-in fixes globally, so this is enforced only for doctor plugin fixes; built-in vue/* fixes still apply.").action(async (path, flags) => {
|
|
430
|
+
cli.command("[path]", "Audit a Nuxt project").option("--format <kind>", "Output format (agent|pretty|json|json-compact|sarif|html|pr-comment)", { default: "agent" }).option("--json", "Shorthand for --format json").option("--json-compact", "Emit single-line JSON").option("--config <path>", "Path to doctor.config.ts").option("--preset <name>", "Base preset: minimal|recommended|strict|all").option("--fail-on <level>", "Exit non-zero on this severity or worse (error|warn|none)", { default: "error" }).option("--quiet", "Only show the summary").option("--verbose", "Emit per-pass timing and rule diagnostics to stderr").option("--no-color", "Disable colored output").option("--rule <id:level>", "Override a rule (repeatable), e.g. --rule a/b:off").option("--include <glob>", "Glob of files to include (repeatable)").option("--exclude <glob>", "Glob of files to exclude (repeatable)").option("--no-dead-code", "Skip the dead-code (knip) analysis pass").option("--no-lint", "Skip the lint passes (template/SFC/oxlint)").option("--no-respect-inline-disables", "Surface findings even inside doctor-disable comments").option("--threshold <n>", "Minimum passing score (0-100)").option("--score", "Output only the numeric score (for piping)").option("--annotations", "Emit GitHub Actions ::error::/::warning:: lines").option("--ci", "Auto-enable CI behavior (--annotations on GitHub Actions)").option("--no-ci", "Disable CI auto-detection even when CI env is set").option("--diff", "Only report findings in files changed vs HEAD").option("--staged", "Only report findings in staged files").option("--full", "Force a complete scan (overrides --diff/--staged)").option("--project <name>", "Comma-separated workspace project names to audit (monorepo)").option("--output <file>", "Write the report to a file instead of stdout").option("--pr-comment", "Emit a focused Markdown PR-comment body").option("--fix", "Auto-fix oxlint-pass findings in place (built-in vue/* rules only; template/SFC/dead-code/project findings are not fixable). Skipped in --diff/--staged mode.").option("--fix-exclude <ruleId>", "Mark a rule as not-auto-fixable (repeatable). Note: oxlint applies built-in fixes globally, so this is enforced only for doctor plugin fixes; built-in vue/* fixes still apply.").option("--push", "After the audit, POST privacy-stripped findings to the SaaS. Requires --api-key. Negatable with --no-push.").option("--push-url <url>", "SaaS endpoint for --push (default: https://app.the-doctor.report/api/v1/findings)", { default: "https://app.the-doctor.report/api/v1/findings" }).option("--api-key <key>", "API key for the SaaS (sent as the x-api-key header for both --score-mode and --push).").action(async (path, flags) => {
|
|
408
431
|
const reporter = resolveFormat(flags);
|
|
409
432
|
if (flags.failOn !== void 0 && !isFailOnLevel(flags.failOn)) {
|
|
410
433
|
process.stderr.write(`nuxt-doctor: --fail-on must be 'error', 'warn', or 'none', got '${flags.failOn}'\n`);
|
|
@@ -449,12 +472,9 @@ async function run(argv = process.argv) {
|
|
|
449
472
|
process.stderr.write(`${verboseOutput}\n`);
|
|
450
473
|
}
|
|
451
474
|
if (fixActive && !fixSkippedForScope) process.stderr.write(`nuxt-doctor: applied oxlint --fix; ${report.diagnostics.length} finding${report.diagnostics.length === 1 ? "" : "s"} remain (re-run to see them).\n`);
|
|
452
|
-
if (flags.score) {
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
return;
|
|
456
|
-
}
|
|
457
|
-
emitReport(report, reporter, flags);
|
|
475
|
+
if (flags.score) process.stdout.write(`${report.score}\n`);
|
|
476
|
+
else emitReport(report, reporter, flags);
|
|
477
|
+
await maybePushFindings(report, flags);
|
|
458
478
|
process.exitCode = report.exitCode;
|
|
459
479
|
} catch (err) {
|
|
460
480
|
const msg = err instanceof Error ? err.message : String(err);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import { readFileSync, writeFileSync } from 'node:fs';\nimport { dirname, resolve } from 'node:path';\nimport process from 'node:process';\nimport { fileURLToPath } from 'node:url';\nimport {\n audit,\n detectProject,\n detectSummary,\n encodeAnnotations,\n findMonorepoRoot,\n format,\n listChangedFiles,\n listRules,\n listWorkspacePackages,\n loadDoctorConfig,\n loadRuleDoc,\n mergeCliOverrides,\n normalizeInitAnswers,\n planInit,\n renderVerboseTrace,\n scoreDiagnostics,\n type AuditReport,\n type ConfigSource,\n type InitConfigFormat,\n type ListRulesFilter,\n type ProjectInfo,\n type RegisteredRule,\n type ReporterFormat,\n type ReporterInput,\n type ResolvedDoctorConfig,\n type RuleCategory,\n type RuleSource,\n type Severity,\n type WorkspacePackage,\n} from '@geoql/doctor-core';\nimport { cac } from 'cac';\nimport prompts from 'prompts';\n\nfunction readVersion(): string {\n try {\n const here = dirname(fileURLToPath(import.meta.url));\n const pkg = JSON.parse(\n readFileSync(resolve(here, '../package.json'), 'utf-8'),\n ) as { version?: string };\n return pkg.version ?? '0.0.0';\n } catch {\n return '0.0.0';\n }\n}\n\ninterface ListRulesCliFlags {\n preset?: string;\n category?: string;\n source?: string;\n severity?: string;\n json?: boolean;\n jsonCompact?: boolean;\n}\n\ninterface ExplainCliFlags {\n json?: boolean;\n}\n\ninterface InspectCliFlags {\n json?: boolean;\n jsonCompact?: boolean;\n}\n\ninterface InitCliFlags {\n yes?: boolean;\n configFormat?: string;\n force?: boolean;\n dryRun?: boolean;\n}\n\ninterface ProjectInfoJsonPayload {\n framework: string;\n rootDirectory: string;\n packageJsonPath: string | null;\n vueVersion: string | null;\n nuxtVersion: string | null;\n nuxtCompatibilityVersion: 3 | 4 | null;\n nitroPreset: string | null;\n typescriptVersion: string | null;\n monorepoKind: string | null;\n hasAutoImports: boolean;\n hasComponentsAutoImport: boolean;\n hasPinia: boolean;\n hasVueRouter: boolean;\n capabilities: string[];\n}\n\nfunction isCiEnvironment(): boolean {\n const env = process.env;\n return Boolean(\n env.CI === 'true' ||\n env.CI === '1' ||\n env.GITHUB_ACTIONS === 'true' ||\n env.GITLAB_CI === 'true' ||\n env.CIRCLECI === 'true' ||\n env.TRAVIS === 'true' ||\n env.BUILDKITE === 'true' ||\n env.JENKINS_HOME,\n );\n}\n\nfunction projectInfoToJson(p: ProjectInfo): ProjectInfoJsonPayload {\n return {\n framework: p.framework,\n rootDirectory: p.rootDirectory,\n packageJsonPath: p.packageJsonPath,\n vueVersion: p.vueVersion,\n nuxtVersion: p.nuxtVersion,\n nuxtCompatibilityVersion: p.nuxtCompatibilityVersion,\n nitroPreset: p.nitroPreset,\n typescriptVersion: p.typescriptVersion,\n monorepoKind: p.monorepoKind,\n hasAutoImports: p.hasAutoImports,\n hasComponentsAutoImport: p.hasComponentsAutoImport,\n hasPinia: p.hasPinia,\n hasVueRouter: p.hasVueRouter,\n capabilities: [...p.capabilities].sort(),\n };\n}\n\nfunction renderInspect(p: ProjectInfo, rootDir: string): string {\n const lines: string[] = [];\n lines.push(`@geoql/nuxt-doctor v${readVersion()} — project capabilities`);\n lines.push('');\n lines.push('framework');\n lines.push(` ${p.framework}`);\n lines.push(` nuxt: ${p.nuxtVersion ?? '(none)'}`);\n lines.push(` typescript: ${p.typescriptVersion ?? '(none)'}`);\n lines.push('');\n lines.push('project layout');\n lines.push(` rootDirectory: ${rootDir}`);\n lines.push(` packageJsonPath: ${p.packageJsonPath ?? '(none)'}`);\n lines.push(` monorepoKind: ${p.monorepoKind ?? '(none)'}`);\n lines.push('');\n lines.push('ecosystem');\n lines.push(` hasAutoImports: ${p.hasAutoImports}`);\n lines.push(` hasComponentsAutoImport: ${p.hasComponentsAutoImport}`);\n lines.push(` hasPinia: ${p.hasPinia}`);\n lines.push(` hasVueRouter: ${p.hasVueRouter}`);\n lines.push('');\n lines.push('capability tokens (used by rule gating)');\n lines.push(` ${[...p.capabilities].sort().join('\\n ')}`);\n lines.push('');\n lines.push(\"run 'nuxt-doctor inspect --json' for machine output\");\n lines.push(\n \"run 'nuxt-doctor list-rules' to see which rules these capabilities enable\",\n );\n return `${lines.join('\\n')}\\n`;\n}\n\ninterface ExplainableDoc {\n id: string;\n severity: string;\n category: string;\n source: string;\n recommended: boolean;\n helpUri: string;\n description: string;\n hasOverride: boolean;\n}\n\nfunction renderExplain(doc: ExplainableDoc): string {\n const lines: string[] = [];\n lines.push(`Rule: ${doc.id}`);\n lines.push(`Severity: ${doc.severity}`);\n lines.push(`Category: ${doc.category}`);\n lines.push(`Source: ${doc.source}`);\n lines.push(\n `Recommended: ${doc.recommended ? 'yes' : 'no (off in `recommended` preset)'}`,\n );\n lines.push(`Help: ${doc.helpUri}`);\n lines.push('');\n lines.push(doc.description);\n return `${lines.join('\\n')}\\n`;\n}\n\nconst VALID_LIST_PRESETS = new Set(['recommended', 'all']);\nconst VALID_CATEGORIES = new Set<RuleCategory>([\n 'ai-slop',\n 'reactivity',\n 'composition',\n 'performance',\n 'template',\n 'template-perf',\n 'build-quality',\n 'deps',\n 'dead-code',\n 'sfc',\n 'vue-builtin',\n 'structure',\n 'modules-deps',\n 'nitro',\n 'seo',\n 'cloudflare',\n 'server-routes',\n 'hydration',\n 'data-fetching',\n]);\nconst VALID_SOURCES = new Set<RuleSource>([\n 'doctor',\n 'oxlint-builtin',\n 'eslint-plugin-vue',\n]);\nconst VALID_CONFIG_FORMATS = new Set(['ts', 'json', 'package-json']);\n\nfunction buildListRulesFilter(flags: ListRulesCliFlags): ListRulesFilter {\n const out: {\n preset?: 'recommended' | 'all';\n category?: RuleCategory;\n source?: RuleSource;\n severity?: Severity;\n } = {};\n if (flags.preset !== undefined) {\n if (!VALID_LIST_PRESETS.has(flags.preset)) {\n throw new Error(\n `unknown --preset '${flags.preset}' (expected: recommended | all)`,\n );\n }\n out.preset = flags.preset as 'recommended' | 'all';\n }\n if (flags.category !== undefined) {\n if (!VALID_CATEGORIES.has(flags.category as RuleCategory)) {\n throw new Error(`unknown --category '${flags.category}'`);\n }\n out.category = flags.category as RuleCategory;\n }\n if (flags.source !== undefined) {\n if (!VALID_SOURCES.has(flags.source as RuleSource)) {\n throw new Error(`unknown --source '${flags.source}'`);\n }\n out.source = flags.source as RuleSource;\n }\n if (flags.severity !== undefined) {\n if (\n flags.severity !== 'error' &&\n flags.severity !== 'warn' &&\n flags.severity !== 'info'\n ) {\n throw new Error(\n `unknown --severity '${flags.severity}' (expected: error | warn | info)`,\n );\n }\n out.severity = flags.severity;\n }\n return out;\n}\n\nfunction renderRulesTable(rules: RegisteredRule[]): string {\n if (rules.length === 0) return 'No rules matched.\\n';\n const lines: string[] = [\n `@geoql/nuxt-doctor — ${rules.length} rule${rules.length === 1 ? '' : 's'}`,\n '',\n ];\n const idWidth = Math.max(...rules.map((r) => r.id.length));\n const sevWidth = Math.max(...rules.map((r) => r.severity.length));\n const catWidth = Math.max(...rules.map((r) => r.category.length));\n for (const r of rules) {\n const tag = r.recommended ? '[recommended]' : ' ';\n lines.push(\n ` ${r.id.padEnd(idWidth)} ${r.severity.padEnd(sevWidth)} ${r.category.padEnd(catWidth)} ${r.source} ${tag}`,\n );\n }\n return `${lines.join('\\n')}\\n`;\n}\n\ninterface CliFlags {\n format?: string;\n config?: string;\n preset?: string;\n failOn?: string;\n json?: boolean;\n jsonCompact?: boolean;\n color?: boolean;\n quiet?: boolean;\n verbose?: boolean;\n output?: string;\n rule?: string | string[];\n include?: string | string[];\n exclude?: string | string[];\n deadCode?: boolean;\n lint?: boolean;\n respectInlineDisables?: boolean;\n threshold?: string;\n score?: boolean;\n annotations?: boolean;\n ci?: boolean;\n diff?: boolean;\n staged?: boolean;\n full?: boolean;\n project?: string;\n prComment?: string | true;\n fix?: boolean;\n fixExclude?: string | string[];\n}\n\ninterface PreparedOptions {\n ruleOverrides: Record<string, Severity | 'off'> | undefined;\n threshold: number | undefined;\n}\n\nfunction toArray(value: string | string[] | undefined): string[] | undefined {\n if (value === undefined) return undefined;\n return Array.isArray(value) ? value : [value];\n}\n\nfunction parseRuleOverrides(\n rules: string[] | undefined,\n): Record<string, Severity | 'off'> | undefined {\n if (!rules || rules.length === 0) return undefined;\n const out: Record<string, Severity | 'off'> = {};\n for (const entry of rules) {\n const idx = entry.lastIndexOf(':');\n if (idx === -1) {\n throw new Error(\n `Invalid --rule \"${entry}\". Expected format <ruleId>:<error|warn|info|off>.`,\n );\n }\n const ruleId = entry.slice(0, idx);\n const level = entry.slice(idx + 1);\n if (\n level !== 'error' &&\n level !== 'warn' &&\n level !== 'info' &&\n level !== 'off'\n ) {\n throw new Error(\n `Invalid severity \"${level}\" for --rule \"${entry}\". Expected error|warn|info|off.`,\n );\n }\n if (ruleId.length === 0) {\n throw new Error(`Invalid --rule \"${entry}\". Rule id must not be empty.`);\n }\n out[ruleId] = level;\n }\n return out;\n}\n\nfunction resolveFormat(flags: CliFlags): ReporterFormat {\n if (flags.prComment !== undefined) return 'pr-comment';\n if (flags.jsonCompact) return 'json-compact';\n if (flags.json) return 'json';\n const kind = flags.format;\n const userPickedFormat =\n kind === 'pretty' ||\n kind === 'json' ||\n kind === 'json-compact' ||\n kind === 'sarif' ||\n kind === 'html' ||\n kind === 'pr-comment';\n if (userPickedFormat) {\n return kind as ReporterFormat;\n }\n if (\n typeof flags.output === 'string' &&\n flags.output.toLowerCase().endsWith('.html')\n ) {\n return 'html';\n }\n return 'agent';\n}\n\nfunction isFailOnLevel(v: string): v is 'error' | 'warn' | 'none' {\n return v === 'error' || v === 'warn' || v === 'none';\n}\n\nasync function runSingleAudit(\n rootDir: string,\n flags: CliFlags,\n prepared: PreparedOptions,\n): Promise<{ report: AuditReport; source: ConfigSource }> {\n let scopeFiles: string[] | undefined;\n if (!flags.full && (flags.diff || flags.staged)) {\n scopeFiles = await listChangedFiles({\n rootDir,\n mode: flags.staged ? 'staged' : 'diff',\n });\n }\n const resolved = await loadDoctorConfig(rootDir, {\n ...(flags.config ? { explicitPath: flags.config } : {}),\n ...(flags.preset ? { presetOverride: flags.preset } : {}),\n });\n const fixExclude = toArray(flags.fixExclude);\n const merged: ResolvedDoctorConfig = mergeCliOverrides(resolved, {\n failOn: flags.failOn as 'error' | 'warn' | 'none' | undefined,\n include: toArray(flags.include),\n exclude: toArray(flags.exclude),\n rules: prepared.ruleOverrides,\n threshold: prepared.threshold,\n ...(fixExclude ? { fixExcludes: fixExclude } : {}),\n });\n const report = await audit({\n rootDir: merged.rootDir,\n include: merged.include,\n exclude: merged.exclude,\n rules: merged.rules,\n failOn: merged.failOn,\n threshold: merged.threshold,\n deadCode: flags.deadCode,\n lint: flags.lint,\n respectInlineDisables: flags.respectInlineDisables,\n scopeFiles,\n fix: flags.fix,\n ...(merged.fixExcludes ? { fixExcludes: merged.fixExcludes } : {}),\n });\n const allowedRuleIds = new Set(Object.keys(merged.rules));\n report.diagnostics = report.diagnostics.filter((d) =>\n allowedRuleIds.has(d.ruleId),\n );\n return { report, source: resolved.source };\n}\n\nfunction aggregateReports(\n reports: AuditReport[],\n rootDirectory: string,\n): AuditReport {\n const first = reports[0];\n const diagnostics = reports.flatMap((r) => r.diagnostics);\n let filesScanned = 0;\n let elapsedMs = 0;\n let exitCode: 0 | 1 | 2 = 0;\n for (const r of reports) {\n filesScanned += r.filesScanned;\n elapsedMs += r.elapsedMs;\n if (r.exitCode > exitCode) exitCode = r.exitCode;\n }\n const ruleCounts: Record<string, number> = {};\n for (const d of diagnostics) {\n ruleCounts[d.ruleId] = (ruleCounts[d.ruleId] ?? 0) + 1;\n }\n const scoreResult = scoreDiagnostics(diagnostics, {\n threshold: first.scoreResult.threshold,\n });\n return {\n rootDir: rootDirectory,\n filesScanned,\n diagnostics,\n score: scoreResult.score,\n errorCount: scoreResult.errorCount,\n warnCount: scoreResult.warnCount,\n infoCount: scoreResult.infoCount,\n exitCode,\n scoreResult,\n projectInfo: { ...first.projectInfo, rootDirectory },\n elapsedMs,\n timings: first.timings,\n ruleCounts,\n };\n}\n\nfunction emitReport(\n report: AuditReport,\n reporter: ReporterFormat,\n flags: CliFlags,\n): void {\n const input: ReporterInput = {\n toolName: '@geoql/nuxt-doctor',\n toolVersion: readVersion(),\n rootDirectory: report.rootDir,\n analyzedFileCount: report.filesScanned,\n elapsedMs: report.elapsedMs,\n diagnostics: report.diagnostics,\n score: report.scoreResult,\n projectInfo: report.projectInfo,\n };\n const out = format(input, reporter, {\n color: flags.color,\n quiet: flags.quiet,\n });\n if (flags.output) {\n writeFileSync(resolve(flags.output), out);\n } else {\n process.stdout.write(out);\n }\n const ciExplicitOptOut = flags.ci === false;\n const ciExplicitOptIn = flags.ci === true;\n const ciAutoDetected = !ciExplicitOptOut && isCiEnvironment();\n const wantsAnnotations =\n flags.annotations === true || ciExplicitOptIn || ciAutoDetected;\n const reporterCarriesAnnotations =\n reporter === 'agent' || reporter === 'pretty';\n if (\n wantsAnnotations &&\n reporterCarriesAnnotations &&\n !flags.quiet &&\n report.diagnostics.length > 0\n ) {\n process.stdout.write(`${encodeAnnotations(report.diagnostics)}\\n`);\n }\n}\n\nasync function runProjectAudits(\n rootDir: string,\n flags: CliFlags,\n prepared: PreparedOptions,\n packages: WorkspacePackage[],\n): Promise<{ report: AuditReport; source: ConfigSource } | null> {\n const requested = flags\n .project!.split(',')\n .map((name) => name.trim())\n .filter((name) => name.length > 0);\n const byName = new Map(packages.map((p) => [p.name, p]));\n const reports: AuditReport[] = [];\n let source: ConfigSource = 'built-in';\n for (const name of requested) {\n const match = byName.get(name);\n if (!match) {\n process.stderr.write(\n `nuxt-doctor: --project: unknown project \"${name}\" (skipped)\\n`,\n );\n continue;\n }\n const single = await runSingleAudit(match.dir, flags, prepared);\n reports.push(single.report);\n source = single.source;\n }\n if (reports.length === 0) {\n process.stderr.write(\n 'nuxt-doctor: --project: no matching workspace projects\\n',\n );\n return null;\n }\n const { root } = await findMonorepoRoot(rootDir);\n return { report: aggregateReports(reports, root), source };\n}\n\nasync function runInit(dir: string, flags: InitCliFlags): Promise<void> {\n const targetDir = resolve(dir);\n const configFormat = (flags.configFormat ?? 'ts') as InitConfigFormat;\n if (!VALID_CONFIG_FORMATS.has(configFormat)) {\n process.stderr.write(\n `nuxt-doctor init: --config-format must be ts | json | package-json, got '${flags.configFormat}'\\n`,\n );\n process.exitCode = 2;\n return;\n }\n\n const resolvedAnswers = flags.yes\n ? {\n configFormat,\n preset: 'recommended' as const,\n threshold: undefined,\n exclude: undefined,\n }\n : await runInteractiveInit(configFormat);\n\n if (process.exitCode === 2) return;\n\n const plan = await planInit({\n dir: targetDir,\n configFormat: resolvedAnswers.configFormat,\n preset: resolvedAnswers.preset,\n threshold: resolvedAnswers.threshold,\n exclude: resolvedAnswers.exclude,\n binName: 'nuxt-doctor',\n });\n\n const summary = await detectSummary(targetDir);\n process.stdout.write(`${summary}\\n`);\n\n if (plan.conflict && !flags.force) {\n process.stderr.write(\n `nuxt-doctor init: ${plan.conflictPath} already exists. Run with --force to overwrite.\\n`,\n );\n process.exitCode = 2;\n return;\n }\n\n if (flags.dryRun) {\n for (const write of plan.writes) {\n process.stdout.write(`[dry-run] would write ${write.path}\\n`);\n process.stdout.write(`${write.content}\\n`);\n }\n process.exitCode = 0;\n return;\n }\n\n for (const write of plan.writes) {\n writeFileSync(write.path, write.content, 'utf8');\n }\n process.exitCode = 0;\n}\n\nasync function runInteractiveInit(defaultFormat: InitConfigFormat): Promise<{\n configFormat: InitConfigFormat;\n preset: 'recommended' | 'strict' | 'minimal';\n threshold: number | undefined;\n exclude: string | undefined;\n}> {\n const answers = await prompts(\n [\n {\n type: 'select',\n name: 'target',\n message: 'Config target?',\n choices: [\n { title: 'doctor.config.ts (recommended)', value: 'ts' },\n { title: 'doctor.config.json', value: 'json' },\n { title: 'package.json#doctor', value: 'package-json' },\n ],\n initial: defaultFormat === 'package-json' ? 2 : 0,\n },\n {\n type: 'select',\n name: 'preset',\n message: 'Base preset?',\n choices: [\n { title: 'recommended (errors + warnings)', value: 'recommended' },\n { title: 'strict (recommended + info)', value: 'strict' },\n { title: 'minimal (errors only)', value: 'minimal' },\n ],\n initial: 0,\n },\n {\n type: 'number',\n name: 'threshold',\n message: 'Minimum passing score (0-100, blank to skip)',\n min: 0,\n max: 100,\n initial: '',\n },\n {\n type: 'text',\n name: 'exclude',\n message: 'Exclude glob patterns (comma-separated, blank to skip)',\n initial: '',\n },\n ],\n {\n onCancel: () => {\n process.stderr.write('nuxt-doctor init: cancelled\\n');\n process.exitCode = 2;\n },\n },\n );\n\n if (process.exitCode === 2)\n return {\n configFormat: 'ts' as InitConfigFormat,\n preset: 'recommended' as const,\n threshold: undefined,\n exclude: undefined,\n };\n\n return normalizeInitAnswers({\n target: answers.target as InitConfigFormat | undefined,\n preset: answers.preset as 'recommended' | 'strict' | 'minimal' | undefined,\n threshold: answers.threshold || undefined,\n exclude: answers.exclude as string | undefined,\n });\n}\n\nexport async function run(argv: string[] = process.argv): Promise<number> {\n const cli = cac('nuxt-doctor');\n\n cli\n .command('[path]', 'Audit a Nuxt project')\n .option(\n '--format <kind>',\n 'Output format (agent|pretty|json|json-compact|sarif|html|pr-comment)',\n {\n default: 'agent',\n },\n )\n .option('--json', 'Shorthand for --format json')\n .option('--json-compact', 'Emit single-line JSON')\n .option('--config <path>', 'Path to doctor.config.ts')\n .option('--preset <name>', 'Base preset: minimal|recommended|strict|all')\n .option(\n '--fail-on <level>',\n 'Exit non-zero on this severity or worse (error|warn|none)',\n {\n default: 'error',\n },\n )\n .option('--quiet', 'Only show the summary')\n .option('--verbose', 'Emit per-pass timing and rule diagnostics to stderr')\n .option('--no-color', 'Disable colored output')\n .option(\n '--rule <id:level>',\n 'Override a rule (repeatable), e.g. --rule a/b:off',\n )\n .option('--include <glob>', 'Glob of files to include (repeatable)')\n .option('--exclude <glob>', 'Glob of files to exclude (repeatable)')\n .option('--no-dead-code', 'Skip the dead-code (knip) analysis pass')\n .option('--no-lint', 'Skip the lint passes (template/SFC/oxlint)')\n .option(\n '--no-respect-inline-disables',\n 'Surface findings even inside doctor-disable comments',\n )\n .option('--threshold <n>', 'Minimum passing score (0-100)')\n .option('--score', 'Output only the numeric score (for piping)')\n .option('--annotations', 'Emit GitHub Actions ::error::/::warning:: lines')\n .option('--ci', 'Auto-enable CI behavior (--annotations on GitHub Actions)')\n .option('--no-ci', 'Disable CI auto-detection even when CI env is set')\n .option('--diff', 'Only report findings in files changed vs HEAD')\n .option('--staged', 'Only report findings in staged files')\n .option('--full', 'Force a complete scan (overrides --diff/--staged)')\n .option(\n '--project <name>',\n 'Comma-separated workspace project names to audit (monorepo)',\n )\n .option('--output <file>', 'Write the report to a file instead of stdout')\n .option('--pr-comment', 'Emit a focused Markdown PR-comment body')\n .option(\n '--fix',\n 'Auto-fix oxlint-pass findings in place (built-in vue/* rules only; template/SFC/dead-code/project findings are not fixable). Skipped in --diff/--staged mode.',\n )\n .option(\n '--fix-exclude <ruleId>',\n 'Mark a rule as not-auto-fixable (repeatable). Note: oxlint applies built-in fixes globally, so this is enforced only for doctor plugin fixes; built-in vue/* fixes still apply.',\n )\n .action(async (path: string | undefined, flags: CliFlags) => {\n const reporter = resolveFormat(flags);\n if (flags.failOn !== undefined && !isFailOnLevel(flags.failOn)) {\n process.stderr.write(\n `nuxt-doctor: --fail-on must be 'error', 'warn', or 'none', got '${flags.failOn}'\\n`,\n );\n process.exitCode = 2;\n return;\n }\n const rootDir = resolve(path ?? '.');\n\n try {\n if (flags.score && (flags.json || flags.jsonCompact)) {\n throw new Error(\n '--score and --json are mutually exclusive (--score outputs a plaintext integer).',\n );\n }\n const ruleOverrides = parseRuleOverrides(toArray(flags.rule));\n const threshold =\n flags.threshold === undefined ? undefined : Number(flags.threshold);\n if (\n threshold !== undefined &&\n (!Number.isInteger(threshold) || threshold < 0 || threshold > 100)\n ) {\n throw new Error(\n `--threshold must be an integer 0-100, got \"${flags.threshold}\".`,\n );\n }\n if (flags.diff && flags.staged) {\n throw new Error('--diff and --staged are mutually exclusive.');\n }\n if (flags.verbose && flags.quiet) {\n throw new Error('--verbose using --quiet are mutually exclusive.');\n }\n const fixActive = flags.fix === true;\n const fixSkippedForScope =\n fixActive && !flags.full && (flags.diff || flags.staged);\n if (fixSkippedForScope) {\n process.stderr.write(\n 'nuxt-doctor: --fix skipped in --diff/--staged mode (auto-fix only runs on a full scan to avoid rewriting files outside the diff).\\n',\n );\n }\n if (fixActive && flags.fixExclude !== undefined) {\n process.stderr.write(\n 'nuxt-doctor: --fix-exclude is not enforced for built-in vue/* rules (oxlint applies their fixes globally); it currently scopes only future doctor plugin fixes.\\n',\n );\n }\n const prepared: PreparedOptions = { ruleOverrides, threshold };\n\n const workspacePackages = flags.project\n ? await listWorkspacePackages(rootDir)\n : [];\n if (flags.project && workspacePackages.length === 0) {\n process.stderr.write(\n 'nuxt-doctor: --project ignored: not a pnpm workspace\\n',\n );\n }\n\n let report: AuditReport;\n let configSource: ConfigSource;\n if (flags.project && workspacePackages.length > 0) {\n const aggregated = await runProjectAudits(\n rootDir,\n flags,\n prepared,\n workspacePackages,\n );\n if (!aggregated) {\n process.exitCode = 2;\n return;\n }\n report = aggregated.report;\n configSource = aggregated.source;\n } else {\n const single = await runSingleAudit(rootDir, flags, prepared);\n report = single.report;\n configSource = single.source;\n }\n\n if (flags.verbose) {\n const verboseOutput = renderVerboseTrace(report, {\n configSource,\n });\n process.stderr.write(`${verboseOutput}\\n`);\n }\n if (fixActive && !fixSkippedForScope) {\n process.stderr.write(\n `nuxt-doctor: applied oxlint --fix; ${report.diagnostics.length} finding${report.diagnostics.length === 1 ? '' : 's'} remain (re-run to see them).\\n`,\n );\n }\n if (flags.score) {\n process.stdout.write(`${report.score}\\n`);\n process.exitCode = report.exitCode;\n return;\n }\n emitReport(report, reporter, flags);\n process.exitCode = report.exitCode;\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n process.stderr.write(`nuxt-doctor: ${msg}\\n`);\n process.exitCode = 2;\n }\n });\n\n cli\n .command(\n 'list-rules',\n 'List every registered rule with id, severity, category, source, and preset membership',\n )\n .option('--preset <name>', 'Filter to: recommended | all')\n .option('--category <name>', 'Filter by category')\n .option(\n '--source <name>',\n 'Filter by source: doctor | oxlint-builtin | eslint-plugin-vue',\n )\n .option('--severity <level>', 'Filter by: error | warn | info')\n .option('--json', 'Emit JSON instead of formatted text')\n .option('--json-compact', 'With --json, single-line output')\n .action(async (flags: ListRulesCliFlags) => {\n try {\n const filter = buildListRulesFilter(flags);\n const rules = listRules(filter);\n if (flags.json || flags.jsonCompact) {\n const payload = { count: rules.length, rules };\n process.stdout.write(\n flags.jsonCompact\n ? JSON.stringify(payload)\n : `${JSON.stringify(payload, null, 2)}\\n`,\n );\n } else {\n process.stdout.write(renderRulesTable(rules));\n }\n process.exitCode = 0;\n } catch (err) {\n const msg = (err as Error).message;\n process.stderr.write(`nuxt-doctor list-rules: ${msg}\\n`);\n process.exitCode = 2;\n }\n });\n\n cli\n .command(\n 'explain <ruleId>',\n \"Print the rule's severity, category, recommendation, and helpUri\",\n )\n .option('--json', 'Emit structured JSON instead of formatted text')\n .action(async (ruleId: string, flags: ExplainCliFlags) => {\n const doc = loadRuleDoc(ruleId);\n if (!doc) {\n process.stderr.write(\n `nuxt-doctor explain: unknown rule '${ruleId}'. Try \\`nuxt-doctor list-rules\\` to see registered rules.\\n`,\n );\n process.exitCode = 2;\n return;\n }\n if (flags.json) {\n process.stdout.write(`${JSON.stringify(doc, null, 2)}\\n`);\n } else {\n process.stdout.write(renderExplain(doc));\n }\n process.exitCode = 0;\n });\n\n cli\n .command(\n 'inspect [dir]',\n 'Print the detected project capabilities doctor uses to gate rules',\n )\n .option('--json', 'Emit structured JSON instead of formatted text')\n .option('--json-compact', 'With --json, emit a single-line payload')\n .action(async (dir: string | undefined, flags: InspectCliFlags) => {\n const rootDir = resolve(dir ?? '.');\n const project = await detectProject(rootDir);\n if (flags.json || flags.jsonCompact) {\n const payload = projectInfoToJson(project);\n const out = flags.jsonCompact\n ? JSON.stringify(payload)\n : JSON.stringify(payload, null, 2);\n process.stdout.write(`${out}\\n`);\n } else {\n process.stdout.write(renderInspect(project, rootDir));\n }\n process.exitCode = 0;\n });\n\n cli\n .command('init [dir]', 'Scaffold a doctor config for the project')\n .option('-y, --yes', 'Non-interactive, use recommended defaults')\n .option(\n '--config-format <ts|json|package-json>',\n 'Config file format (default: ts)',\n )\n .option('--force', 'Overwrite existing config')\n .option('--dry-run', 'Print what would be written, touch nothing')\n .action(async (dir: string | undefined, flags: InitCliFlags) => {\n try {\n await runInit(dir ?? '.', flags);\n } catch (err) {\n process.stderr.write(`${err instanceof Error ? err.message : err}\\n`);\n process.exitCode = 2;\n }\n });\n\n cli.help();\n cli.version(readVersion());\n cli.parse(argv, { run: false });\n await cli.runMatchedCommand();\n return process.exitCode ?? 0;\n}\n"],"mappings":";;;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,OAAO,MAAM,cAAc,IAAI,CAAC;EAE1C,QAAQ,WAAW;GACnB;CAEJ,IACG,QACC,iBACA,oEACD,CACA,OAAO,UAAU,iDAAiD,CAClE,OAAO,kBAAkB,0CAA0C,CACnE,OAAO,OAAO,KAAyB,UAA2B;EACjE,MAAM,UAAU,QAAQ,OAAO,IAAI;EACnC,MAAM,UAAU,MAAM,cAAc,QAAQ;EAC5C,IAAI,MAAM,QAAQ,MAAM,aAAa;GACnC,MAAM,UAAU,kBAAkB,QAAQ;GAC1C,MAAM,MAAM,MAAM,cACd,KAAK,UAAU,QAAQ,GACvB,KAAK,UAAU,SAAS,MAAM,EAAE;GACpC,QAAQ,OAAO,MAAM,GAAG,IAAI,IAAI;SAEhC,QAAQ,OAAO,MAAM,cAAc,SAAS,QAAQ,CAAC;EAEvD,QAAQ,WAAW;GACnB;CAEJ,IACG,QAAQ,cAAc,2CAA2C,CACjE,OAAO,aAAa,4CAA4C,CAChE,OACC,0CACA,mCACD,CACA,OAAO,WAAW,4BAA4B,CAC9C,OAAO,aAAa,6CAA6C,CACjE,OAAO,OAAO,KAAyB,UAAwB;EAC9D,IAAI;GACF,MAAM,QAAQ,OAAO,KAAK,MAAM;WACzB,KAAK;GACZ,QAAQ,OAAO,MAAM,GAAG,eAAe,QAAQ,IAAI,UAAU,IAAI,IAAI;GACrE,QAAQ,WAAW;;GAErB;CAEJ,IAAI,MAAM;CACV,IAAI,QAAQ,aAAa,CAAC;CAC1B,IAAI,MAAM,MAAM,EAAE,KAAK,OAAO,CAAC;CAC/B,MAAM,IAAI,mBAAmB;CAC7B,OAAO,QAAQ,YAAY"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import { readFileSync, writeFileSync } from 'node:fs';\nimport { dirname, resolve } from 'node:path';\nimport process from 'node:process';\nimport { fileURLToPath } from 'node:url';\nimport {\n audit,\n detectProject,\n detectSummary,\n encodeAnnotations,\n findMonorepoRoot,\n format,\n listChangedFiles,\n listRules,\n listWorkspacePackages,\n loadDoctorConfig,\n loadRuleDoc,\n mergeCliOverrides,\n normalizeInitAnswers,\n planInit,\n pushFindings,\n renderVerboseTrace,\n scoreDiagnostics,\n type AuditReport,\n type ConfigSource,\n type InitConfigFormat,\n type ListRulesFilter,\n type ProjectInfo,\n type RegisteredRule,\n type ReporterFormat,\n type ReporterInput,\n type ResolvedDoctorConfig,\n type RuleCategory,\n type RuleSource,\n type Severity,\n type WorkspacePackage,\n} from '@geoql/doctor-core';\nimport { cac } from 'cac';\nimport prompts from 'prompts';\n\nfunction readVersion(): string {\n try {\n const here = dirname(fileURLToPath(import.meta.url));\n const pkg = JSON.parse(\n readFileSync(resolve(here, '../package.json'), 'utf-8'),\n ) as { version?: string };\n return pkg.version ?? '0.0.0';\n } catch {\n return '0.0.0';\n }\n}\n\ninterface ListRulesCliFlags {\n preset?: string;\n category?: string;\n source?: string;\n severity?: string;\n json?: boolean;\n jsonCompact?: boolean;\n}\n\ninterface ExplainCliFlags {\n json?: boolean;\n}\n\ninterface InspectCliFlags {\n json?: boolean;\n jsonCompact?: boolean;\n}\n\ninterface InitCliFlags {\n yes?: boolean;\n configFormat?: string;\n force?: boolean;\n dryRun?: boolean;\n}\n\ninterface ProjectInfoJsonPayload {\n framework: string;\n rootDirectory: string;\n packageJsonPath: string | null;\n vueVersion: string | null;\n nuxtVersion: string | null;\n nuxtCompatibilityVersion: 3 | 4 | null;\n nitroPreset: string | null;\n typescriptVersion: string | null;\n monorepoKind: string | null;\n hasAutoImports: boolean;\n hasComponentsAutoImport: boolean;\n hasPinia: boolean;\n hasVueRouter: boolean;\n capabilities: string[];\n}\n\nfunction isCiEnvironment(): boolean {\n const env = process.env;\n return Boolean(\n env.CI === 'true' ||\n env.CI === '1' ||\n env.GITHUB_ACTIONS === 'true' ||\n env.GITLAB_CI === 'true' ||\n env.CIRCLECI === 'true' ||\n env.TRAVIS === 'true' ||\n env.BUILDKITE === 'true' ||\n env.JENKINS_HOME,\n );\n}\n\nfunction projectInfoToJson(p: ProjectInfo): ProjectInfoJsonPayload {\n return {\n framework: p.framework,\n rootDirectory: p.rootDirectory,\n packageJsonPath: p.packageJsonPath,\n vueVersion: p.vueVersion,\n nuxtVersion: p.nuxtVersion,\n nuxtCompatibilityVersion: p.nuxtCompatibilityVersion,\n nitroPreset: p.nitroPreset,\n typescriptVersion: p.typescriptVersion,\n monorepoKind: p.monorepoKind,\n hasAutoImports: p.hasAutoImports,\n hasComponentsAutoImport: p.hasComponentsAutoImport,\n hasPinia: p.hasPinia,\n hasVueRouter: p.hasVueRouter,\n capabilities: [...p.capabilities].sort(),\n };\n}\n\nfunction renderInspect(p: ProjectInfo, rootDir: string): string {\n const lines: string[] = [];\n lines.push(`@geoql/nuxt-doctor v${readVersion()} — project capabilities`);\n lines.push('');\n lines.push('framework');\n lines.push(` ${p.framework}`);\n lines.push(` nuxt: ${p.nuxtVersion ?? '(none)'}`);\n lines.push(` typescript: ${p.typescriptVersion ?? '(none)'}`);\n lines.push('');\n lines.push('project layout');\n lines.push(` rootDirectory: ${rootDir}`);\n lines.push(` packageJsonPath: ${p.packageJsonPath ?? '(none)'}`);\n lines.push(` monorepoKind: ${p.monorepoKind ?? '(none)'}`);\n lines.push('');\n lines.push('ecosystem');\n lines.push(` hasAutoImports: ${p.hasAutoImports}`);\n lines.push(` hasComponentsAutoImport: ${p.hasComponentsAutoImport}`);\n lines.push(` hasPinia: ${p.hasPinia}`);\n lines.push(` hasVueRouter: ${p.hasVueRouter}`);\n lines.push('');\n lines.push('capability tokens (used by rule gating)');\n lines.push(` ${[...p.capabilities].sort().join('\\n ')}`);\n lines.push('');\n lines.push(\"run 'nuxt-doctor inspect --json' for machine output\");\n lines.push(\n \"run 'nuxt-doctor list-rules' to see which rules these capabilities enable\",\n );\n return `${lines.join('\\n')}\\n`;\n}\n\ninterface ExplainableDoc {\n id: string;\n severity: string;\n category: string;\n source: string;\n recommended: boolean;\n helpUri: string;\n description: string;\n hasOverride: boolean;\n}\n\nfunction renderExplain(doc: ExplainableDoc): string {\n const lines: string[] = [];\n lines.push(`Rule: ${doc.id}`);\n lines.push(`Severity: ${doc.severity}`);\n lines.push(`Category: ${doc.category}`);\n lines.push(`Source: ${doc.source}`);\n lines.push(\n `Recommended: ${doc.recommended ? 'yes' : 'no (off in `recommended` preset)'}`,\n );\n lines.push(`Help: ${doc.helpUri}`);\n lines.push('');\n lines.push(doc.description);\n return `${lines.join('\\n')}\\n`;\n}\n\nconst VALID_LIST_PRESETS = new Set(['recommended', 'all']);\nconst VALID_CATEGORIES = new Set<RuleCategory>([\n 'ai-slop',\n 'reactivity',\n 'composition',\n 'performance',\n 'template',\n 'template-perf',\n 'build-quality',\n 'deps',\n 'dead-code',\n 'sfc',\n 'vue-builtin',\n 'structure',\n 'modules-deps',\n 'nitro',\n 'seo',\n 'cloudflare',\n 'server-routes',\n 'hydration',\n 'data-fetching',\n]);\nconst VALID_SOURCES = new Set<RuleSource>([\n 'doctor',\n 'oxlint-builtin',\n 'eslint-plugin-vue',\n]);\nconst VALID_CONFIG_FORMATS = new Set(['ts', 'json', 'package-json']);\n\nfunction buildListRulesFilter(flags: ListRulesCliFlags): ListRulesFilter {\n const out: {\n preset?: 'recommended' | 'all';\n category?: RuleCategory;\n source?: RuleSource;\n severity?: Severity;\n } = {};\n if (flags.preset !== undefined) {\n if (!VALID_LIST_PRESETS.has(flags.preset)) {\n throw new Error(\n `unknown --preset '${flags.preset}' (expected: recommended | all)`,\n );\n }\n out.preset = flags.preset as 'recommended' | 'all';\n }\n if (flags.category !== undefined) {\n if (!VALID_CATEGORIES.has(flags.category as RuleCategory)) {\n throw new Error(`unknown --category '${flags.category}'`);\n }\n out.category = flags.category as RuleCategory;\n }\n if (flags.source !== undefined) {\n if (!VALID_SOURCES.has(flags.source as RuleSource)) {\n throw new Error(`unknown --source '${flags.source}'`);\n }\n out.source = flags.source as RuleSource;\n }\n if (flags.severity !== undefined) {\n if (\n flags.severity !== 'error' &&\n flags.severity !== 'warn' &&\n flags.severity !== 'info'\n ) {\n throw new Error(\n `unknown --severity '${flags.severity}' (expected: error | warn | info)`,\n );\n }\n out.severity = flags.severity;\n }\n return out;\n}\n\nfunction renderRulesTable(rules: RegisteredRule[]): string {\n if (rules.length === 0) return 'No rules matched.\\n';\n const lines: string[] = [\n `@geoql/nuxt-doctor — ${rules.length} rule${rules.length === 1 ? '' : 's'}`,\n '',\n ];\n const idWidth = Math.max(...rules.map((r) => r.id.length));\n const sevWidth = Math.max(...rules.map((r) => r.severity.length));\n const catWidth = Math.max(...rules.map((r) => r.category.length));\n for (const r of rules) {\n const tag = r.recommended ? '[recommended]' : ' ';\n lines.push(\n ` ${r.id.padEnd(idWidth)} ${r.severity.padEnd(sevWidth)} ${r.category.padEnd(catWidth)} ${r.source} ${tag}`,\n );\n }\n return `${lines.join('\\n')}\\n`;\n}\n\ninterface CliFlags {\n format?: string;\n config?: string;\n preset?: string;\n failOn?: string;\n json?: boolean;\n jsonCompact?: boolean;\n color?: boolean;\n quiet?: boolean;\n verbose?: boolean;\n output?: string;\n rule?: string | string[];\n include?: string | string[];\n exclude?: string | string[];\n deadCode?: boolean;\n lint?: boolean;\n respectInlineDisables?: boolean;\n threshold?: string;\n score?: boolean;\n annotations?: boolean;\n ci?: boolean;\n diff?: boolean;\n staged?: boolean;\n full?: boolean;\n project?: string;\n prComment?: string | true;\n fix?: boolean;\n fixExclude?: string | string[];\n push?: boolean;\n pushUrl: string;\n apiKey?: string;\n}\n\ninterface PreparedOptions {\n ruleOverrides: Record<string, Severity | 'off'> | undefined;\n threshold: number | undefined;\n}\n\nfunction toArray(value: string | string[] | undefined): string[] | undefined {\n if (value === undefined) return undefined;\n return Array.isArray(value) ? value : [value];\n}\n\nfunction parseRuleOverrides(\n rules: string[] | undefined,\n): Record<string, Severity | 'off'> | undefined {\n if (!rules || rules.length === 0) return undefined;\n const out: Record<string, Severity | 'off'> = {};\n for (const entry of rules) {\n const idx = entry.lastIndexOf(':');\n if (idx === -1) {\n throw new Error(\n `Invalid --rule \"${entry}\". Expected format <ruleId>:<error|warn|info|off>.`,\n );\n }\n const ruleId = entry.slice(0, idx);\n const level = entry.slice(idx + 1);\n if (\n level !== 'error' &&\n level !== 'warn' &&\n level !== 'info' &&\n level !== 'off'\n ) {\n throw new Error(\n `Invalid severity \"${level}\" for --rule \"${entry}\". Expected error|warn|info|off.`,\n );\n }\n if (ruleId.length === 0) {\n throw new Error(`Invalid --rule \"${entry}\". Rule id must not be empty.`);\n }\n out[ruleId] = level;\n }\n return out;\n}\n\nfunction resolveFormat(flags: CliFlags): ReporterFormat {\n if (flags.prComment !== undefined) return 'pr-comment';\n if (flags.jsonCompact) return 'json-compact';\n if (flags.json) return 'json';\n const kind = flags.format;\n const userPickedFormat =\n kind === 'pretty' ||\n kind === 'json' ||\n kind === 'json-compact' ||\n kind === 'sarif' ||\n kind === 'html' ||\n kind === 'pr-comment';\n if (userPickedFormat) {\n return kind as ReporterFormat;\n }\n if (\n typeof flags.output === 'string' &&\n flags.output.toLowerCase().endsWith('.html')\n ) {\n return 'html';\n }\n return 'agent';\n}\n\nfunction isFailOnLevel(v: string): v is 'error' | 'warn' | 'none' {\n return v === 'error' || v === 'warn' || v === 'none';\n}\n\nasync function runSingleAudit(\n rootDir: string,\n flags: CliFlags,\n prepared: PreparedOptions,\n): Promise<{ report: AuditReport; source: ConfigSource }> {\n let scopeFiles: string[] | undefined;\n if (!flags.full && (flags.diff || flags.staged)) {\n scopeFiles = await listChangedFiles({\n rootDir,\n mode: flags.staged ? 'staged' : 'diff',\n });\n }\n const resolved = await loadDoctorConfig(rootDir, {\n ...(flags.config ? { explicitPath: flags.config } : {}),\n ...(flags.preset ? { presetOverride: flags.preset } : {}),\n });\n const fixExclude = toArray(flags.fixExclude);\n const merged: ResolvedDoctorConfig = mergeCliOverrides(resolved, {\n failOn: flags.failOn as 'error' | 'warn' | 'none' | undefined,\n include: toArray(flags.include),\n exclude: toArray(flags.exclude),\n rules: prepared.ruleOverrides,\n threshold: prepared.threshold,\n ...(fixExclude ? { fixExcludes: fixExclude } : {}),\n });\n const report = await audit({\n rootDir: merged.rootDir,\n include: merged.include,\n exclude: merged.exclude,\n rules: merged.rules,\n failOn: merged.failOn,\n threshold: merged.threshold,\n deadCode: flags.deadCode,\n lint: flags.lint,\n respectInlineDisables: flags.respectInlineDisables,\n scopeFiles,\n fix: flags.fix,\n ...(merged.fixExcludes ? { fixExcludes: merged.fixExcludes } : {}),\n });\n const allowedRuleIds = new Set(Object.keys(merged.rules));\n report.diagnostics = report.diagnostics.filter((d) =>\n allowedRuleIds.has(d.ruleId),\n );\n return { report, source: resolved.source };\n}\n\nfunction aggregateReports(\n reports: AuditReport[],\n rootDirectory: string,\n): AuditReport {\n const first = reports[0];\n const diagnostics = reports.flatMap((r) => r.diagnostics);\n let filesScanned = 0;\n let elapsedMs = 0;\n let exitCode: 0 | 1 | 2 = 0;\n for (const r of reports) {\n filesScanned += r.filesScanned;\n elapsedMs += r.elapsedMs;\n if (r.exitCode > exitCode) exitCode = r.exitCode;\n }\n const ruleCounts: Record<string, number> = {};\n for (const d of diagnostics) {\n ruleCounts[d.ruleId] = (ruleCounts[d.ruleId] ?? 0) + 1;\n }\n const scoreResult = scoreDiagnostics(diagnostics, {\n threshold: first.scoreResult.threshold,\n });\n return {\n rootDir: rootDirectory,\n filesScanned,\n diagnostics,\n score: scoreResult.score,\n errorCount: scoreResult.errorCount,\n warnCount: scoreResult.warnCount,\n infoCount: scoreResult.infoCount,\n exitCode,\n scoreResult,\n projectInfo: { ...first.projectInfo, rootDirectory },\n elapsedMs,\n timings: first.timings,\n ruleCounts,\n };\n}\n\nfunction emitReport(\n report: AuditReport,\n reporter: ReporterFormat,\n flags: CliFlags,\n): void {\n const input: ReporterInput = {\n toolName: '@geoql/nuxt-doctor',\n toolVersion: readVersion(),\n rootDirectory: report.rootDir,\n analyzedFileCount: report.filesScanned,\n elapsedMs: report.elapsedMs,\n diagnostics: report.diagnostics,\n score: report.scoreResult,\n projectInfo: report.projectInfo,\n };\n const out = format(input, reporter, {\n color: flags.color,\n quiet: flags.quiet,\n });\n if (flags.output) {\n writeFileSync(resolve(flags.output), out);\n } else {\n process.stdout.write(out);\n }\n const ciExplicitOptOut = flags.ci === false;\n const ciExplicitOptIn = flags.ci === true;\n const ciAutoDetected = !ciExplicitOptOut && isCiEnvironment();\n const wantsAnnotations =\n flags.annotations === true || ciExplicitOptIn || ciAutoDetected;\n const reporterCarriesAnnotations =\n reporter === 'agent' || reporter === 'pretty';\n if (\n wantsAnnotations &&\n reporterCarriesAnnotations &&\n !flags.quiet &&\n report.diagnostics.length > 0\n ) {\n process.stdout.write(`${encodeAnnotations(report.diagnostics)}\\n`);\n }\n}\n\nasync function maybePushFindings(\n report: AuditReport,\n flags: CliFlags,\n): Promise<void> {\n if (flags.push !== true) return;\n if (!flags.apiKey) {\n process.stderr.write(\n 'nuxt-doctor: --push enabled but --api-key is not set; skipping push (no findings were sent).\\n',\n );\n return;\n }\n const url = flags.pushUrl;\n const project: string = 'nuxt-doctor';\n const result = await pushFindings({\n project,\n score: report.score,\n errorCount: report.errorCount,\n warnCount: report.warnCount,\n infoCount: report.infoCount,\n diagnostics: report.diagnostics,\n url,\n apiKey: flags.apiKey,\n });\n if (result.ok) {\n process.stderr.write(\n `nuxt-doctor: pushed ${report.diagnostics.length} finding${report.diagnostics.length === 1 ? '' : 's'} to ${url} (HTTP ${result.status}).\\n`,\n );\n } else {\n const detail =\n result.status !== undefined ? ` (HTTP ${result.status})` : '';\n process.stderr.write(\n `nuxt-doctor: --push failed${detail}: ${result.error}. Audit exit code is unchanged.\\n`,\n );\n }\n}\n\nasync function runProjectAudits(\n rootDir: string,\n flags: CliFlags,\n prepared: PreparedOptions,\n packages: WorkspacePackage[],\n): Promise<{ report: AuditReport; source: ConfigSource } | null> {\n const requested = flags\n .project!.split(',')\n .map((name) => name.trim())\n .filter((name) => name.length > 0);\n const byName = new Map(packages.map((p) => [p.name, p]));\n const reports: AuditReport[] = [];\n let source: ConfigSource = 'built-in';\n for (const name of requested) {\n const match = byName.get(name);\n if (!match) {\n process.stderr.write(\n `nuxt-doctor: --project: unknown project \"${name}\" (skipped)\\n`,\n );\n continue;\n }\n const single = await runSingleAudit(match.dir, flags, prepared);\n reports.push(single.report);\n source = single.source;\n }\n if (reports.length === 0) {\n process.stderr.write(\n 'nuxt-doctor: --project: no matching workspace projects\\n',\n );\n return null;\n }\n const { root } = await findMonorepoRoot(rootDir);\n return { report: aggregateReports(reports, root), source };\n}\n\nasync function runInit(dir: string, flags: InitCliFlags): Promise<void> {\n const targetDir = resolve(dir);\n const configFormat = (flags.configFormat ?? 'ts') as InitConfigFormat;\n if (!VALID_CONFIG_FORMATS.has(configFormat)) {\n process.stderr.write(\n `nuxt-doctor init: --config-format must be ts | json | package-json, got '${flags.configFormat}'\\n`,\n );\n process.exitCode = 2;\n return;\n }\n\n const resolvedAnswers = flags.yes\n ? {\n configFormat,\n preset: 'recommended' as const,\n threshold: undefined,\n exclude: undefined,\n }\n : await runInteractiveInit(configFormat);\n\n if (process.exitCode === 2) return;\n\n const plan = await planInit({\n dir: targetDir,\n configFormat: resolvedAnswers.configFormat,\n preset: resolvedAnswers.preset,\n threshold: resolvedAnswers.threshold,\n exclude: resolvedAnswers.exclude,\n binName: 'nuxt-doctor',\n });\n\n const summary = await detectSummary(targetDir);\n process.stdout.write(`${summary}\\n`);\n\n if (plan.conflict && !flags.force) {\n process.stderr.write(\n `nuxt-doctor init: ${plan.conflictPath} already exists. Run with --force to overwrite.\\n`,\n );\n process.exitCode = 2;\n return;\n }\n\n if (flags.dryRun) {\n for (const write of plan.writes) {\n process.stdout.write(`[dry-run] would write ${write.path}\\n`);\n process.stdout.write(`${write.content}\\n`);\n }\n process.exitCode = 0;\n return;\n }\n\n for (const write of plan.writes) {\n writeFileSync(write.path, write.content, 'utf8');\n }\n process.exitCode = 0;\n}\n\nasync function runInteractiveInit(defaultFormat: InitConfigFormat): Promise<{\n configFormat: InitConfigFormat;\n preset: 'recommended' | 'strict' | 'minimal';\n threshold: number | undefined;\n exclude: string | undefined;\n}> {\n const answers = await prompts(\n [\n {\n type: 'select',\n name: 'target',\n message: 'Config target?',\n choices: [\n { title: 'doctor.config.ts (recommended)', value: 'ts' },\n { title: 'doctor.config.json', value: 'json' },\n { title: 'package.json#doctor', value: 'package-json' },\n ],\n initial: defaultFormat === 'package-json' ? 2 : 0,\n },\n {\n type: 'select',\n name: 'preset',\n message: 'Base preset?',\n choices: [\n { title: 'recommended (errors + warnings)', value: 'recommended' },\n { title: 'strict (recommended + info)', value: 'strict' },\n { title: 'minimal (errors only)', value: 'minimal' },\n ],\n initial: 0,\n },\n {\n type: 'number',\n name: 'threshold',\n message: 'Minimum passing score (0-100, blank to skip)',\n min: 0,\n max: 100,\n initial: '',\n },\n {\n type: 'text',\n name: 'exclude',\n message: 'Exclude glob patterns (comma-separated, blank to skip)',\n initial: '',\n },\n ],\n {\n onCancel: () => {\n process.stderr.write('nuxt-doctor init: cancelled\\n');\n process.exitCode = 2;\n },\n },\n );\n\n if (process.exitCode === 2)\n return {\n configFormat: 'ts' as InitConfigFormat,\n preset: 'recommended' as const,\n threshold: undefined,\n exclude: undefined,\n };\n\n return normalizeInitAnswers({\n target: answers.target as InitConfigFormat | undefined,\n preset: answers.preset as 'recommended' | 'strict' | 'minimal' | undefined,\n threshold: answers.threshold || undefined,\n exclude: answers.exclude as string | undefined,\n });\n}\n\nexport async function run(argv: string[] = process.argv): Promise<number> {\n const cli = cac('nuxt-doctor');\n\n cli\n .command('[path]', 'Audit a Nuxt project')\n .option(\n '--format <kind>',\n 'Output format (agent|pretty|json|json-compact|sarif|html|pr-comment)',\n {\n default: 'agent',\n },\n )\n .option('--json', 'Shorthand for --format json')\n .option('--json-compact', 'Emit single-line JSON')\n .option('--config <path>', 'Path to doctor.config.ts')\n .option('--preset <name>', 'Base preset: minimal|recommended|strict|all')\n .option(\n '--fail-on <level>',\n 'Exit non-zero on this severity or worse (error|warn|none)',\n {\n default: 'error',\n },\n )\n .option('--quiet', 'Only show the summary')\n .option('--verbose', 'Emit per-pass timing and rule diagnostics to stderr')\n .option('--no-color', 'Disable colored output')\n .option(\n '--rule <id:level>',\n 'Override a rule (repeatable), e.g. --rule a/b:off',\n )\n .option('--include <glob>', 'Glob of files to include (repeatable)')\n .option('--exclude <glob>', 'Glob of files to exclude (repeatable)')\n .option('--no-dead-code', 'Skip the dead-code (knip) analysis pass')\n .option('--no-lint', 'Skip the lint passes (template/SFC/oxlint)')\n .option(\n '--no-respect-inline-disables',\n 'Surface findings even inside doctor-disable comments',\n )\n .option('--threshold <n>', 'Minimum passing score (0-100)')\n .option('--score', 'Output only the numeric score (for piping)')\n .option('--annotations', 'Emit GitHub Actions ::error::/::warning:: lines')\n .option('--ci', 'Auto-enable CI behavior (--annotations on GitHub Actions)')\n .option('--no-ci', 'Disable CI auto-detection even when CI env is set')\n .option('--diff', 'Only report findings in files changed vs HEAD')\n .option('--staged', 'Only report findings in staged files')\n .option('--full', 'Force a complete scan (overrides --diff/--staged)')\n .option(\n '--project <name>',\n 'Comma-separated workspace project names to audit (monorepo)',\n )\n .option('--output <file>', 'Write the report to a file instead of stdout')\n .option('--pr-comment', 'Emit a focused Markdown PR-comment body')\n .option(\n '--fix',\n 'Auto-fix oxlint-pass findings in place (built-in vue/* rules only; template/SFC/dead-code/project findings are not fixable). Skipped in --diff/--staged mode.',\n )\n .option(\n '--fix-exclude <ruleId>',\n 'Mark a rule as not-auto-fixable (repeatable). Note: oxlint applies built-in fixes globally, so this is enforced only for doctor plugin fixes; built-in vue/* fixes still apply.',\n )\n .option(\n '--push',\n 'After the audit, POST privacy-stripped findings to the SaaS. Requires --api-key. Negatable with --no-push.',\n )\n .option(\n '--push-url <url>',\n 'SaaS endpoint for --push (default: https://app.the-doctor.report/api/v1/findings)',\n {\n default: 'https://app.the-doctor.report/api/v1/findings',\n },\n )\n .option(\n '--api-key <key>',\n 'API key for the SaaS (sent as the x-api-key header for both --score-mode and --push).',\n )\n .action(async (path: string | undefined, flags: CliFlags) => {\n const reporter = resolveFormat(flags);\n if (flags.failOn !== undefined && !isFailOnLevel(flags.failOn)) {\n process.stderr.write(\n `nuxt-doctor: --fail-on must be 'error', 'warn', or 'none', got '${flags.failOn}'\\n`,\n );\n process.exitCode = 2;\n return;\n }\n const rootDir = resolve(path ?? '.');\n\n try {\n if (flags.score && (flags.json || flags.jsonCompact)) {\n throw new Error(\n '--score and --json are mutually exclusive (--score outputs a plaintext integer).',\n );\n }\n const ruleOverrides = parseRuleOverrides(toArray(flags.rule));\n const threshold =\n flags.threshold === undefined ? undefined : Number(flags.threshold);\n if (\n threshold !== undefined &&\n (!Number.isInteger(threshold) || threshold < 0 || threshold > 100)\n ) {\n throw new Error(\n `--threshold must be an integer 0-100, got \"${flags.threshold}\".`,\n );\n }\n if (flags.diff && flags.staged) {\n throw new Error('--diff and --staged are mutually exclusive.');\n }\n if (flags.verbose && flags.quiet) {\n throw new Error('--verbose using --quiet are mutually exclusive.');\n }\n const fixActive = flags.fix === true;\n const fixSkippedForScope =\n fixActive && !flags.full && (flags.diff || flags.staged);\n if (fixSkippedForScope) {\n process.stderr.write(\n 'nuxt-doctor: --fix skipped in --diff/--staged mode (auto-fix only runs on a full scan to avoid rewriting files outside the diff).\\n',\n );\n }\n if (fixActive && flags.fixExclude !== undefined) {\n process.stderr.write(\n 'nuxt-doctor: --fix-exclude is not enforced for built-in vue/* rules (oxlint applies their fixes globally); it currently scopes only future doctor plugin fixes.\\n',\n );\n }\n const prepared: PreparedOptions = { ruleOverrides, threshold };\n\n const workspacePackages = flags.project\n ? await listWorkspacePackages(rootDir)\n : [];\n if (flags.project && workspacePackages.length === 0) {\n process.stderr.write(\n 'nuxt-doctor: --project ignored: not a pnpm workspace\\n',\n );\n }\n\n let report: AuditReport;\n let configSource: ConfigSource;\n if (flags.project && workspacePackages.length > 0) {\n const aggregated = await runProjectAudits(\n rootDir,\n flags,\n prepared,\n workspacePackages,\n );\n if (!aggregated) {\n process.exitCode = 2;\n return;\n }\n report = aggregated.report;\n configSource = aggregated.source;\n } else {\n const single = await runSingleAudit(rootDir, flags, prepared);\n report = single.report;\n configSource = single.source;\n }\n\n if (flags.verbose) {\n const verboseOutput = renderVerboseTrace(report, {\n configSource,\n });\n process.stderr.write(`${verboseOutput}\\n`);\n }\n if (fixActive && !fixSkippedForScope) {\n process.stderr.write(\n `nuxt-doctor: applied oxlint --fix; ${report.diagnostics.length} finding${report.diagnostics.length === 1 ? '' : 's'} remain (re-run to see them).\\n`,\n );\n }\n if (flags.score) {\n process.stdout.write(`${report.score}\\n`);\n } else {\n emitReport(report, reporter, flags);\n }\n await maybePushFindings(report, flags);\n process.exitCode = report.exitCode;\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n process.stderr.write(`nuxt-doctor: ${msg}\\n`);\n process.exitCode = 2;\n }\n });\n\n cli\n .command(\n 'list-rules',\n 'List every registered rule with id, severity, category, source, and preset membership',\n )\n .option('--preset <name>', 'Filter to: recommended | all')\n .option('--category <name>', 'Filter by category')\n .option(\n '--source <name>',\n 'Filter by source: doctor | oxlint-builtin | eslint-plugin-vue',\n )\n .option('--severity <level>', 'Filter by: error | warn | info')\n .option('--json', 'Emit JSON instead of formatted text')\n .option('--json-compact', 'With --json, single-line output')\n .action(async (flags: ListRulesCliFlags) => {\n try {\n const filter = buildListRulesFilter(flags);\n const rules = listRules(filter);\n if (flags.json || flags.jsonCompact) {\n const payload = { count: rules.length, rules };\n process.stdout.write(\n flags.jsonCompact\n ? JSON.stringify(payload)\n : `${JSON.stringify(payload, null, 2)}\\n`,\n );\n } else {\n process.stdout.write(renderRulesTable(rules));\n }\n process.exitCode = 0;\n } catch (err) {\n const msg = (err as Error).message;\n process.stderr.write(`nuxt-doctor list-rules: ${msg}\\n`);\n process.exitCode = 2;\n }\n });\n\n cli\n .command(\n 'explain <ruleId>',\n \"Print the rule's severity, category, recommendation, and helpUri\",\n )\n .option('--json', 'Emit structured JSON instead of formatted text')\n .action(async (ruleId: string, flags: ExplainCliFlags) => {\n const doc = loadRuleDoc(ruleId);\n if (!doc) {\n process.stderr.write(\n `nuxt-doctor explain: unknown rule '${ruleId}'. Try \\`nuxt-doctor list-rules\\` to see registered rules.\\n`,\n );\n process.exitCode = 2;\n return;\n }\n if (flags.json) {\n process.stdout.write(`${JSON.stringify(doc, null, 2)}\\n`);\n } else {\n process.stdout.write(renderExplain(doc));\n }\n process.exitCode = 0;\n });\n\n cli\n .command(\n 'inspect [dir]',\n 'Print the detected project capabilities doctor uses to gate rules',\n )\n .option('--json', 'Emit structured JSON instead of formatted text')\n .option('--json-compact', 'With --json, emit a single-line payload')\n .action(async (dir: string | undefined, flags: InspectCliFlags) => {\n const rootDir = resolve(dir ?? '.');\n const project = await detectProject(rootDir);\n if (flags.json || flags.jsonCompact) {\n const payload = projectInfoToJson(project);\n const out = flags.jsonCompact\n ? JSON.stringify(payload)\n : JSON.stringify(payload, null, 2);\n process.stdout.write(`${out}\\n`);\n } else {\n process.stdout.write(renderInspect(project, rootDir));\n }\n process.exitCode = 0;\n });\n\n cli\n .command('init [dir]', 'Scaffold a doctor config for the project')\n .option('-y, --yes', 'Non-interactive, use recommended defaults')\n .option(\n '--config-format <ts|json|package-json>',\n 'Config file format (default: ts)',\n )\n .option('--force', 'Overwrite existing config')\n .option('--dry-run', 'Print what would be written, touch nothing')\n .action(async (dir: string | undefined, flags: InitCliFlags) => {\n try {\n await runInit(dir ?? '.', flags);\n } catch (err) {\n process.stderr.write(`${err instanceof Error ? err.message : err}\\n`);\n process.exitCode = 2;\n }\n });\n\n cli.help();\n cli.version(readVersion());\n cli.parse(argv, { run: false });\n await cli.runMatchedCommand();\n return process.exitCode ?? 0;\n}\n"],"mappings":";;;;;;;;AAuCA,SAAS,cAAsB;CAC7B,IAAI;EACF,MAAM,OAAO,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC;EAIpD,OAHY,KAAK,MACf,aAAa,QAAQ,MAAM,kBAAkB,EAAE,QAAQ,CAE/C,CAA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,OAAO,KAAK,MAAM;WACzB,KAAK;GACZ,QAAQ,OAAO,MAAM,GAAG,eAAe,QAAQ,IAAI,UAAU,IAAI,IAAI;GACrE,QAAQ,WAAW;;GAErB;CAEJ,IAAI,MAAM;CACV,IAAI,QAAQ,aAAa,CAAC;CAC1B,IAAI,MAAM,MAAM,EAAE,KAAK,OAAO,CAAC;CAC/B,MAAM,IAAI,mBAAmB;CAC7B,OAAO,QAAQ,YAAY"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geoql/nuxt-doctor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "CLI auditor for Nuxt 4 apps. Detects anti-patterns, AI-slop, and best-practice violations via @vue/compiler-sfc + oxlint. Run with `npx -y @geoql/nuxt-doctor`.",
|
|
6
6
|
"keywords": [
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"prompts": "^2.4.2",
|
|
53
53
|
"@geoql/oxlint-plugin-nuxt-doctor": "1.0.0",
|
|
54
54
|
"@geoql/oxlint-plugin-vue-doctor": "1.0.0",
|
|
55
|
-
"@geoql/doctor-core": "^1.
|
|
55
|
+
"@geoql/doctor-core": "^1.1.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/node": "^25.9.1",
|