import process from "node:process"; import { defu } from "defu"; import { join, relative, resolve } from "pathe"; import { createConsoleReporter, defineDiagnostics } from "nostics"; import { existsSync } from "node:fs"; import { readdir } from "node:fs/promises"; import { randomUUID } from "node:crypto"; import { isDebug, isDevelopment, isTest } from "std-env"; import { findWorkspaceDir } from "pkg-types"; import { escapeHtml } from "@vue/shared"; //#region src/utils/definition.ts function defineResolvers(config) { return config; } //#endregion //#region src/config/adhoc.ts var adhoc_default = defineResolvers({ components: { $resolve: (val) => { if (Array.isArray(val)) return { dirs: val }; if (val === false) return { dirs: [] }; return { dirs: [{ path: "~/components/global", global: true }, "~/components"], ...typeof val === "object" ? val : {} }; } }, imports: { global: false, scan: true, dirs: [] }, pages: void 0, telemetry: void 0, devtools: {} }); //#endregion //#region src/diagnostics.ts /** * B5xxx (schema-resolved configuration) * Diagnostics raised while resolving `nuxt.config` values against the schema. * Codes continue the configuration (B5xxx) range defined in `@nuxt/kit`, which * schema cannot import without creating a dependency cycle. */ const docsBase = (code) => `https://nuxt.com/docs/4.x/errors/${code.replace("NUXT_", "").toLowerCase()}`; const schemaDiagnostics = /* #__PURE__ */ defineDiagnostics({ docsBase, reporters: [/* @__PURE__ */ createConsoleReporter()], codes: { NUXT_B5012: { why: (p) => `Invalid \`logLevel\` option: \`${p.value}\`.`, fix: "Use one of `silent`, `info`, or `verbose`.", docs: false }, NUXT_B5013: { why: "`unhead.legacy` is ignored when `future.compatibilityVersion` >= 5.", fix: "Remove deprecated head patterns (`hid`, `vmid`, `children`, `body: true`, `renderPriority`) and resolve promise values before passing them to `useHead`.", docs: false }, NUXT_B5014: { why: "Directly configuring the `vite.publicDir` option is not supported.", fix: "Set `dir.public` instead. You can read more in `https://nuxt.com/docs/4.x/api/nuxt-config#public`.", docs: false }, NUXT_B5015: { why: (p) => `Unknown PostCSS order preset: \`${p.preset}\`.`, fix: "Use a known preset name, or pass a function to `postcss.order`.", docs: false }, NUXT_B5020: { why: (p) => `\`experimental.prerenderErrorPages\` was passed \`${p.status}\`, which is not a client or server error status code.`, fix: "Pass whole status codes between 400 and 599, such as `[404, 500]`. `/200.html` and `/index.html` are SPA fallbacks and cannot be generated as error pages.", docs: false }, NUXT_B5027: { why: "`experimental.nitroViteEnvironment` is only compatible with `@nuxt/vite-builder`, so it has been disabled.", fix: "Set `builder: \"vite\"` in your `nuxt.config`, or remove the option.", docs: false } } }); //#endregion //#region src/config/app.ts var app_default = defineResolvers({ vue: { transformAssetUrls: { video: ["src", "poster"], source: ["src"], img: ["src"], image: ["xlink:href", "href"], use: ["xlink:href", "href"] }, compilerOptions: {}, runtimeCompiler: { $resolve: (val) => { return typeof val === "boolean" ? val : false; } }, optionsApi: { async $resolve(val, get) { if (typeof val === "boolean") return val; return await get("future.compatibilityVersion") < 5; } }, /** * Enable experimental support for Vue Vapor Mode (requires Vue 3.6+). * * This installs Vue's `vaporInteropPlugin` so that vapor components (SFCs using * `