vite-doctor 0.0.9 → 0.0.10
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/LICENSE +21 -0
- package/README.md +10 -0
- package/dist/cli.mjs +4 -10
- package/dist/{config-BX26IYzh.mjs → config-CaJ0DqB3.mjs} +1 -0
- package/dist/{config-BF-tCiTu.d.mts → config-DWmchdeh.d.mts} +1 -7
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/{core-DLeqgOx5.mjs → core-CztxQ3dO.mjs} +12 -125
- package/dist/diagnostics-DYlg2f-e.d.mts +21 -0
- package/dist/diagnostics-OWBdo3Uc.mjs +102 -0
- package/dist/{doctor-CwNKe5uB.mjs → doctor-DZThqTQg.mjs} +11 -15
- package/dist/extension-DyFj4vXT.d.mts +2 -0
- package/dist/extension.d.mts +4 -0
- package/dist/extension.mjs +2 -0
- package/dist/{index-vpjcMmhA.d.mts → index-BjF8I0Dg.d.mts} +1 -1
- package/dist/{index-Dw9aENZG.d.mts → index-CzHsaAnb.d.mts} +1 -1
- package/dist/{index-BJU56z7q.d.mts → index-DLp2anMW.d.mts} +2 -1
- package/dist/index-Dx-JzQ3s.d.mts +3 -0
- package/dist/index-OV2dDmkX.d.mts +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{module-2_e5b-LZ.d.mts → module-Cm_Da1lK.d.mts} +3 -3
- package/dist/{module-DVHJKJkW.mjs → module-DFUEExm6.mjs} +0 -1
- package/dist/nitro-FnvPw8Up.mjs +2 -0
- package/dist/nuxt.d.mts +1 -1
- package/dist/nuxt.mjs +1 -1
- package/dist/{plugin-BKNEtcVs.d.mts → plugin-B97s20vt.d.mts} +3 -3
- package/dist/{plugin-BCCA3oXP.mjs → plugin-DXJRUrg6.mjs} +3 -2
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.mjs +1 -1
- package/dist/{primitives-3i5qmm5e.d.mts → primitives-8DoGel1u.d.mts} +7 -77
- package/dist/rule-packs/nitro/index.d.mts +2 -2
- package/dist/rule-packs/nitro/index.mjs +2 -2
- package/dist/rule-packs/nitro/rules.d.mts +1 -1
- package/dist/rule-packs/nitro/rules.mjs +1 -1
- package/dist/rule-packs/nuxt/index.d.mts +2 -2
- package/dist/rule-packs/nuxt/index.mjs +1 -1
- package/dist/rule-packs/nuxt/module.d.mts +2 -2
- package/dist/rule-packs/nuxt/module.mjs +1 -1
- package/dist/rule-packs/nuxt/rules/index.d.mts +5 -4
- package/dist/rule-packs/nuxt/rules/index.mjs +2 -2
- package/dist/rule-packs/typescript/index.d.mts +1 -1
- package/dist/rule-packs/typescript/index.mjs +2 -2
- package/dist/rule-packs/typescript/rules/index.d.mts +1 -1
- package/dist/rule-packs/typescript/rules/index.mjs +1 -1
- package/dist/rule-packs/vite/index.d.mts +1 -1
- package/dist/rule-packs/vite/index.mjs +1 -1
- package/dist/rule-packs/vite/rules/index.d.mts +1 -1
- package/dist/rule-packs/vite/rules/index.mjs +1 -1
- package/dist/rule-packs/vue/index.d.mts +1 -1
- package/dist/rule-packs/vue/index.mjs +1 -1
- package/dist/rule-packs/vue/rules.d.mts +1 -1
- package/dist/rule-packs/vue/rules.mjs +1 -1
- package/dist/{rules-D3X57pir.mjs → rules-03OSDgOR.mjs} +2 -1
- package/dist/{rules-BKTr-IUz.mjs → rules-298lNPbq.mjs} +2 -1
- package/dist/{rules-Bq9PexjC.mjs → rules-BfmRH-w3.mjs} +2 -1
- package/dist/{rules-htM7saRv.d.mts → rules-BhptD0Ul.d.mts} +2 -1
- package/dist/{rules-22ICiQaK.mjs → rules-Cg6CMffp.mjs} +5 -4
- package/dist/{rules-Cc1_NZ7P.mjs → rules-D228x7hu.mjs} +2 -1
- package/dist/rules-htE_WDPD.mjs +2 -0
- package/dist/rules.d.mts +1 -1
- package/dist/rules.mjs +2 -2
- package/dist/typescript-etB5nu2i.mjs +2 -0
- package/package.json +6 -3
- package/dist/index-B6nzQEFO.d.mts +0 -3
- package/dist/index-DgRcIdSA.d.mts +0 -1
- package/dist/nitro-aRdLgPkY.mjs +0 -2
- package/dist/rules-BkrZ1R0E.mjs +0 -2
- package/dist/typescript-Br-J4sLq.mjs +0 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 onmax
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -153,6 +153,16 @@ export default defineNuxtConfig({
|
|
|
153
153
|
});
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
+
### Removed run options
|
|
157
|
+
|
|
158
|
+
Remove `coverage`, `runtimeEvidence`, `emitGraph`, `confidenceMin`, and `scoreOnly` from `DoctorRunOptions` objects. These options had no effect on Doctor Runs; their removal is a breaking TypeScript API change. Runtime Evidence contributors, graph reports, diagnostic confidence, and scoring remain supported.
|
|
159
|
+
|
|
160
|
+
## Doctor extensions
|
|
161
|
+
|
|
162
|
+
Library authors can import `createRule`, `defineRulePack`, `defineDoctorExtension`, and
|
|
163
|
+
`defineDoctorDiagnostics` from `vite-doctor/extension`. The same entrypoint exports their
|
|
164
|
+
authoring types.
|
|
165
|
+
|
|
156
166
|
## Development
|
|
157
167
|
|
|
158
168
|
```bash
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as reportStatus,
|
|
3
|
-
import { n as loadDoctorConfig } from "./config-
|
|
4
|
-
import { i as viteDoctorVersion, n as shouldFailDoctorRun, r as viteDoctorRulePacks, t as runViteDoctor } from "./doctor-
|
|
2
|
+
import { a as reportStatus, c as detectProject, i as explainRule, n as createReport, o as cleanCache, r as createRulesReport, s as evaluateRuleApplicability } from "./core-CztxQ3dO.mjs";
|
|
3
|
+
import { n as loadDoctorConfig } from "./config-CaJ0DqB3.mjs";
|
|
4
|
+
import { i as viteDoctorVersion, n as shouldFailDoctorRun, r as viteDoctorRulePacks, t as runViteDoctor } from "./doctor-DZThqTQg.mjs";
|
|
5
5
|
import { relative, resolve } from "pathe";
|
|
6
6
|
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
@@ -41,14 +41,8 @@ async function selectDoctorPresentation(explicitFormat, runtime = currentRuntime
|
|
|
41
41
|
//#region src/core/internal/cli.ts
|
|
42
42
|
function applyDoctorOptions(options, flags) {
|
|
43
43
|
if (flags.changed) options.changed = true;
|
|
44
|
-
if (flags.types) options.types = true;
|
|
45
|
-
options.coverage = stringFlag(flags.coverage) ?? options.coverage;
|
|
46
|
-
options.runtimeEvidence = stringFlag(flags.runtimeEvidence) ?? options.runtimeEvidence;
|
|
47
44
|
options.analyses = stringFlag(flags.analyses) ?? options.analyses;
|
|
48
|
-
if (flags.emitGraph) options.emitGraph = true;
|
|
49
|
-
options.confidenceMin = stringFlag(flags.confidenceMin) ?? options.confidenceMin;
|
|
50
45
|
if (flags.structuralReview) options.structuralReview = true;
|
|
51
|
-
if (flags.types === false) options.types = false;
|
|
52
46
|
if (flags.profile) options.profile = true;
|
|
53
47
|
if (flags.newOnly) options.newOnly = true;
|
|
54
48
|
if (flags.updateBaseline) options.updateBaseline = true;
|
|
@@ -391,7 +385,7 @@ async function main(args = process.argv.slice(2), cwd = process.cwd()) {
|
|
|
391
385
|
}
|
|
392
386
|
}
|
|
393
387
|
function addDoctorRunCommand(cli, cwd, setExitCode) {
|
|
394
|
-
cli.command("[path]", "Run Doctor diagnostics.").option("--changed", "Report diagnostics on changed lines.").option("--
|
|
388
|
+
cli.command("[path]", "Run Doctor diagnostics.").option("--changed", "Report diagnostics on changed lines.").option("--analyses <analyses>", "Comma-separated analyses: dead-code, graph, dupes, or health.").option("--profile", "Include timings.").option("--new-only", "Only report diagnostics absent from the baseline.").option("--cache", "Use the analysis cache.").option("--no-cache", "Disable the analysis cache.").option("--fix", "Apply safe edit plans and verify the result.").option("--unsafe-fix", "Apply unsafe edit plans and verify the result.").option("--max-warnings <count>", "Maximum warnings before failure.").option("--framework <framework>", "Framework override: vite, vue, nitro, or nuxt.").option("--rules <rules>", "Comma-separated Rule selectors.").option("--severity <severity>", "Minimum severity: error, warn, or info.").option("--extends <extends>", "Comma-separated rule-pack presets.").option("--since <ref>", "Report diagnostics on lines changed since a Git ref.").option("--baseline <file>", "Diagnostic baseline file.").option("--format <format>", "Output: text, json, sarif, or agent.").option("--config <path>", "Explicitly load an executable Doctor config.").action(async (path = ".", options) => {
|
|
395
389
|
const format = await presentationFormat(options.format, reportFormats);
|
|
396
390
|
const root = resolve(cwd, path);
|
|
397
391
|
if (!isDirectory(root)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as DoctorReportFormat, m as RuntimeTarget, o as DoctorSerializableConfig, r as DoctorFramework, t as DoctorExtension } from "./primitives-8DoGel1u.mjs";
|
|
2
2
|
//#region src/core/config.d.ts
|
|
3
3
|
interface DoctorConfig extends DoctorSerializableConfig {
|
|
4
4
|
extensions?: DoctorExtension[];
|
|
@@ -17,18 +17,12 @@ interface DoctorRunOptions {
|
|
|
17
17
|
newOnly?: boolean;
|
|
18
18
|
severity?: "error" | "warn" | "info";
|
|
19
19
|
rules?: string;
|
|
20
|
-
types?: boolean;
|
|
21
|
-
coverage?: string;
|
|
22
|
-
runtimeEvidence?: string;
|
|
23
20
|
analyses?: string;
|
|
24
|
-
emitGraph?: boolean;
|
|
25
|
-
confidenceMin?: string;
|
|
26
21
|
structuralReview?: boolean;
|
|
27
22
|
profile?: boolean;
|
|
28
23
|
cache?: boolean;
|
|
29
24
|
fix?: boolean;
|
|
30
25
|
unsafeFix?: boolean;
|
|
31
|
-
scoreOnly?: boolean;
|
|
32
26
|
maxWarnings?: number;
|
|
33
27
|
extensions?: DoctorExtension[];
|
|
34
28
|
runtimeTarget?: RuntimeTarget;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as loadDoctorConfig, i as defineDoctorConfig, n as DoctorRunOptions, r as LoadDoctorConfigOptions, t as DoctorConfig } from "./config-
|
|
1
|
+
import { a as loadDoctorConfig, i as defineDoctorConfig, n as DoctorRunOptions, r as LoadDoctorConfigOptions, t as DoctorConfig } from "./config-DWmchdeh.mjs";
|
|
2
2
|
export { type DoctorConfig, type DoctorRunOptions, type LoadDoctorConfigOptions, defineDoctorConfig, loadDoctorConfig };
|
package/dist/config.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as loadDoctorConfig, t as defineDoctorConfig } from "./config-
|
|
1
|
+
import { n as loadDoctorConfig, t as defineDoctorConfig } from "./config-CaJ0DqB3.mjs";
|
|
2
2
|
export { defineDoctorConfig, loadDoctorConfig };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import "./
|
|
1
|
+
import { c as DOCTOR_DIAGNOSTICS_DOCS_BASE, i as doctorDiagnosticsHost, l as doctorInternalDiagnostics, n as defineDoctorDiagnostics, r as diagnosticForCode, s as defineRulePack, t as codeForRuleId } from "./diagnostics-OWBdo3Uc.mjs";
|
|
2
|
+
import "./config-CaJ0DqB3.mjs";
|
|
2
3
|
import { createRequire } from "node:module";
|
|
3
4
|
import { dirname, join, relative, resolve } from "pathe";
|
|
4
5
|
import { closeSync, existsSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
5
6
|
import { createHash, randomUUID } from "node:crypto";
|
|
6
7
|
import * as oxcParser from "oxc-parser";
|
|
7
8
|
import { parseSync } from "oxc-parser";
|
|
8
|
-
import {
|
|
9
|
+
import { formatDiagnostic } from "nostics";
|
|
9
10
|
import { glob } from "node:fs/promises";
|
|
10
11
|
import { satisfies, valid, validRange } from "semver";
|
|
11
12
|
import { matchesGlob } from "node:path";
|
|
@@ -123,70 +124,6 @@ function sha256$1(input) {
|
|
|
123
124
|
return createHash("sha256").update(input).digest("hex");
|
|
124
125
|
}
|
|
125
126
|
//#endregion
|
|
126
|
-
//#region src/core/internal-diagnostic-handles.ts
|
|
127
|
-
const doctorInternalDiagnostics = defineDiagnostics({ codes: {
|
|
128
|
-
DOC0012: {
|
|
129
|
-
why: (params) => `Duplicate Doctor diagnostic code "${params.code}".`,
|
|
130
|
-
fix: (params) => `Assign a unique Diagnostic Code instead of registering "${params.code}" twice.`
|
|
131
|
-
},
|
|
132
|
-
DOC0013: {
|
|
133
|
-
why: (params) => params.code ? `No Doctor diagnostic handle is registered for rule "${params.ruleId}" and code "${params.code}".` : `No Doctor diagnostic code is registered for rule "${params.ruleId}".`,
|
|
134
|
-
fix: "Register a Diagnostic Code for the rule before it can report diagnostics."
|
|
135
|
-
},
|
|
136
|
-
DOC0014: {
|
|
137
|
-
why: (params) => `Rule "${params.ruleId}" reported a diagnostic without a nostics name/code.`,
|
|
138
|
-
fix: "Report diagnostics through a registered Doctor nostics handle."
|
|
139
|
-
},
|
|
140
|
-
DOC0015: {
|
|
141
|
-
why: (params) => `Rule pack "${params.pack}" must define a non-empty recommended preset.`,
|
|
142
|
-
fix: "Add at least one rule ID to the rule pack recommended preset."
|
|
143
|
-
},
|
|
144
|
-
DOC0016: {
|
|
145
|
-
why: (params) => `Invalid Config Extends entry "${params.entry}". Use "pack/preset".`,
|
|
146
|
-
fix: "Use a rule-pack-qualified preset such as \"vite-doctor/vue/recommended\"."
|
|
147
|
-
},
|
|
148
|
-
DOC0017: {
|
|
149
|
-
why: (params) => `Unknown Rule Pack "${params.pack}" in Config Extends entry "${params.entry}".`,
|
|
150
|
-
fix: "Use an installed Rule Pack name or remove the Config Extends entry."
|
|
151
|
-
},
|
|
152
|
-
DOC0018: {
|
|
153
|
-
why: (params) => `Unknown Preset "${params.preset}" for Rule Pack "${params.pack}" in Config Extends entry "${params.entry}".`,
|
|
154
|
-
fix: "Use a Preset exposed by the selected Rule Pack."
|
|
155
|
-
},
|
|
156
|
-
DOC0019: {
|
|
157
|
-
why: (params) => `Invalid severity for rule "${params.ruleId}": ${params.severity}.`,
|
|
158
|
-
fix: "Use \"blocker\", \"error\", \"warn\", \"info\", or \"off\"."
|
|
159
|
-
},
|
|
160
|
-
DOC0020: {
|
|
161
|
-
why: (params) => `Invalid config for rule "${params.ruleId}".`,
|
|
162
|
-
fix: "Use \"off\", a severity string, or a [severity, options] tuple."
|
|
163
|
-
},
|
|
164
|
-
DOC0021: {
|
|
165
|
-
why: (params) => params.code ? `Diagnostic "${params.code}" for rule "${params.ruleId}" is missing a fix.` : `Rule "${params.ruleId}" reported a diagnostic without a fix.`,
|
|
166
|
-
fix: "Provide actionable nostics fix text for every Doctor diagnostic."
|
|
167
|
-
},
|
|
168
|
-
DOC0022: {
|
|
169
|
-
why: (params) => `Doctor could not resolve the governing runtime graph: ${params.details}`,
|
|
170
|
-
fix: "Install project dependencies and run Doctor from the target project package. For computed Nuxt config, make future.compatibilityVersion statically provable or run pnpm nuxt doctor so the Nuxt integration can record the resolved value."
|
|
171
|
-
}
|
|
172
|
-
} });
|
|
173
|
-
//#endregion
|
|
174
|
-
//#region src/core/diagnostic-constants.ts
|
|
175
|
-
const DOCTOR_DIAGNOSTICS_DOCS_BASE = "https://vite-doctor.onmax.me/diagnostics";
|
|
176
|
-
//#endregion
|
|
177
|
-
//#region src/core/primitives.ts
|
|
178
|
-
function createRule(rule) {
|
|
179
|
-
return rule;
|
|
180
|
-
}
|
|
181
|
-
function defineRulePack(pack) {
|
|
182
|
-
if (!pack.presets?.recommended?.length) throw doctorInternalDiagnostics.DOC0015({ pack: pack.name });
|
|
183
|
-
return pack;
|
|
184
|
-
}
|
|
185
|
-
function defineDoctorExtension(extension) {
|
|
186
|
-
for (const pack of extension.rulePacks ?? []) defineRulePack(pack);
|
|
187
|
-
return extension;
|
|
188
|
-
}
|
|
189
|
-
//#endregion
|
|
190
127
|
//#region src/core/internal/nuxt-inventory.ts
|
|
191
128
|
function createNuxtProjectInventory(root, manifest, manifestPath, fallbackImportsDirs = []) {
|
|
192
129
|
return {
|
|
@@ -1705,7 +1642,7 @@ async function createScanSession(options) {
|
|
|
1705
1642
|
const registry = await collectRulePacks([...config.extensions ?? [], ...options.extensions ?? []]);
|
|
1706
1643
|
await applyProjectContributions(project, registry);
|
|
1707
1644
|
const ruleConfigs = resolveRuleConfigs(config);
|
|
1708
|
-
const enabledRules = selectRules(registry, ruleConfigs, options, project);
|
|
1645
|
+
const enabledRules = selectRules(registry, ruleConfigs, options, config, project);
|
|
1709
1646
|
markSession(sessionBase, "project", started);
|
|
1710
1647
|
started = performance.now();
|
|
1711
1648
|
const sourceInventory = await selectSourceInventory(root, config, options, project);
|
|
@@ -1775,15 +1712,12 @@ async function collectRulePacks(extensions) {
|
|
|
1775
1712
|
registerRulePack(pack) {
|
|
1776
1713
|
registeredPacks.push(pack);
|
|
1777
1714
|
},
|
|
1778
|
-
registerReporter() {},
|
|
1779
|
-
registerProjectDetector() {},
|
|
1780
1715
|
registerProjectInventoryContributor(contributor) {
|
|
1781
1716
|
inventoryContributors.push(contributor);
|
|
1782
1717
|
},
|
|
1783
1718
|
registerRuntimeEvidenceContributor(contributor) {
|
|
1784
1719
|
runtimeEvidenceContributors.push(contributor);
|
|
1785
|
-
}
|
|
1786
|
-
registerNuxtManifestContributor() {}
|
|
1720
|
+
}
|
|
1787
1721
|
});
|
|
1788
1722
|
const packs = [...extensions.flatMap((extension) => extension.rulePacks ?? []), ...registeredPacks].map((pack) => defineRulePack(pack));
|
|
1789
1723
|
return {
|
|
@@ -1809,16 +1743,15 @@ async function applyProjectContributions(project, registry) {
|
|
|
1809
1743
|
};
|
|
1810
1744
|
}
|
|
1811
1745
|
}
|
|
1812
|
-
function selectRules(registry, ruleConfigs, options, project) {
|
|
1746
|
+
function selectRules(registry, ruleConfigs, options, config, project) {
|
|
1813
1747
|
const wanted = options.rules?.split(",").map((item) => item.trim()).filter(Boolean);
|
|
1814
|
-
const selectedRules = resolveExtends(registry.packs, options, project);
|
|
1815
|
-
return registry.rules.filter((rule) => selectedRules.has(rule.meta.id)).filter((rule) => !rule.meta.requires?.nuxt || project.framework === "nuxt").filter((rule) => !rule.meta.requires?.nitro || project.framework === "nitro" || project.framework === "nuxt").filter((rule) => !rule.meta.requires?.vue || project.framework === "vue" || project.framework === "nuxt").filter((rule) => !
|
|
1748
|
+
const selectedRules = resolveExtends(registry.packs, options.extends ?? config.extends, project);
|
|
1749
|
+
return registry.rules.filter((rule) => selectedRules.has(rule.meta.id)).filter((rule) => !rule.meta.requires?.nuxt || project.framework === "nuxt").filter((rule) => !rule.meta.requires?.nitro || project.framework === "nitro" || project.framework === "nuxt").filter((rule) => !rule.meta.requires?.vue || project.framework === "vue" || project.framework === "nuxt").filter((rule) => !wanted?.length || wanted.some((pattern) => nativeMatch$1(rule.meta.id, pattern))).filter((rule) => resolvedConfig(ruleConfigs, rule.meta.id).enabled).map((rule) => ({
|
|
1816
1750
|
rule,
|
|
1817
1751
|
applicability: evaluateRuleApplicability(rule, project)
|
|
1818
1752
|
})).filter((item) => item.applicability.state === "active").map((item) => item.rule);
|
|
1819
1753
|
}
|
|
1820
|
-
function resolveExtends(packs,
|
|
1821
|
-
const requested = options.extends ?? options.config?.extends ?? "auto";
|
|
1754
|
+
function resolveExtends(packs, requested = "auto", project) {
|
|
1822
1755
|
if (requested === "auto") return new Set(packs.filter((pack) => evaluatePackActivation(pack, project).state === "active").flatMap((pack) => pack.presets.recommended));
|
|
1823
1756
|
const selected = /* @__PURE__ */ new Set();
|
|
1824
1757
|
for (const entry of requested) {
|
|
@@ -2300,42 +2233,6 @@ function diagnosticPenalty(summary, weights) {
|
|
|
2300
2233
|
return Math.min(100, blockerPenalty + errorPenalty + warnPenalty + infoPenalty);
|
|
2301
2234
|
}
|
|
2302
2235
|
//#endregion
|
|
2303
|
-
//#region src/core/diagnostics.ts
|
|
2304
|
-
function createDoctorDiagnosticsHost() {
|
|
2305
|
-
const logger = {};
|
|
2306
|
-
return {
|
|
2307
|
-
defineDiagnostics: defineDoctorDiagnostics,
|
|
2308
|
-
register(registry) {
|
|
2309
|
-
for (const [code, handle] of Object.entries(registry.diagnostics)) {
|
|
2310
|
-
if (logger[code]) throw doctorInternalDiagnostics.DOC0012({ code });
|
|
2311
|
-
logger[code] = handle;
|
|
2312
|
-
}
|
|
2313
|
-
},
|
|
2314
|
-
logger
|
|
2315
|
-
};
|
|
2316
|
-
}
|
|
2317
|
-
const doctorDiagnosticsHost = createDoctorDiagnosticsHost();
|
|
2318
|
-
function codeForRuleId(codesByRuleId, ruleId) {
|
|
2319
|
-
return codesByRuleId[ruleId];
|
|
2320
|
-
}
|
|
2321
|
-
function diagnosticForCode(diagnostics, code) {
|
|
2322
|
-
return code ? diagnostics[code] : void 0;
|
|
2323
|
-
}
|
|
2324
|
-
function defineDoctorDiagnostics(entries) {
|
|
2325
|
-
const codes = Object.fromEntries(entries.map((entry) => [entry.code, {
|
|
2326
|
-
why: (params) => params.why,
|
|
2327
|
-
fix: (params) => params.fix,
|
|
2328
|
-
...entry.docs === void 0 ? {} : { docs: entry.docs }
|
|
2329
|
-
}]));
|
|
2330
|
-
return {
|
|
2331
|
-
codesByRuleId: Object.fromEntries(entries.map((entry) => [entry.ruleId, entry.code])),
|
|
2332
|
-
diagnostics: defineDiagnostics({
|
|
2333
|
-
docsBase: (code) => `${DOCTOR_DIAGNOSTICS_DOCS_BASE}/${String(code)}`,
|
|
2334
|
-
codes
|
|
2335
|
-
})
|
|
2336
|
-
};
|
|
2337
|
-
}
|
|
2338
|
-
//#endregion
|
|
2339
2236
|
//#region src/core/diagnostic-code-map.ts
|
|
2340
2237
|
const allDoctorDiagnosticRegistry = defineDoctorDiagnostics([
|
|
2341
2238
|
{
|
|
@@ -3241,7 +3138,6 @@ function reportRuntimeInventoryUnknown(session) {
|
|
|
3241
3138
|
}
|
|
3242
3139
|
function defaultConfidenceForPhase(phase) {
|
|
3243
3140
|
if (phase === "graph") return "proven";
|
|
3244
|
-
if (phase === "type") return "type-backed";
|
|
3245
3141
|
if (phase === "manifest") return "manifest-backed";
|
|
3246
3142
|
if (phase === "duplication" || phase === "health") return "heuristic-high";
|
|
3247
3143
|
return "heuristic-medium";
|
|
@@ -3250,7 +3146,6 @@ function evidenceKindForPhase(phase) {
|
|
|
3250
3146
|
if (phase === "file") return "ast";
|
|
3251
3147
|
if (phase === "manifest") return "manifest";
|
|
3252
3148
|
if (phase === "graph" || phase === "workspace") return "graph";
|
|
3253
|
-
if (phase === "type") return "types";
|
|
3254
3149
|
if (phase === "duplication" || phase === "health") return "facts";
|
|
3255
3150
|
return "facts";
|
|
3256
3151
|
}
|
|
@@ -3853,7 +3748,7 @@ async function runFileRules(session) {
|
|
|
3853
3748
|
for (const rule of session.enabledRules) {
|
|
3854
3749
|
if ((rule.meta.execution ?? "file") !== "file") continue;
|
|
3855
3750
|
for (const file of session.handles) {
|
|
3856
|
-
if (!canRunRuleOnFile(rule, file
|
|
3751
|
+
if (!canRunRuleOnFile(rule, file)) continue;
|
|
3857
3752
|
const visitor = await rule.create(createRuleContext(session, file, rule));
|
|
3858
3753
|
if (!visitor) continue;
|
|
3859
3754
|
await runVisitor(visitor, file);
|
|
@@ -3882,11 +3777,6 @@ async function runGraphRules(session) {
|
|
|
3882
3777
|
if (!session.graph) return;
|
|
3883
3778
|
runStructuralGraphRules(session, session.graph);
|
|
3884
3779
|
}
|
|
3885
|
-
async function buildTypeGraphPhase(session) {
|
|
3886
|
-
if (!session.options.types) return;
|
|
3887
|
-
session.timings.typeGraphStatus = 0;
|
|
3888
|
-
}
|
|
3889
|
-
async function runTypeRules(_session) {}
|
|
3890
3780
|
async function runDuplicationPhase(session) {
|
|
3891
3781
|
runDuplicationRules(session);
|
|
3892
3782
|
}
|
|
@@ -3982,14 +3872,13 @@ function createEmptySourceFileHandle(session) {
|
|
|
3982
3872
|
}
|
|
3983
3873
|
};
|
|
3984
3874
|
}
|
|
3985
|
-
function canRunRuleOnFile(rule, file
|
|
3875
|
+
function canRunRuleOnFile(rule, file) {
|
|
3986
3876
|
if (rule.meta.sourceKinds && !rule.meta.sourceKinds.includes(file.sourceKind)) return false;
|
|
3987
3877
|
const requires = rule.meta.requires;
|
|
3988
3878
|
if (!requires) return true;
|
|
3989
3879
|
if (requires.sfc && !file.sfc) return false;
|
|
3990
3880
|
if (requires.template && !file.templateAst) return false;
|
|
3991
3881
|
if (requires.script && !file.scriptAst) return false;
|
|
3992
|
-
if (requires.types && !options.types) return false;
|
|
3993
3882
|
return true;
|
|
3994
3883
|
}
|
|
3995
3884
|
//#endregion
|
|
@@ -4482,8 +4371,6 @@ async function executeDoctorRun(options) {
|
|
|
4482
4371
|
await runPhase(session, "manifestRules", () => runManifestRules(session));
|
|
4483
4372
|
await runPhase(session, "workspaceGraph", () => buildGraphPhase(session));
|
|
4484
4373
|
await runPhase(session, "graphRules", () => runGraphRules(session));
|
|
4485
|
-
await runPhase(session, "typeGraph", () => buildTypeGraphPhase(session));
|
|
4486
|
-
await runPhase(session, "typeRules", () => /* @__PURE__ */ runTypeRules(session));
|
|
4487
4374
|
await runPhase(session, "duplication", () => runDuplicationPhase(session));
|
|
4488
4375
|
await runPhase(session, "health", () => runHealthPhase(session));
|
|
4489
4376
|
applyPolicyFilters(session);
|
|
@@ -4506,4 +4393,4 @@ async function executeDoctorRun(options) {
|
|
|
4506
4393
|
return result;
|
|
4507
4394
|
}
|
|
4508
4395
|
//#endregion
|
|
4509
|
-
export { reportStatus as a,
|
|
4396
|
+
export { reportStatus as a, detectProject as c, explainRule as i, createReport as n, cleanCache as o, createRulesReport as r, evaluateRuleApplicability as s, runDoctor as t };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DiagnosticHandle } from "nostics";
|
|
2
|
+
//#region src/core/diagnostics.d.ts
|
|
3
|
+
interface DoctorDiagnosticCodeEntry {
|
|
4
|
+
code: string;
|
|
5
|
+
ruleId: string;
|
|
6
|
+
docs?: string | false;
|
|
7
|
+
}
|
|
8
|
+
interface DoctorDiagnosticParams {
|
|
9
|
+
why: string;
|
|
10
|
+
fix: string;
|
|
11
|
+
sources?: string[];
|
|
12
|
+
cause?: unknown;
|
|
13
|
+
}
|
|
14
|
+
type DoctorDiagnosticHandle = DiagnosticHandle<DoctorDiagnosticParams, {}>;
|
|
15
|
+
type DoctorDiagnosticRegistry<Code extends string = string, RuleId extends string = string> = {
|
|
16
|
+
codesByRuleId: Record<RuleId, Code>;
|
|
17
|
+
diagnostics: { readonly [Key in Code]: DoctorDiagnosticHandle; };
|
|
18
|
+
};
|
|
19
|
+
declare function defineDoctorDiagnostics<const Entries extends readonly DoctorDiagnosticCodeEntry[]>(entries: Entries): DoctorDiagnosticRegistry<Entries[number]["code"], Entries[number]["ruleId"]>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { defineDoctorDiagnostics as a, DoctorDiagnosticRegistry as i, DoctorDiagnosticHandle as n, DoctorDiagnosticParams as r, DoctorDiagnosticCodeEntry as t };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { defineDiagnostics } from "nostics";
|
|
2
|
+
//#region src/core/internal-diagnostic-handles.ts
|
|
3
|
+
const doctorInternalDiagnostics = defineDiagnostics({ codes: {
|
|
4
|
+
DOC0012: {
|
|
5
|
+
why: (params) => `Duplicate Doctor diagnostic code "${params.code}".`,
|
|
6
|
+
fix: (params) => `Assign a unique Diagnostic Code instead of registering "${params.code}" twice.`
|
|
7
|
+
},
|
|
8
|
+
DOC0013: {
|
|
9
|
+
why: (params) => params.code ? `No Doctor diagnostic handle is registered for rule "${params.ruleId}" and code "${params.code}".` : `No Doctor diagnostic code is registered for rule "${params.ruleId}".`,
|
|
10
|
+
fix: "Register a Diagnostic Code for the rule before it can report diagnostics."
|
|
11
|
+
},
|
|
12
|
+
DOC0014: {
|
|
13
|
+
why: (params) => `Rule "${params.ruleId}" reported a diagnostic without a nostics name/code.`,
|
|
14
|
+
fix: "Report diagnostics through a registered Doctor nostics handle."
|
|
15
|
+
},
|
|
16
|
+
DOC0015: {
|
|
17
|
+
why: (params) => `Rule pack "${params.pack}" must define a non-empty recommended preset.`,
|
|
18
|
+
fix: "Add at least one rule ID to the rule pack recommended preset."
|
|
19
|
+
},
|
|
20
|
+
DOC0016: {
|
|
21
|
+
why: (params) => `Invalid Config Extends entry "${params.entry}". Use "pack/preset".`,
|
|
22
|
+
fix: "Use a rule-pack-qualified preset such as \"vite-doctor/vue/recommended\"."
|
|
23
|
+
},
|
|
24
|
+
DOC0017: {
|
|
25
|
+
why: (params) => `Unknown Rule Pack "${params.pack}" in Config Extends entry "${params.entry}".`,
|
|
26
|
+
fix: "Use an installed Rule Pack name or remove the Config Extends entry."
|
|
27
|
+
},
|
|
28
|
+
DOC0018: {
|
|
29
|
+
why: (params) => `Unknown Preset "${params.preset}" for Rule Pack "${params.pack}" in Config Extends entry "${params.entry}".`,
|
|
30
|
+
fix: "Use a Preset exposed by the selected Rule Pack."
|
|
31
|
+
},
|
|
32
|
+
DOC0019: {
|
|
33
|
+
why: (params) => `Invalid severity for rule "${params.ruleId}": ${params.severity}.`,
|
|
34
|
+
fix: "Use \"blocker\", \"error\", \"warn\", \"info\", or \"off\"."
|
|
35
|
+
},
|
|
36
|
+
DOC0020: {
|
|
37
|
+
why: (params) => `Invalid config for rule "${params.ruleId}".`,
|
|
38
|
+
fix: "Use \"off\", a severity string, or a [severity, options] tuple."
|
|
39
|
+
},
|
|
40
|
+
DOC0021: {
|
|
41
|
+
why: (params) => params.code ? `Diagnostic "${params.code}" for rule "${params.ruleId}" is missing a fix.` : `Rule "${params.ruleId}" reported a diagnostic without a fix.`,
|
|
42
|
+
fix: "Provide actionable nostics fix text for every Doctor diagnostic."
|
|
43
|
+
},
|
|
44
|
+
DOC0022: {
|
|
45
|
+
why: (params) => `Doctor could not resolve the governing runtime graph: ${params.details}`,
|
|
46
|
+
fix: "Install project dependencies and run Doctor from the target project package. For computed Nuxt config, make future.compatibilityVersion statically provable or run pnpm nuxt doctor so the Nuxt integration can record the resolved value."
|
|
47
|
+
}
|
|
48
|
+
} });
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/core/diagnostic-constants.ts
|
|
51
|
+
const DOCTOR_DIAGNOSTICS_DOCS_BASE = "https://vite-doctor.onmax.me/diagnostics";
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/core/primitives.ts
|
|
54
|
+
function createRule(rule) {
|
|
55
|
+
return rule;
|
|
56
|
+
}
|
|
57
|
+
function defineRulePack(pack) {
|
|
58
|
+
if (!pack.presets?.recommended?.length) throw doctorInternalDiagnostics.DOC0015({ pack: pack.name });
|
|
59
|
+
return pack;
|
|
60
|
+
}
|
|
61
|
+
function defineDoctorExtension(extension) {
|
|
62
|
+
for (const pack of extension.rulePacks ?? []) defineRulePack(pack);
|
|
63
|
+
return extension;
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/core/diagnostics.ts
|
|
67
|
+
function createDoctorDiagnosticsHost() {
|
|
68
|
+
const logger = {};
|
|
69
|
+
return {
|
|
70
|
+
defineDiagnostics: defineDoctorDiagnostics,
|
|
71
|
+
register(registry) {
|
|
72
|
+
for (const [code, handle] of Object.entries(registry.diagnostics)) {
|
|
73
|
+
if (logger[code]) throw doctorInternalDiagnostics.DOC0012({ code });
|
|
74
|
+
logger[code] = handle;
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
logger
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
const doctorDiagnosticsHost = createDoctorDiagnosticsHost();
|
|
81
|
+
function codeForRuleId(codesByRuleId, ruleId) {
|
|
82
|
+
return codesByRuleId[ruleId];
|
|
83
|
+
}
|
|
84
|
+
function diagnosticForCode(diagnostics, code) {
|
|
85
|
+
return code ? diagnostics[code] : void 0;
|
|
86
|
+
}
|
|
87
|
+
function defineDoctorDiagnostics(entries) {
|
|
88
|
+
const codes = Object.fromEntries(entries.map((entry) => [entry.code, {
|
|
89
|
+
why: (params) => params.why,
|
|
90
|
+
fix: (params) => params.fix,
|
|
91
|
+
...entry.docs === void 0 ? {} : { docs: entry.docs }
|
|
92
|
+
}]));
|
|
93
|
+
return {
|
|
94
|
+
codesByRuleId: Object.fromEntries(entries.map((entry) => [entry.ruleId, entry.code])),
|
|
95
|
+
diagnostics: defineDiagnostics({
|
|
96
|
+
docsBase: (code) => `${DOCTOR_DIAGNOSTICS_DOCS_BASE}/${String(code)}`,
|
|
97
|
+
codes
|
|
98
|
+
})
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
export { createRule as a, DOCTOR_DIAGNOSTICS_DOCS_BASE as c, doctorDiagnosticsHost as i, doctorInternalDiagnostics as l, defineDoctorDiagnostics as n, defineDoctorExtension as o, diagnosticForCode as r, defineRulePack as s, codeForRuleId as t };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import "./rules-
|
|
8
|
-
import
|
|
9
|
-
import "./
|
|
1
|
+
import { t as runDoctor } from "./core-CztxQ3dO.mjs";
|
|
2
|
+
import { o as defineDoctorExtension } from "./diagnostics-OWBdo3Uc.mjs";
|
|
3
|
+
import { t as nitroRulePack } from "./rules-BfmRH-w3.mjs";
|
|
4
|
+
import "./nitro-FnvPw8Up.mjs";
|
|
5
|
+
import { t as vueRulePack } from "./rules-298lNPbq.mjs";
|
|
6
|
+
import { t as nuxtDoctorExtensions } from "./rules-Cg6CMffp.mjs";
|
|
7
|
+
import { t as viteRulePack } from "./rules-D228x7hu.mjs";
|
|
8
|
+
import "./rules-htE_WDPD.mjs";
|
|
9
|
+
import { t as typescriptRulePack } from "./rules-03OSDgOR.mjs";
|
|
10
|
+
import "./typescript-etB5nu2i.mjs";
|
|
10
11
|
import { join } from "pathe";
|
|
11
12
|
import { existsSync, readFileSync } from "node:fs";
|
|
12
13
|
//#region src/version.ts
|
|
@@ -22,12 +23,7 @@ function readPackageVersion() {
|
|
|
22
23
|
//#endregion
|
|
23
24
|
//#region src/doctor.ts
|
|
24
25
|
async function viteDoctorRulePacks(options = {}) {
|
|
25
|
-
|
|
26
|
-
const packs = [viteRulePack, typescriptRulePack];
|
|
27
|
-
if (framework === "vue") packs.push(vueRulePack);
|
|
28
|
-
if (framework === "nitro") packs.push(nitroRulePack);
|
|
29
|
-
if (framework === "nuxt") packs.push(...nuxtRulePacks());
|
|
30
|
-
return packs.map(withDistributionVersion);
|
|
26
|
+
return (await viteDoctorExtensions(options)).flatMap((extension) => extension.rulePacks ?? []);
|
|
31
27
|
}
|
|
32
28
|
async function viteDoctorExtensions(options = {}) {
|
|
33
29
|
const framework = detectRequestedFramework(options);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { _ as createRule, a as DoctorRule, c as ProjectInventoryContributor, d as RulePack, f as RuleVisitor, g as SourceRange, h as SourceFileHandle, l as RuleContext, n as DoctorExtensionApi, p as RuntimeEvidenceContributor, t as DoctorExtension, u as RuleMeta, v as defineDoctorExtension, y as defineRulePack } from "./primitives-8DoGel1u.mjs";
|
|
2
|
+
import { a as defineDoctorDiagnostics, i as DoctorDiagnosticRegistry, n as DoctorDiagnosticHandle, r as DoctorDiagnosticParams, t as DoctorDiagnosticCodeEntry } from "./diagnostics-DYlg2f-e.mjs";
|
|
3
|
+
import "./extension-DyFj4vXT.mjs";
|
|
4
|
+
export { type DoctorDiagnosticCodeEntry, type DoctorDiagnosticHandle, type DoctorDiagnosticParams, type DoctorDiagnosticRegistry, type DoctorExtension, type DoctorExtensionApi, type DoctorRule, type ProjectInventoryContributor, type RuleContext, type RuleMeta, type RulePack, type RuleVisitor, type RuntimeEvidenceContributor, type SourceFileHandle, type SourceRange, createRule, defineDoctorDiagnostics, defineDoctorExtension, defineRulePack };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as DoctorRule, d as RulePack } from "./primitives-8DoGel1u.mjs";
|
|
2
2
|
//#region src/rule-packs/vite/rules/define.d.ts
|
|
3
3
|
declare const noUnusedDefine: DoctorRule;
|
|
4
4
|
declare const noUntypedDefine: DoctorRule;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as DoctorRule, d as RulePack } from "./primitives-8DoGel1u.mjs";
|
|
2
2
|
//#region src/rule-packs/typescript/rules/no-caller-chosen-result-type.d.ts
|
|
3
3
|
declare const noCallerChosenResultType: DoctorRule;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as DoctorRule, d as RulePack } from "./primitives-8DoGel1u.mjs";
|
|
2
|
+
import "./extension-DyFj4vXT.mjs";
|
|
2
3
|
//#region src/rule-packs/nitro/rules/no-use-nuxt-app-in-nitro.d.ts
|
|
3
4
|
declare const noUseNuxtAppInNitro: DoctorRule;
|
|
4
5
|
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index-DLp2anMW.mjs";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as defineDoctorConfig, n as DoctorRunOptions, t as DoctorConfig } from "./config-
|
|
2
|
-
import { n as doctor, t as ViteDoctorSurfaceOptions } from "./plugin-
|
|
1
|
+
import { i as defineDoctorConfig, n as DoctorRunOptions, t as DoctorConfig } from "./config-DWmchdeh.mjs";
|
|
2
|
+
import { n as doctor, t as ViteDoctorSurfaceOptions } from "./plugin-B97s20vt.mjs";
|
|
3
3
|
export { type DoctorConfig, type DoctorRunOptions, type ViteDoctorSurfaceOptions, defineDoctorConfig, doctor };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as defineDoctorConfig } from "./config-
|
|
2
|
-
import { t as doctor } from "./plugin-
|
|
1
|
+
import { t as defineDoctorConfig } from "./config-CaJ0DqB3.mjs";
|
|
2
|
+
import { t as doctor } from "./plugin-DXJRUrg6.mjs";
|
|
3
3
|
export { defineDoctorConfig, doctor };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as DoctorConfig } from "./config-
|
|
3
|
-
import "./index-
|
|
1
|
+
import { d as RulePack, s as NuxtDoctorManifest, t as DoctorExtension } from "./primitives-8DoGel1u.mjs";
|
|
2
|
+
import { t as DoctorConfig } from "./config-DWmchdeh.mjs";
|
|
3
|
+
import "./index-Dx-JzQ3s.mjs";
|
|
4
4
|
import { NuxtModule } from "nuxt/schema";
|
|
5
5
|
//#region src/rule-packs/nuxt/module.d.ts
|
|
6
6
|
type NuxtDoctorModuleOptions = DoctorConfig;
|
|
@@ -209,7 +209,6 @@ function serializableDoctorConfig(config = {}) {
|
|
|
209
209
|
if (config.exclude !== void 0) payload.exclude = config.exclude;
|
|
210
210
|
if (config.rules !== void 0) payload.rules = config.rules;
|
|
211
211
|
if (config.suppressions !== void 0) payload.suppressions = config.suppressions;
|
|
212
|
-
if (config.typeAware !== void 0) payload.typeAware = config.typeAware;
|
|
213
212
|
if (config.cache !== void 0) payload.cache = config.cache;
|
|
214
213
|
if (config.score !== void 0) payload.score = config.score;
|
|
215
214
|
return Object.keys(payload).length ? payload : void 0;
|
package/dist/nuxt.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as nuxtDoctorModule, t as NuxtDoctorModuleOptions } from "./module-
|
|
1
|
+
import { i as nuxtDoctorModule, t as NuxtDoctorModuleOptions } from "./module-Cm_Da1lK.mjs";
|
|
2
2
|
export { type NuxtDoctorModuleOptions, nuxtDoctorModule as default };
|
package/dist/nuxt.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as nuxtDoctorModule } from "./module-
|
|
1
|
+
import { r as nuxtDoctorModule } from "./module-DFUEExm6.mjs";
|
|
2
2
|
export { nuxtDoctorModule as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as DoctorExtension } from "./primitives-
|
|
2
|
-
import { n as DoctorRunOptions, t as DoctorConfig } from "./config-
|
|
3
|
-
import "./index-
|
|
1
|
+
import { t as DoctorExtension } from "./primitives-8DoGel1u.mjs";
|
|
2
|
+
import { n as DoctorRunOptions, t as DoctorConfig } from "./config-DWmchdeh.mjs";
|
|
3
|
+
import "./index-Dx-JzQ3s.mjs";
|
|
4
4
|
import { Plugin } from "vite";
|
|
5
5
|
//#region src/plugin.d.ts
|
|
6
6
|
interface ViteDoctorSurfaceOptions {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { n as createReport
|
|
2
|
-
import {
|
|
1
|
+
import { n as createReport } from "./core-CztxQ3dO.mjs";
|
|
2
|
+
import { o as defineDoctorExtension } from "./diagnostics-OWBdo3Uc.mjs";
|
|
3
|
+
import { n as shouldFailDoctorRun, t as runViteDoctor } from "./doctor-DZThqTQg.mjs";
|
|
3
4
|
import { resolve } from "pathe";
|
|
4
5
|
//#region src/plugin.ts
|
|
5
6
|
function doctor(options = {}) {
|
package/dist/plugin.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as doctor, t as ViteDoctorSurfaceOptions } from "./plugin-
|
|
1
|
+
import { n as doctor, t as ViteDoctorSurfaceOptions } from "./plugin-B97s20vt.mjs";
|
|
2
2
|
export { ViteDoctorSurfaceOptions, doctor };
|
package/dist/plugin.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as doctor } from "./plugin-
|
|
1
|
+
import { t as doctor } from "./plugin-DXJRUrg6.mjs";
|
|
2
2
|
export { doctor };
|
|
@@ -14,7 +14,6 @@ interface DoctorSerializableConfig {
|
|
|
14
14
|
file?: string;
|
|
15
15
|
reason: string;
|
|
16
16
|
}>;
|
|
17
|
-
typeAware?: boolean;
|
|
18
17
|
cache?: {
|
|
19
18
|
dir?: string;
|
|
20
19
|
strategy?: "content-hash";
|
|
@@ -27,9 +26,9 @@ type FixSafety = "safe" | "unsafe" | "suggestion" | "structural-review";
|
|
|
27
26
|
type DoctorFramework = "vue" | "nuxt" | "vite" | "nitro";
|
|
28
27
|
type ProjectLanguage = "typescript" | "javascript";
|
|
29
28
|
type RuntimePackageName = "nuxt" | "nitro" | "h3" | "vue";
|
|
30
|
-
type ExecutionKind = "file" | "manifest" | "workspace" | "graph" | "
|
|
29
|
+
type ExecutionKind = "file" | "manifest" | "workspace" | "graph" | "duplication" | "health";
|
|
31
30
|
type RuleCost = "tiny" | "small" | "medium" | "large" | "xlarge";
|
|
32
|
-
type CacheScope = "none" | "file-text" | "sfc-block" | "workspace-graph" | "
|
|
31
|
+
type CacheScope = "none" | "file-text" | "sfc-block" | "workspace-graph" | "run";
|
|
33
32
|
type Determinism = "deterministic" | "env-dependent" | "runtime-dependent";
|
|
34
33
|
type EvidenceKind = "facts" | "ast" | "graph" | "types" | "manifest" | "coverage" | "git" | "runtime";
|
|
35
34
|
type Confidence = "proven" | "type-backed" | "manifest-backed" | "runtime-backed" | "heuristic-high" | "heuristic-medium" | "heuristic-low";
|
|
@@ -100,7 +99,7 @@ interface RuleMeta {
|
|
|
100
99
|
docsUrl?: string;
|
|
101
100
|
diagnosticCodes?: string[];
|
|
102
101
|
version?: string;
|
|
103
|
-
requiresContext?: Array<"manifest" | "
|
|
102
|
+
requiresContext?: Array<"manifest" | "cross-file" | "template" | "script">;
|
|
104
103
|
frameworkVersions?: {
|
|
105
104
|
vue?: string;
|
|
106
105
|
nuxt?: string;
|
|
@@ -115,7 +114,6 @@ interface RuleMeta {
|
|
|
115
114
|
sfc?: boolean;
|
|
116
115
|
template?: boolean;
|
|
117
116
|
script?: boolean;
|
|
118
|
-
types?: boolean;
|
|
119
117
|
vue?: boolean;
|
|
120
118
|
nitro?: boolean;
|
|
121
119
|
nuxt?: boolean;
|
|
@@ -154,22 +152,6 @@ interface SfcHandle {
|
|
|
154
152
|
offsetToPosition(offset: number): SourceRange;
|
|
155
153
|
blockOffsetToFileOffset(block: "template" | "script" | "scriptSetup", offset: number): number;
|
|
156
154
|
}
|
|
157
|
-
interface TypeGraph {
|
|
158
|
-
programId: string;
|
|
159
|
-
projectRoots?: string[];
|
|
160
|
-
files?: string[];
|
|
161
|
-
resolveType(file: string, offset: number): unknown;
|
|
162
|
-
findSymbolRefs(file: string, offset: number): Array<{
|
|
163
|
-
file: string;
|
|
164
|
-
range: SourceRange;
|
|
165
|
-
}>;
|
|
166
|
-
resolveExportTarget?(file: string, exportName: string): ResolvedSymbol | null;
|
|
167
|
-
}
|
|
168
|
-
interface ResolvedSymbol {
|
|
169
|
-
file: string;
|
|
170
|
-
name: string;
|
|
171
|
-
range?: SourceRange;
|
|
172
|
-
}
|
|
173
155
|
interface AutoImportEntry {
|
|
174
156
|
name: string;
|
|
175
157
|
as?: string;
|
|
@@ -487,7 +469,6 @@ interface RuleContext {
|
|
|
487
469
|
project: ProjectInfo;
|
|
488
470
|
file: SourceFileHandle;
|
|
489
471
|
sfc?: SfcHandle;
|
|
490
|
-
types?: TypeGraph;
|
|
491
472
|
severity: DoctorSeverity;
|
|
492
473
|
options: unknown;
|
|
493
474
|
report(diagnostic: Diagnostic, metadata: DoctorDiagnosticMetadata): void;
|
|
@@ -533,70 +514,16 @@ interface RulePack {
|
|
|
533
514
|
nuxt?: string;
|
|
534
515
|
};
|
|
535
516
|
}
|
|
536
|
-
interface DoctorRunResult {
|
|
537
|
-
version: string;
|
|
538
|
-
reportVersion?: 3;
|
|
539
|
-
framework: DoctorFramework;
|
|
540
|
-
root: string;
|
|
541
|
-
scope: {
|
|
542
|
-
mode: "all" | "changed";
|
|
543
|
-
base?: string | null;
|
|
544
|
-
files: number;
|
|
545
|
-
deletedFiles?: number;
|
|
546
|
-
};
|
|
547
|
-
score: number;
|
|
548
|
-
categoryScores: Record<string, number>;
|
|
549
|
-
summary: {
|
|
550
|
-
blocker: number;
|
|
551
|
-
error: number;
|
|
552
|
-
warn: number;
|
|
553
|
-
info: number;
|
|
554
|
-
fixable: number;
|
|
555
|
-
};
|
|
556
|
-
diagnostics: Diagnostic$1[];
|
|
557
|
-
suppressedDiagnostics?: Diagnostic$1[];
|
|
558
|
-
fixes?: {
|
|
559
|
-
files: number;
|
|
560
|
-
edits: number;
|
|
561
|
-
skipped: number;
|
|
562
|
-
};
|
|
563
|
-
timings?: Record<string, number>;
|
|
564
|
-
phases?: Record<string, number>;
|
|
565
|
-
graph?: {
|
|
566
|
-
files: number;
|
|
567
|
-
importEdges: number;
|
|
568
|
-
exportEdges: number;
|
|
569
|
-
virtualRoots: number;
|
|
570
|
-
cycles: number;
|
|
571
|
-
};
|
|
572
|
-
project: ProjectInfo;
|
|
573
|
-
}
|
|
574
|
-
interface Reporter {
|
|
575
|
-
name: string;
|
|
576
|
-
write(result: DoctorRunResult): Promise<void> | void;
|
|
577
|
-
}
|
|
578
517
|
interface DoctorExtension {
|
|
579
518
|
name: string;
|
|
580
519
|
version?: string;
|
|
581
520
|
rulePacks?: RulePack[];
|
|
582
|
-
reporters?: Reporter[];
|
|
583
521
|
setup?(api: DoctorExtensionApi): void | Promise<void>;
|
|
584
522
|
}
|
|
585
523
|
interface DoctorExtensionApi {
|
|
586
524
|
registerRulePack(pack: RulePack): void;
|
|
587
|
-
registerReporter(reporter: Reporter): void;
|
|
588
|
-
registerProjectDetector(detector: ProjectDetector): void;
|
|
589
525
|
registerProjectInventoryContributor(contributor: ProjectInventoryContributor): void;
|
|
590
526
|
registerRuntimeEvidenceContributor(contributor: RuntimeEvidenceContributor): void;
|
|
591
|
-
registerNuxtManifestContributor?(contributor: NuxtManifestContributor): void;
|
|
592
|
-
}
|
|
593
|
-
interface ProjectDetector {
|
|
594
|
-
name: string;
|
|
595
|
-
detect(root: string): Promise<ProjectInfo | null>;
|
|
596
|
-
}
|
|
597
|
-
interface NuxtManifestContributor {
|
|
598
|
-
name: string;
|
|
599
|
-
contribute(project: ProjectInfo): Promise<Record<string, unknown>> | Record<string, unknown>;
|
|
600
527
|
}
|
|
601
528
|
interface ProjectInventoryContributor {
|
|
602
529
|
name: string;
|
|
@@ -606,5 +533,8 @@ interface RuntimeEvidenceContributor {
|
|
|
606
533
|
name: string;
|
|
607
534
|
contribute(project: ProjectInfo): Promise<Record<string, unknown>> | Record<string, unknown>;
|
|
608
535
|
}
|
|
536
|
+
declare function createRule(rule: DoctorRule): DoctorRule;
|
|
537
|
+
declare function defineRulePack(pack: RulePack): RulePack;
|
|
538
|
+
declare function defineDoctorExtension(extension: DoctorExtension): DoctorExtension;
|
|
609
539
|
//#endregion
|
|
610
|
-
export {
|
|
540
|
+
export { createRule as _, DoctorRule as a, ProjectInventoryContributor as c, RulePack as d, RuleVisitor as f, SourceRange as g, SourceFileHandle as h, DoctorReportFormat as i, RuleContext as l, RuntimeTarget as m, DoctorExtensionApi as n, DoctorSerializableConfig as o, RuntimeEvidenceContributor as p, DoctorFramework as r, NuxtDoctorManifest as s, DoctorExtension as t, RuleMeta as u, defineDoctorExtension as v, defineRulePack as y };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as noUseNuxtAppInNitro, a as preferValidatedRouterParams, c as noBrowserApiInServer, d as preferH3RedirectResponse, f as noRemovedH3Send, g as noNavigateToInNitro, h as requireEventRuntimeConfigInServer, i as preferAssertMethod, l as noClientComposablesInServer, m as noEventRuntimeConfigInServer, n as preferGetRequestIp, o as preferValidatedQuery, p as noV2Imports, r as preferRouteMethodSuffix, s as preferValidatedBody, t as nitroRulePack, u as preferH3WithBase } from "../../index-
|
|
2
|
-
import "../../index-
|
|
1
|
+
import { _ as noUseNuxtAppInNitro, a as preferValidatedRouterParams, c as noBrowserApiInServer, d as preferH3RedirectResponse, f as noRemovedH3Send, g as noNavigateToInNitro, h as requireEventRuntimeConfigInServer, i as preferAssertMethod, l as noClientComposablesInServer, m as noEventRuntimeConfigInServer, n as preferGetRequestIp, o as preferValidatedQuery, p as noV2Imports, r as preferRouteMethodSuffix, s as preferValidatedBody, t as nitroRulePack, u as preferH3WithBase } from "../../index-DLp2anMW.mjs";
|
|
2
|
+
import "../../index-OV2dDmkX.mjs";
|
|
3
3
|
export { nitroRulePack, noBrowserApiInServer, noClientComposablesInServer, noEventRuntimeConfigInServer, noNavigateToInNitro, noRemovedH3Send, noUseNuxtAppInNitro, noV2Imports, preferAssertMethod, preferGetRequestIp, preferH3RedirectResponse, preferH3WithBase, preferRouteMethodSuffix, preferValidatedBody, preferValidatedQuery, preferValidatedRouterParams, requireEventRuntimeConfigInServer };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as noUseNuxtAppInNitro, a as preferValidatedRouterParams, c as noBrowserApiInServer, d as preferH3RedirectResponse, f as noRemovedH3Send, g as noNavigateToInNitro, h as requireEventRuntimeConfigInServer, i as preferAssertMethod, l as noClientComposablesInServer, m as noEventRuntimeConfigInServer, n as preferGetRequestIp, o as preferValidatedQuery, p as noV2Imports, r as preferRouteMethodSuffix, s as preferValidatedBody, t as nitroRulePack, u as preferH3WithBase } from "../../rules-
|
|
2
|
-
import "../../nitro-
|
|
1
|
+
import { _ as noUseNuxtAppInNitro, a as preferValidatedRouterParams, c as noBrowserApiInServer, d as preferH3RedirectResponse, f as noRemovedH3Send, g as noNavigateToInNitro, h as requireEventRuntimeConfigInServer, i as preferAssertMethod, l as noClientComposablesInServer, m as noEventRuntimeConfigInServer, n as preferGetRequestIp, o as preferValidatedQuery, p as noV2Imports, r as preferRouteMethodSuffix, s as preferValidatedBody, t as nitroRulePack, u as preferH3WithBase } from "../../rules-BfmRH-w3.mjs";
|
|
2
|
+
import "../../nitro-FnvPw8Up.mjs";
|
|
3
3
|
export { nitroRulePack, noBrowserApiInServer, noClientComposablesInServer, noEventRuntimeConfigInServer, noNavigateToInNitro, noRemovedH3Send, noUseNuxtAppInNitro, noV2Imports, preferAssertMethod, preferGetRequestIp, preferH3RedirectResponse, preferH3WithBase, preferRouteMethodSuffix, preferValidatedBody, preferValidatedQuery, preferValidatedRouterParams, requireEventRuntimeConfigInServer };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as noUseNuxtAppInNitro, a as preferValidatedRouterParams, c as noBrowserApiInServer, d as preferH3RedirectResponse, f as noRemovedH3Send, g as noNavigateToInNitro, h as requireEventRuntimeConfigInServer, i as preferAssertMethod, l as noClientComposablesInServer, m as noEventRuntimeConfigInServer, n as preferGetRequestIp, o as preferValidatedQuery, p as noV2Imports, r as preferRouteMethodSuffix, s as preferValidatedBody, t as nitroRulePack, u as preferH3WithBase } from "../../index-
|
|
1
|
+
import { _ as noUseNuxtAppInNitro, a as preferValidatedRouterParams, c as noBrowserApiInServer, d as preferH3RedirectResponse, f as noRemovedH3Send, g as noNavigateToInNitro, h as requireEventRuntimeConfigInServer, i as preferAssertMethod, l as noClientComposablesInServer, m as noEventRuntimeConfigInServer, n as preferGetRequestIp, o as preferValidatedQuery, p as noV2Imports, r as preferRouteMethodSuffix, s as preferValidatedBody, t as nitroRulePack, u as preferH3WithBase } from "../../index-DLp2anMW.mjs";
|
|
2
2
|
export { nitroRulePack, noBrowserApiInServer, noClientComposablesInServer, noEventRuntimeConfigInServer, noNavigateToInNitro, noRemovedH3Send, noUseNuxtAppInNitro, noV2Imports, preferAssertMethod, preferGetRequestIp, preferH3RedirectResponse, preferH3WithBase, preferRouteMethodSuffix, preferValidatedBody, preferValidatedQuery, preferValidatedRouterParams, requireEventRuntimeConfigInServer };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as noUseNuxtAppInNitro, a as preferValidatedRouterParams, c as noBrowserApiInServer, d as preferH3RedirectResponse, f as noRemovedH3Send, g as noNavigateToInNitro, h as requireEventRuntimeConfigInServer, i as preferAssertMethod, l as noClientComposablesInServer, m as noEventRuntimeConfigInServer, n as preferGetRequestIp, o as preferValidatedQuery, p as noV2Imports, r as preferRouteMethodSuffix, s as preferValidatedBody, t as nitroRulePack, u as preferH3WithBase } from "../../rules-
|
|
1
|
+
import { _ as noUseNuxtAppInNitro, a as preferValidatedRouterParams, c as noBrowserApiInServer, d as preferH3RedirectResponse, f as noRemovedH3Send, g as noNavigateToInNitro, h as requireEventRuntimeConfigInServer, i as preferAssertMethod, l as noClientComposablesInServer, m as noEventRuntimeConfigInServer, n as preferGetRequestIp, o as preferValidatedQuery, p as noV2Imports, r as preferRouteMethodSuffix, s as preferValidatedBody, t as nitroRulePack, u as preferH3WithBase } from "../../rules-BfmRH-w3.mjs";
|
|
2
2
|
export { nitroRulePack, noBrowserApiInServer, noClientComposablesInServer, noEventRuntimeConfigInServer, noNavigateToInNitro, noRemovedH3Send, noUseNuxtAppInNitro, noV2Imports, preferAssertMethod, preferGetRequestIp, preferH3RedirectResponse, preferH3WithBase, preferRouteMethodSuffix, preferValidatedBody, preferValidatedQuery, preferValidatedRouterParams, requireEventRuntimeConfigInServer };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as writeManifest, i as nuxtDoctorModule, n as collectNuxtDoctorExtensions, r as collectNuxtDoctorRulePacks, t as NuxtDoctorModuleOptions } from "../../module-
|
|
1
|
+
import { s as NuxtDoctorManifest } from "../../primitives-8DoGel1u.mjs";
|
|
2
|
+
import { a as writeManifest, i as nuxtDoctorModule, n as collectNuxtDoctorExtensions, r as collectNuxtDoctorRulePacks, t as NuxtDoctorModuleOptions } from "../../module-Cm_Da1lK.mjs";
|
|
3
3
|
export { type NuxtDoctorManifest, NuxtDoctorModuleOptions, collectNuxtDoctorExtensions, collectNuxtDoctorRulePacks, nuxtDoctorModule as default, writeManifest };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as writeManifest, n as collectNuxtDoctorRulePacks, r as nuxtDoctorModule, t as collectNuxtDoctorExtensions } from "../../module-
|
|
1
|
+
import { i as writeManifest, n as collectNuxtDoctorRulePacks, r as nuxtDoctorModule, t as collectNuxtDoctorExtensions } from "../../module-DFUEExm6.mjs";
|
|
2
2
|
export { collectNuxtDoctorExtensions, collectNuxtDoctorRulePacks, nuxtDoctorModule as default, writeManifest };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as writeManifest, i as nuxtDoctorModule, n as collectNuxtDoctorExtensions, r as collectNuxtDoctorRulePacks, t as NuxtDoctorModuleOptions } from "../../module-
|
|
1
|
+
import { s as NuxtDoctorManifest } from "../../primitives-8DoGel1u.mjs";
|
|
2
|
+
import { a as writeManifest, i as nuxtDoctorModule, n as collectNuxtDoctorExtensions, r as collectNuxtDoctorRulePacks, t as NuxtDoctorModuleOptions } from "../../module-Cm_Da1lK.mjs";
|
|
3
3
|
export { type NuxtDoctorManifest, NuxtDoctorModuleOptions, collectNuxtDoctorExtensions, collectNuxtDoctorRulePacks, nuxtDoctorModule as default, writeManifest };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as writeManifest, n as collectNuxtDoctorRulePacks, r as nuxtDoctorModule, t as collectNuxtDoctorExtensions } from "../../module-
|
|
1
|
+
import { i as writeManifest, n as collectNuxtDoctorRulePacks, r as nuxtDoctorModule, t as collectNuxtDoctorExtensions } from "../../module-DFUEExm6.mjs";
|
|
2
2
|
export { collectNuxtDoctorExtensions, collectNuxtDoctorRulePacks, nuxtDoctorModule as default, writeManifest };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../../
|
|
3
|
-
import
|
|
4
|
-
import "../../../index-
|
|
1
|
+
import { d as RulePack, t as DoctorExtension } from "../../../primitives-8DoGel1u.mjs";
|
|
2
|
+
import "../../../extension-DyFj4vXT.mjs";
|
|
3
|
+
import "../../../index-Dx-JzQ3s.mjs";
|
|
4
|
+
import { t as nitroRulePack } from "../../../index-DLp2anMW.mjs";
|
|
5
|
+
import "../../../index-OV2dDmkX.mjs";
|
|
5
6
|
//#region src/rule-packs/nuxt/rules/nuxt/index.d.ts
|
|
6
7
|
declare const nuxtRulePack: RulePack;
|
|
7
8
|
//#endregion
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as nitroRulePack } from "../../../rules-
|
|
2
|
-
import { a as nuxtImageRulePack, c as nuxtScriptsRulePack, d as nuxtRulePack, i as nuxtHubRulePack, l as nuxtUiRulePack, n as nuxtRulePacks, o as nuxtBetterAuthRulePack, r as docusRulePack, s as vueUseRulePack, t as nuxtDoctorExtensions, u as nuxtContentRulePack } from "../../../rules-
|
|
1
|
+
import { t as nitroRulePack } from "../../../rules-BfmRH-w3.mjs";
|
|
2
|
+
import { a as nuxtImageRulePack, c as nuxtScriptsRulePack, d as nuxtRulePack, i as nuxtHubRulePack, l as nuxtUiRulePack, n as nuxtRulePacks, o as nuxtBetterAuthRulePack, r as docusRulePack, s as vueUseRulePack, t as nuxtDoctorExtensions, u as nuxtContentRulePack } from "../../../rules-Cg6CMffp.mjs";
|
|
3
3
|
export { docusRulePack, nitroRulePack, nuxtBetterAuthRulePack, nuxtContentRulePack, nuxtDoctorExtensions, nuxtHubRulePack, nuxtImageRulePack, nuxtRulePack, nuxtRulePacks, nuxtScriptsRulePack, nuxtUiRulePack, vueUseRulePack };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as noRuntimeTypeof, c as noChainedTypeAssertions, i as noUnknownTypeAliases, l as noCallerChosenResultType, n as requireSafetyCommentForTypeAssertion, o as noObjectParameters, r as noUnvalidatedDeserialization, s as noConditionalEmptyObjectSpread, t as typescriptRulePack } from "../../index-
|
|
1
|
+
import { a as noRuntimeTypeof, c as noChainedTypeAssertions, i as noUnknownTypeAliases, l as noCallerChosenResultType, n as requireSafetyCommentForTypeAssertion, o as noObjectParameters, r as noUnvalidatedDeserialization, s as noConditionalEmptyObjectSpread, t as typescriptRulePack } from "../../index-CzHsaAnb.mjs";
|
|
2
2
|
export { noCallerChosenResultType, noChainedTypeAssertions, noConditionalEmptyObjectSpread, noObjectParameters, noRuntimeTypeof, noUnknownTypeAliases, noUnvalidatedDeserialization, requireSafetyCommentForTypeAssertion, typescriptRulePack };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as noRuntimeTypeof, c as noChainedTypeAssertions, i as noUnknownTypeAliases, l as noCallerChosenResultType, n as requireSafetyCommentForTypeAssertion, o as noObjectParameters, r as noUnvalidatedDeserialization, s as noConditionalEmptyObjectSpread, t as typescriptRulePack } from "../../rules-
|
|
2
|
-
import "../../typescript-
|
|
1
|
+
import { a as noRuntimeTypeof, c as noChainedTypeAssertions, i as noUnknownTypeAliases, l as noCallerChosenResultType, n as requireSafetyCommentForTypeAssertion, o as noObjectParameters, r as noUnvalidatedDeserialization, s as noConditionalEmptyObjectSpread, t as typescriptRulePack } from "../../rules-03OSDgOR.mjs";
|
|
2
|
+
import "../../typescript-etB5nu2i.mjs";
|
|
3
3
|
export { noCallerChosenResultType, noChainedTypeAssertions, noConditionalEmptyObjectSpread, noObjectParameters, noRuntimeTypeof, noUnknownTypeAliases, noUnvalidatedDeserialization, requireSafetyCommentForTypeAssertion, typescriptRulePack };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as noRuntimeTypeof, c as noChainedTypeAssertions, i as noUnknownTypeAliases, l as noCallerChosenResultType, n as requireSafetyCommentForTypeAssertion, o as noObjectParameters, r as noUnvalidatedDeserialization, s as noConditionalEmptyObjectSpread, t as typescriptRulePack } from "../../../index-
|
|
1
|
+
import { a as noRuntimeTypeof, c as noChainedTypeAssertions, i as noUnknownTypeAliases, l as noCallerChosenResultType, n as requireSafetyCommentForTypeAssertion, o as noObjectParameters, r as noUnvalidatedDeserialization, s as noConditionalEmptyObjectSpread, t as typescriptRulePack } from "../../../index-CzHsaAnb.mjs";
|
|
2
2
|
export { typescriptRulePack as default, noCallerChosenResultType, noChainedTypeAssertions, noConditionalEmptyObjectSpread, noObjectParameters, noRuntimeTypeof, noUnknownTypeAliases, noUnvalidatedDeserialization, requireSafetyCommentForTypeAssertion };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as noRuntimeTypeof, c as noChainedTypeAssertions, i as noUnknownTypeAliases, l as noCallerChosenResultType, n as requireSafetyCommentForTypeAssertion, o as noObjectParameters, r as noUnvalidatedDeserialization, s as noConditionalEmptyObjectSpread, t as typescriptRulePack } from "../../../rules-
|
|
1
|
+
import { a as noRuntimeTypeof, c as noChainedTypeAssertions, i as noUnknownTypeAliases, l as noCallerChosenResultType, n as requireSafetyCommentForTypeAssertion, o as noObjectParameters, r as noUnvalidatedDeserialization, s as noConditionalEmptyObjectSpread, t as typescriptRulePack } from "../../../rules-03OSDgOR.mjs";
|
|
2
2
|
export { typescriptRulePack as default, noCallerChosenResultType, noChainedTypeAssertions, noConditionalEmptyObjectSpread, noObjectParameters, noRuntimeTypeof, noUnknownTypeAliases, noUnvalidatedDeserialization, requireSafetyCommentForTypeAssertion };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as noUnusedDefine, _ as noUntypedEnv, a as noBroadFsAllow, b as noSecretDefine, c as noDynamicWorkerUrl, d as noDynamicNewUrl, f as noPublicSrcImport, g as noEmptyEnvPrefix, h as noClientSecretPattern, i as requirePluginName, l as noNodeApiInWorker, m as noBroadEnvPrefix, n as preferTransformFilter, o as noDisabledFsStrict, p as noSrcAbsolutePublicUrl, r as requireDisposeForSideEffects, s as noBrowserGlobalInSsrEntry, t as viteRulePack, u as requireWorkerUrlPattern, v as preferDirectImportMetaEnvAccess, x as noUntypedDefine, y as noRuntimeObjectDefine } from "../../index-
|
|
1
|
+
import { S as noUnusedDefine, _ as noUntypedEnv, a as noBroadFsAllow, b as noSecretDefine, c as noDynamicWorkerUrl, d as noDynamicNewUrl, f as noPublicSrcImport, g as noEmptyEnvPrefix, h as noClientSecretPattern, i as requirePluginName, l as noNodeApiInWorker, m as noBroadEnvPrefix, n as preferTransformFilter, o as noDisabledFsStrict, p as noSrcAbsolutePublicUrl, r as requireDisposeForSideEffects, s as noBrowserGlobalInSsrEntry, t as viteRulePack, u as requireWorkerUrlPattern, v as preferDirectImportMetaEnvAccess, x as noUntypedDefine, y as noRuntimeObjectDefine } from "../../index-BjF8I0Dg.mjs";
|
|
2
2
|
export { noBroadEnvPrefix, noBroadFsAllow, noBrowserGlobalInSsrEntry, noClientSecretPattern, noDisabledFsStrict, noDynamicNewUrl, noDynamicWorkerUrl, noEmptyEnvPrefix, noNodeApiInWorker, noPublicSrcImport, noRuntimeObjectDefine, noSecretDefine, noSrcAbsolutePublicUrl, noUntypedDefine, noUntypedEnv, noUnusedDefine, preferDirectImportMetaEnvAccess, preferTransformFilter, requireDisposeForSideEffects, requirePluginName, requireWorkerUrlPattern, viteRulePack };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as noUnusedDefine, _ as noUntypedEnv, a as noBroadFsAllow, b as noSecretDefine, c as noDynamicWorkerUrl, d as noDynamicNewUrl, f as noPublicSrcImport, g as noEmptyEnvPrefix, h as noClientSecretPattern, i as requirePluginName, l as noNodeApiInWorker, m as noBroadEnvPrefix, n as preferTransformFilter, o as noDisabledFsStrict, p as noSrcAbsolutePublicUrl, r as requireDisposeForSideEffects, s as noBrowserGlobalInSsrEntry, t as viteRulePack, u as requireWorkerUrlPattern, v as preferDirectImportMetaEnvAccess, x as noUntypedDefine, y as noRuntimeObjectDefine } from "../../rules-
|
|
1
|
+
import { S as noUnusedDefine, _ as noUntypedEnv, a as noBroadFsAllow, b as noSecretDefine, c as noDynamicWorkerUrl, d as noDynamicNewUrl, f as noPublicSrcImport, g as noEmptyEnvPrefix, h as noClientSecretPattern, i as requirePluginName, l as noNodeApiInWorker, m as noBroadEnvPrefix, n as preferTransformFilter, o as noDisabledFsStrict, p as noSrcAbsolutePublicUrl, r as requireDisposeForSideEffects, s as noBrowserGlobalInSsrEntry, t as viteRulePack, u as requireWorkerUrlPattern, v as preferDirectImportMetaEnvAccess, x as noUntypedDefine, y as noRuntimeObjectDefine } from "../../rules-D228x7hu.mjs";
|
|
2
2
|
export { noBroadEnvPrefix, noBroadFsAllow, noBrowserGlobalInSsrEntry, noClientSecretPattern, noDisabledFsStrict, noDynamicNewUrl, noDynamicWorkerUrl, noEmptyEnvPrefix, noNodeApiInWorker, noPublicSrcImport, noRuntimeObjectDefine, noSecretDefine, noSrcAbsolutePublicUrl, noUntypedDefine, noUntypedEnv, noUnusedDefine, preferDirectImportMetaEnvAccess, preferTransformFilter, requireDisposeForSideEffects, requirePluginName, requireWorkerUrlPattern, viteRulePack };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as noUnusedDefine, _ as noUntypedEnv, a as noBroadFsAllow, b as noSecretDefine, c as noDynamicWorkerUrl, d as noDynamicNewUrl, f as noPublicSrcImport, g as noEmptyEnvPrefix, h as noClientSecretPattern, i as requirePluginName, l as noNodeApiInWorker, m as noBroadEnvPrefix, n as preferTransformFilter, o as noDisabledFsStrict, p as noSrcAbsolutePublicUrl, r as requireDisposeForSideEffects, s as noBrowserGlobalInSsrEntry, t as viteRulePack, u as requireWorkerUrlPattern, v as preferDirectImportMetaEnvAccess, x as noUntypedDefine, y as noRuntimeObjectDefine } from "../../../index-
|
|
1
|
+
import { S as noUnusedDefine, _ as noUntypedEnv, a as noBroadFsAllow, b as noSecretDefine, c as noDynamicWorkerUrl, d as noDynamicNewUrl, f as noPublicSrcImport, g as noEmptyEnvPrefix, h as noClientSecretPattern, i as requirePluginName, l as noNodeApiInWorker, m as noBroadEnvPrefix, n as preferTransformFilter, o as noDisabledFsStrict, p as noSrcAbsolutePublicUrl, r as requireDisposeForSideEffects, s as noBrowserGlobalInSsrEntry, t as viteRulePack, u as requireWorkerUrlPattern, v as preferDirectImportMetaEnvAccess, x as noUntypedDefine, y as noRuntimeObjectDefine } from "../../../index-BjF8I0Dg.mjs";
|
|
2
2
|
export { viteRulePack as default, noBroadEnvPrefix, noBroadFsAllow, noBrowserGlobalInSsrEntry, noClientSecretPattern, noDisabledFsStrict, noDynamicNewUrl, noDynamicWorkerUrl, noEmptyEnvPrefix, noNodeApiInWorker, noPublicSrcImport, noRuntimeObjectDefine, noSecretDefine, noSrcAbsolutePublicUrl, noUntypedDefine, noUntypedEnv, noUnusedDefine, preferDirectImportMetaEnvAccess, preferTransformFilter, requireDisposeForSideEffects, requirePluginName, requireWorkerUrlPattern };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as noUnusedDefine, _ as noUntypedEnv, a as noBroadFsAllow, b as noSecretDefine, c as noDynamicWorkerUrl, d as noDynamicNewUrl, f as noPublicSrcImport, g as noEmptyEnvPrefix, h as noClientSecretPattern, i as requirePluginName, l as noNodeApiInWorker, m as noBroadEnvPrefix, n as preferTransformFilter, o as noDisabledFsStrict, p as noSrcAbsolutePublicUrl, r as requireDisposeForSideEffects, s as noBrowserGlobalInSsrEntry, t as viteRulePack, u as requireWorkerUrlPattern, v as preferDirectImportMetaEnvAccess, x as noUntypedDefine, y as noRuntimeObjectDefine } from "../../../rules-
|
|
1
|
+
import { S as noUnusedDefine, _ as noUntypedEnv, a as noBroadFsAllow, b as noSecretDefine, c as noDynamicWorkerUrl, d as noDynamicNewUrl, f as noPublicSrcImport, g as noEmptyEnvPrefix, h as noClientSecretPattern, i as requirePluginName, l as noNodeApiInWorker, m as noBroadEnvPrefix, n as preferTransformFilter, o as noDisabledFsStrict, p as noSrcAbsolutePublicUrl, r as requireDisposeForSideEffects, s as noBrowserGlobalInSsrEntry, t as viteRulePack, u as requireWorkerUrlPattern, v as preferDirectImportMetaEnvAccess, x as noUntypedDefine, y as noRuntimeObjectDefine } from "../../../rules-D228x7hu.mjs";
|
|
2
2
|
export { viteRulePack as default, noBroadEnvPrefix, noBroadFsAllow, noBrowserGlobalInSsrEntry, noClientSecretPattern, noDisabledFsStrict, noDynamicNewUrl, noDynamicWorkerUrl, noEmptyEnvPrefix, noNodeApiInWorker, noPublicSrcImport, noRuntimeObjectDefine, noSecretDefine, noSrcAbsolutePublicUrl, noUntypedDefine, noUntypedEnv, noUnusedDefine, preferDirectImportMetaEnvAccess, preferTransformFilter, requireDisposeForSideEffects, requirePluginName, requireWorkerUrlPattern };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as htmlButtonHasType, E as definePropsWatchGetter, S as preferUseTemplateRef, T as noRefAsOperand, _ as noAsyncWatchEffectAfterAwaitRead, a as preferComposableRefReturn, b as noBrowserApiInSetup, c as preferDefineModel, d as preferUseIdForStableIds, f as requireLifecycleCleanup, g as requireWatcherCleanup, h as requirePostFlushForDomWatch, i as preferSameNamePropShorthand, l as dataAllowMismatchSurgical, m as preferUseEventListener, n as noUntranslatedText, o as preferTypeProps, p as noMutationInOnUpdated, r as noUnusedTranslations, s as preferPropsDestructureDefaults, t as vueRulePack, u as noRandomOrLocalTimeRender, v as noSetupPropsDestructure, w as noOnWatcherCleanupAfterAwait, x as preferTrueAttributeShorthand, y as restrictVHtml } from "../../rules-
|
|
1
|
+
import { C as htmlButtonHasType, E as definePropsWatchGetter, S as preferUseTemplateRef, T as noRefAsOperand, _ as noAsyncWatchEffectAfterAwaitRead, a as preferComposableRefReturn, b as noBrowserApiInSetup, c as preferDefineModel, d as preferUseIdForStableIds, f as requireLifecycleCleanup, g as requireWatcherCleanup, h as requirePostFlushForDomWatch, i as preferSameNamePropShorthand, l as dataAllowMismatchSurgical, m as preferUseEventListener, n as noUntranslatedText, o as preferTypeProps, p as noMutationInOnUpdated, r as noUnusedTranslations, s as preferPropsDestructureDefaults, t as vueRulePack, u as noRandomOrLocalTimeRender, v as noSetupPropsDestructure, w as noOnWatcherCleanupAfterAwait, x as preferTrueAttributeShorthand, y as restrictVHtml } from "../../rules-BhptD0Ul.mjs";
|
|
2
2
|
export { dataAllowMismatchSurgical, definePropsWatchGetter, htmlButtonHasType, noAsyncWatchEffectAfterAwaitRead, noBrowserApiInSetup, noMutationInOnUpdated, noOnWatcherCleanupAfterAwait, noRandomOrLocalTimeRender, noRefAsOperand, noSetupPropsDestructure, noUntranslatedText, noUnusedTranslations, preferComposableRefReturn, preferDefineModel, preferPropsDestructureDefaults, preferSameNamePropShorthand, preferTrueAttributeShorthand, preferTypeProps, preferUseEventListener, preferUseIdForStableIds, preferUseTemplateRef, requireLifecycleCleanup, requirePostFlushForDomWatch, requireWatcherCleanup, restrictVHtml, vueRulePack };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as htmlButtonHasType, E as definePropsWatchGetter, S as preferUseTemplateRef, T as noRefAsOperand, _ as noAsyncWatchEffectAfterAwaitRead, a as preferComposableRefReturn, b as noBrowserApiInSetup, c as preferDefineModel, d as preferUseIdForStableIds, f as requireLifecycleCleanup, g as requireWatcherCleanup, h as requirePostFlushForDomWatch, i as preferSameNamePropShorthand, l as dataAllowMismatchSurgical, m as preferUseEventListener, n as noUntranslatedText, o as preferTypeProps, p as noMutationInOnUpdated, r as noUnusedTranslations, s as preferPropsDestructureDefaults, t as vueRulePack, u as noRandomOrLocalTimeRender, v as noSetupPropsDestructure, w as noOnWatcherCleanupAfterAwait, x as preferTrueAttributeShorthand, y as restrictVHtml } from "../../rules-
|
|
1
|
+
import { C as htmlButtonHasType, E as definePropsWatchGetter, S as preferUseTemplateRef, T as noRefAsOperand, _ as noAsyncWatchEffectAfterAwaitRead, a as preferComposableRefReturn, b as noBrowserApiInSetup, c as preferDefineModel, d as preferUseIdForStableIds, f as requireLifecycleCleanup, g as requireWatcherCleanup, h as requirePostFlushForDomWatch, i as preferSameNamePropShorthand, l as dataAllowMismatchSurgical, m as preferUseEventListener, n as noUntranslatedText, o as preferTypeProps, p as noMutationInOnUpdated, r as noUnusedTranslations, s as preferPropsDestructureDefaults, t as vueRulePack, u as noRandomOrLocalTimeRender, v as noSetupPropsDestructure, w as noOnWatcherCleanupAfterAwait, x as preferTrueAttributeShorthand, y as restrictVHtml } from "../../rules-298lNPbq.mjs";
|
|
2
2
|
export { dataAllowMismatchSurgical, definePropsWatchGetter, htmlButtonHasType, noAsyncWatchEffectAfterAwaitRead, noBrowserApiInSetup, noMutationInOnUpdated, noOnWatcherCleanupAfterAwait, noRandomOrLocalTimeRender, noRefAsOperand, noSetupPropsDestructure, noUntranslatedText, noUnusedTranslations, preferComposableRefReturn, preferDefineModel, preferPropsDestructureDefaults, preferSameNamePropShorthand, preferTrueAttributeShorthand, preferTypeProps, preferUseEventListener, preferUseIdForStableIds, preferUseTemplateRef, requireLifecycleCleanup, requirePostFlushForDomWatch, requireWatcherCleanup, restrictVHtml, vueRulePack };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as htmlButtonHasType, E as definePropsWatchGetter, S as preferUseTemplateRef, T as noRefAsOperand, _ as noAsyncWatchEffectAfterAwaitRead, a as preferComposableRefReturn, b as noBrowserApiInSetup, c as preferDefineModel, d as preferUseIdForStableIds, f as requireLifecycleCleanup, g as requireWatcherCleanup, h as requirePostFlushForDomWatch, i as preferSameNamePropShorthand, l as dataAllowMismatchSurgical, m as preferUseEventListener, n as noUntranslatedText, o as preferTypeProps, p as noMutationInOnUpdated, r as noUnusedTranslations, s as preferPropsDestructureDefaults, t as vueRulePack, u as noRandomOrLocalTimeRender, v as noSetupPropsDestructure, w as noOnWatcherCleanupAfterAwait, x as preferTrueAttributeShorthand, y as restrictVHtml } from "../../rules-
|
|
1
|
+
import { C as htmlButtonHasType, E as definePropsWatchGetter, S as preferUseTemplateRef, T as noRefAsOperand, _ as noAsyncWatchEffectAfterAwaitRead, a as preferComposableRefReturn, b as noBrowserApiInSetup, c as preferDefineModel, d as preferUseIdForStableIds, f as requireLifecycleCleanup, g as requireWatcherCleanup, h as requirePostFlushForDomWatch, i as preferSameNamePropShorthand, l as dataAllowMismatchSurgical, m as preferUseEventListener, n as noUntranslatedText, o as preferTypeProps, p as noMutationInOnUpdated, r as noUnusedTranslations, s as preferPropsDestructureDefaults, t as vueRulePack, u as noRandomOrLocalTimeRender, v as noSetupPropsDestructure, w as noOnWatcherCleanupAfterAwait, x as preferTrueAttributeShorthand, y as restrictVHtml } from "../../rules-BhptD0Ul.mjs";
|
|
2
2
|
export { dataAllowMismatchSurgical, definePropsWatchGetter, htmlButtonHasType, noAsyncWatchEffectAfterAwaitRead, noBrowserApiInSetup, noMutationInOnUpdated, noOnWatcherCleanupAfterAwait, noRandomOrLocalTimeRender, noRefAsOperand, noSetupPropsDestructure, noUntranslatedText, noUnusedTranslations, preferComposableRefReturn, preferDefineModel, preferPropsDestructureDefaults, preferSameNamePropShorthand, preferTrueAttributeShorthand, preferTypeProps, preferUseEventListener, preferUseIdForStableIds, preferUseTemplateRef, requireLifecycleCleanup, requirePostFlushForDomWatch, requireWatcherCleanup, restrictVHtml, vueRulePack };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as htmlButtonHasType, E as definePropsWatchGetter, S as preferUseTemplateRef, T as noRefAsOperand, _ as noAsyncWatchEffectAfterAwaitRead, a as preferComposableRefReturn, b as noBrowserApiInSetup, c as preferDefineModel, d as preferUseIdForStableIds, f as requireLifecycleCleanup, g as requireWatcherCleanup, h as requirePostFlushForDomWatch, i as preferSameNamePropShorthand, l as dataAllowMismatchSurgical, m as preferUseEventListener, n as noUntranslatedText, o as preferTypeProps, p as noMutationInOnUpdated, r as noUnusedTranslations, s as preferPropsDestructureDefaults, t as vueRulePack, u as noRandomOrLocalTimeRender, v as noSetupPropsDestructure, w as noOnWatcherCleanupAfterAwait, x as preferTrueAttributeShorthand, y as restrictVHtml } from "../../rules-
|
|
1
|
+
import { C as htmlButtonHasType, E as definePropsWatchGetter, S as preferUseTemplateRef, T as noRefAsOperand, _ as noAsyncWatchEffectAfterAwaitRead, a as preferComposableRefReturn, b as noBrowserApiInSetup, c as preferDefineModel, d as preferUseIdForStableIds, f as requireLifecycleCleanup, g as requireWatcherCleanup, h as requirePostFlushForDomWatch, i as preferSameNamePropShorthand, l as dataAllowMismatchSurgical, m as preferUseEventListener, n as noUntranslatedText, o as preferTypeProps, p as noMutationInOnUpdated, r as noUnusedTranslations, s as preferPropsDestructureDefaults, t as vueRulePack, u as noRandomOrLocalTimeRender, v as noSetupPropsDestructure, w as noOnWatcherCleanupAfterAwait, x as preferTrueAttributeShorthand, y as restrictVHtml } from "../../rules-298lNPbq.mjs";
|
|
2
2
|
export { dataAllowMismatchSurgical, definePropsWatchGetter, htmlButtonHasType, noAsyncWatchEffectAfterAwaitRead, noBrowserApiInSetup, noMutationInOnUpdated, noOnWatcherCleanupAfterAwait, noRandomOrLocalTimeRender, noRefAsOperand, noSetupPropsDestructure, noUntranslatedText, noUnusedTranslations, preferComposableRefReturn, preferDefineModel, preferPropsDestructureDefaults, preferSameNamePropShorthand, preferTrueAttributeShorthand, preferTypeProps, preferUseEventListener, preferUseIdForStableIds, preferUseTemplateRef, requireLifecycleCleanup, requirePostFlushForDomWatch, requireWatcherCleanup, restrictVHtml, vueRulePack };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./core-CztxQ3dO.mjs";
|
|
2
|
+
import { a as createRule, l as doctorInternalDiagnostics, n as defineDoctorDiagnostics, r as diagnosticForCode, s as defineRulePack, t as codeForRuleId } from "./diagnostics-OWBdo3Uc.mjs";
|
|
2
3
|
//#region src/rule-packs/typescript/diagnostics.ts
|
|
3
4
|
const typescriptDiagnosticRegistry = defineDoctorDiagnostics([
|
|
4
5
|
{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./core-CztxQ3dO.mjs";
|
|
2
|
+
import { a as createRule, l as doctorInternalDiagnostics, n as defineDoctorDiagnostics, r as diagnosticForCode, s as defineRulePack, t as codeForRuleId } from "./diagnostics-OWBdo3Uc.mjs";
|
|
2
3
|
import { dirname, relative, resolve } from "pathe";
|
|
3
4
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
4
5
|
import { parseSync } from "oxc-parser";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./core-CztxQ3dO.mjs";
|
|
2
|
+
import { a as createRule, l as doctorInternalDiagnostics, n as defineDoctorDiagnostics, r as diagnosticForCode, s as defineRulePack, t as codeForRuleId } from "./diagnostics-OWBdo3Uc.mjs";
|
|
2
3
|
//#region src/rule-packs/nitro/diagnostics.ts
|
|
3
4
|
const nitroDiagnosticRegistry = defineDoctorDiagnostics([
|
|
4
5
|
{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as DoctorRule, d as RulePack } from "./primitives-8DoGel1u.mjs";
|
|
2
|
+
import "./extension-DyFj4vXT.mjs";
|
|
2
3
|
//#region src/rule-packs/vue/rules/vue/define-props-watch-getter.d.ts
|
|
3
4
|
declare const definePropsWatchGetter: DoctorRule;
|
|
4
5
|
//#endregion
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
1
|
+
import "./core-CztxQ3dO.mjs";
|
|
2
|
+
import { a as createRule, l as doctorInternalDiagnostics, n as defineDoctorDiagnostics, o as defineDoctorExtension, r as diagnosticForCode, s as defineRulePack, t as codeForRuleId } from "./diagnostics-OWBdo3Uc.mjs";
|
|
3
|
+
import { b as sourceForNode, t as nitroRulePack, v as findAncestor, x as walkScriptLocal, y as nearestFunctionOrProgram } from "./rules-BfmRH-w3.mjs";
|
|
4
|
+
import "./nitro-FnvPw8Up.mjs";
|
|
5
|
+
import { t as vueRulePack } from "./rules-298lNPbq.mjs";
|
|
5
6
|
import { dirname, isAbsolute, join, relative, resolve } from "pathe";
|
|
6
7
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
7
8
|
//#region src/rule-packs/nuxt/diagnostics.ts
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./core-CztxQ3dO.mjs";
|
|
2
|
+
import { a as createRule, n as defineDoctorDiagnostics, s as defineRulePack } from "./diagnostics-OWBdo3Uc.mjs";
|
|
2
3
|
import { dirname, resolve } from "pathe";
|
|
3
4
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
4
5
|
import { glob } from "node:fs/promises";
|
package/dist/rules.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as noUnusedDefine, _ as noUntypedEnv, a as noBroadFsAllow, b as noSecretDefine, c as noDynamicWorkerUrl, d as noDynamicNewUrl, f as noPublicSrcImport, g as noEmptyEnvPrefix, h as noClientSecretPattern, i as requirePluginName, l as noNodeApiInWorker, m as noBroadEnvPrefix, n as preferTransformFilter, o as noDisabledFsStrict, p as noSrcAbsolutePublicUrl, r as requireDisposeForSideEffects, s as noBrowserGlobalInSsrEntry, t as viteRulePack, u as requireWorkerUrlPattern, v as preferDirectImportMetaEnvAccess, x as noUntypedDefine, y as noRuntimeObjectDefine } from "./index-
|
|
1
|
+
import { S as noUnusedDefine, _ as noUntypedEnv, a as noBroadFsAllow, b as noSecretDefine, c as noDynamicWorkerUrl, d as noDynamicNewUrl, f as noPublicSrcImport, g as noEmptyEnvPrefix, h as noClientSecretPattern, i as requirePluginName, l as noNodeApiInWorker, m as noBroadEnvPrefix, n as preferTransformFilter, o as noDisabledFsStrict, p as noSrcAbsolutePublicUrl, r as requireDisposeForSideEffects, s as noBrowserGlobalInSsrEntry, t as viteRulePack, u as requireWorkerUrlPattern, v as preferDirectImportMetaEnvAccess, x as noUntypedDefine, y as noRuntimeObjectDefine } from "./index-BjF8I0Dg.mjs";
|
|
2
2
|
export { noBroadEnvPrefix, noBroadFsAllow, noBrowserGlobalInSsrEntry, noClientSecretPattern, noDisabledFsStrict, noDynamicNewUrl, noDynamicWorkerUrl, noEmptyEnvPrefix, noNodeApiInWorker, noPublicSrcImport, noRuntimeObjectDefine, noSecretDefine, noSrcAbsolutePublicUrl, noUntypedDefine, noUntypedEnv, noUnusedDefine, preferDirectImportMetaEnvAccess, preferTransformFilter, requireDisposeForSideEffects, requirePluginName, requireWorkerUrlPattern, viteRulePack };
|
package/dist/rules.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { S as noUnusedDefine, _ as noUntypedEnv, a as noBroadFsAllow, b as noSecretDefine, c as noDynamicWorkerUrl, d as noDynamicNewUrl, f as noPublicSrcImport, g as noEmptyEnvPrefix, h as noClientSecretPattern, i as requirePluginName, l as noNodeApiInWorker, m as noBroadEnvPrefix, n as preferTransformFilter, o as noDisabledFsStrict, p as noSrcAbsolutePublicUrl, r as requireDisposeForSideEffects, s as noBrowserGlobalInSsrEntry, t as viteRulePack, u as requireWorkerUrlPattern, v as preferDirectImportMetaEnvAccess, x as noUntypedDefine, y as noRuntimeObjectDefine } from "./rules-
|
|
2
|
-
import "./rules-
|
|
1
|
+
import { S as noUnusedDefine, _ as noUntypedEnv, a as noBroadFsAllow, b as noSecretDefine, c as noDynamicWorkerUrl, d as noDynamicNewUrl, f as noPublicSrcImport, g as noEmptyEnvPrefix, h as noClientSecretPattern, i as requirePluginName, l as noNodeApiInWorker, m as noBroadEnvPrefix, n as preferTransformFilter, o as noDisabledFsStrict, p as noSrcAbsolutePublicUrl, r as requireDisposeForSideEffects, s as noBrowserGlobalInSsrEntry, t as viteRulePack, u as requireWorkerUrlPattern, v as preferDirectImportMetaEnvAccess, x as noUntypedDefine, y as noRuntimeObjectDefine } from "./rules-D228x7hu.mjs";
|
|
2
|
+
import "./rules-htE_WDPD.mjs";
|
|
3
3
|
export { noBroadEnvPrefix, noBroadFsAllow, noBrowserGlobalInSsrEntry, noClientSecretPattern, noDisabledFsStrict, noDynamicNewUrl, noDynamicWorkerUrl, noEmptyEnvPrefix, noNodeApiInWorker, noPublicSrcImport, noRuntimeObjectDefine, noSecretDefine, noSrcAbsolutePublicUrl, noUntypedDefine, noUntypedEnv, noUnusedDefine, preferDirectImportMetaEnvAccess, preferTransformFilter, requireDisposeForSideEffects, requirePluginName, requireWorkerUrlPattern, viteRulePack };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-doctor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "Small Vite Doctor CLI for project diagnostics.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
".": "./dist/index.mjs",
|
|
30
30
|
"./cli": "./dist/cli.mjs",
|
|
31
31
|
"./config": "./dist/config.mjs",
|
|
32
|
+
"./extension": "./dist/extension.mjs",
|
|
32
33
|
"./nuxt": "./dist/nuxt.mjs",
|
|
33
34
|
"./plugin": "./dist/plugin.mjs",
|
|
34
35
|
"./rule-packs/nitro": "./dist/rule-packs/nitro/index.mjs",
|
|
@@ -116,10 +117,12 @@
|
|
|
116
117
|
"deploy": "pnpm run docs:build && pnpm --dir docs exec wrangler deploy --no-bundle",
|
|
117
118
|
"deploy:preview": "pnpm run docs:build && pnpm --dir docs exec wrangler versions upload --preview-alias preview --no-bundle",
|
|
118
119
|
"test": "vp test --passWithNoTests",
|
|
120
|
+
"test:pack": "node scripts/test-packed-cli.mjs",
|
|
119
121
|
"check": "vp check",
|
|
120
|
-
"
|
|
122
|
+
"predoctor": "pnpm build",
|
|
123
|
+
"doctor": "node dist/cli.mjs . --no-cache",
|
|
121
124
|
"release": "bumpp package.json --push --no-push-all",
|
|
122
|
-
"release:check": "vp fmt && pnpm build && vp lint && pnpm test",
|
|
125
|
+
"release:check": "vp fmt && pnpm build && vp lint && pnpm test && pnpm test:pack",
|
|
123
126
|
"release:pack": "mkdir -p artifacts && pnpm build && pnpm pack --pack-destination artifacts",
|
|
124
127
|
"release:publish": "npm publish --access public",
|
|
125
128
|
"release:publish:provenance": "npm publish --provenance --access public"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./index-BJU56z7q.mjs";
|
package/dist/nitro-aRdLgPkY.mjs
DELETED
package/dist/rules-BkrZ1R0E.mjs
DELETED