vite-doctor 0.1.0 → 0.1.1
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 +12 -0
- package/dist/{cli-_Q17sv0d.mjs → cli-BH4b9rUn.mjs} +1 -1
- package/dist/{cli-main-Da1obxJF.mjs → cli-main-Qke7WWOU.mjs} +8 -8
- package/dist/cli.mjs +1 -1
- package/dist/{core-B4BOHv0k.mjs → core-BaWz6Sqw.mjs} +144 -16
- package/dist/{doctor-BCyOugNC.mjs → doctor-BZ1dduKq.mjs} +8 -8
- package/dist/{doctor-BBw4hDI8.mjs → doctor-DZp2Nx91.mjs} +1 -1
- package/dist/doctor-process.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{migration-DbxjbKWV.mjs → migration-BKAZDynf.mjs} +2 -2
- package/dist/nitro-DUeTKgju.mjs +2 -0
- package/dist/{no-route-middleware-api-security-DNbGlKfk.mjs → no-route-middleware-api-security-EjckFmwh.mjs} +2 -2
- package/dist/nuxt-cli.mjs +1 -1
- package/dist/{package-Cb63ia0y.mjs → package-BeniS7ot.mjs} +1 -1
- package/dist/{pinia-Cegz0NNK.mjs → pinia-CFZn5ipu.mjs} +1 -1
- package/dist/{plugin-cp6Cn0HK.mjs → plugin-DpSQG2E-.mjs} +2 -2
- package/dist/{plugin-run-BWfwE3hT.mjs → plugin-run-DizgqQx9.mjs} +2 -2
- package/dist/plugin-run-Q3bXHe8_.mjs +2 -0
- package/dist/plugin-worker.mjs +1 -1
- package/dist/plugin.mjs +1 -1
- package/dist/{rule-authoring-gVUkGPkZ.mjs → rule-authoring-B-rhkSVN.mjs} +1 -1
- package/dist/rule-packs/nitro/index.mjs +2 -2
- package/dist/rule-packs/nitro/rules.mjs +1 -1
- package/dist/rule-packs/nuxt/index.mjs +3 -3
- package/dist/rule-packs/nuxt/rules/index.mjs +6 -6
- package/dist/rule-packs/package/index.mjs +1 -1
- package/dist/rule-packs/pinia/index.mjs +1 -1
- package/dist/rule-packs/shadcn/index.mjs +1 -1
- package/dist/rule-packs/typescript/index.mjs +2 -2
- package/dist/rule-packs/typescript/rules/index.mjs +1 -1
- package/dist/rule-packs/vite/index.mjs +1 -1
- package/dist/rule-packs/vite/rules/index.mjs +1 -1
- package/dist/rule-packs/vue/index.mjs +1 -1
- package/dist/rule-packs/vue/rules.mjs +1 -1
- package/dist/{rules-DkWIvywE.mjs → rules-BXDsc_vj.mjs} +2 -2
- package/dist/{rules-BGhf-scZ.mjs → rules-Ck0qw9Y-.mjs} +2 -2
- package/dist/{rules-D34uZYuj.mjs → rules-D2b-8SNT.mjs} +2 -2
- package/dist/rules-NPAaR11O.mjs +2 -0
- package/dist/{rules-BQKfUqwp.mjs → rules-pThBWNKu.mjs} +1 -1
- package/dist/rules.mjs +2 -2
- package/dist/{server-BZlWIOUx.mjs → server-DWVLUuR_.mjs} +1 -1
- package/dist/{shadcn-BfqffCih.mjs → shadcn-DakNoxOB.mjs} +1 -1
- package/dist/testkit.mjs +1 -1
- package/dist/typescript-hosXLQAc.mjs +2 -0
- package/docs/skills/doctor/SKILL.md +4 -0
- package/package.json +2 -3
- package/dist/nitro-8WdNQ5gx.mjs +0 -2
- package/dist/plugin-run-_jr341xA.mjs +0 -2
- package/dist/rules-BEpsfGKF.mjs +0 -2
- package/dist/typescript-CHW5k6tw.mjs +0 -2
package/README.md
CHANGED
|
@@ -59,6 +59,18 @@ pnpm nuxt doctor
|
|
|
59
59
|
|
|
60
60
|
Use `--framework` only when Doctor cannot identify the framework automatically.
|
|
61
61
|
|
|
62
|
+
For CI, add a package script and run it before the build. Doctor reads source and config, not build output. Nuxt projects only need `nuxt prepare` first:
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"scripts": {
|
|
67
|
+
"check:doctor": "vite-doctor . --max-warnings 0"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Don't name the script `doctor`. `pnpm doctor` and `npm doctor` run the package manager's built-in health check instead of your script.
|
|
73
|
+
|
|
62
74
|
Check a migration before changing dependencies:
|
|
63
75
|
|
|
64
76
|
```bash
|
|
@@ -9,7 +9,7 @@ async function main(args = process.argv.slice(2), cwd = process.cwd(), surface =
|
|
|
9
9
|
process.stdout.write(`${viteDoctorVersion}\n`);
|
|
10
10
|
return 0;
|
|
11
11
|
}
|
|
12
|
-
return (await import("./cli-main-
|
|
12
|
+
return (await import("./cli-main-Qke7WWOU.mjs")).main(args, cwd, surface);
|
|
13
13
|
}
|
|
14
14
|
/** The `vite-doctor` binary: a Doctor Run goes through the long-lived Doctor process when opted in. */
|
|
15
15
|
async function runCli(args = process.argv.slice(2), cwd = process.cwd()) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as reportStatus, i as explainRule, n as createReport, r as createRulesReport } from "./core-
|
|
1
|
+
import { a as reportStatus, i as explainRule, n as createReport, r as createRulesReport } from "./core-BaWz6Sqw.mjs";
|
|
2
2
|
import { t as viteDoctorVersion } from "./version-Qod0rU4x.mjs";
|
|
3
3
|
import { n as loadDoctorConfig } from "./config-CaJ0DqB3.mjs";
|
|
4
4
|
import { n as DOCTOR_PROCESS_ENV } from "./protocol-CcLGBETF.mjs";
|
|
@@ -135,7 +135,7 @@ async function main(args = process.argv.slice(2), cwd = process.cwd(), surface =
|
|
|
135
135
|
exitCode = 2;
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
|
-
const { createMigrationReport, formatMigrationReport } = await import("./migration-
|
|
138
|
+
const { createMigrationReport, formatMigrationReport } = await import("./migration-BKAZDynf.mjs");
|
|
139
139
|
const report = await createMigrationReport(root, options.to ? [options.to] : []);
|
|
140
140
|
process.stdout.write(formatMigrationReport(report, format));
|
|
141
141
|
exitCode = report.summary.errors > 0 ? 1 : 0;
|
|
@@ -150,7 +150,7 @@ async function main(args = process.argv.slice(2), cwd = process.cwd(), surface =
|
|
|
150
150
|
applyHostExtensions(runOptions, surface, options);
|
|
151
151
|
validateCliRunOptions(runOptions);
|
|
152
152
|
runOptions.config = await loadCliConfig(cwd, stringFlag(options.config));
|
|
153
|
-
const { viteDoctorRulePacks } = await import("./doctor-
|
|
153
|
+
const { viteDoctorRulePacks } = await import("./doctor-DZp2Nx91.mjs");
|
|
154
154
|
process.stdout.write(createRulesReport(await viteDoctorRulePacks(runOptions), format));
|
|
155
155
|
});
|
|
156
156
|
cli.command("explain <diagnostic>", "Explain a Doctor Diagnostic Code or Rule.").option("--config <path>", "Explicitly load an executable Doctor config.").option("--host-extensions", hostExtensionsHelp).option("--format <format>", "Output: text, json, or agent.").option("--framework <framework>", "Framework override.").action(async (diagnostic, options) => {
|
|
@@ -163,7 +163,7 @@ async function main(args = process.argv.slice(2), cwd = process.cwd(), surface =
|
|
|
163
163
|
applyHostExtensions(runOptions, surface, options);
|
|
164
164
|
validateCliRunOptions(runOptions);
|
|
165
165
|
runOptions.config = await loadCliConfig(cwd, stringFlag(options.config));
|
|
166
|
-
const { viteDoctorRulePacks } = await import("./doctor-
|
|
166
|
+
const { viteDoctorRulePacks } = await import("./doctor-DZp2Nx91.mjs");
|
|
167
167
|
const report = explainRule(await viteDoctorRulePacks(runOptions), diagnostic, format);
|
|
168
168
|
if (!report) {
|
|
169
169
|
await writeCliError(`Unknown Diagnostic Code or Rule: ${diagnostic}`, format);
|
|
@@ -178,7 +178,7 @@ async function main(args = process.argv.slice(2), cwd = process.cwd(), surface =
|
|
|
178
178
|
const runOptions = { root: cwd };
|
|
179
179
|
applyDoctorOptions(runOptions, options);
|
|
180
180
|
validateCliRunOptions(runOptions);
|
|
181
|
-
const { viteDoctorCacheStatus } = await import("./doctor-
|
|
181
|
+
const { viteDoctorCacheStatus } = await import("./doctor-DZp2Nx91.mjs");
|
|
182
182
|
const status = await viteDoctorCacheStatus(cwd, await loadCliConfig(cwd, stringFlag(options.config)), runOptions.framework === "auto" ? void 0 : runOptions.framework);
|
|
183
183
|
process.stdout.write(formatCacheStatus(status, format));
|
|
184
184
|
return;
|
|
@@ -187,7 +187,7 @@ async function main(args = process.argv.slice(2), cwd = process.cwd(), surface =
|
|
|
187
187
|
const runOptions = { root: cwd };
|
|
188
188
|
applyDoctorOptions(runOptions, options);
|
|
189
189
|
validateCliRunOptions(runOptions);
|
|
190
|
-
const { cleanViteDoctorCache } = await import("./doctor-
|
|
190
|
+
const { cleanViteDoctorCache } = await import("./doctor-DZp2Nx91.mjs");
|
|
191
191
|
await cleanViteDoctorCache(cwd, await loadCliConfig(cwd, stringFlag(options.config)), runOptions.framework === "auto" ? void 0 : runOptions.framework);
|
|
192
192
|
consola.log("Doctor cache cleaned");
|
|
193
193
|
return;
|
|
@@ -316,7 +316,7 @@ function addDoctorRunCommand(cli, args, cwd, surface, setExitCode) {
|
|
|
316
316
|
}
|
|
317
317
|
async function watchDoctorCommand(args, cwd, surface, root, options) {
|
|
318
318
|
if (options.fix || options.unsafeFix || options.updateBaseline) throw new Error("--watch cannot be combined with --fix, --unsafe-fix, or --update-baseline.");
|
|
319
|
-
const [{ watchDoctorRuns }, { viteDoctorCacheStatus }] = await Promise.all([import("./watch-DMUy9-YX.mjs"), import("./doctor-
|
|
319
|
+
const [{ watchDoctorRuns }, { viteDoctorCacheStatus }] = await Promise.all([import("./watch-DMUy9-YX.mjs"), import("./doctor-DZp2Nx91.mjs")]);
|
|
320
320
|
const cache = await viteDoctorCacheStatus(root, options.config, options.framework === "auto" ? void 0 : options.framework);
|
|
321
321
|
const runArgs = args.filter((arg) => arg !== "--watch");
|
|
322
322
|
const controller = new AbortController();
|
|
@@ -337,7 +337,7 @@ async function watchDoctorCommand(args, cwd, surface, root, options) {
|
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
async function runDoctorCommand(options, format, configFile) {
|
|
340
|
-
const { runViteDoctor, shouldFailDoctorRun } = await import("./doctor-
|
|
340
|
+
const { runViteDoctor, shouldFailDoctorRun } = await import("./doctor-DZp2Nx91.mjs");
|
|
341
341
|
const result = await runViteDoctor(options);
|
|
342
342
|
process.stdout.write(createReport(result, format, {
|
|
343
343
|
runOptions: options,
|
package/dist/cli.mjs
CHANGED
|
@@ -1141,6 +1141,19 @@ function expandBraces(pattern) {
|
|
|
1141
1141
|
return expansions;
|
|
1142
1142
|
}
|
|
1143
1143
|
//#endregion
|
|
1144
|
+
//#region src/core/internal/lazy-parsers.ts
|
|
1145
|
+
const require = createRequire(import.meta.url);
|
|
1146
|
+
let typescriptESLintParser;
|
|
1147
|
+
let typescript;
|
|
1148
|
+
let vueCompilerSfc;
|
|
1149
|
+
const parseForESLint = (code, options) => (typescriptESLintParser ??= require("@typescript-eslint/parser")).parseForESLint(code, options);
|
|
1150
|
+
function loadTypeScript() {
|
|
1151
|
+
return typescript ??= require("typescript");
|
|
1152
|
+
}
|
|
1153
|
+
function loadVueCompilerSfc() {
|
|
1154
|
+
return vueCompilerSfc ??= require("@vue/compiler-sfc");
|
|
1155
|
+
}
|
|
1156
|
+
//#endregion
|
|
1144
1157
|
//#region src/core/internal/project.ts
|
|
1145
1158
|
async function detectProject(root, requested = "auto", runtimeTarget) {
|
|
1146
1159
|
const packageJson = readJson(join(root, "package.json"));
|
|
@@ -1186,11 +1199,12 @@ async function detectProject(root, requested = "auto", runtimeTarget) {
|
|
|
1186
1199
|
inventory: { packages: deps }
|
|
1187
1200
|
};
|
|
1188
1201
|
const unappliedConfigs = workspaceNuxt.filter((item) => item.nuxt.doctorConfig);
|
|
1189
|
-
|
|
1202
|
+
const evidenceGaps = [...owner ? missingNuxtManifestGaps(root, owner.root, owner.nuxt, workspacePackages) : [], ...unappliedConfigs.map((item) => ({
|
|
1190
1203
|
source: "vite-doctor/workspace-nuxt",
|
|
1191
1204
|
message: `Doctor options from the vite-doctor/nuxt module in ${item.root} only apply when Doctor runs from that package. Run Doctor from ${item.root} to apply them.`,
|
|
1192
1205
|
files: [relative(root, item.nuxt.manifestPath ?? join(root, item.root))]
|
|
1193
|
-
}));
|
|
1206
|
+
}))];
|
|
1207
|
+
if (evidenceGaps.length) project.evidenceGaps = evidenceGaps;
|
|
1194
1208
|
rememberProjectFileWalk(project, walk);
|
|
1195
1209
|
return project;
|
|
1196
1210
|
}
|
|
@@ -1401,6 +1415,133 @@ async function detectNuxtAppRoots(root) {
|
|
|
1401
1415
|
if (!configs.length) return [root];
|
|
1402
1416
|
return [...new Set(configs.map((file) => resolve(file, "..")))].sort();
|
|
1403
1417
|
}
|
|
1418
|
+
function missingNuxtManifestGaps(root, packageRoot, nuxt, workspacePackages) {
|
|
1419
|
+
const appRoot = join(root, packageRoot);
|
|
1420
|
+
const ownAppRoots = nuxt.appRoots.filter((appDir) => owningWorkspacePackage(workspacePackages, relative(root, appDir)) === packageRoot || isNuxtLayerAppRoot(appRoot, appDir, workspacePackages, root));
|
|
1421
|
+
if (nuxt.manifestPath || !registersDoctorModule(appRoot, {
|
|
1422
|
+
...nuxt,
|
|
1423
|
+
appRoots: ownAppRoots
|
|
1424
|
+
})) return [];
|
|
1425
|
+
const manifest = relative(root, join(appRoot, ".nuxt/doctor.manifest.json"));
|
|
1426
|
+
return [{
|
|
1427
|
+
source: "vite-doctor/nuxt",
|
|
1428
|
+
message: `nuxt.config registers vite-doctor/nuxt, but ${manifest} does not exist, so this Doctor Run ignored the doctor options in nuxt.config and Nuxt's resolved auto-imports, components, and server handlers. Run nuxt prepare first; it does not need a build.`,
|
|
1429
|
+
files: [manifest]
|
|
1430
|
+
}];
|
|
1431
|
+
}
|
|
1432
|
+
function isNuxtLayerAppRoot(appRoot, candidateRoot, workspacePackages, workspaceRoot) {
|
|
1433
|
+
if (candidateRoot === appRoot) return false;
|
|
1434
|
+
const config = readNuxtConfigText(appRoot).anyFormat;
|
|
1435
|
+
if (!config) return false;
|
|
1436
|
+
const extendsValues = readNuxtExtendsValues(config);
|
|
1437
|
+
const candidatePackage = owningWorkspacePackage(workspacePackages, relative(workspaceRoot, candidateRoot));
|
|
1438
|
+
const candidate = workspacePackages.find((item) => item.root === candidatePackage);
|
|
1439
|
+
return extendsValues.some((value) => {
|
|
1440
|
+
return resolve(appRoot, value) === candidateRoot || value === candidate?.name;
|
|
1441
|
+
});
|
|
1442
|
+
}
|
|
1443
|
+
function readNuxtExtendsValues(config) {
|
|
1444
|
+
const ts = loadTypeScript();
|
|
1445
|
+
const source = ts.createSourceFile("nuxt.config.ts", config, ts.ScriptTarget.Latest, true);
|
|
1446
|
+
const values = [];
|
|
1447
|
+
const visit = (node) => {
|
|
1448
|
+
if (ts.isPropertyAssignment(node)) {
|
|
1449
|
+
const name = node.name;
|
|
1450
|
+
if ((ts.isIdentifier(name) || ts.isStringLiteral(name) ? name.text : void 0) === "extends") {
|
|
1451
|
+
const value = node.initializer;
|
|
1452
|
+
if (ts.isStringLiteral(value) || ts.isNoSubstitutionTemplateLiteral(value)) values.push(value.text);
|
|
1453
|
+
else if (ts.isArrayLiteralExpression(value)) {
|
|
1454
|
+
for (const element of value.elements) if (ts.isStringLiteral(element) || ts.isNoSubstitutionTemplateLiteral(element)) values.push(element.text);
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
ts.forEachChild(node, visit);
|
|
1459
|
+
};
|
|
1460
|
+
visit(source);
|
|
1461
|
+
return values;
|
|
1462
|
+
}
|
|
1463
|
+
function registersDoctorModule(appRoot, nuxt) {
|
|
1464
|
+
return [.../* @__PURE__ */ new Set([
|
|
1465
|
+
appRoot,
|
|
1466
|
+
...nuxt.appRoots,
|
|
1467
|
+
...nuxt.layers.map((layer) => resolve(appRoot, layer.root))
|
|
1468
|
+
])].some((root) => registersDoctorModuleInConfig(readNuxtConfigText(root).anyFormat));
|
|
1469
|
+
}
|
|
1470
|
+
function registersDoctorModuleInConfig(config) {
|
|
1471
|
+
if (!config) return false;
|
|
1472
|
+
const ts = loadTypeScript();
|
|
1473
|
+
const source = ts.createSourceFile("nuxt.config.ts", config, ts.ScriptTarget.Latest, true);
|
|
1474
|
+
const nodeScopes = /* @__PURE__ */ new WeakMap();
|
|
1475
|
+
const rootScope = {
|
|
1476
|
+
parent: null,
|
|
1477
|
+
bindings: /* @__PURE__ */ new Map()
|
|
1478
|
+
};
|
|
1479
|
+
const scopeNodes = /* @__PURE__ */ new Set([
|
|
1480
|
+
ts.SyntaxKind.SourceFile,
|
|
1481
|
+
ts.SyntaxKind.Block,
|
|
1482
|
+
ts.SyntaxKind.ModuleBlock,
|
|
1483
|
+
ts.SyntaxKind.CatchClause
|
|
1484
|
+
]);
|
|
1485
|
+
const collectScopes = (node, scope) => {
|
|
1486
|
+
const current = scopeNodes.has(node.kind) && node !== source ? {
|
|
1487
|
+
parent: scope,
|
|
1488
|
+
bindings: /* @__PURE__ */ new Map()
|
|
1489
|
+
} : scope;
|
|
1490
|
+
nodeScopes.set(node, current);
|
|
1491
|
+
if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer) current.bindings.set(node.name.text, node.initializer);
|
|
1492
|
+
ts.forEachChild(node, (child) => collectScopes(child, current));
|
|
1493
|
+
};
|
|
1494
|
+
collectScopes(source, rootScope);
|
|
1495
|
+
const resolve = (name, scope) => {
|
|
1496
|
+
for (let current = scope; current; current = current.parent) {
|
|
1497
|
+
const binding = current.bindings.get(name);
|
|
1498
|
+
if (binding) return binding;
|
|
1499
|
+
}
|
|
1500
|
+
};
|
|
1501
|
+
const resolving = /* @__PURE__ */ new Set();
|
|
1502
|
+
const hasDoctorModule = (value, scope) => {
|
|
1503
|
+
if (ts.isStringLiteral(value) || ts.isNoSubstitutionTemplateLiteral(value)) return value.text === "vite-doctor/nuxt";
|
|
1504
|
+
if (ts.isIdentifier(value)) {
|
|
1505
|
+
const binding = resolve(value.text, scope);
|
|
1506
|
+
if (!binding || resolving.has(binding)) return false;
|
|
1507
|
+
resolving.add(binding);
|
|
1508
|
+
const found = hasDoctorModule(binding, nodeScopes.get(binding));
|
|
1509
|
+
resolving.delete(binding);
|
|
1510
|
+
return found;
|
|
1511
|
+
}
|
|
1512
|
+
if (ts.isArrayLiteralExpression(value)) return value.elements.some((element) => ts.isSpreadElement(element) ? hasDoctorModule(element.expression, scope) : element.kind !== ts.SyntaxKind.OmittedExpression && hasDoctorModule(element, scope));
|
|
1513
|
+
return false;
|
|
1514
|
+
};
|
|
1515
|
+
const inspectConfig = (value, scope) => {
|
|
1516
|
+
if (ts.isParenthesizedExpression(value) || ts.isAsExpression(value) || ts.isTypeAssertionExpression(value) || ts.isSatisfiesExpression(value)) return inspectConfig(value.expression, scope);
|
|
1517
|
+
if (ts.isIdentifier(value)) {
|
|
1518
|
+
const binding = resolve(value.text, scope);
|
|
1519
|
+
if (!binding || resolving.has(binding)) return false;
|
|
1520
|
+
resolving.add(binding);
|
|
1521
|
+
const found = inspectConfig(binding, nodeScopes.get(binding));
|
|
1522
|
+
resolving.delete(binding);
|
|
1523
|
+
return found;
|
|
1524
|
+
}
|
|
1525
|
+
if (ts.isCallExpression(value)) return value.arguments.some((arg) => inspectConfig(arg, scope));
|
|
1526
|
+
if (ts.isArrowFunction(value) || ts.isFunctionExpression(value)) {
|
|
1527
|
+
if (ts.isBlock(value.body)) return value.body.statements.some((statement) => ts.isReturnStatement(statement) && statement.expression ? inspectConfig(statement.expression, nodeScopes.get(statement)) : false);
|
|
1528
|
+
return inspectConfig(value.body, nodeScopes.get(value.body));
|
|
1529
|
+
}
|
|
1530
|
+
if (!ts.isObjectLiteralExpression(value)) return false;
|
|
1531
|
+
return value.properties.some((property) => {
|
|
1532
|
+
if (ts.isPropertyAssignment(property)) return property.name.getText(source).replace(/["']/g, "") === "modules" ? hasDoctorModule(property.initializer, scope) : false;
|
|
1533
|
+
return ts.isShorthandPropertyAssignment(property) && property.name.text === "modules" ? hasDoctorModule(property.name, nodeScopes.get(property)) : false;
|
|
1534
|
+
});
|
|
1535
|
+
};
|
|
1536
|
+
for (const statement of source.statements) {
|
|
1537
|
+
if (ts.isExportAssignment(statement)) {
|
|
1538
|
+
if (inspectConfig(statement.expression, nodeScopes.get(statement))) return true;
|
|
1539
|
+
continue;
|
|
1540
|
+
}
|
|
1541
|
+
if (ts.isExpressionStatement(statement) && ts.isBinaryExpression(statement.expression) && statement.expression.operatorToken.kind === ts.SyntaxKind.EqualsToken && ts.isPropertyAccessExpression(statement.expression.left) && ts.isIdentifier(statement.expression.left.expression) && statement.expression.left.expression.text === "module" && statement.expression.left.name.text === "exports" && inspectConfig(statement.expression.right, nodeScopes.get(statement))) return true;
|
|
1542
|
+
}
|
|
1543
|
+
return false;
|
|
1544
|
+
}
|
|
1404
1545
|
function readJson(file) {
|
|
1405
1546
|
try {
|
|
1406
1547
|
return JSON.parse(readFileSync(file, "utf8"));
|
|
@@ -2951,19 +3092,6 @@ function ruleKeys(registry, rules, context) {
|
|
|
2951
3092
|
}));
|
|
2952
3093
|
}
|
|
2953
3094
|
//#endregion
|
|
2954
|
-
//#region src/core/internal/lazy-parsers.ts
|
|
2955
|
-
const require = createRequire(import.meta.url);
|
|
2956
|
-
let typescriptESLintParser;
|
|
2957
|
-
let typescript;
|
|
2958
|
-
let vueCompilerSfc;
|
|
2959
|
-
const parseForESLint = (code, options) => (typescriptESLintParser ??= require("@typescript-eslint/parser")).parseForESLint(code, options);
|
|
2960
|
-
function loadTypeScript() {
|
|
2961
|
-
return typescript ??= require("typescript");
|
|
2962
|
-
}
|
|
2963
|
-
function loadVueCompilerSfc() {
|
|
2964
|
-
return vueCompilerSfc ??= require("@vue/compiler-sfc");
|
|
2965
|
-
}
|
|
2966
|
-
//#endregion
|
|
2967
3095
|
//#region src/core/internal/diagnostic-policy.ts
|
|
2968
3096
|
function applyDiagnosticPolicy(input) {
|
|
2969
3097
|
const suppressed = [];
|
|
@@ -7880,4 +8008,4 @@ async function executeDoctorRun(options) {
|
|
|
7880
8008
|
return result;
|
|
7881
8009
|
}
|
|
7882
8010
|
//#endregion
|
|
7883
|
-
export { startTagEnd as A, workspaceFramework as C, TemplateNodeType as D, parseVueScripts as E, templateExpressionReferences as M, walkTemplate as N, findTemplateAttribute as O, getNodeVisitorKeys as P, owningWorkspacePackage as S, parseSfcFile as T,
|
|
8011
|
+
export { startTagEnd as A, workspaceFramework as C, TemplateNodeType as D, parseVueScripts as E, templateExpressionReferences as M, walkTemplate as N, findTemplateAttribute as O, getNodeVisitorKeys as P, owningWorkspacePackage as S, parseSfcFile as T, parseForESLint as _, reportStatus as a, detectWorkspacePackages as b, cleanCache as c, evaluateRuleApplicability as d, projectWorkspacePackages as f, loadVueCompilerSfc as g, loadTypeScript as h, explainRule as i, templateDirectiveBindings as j, findTemplateDirective as k, collectRulePacks as l, detectProject as m, createReport as n, namePattern as o, selectScanFiles as p, createRulesReport as r, cacheStatus as s, runDoctor as t, resolveProjectDoctorConfig as u, findDefaultNuxtModuleDefinition as v, createVueScriptForParsing as w, nuxtInventoryOwner as x, unwrapExpression as y };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { C as workspaceFramework,
|
|
1
|
+
import { C as workspaceFramework, b as detectWorkspacePackages, c as cleanCache, l as collectRulePacks, m as detectProject, s as cacheStatus, t as runDoctor, u as resolveProjectDoctorConfig, x as nuxtInventoryOwner } from "./core-BaWz6Sqw.mjs";
|
|
2
2
|
import { n as defineDoctorExtension } from "./primitives-QDMBsnjd.mjs";
|
|
3
3
|
import { t as doctorInternalDiagnostics } from "./internal-diagnostic-handles-R_2cBQaP.mjs";
|
|
4
4
|
import { t as viteDoctorVersion } from "./version-Qod0rU4x.mjs";
|
|
5
|
-
import { t as packageRulePack } from "./package-
|
|
6
|
-
import { t as viteRulePack } from "./rules-
|
|
7
|
-
import "./rules-
|
|
8
|
-
import { t as typescriptRulePack } from "./rules-
|
|
9
|
-
import "./typescript-
|
|
10
|
-
import { t as shadcnRulePack } from "./shadcn-
|
|
11
|
-
import { t as piniaRulePack } from "./pinia-
|
|
5
|
+
import { t as packageRulePack } from "./package-BeniS7ot.mjs";
|
|
6
|
+
import { t as viteRulePack } from "./rules-Ck0qw9Y-.mjs";
|
|
7
|
+
import "./rules-NPAaR11O.mjs";
|
|
8
|
+
import { t as typescriptRulePack } from "./rules-pThBWNKu.mjs";
|
|
9
|
+
import "./typescript-hosXLQAc.mjs";
|
|
10
|
+
import { t as shadcnRulePack } from "./shadcn-DakNoxOB.mjs";
|
|
11
|
+
import { t as piniaRulePack } from "./pinia-CFZn5ipu.mjs";
|
|
12
12
|
import { readFileSync } from "node:fs";
|
|
13
13
|
import { isAbsolute, join } from "pathe";
|
|
14
14
|
import { pathToFileURL } from "node:url";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as viteDoctorCacheStatus, i as shouldFailDoctorRun, n as hostDoctorExtensions, o as viteDoctorExtensions, r as runViteDoctor, s as viteDoctorRulePacks, t as cleanViteDoctorCache } from "./doctor-
|
|
1
|
+
import { a as viteDoctorCacheStatus, i as shouldFailDoctorRun, n as hostDoctorExtensions, o as viteDoctorExtensions, r as runViteDoctor, s as viteDoctorRulePacks, t as cleanViteDoctorCache } from "./doctor-BZ1dduKq.mjs";
|
|
2
2
|
export { cleanViteDoctorCache, hostDoctorExtensions, runViteDoctor, shouldFailDoctorRun, viteDoctorCacheStatus, viteDoctorExtensions, viteDoctorRulePacks };
|
package/dist/doctor-process.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import module from "node:module";
|
|
2
2
|
//#region src/doctor-process.ts
|
|
3
3
|
module.enableCompileCache();
|
|
4
|
-
const { parseServerOptions, serveDoctorProcess } = await import("./server-
|
|
4
|
+
const { parseServerOptions, serveDoctorProcess } = await import("./server-DWVLUuR_.mjs");
|
|
5
5
|
const server = await serveDoctorProcess(parseServerOptions(process.argv[2]));
|
|
6
6
|
if (server) {
|
|
7
7
|
for (const signal of [
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as evaluateRuleApplicability, m as detectProject } from "./core-BaWz6Sqw.mjs";
|
|
2
2
|
import { t as viteDoctorVersion } from "./version-Qod0rU4x.mjs";
|
|
3
|
-
import { r as runViteDoctor, s as viteDoctorRulePacks } from "./doctor-
|
|
3
|
+
import { r as runViteDoctor, s as viteDoctorRulePacks } from "./doctor-BZ1dduKq.mjs";
|
|
4
4
|
import { relative } from "pathe";
|
|
5
5
|
//#region src/migration.ts
|
|
6
6
|
async function createMigrationReport(root, requestedTargets = []) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as TemplateNodeType, M as templateExpressionReferences, j as templateDirectiveBindings, o as namePattern } from "./core-
|
|
1
|
+
import { D as TemplateNodeType, M as templateExpressionReferences, j as templateDirectiveBindings, o as namePattern } from "./core-BaWz6Sqw.mjs";
|
|
2
2
|
import { d as parseScriptSync, n as autoRegisteredNuxtLayers, r as isNuxtManifestConfigurationCurrent } from "./runtime-graph-gvjT33RA.mjs";
|
|
3
3
|
import { a as codeForRuleId, c as diagnosticForCode, o as defineDoctorDiagnostics, t as createRule } from "./primitives-QDMBsnjd.mjs";
|
|
4
4
|
import { t as doctorInternalDiagnostics } from "./internal-diagnostic-handles-R_2cBQaP.mjs";
|
|
5
|
-
import { i as walkScriptLocal, n as nearestFunctionOrProgram, r as sourceForNode, t as findAncestor } from "./rule-authoring-
|
|
5
|
+
import { i as walkScriptLocal, n as nearestFunctionOrProgram, r as sourceForNode, t as findAncestor } from "./rule-authoring-B-rhkSVN.mjs";
|
|
6
6
|
import { dirname, extname, join, relative, resolve } from "pathe";
|
|
7
7
|
//#region src/rule-packs/nuxt/diagnostics.ts
|
|
8
8
|
const nuxtDiagnosticRegistry = defineDoctorDiagnostics([
|
package/dist/nuxt-cli.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as parseVueScripts, P as getNodeVisitorKeys, T as parseSfcFile,
|
|
1
|
+
import { E as parseVueScripts, P as getNodeVisitorKeys, T as parseSfcFile, _ as parseForESLint, p as selectScanFiles } from "./core-BaWz6Sqw.mjs";
|
|
2
2
|
import { l as parseScript } from "./runtime-graph-gvjT33RA.mjs";
|
|
3
3
|
import { i as defineRulePack, o as defineDoctorDiagnostics, t as createRule } from "./primitives-QDMBsnjd.mjs";
|
|
4
4
|
//#region src/rule-packs/pinia/presets.ts
|
|
@@ -31,7 +31,7 @@ function doctor(options = {}) {
|
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
ran = true;
|
|
34
|
-
const { runSurfaceDoctor } = await import("./plugin-run-
|
|
34
|
+
const { runSurfaceDoctor } = await import("./plugin-run-Q3bXHe8_.mjs");
|
|
35
35
|
const outcome = await runSurfaceDoctor(surfaceRunInput(resolved, options), surfaceExtensions(resolved, options));
|
|
36
36
|
if (outcome.shouldFail && (options.mode ?? "error") === "error") {
|
|
37
37
|
this.error(outcome.report || "Vite Doctor checks failed.");
|
|
@@ -78,7 +78,7 @@ var ServeDoctorRun = class {
|
|
|
78
78
|
const input = surfaceRunInput(config, this.options);
|
|
79
79
|
const extensions = surfaceExtensions(config, this.options);
|
|
80
80
|
try {
|
|
81
|
-
const outcome = canRunInWorker(input, extensions) ? await this.runInWorker(input) : await import("./plugin-run-
|
|
81
|
+
const outcome = canRunInWorker(input, extensions) ? await this.runInWorker(input) : await import("./plugin-run-Q3bXHe8_.mjs").then(({ runSurfaceDoctor }) => runSurfaceDoctor(input, extensions));
|
|
82
82
|
if (!this.cancelled && outcome) this.log(outcome);
|
|
83
83
|
} catch (error) {
|
|
84
84
|
if (this.cancelled) return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as reportStatus, n as createReport } from "./core-
|
|
2
|
-
import { i as shouldFailDoctorRun, r as runViteDoctor } from "./doctor-
|
|
1
|
+
import { a as reportStatus, n as createReport } from "./core-BaWz6Sqw.mjs";
|
|
2
|
+
import { i as shouldFailDoctorRun, r as runViteDoctor } from "./doctor-BZ1dduKq.mjs";
|
|
3
3
|
//#region src/plugin-run.ts
|
|
4
4
|
async function runSurfaceDoctor(input, extensions) {
|
|
5
5
|
const result = await runViteDoctor({
|
package/dist/plugin-worker.mjs
CHANGED
package/dist/plugin.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as doctor } from "./plugin-
|
|
1
|
+
import { t as doctor } from "./plugin-DpSQG2E-.mjs";
|
|
2
2
|
export { doctor };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as noNavigateToInNitro, S as requireEventRuntimeConfigInServer, _ as preferH3WithBase, a as preferServerUtils, b as noV2Imports, c as preferGetRequestIp, d as preferValidatedRouterParams, f as preferValidatedQuery, g as noClientComposablesInServer, h as noBrowserApiInServer, i as noUnguardedAlsEnterWith, l as preferRouteMethodSuffix, n as requireAbsoluteGeneratedPaths, o as requireDefaultHandler, p as preferValidatedBody, r as noModuleScopeResponseCache, s as noHttpErrorMasking, t as nitroRulePack, u as preferAssertMethod, v as preferH3RedirectResponse, w as noUseNuxtAppInNitro, x as noEventRuntimeConfigInServer, y as noRemovedH3Send } from "../../rules-
|
|
2
|
-
import "../../nitro-
|
|
1
|
+
import { C as noNavigateToInNitro, S as requireEventRuntimeConfigInServer, _ as preferH3WithBase, a as preferServerUtils, b as noV2Imports, c as preferGetRequestIp, d as preferValidatedRouterParams, f as preferValidatedQuery, g as noClientComposablesInServer, h as noBrowserApiInServer, i as noUnguardedAlsEnterWith, l as preferRouteMethodSuffix, n as requireAbsoluteGeneratedPaths, o as requireDefaultHandler, p as preferValidatedBody, r as noModuleScopeResponseCache, s as noHttpErrorMasking, t as nitroRulePack, u as preferAssertMethod, v as preferH3RedirectResponse, w as noUseNuxtAppInNitro, x as noEventRuntimeConfigInServer, y as noRemovedH3Send } from "../../rules-BXDsc_vj.mjs";
|
|
2
|
+
import "../../nitro-DUeTKgju.mjs";
|
|
3
3
|
export { nitroRulePack, noBrowserApiInServer, noClientComposablesInServer, noEventRuntimeConfigInServer, noHttpErrorMasking, noModuleScopeResponseCache, noNavigateToInNitro, noRemovedH3Send, noUnguardedAlsEnterWith, noUseNuxtAppInNitro, noV2Imports, preferAssertMethod, preferGetRequestIp, preferH3RedirectResponse, preferH3WithBase, preferRouteMethodSuffix, preferServerUtils, preferValidatedBody, preferValidatedQuery, preferValidatedRouterParams, requireAbsoluteGeneratedPaths, requireDefaultHandler, requireEventRuntimeConfigInServer };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as noNavigateToInNitro, S as requireEventRuntimeConfigInServer, _ as preferH3WithBase, a as preferServerUtils, b as noV2Imports, c as preferGetRequestIp, d as preferValidatedRouterParams, f as preferValidatedQuery, g as noClientComposablesInServer, h as noBrowserApiInServer, i as noUnguardedAlsEnterWith, l as preferRouteMethodSuffix, n as requireAbsoluteGeneratedPaths, o as requireDefaultHandler, p as preferValidatedBody, r as noModuleScopeResponseCache, s as noHttpErrorMasking, t as nitroRulePack, u as preferAssertMethod, v as preferH3RedirectResponse, w as noUseNuxtAppInNitro, x as noEventRuntimeConfigInServer, y as noRemovedH3Send } from "../../rules-
|
|
1
|
+
import { C as noNavigateToInNitro, S as requireEventRuntimeConfigInServer, _ as preferH3WithBase, a as preferServerUtils, b as noV2Imports, c as preferGetRequestIp, d as preferValidatedRouterParams, f as preferValidatedQuery, g as noClientComposablesInServer, h as noBrowserApiInServer, i as noUnguardedAlsEnterWith, l as preferRouteMethodSuffix, n as requireAbsoluteGeneratedPaths, o as requireDefaultHandler, p as preferValidatedBody, r as noModuleScopeResponseCache, s as noHttpErrorMasking, t as nitroRulePack, u as preferAssertMethod, v as preferH3RedirectResponse, w as noUseNuxtAppInNitro, x as noEventRuntimeConfigInServer, y as noRemovedH3Send } from "../../rules-BXDsc_vj.mjs";
|
|
2
2
|
export { nitroRulePack, noBrowserApiInServer, noClientComposablesInServer, noEventRuntimeConfigInServer, noHttpErrorMasking, noModuleScopeResponseCache, noNavigateToInNitro, noRemovedH3Send, noUnguardedAlsEnterWith, noUseNuxtAppInNitro, noV2Imports, preferAssertMethod, preferGetRequestIp, preferH3RedirectResponse, preferH3WithBase, preferRouteMethodSuffix, preferServerUtils, preferValidatedBody, preferValidatedQuery, preferValidatedRouterParams, requireAbsoluteGeneratedPaths, requireDefaultHandler, requireEventRuntimeConfigInServer };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as parseForESLint } from "../../core-BaWz6Sqw.mjs";
|
|
2
2
|
import { d as parseScriptSync, n as autoRegisteredNuxtLayers } from "../../runtime-graph-gvjT33RA.mjs";
|
|
3
3
|
import { i as defineRulePack, n as defineDoctorExtension, t as createRule } from "../../primitives-QDMBsnjd.mjs";
|
|
4
|
-
import { i as walkScriptLocal } from "../../rule-authoring-
|
|
4
|
+
import { i as walkScriptLocal } from "../../rule-authoring-B-rhkSVN.mjs";
|
|
5
5
|
import { n as writeManifest, t as nuxtDoctorModule } from "../../module-CoWauFE9.mjs";
|
|
6
|
-
import { G as diagnostics, r as rootMiddlewareConfiguration, t as isPublicAuthOperation } from "../../no-route-middleware-api-security-
|
|
6
|
+
import { G as diagnostics, r as rootMiddlewareConfiguration, t as isPublicAuthOperation } from "../../no-route-middleware-api-security-EjckFmwh.mjs";
|
|
7
7
|
import { dirname, extname, relative, resolve } from "pathe";
|
|
8
8
|
//#region src/rule-packs/nuxt/review/authorization.ts
|
|
9
9
|
const ruleId = "nuxt/review/api-authorization-coverage";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { D as TemplateNodeType, N as walkTemplate, O as findTemplateAttribute,
|
|
1
|
+
import { D as TemplateNodeType, N as walkTemplate, O as findTemplateAttribute, _ as parseForESLint, g as loadVueCompilerSfc, k as findTemplateDirective, o as namePattern, v as findDefaultNuxtModuleDefinition, w as createVueScriptForParsing, y as unwrapExpression$3 } from "../../../core-BaWz6Sqw.mjs";
|
|
2
2
|
import { i as defineRulePack, n as defineDoctorExtension, t as createRule } from "../../../primitives-QDMBsnjd.mjs";
|
|
3
|
-
import { i as walkScriptLocal, n as nearestFunctionOrProgram, r as sourceForNode, t as findAncestor } from "../../../rule-authoring-
|
|
4
|
-
import { t as vueRulePack } from "../../../rules-
|
|
5
|
-
import { m as routeMethodSuffix, t as nitroRulePack } from "../../../rules-
|
|
6
|
-
import "../../../nitro-
|
|
7
|
-
import { A as isTopLevelVueScriptSetupCall, B as isGeneratedFile, C as isInsideExportedFunction, D as isReusableDataComposableContext, E as isRenderedTemplateName, F as classifyNuxtFile, G as diagnostics, H as isRuntimeAppFile, I as isConfigBuildFile, L as isContentDocsFile, M as findStatementBinding, N as patternNames$2, O as isSourceOnlyExecutionEvidence, P as NUXT_APP_DIRS, R as isExplicitPlugin, S as isClientOnlyPath, T as isPayloadSerializedEvidence, U as isServerRuntimeFile, V as isNuxtRuntimeFile, W as toPosixPath, _ as report, a as BROWSER_SIDE_EFFECTS, b as classifyExecutionEvidence, c as hasPriorServerReturnGuard, d as isNewDate, f as isObjectPropertyKey, g as replacementForBrowserGlobal, h as isVueUseBrowserGlobalTarget, i as BROWSER_GLOBALS, j as findFunctionVar, k as isSsrExecutedEvidence, l as includeTrailingNewline, m as isStableKeyNode, n as noRouteMiddlewareApiSecurity, o as NUXT_AUTO_IMPORTS, p as isObviouslyUnstableKeyNode, s as hasPriorAwaitInSameExecutionScope, u as isKnownGuardedBrowserGlobal, v as resolveLocalCalleeName, w as isLikelyRenderedTimeExpression, x as isClientCallableEvidence, y as simpleTagRenameFix, z as isExplicitlyScannedByNuxt } from "../../../no-route-middleware-api-security-
|
|
3
|
+
import { i as walkScriptLocal, n as nearestFunctionOrProgram, r as sourceForNode, t as findAncestor } from "../../../rule-authoring-B-rhkSVN.mjs";
|
|
4
|
+
import { t as vueRulePack } from "../../../rules-D2b-8SNT.mjs";
|
|
5
|
+
import { m as routeMethodSuffix, t as nitroRulePack } from "../../../rules-BXDsc_vj.mjs";
|
|
6
|
+
import "../../../nitro-DUeTKgju.mjs";
|
|
7
|
+
import { A as isTopLevelVueScriptSetupCall, B as isGeneratedFile, C as isInsideExportedFunction, D as isReusableDataComposableContext, E as isRenderedTemplateName, F as classifyNuxtFile, G as diagnostics, H as isRuntimeAppFile, I as isConfigBuildFile, L as isContentDocsFile, M as findStatementBinding, N as patternNames$2, O as isSourceOnlyExecutionEvidence, P as NUXT_APP_DIRS, R as isExplicitPlugin, S as isClientOnlyPath, T as isPayloadSerializedEvidence, U as isServerRuntimeFile, V as isNuxtRuntimeFile, W as toPosixPath, _ as report, a as BROWSER_SIDE_EFFECTS, b as classifyExecutionEvidence, c as hasPriorServerReturnGuard, d as isNewDate, f as isObjectPropertyKey, g as replacementForBrowserGlobal, h as isVueUseBrowserGlobalTarget, i as BROWSER_GLOBALS, j as findFunctionVar, k as isSsrExecutedEvidence, l as includeTrailingNewline, m as isStableKeyNode, n as noRouteMiddlewareApiSecurity, o as NUXT_AUTO_IMPORTS, p as isObviouslyUnstableKeyNode, s as hasPriorAwaitInSameExecutionScope, u as isKnownGuardedBrowserGlobal, v as resolveLocalCalleeName, w as isLikelyRenderedTimeExpression, x as isClientCallableEvidence, y as simpleTagRenameFix, z as isExplicitlyScannedByNuxt } from "../../../no-route-middleware-api-security-EjckFmwh.mjs";
|
|
8
8
|
import { basename, dirname, extname, isAbsolute, join, relative, resolve } from "pathe";
|
|
9
9
|
import { parseSync } from "oxc-parser";
|
|
10
10
|
//#region src/rule-packs/nuxt/rules/nuxt/no-explicit-auto-import.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as noRequiredOptionalPeer, r as noPhantomDependencies, t as packageRulePack } from "../../package-
|
|
1
|
+
import { n as noRequiredOptionalPeer, r as noPhantomDependencies, t as packageRulePack } from "../../package-BeniS7ot.mjs";
|
|
2
2
|
export { noPhantomDependencies, noRequiredOptionalPeer, packageRulePack };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as diagnostics, i as storeNameMatchesId, n as piniaRules, o as piniaDiagnosticRegistry, r as uniqueStoreId, t as piniaRulePack } from "../../pinia-
|
|
1
|
+
import { a as diagnostics, i as storeNameMatchesId, n as piniaRules, o as piniaDiagnosticRegistry, r as uniqueStoreId, t as piniaRulePack } from "../../pinia-CFZn5ipu.mjs";
|
|
2
2
|
export { piniaRulePack as default, piniaRulePack, diagnostics, piniaDiagnosticRegistry, piniaRules, storeNameMatchesId, uniqueStoreId };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as noRestyle, c as shadcnRules, i as noRawColors, l as diagnostics, n as noArbitraryValues, o as noUnknownClasses, r as noInlineStyles, s as requireStaticClasses, t as shadcnRulePack, u as shadcnDiagnosticRegistry } from "../../shadcn-
|
|
1
|
+
import { a as noRestyle, c as shadcnRules, i as noRawColors, l as diagnostics, n as noArbitraryValues, o as noUnknownClasses, r as noInlineStyles, s as requireStaticClasses, t as shadcnRulePack, u as shadcnDiagnosticRegistry } from "../../shadcn-DakNoxOB.mjs";
|
|
2
2
|
export { shadcnRulePack as default, shadcnRulePack, diagnostics, noArbitraryValues, noInlineStyles, noRawColors, noRestyle, noUnknownClasses, requireStaticClasses, shadcnDiagnosticRegistry, shadcnRules };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as noRuntimeTypeof, c as noConditionalEmptyObjectSpread, d as noReduceAccumulatorCopy, f as noWidenThenAssert, i as noUnknownTypeAliases, l as noChainedTypeAssertions, m as noArrayFilterMap, n as requireSafetyCommentForTypeAssertion, o as noObjectParameters, p as noKnownValueWidening, r as noUnvalidatedDeserialization, s as noCrossRealmWebInstanceof, t as typescriptRulePack, u as noCallerChosenResultType } from "../../rules-
|
|
2
|
-
import "../../typescript-
|
|
1
|
+
import { a as noRuntimeTypeof, c as noConditionalEmptyObjectSpread, d as noReduceAccumulatorCopy, f as noWidenThenAssert, i as noUnknownTypeAliases, l as noChainedTypeAssertions, m as noArrayFilterMap, n as requireSafetyCommentForTypeAssertion, o as noObjectParameters, p as noKnownValueWidening, r as noUnvalidatedDeserialization, s as noCrossRealmWebInstanceof, t as typescriptRulePack, u as noCallerChosenResultType } from "../../rules-pThBWNKu.mjs";
|
|
2
|
+
import "../../typescript-hosXLQAc.mjs";
|
|
3
3
|
export { noArrayFilterMap, noCallerChosenResultType, noChainedTypeAssertions, noConditionalEmptyObjectSpread, noCrossRealmWebInstanceof, noKnownValueWidening, noObjectParameters, noReduceAccumulatorCopy, noRuntimeTypeof, noUnknownTypeAliases, noUnvalidatedDeserialization, noWidenThenAssert, requireSafetyCommentForTypeAssertion, typescriptRulePack };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as noRuntimeTypeof, c as noConditionalEmptyObjectSpread, d as noReduceAccumulatorCopy, f as noWidenThenAssert, i as noUnknownTypeAliases, l as noChainedTypeAssertions, m as noArrayFilterMap, n as requireSafetyCommentForTypeAssertion, o as noObjectParameters, p as noKnownValueWidening, r as noUnvalidatedDeserialization, s as noCrossRealmWebInstanceof, t as typescriptRulePack, u as noCallerChosenResultType } from "../../../rules-
|
|
1
|
+
import { a as noRuntimeTypeof, c as noConditionalEmptyObjectSpread, d as noReduceAccumulatorCopy, f as noWidenThenAssert, i as noUnknownTypeAliases, l as noChainedTypeAssertions, m as noArrayFilterMap, n as requireSafetyCommentForTypeAssertion, o as noObjectParameters, p as noKnownValueWidening, r as noUnvalidatedDeserialization, s as noCrossRealmWebInstanceof, t as typescriptRulePack, u as noCallerChosenResultType } from "../../../rules-pThBWNKu.mjs";
|
|
2
2
|
export { typescriptRulePack as default, noArrayFilterMap, noCallerChosenResultType, noChainedTypeAssertions, noConditionalEmptyObjectSpread, noCrossRealmWebInstanceof, noKnownValueWidening, noObjectParameters, noReduceAccumulatorCopy, noRuntimeTypeof, noUnknownTypeAliases, noUnvalidatedDeserialization, noWidenThenAssert, requireSafetyCommentForTypeAssertion };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as noUntypedEnv, D as noUntypedDefine, E as noSecretDefine, O as noUnusedDefine, S as noEmptyEnvPrefix, T as noRuntimeObjectDefine, _ as noDynamicNewUrl, a as noUrlPathnameAsFsPath, b as noBroadEnvPrefix, c as noBroadFsAllow, d as noBarrelFiles, f as requireStaticGlobPattern, g as requireWorkerUrlPattern, h as noNodeApiInWorker, i as requirePluginName, l as noDisabledFsStrict, m as noDynamicWorkerUrl, n as preferTransformFilter, o as noLossySetCookieBridge, p as noBrowserGlobalInSsrEntry, r as requireDisposeForSideEffects, s as noConfigHookArrayEcho, t as viteRulePack, u as pluginPackageNamingConventions, v as noPublicSrcImport, w as preferDirectImportMetaEnvAccess, x as noClientSecretPattern, y as noSrcAbsolutePublicUrl } from "../../rules-
|
|
1
|
+
import { C as noUntypedEnv, D as noUntypedDefine, E as noSecretDefine, O as noUnusedDefine, S as noEmptyEnvPrefix, T as noRuntimeObjectDefine, _ as noDynamicNewUrl, a as noUrlPathnameAsFsPath, b as noBroadEnvPrefix, c as noBroadFsAllow, d as noBarrelFiles, f as requireStaticGlobPattern, g as requireWorkerUrlPattern, h as noNodeApiInWorker, i as requirePluginName, l as noDisabledFsStrict, m as noDynamicWorkerUrl, n as preferTransformFilter, o as noLossySetCookieBridge, p as noBrowserGlobalInSsrEntry, r as requireDisposeForSideEffects, s as noConfigHookArrayEcho, t as viteRulePack, u as pluginPackageNamingConventions, v as noPublicSrcImport, w as preferDirectImportMetaEnvAccess, x as noClientSecretPattern, y as noSrcAbsolutePublicUrl } from "../../rules-Ck0qw9Y-.mjs";
|
|
2
2
|
export { noBarrelFiles, noBroadEnvPrefix, noBroadFsAllow, noBrowserGlobalInSsrEntry, noClientSecretPattern, noConfigHookArrayEcho, noDisabledFsStrict, noDynamicNewUrl, noDynamicWorkerUrl, noEmptyEnvPrefix, noLossySetCookieBridge, noNodeApiInWorker, noPublicSrcImport, noRuntimeObjectDefine, noSecretDefine, noSrcAbsolutePublicUrl, noUntypedDefine, noUntypedEnv, noUnusedDefine, noUrlPathnameAsFsPath, pluginPackageNamingConventions, preferDirectImportMetaEnvAccess, preferTransformFilter, requireDisposeForSideEffects, requirePluginName, requireStaticGlobPattern, requireWorkerUrlPattern, viteRulePack };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as noUntypedEnv, D as noUntypedDefine, E as noSecretDefine, O as noUnusedDefine, S as noEmptyEnvPrefix, T as noRuntimeObjectDefine, _ as noDynamicNewUrl, a as noUrlPathnameAsFsPath, b as noBroadEnvPrefix, c as noBroadFsAllow, d as noBarrelFiles, f as requireStaticGlobPattern, g as requireWorkerUrlPattern, h as noNodeApiInWorker, i as requirePluginName, l as noDisabledFsStrict, m as noDynamicWorkerUrl, n as preferTransformFilter, o as noLossySetCookieBridge, p as noBrowserGlobalInSsrEntry, r as requireDisposeForSideEffects, s as noConfigHookArrayEcho, t as viteRulePack, u as pluginPackageNamingConventions, v as noPublicSrcImport, w as preferDirectImportMetaEnvAccess, x as noClientSecretPattern, y as noSrcAbsolutePublicUrl } from "../../../rules-
|
|
1
|
+
import { C as noUntypedEnv, D as noUntypedDefine, E as noSecretDefine, O as noUnusedDefine, S as noEmptyEnvPrefix, T as noRuntimeObjectDefine, _ as noDynamicNewUrl, a as noUrlPathnameAsFsPath, b as noBroadEnvPrefix, c as noBroadFsAllow, d as noBarrelFiles, f as requireStaticGlobPattern, g as requireWorkerUrlPattern, h as noNodeApiInWorker, i as requirePluginName, l as noDisabledFsStrict, m as noDynamicWorkerUrl, n as preferTransformFilter, o as noLossySetCookieBridge, p as noBrowserGlobalInSsrEntry, r as requireDisposeForSideEffects, s as noConfigHookArrayEcho, t as viteRulePack, u as pluginPackageNamingConventions, v as noPublicSrcImport, w as preferDirectImportMetaEnvAccess, x as noClientSecretPattern, y as noSrcAbsolutePublicUrl } from "../../../rules-Ck0qw9Y-.mjs";
|
|
2
2
|
export { viteRulePack as default, noBarrelFiles, noBroadEnvPrefix, noBroadFsAllow, noBrowserGlobalInSsrEntry, noClientSecretPattern, noConfigHookArrayEcho, noDisabledFsStrict, noDynamicNewUrl, noDynamicWorkerUrl, noEmptyEnvPrefix, noLossySetCookieBridge, noNodeApiInWorker, noPublicSrcImport, noRuntimeObjectDefine, noSecretDefine, noSrcAbsolutePublicUrl, noUntypedDefine, noUntypedEnv, noUnusedDefine, noUrlPathnameAsFsPath, pluginPackageNamingConventions, preferDirectImportMetaEnvAccess, preferTransformFilter, requireDisposeForSideEffects, requirePluginName, requireStaticGlobPattern, requireWorkerUrlPattern };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as requirePostFlushForDomWatch, B as noRefAsOperand, C as preferDefineModel, D as requireLifecycleCleanup, E as preferUseIdForStableIds, F as noBrowserApiInSetup, I as preferTrueAttributeShorthand, L as preferUseTemplateRef, M as noAsyncWatchEffectAfterAwaitRead, N as noSetupPropsDestructure, O as noMutationInOnUpdated, P as restrictVHtml, R as htmlButtonHasType, S as preferPropsDestructureDefaults, T as noRandomOrLocalTimeRender, V as definePropsWatchGetter, _ as maxProps, a as noRequiredPropWithDefault, b as preferComposableRefReturn, c as noComputedSideEffects, d as noUnpassedProps, f as noPropRelay, g as noUnusedProps, h as noIndexKeyOnStatefulList, i as noWatchUseAttrs, j as requireWatcherCleanup, k as preferUseEventListener, l as noMutatingProps, m as noUnusedTranslations, n as preferComputedOverWatchAssign, o as noDuplicateAttrInheritance, p as noUntranslatedText, r as noReactiveDestructure, s as noVIfWithVFor, t as vueRulePack, u as preferStableListProps, v as requireUsePrefix, w as dataAllowMismatchSurgical, x as preferTypeProps, y as preferSameNamePropShorthand, z as noOnWatcherCleanupAfterAwait } from "../../rules-
|
|
1
|
+
import { A as requirePostFlushForDomWatch, B as noRefAsOperand, C as preferDefineModel, D as requireLifecycleCleanup, E as preferUseIdForStableIds, F as noBrowserApiInSetup, I as preferTrueAttributeShorthand, L as preferUseTemplateRef, M as noAsyncWatchEffectAfterAwaitRead, N as noSetupPropsDestructure, O as noMutationInOnUpdated, P as restrictVHtml, R as htmlButtonHasType, S as preferPropsDestructureDefaults, T as noRandomOrLocalTimeRender, V as definePropsWatchGetter, _ as maxProps, a as noRequiredPropWithDefault, b as preferComposableRefReturn, c as noComputedSideEffects, d as noUnpassedProps, f as noPropRelay, g as noUnusedProps, h as noIndexKeyOnStatefulList, i as noWatchUseAttrs, j as requireWatcherCleanup, k as preferUseEventListener, l as noMutatingProps, m as noUnusedTranslations, n as preferComputedOverWatchAssign, o as noDuplicateAttrInheritance, p as noUntranslatedText, r as noReactiveDestructure, s as noVIfWithVFor, t as vueRulePack, u as preferStableListProps, v as requireUsePrefix, w as dataAllowMismatchSurgical, x as preferTypeProps, y as preferSameNamePropShorthand, z as noOnWatcherCleanupAfterAwait } from "../../rules-D2b-8SNT.mjs";
|
|
2
2
|
export { dataAllowMismatchSurgical, definePropsWatchGetter, htmlButtonHasType, maxProps, noAsyncWatchEffectAfterAwaitRead, noBrowserApiInSetup, noComputedSideEffects, noDuplicateAttrInheritance, noIndexKeyOnStatefulList, noMutatingProps, noMutationInOnUpdated, noOnWatcherCleanupAfterAwait, noPropRelay, noRandomOrLocalTimeRender, noReactiveDestructure, noRefAsOperand, noRequiredPropWithDefault, noSetupPropsDestructure, noUnpassedProps, noUntranslatedText, noUnusedProps, noUnusedTranslations, noVIfWithVFor, noWatchUseAttrs, preferComposableRefReturn, preferComputedOverWatchAssign, preferDefineModel, preferPropsDestructureDefaults, preferSameNamePropShorthand, preferStableListProps, preferTrueAttributeShorthand, preferTypeProps, preferUseEventListener, preferUseIdForStableIds, preferUseTemplateRef, requireLifecycleCleanup, requirePostFlushForDomWatch, requireUsePrefix, requireWatcherCleanup, restrictVHtml, vueRulePack };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as requirePostFlushForDomWatch, B as noRefAsOperand, C as preferDefineModel, D as requireLifecycleCleanup, E as preferUseIdForStableIds, F as noBrowserApiInSetup, I as preferTrueAttributeShorthand, L as preferUseTemplateRef, M as noAsyncWatchEffectAfterAwaitRead, N as noSetupPropsDestructure, O as noMutationInOnUpdated, P as restrictVHtml, R as htmlButtonHasType, S as preferPropsDestructureDefaults, T as noRandomOrLocalTimeRender, V as definePropsWatchGetter, _ as maxProps, a as noRequiredPropWithDefault, b as preferComposableRefReturn, c as noComputedSideEffects, d as noUnpassedProps, f as noPropRelay, g as noUnusedProps, h as noIndexKeyOnStatefulList, i as noWatchUseAttrs, j as requireWatcherCleanup, k as preferUseEventListener, l as noMutatingProps, m as noUnusedTranslations, n as preferComputedOverWatchAssign, o as noDuplicateAttrInheritance, p as noUntranslatedText, r as noReactiveDestructure, s as noVIfWithVFor, t as vueRulePack, u as preferStableListProps, v as requireUsePrefix, w as dataAllowMismatchSurgical, x as preferTypeProps, y as preferSameNamePropShorthand, z as noOnWatcherCleanupAfterAwait } from "../../rules-
|
|
1
|
+
import { A as requirePostFlushForDomWatch, B as noRefAsOperand, C as preferDefineModel, D as requireLifecycleCleanup, E as preferUseIdForStableIds, F as noBrowserApiInSetup, I as preferTrueAttributeShorthand, L as preferUseTemplateRef, M as noAsyncWatchEffectAfterAwaitRead, N as noSetupPropsDestructure, O as noMutationInOnUpdated, P as restrictVHtml, R as htmlButtonHasType, S as preferPropsDestructureDefaults, T as noRandomOrLocalTimeRender, V as definePropsWatchGetter, _ as maxProps, a as noRequiredPropWithDefault, b as preferComposableRefReturn, c as noComputedSideEffects, d as noUnpassedProps, f as noPropRelay, g as noUnusedProps, h as noIndexKeyOnStatefulList, i as noWatchUseAttrs, j as requireWatcherCleanup, k as preferUseEventListener, l as noMutatingProps, m as noUnusedTranslations, n as preferComputedOverWatchAssign, o as noDuplicateAttrInheritance, p as noUntranslatedText, r as noReactiveDestructure, s as noVIfWithVFor, t as vueRulePack, u as preferStableListProps, v as requireUsePrefix, w as dataAllowMismatchSurgical, x as preferTypeProps, y as preferSameNamePropShorthand, z as noOnWatcherCleanupAfterAwait } from "../../rules-D2b-8SNT.mjs";
|
|
2
2
|
export { dataAllowMismatchSurgical, definePropsWatchGetter, htmlButtonHasType, maxProps, noAsyncWatchEffectAfterAwaitRead, noBrowserApiInSetup, noComputedSideEffects, noDuplicateAttrInheritance, noIndexKeyOnStatefulList, noMutatingProps, noMutationInOnUpdated, noOnWatcherCleanupAfterAwait, noPropRelay, noRandomOrLocalTimeRender, noReactiveDestructure, noRefAsOperand, noRequiredPropWithDefault, noSetupPropsDestructure, noUnpassedProps, noUntranslatedText, noUnusedProps, noUnusedTranslations, noVIfWithVFor, noWatchUseAttrs, preferComposableRefReturn, preferComputedOverWatchAssign, preferDefineModel, preferPropsDestructureDefaults, preferSameNamePropShorthand, preferStableListProps, preferTrueAttributeShorthand, preferTypeProps, preferUseEventListener, preferUseIdForStableIds, preferUseTemplateRef, requireLifecycleCleanup, requirePostFlushForDomWatch, requireUsePrefix, requireWatcherCleanup, restrictVHtml, vueRulePack };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as getNodeVisitorKeys, S as owningWorkspacePackage,
|
|
1
|
+
import { P as getNodeVisitorKeys, S as owningWorkspacePackage, _ as parseForESLint, f as projectWorkspacePackages, w as createVueScriptForParsing } from "./core-BaWz6Sqw.mjs";
|
|
2
2
|
import { a as codeForRuleId, c as diagnosticForCode, i as defineRulePack, o as defineDoctorDiagnostics, t as createRule } from "./primitives-QDMBsnjd.mjs";
|
|
3
3
|
import { t as doctorInternalDiagnostics } from "./internal-diagnostic-handles-R_2cBQaP.mjs";
|
|
4
|
-
import { i as walkScriptLocal, n as nearestFunctionOrProgram, r as sourceForNode } from "./rule-authoring-
|
|
4
|
+
import { i as walkScriptLocal, n as nearestFunctionOrProgram, r as sourceForNode } from "./rule-authoring-B-rhkSVN.mjs";
|
|
5
5
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "pathe";
|
|
6
6
|
import { parseSync } from "oxc-parser";
|
|
7
7
|
//#region src/rule-packs/nitro/diagnostics.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as parseForESLint, h as loadTypeScript, w as createVueScriptForParsing } from "./core-BaWz6Sqw.mjs";
|
|
2
2
|
import { l as parseScript } from "./runtime-graph-gvjT33RA.mjs";
|
|
3
3
|
import { i as defineRulePack, o as defineDoctorDiagnostics, t as createRule } from "./primitives-QDMBsnjd.mjs";
|
|
4
|
-
import { i as walkScriptLocal } from "./rule-authoring-
|
|
4
|
+
import { i as walkScriptLocal } from "./rule-authoring-B-rhkSVN.mjs";
|
|
5
5
|
import { createRequire, isBuiltin } from "node:module";
|
|
6
6
|
import { basename, dirname, extname, join, relative, resolve } from "pathe";
|
|
7
7
|
import { parseSync } from "oxc-parser";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as startTagEnd, D as TemplateNodeType, M as templateExpressionReferences, N as walkTemplate, O as findTemplateAttribute,
|
|
1
|
+
import { A as startTagEnd, D as TemplateNodeType, M as templateExpressionReferences, N as walkTemplate, O as findTemplateAttribute, _ as parseForESLint, g as loadVueCompilerSfc, h as loadTypeScript, k as findTemplateDirective, o as namePattern, w as createVueScriptForParsing } from "./core-BaWz6Sqw.mjs";
|
|
2
2
|
import { d as parseScriptSync } from "./runtime-graph-gvjT33RA.mjs";
|
|
3
3
|
import { a as codeForRuleId, c as diagnosticForCode, i as defineRulePack, o as defineDoctorDiagnostics, t as createRule } from "./primitives-QDMBsnjd.mjs";
|
|
4
4
|
import { t as doctorInternalDiagnostics } from "./internal-diagnostic-handles-R_2cBQaP.mjs";
|
|
5
|
-
import "./rule-authoring-
|
|
5
|
+
import "./rule-authoring-B-rhkSVN.mjs";
|
|
6
6
|
import { dirname, join, relative, resolve } from "pathe";
|
|
7
7
|
//#region src/rule-packs/vue/diagnostics.ts
|
|
8
8
|
const vueDiagnosticRegistry = defineDoctorDiagnostics([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as getNodeVisitorKeys } from "./core-
|
|
1
|
+
import { P as getNodeVisitorKeys } from "./core-BaWz6Sqw.mjs";
|
|
2
2
|
import { a as codeForRuleId, c as diagnosticForCode, i as defineRulePack, o as defineDoctorDiagnostics, t as createRule } from "./primitives-QDMBsnjd.mjs";
|
|
3
3
|
import { t as doctorInternalDiagnostics } from "./internal-diagnostic-handles-R_2cBQaP.mjs";
|
|
4
4
|
//#region src/rule-packs/typescript/diagnostics.ts
|
package/dist/rules.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as noUntypedEnv, D as noUntypedDefine, E as noSecretDefine, O as noUnusedDefine, S as noEmptyEnvPrefix, T as noRuntimeObjectDefine, _ as noDynamicNewUrl, a as noUrlPathnameAsFsPath, b as noBroadEnvPrefix, c as noBroadFsAllow, d as noBarrelFiles, f as requireStaticGlobPattern, g as requireWorkerUrlPattern, h as noNodeApiInWorker, i as requirePluginName, l as noDisabledFsStrict, m as noDynamicWorkerUrl, n as preferTransformFilter, o as noLossySetCookieBridge, p as noBrowserGlobalInSsrEntry, r as requireDisposeForSideEffects, s as noConfigHookArrayEcho, t as viteRulePack, u as pluginPackageNamingConventions, v as noPublicSrcImport, w as preferDirectImportMetaEnvAccess, x as noClientSecretPattern, y as noSrcAbsolutePublicUrl } from "./rules-
|
|
2
|
-
import "./rules-
|
|
1
|
+
import { C as noUntypedEnv, D as noUntypedDefine, E as noSecretDefine, O as noUnusedDefine, S as noEmptyEnvPrefix, T as noRuntimeObjectDefine, _ as noDynamicNewUrl, a as noUrlPathnameAsFsPath, b as noBroadEnvPrefix, c as noBroadFsAllow, d as noBarrelFiles, f as requireStaticGlobPattern, g as requireWorkerUrlPattern, h as noNodeApiInWorker, i as requirePluginName, l as noDisabledFsStrict, m as noDynamicWorkerUrl, n as preferTransformFilter, o as noLossySetCookieBridge, p as noBrowserGlobalInSsrEntry, r as requireDisposeForSideEffects, s as noConfigHookArrayEcho, t as viteRulePack, u as pluginPackageNamingConventions, v as noPublicSrcImport, w as preferDirectImportMetaEnvAccess, x as noClientSecretPattern, y as noSrcAbsolutePublicUrl } from "./rules-Ck0qw9Y-.mjs";
|
|
2
|
+
import "./rules-NPAaR11O.mjs";
|
|
3
3
|
export { noBarrelFiles, noBroadEnvPrefix, noBroadFsAllow, noBrowserGlobalInSsrEntry, noClientSecretPattern, noConfigHookArrayEcho, noDisabledFsStrict, noDynamicNewUrl, noDynamicWorkerUrl, noEmptyEnvPrefix, noLossySetCookieBridge, noNodeApiInWorker, noPublicSrcImport, noRuntimeObjectDefine, noSecretDefine, noSrcAbsolutePublicUrl, noUntypedDefine, noUntypedEnv, noUnusedDefine, noUrlPathnameAsFsPath, pluginPackageNamingConventions, preferDirectImportMetaEnvAccess, preferTransformFilter, requireDisposeForSideEffects, requirePluginName, requireStaticGlobPattern, requireWorkerUrlPattern, viteRulePack };
|
|
@@ -106,7 +106,7 @@ async function serveDoctorProcess(options) {
|
|
|
106
106
|
}
|
|
107
107
|
clearTimeout(idleTimer);
|
|
108
108
|
await engine.enqueue(async () => {
|
|
109
|
-
const { main } = await import("./cli-main-
|
|
109
|
+
const { main } = await import("./cli-main-Qke7WWOU.mjs");
|
|
110
110
|
const result = await captureRun(request.env, () => main(request.args, request.cwd));
|
|
111
111
|
await reply({
|
|
112
112
|
kind: "output",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./core-
|
|
1
|
+
import "./core-BaWz6Sqw.mjs";
|
|
2
2
|
import { a as codeForRuleId, c as diagnosticForCode, i as defineRulePack, o as defineDoctorDiagnostics, t as createRule } from "./primitives-QDMBsnjd.mjs";
|
|
3
3
|
import { t as doctorInternalDiagnostics } from "./internal-diagnostic-handles-R_2cBQaP.mjs";
|
|
4
4
|
//#region src/rule-packs/shadcn/diagnostics.ts
|
package/dist/testkit.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as detectProject, t as runDoctor } from "./core-BaWz6Sqw.mjs";
|
|
2
2
|
import { i as defineRulePack, n as defineDoctorExtension } from "./primitives-QDMBsnjd.mjs";
|
|
3
3
|
import { existsSync, mkdirSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { dirname, join } from "pathe";
|
|
@@ -36,6 +36,10 @@ also need a reliable exit code.
|
|
|
36
36
|
|
|
37
37
|
The standalone CLI also works for Nuxt one-off runs, CI fallback, or monorepo scans.
|
|
38
38
|
|
|
39
|
+
Never run `pnpm doctor` or `npm doctor` to run Doctor. Both commands run the package manager's own health check, which passes without running Doctor. If the project defines a `doctor` package script, run `pnpm run doctor` or `npm run doctor`. Otherwise run `pnpm vite-doctor .`.
|
|
40
|
+
|
|
41
|
+
In a Nuxt project, a report that names a missing `.nuxt/doctor.manifest.json` ignored the project's `doctor` options. Run `nuxt prepare`, then rerun. Doctor does not need a build.
|
|
42
|
+
|
|
39
43
|
## Workflow
|
|
40
44
|
|
|
41
45
|
1. Use `vite-doctor . --changed --format agent` for uncommitted work. Use `vite-doctor . --since <base-ref> --format agent` for a committed branch or pull request. Run Doctor without either scope flag when Git is unavailable or the user asks for a project audit.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-doctor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Small Vite Doctor CLI for project diagnostics.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -127,8 +127,7 @@
|
|
|
127
127
|
"test:pack": "node scripts/test-packed-cli.mjs",
|
|
128
128
|
"perf": "node scripts/perf-lab/lab.mjs",
|
|
129
129
|
"check": "vp check",
|
|
130
|
-
"
|
|
131
|
-
"doctor": "node dist/cli.mjs . --no-cache --max-warnings 0 --format text",
|
|
130
|
+
"check:doctor": "pnpm build && node dist/cli.mjs . --no-cache --max-warnings 0 --format text",
|
|
132
131
|
"release:check": "vp fmt --check && pnpm build && vp lint && pnpm test && pnpm test:pack"
|
|
133
132
|
}
|
|
134
133
|
}
|
package/dist/nitro-8WdNQ5gx.mjs
DELETED
package/dist/rules-BEpsfGKF.mjs
DELETED