vite-doctor 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{cli-DAyaFyYp.mjs → cli-DHCqRLW8.mjs} +1 -1
- package/dist/{cli-main-CyF0P2ec.mjs → cli-main-D548lrxU.mjs} +8 -8
- package/dist/cli.mjs +1 -1
- package/dist/{core-CaB3tfE8.mjs → core-CdfH68hP.mjs} +25 -1
- package/dist/{doctor-keXSmA0d.mjs → doctor-Br1X-NQS.mjs} +1 -1
- package/dist/{doctor-B_MuQCG9.mjs → doctor-DEtT5cFm.mjs} +14 -9
- package/dist/doctor-process.mjs +1 -1
- package/dist/extension.mjs +1 -1
- package/dist/{index-DEy2t14t.d.mts → index-DeK4RjIq.d.mts} +4 -1
- package/dist/index-qQ8zNbW1.d.mts +1 -0
- package/dist/index.mjs +1 -1
- package/dist/mcp-CuwJbunP.mjs +618 -0
- package/dist/{migration-BKDeSg5K.mjs → migration-CF6Ab3mC.mjs} +2 -2
- package/dist/nitro-DiXZ9rR0.mjs +2 -0
- package/dist/{no-route-middleware-api-security-D8_B1fZx.mjs → no-route-middleware-api-security-CH8Ft6kA.mjs} +7 -3
- package/dist/nuxt-cli.mjs +1 -1
- package/dist/{package-C6h9Qtda.mjs → package-Cfe_95KJ.mjs} +2 -2
- package/dist/{pinia-BOSWuj_L.mjs → pinia-BfGFGwnD.mjs} +3 -3
- package/dist/{plugin-Dd5QxPcQ.mjs → plugin-GXLzDLKo.mjs} +2 -2
- package/dist/plugin-run-C0ImfZuA.mjs +2 -0
- package/dist/{plugin-run-DVWUGgM8.mjs → plugin-run-CJQX3Fx6.mjs} +2 -2
- package/dist/plugin-worker.mjs +1 -1
- package/dist/plugin.mjs +1 -1
- package/dist/{primitives-QDMBsnjd.mjs → primitives-BEgIVHZe.mjs} +1 -0
- package/dist/{rule-authoring-BdNe410l.mjs → rule-authoring-Cw1uII0Z.mjs} +1 -1
- package/dist/rule-packs/mcp/index.d.mts +26 -0
- package/dist/rule-packs/mcp/index.mjs +2 -0
- package/dist/rule-packs/nitro/index.d.mts +3 -3
- package/dist/rule-packs/nitro/index.mjs +3 -3
- package/dist/rule-packs/nitro/rules.d.mts +2 -2
- package/dist/rule-packs/nitro/rules.mjs +2 -2
- package/dist/rule-packs/nuxt/index.mjs +5 -5
- package/dist/rule-packs/nuxt/rules/index.d.mts +2 -2
- package/dist/rule-packs/nuxt/rules/index.mjs +75 -9
- 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.d.mts +2 -2
- package/dist/rule-packs/vue/index.mjs +2 -2
- package/dist/rule-packs/vue/rules.d.mts +2 -2
- package/dist/rule-packs/vue/rules.mjs +2 -2
- package/dist/{rules-NQvZWSQD.d.mts → rules-BPZABrEs.d.mts} +5 -1
- package/dist/{rules-Dg84VwNY.mjs → rules-CBhYLzeQ.mjs} +108 -49
- package/dist/rules-CINO9n9M.mjs +2 -0
- package/dist/{rules-DTXdi7Ka.mjs → rules-Dclea99L.mjs} +66 -6
- package/dist/{rules-DYeVClNx.mjs → rules-Dqeder5U.mjs} +4 -4
- package/dist/{rules-BEz9as7i.mjs → rules-EPw4WBYU.mjs} +2 -2
- package/dist/rules.mjs +2 -2
- package/dist/{script-scope-KkOa4q8R.mjs → script-scope-DBfydrqH.mjs} +1 -1
- package/dist/{server-Ds24tvve.mjs → server-C5mKfTDp.mjs} +1 -1
- package/dist/{shadcn-CpFqGWl3.mjs → shadcn-DTiSVE9a.mjs} +2 -2
- package/dist/testkit.mjs +2 -2
- package/dist/typescript-Cng3iVQn.mjs +2 -0
- package/package.json +2 -1
- package/dist/index-CWqoD7Dt.d.mts +0 -1
- package/dist/nitro-CPo75d0U.mjs +0 -2
- package/dist/plugin-run-CzodTs31.mjs +0 -2
- package/dist/rules-CW8Ec0h7.mjs +0 -2
- package/dist/typescript-DP3Wc7UQ.mjs +0 -2
|
@@ -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-D548lrxU.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 explainRule, n as createReport, r as createRulesReport, s as reportStatus } from "./core-
|
|
1
|
+
import { a as explainRule, n as createReport, r as createRulesReport, s as reportStatus } from "./core-CdfH68hP.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-CF6Ab3mC.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-Br1X-NQS.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-Br1X-NQS.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-Br1X-NQS.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-Br1X-NQS.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-Br1X-NQS.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-Br1X-NQS.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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as resolveNuxtCompatibility, d as parseScriptResult, f as parseScriptSync, i as isNuxtManifestCurrent, l as resolveRuntimeGraph, o as readNuxtConfigGranularCachedData, s as readNuxtConfigSsr, t as applyRuntimeTarget, u as parseScript } from "./runtime-graph-DB9xVYJ4.mjs";
|
|
2
|
-
import { a as codeForRuleId, c as diagnosticForCode, i as defineRulePack, l as doctorDiagnosticsHost, o as defineDoctorDiagnostics, u as DOCTOR_DIAGNOSTICS_DOCS_BASE } from "./primitives-
|
|
2
|
+
import { a as codeForRuleId, c as diagnosticForCode, i as defineRulePack, l as doctorDiagnosticsHost, o as defineDoctorDiagnostics, u as DOCTOR_DIAGNOSTICS_DOCS_BASE } from "./primitives-BEgIVHZe.mjs";
|
|
3
3
|
import { t as doctorInternalDiagnostics } from "./internal-diagnostic-handles-R_2cBQaP.mjs";
|
|
4
4
|
import { t as RuleInputs } from "./rule-inputs-GzH5Uyjz.mjs";
|
|
5
5
|
import { c as nativeMatch$1, d as shellArgument, i as readCacheStatus, l as nodeOffsets, n as cleanCacheDirectory, o as DEFAULT_WEIGHTS, s as VERSION, t as DoctorCache, u as sha256$1 } from "./cache-store-9oluC2IE.mjs";
|
|
@@ -3497,6 +3497,18 @@ const allDoctorDiagnosticRegistry = defineDoctorDiagnostics([
|
|
|
3497
3497
|
code: "PKG0003",
|
|
3498
3498
|
ruleId: "package/no-required-optional-peer"
|
|
3499
3499
|
},
|
|
3500
|
+
{
|
|
3501
|
+
code: "MCP0001",
|
|
3502
|
+
ruleId: "mcp/tools/require-annotation-title"
|
|
3503
|
+
},
|
|
3504
|
+
{
|
|
3505
|
+
code: "MCP0002",
|
|
3506
|
+
ruleId: "mcp/tools/require-safety-hint"
|
|
3507
|
+
},
|
|
3508
|
+
{
|
|
3509
|
+
code: "MCP0003",
|
|
3510
|
+
ruleId: "mcp/tools/valid-name"
|
|
3511
|
+
},
|
|
3500
3512
|
{
|
|
3501
3513
|
code: "PINIA0001",
|
|
3502
3514
|
ruleId: "pinia/stores/unique-store-id"
|
|
@@ -3843,6 +3855,10 @@ const allDoctorDiagnosticRegistry = defineDoctorDiagnostics([
|
|
|
3843
3855
|
code: "VUE0035",
|
|
3844
3856
|
ruleId: "vue/template/no-index-key-on-stateful-list"
|
|
3845
3857
|
},
|
|
3858
|
+
{
|
|
3859
|
+
code: "VUE0041",
|
|
3860
|
+
ruleId: "vue/reactivity/no-constant-computed"
|
|
3861
|
+
},
|
|
3846
3862
|
{
|
|
3847
3863
|
code: "VITE0001",
|
|
3848
3864
|
ruleId: "vite/assets/no-dynamic-new-url"
|
|
@@ -4091,6 +4107,10 @@ const allDoctorDiagnosticRegistry = defineDoctorDiagnostics([
|
|
|
4091
4107
|
code: "NITRO0025",
|
|
4092
4108
|
ruleId: "nitro/config/require-absolute-generated-paths"
|
|
4093
4109
|
},
|
|
4110
|
+
{
|
|
4111
|
+
code: "NITRO0026",
|
|
4112
|
+
ruleId: "nitro/runtime/no-process-env-in-server"
|
|
4113
|
+
},
|
|
4094
4114
|
{
|
|
4095
4115
|
code: "NUXT0001",
|
|
4096
4116
|
ruleId: "docus/appconfig/no-unknown-key"
|
|
@@ -4458,6 +4478,10 @@ const allDoctorDiagnosticRegistry = defineDoctorDiagnostics([
|
|
|
4458
4478
|
{
|
|
4459
4479
|
code: "NUXT0095",
|
|
4460
4480
|
ruleId: "nuxt/fetch/no-ssr-refetch-of-shared-key"
|
|
4481
|
+
},
|
|
4482
|
+
{
|
|
4483
|
+
code: "NUXT0096",
|
|
4484
|
+
ruleId: "nuxt/imports/prefer-alias-over-relative-parent"
|
|
4461
4485
|
}
|
|
4462
4486
|
]);
|
|
4463
4487
|
const allDiagnosticCodesByRuleId = allDoctorDiagnosticRegistry.codesByRuleId;
|
|
@@ -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-DEtT5cFm.mjs";
|
|
2
2
|
export { cleanViteDoctorCache, hostDoctorExtensions, runViteDoctor, shouldFailDoctorRun, viteDoctorCacheStatus, viteDoctorExtensions, viteDoctorRulePacks };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { C as nuxtInventoryOwner, S as detectWorkspacePackages, T as workspaceFramework, _ as detectProject, d as collectRulePacks, f as resolveProjectDoctorConfig, l as cacheStatus, t as runDoctor, u as cleanCache } from "./core-
|
|
2
|
-
import { n as defineDoctorExtension } from "./primitives-
|
|
1
|
+
import { C as nuxtInventoryOwner, S as detectWorkspacePackages, T as workspaceFramework, _ as detectProject, d as collectRulePacks, f as resolveProjectDoctorConfig, l as cacheStatus, t as runDoctor, u as cleanCache } from "./core-CdfH68hP.mjs";
|
|
2
|
+
import { n as defineDoctorExtension } from "./primitives-BEgIVHZe.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-Cfe_95KJ.mjs";
|
|
6
|
+
import { t as viteRulePack } from "./rules-Dqeder5U.mjs";
|
|
7
|
+
import "./rules-CINO9n9M.mjs";
|
|
8
|
+
import { t as typescriptRulePack } from "./rules-EPw4WBYU.mjs";
|
|
9
|
+
import "./typescript-Cng3iVQn.mjs";
|
|
10
|
+
import { t as shadcnRulePack } from "./shadcn-DTiSVE9a.mjs";
|
|
11
|
+
import { t as piniaRulePack } from "./pinia-BfGFGwnD.mjs";
|
|
12
|
+
import { t as mcpRulePack } from "./mcp-CuwJbunP.mjs";
|
|
12
13
|
import { readFileSync } from "node:fs";
|
|
13
14
|
import { isAbsolute, join } from "pathe";
|
|
14
15
|
import { pathToFileURL } from "node:url";
|
|
@@ -43,6 +44,10 @@ async function viteDoctorExtensions(options = {}) {
|
|
|
43
44
|
defineDoctorExtension({
|
|
44
45
|
name: "vite-doctor/builtin-pinia",
|
|
45
46
|
rulePacks: [piniaRulePack]
|
|
47
|
+
}),
|
|
48
|
+
defineDoctorExtension({
|
|
49
|
+
name: "vite-doctor/builtin-mcp",
|
|
50
|
+
rulePacks: [mcpRulePack]
|
|
46
51
|
})
|
|
47
52
|
];
|
|
48
53
|
if (frameworks.has("nuxt")) {
|
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-C5mKfTDp.mjs");
|
|
5
5
|
const server = await serveDoctorProcess(parseServerOptions(process.argv[2]));
|
|
6
6
|
if (server) {
|
|
7
7
|
for (const signal of [
|
package/dist/extension.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as RESERVED_DIAGNOSTIC_CODE_PREFIXES, i as defineRulePack, n as defineDoctorExtension, r as defineDoctorPluginApi, s as defineExtensionDiagnostics, t as createRule } from "./primitives-
|
|
1
|
+
import { d as RESERVED_DIAGNOSTIC_CODE_PREFIXES, i as defineRulePack, n as defineDoctorExtension, r as defineDoctorPluginApi, s as defineExtensionDiagnostics, t as createRule } from "./primitives-BEgIVHZe.mjs";
|
|
2
2
|
export { RESERVED_DIAGNOSTIC_CODE_PREFIXES, createRule, defineExtensionDiagnostics as defineDoctorDiagnostics, defineDoctorExtension, defineDoctorPluginApi, defineRulePack };
|
|
@@ -66,7 +66,10 @@ declare const noModuleScopeResponseCache: DoctorRule;
|
|
|
66
66
|
//#region src/rule-packs/nitro/rules/require-absolute-generated-paths.d.ts
|
|
67
67
|
declare const requireAbsoluteGeneratedPaths: DoctorRule;
|
|
68
68
|
//#endregion
|
|
69
|
+
//#region src/rule-packs/nitro/rules/no-process-env-in-server.d.ts
|
|
70
|
+
declare const noProcessEnvInServer: DoctorRule;
|
|
71
|
+
//#endregion
|
|
69
72
|
//#region src/rule-packs/nitro/rules/index.d.ts
|
|
70
73
|
declare const nitroRulePack: RulePack;
|
|
71
74
|
//#endregion
|
|
72
|
-
export {
|
|
75
|
+
export { noNavigateToInNitro as C, requireEventRuntimeConfigInServer as S, preferH3WithBase as _, noUnguardedAlsEnterWith as a, noV2Imports as b, noHttpErrorMasking as c, preferAssertMethod as d, preferValidatedRouterParams as f, noClientComposablesInServer as g, noBrowserApiInServer as h, noModuleScopeResponseCache as i, preferGetRequestIp as l, preferValidatedBody as m, noProcessEnvInServer as n, preferServerUtils as o, preferValidatedQuery as p, requireAbsoluteGeneratedPaths as r, requireDefaultHandler as s, nitroRulePack as t, preferRouteMethodSuffix as u, preferH3RedirectResponse as v, noUseNuxtAppInNitro as w, noEventRuntimeConfigInServer as x, noRemovedH3Send as y };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index-DeK4RjIq.mjs";
|
package/dist/index.mjs
CHANGED