/
home
/
henzagold
/
oldsite
/
node_modules
/
@nuxt
/
schema
/
dist
/
File Upload :
llllll
Current File: /home/henzagold/oldsite/node_modules/@nuxt/schema/dist/index.mjs
import { defineUntypedSchema } from 'untyped'; import { resolve, join } from 'pathe'; import { existsSync, readdirSync } from 'node:fs'; import defu from 'defu'; import { isDevelopment, isCI, isTest } from 'std-env'; import createRequire from 'create-require'; import { pascalCase } from 'scule'; import jiti from 'jiti'; import { findWorkspaceDir } from 'pkg-types'; import { withTrailingSlash, normalizeURL, joinURL, withoutLeadingSlash } from 'ufo'; import createResolver from 'postcss-import-resolver'; const _adhoc = defineUntypedSchema({ components: { $resolve: (val) => { if (Array.isArray(val)) { return { dirs: val }; } if (val === void 0 || val === true) { return { dirs: [{ path: "~/components/global", global: true }, "~/components"] }; } return val; } }, autoImports: null, imports: { global: false, dirs: [] }, pages: void 0, telemetry: void 0 }); const _app = defineUntypedSchema({ vue: { config: { silent: { $resolve: async (val, get) => val ?? !await get("dev") }, performance: { $resolve: async (val, get) => val ?? await get("dev") } }, compilerOptions: {} }, app: { baseURL: process.env.NUXT_APP_BASE_URL || "/", buildAssetsDir: process.env.NUXT_APP_BUILD_ASSETS_DIR || "/_nuxt/", assetsPath: { $resolve: async (val, get) => val ?? await get("buildAssetsDir") }, cdnURL: { $resolve: async (val, get) => await get("dev") ? "" : (process.env.NUXT_APP_CDN_URL ?? val) || "" }, head: { $resolve: async (val, get) => { const resolved = defu(val, await get("meta"), { meta: [], link: [], style: [], script: [], noscript: [] }); resolved.charset = resolved.charset ?? resolved.meta.find((m) => m.charset)?.charset ?? "utf-8"; resolved.viewport = resolved.viewport ?? resolved.meta.find((m) => m.name === "viewport")?.content ?? "width=device-width, initial-scale=1"; resolved.meta = resolved.meta.filter((m) => m && m.name !== "viewport" && !m.charset); resolved.link = resolved.link.filter(Boolean); resolved.style = resolved.style.filter(Boolean); resolved.script = resolved.script.filter(Boolean); resolved.noscript = resolved.noscript.filter(Boolean); return resolved; } }, layoutTransition: { name: "layout", mode: "out-in" }, pageTransition: { name: "page", mode: "out-in" }, keepalive: false }, appTemplatePath: { $resolve: async (val, get) => { if (val) { return resolve(await get("srcDir"), val); } if (existsSync(join(await get("srcDir"), "app.html"))) { return join(await get("srcDir"), "app.html"); } return resolve(await get("buildDir"), "views/app.template.html"); } }, store: { $resolve: async (val, get) => val !== false && existsSync(join(await get("srcDir"), await get("dir.store"))) && readdirSync(join(await get("srcDir"), await get("dir.store"))).find((filename) => filename !== "README.md" && filename[0] !== ".") }, vueMeta: null, head: { meta: [], link: [], style: [], script: [] }, meta: { meta: [], link: [], style: [], script: [] }, fetch: { server: true, client: true }, plugins: [], extendPlugins: null, css: { $resolve: (val) => (val ?? []).map((c) => c.src || c) }, layouts: {}, ErrorPage: null, loading: { color: "black", failedColor: "red", height: "2px", throttle: 200, duration: 5e3, continuous: false, rtl: false, css: true }, loadingIndicator: { $resolve: async (val, get) => { val = typeof val === "string" ? { name: val } : val; return defu(val, { name: "default", color: await get("loading.color") || "#D3D3D3", color2: "#F5F5F5", background: await get("manifest") && await get("manifest.theme_color") || "white", dev: await get("dev"), loading: await get("messages.loading") }); } }, pageTransition: { $resolve: async (val, get) => { val = typeof val === "string" ? { name: val } : val; return defu(val, { name: "page", mode: "out-in", appear: await get("render.ssr") === false || Boolean(val), appearClass: "appear", appearActiveClass: "appear-active", appearToClass: "appear-to" }); } }, layoutTransition: { $resolve: (val) => { val = typeof val === "string" ? { name: val } : val; return defu(val, { name: "layout", mode: "out-in" }); } }, features: { store: true, layouts: true, meta: true, middleware: true, transitions: true, deprecations: true, validate: true, useAsyncData: true, fetch: true, clientOnline: true, clientPrefetch: true, componentAliases: true, componentClientOnly: true } }); const _common = defineUntypedSchema({ extends: null, theme: null, rootDir: { $resolve: (val) => typeof val === "string" ? resolve(val) : process.cwd() }, workspaceDir: { $resolve: async (val, get) => val ? resolve(await get("rootDir"), val) : await findWorkspaceDir(await get("rootDir")).catch(() => get("rootDir")) }, srcDir: { $resolve: async (val, get) => resolve(await get("rootDir"), val || ".") }, buildDir: { $resolve: async (val, get) => resolve(await get("rootDir"), val || ".nuxt") }, dev: Boolean(isDevelopment), test: Boolean(isDevelopment), debug: { $resolve: async (val, get) => val ?? await get("dev") }, env: { $default: {}, $resolve: (val) => { val = { ...val }; for (const key in process.env) { if (key.startsWith("NUXT_ENV_")) { val[key] = process.env[key]; } } return val; } }, createRequire: { $resolve: (val) => { val = process.env.NUXT_CREATE_REQUIRE || val || (typeof globalThis.jest !== "undefined" ? "native" : "jiti"); if (val === "jiti") { return (p) => jiti(typeof p === "string" ? p : p.filename, { esmResolve: true }); } if (val === "native") { return (p) => createRequire(typeof p === "string" ? p : p.filename); } return val; } }, target: { $resolve: (val) => ["server", "static"].includes(val) ? val : "server" }, ssr: { $resolve: (val) => val ?? true }, mode: { $resolve: async (val, get) => val || (await get("ssr") ? "spa" : "universal"), $schema: { deprecated: "`mode` option is deprecated" } }, modern: void 0, modules: [], buildModules: [], _modules: [], _installedModules: [], globalName: { $resolve: (val) => typeof val === "string" && /^[a-zA-Z]+$/.test(val) ? val.toLocaleLowerCase() : "nuxt" }, globals: { id: (globalName) => `__${globalName}`, nuxt: (globalName) => `$${globalName}`, context: (globalName) => `__${globalName.toUpperCase()}__`, pluginPrefix: (globalName) => globalName, readyCallback: (globalName) => `on${pascalCase(globalName)}Ready`, loadedCallback: (globalName) => `_on${pascalCase(globalName)}Loaded` }, serverMiddleware: { $resolve: (val) => { if (!val) { return []; } if (!Array.isArray(val)) { return Object.entries(val).map(([path, handler]) => ({ path, handler })); } return val; } }, modulesDir: { $default: ["node_modules"], $resolve: async (val, get) => [ ...await Promise.all(val.map(async (dir) => resolve(await get("rootDir"), dir))), resolve(process.cwd(), "node_modules") ] }, dir: { assets: "assets", app: "app", layouts: "layouts", middleware: "middleware", pages: "pages", public: { $resolve: async (val, get) => val || await get("dir.static") || "public" }, static: { $schema: { deprecated: "use `dir.public` option instead" }, $resolve: async (val, get) => val || await get("dir.public") || "public" }, store: "store" }, extensions: { $resolve: (val) => [".js", ".jsx", ".mjs", ".ts", ".tsx", ".vue"].concat(val).filter(Boolean) }, styleExtensions: [".css", ".pcss", ".postcss", ".styl", ".stylus", ".scss", ".sass", ".less"], alias: { $resolve: async (val, get) => ({ "~~": await get("rootDir"), "@@": await get("rootDir"), "~": await get("srcDir"), "@": await get("srcDir"), [await get("dir.assets")]: join(await get("srcDir"), await get("dir.assets")), [await get("dir.public")]: join(await get("srcDir"), await get("dir.public")), ...val }) }, ignoreOptions: void 0, ignorePrefix: "-", ignore: { $resolve: async (val, get) => [ "**/*.stories.{js,ts,jsx,tsx}", "**/*.{spec,test}.{js,ts,jsx,tsx}", ".output", await get("ignorePrefix") && `**/${await get("ignorePrefix")}*.*` ].concat(val).filter(Boolean) }, watch: { $resolve: async (val, get) => { const rootDir = await get("rootDir"); return Array.from(new Set( [].concat(val, await get("_nuxtConfigFiles")).filter(Boolean).map((p) => resolve(rootDir, p)) )); } }, watchers: { rewatchOnRawEvents: void 0, webpack: { aggregateTimeout: 1e3 }, chokidar: { ignoreInitial: true } }, editor: void 0, hooks: null, runtimeConfig: { $resolve: async (val, get) => defu(val, { ...await get("publicRuntimeConfig"), ...await get("privateRuntimeConfig"), public: await get("publicRuntimeConfig"), app: { baseURL: (await get("app")).baseURL, buildAssetsDir: (await get("app")).buildAssetsDir, cdnURL: (await get("app")).cdnURL } }) }, privateRuntimeConfig: {}, publicRuntimeConfig: {}, appConfig: {} }); const _internal = defineUntypedSchema({ _majorVersion: 2, _legacyGenerate: false, _start: false, _build: false, _generate: false, _prepare: false, _cli: false, _requiredModules: {}, _nuxtConfigFile: void 0, _nuxtConfigFiles: [], appDir: "" }); const build = defineUntypedSchema({ builder: { $resolve: async (val, get) => { if (typeof val === "object") { return val; } const map = { vite: "@nuxt/vite-builder", webpack: "@nuxt/webpack-builder" }; return map[val] || val || (await get("vite") === false ? map.webpack : map.vite); } }, sourcemap: { $resolve: async (val, get) => { if (typeof val === "boolean") { return { server: val, client: val }; } return defu(val, { server: true, client: await get("dev") }); } }, build: { quiet: Boolean(isCI || isTest), analyze: { $resolve: async (val, get) => { if (val !== true) { return val ?? false; } const rootDir = await get("rootDir"); return { template: "treemap", projectRoot: rootDir, filename: join(rootDir, ".nuxt/stats", "{name}.html") }; } }, profile: process.argv.includes("--profile"), extractCSS: false, cssSourceMap: { $resolve: async (val, get) => val ?? (await get("sourcemap.client") || await get("sourcemap.server")) ?? await get("dev") }, ssr: void 0, parallel: { $resolve: async (val, get) => await get("build.extractCSS") ? false : Boolean(val) }, cache: false, standalone: false, publicPath: { $resolve: async (val, get) => val ? withTrailingSlash(normalizeURL(val)) : await get("app").buildAssetsDir }, serverURLPolyfill: "url", filenames: { app: ({ isDev, isModern }) => isDev ? `[name]${isModern ? ".modern" : ""}.js` : `[contenthash:7]${isModern ? ".modern" : ""}.js`, chunk: ({ isDev, isModern }) => isDev ? `[name]${isModern ? ".modern" : ""}.js` : `[contenthash:7]${isModern ? ".modern" : ""}.js`, css: ({ isDev }) => isDev ? "[name].css" : "css/[contenthash:7].css", img: ({ isDev }) => isDev ? "[path][name].[ext]" : "img/[name].[contenthash:7].[ext]", font: ({ isDev }) => isDev ? "[path][name].[ext]" : "fonts/[name].[contenthash:7].[ext]", video: ({ isDev }) => isDev ? "[path][name].[ext]" : "videos/[name].[contenthash:7].[ext]" }, loaders: { $resolve: async (val, get) => { const styleLoaders = [ "css", "cssModules", "less", "sass", "scss", "stylus", "vueStyle" ]; for (const name of styleLoaders) { const loader = val[name]; if (loader && loader.sourcemap === void 0) { loader.sourcemap = Boolean(await get("build.cssSourceMap")); } } return val; }, file: { esModule: false }, fontUrl: { esModule: false, limit: 1e3 }, imgUrl: { esModule: false, limit: 1e3 }, pugPlain: {}, vue: { productionMode: { $resolve: async (val, get) => val ?? !await get("dev") }, transformAssetUrls: { video: "src", source: "src", object: "src", embed: "src" }, compilerOptions: { $resolve: async (val, get) => val ?? await get("vue.compilerOptions") } }, css: { importLoaders: 0, esModule: false }, cssModules: { importLoaders: 0, esModule: false, modules: { localIdentName: "[local]_[hash:base64:5]" } }, less: {}, sass: { sassOptions: { indentedSyntax: true } }, scss: {}, stylus: {}, vueStyle: {} }, styleResources: {}, plugins: [], terser: {}, hardSource: false, aggressiveCodeRemoval: false, optimizeCSS: { $resolve: async (val, get) => val ?? (await get("build.extractCSS") ? {} : false) }, optimization: { runtimeChunk: "single", minimize: { $resolve: async (val, get) => val ?? !await get("dev") }, minimizer: void 0, splitChunks: { chunks: "all", automaticNameDelimiter: "/", cacheGroups: {} } }, splitChunks: { layouts: false, pages: true, commons: true }, corejs: "auto", babel: { configFile: false, babelrc: false, plugins: [], presets: {}, cacheDirectory: { $resolve: async (val, get) => val ?? await get("dev") } }, transpile: { $resolve: (val) => [].concat(val).filter(Boolean) }, postcss: { execute: void 0, postcssOptions: { $resolve: async (val, get) => { const postcssOptions = await get("postcss"); Object.assign(postcssOptions, defu(postcssOptions, val)); return postcssOptions; } }, sourcemap: void 0, implementation: void 0, order: "" }, html: { minify: { collapseBooleanAttributes: true, decodeEntities: true, minifyCSS: true, minifyJS: true, processConditionalComments: true, removeEmptyAttributes: true, removeRedundantAttributes: true, trimCustomFragments: true, useShortDoctype: true } }, template: void 0, templates: [], watch: [], devMiddleware: { stats: "none" }, hotMiddleware: {}, vendor: { $meta: { deprecated: "vendor has been deprecated since nuxt 2" } }, stats: { $resolve: async (val, get) => val === "none" || await get("build.quiet") ? false : val, excludeAssets: [ /.map$/, /index\..+\.html$/, /vue-ssr-(client|modern)-manifest.json/ ] }, friendlyErrors: true, additionalExtensions: [], warningIgnoreFilters: [], followSymlinks: false } }); const messages = { loading: "Loading...", error_404: "This page could not be found", server_error: "Server error", nuxtjs: "Nuxt", back_to_home: "Back to the home page", server_error_details: "An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details.", client_error: "Error", client_error_details: "An error occurred while rendering the page. Check developer tools console for details." }; const render = { bundleRenderer: { shouldPrefetch: () => false, shouldPreload: (_fileWithoutQuery, asType) => ["script", "style"].includes(asType), runInNewContext: { $resolve: async (val, get) => val ?? await get("dev") } }, crossorigin: void 0, resourceHints: true, ssr: void 0, ssrLog: { $resolve: async (val, get) => await get("dev") ? Boolean(val) : false }, http2: { push: false, shouldPush: null, pushAssets: null }, static: { prefix: true }, compressor: { threshold: 0 }, etag: { hash: false, weak: false }, csp: { $resolve: async (val, get) => { if (!val) { return false; } return { hashAlgorithm: "sha256", allowedSources: void 0, policies: void 0, addMeta: Boolean(await get("target") === "static"), unsafeInlineCompatibility: false, reportOnly: await get("debug"), ...val }; } }, dist: { index: false, maxAge: "1y" }, fallback: { dist: {}, static: { skipUnknown: true, handlers: { ".htm": false, ".html": false } } } }; const router = defineUntypedSchema({ options: {}, mode: "history", base: { $resolve: async (val, get) => val ? withTrailingSlash(normalizeURL(val)) : (await get("app")).baseURL }, _routerBaseSpecified: { $resolve: async (_val, get) => typeof await get("router.base") === "string" }, routes: [], routeNameSplitter: "-", middleware: { $resolve: (val) => Array.isArray(val) ? val : [val].filter(Boolean) }, linkActiveClass: "nuxt-link-active", linkExactActiveClass: "nuxt-link-exact-active", linkPrefetchedClass: false, extendRoutes: null, scrollBehavior: { $schema: { deprecated: "router.scrollBehavior` property is deprecated in favor of using `~/app/router.scrollBehavior.js` file, learn more: https://nuxtjs.org/api/configuration-router#scrollbehavior" } }, parseQuery: false, stringifyQuery: false, fallback: false, prefetchLinks: true, prefetchPayloads: true, trailingSlash: void 0 }); const server = { https: false, port: process.env.NUXT_PORT || process.env.PORT || process.env.npm_package_config_nuxt_port || 3e3, host: process.env.NUXT_HOST || process.env.HOST || process.env.npm_package_config_nuxt_host || "localhost", socket: process.env.UNIX_SOCKET || process.env.npm_package_config_unix_socket, timing: (val) => val ? { total: true, ...val } : false, url: "http://localhost:3000" }; const cli = defineUntypedSchema({ badgeMessages: [], bannerColor: "green" }); const generate = { dir: { $resolve: async (val = "dist", get) => resolve(await get("rootDir"), val) }, routes: [], exclude: [], concurrency: 500, interval: 0, subFolders: true, fallback: { $resolve: (val) => val === true ? "400.html" : val || "200.html" }, crawler: true, manifest: true, nojekyll: true, cache: { ignore: [], globbyOptions: { gitignore: true } }, staticAssets: { dir: "static", base: { $resolve: async (val, get) => val || joinURL((await get("app")).buildAssetsDir, await get("generate.dir")) }, versionBase: { $resolve: async (val, get) => val || joinURL(await get("generate.base"), await get("generate.version")) }, version: { $resolve: (val) => val || String(Math.round(Date.now() / 1e3)) } } }; const postcss = defineUntypedSchema({ postcss: { config: false, plugins: { "postcss-import": { $resolve: async (val, get) => val !== false ? defu(val || {}, { resolve: createResolver({ alias: { ...await get("alias") }, modules: [ await get("srcDir"), await get("rootDir"), ...await get("modulesDir") ] }) }) : val }, "postcss-url": {}, autoprefixer: {}, cssnano: { $resolve: async (val, get) => val ?? !(await get("dev") && { preset: ["default", { minifyFontValues: { removeQuotes: false } }] }) } } } }); const typescript = defineUntypedSchema({ typescript: { strict: false, typeCheck: false, tsConfig: {}, shim: true } }); const vite = defineUntypedSchema({ vite: { root: { $resolve: async (val, get) => val ?? await get("srcDir") }, mode: { $resolve: async (val, get) => val ?? (await get("dev") ? "development" : "production") }, logLevel: "warn", define: { $resolve: async (val, get) => ({ "process.dev": await get("dev"), ...val || {} }) }, resolve: { extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"] }, publicDir: { $resolve: async (val, get) => val ?? resolve(await get("srcDir"), (await get("dir")).public) }, vue: { isProduction: { $resolve: async (val, get) => val ?? !await get("dev") }, template: { compilerOptions: { $resolve: async (val, get) => val ?? (await get("vue")).compilerOptions } } }, optimizeDeps: { exclude: { $resolve: async (val, get) => [ ...val || [], ...(await get("build.transpile")).filter((i) => typeof i === "string"), "vue-demi" ] } }, esbuild: { jsxFactory: "h", jsxFragment: "Fragment", tsconfigRaw: "{}" }, clearScreen: false, build: { assetsDir: { $resolve: async (val, get) => val ?? withoutLeadingSlash((await get("app")).buildAssetsDir) }, emptyOutDir: false }, server: { fs: { strict: false, allow: { $resolve: async (val, get) => [ await get("buildDir"), await get("srcDir"), await get("rootDir"), ...await get("modulesDir"), ...val ?? [] ] } } } } }); const webpack = defineUntypedSchema({ webpack: { analyze: { $resolve: async (val, get) => { if (val !== true) { return val ?? false; } const rootDir = await get("rootDir"); return { template: "treemap", projectRoot: rootDir, filename: join(rootDir, ".nuxt/stats", "{name}.html") }; } }, profile: process.argv.includes("--profile"), extractCSS: true, cssSourceMap: { $resolve: async (val, get) => val ?? await get("dev") }, serverURLPolyfill: "url", filenames: { app: ({ isDev }) => isDev ? `[name].js` : `[contenthash:7].js`, chunk: ({ isDev }) => isDev ? `[name].js` : `[contenthash:7].js`, css: ({ isDev }) => isDev ? "[name].css" : "css/[contenthash:7].css", img: ({ isDev }) => isDev ? "[path][name].[ext]" : "img/[name].[contenthash:7].[ext]", font: ({ isDev }) => isDev ? "[path][name].[ext]" : "fonts/[name].[contenthash:7].[ext]", video: ({ isDev }) => isDev ? "[path][name].[ext]" : "videos/[name].[contenthash:7].[ext]" }, loaders: { $resolve: async (val, get) => { const styleLoaders = [ "css", "cssModules", "less", "sass", "scss", "stylus", "vueStyle" ]; for (const name of styleLoaders) { const loader = val[name]; if (loader && loader.sourceMap === void 0) { loader.sourceMap = Boolean(await get("build.cssSourceMap")); } } return val; }, file: { esModule: false }, fontUrl: { esModule: false, limit: 1e3 }, imgUrl: { esModule: false, limit: 1e3 }, pugPlain: {}, vue: { productionMode: { $resolve: async (val, get) => val ?? !await get("dev") }, transformAssetUrls: { video: "src", source: "src", object: "src", embed: "src" }, compilerOptions: { $resolve: async (val, get) => val ?? await get("vue.compilerOptions") } }, css: { importLoaders: 0, url: { filter: (url, resourcePath) => !url.startsWith("/") }, esModule: false }, cssModules: { importLoaders: 0, url: { filter: (url, resourcePath) => !url.startsWith("/") }, esModule: false, modules: { localIdentName: "[local]_[hash:base64:5]" } }, less: {}, sass: { sassOptions: { indentedSyntax: true } }, scss: {}, stylus: {}, vueStyle: {} }, plugins: [], terser: {}, aggressiveCodeRemoval: false, optimizeCSS: { $resolve: async (val, get) => val ?? (await get("build.extractCSS") ? {} : false) }, optimization: { runtimeChunk: "single", minimize: { $resolve: async (val, get) => val ?? !await get("dev") }, minimizer: void 0, splitChunks: { chunks: "all", automaticNameDelimiter: "/", cacheGroups: {} } }, postcss: { execute: void 0, postcssOptions: { config: { $resolve: async (val, get) => val ?? await get("postcss.config") }, plugins: { $resolve: async (val, get) => val ?? await get("postcss.plugins") } }, sourceMap: void 0, implementation: void 0, order: "" }, devMiddleware: { stats: "none" }, hotMiddleware: {}, friendlyErrors: true, warningIgnoreFilters: [] } }); const nitro = defineUntypedSchema({ nitro: {}, serverHandlers: [], devServerHandlers: [] }); const experimental = defineUntypedSchema({ experimental: { asyncEntry: { $resolve: (val) => val ?? false }, reactivityTransform: false, externalVue: true, treeshakeClientOnly: true, viteNode: { $resolve: (val) => { val = process.env.EXPERIMENTAL_VITE_NODE ? true : val; if (val === true) { console.warn("`vite-node` is now enabled by default. You can safely remove `experimental.viteNode` from your config."); } else if (val === false) { console.warn("`vite-node` is now enabled by default. To disable it, set `vite.devBundler` to `legacy` instead."); } return val ?? true; } }, viteServerDynamicImports: true, inlineSSRStyles: { async $resolve(val, get) { if (val === false || await get("dev") || await get("ssr") === false || await get("builder") === "@nuxt/webpack-builder") { return false; } return val ?? true; } }, noScripts: false, payloadExtraction: true } }); const index = { ..._adhoc, ..._app, ..._common, ..._internal, ...postcss, ...typescript, ...vite, ...webpack, ...nitro, ...experimental, ...build, messages, render, router, server, cli, generate }; export { index as NuxtConfigSchema };
Copyright ©2k19 -
Hexid
|
Tex7ure