vite-doctor 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +2 -2
- package/dist/{config-CXNytHmY.d.mts → config-BUjI8Z-S.d.mts} +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/{core-DIaW0HIr.mjs → core-BFSgtrql.mjs} +11 -3
- package/dist/{doctor-yC2Ke8Ae.mjs → doctor-6AYPdd9f.mjs} +7 -7
- package/dist/index-BhX8IsSY.d.mts +3 -0
- package/dist/{index-DxuqP4UF.d.mts → index-CuZnkOun.d.mts} +1 -1
- package/dist/index-D9d8HxE4.d.mts +1 -0
- package/dist/{index-B8FjkmY1.d.mts → index-Dt29Fkqo.d.mts} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{module-DHwkZLxN.mjs → module--Dgf9XPW.mjs} +30 -4
- package/dist/{module-DtYfgazD.d.mts → module-uWErbEZU.d.mts} +13 -8
- package/dist/nitro-BVeI5VWP.mjs +2 -0
- package/dist/nuxt.d.mts +1 -1
- package/dist/nuxt.mjs +1 -1
- package/dist/{plugin-Dnhz_kMz.d.mts → plugin-Cbc4OqZF.d.mts} +3 -3
- package/dist/{plugin-tOk2jSfx.mjs → plugin-DF-TEW82.mjs} +2 -2
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.mjs +1 -1
- package/dist/{primitives-Nhpqd5ap.d.mts → primitives-BKt7lsYN.d.mts} +24 -0
- 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 +4 -4
- package/dist/rule-packs/nuxt/rules/index.mjs +2 -2
- 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-0AWH0_wP.mjs → rules-BFAxpIuo.mjs} +1 -1
- package/dist/{rules-CQY9fsh1.mjs → rules-BTFofRie.mjs} +56 -12
- package/dist/rules-CHyYwZV9.mjs +2 -0
- package/dist/{rules-D66KCcT1.d.mts → rules-CKaNAD2c.d.mts} +1 -1
- package/dist/{rules-Cp2zeuza.mjs → rules-DYysUGLM.mjs} +1 -1
- package/dist/{rules-DPvqsm4U.mjs → rules-Dfp82SAy.mjs} +1 -1
- package/dist/rules.d.mts +1 -1
- package/dist/rules.mjs +2 -2
- package/package.json +1 -1
- package/dist/index-Benbi54b.d.mts +0 -3
- package/dist/index-xAh4vxLh.d.mts +0 -1
- package/dist/nitro-BRgJaQgL.mjs +0 -2
- package/dist/rules-CPBmmZ0K.mjs +0 -2
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { c as cleanCache, i as explainRule, l as evaluateRuleApplicability, n as createReport, r as createRulesReport, u as detectProject } from "./core-
|
|
3
|
-
import { i as viteDoctorVersion, n as shouldFailDoctorRun, r as viteDoctorRulePacks, t as runViteDoctor } from "./doctor-
|
|
2
|
+
import { c as cleanCache, i as explainRule, l as evaluateRuleApplicability, n as createReport, r as createRulesReport, u as detectProject } from "./core-BFSgtrql.mjs";
|
|
3
|
+
import { i as viteDoctorVersion, n as shouldFailDoctorRun, r as viteDoctorRulePacks, t as runViteDoctor } from "./doctor-6AYPdd9f.mjs";
|
|
4
4
|
import { relative, resolve } from "pathe";
|
|
5
5
|
import { realpathSync, statSync } from "node:fs";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as DoctorSerializableConfig, n as DoctorFramework, s as RuntimeTarget, t as DoctorExtension } from "./primitives-
|
|
1
|
+
import { i as DoctorSerializableConfig, n as DoctorFramework, s as RuntimeTarget, t as DoctorExtension } from "./primitives-BKt7lsYN.mjs";
|
|
2
2
|
//#region src/core/config.d.ts
|
|
3
3
|
interface DoctorConfig extends DoctorSerializableConfig {
|
|
4
4
|
extensions?: DoctorExtension[];
|
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-BUjI8Z-S.mjs";
|
|
2
2
|
export { type DoctorConfig, type DoctorRunOptions, type LoadDoctorConfigOptions, defineDoctorConfig, loadDoctorConfig };
|
|
@@ -194,6 +194,7 @@ function createNuxtProjectInventory(root, manifest, manifestPath, fallbackImport
|
|
|
194
194
|
pluginFiles: (manifest?.pluginFiles ?? []).map((file) => resolve(root, file)),
|
|
195
195
|
keyedComposables: (manifest?.keyedComposables ?? []).map(String),
|
|
196
196
|
aliases: manifest?.aliases ?? {},
|
|
197
|
+
autoImportTransform: manifest?.autoImportTransform,
|
|
197
198
|
appScanRoots: (manifest?.appScanRoots ?? [manifest?.appDir ?? "app"]).map((dir) => resolve(root, dir)),
|
|
198
199
|
sharedScanRoots: (manifest?.sharedScanRoots ?? ["shared/utils", "shared/types"]).map((dir) => resolve(root, dir)),
|
|
199
200
|
hasManifest: Boolean(manifestPath),
|
|
@@ -266,9 +267,7 @@ function resolveNuxtCompatibility(root, graph, manifest) {
|
|
|
266
267
|
if (!graph.packages.nuxt) return void 0;
|
|
267
268
|
const config = readNuxtConfig(root);
|
|
268
269
|
const manifestGeneratedAt = manifest?.generatedAt ? Date.parse(manifest.generatedAt) : NaN;
|
|
269
|
-
|
|
270
|
-
const manifestMatchesConfig = configModifiedAt === void 0 || (Number.isFinite(manifest?.nuxtConfigMtimeMs) ? manifest?.nuxtConfigMtimeMs === configModifiedAt : manifestGeneratedAt >= configModifiedAt);
|
|
271
|
-
if (Number.isFinite(manifestGeneratedAt) && isSupportedNuxtCompatibility(manifest?.compatibilityVersion) && manifestMatchesConfig) return {
|
|
270
|
+
if (Number.isFinite(manifestGeneratedAt) && isSupportedNuxtCompatibility(manifest?.compatibilityVersion) && isNuxtManifestCurrent(root, manifest)) return {
|
|
272
271
|
state: "resolved",
|
|
273
272
|
version: manifest.compatibilityVersion,
|
|
274
273
|
provenance: "manifest"
|
|
@@ -300,6 +299,13 @@ function resolveNuxtCompatibility(root, graph, manifest) {
|
|
|
300
299
|
provenance: "default"
|
|
301
300
|
};
|
|
302
301
|
}
|
|
302
|
+
function isNuxtManifestCurrent(root, manifest) {
|
|
303
|
+
if (!manifest?.generatedAt || !Number.isFinite(Date.parse(manifest.generatedAt))) return false;
|
|
304
|
+
const config = readNuxtConfig(root);
|
|
305
|
+
const configModifiedAt = config ? configModifiedTime(config.file) : void 0;
|
|
306
|
+
if (configModifiedAt === void 0) return true;
|
|
307
|
+
return Number.isFinite(manifest.nuxtConfigMtimeMs) ? manifest.nuxtConfigMtimeMs === configModifiedAt : Date.parse(manifest.generatedAt) >= configModifiedAt;
|
|
308
|
+
}
|
|
303
309
|
function isSupportedNuxtCompatibility(value) {
|
|
304
310
|
return value === 4 || value === 5;
|
|
305
311
|
}
|
|
@@ -605,6 +611,8 @@ async function normalizeNuxtProject(root, version, deps, manifest, manifestPath)
|
|
|
605
611
|
version: cleanVersion(manifest?.nuxtVersion ?? version),
|
|
606
612
|
appDir: resolve(root, manifest?.appDir ?? (existsSync(join(root, "app")) ? "app" : ".")),
|
|
607
613
|
appRoots: manifest?.layers?.length ? manifest.layers.map((layer) => resolve(root, layer.root)).sort() : await detectNuxtAppRoots(root),
|
|
614
|
+
autoImportEnabled: manifest ? manifest.autoImportEnabled === true : true,
|
|
615
|
+
autoImportsAuthoritative: manifest?.autoImportEnabled !== void 0 && isNuxtManifestCurrent(root, manifest),
|
|
608
616
|
autoImports: new Map((manifest?.autoImports ?? coreAutoImports()).map((entry) => [entry.as ?? entry.name, entry])),
|
|
609
617
|
components: new Map((manifest?.components ?? []).map((component) => [component.name, component])),
|
|
610
618
|
layers: manifest?.layers ?? [{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { f as defineDoctorExtension, t as runDoctor } from "./core-
|
|
2
|
-
import { t as nitroRulePack } from "./rules-
|
|
3
|
-
import "./nitro-
|
|
4
|
-
import { t as vueRulePack } from "./rules-
|
|
5
|
-
import { n as nuxtRulePacks, t as nuxtDoctorExtensions } from "./rules-
|
|
6
|
-
import { t as viteRulePack } from "./rules-
|
|
7
|
-
import "./rules-
|
|
1
|
+
import { f as defineDoctorExtension, t as runDoctor } from "./core-BFSgtrql.mjs";
|
|
2
|
+
import { t as nitroRulePack } from "./rules-DYysUGLM.mjs";
|
|
3
|
+
import "./nitro-BVeI5VWP.mjs";
|
|
4
|
+
import { t as vueRulePack } from "./rules-Dfp82SAy.mjs";
|
|
5
|
+
import { n as nuxtRulePacks, t as nuxtDoctorExtensions } from "./rules-BTFofRie.mjs";
|
|
6
|
+
import { t as viteRulePack } from "./rules-BFAxpIuo.mjs";
|
|
7
|
+
import "./rules-CHyYwZV9.mjs";
|
|
8
8
|
import { join } from "pathe";
|
|
9
9
|
import { existsSync, readFileSync } from "node:fs";
|
|
10
10
|
//#region src/version.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as RulePack, r as DoctorRule } from "./primitives-
|
|
1
|
+
import { o as RulePack, r as DoctorRule } from "./primitives-BKt7lsYN.mjs";
|
|
2
2
|
//#region src/rule-packs/vite/rules/define.d.ts
|
|
3
3
|
declare const noUnusedDefine: DoctorRule;
|
|
4
4
|
declare const noUntypedDefine: DoctorRule;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index-Dt29Fkqo.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as RulePack, r as DoctorRule } from "./primitives-
|
|
1
|
+
import { o as RulePack, r as DoctorRule } from "./primitives-BKt7lsYN.mjs";
|
|
2
2
|
//#region src/rule-packs/nitro/rules/no-use-nuxt-app-in-nitro.d.ts
|
|
3
3
|
declare const noUseNuxtAppInNitro: DoctorRule;
|
|
4
4
|
//#endregion
|
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-BUjI8Z-S.mjs";
|
|
2
|
+
import { n as doctor, t as ViteDoctorSurfaceOptions } from "./plugin-Cbc4OqZF.mjs";
|
|
3
3
|
export { type DoctorConfig, type DoctorRunOptions, type ViteDoctorSurfaceOptions, defineDoctorConfig, doctor };
|
package/dist/index.mjs
CHANGED
|
@@ -12,8 +12,12 @@ async function nuxtDoctorModule(options = {}, nuxt) {
|
|
|
12
12
|
prerenderRoutes: /* @__PURE__ */ new Set(),
|
|
13
13
|
buildManifest: void 0,
|
|
14
14
|
componentDirs: [],
|
|
15
|
-
importDirs: []
|
|
15
|
+
importDirs: [],
|
|
16
|
+
autoImportContext: void 0
|
|
16
17
|
};
|
|
18
|
+
nuxt.hook?.("imports:context", (context) => {
|
|
19
|
+
evidence.autoImportContext = context;
|
|
20
|
+
});
|
|
17
21
|
nuxt.hook?.("pages:resolved", (pages) => {
|
|
18
22
|
evidence.pages = flattenPages(pages).map((page) => ({
|
|
19
23
|
path: page.path,
|
|
@@ -64,7 +68,8 @@ async function collectNuxtDoctorExtensions(nuxt) {
|
|
|
64
68
|
async function writeManifest(nuxt, evidence) {
|
|
65
69
|
const rootDir = resolve(nuxt.options.rootDir ?? process.cwd());
|
|
66
70
|
const buildDir = resolve(rootDir, nuxt.options.buildDir ?? ".nuxt");
|
|
67
|
-
const
|
|
71
|
+
const srcDir = resolve(rootDir, nuxt.options.srcDir ?? ".");
|
|
72
|
+
const appDir = srcDir;
|
|
68
73
|
const moduleSources = [];
|
|
69
74
|
await nuxt.callHook?.("doctor:extendSources", moduleSources);
|
|
70
75
|
const modules = toArray(nuxt.options.modules).map((entry) => ({
|
|
@@ -72,16 +77,19 @@ async function writeManifest(nuxt, evidence) {
|
|
|
72
77
|
version: entry?.meta?.version,
|
|
73
78
|
doctorPlugin: entry?.doctor?.plugin
|
|
74
79
|
}));
|
|
80
|
+
const resolvedAutoImports = evidence?.autoImportContext?.getImports ? await evidence.autoImportContext.getImports() : toArray(nuxt.options.imports?.imports);
|
|
75
81
|
const manifest = {
|
|
76
82
|
nuxtConfigMtimeMs: nuxtConfigModifiedAt(rootDir),
|
|
77
83
|
nuxtVersion: nuxt._version ?? nuxt.version ?? "4",
|
|
78
84
|
vueVersion: nuxt.options.vue?.version ?? "3.5",
|
|
79
85
|
compatibilityVersion: nuxt.options.future?.compatibilityVersion,
|
|
80
86
|
rootDir,
|
|
81
|
-
srcDir
|
|
87
|
+
srcDir,
|
|
82
88
|
appDir,
|
|
83
89
|
buildDir,
|
|
84
|
-
|
|
90
|
+
autoImportEnabled: nuxt.options.imports?.autoImport !== false,
|
|
91
|
+
autoImportTransform: serializeImportTransform(nuxt.options.imports?.transform),
|
|
92
|
+
autoImports: normalizeAutoImports(resolvedAutoImports),
|
|
85
93
|
components: toArray(nuxt.options.components ?? nuxt._components),
|
|
86
94
|
layers: toArray(nuxt.options._layers ?? [{ cwd: rootDir }]).map((layer, index) => ({
|
|
87
95
|
root: resolve(layer.cwd ?? layer.config?.rootDir ?? rootDir),
|
|
@@ -157,6 +165,24 @@ function toArray(value) {
|
|
|
157
165
|
function normalizeDirs(rootDir, dirs) {
|
|
158
166
|
return dirs.map((dir) => typeof dir === "string" ? dir : dir?.path).filter(Boolean).map((dir) => resolve(rootDir, dir));
|
|
159
167
|
}
|
|
168
|
+
function normalizeAutoImports(imports) {
|
|
169
|
+
return imports.map((entry) => ({
|
|
170
|
+
name: entry?.name,
|
|
171
|
+
as: entry?.as,
|
|
172
|
+
from: entry?.from,
|
|
173
|
+
type: entry?.type === true || void 0
|
|
174
|
+
})).filter((entry) => entry.name && entry.from);
|
|
175
|
+
}
|
|
176
|
+
function serializeImportTransform(transform) {
|
|
177
|
+
const serialize = (patterns) => patterns.filter((pattern) => pattern instanceof RegExp).map(({ source, flags }) => ({
|
|
178
|
+
source,
|
|
179
|
+
flags
|
|
180
|
+
}));
|
|
181
|
+
return {
|
|
182
|
+
include: serialize(toArray(transform?.include)),
|
|
183
|
+
exclude: serialize(toArray(transform?.exclude))
|
|
184
|
+
};
|
|
185
|
+
}
|
|
160
186
|
function normalizePluginFiles(rootDir, plugins) {
|
|
161
187
|
return plugins.map((plugin) => typeof plugin === "string" ? plugin : plugin?.src ?? plugin?.file).filter(Boolean).map((file) => resolve(rootDir, file));
|
|
162
188
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as NuxtDoctorManifest, o as RulePack, t as DoctorExtension } from "./primitives-
|
|
2
|
-
import { t as DoctorConfig } from "./config-
|
|
3
|
-
import "./index-
|
|
1
|
+
import { a as NuxtDoctorManifest, o as RulePack, t as DoctorExtension } from "./primitives-BKt7lsYN.mjs";
|
|
2
|
+
import { t as DoctorConfig } from "./config-BUjI8Z-S.mjs";
|
|
3
|
+
import "./index-BhX8IsSY.mjs";
|
|
4
4
|
//#region src/rule-packs/nuxt/module.d.ts
|
|
5
5
|
interface NuxtDoctorModuleOptions {
|
|
6
6
|
config?: DoctorConfig;
|
|
@@ -16,10 +16,10 @@ type EvidenceBuildManifest = {
|
|
|
16
16
|
isDynamicEntry?: boolean;
|
|
17
17
|
}>;
|
|
18
18
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
type NuxtAutoImportContext = {
|
|
20
|
+
getImports?: () => Promise<unknown[]> | unknown[];
|
|
21
|
+
};
|
|
22
|
+
type NuxtDoctorEvidence = {
|
|
23
23
|
pages?: Array<{
|
|
24
24
|
path?: string;
|
|
25
25
|
file?: string;
|
|
@@ -29,6 +29,11 @@ declare function writeManifest(nuxt: any, evidence?: {
|
|
|
29
29
|
buildManifest?: EvidenceBuildManifest;
|
|
30
30
|
componentDirs?: unknown[];
|
|
31
31
|
importDirs?: unknown[];
|
|
32
|
-
|
|
32
|
+
autoImportContext?: NuxtAutoImportContext;
|
|
33
|
+
};
|
|
34
|
+
declare function nuxtDoctorModule(options: NuxtDoctorModuleOptions | undefined, nuxt: any): Promise<void>;
|
|
35
|
+
declare function collectNuxtDoctorRulePacks(nuxt: any): Promise<RulePack[]>;
|
|
36
|
+
declare function collectNuxtDoctorExtensions(nuxt: any): Promise<DoctorExtension[]>;
|
|
37
|
+
declare function writeManifest(nuxt: any, evidence?: NuxtDoctorEvidence): Promise<NuxtDoctorManifest>;
|
|
33
38
|
//#endregion
|
|
34
39
|
export { writeManifest as a, nuxtDoctorModule as i, collectNuxtDoctorExtensions as n, collectNuxtDoctorRulePacks as r, NuxtDoctorModuleOptions as t };
|
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-uWErbEZU.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--Dgf9XPW.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-BKt7lsYN.mjs";
|
|
2
|
+
import { n as DoctorRunOptions, t as DoctorConfig } from "./config-BUjI8Z-S.mjs";
|
|
3
|
+
import "./index-BhX8IsSY.mjs";
|
|
4
4
|
import { Plugin } from "vite";
|
|
5
5
|
//#region src/plugin.d.ts
|
|
6
6
|
interface ViteDoctorSurfaceOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as defineDoctorExtension, n as createReport } from "./core-
|
|
2
|
-
import { n as shouldFailDoctorRun, t as runViteDoctor } from "./doctor-
|
|
1
|
+
import { f as defineDoctorExtension, n as createReport } from "./core-BFSgtrql.mjs";
|
|
2
|
+
import { n as shouldFailDoctorRun, t as runViteDoctor } from "./doctor-6AYPdd9f.mjs";
|
|
3
3
|
import { resolve } from "pathe";
|
|
4
4
|
//#region src/plugin.ts
|
|
5
5
|
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-Cbc4OqZF.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-DF-TEW82.mjs";
|
|
2
2
|
export { doctor };
|
|
@@ -174,11 +174,14 @@ interface AutoImportEntry {
|
|
|
174
174
|
from: string;
|
|
175
175
|
kind: "nuxt" | "vue" | "module" | "app" | "layer";
|
|
176
176
|
sourceLayer?: string;
|
|
177
|
+
type?: boolean;
|
|
177
178
|
}
|
|
178
179
|
interface NuxtProjectInfo {
|
|
179
180
|
version: string;
|
|
180
181
|
appDir: string;
|
|
181
182
|
appRoots: string[];
|
|
183
|
+
autoImportEnabled: boolean;
|
|
184
|
+
autoImportsAuthoritative: boolean;
|
|
182
185
|
autoImports: Map<string, AutoImportEntry>;
|
|
183
186
|
components: Map<string, {
|
|
184
187
|
name: string;
|
|
@@ -212,6 +215,16 @@ interface NuxtProjectInfo {
|
|
|
212
215
|
pluginFiles: string[];
|
|
213
216
|
keyedComposables: string[];
|
|
214
217
|
aliases: Record<string, string>;
|
|
218
|
+
autoImportTransform?: {
|
|
219
|
+
include: Array<{
|
|
220
|
+
source: string;
|
|
221
|
+
flags: string;
|
|
222
|
+
}>;
|
|
223
|
+
exclude: Array<{
|
|
224
|
+
source: string;
|
|
225
|
+
flags: string;
|
|
226
|
+
}>;
|
|
227
|
+
};
|
|
215
228
|
appScanRoots: string[];
|
|
216
229
|
sharedScanRoots: string[];
|
|
217
230
|
hasManifest: boolean;
|
|
@@ -257,6 +270,17 @@ interface NuxtDoctorManifest {
|
|
|
257
270
|
srcDir: string;
|
|
258
271
|
appDir: string;
|
|
259
272
|
buildDir: string;
|
|
273
|
+
autoImportEnabled?: boolean;
|
|
274
|
+
autoImportTransform?: {
|
|
275
|
+
include: Array<{
|
|
276
|
+
source: string;
|
|
277
|
+
flags: string;
|
|
278
|
+
}>;
|
|
279
|
+
exclude: Array<{
|
|
280
|
+
source: string;
|
|
281
|
+
flags: string;
|
|
282
|
+
}>;
|
|
283
|
+
};
|
|
260
284
|
autoImports: unknown[];
|
|
261
285
|
components: unknown[];
|
|
262
286
|
layers: Array<{
|
|
@@ -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-Dt29Fkqo.mjs";
|
|
2
|
+
import "../../index-D9d8HxE4.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-DYysUGLM.mjs";
|
|
2
|
+
import "../../nitro-BVeI5VWP.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-Dt29Fkqo.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-DYysUGLM.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 { a as NuxtDoctorManifest } from "../../primitives-
|
|
2
|
-
import { a as writeManifest, i as nuxtDoctorModule, n as collectNuxtDoctorExtensions, r as collectNuxtDoctorRulePacks, t as NuxtDoctorModuleOptions } from "../../module-
|
|
1
|
+
import { a as NuxtDoctorManifest } from "../../primitives-BKt7lsYN.mjs";
|
|
2
|
+
import { a as writeManifest, i as nuxtDoctorModule, n as collectNuxtDoctorExtensions, r as collectNuxtDoctorRulePacks, t as NuxtDoctorModuleOptions } from "../../module-uWErbEZU.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--Dgf9XPW.mjs";
|
|
2
2
|
export { collectNuxtDoctorExtensions, collectNuxtDoctorRulePacks, nuxtDoctorModule as default, writeManifest };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as NuxtDoctorManifest } from "../../primitives-
|
|
2
|
-
import { a as writeManifest, i as nuxtDoctorModule, n as collectNuxtDoctorExtensions, r as collectNuxtDoctorRulePacks, t as NuxtDoctorModuleOptions } from "../../module-
|
|
1
|
+
import { a as NuxtDoctorManifest } from "../../primitives-BKt7lsYN.mjs";
|
|
2
|
+
import { a as writeManifest, i as nuxtDoctorModule, n as collectNuxtDoctorExtensions, r as collectNuxtDoctorRulePacks, t as NuxtDoctorModuleOptions } from "../../module-uWErbEZU.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--Dgf9XPW.mjs";
|
|
2
2
|
export { collectNuxtDoctorExtensions, collectNuxtDoctorRulePacks, nuxtDoctorModule as default, writeManifest };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { o as RulePack, t as DoctorExtension } from "../../../primitives-
|
|
2
|
-
import "../../../index-
|
|
3
|
-
import { t as nitroRulePack } from "../../../index-
|
|
4
|
-
import "../../../index-
|
|
1
|
+
import { o as RulePack, t as DoctorExtension } from "../../../primitives-BKt7lsYN.mjs";
|
|
2
|
+
import "../../../index-BhX8IsSY.mjs";
|
|
3
|
+
import { t as nitroRulePack } from "../../../index-Dt29Fkqo.mjs";
|
|
4
|
+
import "../../../index-D9d8HxE4.mjs";
|
|
5
5
|
//#region src/rule-packs/nuxt/rules/nuxt/index.d.ts
|
|
6
6
|
declare const nuxtRulePack: RulePack;
|
|
7
7
|
//#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-DYysUGLM.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-BTFofRie.mjs";
|
|
3
3
|
export { docusRulePack, nitroRulePack, nuxtBetterAuthRulePack, nuxtContentRulePack, nuxtDoctorExtensions, nuxtHubRulePack, nuxtImageRulePack, nuxtRulePack, nuxtRulePacks, nuxtScriptsRulePack, nuxtUiRulePack, vueUseRulePack };
|
|
@@ -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-CuZnkOun.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-BFAxpIuo.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-CuZnkOun.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-BFAxpIuo.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-CKaNAD2c.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-Dfp82SAy.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-CKaNAD2c.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-Dfp82SAy.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,4 @@
|
|
|
1
|
-
import { d as createRule, o as defineDoctorDiagnostics, p as defineRulePack } from "./core-
|
|
1
|
+
import { d as createRule, o as defineDoctorDiagnostics, p as defineRulePack } from "./core-BFSgtrql.mjs";
|
|
2
2
|
import { dirname, resolve } from "pathe";
|
|
3
3
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
4
4
|
import { glob } from "node:fs/promises";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as codeForRuleId, d as createRule, f as defineDoctorExtension, m as doctorInternalDiagnostics, o as defineDoctorDiagnostics, p as defineRulePack, s as diagnosticForCode } from "./core-
|
|
2
|
-
import { b as sourceForNode, t as nitroRulePack, v as findAncestor, x as walkScriptLocal, y as nearestFunctionOrProgram } from "./rules-
|
|
3
|
-
import "./nitro-
|
|
4
|
-
import { t as vueRulePack } from "./rules-
|
|
5
|
-
import { join, relative } from "pathe";
|
|
1
|
+
import { a as codeForRuleId, d as createRule, f as defineDoctorExtension, m as doctorInternalDiagnostics, o as defineDoctorDiagnostics, p as defineRulePack, s as diagnosticForCode } from "./core-BFSgtrql.mjs";
|
|
2
|
+
import { b as sourceForNode, t as nitroRulePack, v as findAncestor, x as walkScriptLocal, y as nearestFunctionOrProgram } from "./rules-DYysUGLM.mjs";
|
|
3
|
+
import "./nitro-BVeI5VWP.mjs";
|
|
4
|
+
import { t as vueRulePack } from "./rules-Dfp82SAy.mjs";
|
|
5
|
+
import { dirname, isAbsolute, join, relative, resolve } from "pathe";
|
|
6
6
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
7
7
|
//#region src/rule-packs/nuxt/diagnostics.ts
|
|
8
8
|
const nuxtDiagnosticRegistry = defineDoctorDiagnostics([
|
|
@@ -825,9 +825,9 @@ function isObviouslyUnstableKeyNode(node, source) {
|
|
|
825
825
|
const noExplicitAutoImport = createRule({
|
|
826
826
|
meta: {
|
|
827
827
|
id: "nuxt/imports/no-explicit-auto-import",
|
|
828
|
-
title: "
|
|
828
|
+
title: "Use configured Nuxt auto-imports directly",
|
|
829
829
|
category: "imports",
|
|
830
|
-
severity: "
|
|
830
|
+
severity: "warn",
|
|
831
831
|
fixable: "safe",
|
|
832
832
|
docsUrl: "https://nuxt.com/docs/4.x/guide/concepts/auto-imports#explicit-imports",
|
|
833
833
|
requires: {
|
|
@@ -837,16 +837,27 @@ const noExplicitAutoImport = createRule({
|
|
|
837
837
|
},
|
|
838
838
|
create(ctx) {
|
|
839
839
|
return { ImportDeclaration(node) {
|
|
840
|
-
if (
|
|
841
|
-
|
|
840
|
+
if (!isNuxtRuntimeFile(ctx) || !ctx.project.nuxt?.autoImportEnabled || !ctx.project.nuxt.autoImportsAuthoritative) return;
|
|
841
|
+
if (!isAutoImportTransformEnabled(ctx.file.path, ctx.project.nuxt.manifest)) return;
|
|
842
|
+
const source = String(node.source?.value ?? "");
|
|
843
|
+
const specifiers = node.specifiers?.filter((specifier) => {
|
|
844
|
+
if (specifier.type !== "ImportSpecifier") return false;
|
|
845
|
+
if (node.importKind === "type" || specifier.importKind === "type") return false;
|
|
846
|
+
const imported = String(specifier.imported?.name ?? specifier.imported?.value ?? "");
|
|
847
|
+
const local = String(specifier.local?.name ?? imported);
|
|
848
|
+
const entry = ctx.project.nuxt?.autoImports.get(source === "#imports" ? imported : local);
|
|
849
|
+
if (!entry || entry.type) return false;
|
|
850
|
+
if (source === "#imports") return local === imported && imported === (entry.as ?? entry.name);
|
|
851
|
+
return imported === entry.name && local === (entry.as ?? entry.name) && sameImportSource(ctx, source, entry.from);
|
|
852
|
+
}) ?? [];
|
|
842
853
|
if (!specifiers.length) return;
|
|
843
854
|
const all = specifiers.length === node.specifiers.length;
|
|
844
855
|
ctx.report(diagnostics.NUXT0036({
|
|
845
|
-
why: "This imports symbols that Nuxt
|
|
846
|
-
fix: "Remove the explicit
|
|
856
|
+
why: "This imports symbols that Nuxt is configured to auto-import in this file.",
|
|
857
|
+
fix: "Remove the explicit import when all specifiers are auto-imported."
|
|
847
858
|
}), {
|
|
848
859
|
ruleId: "nuxt/imports/no-explicit-auto-import",
|
|
849
|
-
severity:
|
|
860
|
+
severity: ctx.severity,
|
|
850
861
|
category: "imports",
|
|
851
862
|
file: ctx.file.path,
|
|
852
863
|
range: ctx.range(node),
|
|
@@ -864,6 +875,39 @@ const noExplicitAutoImport = createRule({
|
|
|
864
875
|
} };
|
|
865
876
|
}
|
|
866
877
|
});
|
|
878
|
+
function sameImportSource(ctx, source, autoImportSource) {
|
|
879
|
+
const explicit = resolveImportSource(ctx, source);
|
|
880
|
+
const automatic = resolveImportSource(ctx, autoImportSource);
|
|
881
|
+
return explicit && automatic ? explicit === automatic : source === autoImportSource;
|
|
882
|
+
}
|
|
883
|
+
function resolveImportSource(ctx, source) {
|
|
884
|
+
if (isAbsolute(source)) return canonicalPath(source);
|
|
885
|
+
if (source.startsWith("~~/") || source.startsWith("@@/")) return canonicalPath(resolve(ctx.project.root, source.slice(3)));
|
|
886
|
+
if (source.startsWith("~/") || source.startsWith("@/")) return canonicalPath(resolve(ctx.project.nuxt.appDir, source.slice(2)));
|
|
887
|
+
if (source.startsWith(".")) return canonicalPath(resolve(dirname(ctx.file.path), source));
|
|
888
|
+
const aliases = Object.entries(ctx.project.nuxt.manifest?.aliases ?? {}).sort(([left], [right]) => right.length - left.length);
|
|
889
|
+
for (const [alias, target] of aliases) {
|
|
890
|
+
if (source !== alias && !source.startsWith(`${alias}/`)) continue;
|
|
891
|
+
return canonicalPath(resolve(String(target), source.slice(alias.length).replace(/^\//, "")));
|
|
892
|
+
}
|
|
893
|
+
return null;
|
|
894
|
+
}
|
|
895
|
+
function canonicalPath(path) {
|
|
896
|
+
return toPosixPath(resolve(path)).replace(/\.(?:[cm]?[jt]sx?|vue)$/, "").replace(/\/index$/, "");
|
|
897
|
+
}
|
|
898
|
+
function isAutoImportTransformEnabled(file, manifest) {
|
|
899
|
+
const transform = manifest?.autoImportTransform;
|
|
900
|
+
if (!transform) return true;
|
|
901
|
+
if (transform.include.some((pattern) => matchesPattern(file, pattern))) return true;
|
|
902
|
+
return !transform.exclude.some((pattern) => matchesPattern(file, pattern));
|
|
903
|
+
}
|
|
904
|
+
function matchesPattern(file, pattern) {
|
|
905
|
+
try {
|
|
906
|
+
return new RegExp(pattern.source, pattern.flags).test(file);
|
|
907
|
+
} catch {
|
|
908
|
+
return false;
|
|
909
|
+
}
|
|
910
|
+
}
|
|
867
911
|
//#endregion
|
|
868
912
|
//#region src/rule-packs/nuxt/rules/nuxt/no-conflicting-use-fetch-import.ts
|
|
869
913
|
const noConflictingUseFetchImport = createRule({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as RulePack, r as DoctorRule } from "./primitives-
|
|
1
|
+
import { o as RulePack, r as DoctorRule } from "./primitives-BKt7lsYN.mjs";
|
|
2
2
|
//#region src/rule-packs/vue/rules/vue/define-props-watch-getter.d.ts
|
|
3
3
|
declare const definePropsWatchGetter: DoctorRule;
|
|
4
4
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as codeForRuleId, d as createRule, m as doctorInternalDiagnostics, o as defineDoctorDiagnostics, p as defineRulePack, s as diagnosticForCode } from "./core-
|
|
1
|
+
import { a as codeForRuleId, d as createRule, m as doctorInternalDiagnostics, o as defineDoctorDiagnostics, p as defineRulePack, s as diagnosticForCode } from "./core-BFSgtrql.mjs";
|
|
2
2
|
//#region src/rule-packs/nitro/diagnostics.ts
|
|
3
3
|
const nitroDiagnosticRegistry = defineDoctorDiagnostics([
|
|
4
4
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as codeForRuleId, d as createRule, m as doctorInternalDiagnostics, o as defineDoctorDiagnostics, p as defineRulePack, s as diagnosticForCode } from "./core-
|
|
1
|
+
import { a as codeForRuleId, d as createRule, m as doctorInternalDiagnostics, o as defineDoctorDiagnostics, p as defineRulePack, s as diagnosticForCode } from "./core-BFSgtrql.mjs";
|
|
2
2
|
import { dirname, relative, resolve } from "pathe";
|
|
3
3
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
4
4
|
import { parseSync } from "oxc-parser";
|
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-CuZnkOun.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-BFAxpIuo.mjs";
|
|
2
|
+
import "./rules-CHyYwZV9.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 +0,0 @@
|
|
|
1
|
-
import "./index-B8FjkmY1.mjs";
|
package/dist/nitro-BRgJaQgL.mjs
DELETED
package/dist/rules-CPBmmZ0K.mjs
DELETED