vite-doctor 0.0.1 → 0.0.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/README.md +126 -0
- package/dist/cli.d.mts +3 -1
- package/dist/cli.mjs +174 -2
- package/dist/{config-D5OZt0fD-B9Flpubz.d.mts → config-B96z9mkv.d.mts} +9 -4
- package/dist/config-Dnzvhp-h.mjs +17 -0
- package/dist/config.d.mts +2 -0
- package/dist/config.mjs +2 -0
- package/dist/{rules-DFU2Qgly.mjs → core-WTY_jAiL.mjs} +1520 -3613
- package/dist/doctor-DfkqNcNR.mjs +112 -0
- package/dist/index-BKZ67WMa.d.mts +1 -0
- package/dist/index-BVVgDSdq.d.mts +1 -0
- package/dist/index-BZ2DY0NT.d.mts +41 -0
- package/dist/index-CFlFH8Pi.d.mts +42 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +3 -2
- package/dist/module-Cy-5RxgV.mjs +176 -0
- package/dist/module-D63348VO.d.mts +33 -0
- package/dist/nitro-D2XxIgEp.mjs +2 -0
- package/dist/nuxt.d.mts +1 -11
- package/dist/nuxt.mjs +1 -165
- package/dist/{plugin-_P7sALMl.mjs → plugin-7rCuA-AZ.mjs} +2 -2
- package/dist/{plugin-vLTZiLbe.d.mts → plugin-CWjUWdmC.d.mts} +2 -2
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.mjs +1 -1
- package/dist/{primitives-DdFGPkcF-ByGjY1Ra.d.mts → primitives-mLCLAmZ3.d.mts} +55 -87
- package/dist/rule-packs/nitro/index.d.mts +2 -0
- package/dist/rule-packs/nitro/index.mjs +3 -0
- package/dist/rule-packs/nitro/rules.d.mts +2 -0
- package/dist/rule-packs/nitro/rules.mjs +2 -0
- package/dist/rule-packs/nuxt/index.d.mts +3 -0
- package/dist/rule-packs/nuxt/index.mjs +2 -0
- package/dist/rule-packs/nuxt/module.d.mts +3 -0
- package/dist/rule-packs/nuxt/module.mjs +2 -0
- package/dist/rule-packs/nuxt/rules/index.d.mts +34 -0
- package/dist/rule-packs/nuxt/rules/index.mjs +3 -0
- package/dist/rule-packs/vite/index.d.mts +2 -0
- package/dist/rule-packs/vite/index.mjs +2 -0
- package/dist/rule-packs/vite/rules/index.d.mts +2 -0
- package/dist/rule-packs/vite/rules/index.mjs +2 -0
- package/dist/rule-packs/vue/index.d.mts +2 -0
- package/dist/rule-packs/vue/index.mjs +2 -0
- package/dist/rule-packs/vue/rules.d.mts +2 -0
- package/dist/rule-packs/vue/rules.mjs +2 -0
- package/dist/rules-BDMsIiOi.mjs +720 -0
- package/dist/rules-BELxdqAV.d.mts +79 -0
- package/dist/rules-BGjZej-N.mjs +2 -0
- package/dist/rules-DBiaAWeX.mjs +1839 -0
- package/dist/{doctor-Bwq3I7XL.mjs → rules-M6yUv7EP.mjs} +166 -2495
- package/dist/rules-cyFhFs4w.mjs +1071 -0
- package/dist/rules.d.mts +1 -40
- package/dist/rules.mjs +2 -1
- package/package.json +56 -19
- package/dist/cli-main-DCJWk1En.mjs +0 -175
- package/dist/cli-main-DZtwLzMZ.d.mts +0 -4
- package/dist/nuxt-cli.d.mts +0 -2
- package/dist/nuxt-cli.mjs +0 -9
package/README.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://vite-doctor.onmax.me/og/doctor-lifeline-bg.png" alt="Vite Doctor" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center"><img src="https://vite-doctor.onmax.me/doctor-icon.png" alt="" width="32" height="32" style="vertical-align: middle;"> Vite Doctor</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">Catch framework bugs AI agents miss. Diagnostics for Nuxt, Vue, Nitro and Vite.</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<code>pnpm dlx vite-doctor .</code>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://vite-doctor.onmax.me">Docs</a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Run Vite Doctor from the project root:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm dlx vite-doctor .
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Vite Doctor reads app code, build config, project metadata, and server handlers to catch framework bugs before review. It picks the Nuxt, Vue, Nitro, or Vite diagnostics that fit your project.
|
|
26
|
+
|
|
27
|
+
Need a narrower Doctor Run? Select exact presets, one Rule, or a framework override:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pnpm dlx vite-doctor . --extends vite/recommended,vue/recommended
|
|
31
|
+
pnpm dlx vite-doctor . --rules nuxt/fetch/no-raw-fetch-in-setup
|
|
32
|
+
pnpm dlx vite-doctor . --framework nitro
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
For Nuxt projects, install Vite Doctor and run it through Nuxt:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pnpm add -D vite-doctor
|
|
39
|
+
pnpm nuxt doctor
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Use `--framework` only when Doctor cannot identify the framework automatically.
|
|
43
|
+
|
|
44
|
+
## Configuration
|
|
45
|
+
|
|
46
|
+
Standalone trusted config files can use the full Doctor config shape:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
// doctor.config.ts
|
|
50
|
+
import { defineDoctorConfig } from "vite-doctor/config";
|
|
51
|
+
|
|
52
|
+
export default defineDoctorConfig({
|
|
53
|
+
rules: {
|
|
54
|
+
"vite/define/no-secret-define": "error",
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Plugin surfaces accept the same policy through host config:
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
// vite.config.ts
|
|
63
|
+
import { doctor } from "vite-doctor";
|
|
64
|
+
|
|
65
|
+
export default {
|
|
66
|
+
plugins: [
|
|
67
|
+
doctor({
|
|
68
|
+
config: {
|
|
69
|
+
rules: {
|
|
70
|
+
"vite/define/no-secret-define": "error",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
}),
|
|
74
|
+
],
|
|
75
|
+
};
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
In Vite config, the same plugin covers Vite, Vue, and Nitro projects. Doctor picks the matching diagnostics automatically:
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
// vite.config.ts
|
|
82
|
+
import { doctor } from "vite-doctor";
|
|
83
|
+
|
|
84
|
+
export default {
|
|
85
|
+
plugins: [doctor()],
|
|
86
|
+
};
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Set `framework: "nitro"` only when Doctor cannot identify the framework automatically:
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
// vite.config.ts
|
|
93
|
+
import { doctor } from "vite-doctor";
|
|
94
|
+
|
|
95
|
+
export default {
|
|
96
|
+
plugins: [doctor({ framework: "nitro" })],
|
|
97
|
+
};
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Use the Nuxt module surface for Nuxt-specific configuration:
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
// nuxt.config.ts
|
|
104
|
+
export default defineNuxtConfig({
|
|
105
|
+
modules: [
|
|
106
|
+
[
|
|
107
|
+
"vite-doctor/nuxt",
|
|
108
|
+
{
|
|
109
|
+
config: {
|
|
110
|
+
rules: {
|
|
111
|
+
"nuxt/routing/prefer-nuxt-useroute": "error",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
],
|
|
117
|
+
});
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Development
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
vp run ready
|
|
124
|
+
vp run -r test
|
|
125
|
+
vp run -r build
|
|
126
|
+
```
|
package/dist/cli.d.mts
CHANGED
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,179 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { c as cleanCache, i as explainRule, n as createReport, r as createRulesReport } from "./core-WTY_jAiL.mjs";
|
|
3
|
+
import { i as viteDoctorVersion, n as shouldFailDoctorRun, r as viteDoctorRulePacks, t as runViteDoctor } from "./doctor-DfkqNcNR.mjs";
|
|
4
|
+
import { resolve } from "pathe";
|
|
5
|
+
import { realpathSync, statSync } from "node:fs";
|
|
4
6
|
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { cac } from "cac";
|
|
8
|
+
import { consola } from "consola";
|
|
9
|
+
//#region src/core/internal/cli.ts
|
|
10
|
+
function parseDoctorArgs(args) {
|
|
11
|
+
const options = {};
|
|
12
|
+
let path = ".";
|
|
13
|
+
for (let index = 0; index < args.length; index++) {
|
|
14
|
+
const arg = args[index];
|
|
15
|
+
if (arg === "--changed") options.changed = true;
|
|
16
|
+
else if (arg === "--types") options.types = true;
|
|
17
|
+
else if (arg === "--threads") options.threads = Number(args[++index]);
|
|
18
|
+
else if (arg === "--coverage") options.coverage = args[++index];
|
|
19
|
+
else if (arg === "--runtime-evidence") options.runtimeEvidence = args[++index];
|
|
20
|
+
else if (arg === "--analyses") options.analyses = args[++index];
|
|
21
|
+
else if (arg === "--emit-graph") options.emitGraph = true;
|
|
22
|
+
else if (arg === "--confidence-min") options.confidenceMin = args[++index];
|
|
23
|
+
else if (arg === "--structural-review") options.structuralReview = true;
|
|
24
|
+
else if (arg === "--no-types") options.types = false;
|
|
25
|
+
else if (arg === "--profile") options.profile = true;
|
|
26
|
+
else if (arg === "--new-only") options.newOnly = true;
|
|
27
|
+
else if (arg === "--update-baseline") options.updateBaseline = true;
|
|
28
|
+
else if (arg === "--cache") options.cache = true;
|
|
29
|
+
else if (arg === "--no-cache") options.cache = false;
|
|
30
|
+
else if (arg === "--fix") options.fix = true;
|
|
31
|
+
else if (arg === "--unsafe-fix") options.unsafeFix = true;
|
|
32
|
+
else if (arg === "--max-warnings") options.maxWarnings = Number(args[++index]);
|
|
33
|
+
else if (arg === "--framework") options.framework = args[++index];
|
|
34
|
+
else if (arg === "--rules") options.rules = args[++index];
|
|
35
|
+
else if (arg === "--severity") options.severity = args[++index];
|
|
36
|
+
else if (arg === "--extends") options.extends = parseExtends(args[++index]);
|
|
37
|
+
else if (arg === "--since") options.since = args[++index];
|
|
38
|
+
else if (arg === "--baseline") options.baseline = args[++index];
|
|
39
|
+
else if (arg === "--format") options.format = args[++index];
|
|
40
|
+
else if (!arg.startsWith("-")) path = arg;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
options,
|
|
44
|
+
path
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function applyDoctorOptions(options, flags) {
|
|
48
|
+
if (flags.changed) options.changed = true;
|
|
49
|
+
if (flags.types) options.types = true;
|
|
50
|
+
if (flags.threads) options.threads = Number(flags.threads);
|
|
51
|
+
options.coverage = stringFlag(flags.coverage) ?? options.coverage;
|
|
52
|
+
options.runtimeEvidence = stringFlag(flags.runtimeEvidence) ?? options.runtimeEvidence;
|
|
53
|
+
options.analyses = stringFlag(flags.analyses) ?? options.analyses;
|
|
54
|
+
if (flags.emitGraph) options.emitGraph = true;
|
|
55
|
+
options.confidenceMin = stringFlag(flags.confidenceMin) ?? options.confidenceMin;
|
|
56
|
+
if (flags.structuralReview) options.structuralReview = true;
|
|
57
|
+
if (flags.types === false) options.types = false;
|
|
58
|
+
if (flags.profile) options.profile = true;
|
|
59
|
+
if (flags.newOnly) options.newOnly = true;
|
|
60
|
+
if (flags.updateBaseline) options.updateBaseline = true;
|
|
61
|
+
if (flags.cache) options.cache = true;
|
|
62
|
+
if (flags.cache === false) options.cache = false;
|
|
63
|
+
if (flags.fix) options.fix = true;
|
|
64
|
+
if (flags.unsafeFix) options.unsafeFix = true;
|
|
65
|
+
if (flags.maxWarnings !== void 0) options.maxWarnings = Number(flags.maxWarnings);
|
|
66
|
+
options.framework = stringFlag(flags.framework) ?? options.framework;
|
|
67
|
+
options.rules = stringFlag(flags.rules) ?? options.rules;
|
|
68
|
+
options.severity = stringFlag(flags.severity) ?? options.severity;
|
|
69
|
+
options.extends = parseExtendsFlag(flags.extends) ?? options.extends;
|
|
70
|
+
options.since = stringFlag(flags.since) ?? options.since;
|
|
71
|
+
options.baseline = stringFlag(flags.baseline) ?? options.baseline;
|
|
72
|
+
options.format = stringFlag(flags.format) ?? options.format;
|
|
73
|
+
}
|
|
74
|
+
function parseExtends(value) {
|
|
75
|
+
if (!value || value === "auto") return "auto";
|
|
76
|
+
return value.split(",").map((item) => item.trim()).filter(Boolean);
|
|
77
|
+
}
|
|
78
|
+
function parseExtendsFlag(value) {
|
|
79
|
+
return typeof value === "string" ? parseExtends(value) : void 0;
|
|
80
|
+
}
|
|
81
|
+
function stringFlag(value) {
|
|
82
|
+
return typeof value === "string" ? value : void 0;
|
|
83
|
+
}
|
|
84
|
+
function normalizeDoctorCommand(args, commands) {
|
|
85
|
+
const first = args.find((arg) => !arg.startsWith("-"));
|
|
86
|
+
if (!first) return ["scan", ...args];
|
|
87
|
+
if (commands.has(first)) return args;
|
|
88
|
+
return ["scan", ...args];
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/cli-main.ts
|
|
92
|
+
const commands = new Set([
|
|
93
|
+
"scan",
|
|
94
|
+
"check",
|
|
95
|
+
"rules",
|
|
96
|
+
"explain",
|
|
97
|
+
"cache"
|
|
98
|
+
]);
|
|
99
|
+
const removedCommands = new Set(["run", "ci"]);
|
|
100
|
+
async function main(args = process.argv.slice(2), cwd = process.cwd()) {
|
|
101
|
+
if (args.includes("--version") || args.includes("-v")) {
|
|
102
|
+
process.stdout.write(`${viteDoctorVersion}\n`);
|
|
103
|
+
return 0;
|
|
104
|
+
}
|
|
105
|
+
if (removedCommands.has(args[0] ?? "")) {
|
|
106
|
+
errorHuman(`vite-doctor ${args[0]} was removed. Use your package manager scripts directly.`);
|
|
107
|
+
return 1;
|
|
108
|
+
}
|
|
109
|
+
let exitCode = 0;
|
|
110
|
+
const cli = cac("vite-doctor");
|
|
111
|
+
addScanCommand(cli, "scan", cwd, (code) => exitCode = code);
|
|
112
|
+
addScanCommand(cli, "check", cwd, (code) => exitCode = code);
|
|
113
|
+
cli.command("rules", "List available Doctor rules.").option("--format <format>", "Machine output: json or sarif.").option("--framework <framework>", "Framework override.").action(async (options) => {
|
|
114
|
+
const runOptions = { root: cwd };
|
|
115
|
+
applyDoctorOptions(runOptions, options);
|
|
116
|
+
process.stdout.write(createRulesReport(await viteDoctorRulePacks(runOptions), runOptions.format));
|
|
117
|
+
});
|
|
118
|
+
cli.command("explain <rule>", "Explain a Doctor rule.").option("--format <format>", "Machine output: json or sarif.").option("--framework <framework>", "Framework override.").action(async (rule, options) => {
|
|
119
|
+
const runOptions = { root: cwd };
|
|
120
|
+
applyDoctorOptions(runOptions, options);
|
|
121
|
+
process.stdout.write(explainRule(await viteDoctorRulePacks(runOptions), rule, runOptions.format));
|
|
122
|
+
});
|
|
123
|
+
cli.command("cache <action>", "Manage Doctor cache.").action((action) => {
|
|
124
|
+
if (action === "clean") {
|
|
125
|
+
cleanCache(cwd);
|
|
126
|
+
consola.log("Doctor cache cleaned");
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
consola.error(`Unknown cache command: ${action}`);
|
|
130
|
+
exitCode = 1;
|
|
131
|
+
});
|
|
132
|
+
cli.help();
|
|
133
|
+
try {
|
|
134
|
+
cli.parse([
|
|
135
|
+
"node",
|
|
136
|
+
"vite-doctor",
|
|
137
|
+
...normalizeDoctorCommand(args, commands)
|
|
138
|
+
], { run: false });
|
|
139
|
+
const result = await cli.runMatchedCommand();
|
|
140
|
+
if (typeof result === "number") exitCode = result;
|
|
141
|
+
return exitCode;
|
|
142
|
+
} catch (error) {
|
|
143
|
+
consola.error(error instanceof Error ? error.message : String(error));
|
|
144
|
+
return 1;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function addScanCommand(cli, name, cwd, setExitCode) {
|
|
148
|
+
cli.command(`${name} [path]`, `Run ${name} diagnostics.`).option("--changed", "Only scan changed files.").option("--types", "Enable type-aware checks.").option("--threads <threads>", "Thread count.").option("--analyses <analyses>", "Analyses to run.").option("--profile", "Include timings.").option("--new-only", "Only report new diagnostics.").option("--cache", "Use cache.").option("--no-cache", "Disable cache.").option("--fix", "Apply safe fixes.").option("--unsafe-fix", "Apply unsafe fixes.").option("--max-warnings <count>", "Maximum warnings.").option("--framework <framework>", "Framework override.").option("--rules <rules>", "Rule selector.").option("--severity <severity>", "Minimum severity.").option("--extends <extends>", "Comma-separated rule-pack presets.").option("--since <ref>", "Git base ref.").option("--baseline <file>", "Baseline file.").option("--format <format>", "Machine output: json or sarif.").option("--config", "Unsupported in vite-doctor.").option("--trusted-config", "Unsupported in vite-doctor.").action(async (path = ".", options) => {
|
|
149
|
+
const parsed = parseDoctorArgs([path]);
|
|
150
|
+
applyDoctorOptions(parsed.options, options);
|
|
151
|
+
if (options.config || options.trustedConfig) {
|
|
152
|
+
errorHuman("Executable config loading was removed from vite-doctor. Use built-in framework auto-activation or vite-doctor/config for trusted config files.");
|
|
153
|
+
setExitCode(1);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
setExitCode(await runScan(parsed.path, parsed.options, cwd));
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
async function runScan(path, options, cwd) {
|
|
160
|
+
const root = resolve(cwd, path);
|
|
161
|
+
if (!statSync(root, { throwIfNoEntry: false })?.isDirectory()) {
|
|
162
|
+
errorHuman(`No readable directory found at ${root}`);
|
|
163
|
+
return 1;
|
|
164
|
+
}
|
|
165
|
+
const result = await runViteDoctor({
|
|
166
|
+
...options,
|
|
167
|
+
root
|
|
168
|
+
});
|
|
169
|
+
process.stdout.write(createReport(result, options.format));
|
|
170
|
+
return shouldFailDoctorRun(result, options.maxWarnings) ? 1 : 0;
|
|
171
|
+
}
|
|
172
|
+
function errorHuman(message) {
|
|
173
|
+
consola.error(message);
|
|
174
|
+
if (process.env.VITEST_WORKER_ID) console.error(message);
|
|
175
|
+
}
|
|
176
|
+
//#endregion
|
|
5
177
|
//#region src/cli.ts
|
|
6
178
|
const currentFile = fileURLToPath(import.meta.url);
|
|
7
179
|
if (process.argv[1] && realpathSync(process.argv[1]) === currentFile) process.exitCode = await main();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { i as DoctorSerializableConfig, n as DoctorFramework, t as DoctorExtension } from "./primitives-
|
|
1
|
+
import { i as DoctorSerializableConfig, n as DoctorFramework, t as DoctorExtension } from "./primitives-mLCLAmZ3.mjs";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
4
|
-
//#region src/config.d.ts
|
|
3
|
+
//#region src/core/config.d.ts
|
|
5
4
|
interface DoctorConfig extends DoctorSerializableConfig {
|
|
6
5
|
extensions?: DoctorExtension[];
|
|
7
6
|
}
|
|
@@ -35,5 +34,11 @@ interface DoctorRunOptions {
|
|
|
35
34
|
maxWarnings?: number;
|
|
36
35
|
extensions?: DoctorExtension[];
|
|
37
36
|
}
|
|
37
|
+
declare function defineDoctorConfig(config: DoctorConfig): DoctorConfig;
|
|
38
|
+
interface LoadDoctorConfigOptions {
|
|
39
|
+
cwd: string;
|
|
40
|
+
defaults?: DoctorConfig;
|
|
41
|
+
}
|
|
42
|
+
declare function loadDoctorConfig(options: LoadDoctorConfigOptions): Promise<DoctorConfig>;
|
|
38
43
|
//#endregion
|
|
39
|
-
export { DoctorRunOptions as n, DoctorConfig as t };
|
|
44
|
+
export { loadDoctorConfig as a, defineDoctorConfig as i, DoctorRunOptions as n, LoadDoctorConfigOptions as r, DoctorConfig as t };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { loadConfig } from "c12";
|
|
2
|
+
import { defu } from "defu";
|
|
3
|
+
//#region src/core/config.ts
|
|
4
|
+
function defineDoctorConfig(config) {
|
|
5
|
+
return config;
|
|
6
|
+
}
|
|
7
|
+
async function loadDoctorConfig(options) {
|
|
8
|
+
return defu((await loadConfig({
|
|
9
|
+
configFile: "doctor.config",
|
|
10
|
+
cwd: options.cwd,
|
|
11
|
+
dotenv: false,
|
|
12
|
+
globalRc: false,
|
|
13
|
+
name: "doctor"
|
|
14
|
+
})).config ?? {}, options.defaults ?? {});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { loadDoctorConfig as n, defineDoctorConfig as t };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as loadDoctorConfig, i as defineDoctorConfig, n as DoctorRunOptions, r as LoadDoctorConfigOptions, t as DoctorConfig } from "./config-B96z9mkv.mjs";
|
|
2
|
+
export { type DoctorConfig, type DoctorRunOptions, type LoadDoctorConfigOptions, defineDoctorConfig, loadDoctorConfig };
|
package/dist/config.mjs
ADDED