import 'scule'; import defu$1, { defu } from 'defu'; import { resolve, join, relative, basename } from 'pathe'; import { isTest, isDevelopment, isDebug } from 'std-env'; import { consola } from 'consola'; import { existsSync } from 'node:fs'; import { readdir } from 'node:fs/promises'; import { randomUUID } from 'node:crypto'; import { findWorkspaceDir } from 'pkg-types'; import { escapeHtml } from '@vue/shared'; function defineUntypedSchema(options) { return options; } function defineResolvers(config) { return defineUntypedSchema(config); } const adhoc = defineResolvers({ /** * Configure Nuxt component auto-registration. * * Any components in the directories configured here can be used throughout your * pages, layouts (and other components) without needing to explicitly import them. * @see [`components/` directory documentation](https://nuxt.com/docs/guide/directory-structure/components) * @type {boolean | typeof import('../src/types/components').ComponentsOptions | typeof import('../src/types/components').ComponentsOptions['dirs']} */ 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 : {} }; } }, /** * Configure how Nuxt auto-imports composables into your application. * @see [Nuxt documentation](https://nuxt.com/docs/guide/directory-structure/composables) * @type {typeof import('../src/types/imports').ImportsOptions} */ imports: { global: false, /** * Whether to scan your `composables/` and `utils/` directories for composables to auto-import. * Auto-imports registered by Nuxt or other modules, such as imports from `vue` or `nuxt`, will still be enabled. */ scan: true, /** * An array of custom directories that will be auto-imported. * Note that this option will not override the default directories (~/composables, ~/utils). * @example * ```js * imports: { * // Auto-import pinia stores defined in `~/stores` * dirs: ['stores'] * } * ``` */ dirs: [] }, /** * Whether to use the vue-router integration in Nuxt 3. If you do not provide a value it will be * enabled if you have a `pages/` directory in your source folder. * * Additionally, you can provide a glob pattern or an array of patterns * to scan only certain files for pages. * @example * ```js * pages: { * pattern: ['**\/*\/*.vue', '!**\/*.spec.*'], * } * ``` * @type {boolean | { enabled?: boolean, pattern?: string | string[] }} */ pages: void 0, /** * Manually disable nuxt telemetry. * @see [Nuxt Telemetry](https://github.com/nuxt/telemetry) for more information. * @type {boolean | Record} */ telemetry: void 0, /** * Enable Nuxt DevTools for development. * * Breaking changes for devtools might not reflect on the version of Nuxt. * @see [Nuxt DevTools](https://devtools.nuxt.com/) for more information. * @type { { enabled: boolean, [key: string]: any } } */ devtools: {} }); const app = defineResolvers({ /** * Vue.js config */ vue: { /** @type {typeof import('@vue/compiler-sfc').AssetURLTagConfig} */ transformAssetUrls: { video: ["src", "poster"], source: ["src"], img: ["src"], image: ["xlink:href", "href"], use: ["xlink:href", "href"] }, /** * Options for the Vue compiler that will be passed at build time. * @see [Vue documentation](https://vuejs.org/api/application.html#app-config-compileroptions) * @type {typeof import('@vue/compiler-core').CompilerOptions} */ compilerOptions: {}, /** * Include Vue compiler in runtime bundle. */ runtimeCompiler: { $resolve: async (val, get) => { if (typeof val === "boolean") { return val; } const legacyProperty = await get("experimental.runtimeVueCompiler"); if (typeof legacyProperty === "boolean") { return legacyProperty; } return false; } }, /** * Enable reactive destructure for `defineProps` * @type {boolean} */ propsDestructure: true, /** * It is possible to pass configure the Vue app globally. Only serializable options * may be set in your `nuxt.config`. All other options should be set at runtime in a Nuxt plugin.. * @see [Vue app config documentation](https://vuejs.org/api/application.html#app-config) */ config: {} }, /** * Nuxt App configuration. */ app: { /** * The base path of your Nuxt application. * * For example: * @example * ```ts * export default defineNuxtConfig({ * app: { * baseURL: '/prefix/' * } * }) * ``` * * This can also be set at runtime by setting the NUXT_APP_BASE_URL environment variable. * @example * ```bash * NUXT_APP_BASE_URL=/prefix/ node .output/server/index.mjs * ``` */ baseURL: { $resolve: (val) => { if (typeof val === "string") { return val; } return process.env.NUXT_APP_BASE_URL || "/"; } }, /** The folder name for the built site assets, relative to `baseURL` (or `cdnURL` if set). This is set at build time and should not be customized at runtime. */ buildAssetsDir: { $resolve: (val) => { if (typeof val === "string") { return val; } return process.env.NUXT_APP_BUILD_ASSETS_DIR || "/_nuxt/"; } }, /** * An absolute URL to serve the public folder from (production-only). * * For example: * @example * ```ts * export default defineNuxtConfig({ * app: { * cdnURL: 'https://mycdn.org/' * } * }) * ``` * * This can be set to a different value at runtime by setting the `NUXT_APP_CDN_URL` environment variable. * @example * ```bash * NUXT_APP_CDN_URL=https://mycdn.org/ node .output/server/index.mjs * ``` */ cdnURL: { $resolve: async (val, get) => { if (await get("dev")) { return ""; } return process.env.NUXT_APP_CDN_URL || (typeof val === "string" ? val : ""); } }, /** * Set default configuration for `` on every page. * @example * ```js * app: { * head: { * meta: [ * // * { name: 'viewport', content: 'width=device-width, initial-scale=1' } * ], * script: [ * //