Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@nuxt/schema

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxt/schema - npm Package Compare versions

Comparing version
4.3.1
to
4.4.2
+2
-0
dist/builder-env.mjs

@@ -0,2 +1,4 @@

//#region src/builder-env.ts
const builders = ["vite", "webpack"];
//#endregion
export { builders };

@@ -10,5 +10,8 @@ import process from "node:process";

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({

@@ -35,2 +38,4 @@ components: { $resolve: (val) => {

});
//#endregion
//#region src/config/app.ts
var app_default = defineResolvers({

@@ -88,4 +93,16 @@ vue: {

viewTransition: { $resolve: async (val, get) => {
if (val === "always" || typeof val === "boolean") return val;
return await get("experimental").then((e) => e.viewTransition) ?? false;
const isEnabled = val === "always" || typeof val === "boolean";
const hasEnabled = val && typeof val === "object" && "enabled" in val;
const hasTypes = val && typeof val === "object" && "types" in val;
const appOptions = {
enabled: isEnabled ? val : hasEnabled ? val.enabled : void 0,
types: hasTypes ? val.types : void 0
};
if (appOptions.enabled !== void 0 && appOptions.types !== void 0) return appOptions;
const _configOptions = await get("experimental").then((e) => e.viewTransition) ?? { enabled: false };
const configOptions = typeof _configOptions === "object" ? _configOptions : { enabled: _configOptions };
return {
enabled: appOptions.enabled ?? configOptions.enabled,
types: appOptions.types ?? configOptions.types
};
} },

@@ -134,2 +151,4 @@ keepalive: false,

});
//#endregion
//#region src/config/build.ts
var build_default = defineResolvers({

@@ -224,2 +243,15 @@ builder: { $resolve: (val) => {

].filter(Boolean) },
keyedComposableFactories: { $resolve: (val) => [
{
name: "createUseFetch",
source: "#app/composables/fetch",
argumentLength: 3
},
{
name: "createUseAsyncData",
source: "#app/composables/asyncData",
argumentLength: 3
},
...Array.isArray(val) ? val : []
].filter(Boolean) },
treeShake: { composables: {

@@ -264,2 +296,4 @@ server: { $resolve: async (val, get) => defu(typeof val === "object" ? val || {} : {}, await get("dev") ? {} : {

});
//#endregion
//#region src/config/common.ts
var common_default = defineResolvers({

@@ -272,3 +306,3 @@ extends: void 0,

const rootDir = await get("rootDir");
return val && typeof val === "string" ? resolve(rootDir, val) : await findWorkspaceDir(rootDir, {
return val && typeof val === "string" ? resolve(rootDir, val) : findWorkspaceDir(rootDir, {
gitConfig: "closest",

@@ -337,5 +371,10 @@ try: true

router: true,
hydration: true
hydration: true,
perf: process.env.NUXT_DEBUG_PERF === "quiet" ? "quiet" : true
};
if (val && typeof val === "object") return val;
if (val && typeof val === "object") {
if (process.env.NUXT_DEBUG_PERF) val.perf = process.env.NUXT_DEBUG_PERF === "quiet" ? "quiet" : true;
return val;
}
if (process.env.NUXT_DEBUG_PERF) return { perf: process.env.NUXT_DEBUG_PERF === "quiet" ? "quiet" : true };
return false;

@@ -473,2 +512,4 @@ } },

}
//#endregion
//#region ../ui-templates/dist/templates/loading.ts
const _messages = {

@@ -484,4 +525,6 @@ "appName": "Nuxt",

};
return "<!DOCTYPE html><html lang=\"en\"><head><title>" + escapeHtml(messages.loading) + " | " + escapeHtml(messages.appName) + "</title><meta charset=\"utf-8\"><meta content=\"width=device-width,initial-scale=1.0,minimum-scale=1.0\" name=\"viewport\"><style>.nuxt-loader-bar{background:#00dc82;bottom:0;height:3px;left:0;position:fixed;right:0}.triangle-loading{position:absolute}.triangle-loading>path{animation:nuxt-loading-move 3s linear infinite;fill:none;stroke-dasharray:128;stroke-dashoffset:128;stroke-linecap:round;stroke-linejoin:round;stroke-width:4px}.nuxt-logo:hover .triangle-loading>path{animation-play-state:paused}@keyframes nuxt-loading-move{to{stroke-dashoffset:-128}}@media (prefers-color-scheme:dark){body,html{color:#fff;color-scheme:dark}}*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:\"\"}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}a{color:inherit;text-decoration:inherit}svg{display:block;vertical-align:middle}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.relative{position:relative}.inline-block{display:inline-block}.min-h-screen{min-height:100vh}.flex{display:flex}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.gap-4{gap:1rem}.overflow-hidden{overflow:hidden}.border{border-width:1px}.border-\\[\\#00DC42\\]\\/50{border-color:#00dc4280}.group:hover .group-hover\\:border-\\[\\#00DC42\\]{--un-border-opacity:1;border-color:rgb(0 220 66/var(--un-border-opacity))}.rounded{border-radius:.25rem}.bg-\\[\\#00DC42\\]\\/10{background-color:#00dc421a}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.group:hover .group-hover\\:bg-\\[\\#00DC42\\]\\/15{background-color:#00dc4226}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.text-center{text-align:center}.text-\\[16px\\]{font-size:16px}.group:hover .group-hover\\:text-\\[\\#00DC82\\],.text-\\[\\#00DC82\\]{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.text-\\[\\#00DC82\\]\\/80{color:#00dc82cc}.group:hover .group-hover\\:text-\\[\\#020420\\],.text-\\[\\#020420\\]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\\[\\#020420\\]\\/80{color:#020420cc}.font-semibold{font-weight:600}.leading-none{line-height:1}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\\:bg-\\[\\#020420\\]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\\:text-gray-200{--un-text-opacity:1;color:rgb(224 224 224/var(--un-text-opacity))}.dark\\:text-white,.group:hover .dark\\:group-hover\\:text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}</style><script>!function(){const e=document.createElement(\"link\").relList;if(!(e&&e.supports&&e.supports(\"modulepreload\"))){for(const e of document.querySelectorAll('link[rel=\"modulepreload\"]'))r(e);new MutationObserver(e=>{for(const o of e)if(\"childList\"===o.type)for(const e of o.addedNodes)\"LINK\"===e.tagName&&\"modulepreload\"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),\"use-credentials\"===e.crossOrigin?r.credentials=\"include\":\"anonymous\"===e.crossOrigin?r.credentials=\"omit\":r.credentials=\"same-origin\",r}(e);fetch(e.href,r)}}();<\/script></head><body class=\"antialiased bg-white dark:bg-[#020420] dark:text-white flex flex-col font-sans items-center justify-center min-h-screen overflow-hidden relative text-[#020420] text-center\"><a href=\"https://nuxt.com/?utm_source=nuxt-loading-screen\" target=\"_blank\" rel=\"noopener\" class=\"flex gap-4 group items-end nuxt-logo\" id=\"nuxtImg\"><div class=\"relative\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"80\" fill=\"none\" class=\"group-hover:text-[#00DC82] text-[#00DC82]/80 triangle-loading\" viewBox=\"0 0 37 25\"><path stroke=\"currentColor\" d=\"M24.236 22.006h10.742L25.563 5.822l-8.979 14.31a4 4 0 0 1-3.388 1.874H2.978l11.631-20 5.897 10.567\"/></svg> <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"214\" height=\"53\" fill=\"none\" class=\"dark:group-hover:text-white dark:text-gray-200 group-hover:text-[#020420] text-[#020420]/80\" viewBox=\"0 0 800 200\"><path fill=\"currentColor\" d=\"M377 200a4 4 0 0 0 4-4v-93s5.244 8.286 15 25l38.707 66.961c1.789 3.119 5.084 5.039 8.649 5.039H470V50h-27a4 4 0 0 0-4 4v94l-17-30-36.588-62.98c-1.792-3.108-5.081-5.02-8.639-5.02H350v150zm299.203-56.143L710.551 92h-25.73a9.97 9.97 0 0 0-8.333 4.522L660.757 120.5l-15.731-23.978A9.97 9.97 0 0 0 636.693 92h-25.527l34.348 51.643L608.524 200h24.966a9.97 9.97 0 0 0 8.29-4.458l19.18-28.756 18.981 28.72a9.97 9.97 0 0 0 8.313 4.494h24.736zM724.598 92h19.714V60.071h28.251V92H800v24.857h-27.437V159.5c0 10.5 5.284 15.429 14.43 15.429H800V200h-16.869c-23.576 0-38.819-14.143-38.819-39.214v-43.929h-19.714zM590 92h-15c-3.489 0-6.218.145-8.5 2.523-2.282 2.246-2.5 3.63-2.5 7.066v52.486c0 8.058-.376 12.962-4 16.925-3.624 3.831-8.619 5-16 5-7.247 0-12.376-1.169-16-5-3.624-3.963-4-8.867-4-16.925v-52.486c0-3.435-.218-4.82-2.5-7.066C519.218 92.145 516.489 92 513 92h-15v62.422q0 21.006 11.676 33.292C517.594 195.905 529.103 200 544 200s26.204-4.095 34.123-12.286Q590 175.428 590 154.422z\"/></svg></div> <span class=\"bg-[#00DC42]/10 border border-[#00DC42]/50 font-mono font-semibold group-hover:bg-[#00DC42]/15 group-hover:border-[#00DC42] inline-block leading-none px-2.5 py-1.5 rounded text-[#00DC82] text-[16px]\">4.3.1</span> </a><div class=\"nuxt-loader-bar\"></div><script>if(void 0===window.fetch)setTimeout(()=>window.location.reload(),200);else{const o=async()=>{try{if(!(await window.fetch(window.location.href).then(o=>o.text())).includes(\"__NUXT_LOADING__\"))return window.location.reload()}catch{}setTimeout(o,200)};o()}<\/script><script>const prefersReducedMotion=window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;function whatHemisphere(){let e=new Date;if(null==e.getTimezoneOffset)return null;e=e.getFullYear();let t=-new Date(e,0,1,0,0,0,0).getTimezoneOffset()- -new Date(e,6,1,0,0,0,0).getTimezoneOffset();return t<0?\"N\":t>0?\"S\":null}const months={N:[10,11,0],S:[4,5,6]},hemisphere=whatHemisphere();if(hemisphere&&months[hemisphere].includes((new Date).getMonth())&&!prefersReducedMotion){let e=\"false\"!==localStorage.getItem(\"nuxt-snow\"),t=null,n=[],r=Date.now();const i=25e-5,a=1.25,o={current:0,maxCurrent:4,force:.1,target:.1,min:.1,max:.4,easing:.01},s=(e,t)=>(e%t+t)%t,d=document.createElement(\"button\");d.id=\"snow-toggle\",d.style=\"position:fixed;bottom:16px;right:16px;z-index:100;background:rgba(255,255,255,0.1);border:1px solid rgba(255,255,255,0.2);border-radius:8px;padding:8px 12px;cursor:pointer;font-size:20px;\",document.body.appendChild(d);const h=document.createElement(\"canvas\");h.id=\"snow-canvas\",h.style=\"position:fixed;inset:0;z-index:-10;pointer-events:none;opacity:0;transition:opacity 0.5s;filter:blur(4px);\",document.body.appendChild(h);const l=h.getContext(\"2d\");function resize(){h.width=window.innerWidth,h.height=window.innerHeight,n=Array.from({length:Math.floor(h.width*h.height*i)},()=>({x:Math.random()*h.width,y:Math.random()*h.height,vx:1+Math.random(),vy:1+Math.random(),vsin:10*Math.random(),rangle:2*Math.random()*Math.PI,rsin:10*Math.random(),color:`rgba(255,255,255,${.1+.15*Math.random()})`,size:5*Math.random()*4*(h.height/1e3)}))}function draw(){l.clearRect(0,0,h.width,h.height);const e=Date.now(),i=e-r;r=e,o.force+=(o.target-o.force)*o.easing,o.current=Math.max(-o.maxCurrent,Math.min(o.current+o.force*i*.05,o.maxCurrent)),Math.random()>.995&&(o.target=(o.min+Math.random()*(o.max-o.min))*(Math.random()>.5?-1:1));const d=.2*i;n.forEach(e=>{e.x=s(e.x+d+o.current*e.vx,h.width),e.y=s(e.y+d*e.vy*a,h.height),e.x+=Math.sin(d*e.vsin)*e.rsin*.5,e.rangle+=.01*d,l.fillStyle=e.color,l.beginPath(),l.ellipse(e.x,e.y,e.size,.66*e.size,e.rangle,0,2*Math.PI),l.fill()}),t=requestAnimationFrame(draw)}function update(){d.innerHTML=e?\"☀️\":\"❄️\",d.title=e?\"Disable snow\":\"Enable snow\",e?(resize(),window.addEventListener(\"resize\",resize),h.style.opacity=1,r=Date.now(),draw()):(t&&cancelAnimationFrame(t),t=null,window.removeEventListener(\"resize\",resize),h.style.opacity=0)}d.onclick=()=>{e=!e,localStorage.setItem(\"nuxt-snow\",e),update()},update()}<\/script></body></html>";
return "<!DOCTYPE html><html lang=\"en\"><head><title>" + escapeHtml(messages.loading) + " | " + escapeHtml(messages.appName) + "</title><meta charset=\"utf-8\"><meta content=\"width=device-width,initial-scale=1.0,minimum-scale=1.0\" name=\"viewport\"><style>.nuxt-loader-bar{background:#00dc82;bottom:0;height:3px;left:0;position:fixed;right:0}.triangle-loading{position:absolute}.triangle-loading>path{animation:nuxt-loading-move 3s linear infinite;fill:none;stroke-dasharray:128;stroke-dashoffset:128;stroke-linecap:round;stroke-linejoin:round;stroke-width:4px}.nuxt-logo:hover .triangle-loading>path{animation-play-state:paused}@keyframes nuxt-loading-move{to{stroke-dashoffset:-128}}@media (prefers-color-scheme:dark){body,html{color:#fff;color-scheme:dark}}*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:\"\"}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}a{color:inherit;text-decoration:inherit}svg{display:block;vertical-align:middle}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.relative{position:relative}.inline-block{display:inline-block}.min-h-screen{min-height:100vh}.flex{display:flex}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.gap-4{gap:1rem}.overflow-hidden{overflow:hidden}.border{border-width:1px}.border-\\[\\#00DC42\\]\\/50{border-color:#00dc4280}.group:hover .group-hover\\:border-\\[\\#00DC42\\]{--un-border-opacity:1;border-color:rgb(0 220 66/var(--un-border-opacity))}.rounded{border-radius:.25rem}.bg-\\[\\#00DC42\\]\\/10{background-color:#00dc421a}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.group:hover .group-hover\\:bg-\\[\\#00DC42\\]\\/15{background-color:#00dc4226}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.text-center{text-align:center}.text-\\[16px\\]{font-size:16px}.group:hover .group-hover\\:text-\\[\\#00DC82\\],.text-\\[\\#00DC82\\]{--un-text-opacity:1;color:rgb(0 220 130/var(--un-text-opacity))}.text-\\[\\#00DC82\\]\\/80{color:#00dc82cc}.group:hover .group-hover\\:text-\\[\\#020420\\],.text-\\[\\#020420\\]{--un-text-opacity:1;color:rgb(2 4 32/var(--un-text-opacity))}.text-\\[\\#020420\\]\\/80{color:#020420cc}.font-semibold{font-weight:600}.leading-none{line-height:1}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\\:bg-\\[\\#020420\\]{--un-bg-opacity:1;background-color:rgb(2 4 32/var(--un-bg-opacity))}.dark\\:text-gray-200{--un-text-opacity:1;color:rgb(224 224 224/var(--un-text-opacity))}.dark\\:text-white,.group:hover .dark\\:group-hover\\:text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}</style><script>!function(){const e=document.createElement(\"link\").relList;if(!(e&&e.supports&&e.supports(\"modulepreload\"))){for(const e of document.querySelectorAll('link[rel=\"modulepreload\"]'))r(e);new MutationObserver(e=>{for(const o of e)if(\"childList\"===o.type)for(const e of o.addedNodes)\"LINK\"===e.tagName&&\"modulepreload\"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),\"use-credentials\"===e.crossOrigin?r.credentials=\"include\":\"anonymous\"===e.crossOrigin?r.credentials=\"omit\":r.credentials=\"same-origin\",r}(e);fetch(e.href,r)}}();<\/script></head><body class=\"antialiased bg-white dark:bg-[#020420] dark:text-white flex flex-col font-sans items-center justify-center min-h-screen overflow-hidden relative text-[#020420] text-center\"><a href=\"https://nuxt.com/?utm_source=nuxt-loading-screen\" target=\"_blank\" rel=\"noopener\" class=\"flex gap-4 group items-end nuxt-logo\" id=\"nuxtImg\"><div class=\"relative\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"80\" fill=\"none\" class=\"group-hover:text-[#00DC82] text-[#00DC82]/80 triangle-loading\" viewBox=\"0 0 37 25\"><path stroke=\"currentColor\" d=\"M24.236 22.006h10.742L25.563 5.822l-8.979 14.31a4 4 0 0 1-3.388 1.874H2.978l11.631-20 5.897 10.567\"/></svg> <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"214\" height=\"53\" fill=\"none\" class=\"dark:group-hover:text-white dark:text-gray-200 group-hover:text-[#020420] text-[#020420]/80\" viewBox=\"0 0 800 200\"><path fill=\"currentColor\" d=\"M377 200a4 4 0 0 0 4-4v-93s5.244 8.286 15 25l38.707 66.961c1.789 3.119 5.084 5.039 8.649 5.039H470V50h-27a4 4 0 0 0-4 4v94l-17-30-36.588-62.98c-1.792-3.108-5.081-5.02-8.639-5.02H350v150zm299.203-56.143L710.551 92h-25.73a9.97 9.97 0 0 0-8.333 4.522L660.757 120.5l-15.731-23.978A9.97 9.97 0 0 0 636.693 92h-25.527l34.348 51.643L608.524 200h24.966a9.97 9.97 0 0 0 8.29-4.458l19.18-28.756 18.981 28.72a9.97 9.97 0 0 0 8.313 4.494h24.736zM724.598 92h19.714V60.071h28.251V92H800v24.857h-27.437V159.5c0 10.5 5.284 15.429 14.43 15.429H800V200h-16.869c-23.576 0-38.819-14.143-38.819-39.214v-43.929h-19.714zM590 92h-15c-3.489 0-6.218.145-8.5 2.523-2.282 2.246-2.5 3.63-2.5 7.066v52.486c0 8.058-.376 12.962-4 16.925-3.624 3.831-8.619 5-16 5-7.247 0-12.376-1.169-16-5-3.624-3.963-4-8.867-4-16.925v-52.486c0-3.435-.218-4.82-2.5-7.066C519.218 92.145 516.489 92 513 92h-15v62.422q0 21.006 11.676 33.292C517.594 195.905 529.103 200 544 200s26.204-4.095 34.123-12.286Q590 175.428 590 154.422z\"/></svg></div> <span class=\"bg-[#00DC42]/10 border border-[#00DC42]/50 font-mono font-semibold group-hover:bg-[#00DC42]/15 group-hover:border-[#00DC42] inline-block leading-none px-2.5 py-1.5 rounded text-[#00DC82] text-[16px]\">4.4.2</span> </a><div class=\"nuxt-loader-bar\"></div><script>if(void 0===window.fetch)setTimeout(()=>window.location.reload(),200);else{const o=async()=>{try{if(!(await window.fetch(window.location.href).then(o=>o.text())).includes(\"__NUXT_LOADING__\"))return window.location.reload()}catch{}setTimeout(o,200)};o()}<\/script><script>const prefersReducedMotion=window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;function whatHemisphere(){let e=new Date;if(null==e.getTimezoneOffset)return null;e=e.getFullYear();let t=-new Date(e,0,1,0,0,0,0).getTimezoneOffset()- -new Date(e,6,1,0,0,0,0).getTimezoneOffset();return t<0?\"N\":t>0?\"S\":null}const months={N:[10,11,0],S:[4,5,6]},hemisphere=whatHemisphere();if(hemisphere&&months[hemisphere].includes((new Date).getMonth())&&!prefersReducedMotion){let e=\"false\"!==localStorage.getItem(\"nuxt-snow\"),t=null,n=[],r=Date.now();const i=25e-5,a=1.25,o={current:0,maxCurrent:4,force:.1,target:.1,min:.1,max:.4,easing:.01},s=(e,t)=>(e%t+t)%t,d=document.createElement(\"button\");d.id=\"snow-toggle\",d.style=\"position:fixed;bottom:16px;right:16px;z-index:100;background:rgba(255,255,255,0.1);border:1px solid rgba(255,255,255,0.2);border-radius:8px;padding:8px 12px;cursor:pointer;font-size:20px;\",document.body.appendChild(d);const h=document.createElement(\"canvas\");h.id=\"snow-canvas\",h.style=\"position:fixed;inset:0;z-index:-10;pointer-events:none;opacity:0;transition:opacity 0.5s;filter:blur(4px);\",document.body.appendChild(h);const l=h.getContext(\"2d\");function resize(){h.width=window.innerWidth,h.height=window.innerHeight,n=Array.from({length:Math.floor(h.width*h.height*i)},()=>({x:Math.random()*h.width,y:Math.random()*h.height,vx:1+Math.random(),vy:1+Math.random(),vsin:10*Math.random(),rangle:2*Math.random()*Math.PI,rsin:10*Math.random(),color:`rgba(255,255,255,${.1+.15*Math.random()})`,size:5*Math.random()*4*(h.height/1e3)}))}function draw(){l.clearRect(0,0,h.width,h.height);const e=Date.now(),i=e-r;r=e,o.force+=(o.target-o.force)*o.easing,o.current=Math.max(-o.maxCurrent,Math.min(o.current+o.force*i*.05,o.maxCurrent)),Math.random()>.995&&(o.target=(o.min+Math.random()*(o.max-o.min))*(Math.random()>.5?-1:1));const d=.2*i;n.forEach(e=>{e.x=s(e.x+d+o.current*e.vx,h.width),e.y=s(e.y+d*e.vy*a,h.height),e.x+=Math.sin(d*e.vsin)*e.rsin*.5,e.rangle+=.01*d,l.fillStyle=e.color,l.beginPath(),l.ellipse(e.x,e.y,e.size,.66*e.size,e.rangle,0,2*Math.PI),l.fill()}),t=requestAnimationFrame(draw)}function update(){d.innerHTML=e?\"☀️\":\"❄️\",d.title=e?\"Disable snow\":\"Enable snow\",e?(resize(),window.addEventListener(\"resize\",resize),h.style.opacity=1,r=Date.now(),draw()):(t&&cancelAnimationFrame(t),t=null,window.removeEventListener(\"resize\",resize),h.style.opacity=0)}d.onclick=()=>{e=!e,localStorage.setItem(\"nuxt-snow\",e),update()},update()}<\/script></body></html>";
};
//#endregion
//#region src/config/dev.ts
var dev_default = defineResolvers({ devServer: {

@@ -495,5 +538,9 @@ https: false,

} });
//#endregion
//#region src/config/esbuild.ts
var esbuild_default = defineResolvers({ esbuild: { options: {
target: { $resolve: async (val, get) => {
if (typeof val === "string") return val;
const builder = await get("builder");
if (!builder || builder === "vite" || builder === "@nuxt/vite-builder") return "esnext";
if (await get("experimental").then((r) => r?.decorators === true)) return "es2024";

@@ -510,11 +557,11 @@ return "esnext";

} } });
//#endregion
//#region src/config/oxc.ts
var oxc_default = defineResolvers({ oxc: { transform: { options: {
target: { $resolve: async (val, get) => {
if (typeof val === "string") return val;
if (await get("experimental").then((r) => r?.decorators === true)) return "es2024";
return "esnext";
} },
target: "esnext",
jsxFactory: "h",
jsxFragment: "Fragment"
} } } });
//#endregion
//#region src/config/experimental.ts
var experimental_default = defineResolvers({

@@ -571,3 +618,7 @@ future: {

noVueServer: false,
payloadExtraction: true,
payloadExtraction: { $resolve: async (val, get) => {
if (await get("ssr") === false) return false;
if (val === "client" || typeof val === "boolean") return val;
return await get("future.compatibilityVersion") >= 5 ? "client" : true;
} },
clientFallback: false,

@@ -614,2 +665,5 @@ crossOriginPrefetch: false,

useAsyncData: { deep: false },
useState: { resetOnClear: { $resolve: async (val, get) => {
return typeof val === "boolean" ? val : await get("future.compatibilityVersion") >= 5;
} } },
useFetch: {}

@@ -623,6 +677,9 @@ },

} },
normalizePageNames: { $resolve: async (val, get) => {
return typeof val === "boolean" ? val : await get("future.compatibilityVersion") >= 5;
} },
spaLoadingTemplateLocation: { $resolve: (val) => {
return typeof val === "string" && new Set(["body", "within"]).has(val) ? val : "body";
} },
browserDevtoolsTiming: { $resolve: async (val, get) => typeof val === "boolean" ? val : await get("dev") },
browserDevtoolsTiming: { $resolve: (val, get) => typeof val === "boolean" ? val : get("dev") },
chromeDevtoolsProjectSettings: true,

@@ -661,5 +718,10 @@ debugModuleMutation: { $resolve: async (val, get) => {

return typeof val === "boolean" ? val : await get("future.compatibilityVersion") < 5;
} },
asyncCallHook: { $resolve: async (val, get) => {
return typeof val === "boolean" ? val : await get("future.compatibilityVersion") < 5;
} }
}
});
//#endregion
//#region src/config/generate.ts
var generate_default = defineResolvers({ generate: {

@@ -669,2 +731,4 @@ routes: [],

} });
//#endregion
//#region src/config/internal.ts
var internal_default = defineResolvers({

@@ -686,2 +750,4 @@ _majorVersion: 4,

});
//#endregion
//#region src/config/nitro.ts
var nitro_default = defineResolvers({

@@ -719,2 +785,4 @@ server: { builder: { $resolve: (val) => {

});
//#endregion
//#region src/config/postcss.ts
const ensureItemIsLast = (item) => (arr) => {

@@ -754,2 +822,4 @@ const index = arr.indexOf(item);

} });
//#endregion
//#region src/config/router.ts
var router_default = defineResolvers({ router: { options: {

@@ -759,2 +829,4 @@ hashMode: false,

} } });
//#endregion
//#region src/config/typescript.ts
var typescript_default = defineResolvers({ typescript: {

@@ -781,3 +853,2 @@ strict: true,

"vue-router/auto-routes",
"unplugin-vue-router/client",
"@nuxt/schema",

@@ -793,4 +864,6 @@ "nuxt"

} });
//#endregion
//#region src/config/vite.ts
var vite_default = defineResolvers({ vite: {
root: { $resolve: async (val, get) => typeof val === "string" ? val : await get("srcDir") },
root: { $resolve: (val, get) => typeof val === "string" ? val : get("srcDir") },
mode: { $resolve: async (val, get) => typeof val === "string" ? val : await get("dev") ? "development" : "production" },

@@ -869,2 +942,4 @@ define: { $resolve: async (_val, get) => {

} });
//#endregion
//#region src/config/webpack.ts
var webpack_default = defineResolvers({ webpack: {

@@ -876,3 +951,3 @@ analyze: { $resolve: async (val, get) => {

extractCSS: true,
cssSourceMap: { $resolve: async (val, get) => typeof val === "boolean" ? val : await get("dev") },
cssSourceMap: { $resolve: (val, get) => typeof val === "boolean" ? val : get("dev") },
serverURLPolyfill: "url",

@@ -958,3 +1033,3 @@ filenames: {

},
postcss: { postcssOptions: { plugins: { $resolve: async (val, get) => val && typeof val === "object" ? val : await get("postcss.plugins") } } },
postcss: { postcssOptions: { plugins: { $resolve: (val, get) => val && typeof val === "object" ? val : get("postcss.plugins") } } },
devMiddleware: { stats: "none" },

@@ -966,2 +1041,4 @@ hotMiddleware: {},

} });
//#endregion
//#region src/config/index.ts
var config_default = {

@@ -985,2 +1062,3 @@ ...adhoc_default,

};
//#endregion
export { config_default as NuxtConfigSchema };
+20
-20
{
"name": "@nuxt/schema",
"version": "4.3.1",
"version": "4.4.2",
"repository": {

@@ -30,43 +30,43 @@ "type": "git",

"@types/webpack-hot-middleware": "2.25.12",
"@unhead/vue": "2.1.3",
"@unhead/vue": "2.1.12",
"@vitejs/plugin-vue": "6.0.4",
"@vitejs/plugin-vue-jsx": "5.1.4",
"@vue/compiler-core": "3.5.27",
"@vue/compiler-sfc": "3.5.27",
"@vue/language-core": "3.2.4",
"@vue/compiler-core": "3.5.30",
"@vue/compiler-sfc": "3.5.30",
"@vue/language-core": "3.2.5",
"c12": "3.3.3",
"chokidar": "5.0.0",
"compatx": "0.2.0",
"css-minimizer-webpack-plugin": "7.0.4",
"css-minimizer-webpack-plugin": "8.0.0",
"esbuild": "0.27.3",
"esbuild-loader": "4.4.2",
"file-loader": "6.2.0",
"h3": "1.15.5",
"hookable": "5.5.3",
"h3": "1.15.6",
"hookable": "6.0.1",
"ignore": "7.0.5",
"mini-css-extract-plugin": "2.10.0",
"obuild": "0.4.27",
"mini-css-extract-plugin": "2.10.1",
"obuild": "0.4.32",
"ofetch": "1.5.1",
"oxc-transform": "0.112.0",
"postcss": "8.5.6",
"rollup-plugin-visualizer": "6.0.5",
"sass-loader": "16.0.6",
"oxc-transform": "0.117.0",
"postcss": "8.5.8",
"rollup-plugin-visualizer": "7.0.1",
"sass-loader": "16.0.7",
"scule": "1.3.0",
"unctx": "2.5.0",
"unimport": "5.6.0",
"unimport": "6.0.1",
"untyped": "2.0.0",
"vite": "7.3.1",
"vue": "3.5.27",
"vue": "3.5.30",
"vue-bundle-renderer": "2.2.0",
"vue-loader": "17.4.2",
"vue-router": "4.6.4",
"webpack": "5.104.1",
"vue-router": "5.0.3",
"webpack": "5.105.4",
"webpack-dev-middleware": "7.4.5"
},
"dependencies": {
"@vue/shared": "^3.5.27",
"@vue/shared": "^3.5.30",
"defu": "^6.1.4",
"pathe": "^2.0.3",
"pkg-types": "^2.3.0",
"std-env": "^3.10.0"
"std-env": "^4.0.0"
},

@@ -73,0 +73,0 @@ "engines": {

@@ -1,2 +0,2 @@

[![Nuxt banner](https://github.com/nuxt/nuxt/blob/main/.github/assets/banner.svg)](https://nuxt.com)
<a href="https://nuxt.com"><img width="830" height="213" src="https://github.com/nuxt/nuxt/blob/main/.github/assets/banner.svg" alt="Nuxt banner"></a>

@@ -6,4 +6,4 @@ # Nuxt

<p>
<a href="https://www.npmjs.com/package/nuxt"><img src="https://img.shields.io/npm/v/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="Version"></a>
<a href="https://www.npmjs.com/package/nuxt"><img src="https://img.shields.io/npm/dm/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="Downloads"></a>
<a href="https://npmx.dev/package/nuxt"><img src="https://npmx.dev/api/registry/badge/version/nuxt" alt="Version"></a>
<a href="https://npmx.dev/package/nuxt"><img src="https://npmx.dev/api/registry/badge/downloads/nuxt" alt="Downloads"></a>
<a href="https://github.com/nuxt/nuxt/blob/main/LICENSE"><img src="https://img.shields.io/github/license/nuxt/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="License"></a>

@@ -13,3 +13,3 @@ <a href="https://nuxt.com/modules"><img src="https://img.shields.io/badge/dynamic/json?url=https://nuxt.com/api/v1/modules&query=$.stats.modules&label=Modules&style=flat&colorA=18181B&colorB=28CF8D" alt="Modules"></a>

<a href="https://chat.nuxt.dev"><img src="https://img.shields.io/badge/Nuxt%20Discord-18181B?logo=discord" alt="Discord"></a>
<a href="https://securityscorecards.dev/"><img src="https://api.securityscorecards.dev/projects/github.com/nuxt/nuxt/badge" alt="Nuxt openssf scorecard score"></a>
<a href="https://securityscorecards.dev/viewer/?uri=github.com/nuxt/nuxt"><img src="https://api.securityscorecards.dev/projects/github.com/nuxt/nuxt/badge" alt="Nuxt openssf scorecard score"></a>
<a href="https://deepwiki.com/nuxt/nuxt"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>

@@ -16,0 +16,0 @@ </p>

Sorry, the diff of this file is too big to display

//#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts
type GeneratedColumn = number;
type SourcesIndex = number;
type SourceLine = number;
type SourceColumn = number;
type NamesIndex = number;
type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
//#endregion
//#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/types/types.d.mts
interface SourceMapV3 {
file?: string | null;
names: string[];
sourceRoot?: string;
sources: (string | null)[];
sourcesContent?: (string | null)[];
version: 3;
ignoreList?: number[];
}
interface EncodedSourceMap extends SourceMapV3 {
mappings: string;
}
interface DecodedSourceMap extends SourceMapV3 {
mappings: SourceMapSegment[][];
}
interface Section {
offset: {
line: number;
column: number;
};
map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap;
}
interface SectionedSourceMap {
file?: string | null;
sections: Section[];
version: 3;
}
type XInput = {
x_google_ignoreList?: SourceMapV3['ignoreList'];
};
type EncodedSourceMapXInput = EncodedSourceMap & XInput;
type DecodedSourceMapXInput = DecodedSourceMap & XInput;
type SectionedSourceMapXInput = Omit<SectionedSourceMap, 'sections'> & {
sections: SectionXInput[];
};
type SectionXInput = Omit<Section, 'map'> & {
map: SectionedSourceMapInput;
};
type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap;
type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput;
declare abstract class SourceMap {
version: SourceMapV3['version'];
file: SourceMapV3['file'];
names: SourceMapV3['names'];
sourceRoot: SourceMapV3['sourceRoot'];
sources: SourceMapV3['sources'];
sourcesContent: SourceMapV3['sourcesContent'];
resolvedSources: SourceMapV3['sources'];
ignoreList: SourceMapV3['ignoreList'];
}
type Ro<T> = T extends Array<infer V> ? V[] | Readonly<V[]> | RoArray<V> | Readonly<RoArray<V>> : T extends object ? T | Readonly<T> | RoObject<T> | Readonly<RoObject<T>> : T;
type RoArray<T> = Ro<T>[];
type RoObject<T> = { [K in keyof T]: T[K] | Ro<T[K]> };
//#endregion
//#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts
declare class TraceMap implements SourceMap {
version: SourceMapV3['version'];
file: SourceMapV3['file'];
names: SourceMapV3['names'];
sourceRoot: SourceMapV3['sourceRoot'];
sources: SourceMapV3['sources'];
sourcesContent: SourceMapV3['sourcesContent'];
ignoreList: SourceMapV3['ignoreList'];
resolvedSources: string[];
private _encoded;
private _decoded;
private _decodedMemo;
private _bySources;
private _bySourceMemos;
constructor(map: Ro<SourceMapInput>, mapUrl?: string | null);
}
//#endregion
export { SectionedSourceMapInput as t };
//#region ../../node_modules/.pnpm/@types+estree@1.0.8/node_modules/@types/estree/index.d.ts
// This definition file follows a somewhat unusual format. ESTree allows
// runtime type checks based on the `type` parameter. In order to explain this
// to typescript we want to use discriminated union types:
// https://github.com/Microsoft/TypeScript/pull/9163
//
// For ESTree this is a bit tricky because the high level interfaces like
// Node or Function are pulling double duty. We want to pass common fields down
// to the interfaces that extend them (like Identifier or
// ArrowFunctionExpression), but you can't extend a type union or enforce
// common fields on them. So we've split the high level interfaces into two
// types, a base type which passes down inherited fields, and a type union of
// all types which extend the base type. Only the type union is exported, and
// the union is how other types refer to the collection of inheriting types.
//
// This makes the definitions file here somewhat more difficult to maintain,
// but it has the notable advantage of making ESTree much easier to use as
// an end user.
interface BaseNodeWithoutComments {
// Every leaf interface that extends BaseNode must specify a type property.
// The type property should be a string literal. For example, Identifier
// has: `type: "Identifier"`
type: string;
loc?: SourceLocation | null | undefined;
range?: [number, number] | undefined;
}
interface BaseNode extends BaseNodeWithoutComments {
leadingComments?: Comment[] | undefined;
trailingComments?: Comment[] | undefined;
}
interface NodeMap {
AssignmentProperty: AssignmentProperty;
CatchClause: CatchClause;
Class: Class;
ClassBody: ClassBody;
Expression: Expression;
Function: Function;
Identifier: Identifier;
Literal: Literal;
MethodDefinition: MethodDefinition;
ModuleDeclaration: ModuleDeclaration;
ModuleSpecifier: ModuleSpecifier;
Pattern: Pattern;
PrivateIdentifier: PrivateIdentifier;
Program: Program;
Property: Property;
PropertyDefinition: PropertyDefinition;
SpreadElement: SpreadElement;
Statement: Statement;
Super: Super;
SwitchCase: SwitchCase;
TemplateElement: TemplateElement;
VariableDeclarator: VariableDeclarator;
}
type Node = NodeMap[keyof NodeMap];
interface Comment extends BaseNodeWithoutComments {
type: "Line" | "Block";
value: string;
}
interface SourceLocation {
source?: string | null | undefined;
start: Position;
end: Position;
}
interface Position {
/** >= 1 */
line: number;
/** >= 0 */
column: number;
}
interface Program extends BaseNode {
type: "Program";
sourceType: "script" | "module";
body: Array<Directive | Statement | ModuleDeclaration>;
comments?: Comment[] | undefined;
}
interface Directive extends BaseNode {
type: "ExpressionStatement";
expression: Literal;
directive: string;
}
interface BaseFunction extends BaseNode {
params: Pattern[];
generator?: boolean | undefined;
async?: boolean | undefined; // The body is either BlockStatement or Expression because arrow functions
// can have a body that's either. FunctionDeclarations and
// FunctionExpressions have only BlockStatement bodies.
body: BlockStatement | Expression;
}
type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
type Statement = ExpressionStatement | BlockStatement | StaticBlock | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | Declaration;
interface BaseStatement extends BaseNode {}
interface EmptyStatement extends BaseStatement {
type: "EmptyStatement";
}
interface BlockStatement extends BaseStatement {
type: "BlockStatement";
body: Statement[];
innerComments?: Comment[] | undefined;
}
interface StaticBlock extends Omit<BlockStatement, "type"> {
type: "StaticBlock";
}
interface ExpressionStatement extends BaseStatement {
type: "ExpressionStatement";
expression: Expression;
}
interface IfStatement extends BaseStatement {
type: "IfStatement";
test: Expression;
consequent: Statement;
alternate?: Statement | null | undefined;
}
interface LabeledStatement extends BaseStatement {
type: "LabeledStatement";
label: Identifier;
body: Statement;
}
interface BreakStatement extends BaseStatement {
type: "BreakStatement";
label?: Identifier | null | undefined;
}
interface ContinueStatement extends BaseStatement {
type: "ContinueStatement";
label?: Identifier | null | undefined;
}
interface WithStatement extends BaseStatement {
type: "WithStatement";
object: Expression;
body: Statement;
}
interface SwitchStatement extends BaseStatement {
type: "SwitchStatement";
discriminant: Expression;
cases: SwitchCase[];
}
interface ReturnStatement extends BaseStatement {
type: "ReturnStatement";
argument?: Expression | null | undefined;
}
interface ThrowStatement extends BaseStatement {
type: "ThrowStatement";
argument: Expression;
}
interface TryStatement extends BaseStatement {
type: "TryStatement";
block: BlockStatement;
handler?: CatchClause | null | undefined;
finalizer?: BlockStatement | null | undefined;
}
interface WhileStatement extends BaseStatement {
type: "WhileStatement";
test: Expression;
body: Statement;
}
interface DoWhileStatement extends BaseStatement {
type: "DoWhileStatement";
body: Statement;
test: Expression;
}
interface ForStatement extends BaseStatement {
type: "ForStatement";
init?: VariableDeclaration | Expression | null | undefined;
test?: Expression | null | undefined;
update?: Expression | null | undefined;
body: Statement;
}
interface BaseForXStatement extends BaseStatement {
left: VariableDeclaration | Pattern;
right: Expression;
body: Statement;
}
interface ForInStatement extends BaseForXStatement {
type: "ForInStatement";
}
interface DebuggerStatement extends BaseStatement {
type: "DebuggerStatement";
}
type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
interface BaseDeclaration extends BaseStatement {}
interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
type: "FunctionDeclaration";
/** It is null when a function declaration is a part of the `export default function` statement */
id: Identifier | null;
body: BlockStatement;
}
interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
id: Identifier;
}
interface VariableDeclaration extends BaseDeclaration {
type: "VariableDeclaration";
declarations: VariableDeclarator[];
kind: "var" | "let" | "const" | "using" | "await using";
}
interface VariableDeclarator extends BaseNode {
type: "VariableDeclarator";
id: Pattern;
init?: Expression | null | undefined;
}
interface ExpressionMap {
ArrayExpression: ArrayExpression;
ArrowFunctionExpression: ArrowFunctionExpression;
AssignmentExpression: AssignmentExpression;
AwaitExpression: AwaitExpression;
BinaryExpression: BinaryExpression;
CallExpression: CallExpression;
ChainExpression: ChainExpression;
ClassExpression: ClassExpression;
ConditionalExpression: ConditionalExpression;
FunctionExpression: FunctionExpression;
Identifier: Identifier;
ImportExpression: ImportExpression;
Literal: Literal;
LogicalExpression: LogicalExpression;
MemberExpression: MemberExpression;
MetaProperty: MetaProperty;
NewExpression: NewExpression;
ObjectExpression: ObjectExpression;
SequenceExpression: SequenceExpression;
TaggedTemplateExpression: TaggedTemplateExpression;
TemplateLiteral: TemplateLiteral;
ThisExpression: ThisExpression;
UnaryExpression: UnaryExpression;
UpdateExpression: UpdateExpression;
YieldExpression: YieldExpression;
}
type Expression = ExpressionMap[keyof ExpressionMap];
interface BaseExpression extends BaseNode {}
type ChainElement = SimpleCallExpression | MemberExpression;
interface ChainExpression extends BaseExpression {
type: "ChainExpression";
expression: ChainElement;
}
interface ThisExpression extends BaseExpression {
type: "ThisExpression";
}
interface ArrayExpression extends BaseExpression {
type: "ArrayExpression";
elements: Array<Expression | SpreadElement | null>;
}
interface ObjectExpression extends BaseExpression {
type: "ObjectExpression";
properties: Array<Property | SpreadElement>;
}
interface PrivateIdentifier extends BaseNode {
type: "PrivateIdentifier";
name: string;
}
interface Property extends BaseNode {
type: "Property";
key: Expression | PrivateIdentifier;
value: Expression | Pattern; // Could be an AssignmentProperty
kind: "init" | "get" | "set";
method: boolean;
shorthand: boolean;
computed: boolean;
}
interface PropertyDefinition extends BaseNode {
type: "PropertyDefinition";
key: Expression | PrivateIdentifier;
value?: Expression | null | undefined;
computed: boolean;
static: boolean;
}
interface FunctionExpression extends BaseFunction, BaseExpression {
id?: Identifier | null | undefined;
type: "FunctionExpression";
body: BlockStatement;
}
interface SequenceExpression extends BaseExpression {
type: "SequenceExpression";
expressions: Expression[];
}
interface UnaryExpression extends BaseExpression {
type: "UnaryExpression";
operator: UnaryOperator;
prefix: true;
argument: Expression;
}
interface BinaryExpression extends BaseExpression {
type: "BinaryExpression";
operator: BinaryOperator;
left: Expression | PrivateIdentifier;
right: Expression;
}
interface AssignmentExpression extends BaseExpression {
type: "AssignmentExpression";
operator: AssignmentOperator;
left: Pattern | MemberExpression;
right: Expression;
}
interface UpdateExpression extends BaseExpression {
type: "UpdateExpression";
operator: UpdateOperator;
argument: Expression;
prefix: boolean;
}
interface LogicalExpression extends BaseExpression {
type: "LogicalExpression";
operator: LogicalOperator;
left: Expression;
right: Expression;
}
interface ConditionalExpression extends BaseExpression {
type: "ConditionalExpression";
test: Expression;
alternate: Expression;
consequent: Expression;
}
interface BaseCallExpression extends BaseExpression {
callee: Expression | Super;
arguments: Array<Expression | SpreadElement>;
}
type CallExpression = SimpleCallExpression | NewExpression;
interface SimpleCallExpression extends BaseCallExpression {
type: "CallExpression";
optional: boolean;
}
interface NewExpression extends BaseCallExpression {
type: "NewExpression";
}
interface MemberExpression extends BaseExpression, BasePattern {
type: "MemberExpression";
object: Expression | Super;
property: Expression | PrivateIdentifier;
computed: boolean;
optional: boolean;
}
type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
interface BasePattern extends BaseNode {}
interface SwitchCase extends BaseNode {
type: "SwitchCase";
test?: Expression | null | undefined;
consequent: Statement[];
}
interface CatchClause extends BaseNode {
type: "CatchClause";
param: Pattern | null;
body: BlockStatement;
}
interface Identifier extends BaseNode, BaseExpression, BasePattern {
type: "Identifier";
name: string;
}
type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
interface SimpleLiteral extends BaseNode, BaseExpression {
type: "Literal";
value: string | boolean | number | null;
raw?: string | undefined;
}
interface RegExpLiteral extends BaseNode, BaseExpression {
type: "Literal";
value?: RegExp | null | undefined;
regex: {
pattern: string;
flags: string;
};
raw?: string | undefined;
}
interface BigIntLiteral extends BaseNode, BaseExpression {
type: "Literal";
value?: bigint | null | undefined;
bigint: string;
raw?: string | undefined;
}
type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" | "instanceof";
type LogicalOperator = "||" | "&&" | "??";
type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??=";
type UpdateOperator = "++" | "--";
interface ForOfStatement extends BaseForXStatement {
type: "ForOfStatement";
await: boolean;
}
interface Super extends BaseNode {
type: "Super";
}
interface SpreadElement extends BaseNode {
type: "SpreadElement";
argument: Expression;
}
interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
type: "ArrowFunctionExpression";
expression: boolean;
body: BlockStatement | Expression;
}
interface YieldExpression extends BaseExpression {
type: "YieldExpression";
argument?: Expression | null | undefined;
delegate: boolean;
}
interface TemplateLiteral extends BaseExpression {
type: "TemplateLiteral";
quasis: TemplateElement[];
expressions: Expression[];
}
interface TaggedTemplateExpression extends BaseExpression {
type: "TaggedTemplateExpression";
tag: Expression;
quasi: TemplateLiteral;
}
interface TemplateElement extends BaseNode {
type: "TemplateElement";
tail: boolean;
value: {
/** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */cooked?: string | null | undefined;
raw: string;
};
}
interface AssignmentProperty extends Property {
value: Pattern;
kind: "init";
method: boolean; // false
}
interface ObjectPattern extends BasePattern {
type: "ObjectPattern";
properties: Array<AssignmentProperty | RestElement>;
}
interface ArrayPattern extends BasePattern {
type: "ArrayPattern";
elements: Array<Pattern | null>;
}
interface RestElement extends BasePattern {
type: "RestElement";
argument: Pattern;
}
interface AssignmentPattern extends BasePattern {
type: "AssignmentPattern";
left: Pattern;
right: Expression;
}
type Class = ClassDeclaration | ClassExpression;
interface BaseClass extends BaseNode {
superClass?: Expression | null | undefined;
body: ClassBody;
}
interface ClassBody extends BaseNode {
type: "ClassBody";
body: Array<MethodDefinition | PropertyDefinition | StaticBlock>;
}
interface MethodDefinition extends BaseNode {
type: "MethodDefinition";
key: Expression | PrivateIdentifier;
value: FunctionExpression;
kind: "constructor" | "method" | "get" | "set";
computed: boolean;
static: boolean;
}
interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration {
type: "ClassDeclaration";
/** It is null when a class declaration is a part of the `export default class` statement */
id: Identifier | null;
}
interface ClassDeclaration extends MaybeNamedClassDeclaration {
id: Identifier;
}
interface ClassExpression extends BaseClass, BaseExpression {
type: "ClassExpression";
id?: Identifier | null | undefined;
}
interface MetaProperty extends BaseExpression {
type: "MetaProperty";
meta: Identifier;
property: Identifier;
}
type ModuleDeclaration = ImportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration;
interface BaseModuleDeclaration extends BaseNode {}
type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier;
interface BaseModuleSpecifier extends BaseNode {
local: Identifier;
}
interface ImportDeclaration extends BaseModuleDeclaration {
type: "ImportDeclaration";
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
attributes: ImportAttribute[];
source: Literal;
}
interface ImportSpecifier extends BaseModuleSpecifier {
type: "ImportSpecifier";
imported: Identifier | Literal;
}
interface ImportAttribute extends BaseNode {
type: "ImportAttribute";
key: Identifier | Literal;
value: Literal;
}
interface ImportExpression extends BaseExpression {
type: "ImportExpression";
source: Expression;
options?: Expression | null | undefined;
}
interface ImportDefaultSpecifier extends BaseModuleSpecifier {
type: "ImportDefaultSpecifier";
}
interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
type: "ImportNamespaceSpecifier";
}
interface ExportNamedDeclaration extends BaseModuleDeclaration {
type: "ExportNamedDeclaration";
declaration?: Declaration | null | undefined;
specifiers: ExportSpecifier[];
attributes: ImportAttribute[];
source?: Literal | null | undefined;
}
interface ExportSpecifier extends Omit<BaseModuleSpecifier, "local"> {
type: "ExportSpecifier";
local: Identifier | Literal;
exported: Identifier | Literal;
}
interface ExportDefaultDeclaration extends BaseModuleDeclaration {
type: "ExportDefaultDeclaration";
declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression;
}
interface ExportAllDeclaration extends BaseModuleDeclaration {
type: "ExportAllDeclaration";
exported: Identifier | Literal | null;
attributes: ImportAttribute[];
source: Literal;
}
interface AwaitExpression extends BaseExpression {
type: "AwaitExpression";
argument: Expression;
}
//#endregion
export { Program as i, Expression as n, Node as r, BaseNode as t };
//#region ../../node_modules/.pnpm/@types+pug@2.0.10/node_modules/@types/pug/index.d.ts
/**
* Table of Contents
*
* - Options https://pugjs.org/api/reference.html#options
* - Methods https://pugjs.org/api/reference.html#methods
*
* The order of contents is according to pugjs API document.
*/
declare module "pug" {
////////////////////////////////////////////////////////////
/// Options https://pugjs.org/api/reference.html#options ///
////////////////////////////////////////////////////////////
export interface Options {
/** The name of the file being compiled. Used in exceptions, and required for relative includes and extends. Defaults to 'Pug'. */
filename?: string | undefined;
/** The root directory of all absolute inclusion. */
basedir?: string | undefined;
/** If the doctype is not specified as part of the template, you can specify it here. It is sometimes useful to get self-closing tags and remove mirroring of boolean attributes; see doctype documentation for more information. */
doctype?: string | undefined;
/** Adds whitespace to the resulting HTML to make it easier for a human to read using ' ' as indentation. If a string is specified, that will be used as indentation instead (e.g. '\t'). Defaults to false. */
pretty?: boolean | string | undefined;
/** Hash table of custom filters. Defaults to undefined. */
filters?: any;
/** Use a self namespace to hold the locals. It will speed up the compilation, but instead of writing variable you will have to write self.variable to access a property of the locals object. Defaults to false. */
self?: boolean | undefined;
/** If set to true, the tokens and function body are logged to stdout. */
debug?: boolean | undefined;
/** If set to true, the function source will be included in the compiled template for better error messages (sometimes useful in development). It is enabled by default unless used with Express in production mode. */
compileDebug?: boolean | undefined;
/** Add a list of global names to make accessible in templates. */
globals?: string[] | undefined;
/** If set to true, compiled functions are cached. filename must be set as the cache key. Only applies to render functions. Defaults to false. */
cache?: boolean | undefined;
/** Inline runtime functions instead of require-ing them from a shared version. For compileClient functions, the default is true so that one does not have to include the runtime. For all other compilation or rendering types, the default is false. */
inlineRuntimeFunctions?: boolean | undefined;
/** The name of the template function. Only applies to compileClient functions. Defaults to 'template'. */
name?: string | undefined;
} ////////////////////////////////////////////////////////////
/// Methods https://pugjs.org/api/reference.html#methods ///
////////////////////////////////////////////////////////////
/**
* Compile a Pug template to a function which can be rendered multiple times with different locals.
*/
export function compile(template: string, options?: Options): compileTemplate;
/**
* Compile a Pug template from a file to a function which can be rendered multiple times with different locals.
*/
export function compileFile(path: string, options?: Options): compileTemplate;
/**
* Compile a Pug template to a string of JavaScript that can be used client side along with the Pug runtime.
*/
export function compileClient(template: string, options?: Options): string;
/**
* Compile a Pug template to an object of the form:
* {
* 'body': 'function (locals) {...}',
* 'dependencies': ['filename.pug']
* }
* that can be used client side along with the Pug runtime.
* You should only use this method if you need dependencies to implement something like watching for changes to the Pug files.
*/
export function compileClientWithDependenciesTracked(template: string, options?: Options): {
body: string;
dependencies: string[];
};
/**
* Compile a Pug template file to a string of JavaScript that can be used client side along with the Pug runtime.
*/
export function compileFileClient(path: string, options?: Options): string;
/**
* Compile a Pug template and render it without locals to html string.
*/
export function render(template: string): string;
/**
* Compile a Pug template and render it with locals to html string.
* @param {(Options & LocalsObject)} options Pug Options and rendering locals
*/
export function render(template: string, options: Options & LocalsObject): string;
/**
* Compile a Pug template and render it without locals to html string.
* @param {((err: Error | null, html: string) => void)} callback Node.js-style callback receiving the rendered results. This callback is called synchronously.
*/
export function render(template: string, callback: (err: Error | null, html: string) => void): void;
/**
* Compile a Pug template and render it with locals to html string.
* @param {(Options & LocalsObject)} options Pug Options and rendering locals
* @param {((err: Error | null, html: string) => void)} callback Node.js-style callback receiving the rendered results. This callback is called synchronously.
*/
export function render(template: string, options: Options & LocalsObject, callback: (err: Error | null, html: string) => void): void;
/**
* Compile a Pug template from a file and render it without locals to html string.
*/
export function renderFile(path: string): string;
/**
* Compile a Pug template from a file and render it with locals to html string.
* @param {(Options & LocalsObject)} options Pug Options and rendering locals
*/
export function renderFile(path: string, options: Options & LocalsObject): string;
/**
* Compile a Pug template from a file and render it without locals to html string.
* @param {((err: Error | null, html: string) => void)} callback Node.js-style callback receiving the rendered results. This callback is called synchronously.
*/
export function renderFile(path: string, callback: (err: Error | null, html: string) => void): void;
/**
* Compile a Pug template from a file and render it with locals to html string.
* @param {(Options & LocalsObject)} options Pug Options and rendering locals
* @param {((err: Error | null, html: string) => void)} callback Node.js-style callback receiving the rendered results. This callback is called synchronously.
*/
export function renderFile(path: string, options: Options & LocalsObject, callback: (err: Error | null, html: string) => void): void; ///////////////////
/// Types ///
///////////////////
/**
* A function that can be use to render html string of compiled template.
*/
export type compileTemplate = (locals?: LocalsObject) => string;
/**
* An object that can have multiple properties of any type.
*/
export interface LocalsObject {
[propName: string]: any;
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

import { n as parse } from "../@babel/parser.mjs";
import { C as BindingMetadata, E as CompilerOptions, F as walkIdentifiers, M as generateCodeFrame, N as isInDestructureAssignment, P as isStaticProperty, T as CompilerError, j as extractIdentifiers } from "../@unhead/vue.mjs";
import { A as invalidateTypeCache, C as compileStyle, D as extractRuntimeEmits, E as errorMessages, F as rewriteDefault, I as rewriteDefaultAST, L as shouldTransformRef, M as parseCache, N as registerTS, O as extractRuntimeProps, P as resolveTypeElements, R as version, S as compileScript, T as compileTemplate, V as MagicString, _ as ScriptCompileContext, a as SFCBlock, b as TemplateCompiler, c as SFCParseResult, d as SFCStyleBlock, f as SFCStyleCompileOptions, g as SFCTemplateCompileResults, h as SFCTemplateCompileOptions, i as SFCAsyncStyleCompileOptions, j as parse$1, k as inferRuntimeType, l as SFCScriptBlock, m as SFCTemplateBlock, n as AssetURLOptions, o as SFCDescriptor, p as SFCStyleCompileResults, r as AssetURLTagConfig, s as SFCParseOptions, u as SFCScriptCompileOptions, v as SimpleTypeResolveContext, w as compileStyleAsync, x as TypeResolveContext, y as SimpleTypeResolveOptions, z as walk } from "./plugin-vue-jsx.mjs";
//#region ../../node_modules/.pnpm/vue@3.5.27_typescript@5.9.3/node_modules/vue/compiler-sfc/index.d.mts
declare namespace index_d_exports {
export { AssetURLOptions, AssetURLTagConfig, BindingMetadata, CompilerError, CompilerOptions, MagicString, SFCAsyncStyleCompileOptions, SFCBlock, SFCDescriptor, SFCParseOptions, SFCParseResult, SFCScriptBlock, SFCScriptCompileOptions, SFCStyleBlock, SFCStyleCompileOptions, SFCStyleCompileResults, SFCTemplateBlock, SFCTemplateCompileOptions, SFCTemplateCompileResults, ScriptCompileContext, SimpleTypeResolveContext, SimpleTypeResolveOptions, TemplateCompiler, TypeResolveContext, parse as babelParse, compileScript, compileStyle, compileStyleAsync, compileTemplate, errorMessages, extractIdentifiers, extractRuntimeEmits, extractRuntimeProps, generateCodeFrame, inferRuntimeType, invalidateTypeCache, isInDestructureAssignment, isStaticProperty, parse$1 as parse, parseCache, registerTS, resolveTypeElements, rewriteDefault, rewriteDefaultAST, shouldTransformRef, version, walk, walkIdentifiers };
}
//#endregion
//#region ../../node_modules/.pnpm/@vitejs+plugin-vue@6.0.4_vite@7.3.1_@types+node@24.10.11_jiti@2.6.1_terser@5.44.1_yaml@_ac9e2a922bb63677ceeba3834af69115/node_modules/@vitejs/plugin-vue/dist/index.d.mts
//#endregion
//#region src/index.d.ts
interface Options {
include?: string | RegExp | (string | RegExp)[];
exclude?: string | RegExp | (string | RegExp)[];
/**
* In Vite, this option follows Vite's config.
*/
isProduction?: boolean;
script?: Partial<Omit<SFCScriptCompileOptions, 'id' | 'isProd' | 'inlineTemplate' | 'templateOptions' | 'sourceMap' | 'genDefaultAs' | 'customElement' | 'defineModel' | 'propsDestructure'>> & {
/**
* @deprecated defineModel is now a stable feature and always enabled if
* using Vue 3.4 or above.
*/
defineModel?: boolean;
/**
* @deprecated moved to `features.propsDestructure`.
*/
propsDestructure?: boolean;
};
template?: Partial<Omit<SFCTemplateCompileOptions, 'id' | 'source' | 'ast' | 'filename' | 'scoped' | 'slotted' | 'isProd' | 'inMap' | 'ssr' | 'ssrCssVars' | 'preprocessLang'>>;
style?: Partial<Omit<SFCStyleCompileOptions, 'filename' | 'id' | 'isProd' | 'source' | 'scoped' | 'cssDevSourcemap' | 'postcssOptions' | 'map' | 'postcssPlugins' | 'preprocessCustomRequire' | 'preprocessLang' | 'preprocessOptions'>>;
/**
* Use custom compiler-sfc instance. Can be used to force a specific version.
*/
compiler?: typeof index_d_exports;
/**
* Requires @vitejs/plugin-vue@^5.1.0
*/
features?: {
/**
* Enable reactive destructure for `defineProps`.
* - Available in Vue 3.4 and later.
* - **default:** `false` in Vue 3.4 (**experimental**), `true` in Vue 3.5+
*/
propsDestructure?: boolean;
/**
* Transform Vue SFCs into custom elements.
* - `true`: all `*.vue` imports are converted into custom elements
* - `string | RegExp`: matched files are converted into custom elements
* - **default:** /\.ce\.vue$/
*/
customElement?: boolean | string | RegExp | (string | RegExp)[];
/**
* Set to `false` to disable Options API support and allow related code in
* Vue core to be dropped via dead-code elimination in production builds,
* resulting in smaller bundles.
* - **default:** `true`
*/
optionsAPI?: boolean;
/**
* Set to `true` to enable devtools support in production builds.
* Results in slightly larger bundles.
* - **default:** `false`
*/
prodDevtools?: boolean;
/**
* Set to `true` to enable detailed information for hydration mismatch
* errors in production builds. Results in slightly larger bundles.
* - **default:** `false`
*/
prodHydrationMismatchDetails?: boolean;
/**
* Customize the component ID generation strategy.
* - `'filepath'`: hash the file path (relative to the project root)
* - `'filepath-source'`: hash the file path and the source code
* - `function`: custom function that takes the file path, source code,
* whether in production mode, and the default hash function as arguments
* - **default:** `'filepath'` in development, `'filepath-source'` in production
*/
componentIdGenerator?: 'filepath' | 'filepath-source' | ((filepath: string, source: string, isProduction: boolean | undefined, getHash: (text: string) => string) => string);
};
/**
* @deprecated moved to `features.customElement`.
*/
customElement?: boolean | string | RegExp | (string | RegExp)[];
}
//#endregion
export { Options as t };
//#region ../../node_modules/.pnpm/@volar+language-core@2.4.27/node_modules/@volar/language-core/lib/types.d.ts
/**
* CodeInformation is a configuration object attached to each CodeMapping (between source code and generated code,
* e.g. between the template code in a .vue file and the type-checkable TS code generated from it) that
* determines what code/language features are expected to be available for the mapping.
*
* Due to the dynamic nature of code generation and the fact that, for example, things like Code Actions
* and auto-complete shouldn't be triggerable on certain "in-between" regions of generated code, we need
* a way to shut off certain features in certain regions, while leaving them enabled in others.
*/
interface CodeInformation {
/** virtual code is expected to support verification, where verification includes:
*
* - diagnostics (syntactic, semantic, and others, such as those generated by the TypeScript language service on generated TS code)
* - code actions (refactorings, quick fixes,etc.)
*/
verification?: boolean | {
/**
* when present, `shouldReport` callback is invoked to determine whether a diagnostic
* raised in the generated code should be propagated back to the original source code.
* Note that when this callback is present, diagnostic processing (e.g. typechecking) will
* still be performed, but the results will not be reported back to the original source code. */
shouldReport?(source: string | undefined, code: string | number | undefined): boolean;
};
/** virtual code is expected to support assisted completion */
completion?: boolean | {
isAdditional?: boolean;
onlyImport?: boolean;
};
/** virtual code is expected correctly reflect semantic of the source code. Specifically this controls the following langauge features:
*
* - hover
* - inlay hints
* - code lens
* - semantic tokens
* - others
*
* Note that semantic diagnostics (e.g. TS type-checking) are covered by the `verification` property above.
*/
semantic?: boolean | {
shouldHighlight?(): boolean;
};
/** virtual code is expected correctly reflect reference relationships of the source code */
navigation?: boolean | {
shouldHighlight?(): boolean;
shouldRename?(): boolean;
resolveRenameNewName?(newName: string): string;
resolveRenameEditText?(newText: string): string;
};
/** virtual code is expected correctly reflect the structural information of the source code */
structure?: boolean;
/** virtual code is expected correctly reflect the format information of the source code */
format?: boolean;
}
//#endregion
export { CodeInformation as t };
//#region ../../node_modules/.pnpm/@volar+source-map@2.4.27/node_modules/@volar/source-map/lib/sourceMap.d.ts
interface Mapping<Data = unknown> {
sourceOffsets: number[];
generatedOffsets: number[];
lengths: number[];
generatedLengths?: number[];
data: Data;
}
//#endregion
export { Mapping as t };
import { E as CompilerOptions, S as compiler_dom_d_exports, T as CompilerError, k as RootNode, w as CodegenResult } from "../@unhead/vue.mjs";
import { B as typescript_d_exports, c as SFCParseResult } from "../@vitejs/plugin-vue-jsx.mjs";
import { t as Mapping } from "../@volar/source-map.mjs";
import { t as CodeInformation } from "../@volar/language-core.mjs";
import "@vue/shared";
//#region ../../node_modules/.pnpm/muggle-string@0.4.1/node_modules/muggle-string/out/types.d.ts
declare const NO_DATA_SYMBOL: unique symbol;
type Segment<T = typeof NO_DATA_SYMBOL> = string | (T extends typeof NO_DATA_SYMBOL ? [text: string, source: string | undefined, sourceOffset: number] : [text: string, source: string | undefined, sourceOffset: number, data: T]);
//#endregion
//#region ../../node_modules/.pnpm/@vue+language-core@3.2.4/node_modules/@vue/language-core/lib/virtualCode/embeddedCodes.d.ts
declare class VueEmbeddedCode {
id: string;
lang: string;
content: Code[];
parentCodeId?: string;
linkedCodeMappings: Mapping[];
embeddedCodes: VueEmbeddedCode[];
constructor(id: string, lang: string, content: Code[]);
}
//#endregion
//#region ../../node_modules/.pnpm/@vue+language-core@3.2.4/node_modules/@vue/language-core/lib/types.d.ts
type RawVueCompilerOptions = Partial<Omit<VueCompilerOptions, 'target' | 'plugins'>> & {
strictTemplates?: boolean;
target?: 'auto' | 3 | 3.3 | 3.5 | 3.6 | 99 | number;
plugins?: RawPlugin[];
};
type RawPlugin = string | (Record<string, any> & {
name: string;
});
interface VueCodeInformation extends CodeInformation {
__importCompletion?: boolean;
__shorthandExpression?: 'html' | 'js';
__combineToken?: symbol;
__linkedToken?: symbol;
}
type Code = Segment<VueCodeInformation>;
interface VueCompilerOptions {
target: number;
lib: string;
typesRoot: string;
extensions: string[];
vitePressExtensions: string[];
petiteVueExtensions: string[];
jsxSlots: boolean;
strictVModel: boolean;
strictCssModules: boolean;
checkUnknownProps: boolean;
checkUnknownEvents: boolean;
checkUnknownDirectives: boolean;
checkUnknownComponents: boolean;
inferComponentDollarEl: boolean;
inferComponentDollarRefs: boolean;
inferTemplateDollarAttrs: boolean;
inferTemplateDollarEl: boolean;
inferTemplateDollarRefs: boolean;
inferTemplateDollarSlots: boolean;
skipTemplateCodegen: boolean;
fallthroughAttributes: boolean;
resolveStyleImports: boolean;
resolveStyleClassNames: boolean | 'scoped';
fallthroughComponentNames: string[];
dataAttributes: string[];
htmlAttributes: string[];
optionsWrapper: [string, string] | [];
macros: {
defineProps: string[];
defineSlots: string[];
defineEmits: string[];
defineExpose: string[];
defineModel: string[];
defineOptions: string[];
withDefaults: string[];
};
composables: {
useAttrs: string[];
useCssModule: string[];
useSlots: string[];
useTemplateRef: string[];
};
plugins: VueLanguagePlugin[];
experimentalModelPropName: Record<string, Record<string, boolean | Record<string, string> | Record<string, string>[]>>;
}
declare const validVersions: readonly [2, 2.1, 2.2];
interface VueLanguagePluginReturn {
version: typeof validVersions[number];
name?: string;
order?: number;
requiredCompilerOptions?: string[];
getLanguageId?(fileName: string): string | undefined;
isValidFile?(fileName: string, languageId: string): boolean;
parseSFC?(fileName: string, content: string): SFCParseResult | undefined;
parseSFC2?(fileName: string, languageId: string, content: string): SFCParseResult | undefined;
updateSFC?(oldResult: SFCParseResult, textChange: {
start: number;
end: number;
newText: string;
}): SFCParseResult | undefined;
resolveTemplateCompilerOptions?(options: CompilerOptions): CompilerOptions;
compileSFCScript?(lang: string, script: string): undefined | undefined;
compileSFCTemplate?(lang: string, template: string, options: CompilerOptions): CodegenResult | undefined;
compileSFCStyle?(lang: string, style: string): Pick<Sfc['styles'][number], 'imports' | 'bindings' | 'classNames'> | undefined;
updateSFCTemplate?(oldResult: CodegenResult, textChange: {
start: number;
end: number;
newText: string;
}): CodegenResult | undefined;
getEmbeddedCodes?(fileName: string, sfc: Sfc): {
id: string;
lang: string;
}[];
resolveEmbeddedCode?(fileName: string, sfc: Sfc, embeddedFile: VueEmbeddedCode): void;
}
type VueLanguagePlugin<T extends Record<string, any> = {}> = (ctx: {
modules: {
typescript: typeof typescript_d_exports;
'@vue/compiler-dom': typeof compiler_dom_d_exports;
};
compilerOptions: undefined;
vueCompilerOptions: VueCompilerOptions;
config: T;
}) => VueLanguagePluginReturn | VueLanguagePluginReturn[];
interface SfcBlock {
name: string;
start: number;
end: number;
startTagEnd: number;
endTagStart: number;
lang: string;
content: string;
attrs: Record<string, string | true>;
}
type SfcBlockAttr = true | {
text: string;
offset: number;
quotes: boolean;
};
interface Sfc {
content: string;
comments: string[];
template: (SfcBlock & {
ast: RootNode | undefined;
errors: CompilerError[];
warnings: CompilerError[];
}) | undefined;
script: (SfcBlock & {
src: SfcBlockAttr | undefined;
ast: undefined;
}) | undefined;
scriptSetup: (SfcBlock & {
generic: SfcBlockAttr | undefined;
ast: undefined;
}) | undefined;
styles: readonly (SfcBlock & {
src: SfcBlockAttr | undefined;
module: SfcBlockAttr | undefined;
scoped: boolean;
imports: {
text: string;
offset: number;
}[];
bindings: {
text: string;
offset: number;
}[];
classNames: {
text: string;
offset: number;
}[];
})[];
customBlocks: readonly (SfcBlock & {
type: string;
})[];
}
declare module '@vue/compiler-sfc' {
interface SFCBlock {
__src?: SfcBlockAttr;
}
interface SFCScriptBlock {
__generic?: SfcBlockAttr;
}
interface SFCStyleBlock {
__module?: SfcBlockAttr;
}
}
//#endregion
//#region ../../node_modules/.pnpm/@vue+language-core@3.2.4/node_modules/@vue/language-core/lib/utils/parseSfc.d.ts
declare module '@vue/compiler-sfc' {
interface SFCDescriptor {
comments: string[];
}
}
//#endregion
export { RawVueCompilerOptions as t };
//#region ../../node_modules/.pnpm/browserslist@4.28.1/node_modules/browserslist/index.d.ts
declare global {
namespace NodeJS {
interface ProcessEnv {
BROWSERSLIST?: string;
BROWSERSLIST_CONFIG?: string;
BROWSERSLIST_DANGEROUS_EXTEND?: string;
BROWSERSLIST_DISABLE_CACHE?: string;
BROWSERSLIST_ENV?: string;
BROWSERSLIST_IGNORE_OLD_DATA?: string;
BROWSERSLIST_STATS?: string;
BROWSERSLIST_ROOT_PATH?: string;
}
}
}
//#endregion
//#region ../../node_modules/.pnpm/autoprefixer@10.4.24_postcss@8.5.6/node_modules/autoprefixer/lib/autoprefixer.d.ts
declare function autoprefixer<T extends string[]>(...args: [...T, autoprefixer.Options]): Plugin & autoprefixer.ExportedAPI;
declare function autoprefixer(browsers: string[], options?: autoprefixer.Options): Plugin & autoprefixer.ExportedAPI;
declare function autoprefixer(options?: autoprefixer.Options): Plugin & autoprefixer.ExportedAPI;
declare namespace autoprefixer {
type GridValue = 'autoplace' | 'no-autoplace';
interface Options {
/** environment for `Browserslist` */
env?: string;
/** should Autoprefixer use Visual Cascade, if CSS is uncompressed */
cascade?: boolean;
/** should Autoprefixer add prefixes. */
add?: boolean;
/** should Autoprefixer [remove outdated] prefixes */
remove?: boolean;
/** should Autoprefixer add prefixes for @supports parameters. */
supports?: boolean;
/** should Autoprefixer add prefixes for flexbox properties */
flexbox?: boolean | 'no-2009';
/** should Autoprefixer add IE 10-11 prefixes for Grid Layout properties */
grid?: boolean | GridValue;
/** custom usage statistics for > 10% in my stats browsers query */
stats?: Stats$1;
/**
* list of queries for target browsers.
* Try to not use it.
* The best practice is to use `.browserslistrc` config or `browserslist` key in `package.json`
* to share target browsers with Babel, ESLint and Stylelint
*/
overrideBrowserslist?: string | string[];
/** do not raise error on unknown browser version in `Browserslist` config. */
ignoreUnknownVersions?: boolean;
}
interface ExportedAPI {
/** Autoprefixer data */
data: {
browsers: {
[browser: string]: object | undefined;
};
prefixes: {
[prefixName: string]: object | undefined;
};
};
/** Autoprefixer default browsers */
defaults: string[];
/** Inspect with default Autoprefixer */
info(options?: {
from?: string;
}): string;
options: Options;
browsers: string | string[];
}
/** Autoprefixer data */
let data: ExportedAPI['data'];
/** Autoprefixer default browsers */
let defaults: ExportedAPI['defaults'];
/** Inspect with default Autoprefixer */
let info: ExportedAPI['info'];
let postcss: true;
}
declare global {
namespace NodeJS {
interface ProcessEnv {
AUTOPREFIXER_GRID?: autoprefixer.GridValue;
}
}
}
import { Stats } from "node:fs";
import { EventEmitter } from "node:events";
import { Readable } from "node:stream";
//#region ../../node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/index.d.ts
type AWF = {
stabilityThreshold: number;
pollInterval: number;
};
type BasicOpts = {
persistent: boolean;
ignoreInitial: boolean;
followSymlinks: boolean;
cwd?: string;
usePolling: boolean;
interval: number;
binaryInterval: number;
alwaysStat?: boolean;
depth?: number;
ignorePermissionErrors: boolean;
atomic: boolean | number;
};
type ChokidarOptions = Partial<BasicOpts & {
ignored: Matcher | Matcher[];
awaitWriteFinish: boolean | Partial<AWF>;
}>;
type MatchFunction = (val: string, stats?: Stats) => boolean;
interface MatcherObject {
path: string;
recursive?: boolean;
}
type Matcher = string | RegExp | MatchFunction | MatcherObject;
//#endregion
//#region ../../node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.d.mts
interface TemplateInfo {
name: string;
tar: string;
version?: string;
subdir?: string;
url?: string;
defaultDir?: string;
headers?: Record<string, string | undefined>;
source?: never;
dir?: never;
[key: string]: any;
}
type TemplateProvider = (input: string, options: {
auth?: string;
}) => TemplateInfo | Promise<TemplateInfo> | null;
interface DownloadTemplateOptions {
provider?: string;
force?: boolean;
forceClean?: boolean;
offline?: boolean;
preferOffline?: boolean;
providers?: Record<string, TemplateProvider>;
dir?: string;
registry?: false | string;
cwd?: string;
auth?: string;
install?: boolean;
silent?: boolean;
}
//#endregion
//#region ../../node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.d.mts
//#region src/dotenv.d.ts
interface DotenvOptions {
/**
* The project root directory (either absolute or relative to the current working directory).
*
* Defaults to `options.cwd` in `loadConfig` context, or `process.cwd()` when used as standalone.
*/
cwd?: string;
/**
* What file or files to look in for environment variables (either absolute or relative
* to the current working directory). For example, `.env`.
* With the array type, the order enforce the env loading priority (last one overrides).
*/
fileName?: string | string[];
/**
* Whether to interpolate variables within .env.
*
* @example
* ```env
* BASE_DIR="/test"
* # resolves to "/test/further"
* ANOTHER_DIR="${BASE_DIR}/further"
* ```
*/
interpolate?: boolean;
/**
* An object describing environment variables (key, value pairs).
*/
env?: NodeJS.ProcessEnv;
}
declare global {
var __c12_dotenv_vars__: Map<Record<string, any>, Set<string>>;
} //#endregion
//#region src/types.d.ts
interface ConfigLayerMeta {
name?: string;
[key: string]: any;
}
type UserInputConfig = Record<string, any>;
interface SourceOptions<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
/** Custom meta for layer */
meta?: MT;
/** Layer config overrides */
overrides?: T;
[key: string]: any;
/**
* Options for cloning remote sources
*
* @see https://giget.unjs.io
*/
giget?: DownloadTemplateOptions;
/**
* Install dependencies after cloning
*
* @see https://nypm.unjs.io
*/
install?: boolean;
/**
* Token for cloning private sources
*
* @see https://giget.unjs.io#providing-token-for-private-repositories
*/
auth?: string;
}
interface ConfigLayer<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
config: T | null;
source?: string;
sourceOptions?: SourceOptions<T, MT>;
meta?: MT;
cwd?: string;
configFile?: string;
}
interface ResolvedConfig<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> extends ConfigLayer<T, MT> {
config: T;
layers?: ConfigLayer<T, MT>[];
cwd?: string;
_configFile?: string;
}
//#endregion
export { ChokidarOptions as i, ResolvedConfig as n, SourceOptions as r, DotenvOptions as t };
//#region ../../node_modules/.pnpm/compatx@0.2.0/node_modules/compatx/dist/index.d.mts
/**
* Known platform names
*/
declare const platforms: readonly ["aws", "azure", "cloudflare", "deno", "firebase", "netlify", "vercel"];
/**
* Known platform name
*/
type PlatformName = (typeof platforms)[number] | (string & {});
/**
* Normalize the compatibility dates from input config and defaults.
*/
type Year = `${number}${number}${number}${number}`;
type Month = `${"0" | "1"}${number}`;
type Day = `${"0" | "1" | "2" | "3"}${number}`;
/**
* Typed date string in `YYYY-MM-DD` format
*
* Empty string is used to represent an "unspecified" date.
*
* "latest" is used to represent the latest date available (date of today).
*/
type DateString = "" | "latest" | `${Year}-${Month}-${Day}`;
/**
* Last known compatibility dates for platforms
*
* @example
* {
* "default": "2024-01-01",
* "cloudflare": "2024-03-01",
* }
*/
type CompatibilityDates = {
/**
* Default compatibility date for all unspecified platforms (required)
*/
default: DateString;
} & Partial<Record<PlatformName, DateString>>;
/**
* Last known compatibility date for the used platform
*/
type CompatibilityDateSpec = DateString | Partial<CompatibilityDates>;
/**
* Get compatibility updates applicable for the user given platform and date range.
*/
//#endregion
export { CompatibilityDateSpec as t };
import "child_process";
import "buffer";
import "http";
import "https";
import "inspector";
import "net";
import "url";
import "vm";
import "worker_threads";
import { G as TransformOptions, K as transform } from "./@vitejs/plugin-vue-jsx.mjs";
//#region ../../node_modules/.pnpm/esbuild-loader@4.4.2_webpack@5.104.1_esbuild@0.27.3_/node_modules/esbuild-loader/dist/index.d.cts
type Implementation = {
transform: typeof transform;
};
type Except<ObjectType, Properties> = { [Key in keyof ObjectType as (Key extends Properties ? never : Key)]: ObjectType[Key] };
type LoaderOptions = Except<TransformOptions, 'sourcemap' | 'sourcefile'> & {
/** Pass a custom esbuild implementation */implementation?: Implementation;
/**
* Path to tsconfig.json file
*/
tsconfig?: string;
};
//#endregion
export { LoaderOptions as t };
import { IncomingMessage, ServerResponse } from "node:http";
import { Readable } from "node:stream";
//#region ../../node_modules/.pnpm/h3@1.15.5/node_modules/h3/dist/index.d.ts
type HTTPMethod = "GET" | "HEAD" | "PATCH" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "TRACE";
interface H3CorsOptions {
origin?: "*" | "null" | (string | RegExp)[] | ((origin: string) => boolean);
methods?: "*" | HTTPMethod[];
allowHeaders?: "*" | string[];
exposeHeaders?: "*" | string[];
credentials?: boolean;
maxAge?: string | false;
preflight?: {
statusCode?: number;
};
}
/**
* Handle CORS for the incoming request.
*
* If the incoming request is a CORS preflight request, it will append the CORS preflight headers and send a 204 response.
*
* If return value is `true`, the request is handled and no further action is needed.
*
* @example
* const app = createApp();
* const router = createRouter();
* router.use('/',
* defineEventHandler(async (event) => {
* const didHandleCors = handleCors(event, {
* origin: '*',
* preflight: {
* statusCode: 204,
* },
* methods: '*',
* });
* if (didHandleCors) {
* return;
* }
* // Your code here
* })
* );
*/
//#endregion
export { H3CorsOptions as t };
//#region ../../node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist/index.d.ts
/**
* Represents a general structure for ECMAScript module exports.
*/
interface ESMExport {
/**
* Optional explicit type for complex scenarios, often used internally.
* @optional
*/
_type?: "declaration" | "named" | "default" | "star";
/**
* The type of export (declaration, named, default or star).
*/
type: "declaration" | "named" | "default" | "star";
/**
* The specific type of declaration being exported, if applicable.
* @optional
*/
declarationType?: "let" | "var" | "const" | "enum" | "const enum" | "class" | "function" | "async function";
/**
* The full code snippet of the export statement.
*/
code: string;
/**
* The starting position (index) of the export declaration in the source code.
*/
start: number;
/**
* The end position (index) of the export declaration in the source code.
*/
end: number;
/**
* The name of the variable, function or class being exported, if given explicitly.
* @optional
*/
name?: string;
/**
* The name used for default exports when a specific identifier isn't given.
* @optional
*/
defaultName?: string;
/**
* An array of names to export, applicable to named and destructured exports.
*/
names: string[];
/**
* The module specifier, if any, from which exports are being re-exported.
* @optional
*/
specifier?: string;
}
/**
* Represents a declaration export within an ECMAScript module.
* Extends {@link ESMExport}.
*/
//#endregion
export { ESMExport as t };
/// <reference types="node" />
import { EventEmitter } from "node:events";
import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from "node:net";
import { Duplex, Readable, Writable } from "node:stream";
import { ConnectionOptions, TLSSocket } from "node:tls";
import { URL as URL$1, URLSearchParams } from "node:url";
import { Blob as Blob$1, File } from "node:buffer";
import "node:stream/web";
import "node:dns";
import "node:worker_threads";
//#region ../../node_modules/.pnpm/undici@7.19.1/node_modules/undici/types/utility.d.ts
type AutocompletePrimitiveBaseType<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : never;
type Autocomplete<T> = T | (AutocompletePrimitiveBaseType<T> & Record<never, never>);
//#endregion
//#region ../../node_modules/.pnpm/undici@7.19.1/node_modules/undici/types/header.d.ts
/**
* The header type declaration of `undici`.
*/
type IncomingHttpHeaders = Record<string, string | string[] | undefined>;
type HeaderNames = Autocomplete<'Accept' | 'Accept-CH' | 'Accept-Charset' | 'Accept-Encoding' | 'Accept-Language' | 'Accept-Patch' | 'Accept-Post' | 'Accept-Ranges' | 'Access-Control-Allow-Credentials' | 'Access-Control-Allow-Headers' | 'Access-Control-Allow-Methods' | 'Access-Control-Allow-Origin' | 'Access-Control-Expose-Headers' | 'Access-Control-Max-Age' | 'Access-Control-Request-Headers' | 'Access-Control-Request-Method' | 'Age' | 'Allow' | 'Alt-Svc' | 'Alt-Used' | 'Authorization' | 'Cache-Control' | 'Clear-Site-Data' | 'Connection' | 'Content-Disposition' | 'Content-Encoding' | 'Content-Language' | 'Content-Length' | 'Content-Location' | 'Content-Range' | 'Content-Security-Policy' | 'Content-Security-Policy-Report-Only' | 'Content-Type' | 'Cookie' | 'Cross-Origin-Embedder-Policy' | 'Cross-Origin-Opener-Policy' | 'Cross-Origin-Resource-Policy' | 'Date' | 'Device-Memory' | 'ETag' | 'Expect' | 'Expect-CT' | 'Expires' | 'Forwarded' | 'From' | 'Host' | 'If-Match' | 'If-Modified-Since' | 'If-None-Match' | 'If-Range' | 'If-Unmodified-Since' | 'Keep-Alive' | 'Last-Modified' | 'Link' | 'Location' | 'Max-Forwards' | 'Origin' | 'Permissions-Policy' | 'Priority' | 'Proxy-Authenticate' | 'Proxy-Authorization' | 'Range' | 'Referer' | 'Referrer-Policy' | 'Retry-After' | 'Sec-Fetch-Dest' | 'Sec-Fetch-Mode' | 'Sec-Fetch-Site' | 'Sec-Fetch-User' | 'Sec-Purpose' | 'Sec-WebSocket-Accept' | 'Server' | 'Server-Timing' | 'Service-Worker-Navigation-Preload' | 'Set-Cookie' | 'SourceMap' | 'Strict-Transport-Security' | 'TE' | 'Timing-Allow-Origin' | 'Trailer' | 'Transfer-Encoding' | 'Upgrade' | 'Upgrade-Insecure-Requests' | 'User-Agent' | 'Vary' | 'Via' | 'WWW-Authenticate' | 'X-Content-Type-Options' | 'X-Frame-Options'>;
type IANARegisteredMimeType = Autocomplete<'audio/aac' | 'video/x-msvideo' | 'image/avif' | 'video/av1' | 'application/octet-stream' | 'image/bmp' | 'text/css' | 'text/csv' | 'application/vnd.ms-fontobject' | 'application/epub+zip' | 'image/gif' | 'application/gzip' | 'text/html' | 'image/x-icon' | 'text/calendar' | 'image/jpeg' | 'text/javascript' | 'application/json' | 'application/ld+json' | 'audio/x-midi' | 'audio/mpeg' | 'video/mp4' | 'video/mpeg' | 'audio/ogg' | 'video/ogg' | 'application/ogg' | 'audio/opus' | 'font/otf' | 'application/pdf' | 'image/png' | 'application/rtf' | 'image/svg+xml' | 'image/tiff' | 'video/mp2t' | 'font/ttf' | 'text/plain' | 'application/wasm' | 'video/webm' | 'audio/webm' | 'image/webp' | 'font/woff' | 'font/woff2' | 'application/xhtml+xml' | 'application/xml' | 'application/zip' | 'video/3gpp' | 'video/3gpp2' | 'model/gltf+json' | 'model/gltf-binary'>;
type KnownHeaderValues = {
'content-type': IANARegisteredMimeType;
};
type HeaderRecord = { [K in HeaderNames | Lowercase<HeaderNames>]?: Lowercase<K> extends keyof KnownHeaderValues ? KnownHeaderValues[Lowercase<K>] : string };
//#endregion
//#region ../../node_modules/.pnpm/undici@7.19.1/node_modules/undici/types/readable.d.ts
declare class BodyReadable extends Readable {
constructor(opts: {
resume: (this: Readable, size: number) => void | null;
abort: () => void | null;
contentType?: string;
contentLength?: number;
highWaterMark?: number;
});
/** Consumes and returns the body as a string
* https://fetch.spec.whatwg.org/#dom-body-text
*/
text(): Promise<string>;
/** Consumes and returns the body as a JavaScript Object
* https://fetch.spec.whatwg.org/#dom-body-json
*/
json(): Promise<unknown>;
/** Consumes and returns the body as a Blob
* https://fetch.spec.whatwg.org/#dom-body-blob
*/
blob(): Promise<Blob$1>;
/** Consumes and returns the body as an Uint8Array
* https://fetch.spec.whatwg.org/#dom-body-bytes
*/
bytes(): Promise<Uint8Array>;
/** Consumes and returns the body as an ArrayBuffer
* https://fetch.spec.whatwg.org/#dom-body-arraybuffer
*/
arrayBuffer(): Promise<ArrayBuffer>;
/** Not implemented
*
* https://fetch.spec.whatwg.org/#dom-body-formdata
*/
formData(): Promise<never>;
/** Returns true if the body is not null and the body has been consumed
*
* Otherwise, returns false
*
* https://fetch.spec.whatwg.org/#dom-body-bodyused
*/
readonly bodyUsed: boolean;
/**
* If body is null, it should return null as the body
*
* If body is not null, should return the body as a ReadableStream
*
* https://fetch.spec.whatwg.org/#dom-body-body
*/
readonly body: never | undefined;
/** Dumps the response body by reading `limit` number of bytes.
* @param opts.limit Number of bytes to read (optional) - Default: 131072
* @param opts.signal AbortSignal to cancel the operation (optional)
*/
dump(opts?: {
limit: number;
signal?: AbortSignal;
}): Promise<void>;
}
//#endregion
//#region ../../node_modules/.pnpm/undici@7.19.1/node_modules/undici/types/fetch.d.ts
type BodyInit = ArrayBuffer | AsyncIterable<Uint8Array> | Blob$1 | FormData | Iterable<Uint8Array> | NodeJS.ArrayBufferView | URLSearchParams | null | string;
interface SpecIterator<T, TReturn = any, TNext = undefined> {
next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
}
interface SpecIterableIterator<T> extends SpecIterator<T> {
[Symbol.iterator](): SpecIterableIterator<T>;
}
interface SpecIterable<T> {
[Symbol.iterator](): SpecIterator<T>;
}
type HeadersInit$1 = [string, string][] | HeaderRecord | Headers$1;
declare class Headers$1 implements SpecIterable<[string, string]> {
constructor(init?: HeadersInit$1);
readonly append: (name: string, value: string) => void;
readonly delete: (name: string) => void;
readonly get: (name: string) => string | null;
readonly has: (name: string) => boolean;
readonly set: (name: string, value: string) => void;
readonly getSetCookie: () => string[];
readonly forEach: (callbackfn: (value: string, key: string, iterable: Headers$1) => void, thisArg?: unknown) => void;
readonly keys: () => SpecIterableIterator<string>;
readonly values: () => SpecIterableIterator<string>;
readonly entries: () => SpecIterableIterator<[string, string]>;
readonly [Symbol.iterator]: () => SpecIterableIterator<[string, string]>;
}
//#endregion
//#region ../../node_modules/.pnpm/undici@7.19.1/node_modules/undici/types/formdata.d.ts
/**
* A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
*/
declare type FormDataEntryValue = string | File;
/**
* Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using fetch().
*/
declare class FormData {
/**
* Appends a new value onto an existing key inside a FormData object,
* or adds the key if it does not already exist.
*
* The difference between `set()` and `append()` is that if the specified key already exists, `set()` will overwrite all existing values with the new one, whereas `append()` will append the new value onto the end of the existing set of values.
*
* @param name The name of the field whose data is contained in `value`.
* @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string.
* @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
*/
append(name: string, value: unknown, fileName?: string): void;
/**
* Set a new value for an existing key inside FormData,
* or add the new field if it does not already exist.
*
* @param name The name of the field whose data is contained in `value`.
* @param value The field's value. This can be [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). If none of these are specified the value is converted to a string.
* @param fileName The filename reported to the server, when a Blob or File is passed as the second parameter. The default filename for Blob objects is "blob". The default filename for File objects is the file's filename.
*
*/
set(name: string, value: unknown, fileName?: string): void;
/**
* Returns the first value associated with a given key from within a `FormData` object.
* If you expect multiple values and want all of them, use the `getAll()` method instead.
*
* @param {string} name A name of the value you want to retrieve.
*
* @returns A `FormDataEntryValue` containing the value. If the key doesn't exist, the method returns null.
*/
get(name: string): FormDataEntryValue | null;
/**
* Returns all the values associated with a given key from within a `FormData` object.
*
* @param {string} name A name of the value you want to retrieve.
*
* @returns An array of `FormDataEntryValue` whose key matches the value passed in the `name` parameter. If the key doesn't exist, the method returns an empty list.
*/
getAll(name: string): FormDataEntryValue[];
/**
* Returns a boolean stating whether a `FormData` object contains a certain key.
*
* @param name A string representing the name of the key you want to test for.
*
* @return A boolean value.
*/
has(name: string): boolean;
/**
* Deletes a key and its value(s) from a `FormData` object.
*
* @param name The name of the key you want to delete.
*/
delete(name: string): void;
/**
* Executes given callback function for each field of the FormData instance
*/
forEach: (callbackfn: (value: FormDataEntryValue, key: string, iterable: FormData) => void, thisArg?: unknown) => void;
/**
* Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all keys contained in this `FormData` object.
* Each key is a `string`.
*/
keys: () => SpecIterableIterator<string>;
/**
* Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through all values contained in this object `FormData` object.
* Each value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue).
*/
values: () => SpecIterableIterator<FormDataEntryValue>;
/**
* Returns an [`iterator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) allowing to go through the `FormData` key/value pairs.
* The key of each pair is a string; the value is a [`FormDataValue`](https://developer.mozilla.org/en-US/docs/Web/API/FormDataEntryValue).
*/
entries: () => SpecIterableIterator<[string, FormDataEntryValue]>;
/**
* An alias for FormData#entries()
*/
[Symbol.iterator]: () => SpecIterableIterator<[string, FormDataEntryValue]>;
readonly [Symbol.toStringTag]: string;
}
//#endregion
//#region ../../node_modules/.pnpm/undici@7.19.1/node_modules/undici/types/connector.d.ts
declare function buildConnector(options?: buildConnector.BuildOptions): buildConnector.connector;
declare namespace buildConnector {
export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & {
allowH2?: boolean;
maxCachedSessions?: number | null;
socketPath?: string | null;
timeout?: number | null;
port?: number;
keepAlive?: boolean | null;
keepAliveInitialDelay?: number | null;
};
export interface Options {
hostname: string;
host?: string;
protocol: string;
port: string;
servername?: string;
localAddress?: string | null;
httpSocket?: Socket;
}
export type Callback = (...args: CallbackArgs) => void;
type CallbackArgs = [null, Socket | TLSSocket] | [Error, null];
export interface connector {
(options: buildConnector.Options, callback: buildConnector.Callback): void;
}
}
//#endregion
//#region ../../node_modules/.pnpm/undici@7.19.1/node_modules/undici/types/client-stats.d.ts
declare class ClientStats {
constructor(pool: Client);
/** If socket has open connection. */
connected: boolean;
/** Number of open socket connections in this client that do not have an active request. */
pending: number;
/** Number of currently active requests of this client. */
running: number;
/** Number of active, pending, or queued requests of this client. */
size: number;
}
//#endregion
//#region ../../node_modules/.pnpm/undici@7.19.1/node_modules/undici/types/client.d.ts
type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, 'origin'>;
/**
* A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
*/
declare class Client extends Dispatcher {
constructor(url: string | URL$1, options?: Client.Options);
/** Property to get and set the pipelining factor. */
pipelining: number;
/** `true` after `client.close()` has been called. */
closed: boolean;
/** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
destroyed: boolean;
/** Aggregate stats for a Client. */
readonly stats: ClientStats; // Override dispatcher APIs.
override connect(options: ClientConnectOptions): Promise<Dispatcher.ConnectData>;
override connect(options: ClientConnectOptions, callback: (err: Error | null, data: Dispatcher.ConnectData) => void): void;
}
declare namespace Client {
export interface OptionsInterceptors {
Client: readonly Dispatcher.DispatchInterceptor[];
}
export interface Options {
/** TODO */
interceptors?: OptionsInterceptors;
/** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
maxHeaderSize?: number;
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
headersTimeout?: number;
/** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */
socketTimeout?: never;
/** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
requestTimeout?: never;
/** TODO */
connectTimeout?: number;
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
bodyTimeout?: number;
/** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */
idleTimeout?: never;
/** @deprecated unsupported keepAlive, use pipelining=0 instead */
keepAlive?: never;
/** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
keepAliveTimeout?: number;
/** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */
maxKeepAliveTimeout?: never;
/** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
keepAliveMaxTimeout?: number;
/** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
keepAliveTimeoutThreshold?: number;
/** TODO */
socketPath?: string;
/** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
pipelining?: number;
/** @deprecated use the connect option instead */
tls?: never;
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
strictContentLength?: boolean;
/** TODO */
maxCachedSessions?: number;
/** TODO */
connect?: Partial<buildConnector.BuildOptions> | buildConnector.connector;
/** TODO */
maxRequestsPerClient?: number;
/** TODO */
localAddress?: string;
/** Max response body size in bytes, -1 is disabled */
maxResponseSize?: number;
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
autoSelectFamily?: boolean;
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
autoSelectFamilyAttemptTimeout?: number;
/**
* @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
* @default false
*/
allowH2?: boolean;
/**
* @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
* @default 100
*/
maxConcurrentStreams?: number;
/**
* @description Sets the HTTP/2 stream-level flow-control window size (SETTINGS_INITIAL_WINDOW_SIZE).
* @default 262144
*/
initialWindowSize?: number;
/**
* @description Sets the HTTP/2 connection-level flow-control window size (ClientHttp2Session.setLocalWindowSize).
* @default 524288
*/
connectionWindowSize?: number;
}
export interface SocketInfo {
localAddress?: string;
localPort?: number;
remoteAddress?: string;
remotePort?: number;
remoteFamily?: string;
timeout?: number;
bytesWritten?: number;
bytesRead?: number;
}
}
//#endregion
//#region ../../node_modules/.pnpm/undici@7.19.1/node_modules/undici/types/errors.d.ts
declare namespace Errors {
export class UndiciError extends Error {
name: string;
code: string;
}
/** Connect timeout error. */
export class ConnectTimeoutError extends UndiciError {
name: 'ConnectTimeoutError';
code: 'UND_ERR_CONNECT_TIMEOUT';
}
/** A header exceeds the `headersTimeout` option. */
export class HeadersTimeoutError extends UndiciError {
name: 'HeadersTimeoutError';
code: 'UND_ERR_HEADERS_TIMEOUT';
}
/** Headers overflow error. */
export class HeadersOverflowError extends UndiciError {
name: 'HeadersOverflowError';
code: 'UND_ERR_HEADERS_OVERFLOW';
}
/** A body exceeds the `bodyTimeout` option. */
export class BodyTimeoutError extends UndiciError {
name: 'BodyTimeoutError';
code: 'UND_ERR_BODY_TIMEOUT';
}
export class ResponseError extends UndiciError {
constructor(message: string, code: number, options: {
headers?: IncomingHttpHeaders | string[] | null;
body?: null | Record<string, any> | string;
});
name: 'ResponseError';
code: 'UND_ERR_RESPONSE';
statusCode: number;
body: null | Record<string, any> | string;
headers: IncomingHttpHeaders | string[] | null;
}
/** Passed an invalid argument. */
export class InvalidArgumentError extends UndiciError {
name: 'InvalidArgumentError';
code: 'UND_ERR_INVALID_ARG';
}
/** Returned an invalid value. */
export class InvalidReturnValueError extends UndiciError {
name: 'InvalidReturnValueError';
code: 'UND_ERR_INVALID_RETURN_VALUE';
}
/** The request has been aborted by the user. */
export class RequestAbortedError extends UndiciError {
name: 'AbortError';
code: 'UND_ERR_ABORTED';
}
/** Expected error with reason. */
export class InformationalError extends UndiciError {
name: 'InformationalError';
code: 'UND_ERR_INFO';
}
/** Request body length does not match content-length header. */
export class RequestContentLengthMismatchError extends UndiciError {
name: 'RequestContentLengthMismatchError';
code: 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH';
}
/** Response body length does not match content-length header. */
export class ResponseContentLengthMismatchError extends UndiciError {
name: 'ResponseContentLengthMismatchError';
code: 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH';
}
/** Trying to use a destroyed client. */
export class ClientDestroyedError extends UndiciError {
name: 'ClientDestroyedError';
code: 'UND_ERR_DESTROYED';
}
/** Trying to use a closed client. */
export class ClientClosedError extends UndiciError {
name: 'ClientClosedError';
code: 'UND_ERR_CLOSED';
}
/** There is an error with the socket. */
export class SocketError extends UndiciError {
name: 'SocketError';
code: 'UND_ERR_SOCKET';
socket: Client.SocketInfo | null;
}
/** Encountered unsupported functionality. */
export class NotSupportedError extends UndiciError {
name: 'NotSupportedError';
code: 'UND_ERR_NOT_SUPPORTED';
}
/** No upstream has been added to the BalancedPool. */
export class BalancedPoolMissingUpstreamError extends UndiciError {
name: 'MissingUpstreamError';
code: 'UND_ERR_BPL_MISSING_UPSTREAM';
}
export class HTTPParserError extends UndiciError {
name: 'HTTPParserError';
code: string;
}
/** The response exceed the length allowed. */
export class ResponseExceededMaxSizeError extends UndiciError {
name: 'ResponseExceededMaxSizeError';
code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE';
}
export class RequestRetryError extends UndiciError {
constructor(message: string, statusCode: number, headers?: IncomingHttpHeaders | string[] | null, body?: null | Record<string, any> | string);
name: 'RequestRetryError';
code: 'UND_ERR_REQ_RETRY';
statusCode: number;
data: {
count: number;
};
headers: Record<string, string | string[]>;
}
export class SecureProxyConnectionError extends UndiciError {
constructor(cause?: Error, message?: string, options?: Record<any, any>);
name: 'SecureProxyConnectionError';
code: 'UND_ERR_PRX_TLS';
}
class MaxOriginsReachedError extends UndiciError {
name: 'MaxOriginsReachedError';
code: 'UND_ERR_MAX_ORIGINS_REACHED';
}
}
//#endregion
//#region ../../node_modules/.pnpm/undici@7.19.1/node_modules/undici/types/dispatcher.d.ts
type AbortSignal$1 = unknown;
type UndiciHeaders = Record<string, string | string[]> | IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null;
/** Dispatcher is the core API used to dispatch requests. */
declare class Dispatcher extends EventEmitter {
/** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */
dispatch(options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean;
/** Starts two-way communications with the requested resource. */
connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ConnectData<TOpaque>) => void): void;
connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>): Promise<Dispatcher.ConnectData<TOpaque>>;
/** Compose a chain of dispatchers */
compose(dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher;
compose(...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher;
/** Performs an HTTP request. */
request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ResponseData<TOpaque>) => void): void;
request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>): Promise<Dispatcher.ResponseData<TOpaque>>;
/** For easy use with `stream.pipeline`. */
pipeline<TOpaque = null>(options: Dispatcher.PipelineOptions<TOpaque>, handler: Dispatcher.PipelineHandler<TOpaque>): Duplex;
/** A faster version of `Dispatcher.request`. */
stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>, callback: (err: Error | null, data: Dispatcher.StreamData<TOpaque>) => void): void;
stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>): Promise<Dispatcher.StreamData<TOpaque>>;
/** Upgrade to a different protocol. */
upgrade(options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void;
upgrade(options: Dispatcher.UpgradeOptions): Promise<Dispatcher.UpgradeData>;
/** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */
close(callback: () => void): void;
close(): Promise<void>;
/** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */
destroy(err: Error | null, callback: () => void): void;
destroy(callback: () => void): void;
destroy(err: Error | null): Promise<void>;
destroy(): Promise<void>;
on(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
on(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
on(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
on(eventName: 'drain', callback: (origin: URL$1) => void): this;
once(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
once(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
once(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
once(eventName: 'drain', callback: (origin: URL$1) => void): this;
off(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
off(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
off(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
off(eventName: 'drain', callback: (origin: URL$1) => void): this;
addListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
addListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
addListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
addListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
removeListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
removeListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
removeListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
removeListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
prependListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
prependListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
prependListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
prependListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
prependOnceListener(eventName: 'connect', callback: (origin: URL$1, targets: readonly Dispatcher[]) => void): this;
prependOnceListener(eventName: 'disconnect', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
prependOnceListener(eventName: 'connectionError', callback: (origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this;
prependOnceListener(eventName: 'drain', callback: (origin: URL$1) => void): this;
listeners(eventName: 'connect'): ((origin: URL$1, targets: readonly Dispatcher[]) => void)[];
listeners(eventName: 'disconnect'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
listeners(eventName: 'connectionError'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
listeners(eventName: 'drain'): ((origin: URL$1) => void)[];
rawListeners(eventName: 'connect'): ((origin: URL$1, targets: readonly Dispatcher[]) => void)[];
rawListeners(eventName: 'disconnect'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
rawListeners(eventName: 'connectionError'): ((origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[];
rawListeners(eventName: 'drain'): ((origin: URL$1) => void)[];
emit(eventName: 'connect', origin: URL$1, targets: readonly Dispatcher[]): boolean;
emit(eventName: 'disconnect', origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
emit(eventName: 'connectionError', origin: URL$1, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean;
emit(eventName: 'drain', origin: URL$1): boolean;
}
declare namespace Dispatcher {
export interface ComposedDispatcher extends Dispatcher {}
export type Dispatch = Dispatcher['dispatch'];
export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch;
export interface DispatchOptions {
origin?: string | URL$1;
path: string;
method: HttpMethod;
/** Default: `null` */
body?: string | Buffer | Uint8Array | Readable | null | FormData;
/** Default: `null` */
headers?: UndiciHeaders;
/** Query string params to be embedded in the request URL. Default: `null` */
query?: Record<string, any>;
/** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */
idempotent?: boolean;
/** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. Defaults to `method !== 'HEAD'`. */
blocking?: boolean;
/** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */
upgrade?: boolean | string | null;
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. */
headersTimeout?: number | null;
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. */
bodyTimeout?: number | null;
/** Whether the request should stablish a keep-alive or not. Default `false` */
reset?: boolean;
/** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */
throwOnError?: boolean;
/** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */
expectContinue?: boolean;
}
export interface ConnectOptions<TOpaque = null> {
origin: string | URL$1;
path: string;
/** Default: `null` */
headers?: UndiciHeaders;
/** Default: `null` */
signal?: AbortSignal$1 | EventEmitter | null;
/** This argument parameter is passed through to `ConnectData` */
opaque?: TOpaque;
/** Default: false */
redirectionLimitReached?: boolean;
/** Default: `null` */
responseHeaders?: 'raw' | null;
}
export interface RequestOptions<TOpaque = null> extends DispatchOptions {
/** Default: `null` */
opaque?: TOpaque;
/** Default: `null` */
signal?: AbortSignal$1 | EventEmitter | null;
/** Default: false */
redirectionLimitReached?: boolean;
/** Default: `null` */
onInfo?: (info: {
statusCode: number;
headers: Record<string, string | string[]>;
}) => void;
/** Default: `null` */
responseHeaders?: 'raw' | null;
/** Default: `64 KiB` */
highWaterMark?: number;
}
export interface PipelineOptions<TOpaque = null> extends RequestOptions<TOpaque> {
/** `true` if the `handler` will return an object stream. Default: `false` */
objectMode?: boolean;
}
export interface UpgradeOptions {
path: string;
/** Default: `'GET'` */
method?: string;
/** Default: `null` */
headers?: UndiciHeaders;
/** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */
protocol?: string;
/** Default: `null` */
signal?: AbortSignal$1 | EventEmitter | null;
/** Default: false */
redirectionLimitReached?: boolean;
/** Default: `null` */
responseHeaders?: 'raw' | null;
}
export interface ConnectData<TOpaque = null> {
statusCode: number;
headers: IncomingHttpHeaders;
socket: Duplex;
opaque: TOpaque;
}
export interface ResponseData<TOpaque = null> {
statusCode: number;
headers: IncomingHttpHeaders;
body: BodyReadable & BodyMixin;
trailers: Record<string, string>;
opaque: TOpaque;
context: object;
}
export interface PipelineHandlerData<TOpaque = null> {
statusCode: number;
headers: IncomingHttpHeaders;
opaque: TOpaque;
body: BodyReadable;
context: object;
}
export interface StreamData<TOpaque = null> {
opaque: TOpaque;
trailers: Record<string, string>;
}
export interface UpgradeData<TOpaque = null> {
headers: IncomingHttpHeaders;
socket: Duplex;
opaque: TOpaque;
}
export interface StreamFactoryData<TOpaque = null> {
statusCode: number;
headers: IncomingHttpHeaders;
opaque: TOpaque;
context: object;
}
export type StreamFactory<TOpaque = null> = (data: StreamFactoryData<TOpaque>) => Writable;
export interface DispatchController {
get aborted(): boolean;
get paused(): boolean;
get reason(): Error | null;
abort(reason: Error): void;
pause(): void;
resume(): void;
}
export interface DispatchHandler {
onRequestStart?(controller: DispatchController, context: any): void;
onRequestUpgrade?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, socket: Duplex): void;
onResponseStart?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, statusMessage?: string): void;
onResponseData?(controller: DispatchController, chunk: Buffer): void;
onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void;
onResponseError?(controller: DispatchController, error: Error): void;
/** Invoked before request is dispatched on socket. May be invoked multiple times when a request is retried when the request at the head of the pipeline fails. */
/** @deprecated */
onConnect?(abort: (err?: Error) => void): void;
/** Invoked when an error has occurred. */
/** @deprecated */
onError?(err: Error): void;
/** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */
/** @deprecated */
onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void;
/** Invoked when response is received, before headers have been read. **/
/** @deprecated */
onResponseStarted?(): void;
/** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */
/** @deprecated */
onHeaders?(statusCode: number, headers: Buffer[], resume: () => void, statusText: string): boolean;
/** Invoked when response payload data is received. */
/** @deprecated */
onData?(chunk: Buffer): boolean;
/** Invoked when response payload and trailers have been received and the request has completed. */
/** @deprecated */
onComplete?(trailers: string[] | null): void;
/** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */
/** @deprecated */
onBodySent?(chunkSize: number, totalBytesSent: number): void;
}
export type PipelineHandler<TOpaque = null> = (data: PipelineHandlerData<TOpaque>) => Readable;
export type HttpMethod = Autocomplete<'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'>;
/**
* @link https://fetch.spec.whatwg.org/#body-mixin
*/
interface BodyMixin {
readonly body?: never;
readonly bodyUsed: boolean;
arrayBuffer(): Promise<ArrayBuffer>;
blob(): Promise<Blob$1>;
bytes(): Promise<Uint8Array>;
formData(): Promise<never>;
json(): Promise<unknown>;
text(): Promise<string>;
}
export interface DispatchInterceptor {
(dispatch: Dispatch): Dispatch;
}
}
//#endregion
//#region ../../node_modules/.pnpm/undici@7.19.1/node_modules/undici/types/mock-interceptor.d.ts
/** The scope associated with a mock dispatch. */
declare class MockScope<TData extends object = object> {
constructor(mockDispatch: MockInterceptor.MockDispatch<TData>);
/** Delay a reply by a set amount of time in ms. */
delay(waitInMs: number): MockScope<TData>;
/** Persist the defined mock data for the associated reply. It will return the defined mock data indefinitely. */
persist(): MockScope<TData>;
/** Define a reply for a set amount of matching requests. */
times(repeatTimes: number): MockScope<TData>;
}
/** The interceptor for a Mock. */
declare class MockInterceptor {
constructor(options: MockInterceptor.Options, mockDispatches: MockInterceptor.MockDispatch[]);
/** Mock an undici request with the defined reply. */
reply<TData extends object = object>(replyOptionsCallback: MockInterceptor.MockReplyOptionsCallback<TData>): MockScope<TData>;
reply<TData extends object = object>(statusCode: number, data?: TData | Buffer | string | MockInterceptor.MockResponseDataHandler<TData>, responseOptions?: MockInterceptor.MockResponseOptions): MockScope<TData>;
/** Mock an undici request by throwing the defined reply error. */
replyWithError<TError extends Error = Error>(error: TError): MockScope;
/** Set default reply headers on the interceptor for subsequent mocked replies. */
defaultReplyHeaders(headers: IncomingHttpHeaders): MockInterceptor;
/** Set default reply trailers on the interceptor for subsequent mocked replies. */
defaultReplyTrailers(trailers: Record<string, string>): MockInterceptor;
/** Set automatically calculated content-length header on subsequent mocked replies. */
replyContentLength(): MockInterceptor;
}
declare namespace MockInterceptor {
/** MockInterceptor options. */
export interface Options {
/** Path to intercept on. */
path: string | RegExp | ((path: string) => boolean);
/** Method to intercept on. Defaults to GET. */
method?: string | RegExp | ((method: string) => boolean);
/** Body to intercept on. */
body?: string | RegExp | ((body: string) => boolean);
/** Headers to intercept on. */
headers?: Record<string, string | RegExp | ((body: string) => boolean)> | ((headers: Record<string, string>) => boolean);
/** Query params to intercept on */
query?: Record<string, any>;
}
export interface MockDispatch<TData extends object = object, TError extends Error = Error> extends Options {
times: number | null;
persist: boolean;
consumed: boolean;
data: MockDispatchData<TData, TError>;
}
export interface MockDispatchData<TData extends object = object, TError extends Error = Error> extends MockResponseOptions {
error: TError | null;
statusCode?: number;
data?: TData | string;
}
export interface MockResponseOptions {
headers?: IncomingHttpHeaders;
trailers?: Record<string, string>;
}
export interface MockResponseCallbackOptions {
path: string;
method: string;
headers?: Headers$1 | Record<string, string>;
origin?: string;
body?: BodyInit | Dispatcher.DispatchOptions['body'] | null;
}
export type MockResponseDataHandler<TData extends object = object> = (opts: MockResponseCallbackOptions) => TData | Buffer | string;
export type MockReplyOptionsCallback<TData extends object = object> = (opts: MockResponseCallbackOptions) => {
statusCode: number;
data?: TData | Buffer | string;
responseOptions?: MockResponseOptions;
};
}
//#endregion
//#region ../../node_modules/.pnpm/ofetch@1.5.1/node_modules/ofetch/dist/shared/ofetch.BbrTaNPp.d.mts
interface FetchOptions<R extends ResponseType = ResponseType, T = any> extends Omit<RequestInit, "body">, FetchHooks<T, R> {
baseURL?: string;
body?: RequestInit["body"] | Record<string, any>;
ignoreResponseError?: boolean;
/**
* @deprecated use query instead.
*/
params?: Record<string, any>;
query?: Record<string, any>;
parseResponse?: (responseText: string) => any;
responseType?: R;
/**
* @experimental Set to "half" to enable duplex streaming.
* Will be automatically set to "half" when using a ReadableStream as body.
* @see https://fetch.spec.whatwg.org/#enumdef-requestduplex
*/
duplex?: "half" | undefined;
/**
* Only supported in Node.js >= 18 using undici
*
* @see https://undici.nodejs.org/#/docs/api/Dispatcher
*/
dispatcher?: InstanceType<typeof Dispatcher>;
/**
* Only supported older Node.js versions using node-fetch-native polyfill.
*/
agent?: unknown;
/** timeout in milliseconds */
timeout?: number;
retry?: number | false;
/** Delay between retries in milliseconds. */
retryDelay?: number | ((context: FetchContext<T, R>) => number);
/** Default is [408, 409, 425, 429, 500, 502, 503, 504] */
retryStatusCodes?: number[];
}
interface ResolvedFetchOptions<R extends ResponseType = ResponseType, T = any> extends FetchOptions<R, T> {
headers: Headers;
}
interface FetchContext<T = any, R extends ResponseType = ResponseType> {
request: FetchRequest;
options: ResolvedFetchOptions<R>;
response?: FetchResponse<T>;
error?: Error;
}
type MaybePromise<T> = T | Promise<T>;
type MaybeArray<T> = T | T[];
type FetchHook<C extends FetchContext = FetchContext> = (context: C) => MaybePromise<void>;
interface FetchHooks<T = any, R extends ResponseType = ResponseType> {
onRequest?: MaybeArray<FetchHook<FetchContext<T, R>>>;
onRequestError?: MaybeArray<FetchHook<FetchContext<T, R> & {
error: Error;
}>>;
onResponse?: MaybeArray<FetchHook<FetchContext<T, R> & {
response: FetchResponse<T>;
}>>;
onResponseError?: MaybeArray<FetchHook<FetchContext<T, R> & {
response: FetchResponse<T>;
}>>;
}
interface ResponseMap {
blob: Blob;
text: string;
arrayBuffer: ArrayBuffer;
stream: ReadableStream<Uint8Array>;
}
type ResponseType = keyof ResponseMap | "json";
interface FetchResponse<T> extends Response {
_data?: T;
}
type FetchRequest = RequestInfo;
//#endregion
export { FetchOptions as t };
import "child_process";
//#region ../../node_modules/.pnpm/oxc-transform@0.112.0/node_modules/oxc-transform/index.d.ts
interface CompilerAssumptions {
ignoreFunctionLength?: boolean;
noDocumentAll?: boolean;
objectRestNoSymbols?: boolean;
pureGetters?: boolean;
/**
* When using public class fields, assume that they don't shadow any getter in the current class,
* in its subclasses or in its superclass. Thus, it's safe to assign them rather than using
* `Object.defineProperty`.
*
* For example:
*
* Input:
* ```js
* class Test {
* field = 2;
*
* static staticField = 3;
* }
* ```
*
* When `set_public_class_fields` is `true`, the output will be:
* ```js
* class Test {
* constructor() {
* this.field = 2;
* }
* }
* Test.staticField = 3;
* ```
*
* Otherwise, the output will be:
* ```js
* import _defineProperty from "@oxc-project/runtime/helpers/defineProperty";
* class Test {
* constructor() {
* _defineProperty(this, "field", 2);
* }
* }
* _defineProperty(Test, "staticField", 3);
* ```
*
* NOTE: For TypeScript, if you wanted behavior is equivalent to `useDefineForClassFields: false`, you should
* set both `set_public_class_fields` and [`crate::TypeScriptOptions::remove_class_fields_without_initializer`]
* to `true`.
*/
setPublicClassFields?: boolean;
}
interface DecoratorOptions {
/**
* Enables experimental support for decorators, which is a version of decorators that predates the TC39 standardization process.
*
* Decorators are a language feature which hasn’t yet been fully ratified into the JavaScript specification.
* This means that the implementation version in TypeScript may differ from the implementation in JavaScript when it it decided by TC39.
*
* @see https://www.typescriptlang.org/tsconfig/#experimentalDecorators
* @default false
*/
legacy?: boolean;
/**
* Enables emitting decorator metadata.
*
* This option the same as [emitDecoratorMetadata](https://www.typescriptlang.org/tsconfig/#emitDecoratorMetadata)
* in TypeScript, and it only works when `legacy` is true.
*
* @see https://www.typescriptlang.org/tsconfig/#emitDecoratorMetadata
* @default false
*/
emitDecoratorMetadata?: boolean;
}
declare const enum HelperMode {
/**
* Runtime mode (default): Helper functions are imported from a runtime package.
*
* Example:
*
* ```js
* import helperName from "@oxc-project/runtime/helpers/helperName";
* helperName(...arguments);
* ```
*/
Runtime = 'Runtime',
/**
* External mode: Helper functions are accessed from a global `babelHelpers` object.
*
* Example:
*
* ```js
* babelHelpers.helperName(...arguments);
* ```
*/
External = 'External'
}
interface Helpers {
mode?: HelperMode;
}
interface IsolatedDeclarationsOptions {
/**
* Do not emit declarations for code that has an @internal annotation in its JSDoc comment.
* This is an internal compiler option; use at your own risk, because the compiler does not check that the result is valid.
*
* Default: `false`
*
* See <https://www.typescriptlang.org/tsconfig/#stripInternal>
*/
stripInternal?: boolean;
sourcemap?: boolean;
}
/**
* Configure how TSX and JSX are transformed.
*
* @see {@link https://oxc.rs/docs/guide/usage/transformer/jsx}
*/
interface JsxOptions {
/**
* Decides which runtime to use.
*
* - 'automatic' - auto-import the correct JSX factories
* - 'classic' - no auto-import
*
* @default 'automatic'
*/
runtime?: 'classic' | 'automatic';
/**
* Emit development-specific information, such as `__source` and `__self`.
*
* @default false
*/
development?: boolean;
/**
* Toggles whether or not to throw an error if an XML namespaced tag name
* is used.
*
* Though the JSX spec allows this, it is disabled by default since React's
* JSX does not currently have support for it.
*
* @default true
*/
throwIfNamespace?: boolean;
/**
* Mark JSX elements and top-level React method calls as pure for tree shaking.
*
* @default true
*/
pure?: boolean;
/**
* Replaces the import source when importing functions.
*
* @default 'react'
*/
importSource?: string;
/**
* Replace the function used when compiling JSX expressions. It should be a
* qualified name (e.g. `React.createElement`) or an identifier (e.g.
* `createElement`).
*
* Only used for `classic` {@link runtime}.
*
* @default 'React.createElement'
*/
pragma?: string;
/**
* Replace the component used when compiling JSX fragments. It should be a
* valid JSX tag name.
*
* Only used for `classic` {@link runtime}.
*
* @default 'React.Fragment'
*/
pragmaFrag?: string;
/**
* Enable React Fast Refresh .
*
* Conforms to the implementation in {@link https://github.com/facebook/react/tree/v18.3.1/packages/react-refresh}
*
* @default false
*/
refresh?: boolean | ReactRefreshOptions;
}
interface PluginsOptions {
styledComponents?: StyledComponentsOptions;
taggedTemplateEscape?: boolean;
}
interface ReactRefreshOptions {
/**
* Specify the identifier of the refresh registration variable.
*
* @default `$RefreshReg$`.
*/
refreshReg?: string;
/**
* Specify the identifier of the refresh signature variable.
*
* @default `$RefreshSig$`.
*/
refreshSig?: string;
emitFullSignatures?: boolean;
}
/**
* Configure how styled-components are transformed.
*
* @see {@link https://oxc.rs/docs/guide/usage/transformer/plugins#styled-components}
*/
interface StyledComponentsOptions {
/**
* Enhances the attached CSS class name on each component with richer output to help
* identify your components in the DOM without React DevTools.
*
* @default true
*/
displayName?: boolean;
/**
* Controls whether the `displayName` of a component will be prefixed with the filename
* to make the component name as unique as possible.
*
* @default true
*/
fileName?: boolean;
/**
* Adds a unique identifier to every styled component to avoid checksum mismatches
* due to different class generation on the client and server during server-side rendering.
*
* @default true
*/
ssr?: boolean;
/**
* Transpiles styled-components tagged template literals to a smaller representation
* than what Babel normally creates, helping to reduce bundle size.
*
* @default true
*/
transpileTemplateLiterals?: boolean;
/**
* Minifies CSS content by removing all whitespace and comments from your CSS,
* keeping valuable bytes out of your bundles.
*
* @default true
*/
minify?: boolean;
/**
* Enables transformation of JSX `css` prop when using styled-components.
*
* **Note: This feature is not yet implemented in oxc.**
*
* @default true
*/
cssProp?: boolean;
/**
* Enables "pure annotation" to aid dead code elimination by bundlers.
*
* @default false
*/
pure?: boolean;
/**
* Adds a namespace prefix to component identifiers to ensure class names are unique.
*
* Example: With `namespace: "my-app"`, generates `componentId: "my-app__sc-3rfj0a-1"`
*/
namespace?: string;
/**
* List of file names that are considered meaningless for component naming purposes.
*
* When the `fileName` option is enabled and a component is in a file with a name
* from this list, the directory name will be used instead of the file name for
* the component's display name.
*
* @default `["index"]`
*/
meaninglessFileNames?: Array<string>;
/**
* Import paths to be considered as styled-components imports at the top level.
*
* **Note: This feature is not yet implemented in oxc.**
*/
topLevelImportPaths?: Array<string>;
}
/**
* Options for transforming a JavaScript or TypeScript file.
*
* @see {@link transform}
*/
interface TransformOptions {
/** Treat the source text as `js`, `jsx`, `ts`, `tsx`, or `dts`. */
lang?: 'js' | 'jsx' | 'ts' | 'tsx' | 'dts';
/** Treat the source text as `script` or `module` code. */
sourceType?: 'script' | 'module' | 'commonjs' | 'unambiguous' | undefined;
/**
* The current working directory. Used to resolve relative paths in other
* options.
*/
cwd?: string;
/**
* Enable source map generation.
*
* When `true`, the `sourceMap` field of transform result objects will be populated.
*
* @default false
*
* @see {@link SourceMap}
*/
sourcemap?: boolean;
/** Set assumptions in order to produce smaller output. */
assumptions?: CompilerAssumptions;
/**
* Configure how TypeScript is transformed.
* @see {@link https://oxc.rs/docs/guide/usage/transformer/typescript}
*/
typescript?: TypeScriptOptions;
/**
* Configure how TSX and JSX are transformed.
* @see {@link https://oxc.rs/docs/guide/usage/transformer/jsx}
*/
jsx?: 'preserve' | JsxOptions;
/**
* Sets the target environment for the generated JavaScript.
*
* The lowest target is `es2015`.
*
* Example:
*
* * `'es2015'`
* * `['es2020', 'chrome58', 'edge16', 'firefox57', 'node12', 'safari11']`
*
* @default `esnext` (No transformation)
*
* @see {@link https://oxc.rs/docs/guide/usage/transformer/lowering#target}
*/
target?: string | Array<string>;
/** Behaviour for runtime helpers. */
helpers?: Helpers;
/**
* Define Plugin
* @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#define}
*/
define?: Record<string, string>;
/**
* Inject Plugin
* @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#inject}
*/
inject?: Record<string, string | [string, string]>;
/** Decorator plugin */
decorator?: DecoratorOptions;
/**
* Third-party plugins to use.
* @see {@link https://oxc.rs/docs/guide/usage/transformer/plugins}
*/
plugins?: PluginsOptions;
}
interface TypeScriptOptions {
jsxPragma?: string;
jsxPragmaFrag?: string;
onlyRemoveTypeImports?: boolean;
allowNamespaces?: boolean;
/**
* When enabled, type-only class fields are only removed if they are prefixed with the declare modifier:
*
* @deprecated
*
* Allowing `declare` fields is built-in support in Oxc without any option. If you want to remove class fields
* without initializer, you can use `remove_class_fields_without_initializer: true` instead.
*/
allowDeclareFields?: boolean;
/**
* When enabled, class fields without initializers are removed.
*
* For example:
* ```ts
* class Foo {
* x: number;
* y: number = 0;
* }
* ```
* // transform into
* ```js
* class Foo {
* x: number;
* }
* ```
*
* The option is used to align with the behavior of TypeScript's `useDefineForClassFields: false` option.
* When you want to enable this, you also need to set [`crate::CompilerAssumptions::set_public_class_fields`]
* to `true`. The `set_public_class_fields: true` + `remove_class_fields_without_initializer: true` is
* equivalent to `useDefineForClassFields: false` in TypeScript.
*
* When `set_public_class_fields` is true and class-properties plugin is enabled, the above example transforms into:
*
* ```js
* class Foo {
* constructor() {
* this.y = 0;
* }
* }
* ```
*
* Defaults to `false`.
*/
removeClassFieldsWithoutInitializer?: boolean;
/**
* Also generate a `.d.ts` declaration file for TypeScript files.
*
* The source file must be compliant with all
* [`isolatedDeclarations`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-5.html#isolated-declarations)
* requirements.
*
* @default false
*/
declaration?: IsolatedDeclarationsOptions;
/**
* Rewrite or remove TypeScript import/export declaration extensions.
*
* - When set to `rewrite`, it will change `.ts`, `.mts`, `.cts` extensions to `.js`, `.mjs`, `.cjs` respectively.
* - When set to `remove`, it will remove `.ts`/`.mts`/`.cts`/`.tsx` extension entirely.
* - When set to `true`, it's equivalent to `rewrite`.
* - When set to `false` or omitted, no changes will be made to the extensions.
*
* @default false
*/
rewriteImportExtensions?: 'rewrite' | 'remove' | boolean;
}
//#endregion
export { TransformOptions as t };
//#region ../../node_modules/.pnpm/rollup-plugin-visualizer@6.0.5_rolldown@1.0.0-rc.3_rollup@4.57.1/node_modules/rollup-plugin-visualizer/dist/plugin/template-types.d.ts
type TemplateType = "sunburst" | "treemap" | "network" | "raw-data" | "list" | "flamegraph";
//#endregion
//#region ../../node_modules/.pnpm/rollup-plugin-visualizer@6.0.5_rolldown@1.0.0-rc.3_rollup@4.57.1/node_modules/rollup-plugin-visualizer/dist/shared/create-filter.d.ts
type Filter = {
bundle?: string | null | undefined;
file?: string | null | undefined;
};
//#endregion
//#region ../../node_modules/.pnpm/rollup-plugin-visualizer@6.0.5_rolldown@1.0.0-rc.3_rollup@4.57.1/node_modules/rollup-plugin-visualizer/dist/plugin/index.d.ts
interface PluginVisualizerOptions {
/**
* The path to the template file to use. Or just a name of a file.
*
* @default "stats.html"
*/
filename?: string;
/**
* If plugin should emit json file with visualizer data. It can be used with plugin CLI
*
* @default false
* @deprecated use template 'raw-data'
*/
json?: boolean;
/**
* HTML <title> value in generated file. Ignored when `json` is true.
*
* @default "Rollup Visualizer"
*/
title?: string;
/**
* If plugin should open browser with generated file. Ignored when `json` or `emitFile` is true.
*
* @default false
*/
open?: boolean;
openOptions?: OpenOptions;
/**
* Which diagram to generate. 'sunburst' or 'treemap' can help find big dependencies or if they are repeated.
* 'network' can answer you why something was included.
* 'flamegraph' will be familar to tools that you know already.
*
* @default 'treemap'
*/
template?: TemplateType;
/**
* If plugin should also calculate sizes of gzipped files.
*
* @default false
*/
gzipSize?: boolean;
/**
* If plugin should also calculate sizes of brotlied files.
*
* @default false
*/
brotliSize?: boolean;
/**
* If plugin should use sourcemap to calculate sizes of modules. By idea it will present more accurate results.
* `gzipSize` and `brotliSize` does not make much sense with this option.
*
* @default false
*/
sourcemap?: boolean;
/**
* Absolute path where project is located. It is used to cut prefix from file's paths.
*
* @default process.cwd()
*/
projectRoot?: string | RegExp;
/**
* Use rollup .emitFile API to generate files. Could be usefull if you want to output to configured by rollup output dir.
* When this set to true, filename options must be filename and not a path.
*
* @default false
*/
emitFile?: boolean;
/**
* A valid picomatch pattern, or array of patterns. If options.include is omitted or has zero length, filter will return true by
* default. Otherwise, an ID must match one or more of the picomatch patterns, and must not match any of the options.exclude patterns.
*/
include?: Filter | Filter[];
/**
* A valid picomatch pattern, or array of patterns. If options.include is omitted or has zero length, filter will return true by
* default. Otherwise, an ID must match one or more of the picomatch patterns, and must not match any of the options.exclude patterns.
*/
exclude?: Filter | Filter[];
}
//#endregion
export { PluginVisualizerOptions as t };
//#region ../../node_modules/.pnpm/scule@1.3.0/node_modules/scule/dist/index.d.ts
type Splitter = "-" | "_" | "/" | ".";
type FirstOfString<S extends string> = S extends `${infer F}${string}` ? F : never;
type RemoveFirstOfString<S extends string> = S extends `${string}${infer R}` ? R : never;
type IsUpper<S extends string> = S extends Uppercase<S> ? true : false;
type IsLower<S extends string> = S extends Lowercase<S> ? true : false;
type SameLetterCase<X extends string, Y extends string> = IsUpper<X> extends IsUpper<Y> ? true : IsLower<X> extends IsLower<Y> ? true : false;
type JoinLowercaseWords<T extends readonly string[], Joiner extends string, Accumulator extends string = ""> = T extends readonly [infer F extends string, ...infer R extends string[]] ? Accumulator extends "" ? JoinLowercaseWords<R, Joiner, `${Accumulator}${Lowercase<F>}`> : JoinLowercaseWords<R, Joiner, `${Accumulator}${Joiner}${Lowercase<F>}`> : Accumulator;
type LastOfArray<T extends any[]> = T extends [...any, infer R] ? R : never;
type RemoveLastOfArray<T extends any[]> = T extends [...infer F, any] ? F : never;
type SplitByCase<T, Separator extends string = Splitter, Accumulator extends unknown[] = []> = string extends Separator ? string[] : T extends `${infer F}${infer R}` ? [LastOfArray<Accumulator>] extends [never] ? SplitByCase<R, Separator, [F]> : LastOfArray<Accumulator> extends string ? R extends "" ? SplitByCase<R, Separator, [...RemoveLastOfArray<Accumulator>, `${LastOfArray<Accumulator>}${F}`]> : SameLetterCase<F, FirstOfString<R>> extends true ? F extends Separator ? FirstOfString<R> extends Separator ? SplitByCase<R, Separator, [...Accumulator, ""]> : IsUpper<FirstOfString<R>> extends true ? SplitByCase<RemoveFirstOfString<R>, Separator, [...Accumulator, FirstOfString<R>]> : SplitByCase<R, Separator, [...Accumulator, ""]> : SplitByCase<R, Separator, [...RemoveLastOfArray<Accumulator>, `${LastOfArray<Accumulator>}${F}`]> : IsLower<F> extends true ? SplitByCase<RemoveFirstOfString<R>, Separator, [...RemoveLastOfArray<Accumulator>, `${LastOfArray<Accumulator>}${F}`, FirstOfString<R>]> : SplitByCase<R, Separator, [...Accumulator, F]> : never : Accumulator extends [] ? T extends "" ? [] : string[] : Accumulator;
type JoinByCase<T, Joiner extends string> = string extends T ? string : string[] extends T ? string : T extends string ? SplitByCase<T> extends readonly string[] ? JoinLowercaseWords<SplitByCase<T>, Joiner> : never : T extends readonly string[] ? JoinLowercaseWords<T, Joiner> : never;
type SnakeCase<T extends string | readonly string[]> = JoinByCase<T, "_">;
//#endregion
export { SnakeCase as t };
//#region ../../node_modules/.pnpm/unctx@2.5.0/node_modules/unctx/dist/transform.d.ts
interface TransformerOptions {
/**
* The function names to be transformed.
*
* @default ['withAsyncContext']
*/
asyncFunctions?: string[];
/**
* @default 'unctx'
*/
helperModule?: string;
/**
* @default 'executeAsync'
*/
helperName?: string;
/**
* Whether to transform properties of an object defined with a helper function. For example,
* to transform key `middleware` within the object defined with function `defineMeta`, you would pass:
* `{ defineMeta: ['middleware'] }`.
* @default {}
*/
objectDefinitions?: Record<string, string[]>;
}
//#endregion
export { TransformerOptions as t };
import { V as MagicString } from "./@vitejs/plugin-vue-jsx.mjs";
import { t as ESMExport } from "./mlly.mjs";
//#region ../../node_modules/.pnpm/unimport@5.6.0/node_modules/unimport/dist/shared/unimport.C0UbTDPO.d.mts
declare const builtinPresets: {
'@vue/composition-api': InlinePreset;
'@vueuse/core': () => Preset;
'@vueuse/head': InlinePreset;
pinia: InlinePreset;
preact: InlinePreset;
quasar: InlinePreset;
react: InlinePreset;
'react-router': InlinePreset;
'react-router-dom': InlinePreset;
svelte: InlinePreset;
'svelte/animate': InlinePreset;
'svelte/easing': InlinePreset;
'svelte/motion': InlinePreset;
'svelte/store': InlinePreset;
'svelte/transition': InlinePreset;
'vee-validate': InlinePreset;
vitepress: InlinePreset;
'vue-demi': InlinePreset;
'vue-i18n': InlinePreset;
'vue-router': InlinePreset;
'vue-router-composables': InlinePreset;
vue: InlinePreset;
'vue/macros': InlinePreset;
vuex: InlinePreset;
vitest: InlinePreset;
'uni-app': InlinePreset;
'solid-js': InlinePreset;
'solid-app-router': InlinePreset;
rxjs: InlinePreset;
'date-fns': InlinePreset;
};
type BuiltinPresetName = keyof typeof builtinPresets;
type ModuleId = string;
type ImportName = string;
interface ImportCommon {
/** Module specifier to import from */
from: ModuleId;
/**
* Priority of the import, if multiple imports have the same name, the one with the highest priority will be used
* @default 1
*/
priority?: number;
/** If this import is disabled */
disabled?: boolean;
/** Won't output import in declaration file if true */
dtsDisabled?: boolean;
/** Import declaration type like const / var / enum */
declarationType?: ESMExport['declarationType'];
/**
* Metadata of the import
*/
meta?: {
/** Short description of the import */description?: string; /** URL to the documentation */
docsUrl?: string; /** Additional metadata */
[key: string]: any;
};
/**
* If this import is a pure type import
*/
type?: boolean;
/**
* Using this as the from when generating type declarations
*/
typeFrom?: ModuleId;
}
interface Import extends ImportCommon {
/** Import name to be detected */
name: ImportName;
/** Import as this name */
as?: ImportName;
/**
* With properties
*
* Ignored for CJS imports.
*/
with?: Record<string, string>;
}
type PresetImport = Omit<Import, 'from'> | ImportName | [name: ImportName, as?: ImportName, from?: ModuleId];
interface InlinePreset extends ImportCommon {
imports: (PresetImport | InlinePreset)[];
}
/**
* Auto extract exports from a package for auto import
*/
interface PackagePreset {
/**
* Name of the package
*/
package: string;
/**
* Path of the importer
* @default process.cwd()
*/
url?: string;
/**
* RegExp, string, or custom function to exclude names of the extracted imports
*/
ignore?: (string | RegExp | ((name: string) => boolean))[];
/**
* Use local cache if exits
* @default true
*/
cache?: boolean;
}
type Preset = InlinePreset | PackagePreset;
interface UnimportContext {
readonly version: string;
options: Partial<UnimportOptions>;
staticImports: Import[];
dynamicImports: Import[];
addons: Addon[];
getImports: () => Promise<Import[]>;
getImportMap: () => Promise<Map<string, Import>>;
getMetadata: () => UnimportMeta | undefined;
modifyDynamicImports: (fn: (imports: Import[]) => Thenable<void | Import[]>) => Promise<void>;
clearDynamicImports: () => void;
replaceImports: (imports: UnimportOptions['imports']) => Promise<Import[]>;
invalidate: () => void;
resolveId: (id: string, parentId?: string) => Thenable<string | null | undefined | void>;
}
interface DetectImportResult {
s: MagicString;
strippedCode: string;
isCJSContext: boolean;
matchedImports: Import[];
firstOccurrence: number;
}
interface Unimport {
readonly version: string;
init: () => Promise<void>;
clearDynamicImports: UnimportContext['clearDynamicImports'];
getImportMap: UnimportContext['getImportMap'];
getImports: UnimportContext['getImports'];
getInternalContext: () => UnimportContext;
getMetadata: UnimportContext['getMetadata'];
modifyDynamicImports: UnimportContext['modifyDynamicImports'];
generateTypeDeclarations: (options?: TypeDeclarationOptions) => Promise<string>;
/**
* Get un-imported usages from code
*/
detectImports: (code: string | MagicString) => Promise<DetectImportResult>;
/**
* Insert missing imports statements to code
*/
injectImports: (code: string | MagicString, id?: string, options?: InjectImportsOptions) => Promise<ImportInjectionResult>;
scanImportsFromDir: (dir?: (string | ScanDir)[], options?: ScanDirExportsOptions) => Promise<Import[]>;
scanImportsFromFile: (file: string, includeTypes?: boolean) => Promise<Import[]>;
/**
* @deprecated
*/
toExports: (filepath?: string, includeTypes?: boolean) => Promise<string>;
}
interface InjectionUsageRecord {
import: Import;
count: number;
moduleIds: string[];
}
interface UnimportMeta {
injectionUsage: Record<string, InjectionUsageRecord>;
}
interface AddonsOptions {
addons?: Addon[];
/**
* Enable auto import inside for Vue's <template>
*
* @default false
*/
vueTemplate?: boolean;
/**
* Enable auto import directives for Vue's SFC.
*
* Library authors should include `meta.vueDirective: true` in the import metadata.
*
* When using a local directives folder, provide the `isDirective`
* callback to check if the import is a Vue directive.
*/
vueDirectives?: true | AddonVueDirectivesOptions;
}
interface AddonVueDirectivesOptions {
/**
* Checks if the import is a Vue directive.
*
* **NOTES**:
* - imports from a library should include `meta.vueDirective: true`.
* - this callback is only invoked for local directives (only when meta.vueDirective is not set).
*
* @param from The path of the import normalized.
* @param importEntry The import entry.
*/
isDirective?: (from: string, importEntry: Import) => boolean;
}
interface UnimportOptions extends Pick<InjectImportsOptions, 'injectAtEnd' | 'mergeExisting' | 'parser'> {
/**
* Auto import items
*/
imports: Import[];
/**
* Auto import preset
*/
presets: (Preset | BuiltinPresetName)[];
/**
* Custom warning function
* @default console.warn
*/
warn: (msg: string) => void;
/**
* Custom debug log function
* @default console.log
*/
debugLog: (msg: string) => void;
/**
* Unimport Addons.
* To use built-in addons, use:
* ```js
* addons: {
* addons: [<custom-addons-here>] // if you want to use also custom addons
* vueTemplate: true,
* vueDirectives: [<the-directives-here>]
* }
* ```
*
* Built-in addons:
* - vueDirectives: enable auto import directives for Vue's SFC
* - vueTemplate: enable auto import inside for Vue's <template>
*
* @default {}
*/
addons: AddonsOptions | Addon[];
/**
* Name of virtual modules that exposed all the registed auto-imports
* @default []
*/
virtualImports: string[];
/**
* Directories to scan for auto import
* @default []
*/
dirs?: (string | ScanDir)[];
/**
* Options for scanning directories for auto import
*/
dirsScanOptions?: ScanDirExportsOptions;
/**
* Custom resolver to auto import id
*/
resolveId?: (id: string, importee?: string) => Thenable<string | void>;
/**
* Custom magic comments to be opt-out for auto import, per file/module
*
* @default ['@unimport-disable', '@imports-disable']
*/
commentsDisable?: string[];
/**
* Custom magic comments to debug auto import, printed to console
*
* @default ['@unimport-debug', '@imports-debug']
*/
commentsDebug?: string[];
/**
* Collect meta data for each auto import. Accessible via `ctx.meta`
*/
collectMeta?: boolean;
}
type PathFromResolver = (_import: Import) => string | undefined;
interface ScanDirExportsOptions {
/**
* Glob patterns for matching files
*
* @default ['*.{ts,js,mjs,cjs,mts,cts,tsx,jsx}']
*/
filePatterns?: string[];
/**
* Custom function to filter scanned files
*/
fileFilter?: (file: string) => boolean;
/**
* Register type exports
*
* @default true
*/
types?: boolean;
/**
* Current working directory
*
* @default process.cwd()
*/
cwd?: string;
}
interface ScanDir {
/**
* Path pattern of the directory
*/
glob: string;
/**
* Register type exports
*
* @default true
*/
types?: boolean;
}
interface TypeDeclarationOptions {
/**
* Custom resolver for path of the import
*/
resolvePath?: PathFromResolver;
/**
* Append `export {}` to the end of the file
*
* @default true
*/
exportHelper?: boolean;
/**
* Auto-import for type exports
*
* @default true
*/
typeReExports?: boolean;
}
interface InjectImportsOptions {
/**
* Merge the existing imports
*
* @default false
*/
mergeExisting?: boolean;
/**
* If the module should be auto imported
*
* @default true
*/
autoImport?: boolean;
/**
* If the module should be transformed for virtual modules.
* Only available when `virtualImports` is set.
*
* @default true
*/
transformVirtualImports?: boolean;
/**
* Parser to use for parsing the code
*
* Note that `acorn` only takes valid JS Code, should usually only be used after transformationa and transpilation
*
* @default 'regex'
*/
parser?: 'acorn' | 'regex';
/**
* Inject the imports at the end of other imports
*
* @default false
*/
injectAtEnd?: boolean;
}
type Thenable<T> = Promise<T> | T;
interface Addon {
name?: string;
transform?: (this: UnimportContext, code: MagicString, id: string | undefined) => Thenable<MagicString>;
declaration?: (this: UnimportContext, dts: string, options: TypeDeclarationOptions) => Thenable<string>;
matchImports?: (this: UnimportContext, identifiers: Set<string>, matched: Import[]) => Thenable<Import[] | void>;
/**
* Extend or modify the imports list before injecting
*/
extendImports?: (this: UnimportContext, imports: Import[]) => Import[] | void;
/**
* Resolve imports before injecting
*/
injectImportsResolved?: (this: UnimportContext, imports: Import[], code: MagicString, id?: string) => Import[] | void;
/**
* Modify the injection code before injecting
*/
injectImportsStringified?: (this: UnimportContext, injection: string, imports: Import[], code: MagicString, id?: string) => string | void;
}
interface MagicStringResult {
s: MagicString;
code: string;
}
interface ImportInjectionResult extends MagicStringResult {
imports: Import[];
}
//#endregion
export { type UnimportOptions as i, type InlinePreset as n, type Unimport as r, type Import as t };
//#region ../../node_modules/.pnpm/untyped@2.0.0/node_modules/untyped/dist/shared/untyped.kR35CG5k.d.mts
type JSValue = string | number | bigint | boolean | symbol | Function | Array<any> | undefined | object | null;
type JSType = "string" | "number" | "bigint" | "boolean" | "symbol" | "function" | "object" | "any" | "array";
type ResolveFn = (value: unknown, get: (key: string) => Promise<unknown>) => JSValue | Promise<JSValue>;
interface TypeDescriptor {
/** Used internally to handle schema types */
type?: JSType | JSType[];
/** Fully resolved correct TypeScript type for generated TS declarations */
tsType?: string;
/** Human-readable type description for use in generated documentation */
markdownType?: string;
items?: TypeDescriptor | TypeDescriptor[];
}
interface FunctionArg extends TypeDescriptor {
name?: string;
default?: JSValue;
optional?: boolean;
}
interface Schema extends TypeDescriptor {
id?: string;
default?: JSValue;
resolve?: ResolveFn;
properties?: {
[key: string]: Schema;
};
required?: string[];
title?: string;
description?: string;
$schema?: string;
tags?: string[];
args?: FunctionArg[];
returns?: TypeDescriptor;
}
interface InputObject {
$schema?: Schema;
$resolve?: ResolveFn;
$default?: any;
[key: string]: JSValue | InputObject;
}
type SchemaDefinition = {
[x: string]: JSValue | InputObject;
};
//#endregion
export { Schema as n, SchemaDefinition as r, InputObject as t };
//#region ../../node_modules/.pnpm/vue-bundle-renderer@2.2.0/node_modules/vue-bundle-renderer/dist/shared/vue-bundle-renderer.lFgxeLN7.d.ts
interface ResourceMeta {
src?: string;
file: string;
css?: string[];
assets?: string[];
isEntry?: boolean;
name?: string;
names?: string[];
isDynamicEntry?: boolean;
sideEffects?: boolean;
imports?: string[];
dynamicImports?: string[];
module?: boolean;
prefetch?: boolean;
preload?: boolean;
resourceType?: 'audio' | 'document' | 'embed' | 'fetch' | 'font' | 'image' | 'object' | 'script' | 'style' | 'track' | 'worker' | 'video';
mimeType?: string;
}
interface Manifest {
[key: string]: ResourceMeta;
}
//#endregion
export { Manifest as t };
import { E as CompilerOptions } from "./@unhead/vue.mjs";
import { b as TemplateCompiler, h as SFCTemplateCompileOptions, u as SFCScriptCompileOptions } from "./@vitejs/plugin-vue-jsx.mjs";
//#region ../../node_modules/.pnpm/vue-loader@17.4.2_@vue+compiler-sfc@3.5.27_vue@3.5.27_typescript@5.9.3__webpack@5.104.1_esbuild@0.27.3_/node_modules/vue-loader/dist/index.d.ts
interface VueLoaderOptions {
babelParserPlugins?: SFCScriptCompileOptions['babelParserPlugins'];
transformAssetUrls?: SFCTemplateCompileOptions['transformAssetUrls'];
compiler?: TemplateCompiler | string;
compilerOptions?: CompilerOptions;
/**
* TODO remove in 3.4
* @deprecated
*/
reactivityTransform?: boolean;
/**
* @experimental
*/
propsDestructure?: boolean;
/**
* @experimental
*/
defineModel?: boolean;
customElement?: boolean | RegExp;
hotReload?: boolean;
exposeFilename?: boolean;
appendExtension?: boolean;
enableTsInTemplate?: boolean;
experimentalInlineMatchResource?: boolean;
isServerBuild?: boolean;
}
//#endregion
export { VueLoaderOptions as t };
import { _ as VNodeProps, b as ShallowRef, c as AllowedComponentProps, d as Component$1, f as ComponentCustomProps, g as VNode, l as App, m as DefineComponent, o as AnchorHTMLAttributes, p as ComponentPublicInstance, v as ComputedRef, x as UnwrapRef, y as MaybeRef } from "./@unhead/vue.mjs";
//#region ../../node_modules/.pnpm/vue-router@4.6.4_vue@3.5.27_typescript@5.9.3_/node_modules/vue-router/dist/router-CWoNjPRp.d.mts
/*!
* vue-router v4.6.4
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/
//#region src/query.d.ts
/**
* Possible values in normalized {@link LocationQuery}. `null` renders the query
* param but without an `=`.
*
* @example
* ```
* ?isNull&isEmpty=&other=other
* gives
* `{ isNull: null, isEmpty: '', other: 'other' }`.
* ```
*
* @internal
*/
type LocationQueryValue = string | null;
/**
* Possible values when defining a query. `undefined` allows to remove a value.
*
* @internal
*/
type LocationQueryValueRaw = LocationQueryValue | number | undefined;
/**
* Normalized query object that appears in {@link RouteLocationNormalized}
*
* @public
*/
type LocationQuery = Record<string, LocationQueryValue | LocationQueryValue[]>;
/**
* Loose {@link LocationQuery} object that can be passed to functions like
* {@link Router.push} and {@link Router.replace} or anywhere when creating a
* {@link RouteLocationRaw}
*
* @public
*/
type LocationQueryRaw = Record<string | number, LocationQueryValueRaw | LocationQueryValueRaw[]>;
/**
* Transforms a queryString into a {@link LocationQuery} object. Accept both, a
* version with the leading `?` and without Should work as URLSearchParams
* @internal
*
* @param search - search string to parse
* @returns a query object
*/
declare function parseQuery(search: string): LocationQuery;
/**
* Stringifies a {@link LocationQueryRaw} object. Like `URLSearchParams`, it
* doesn't prepend a `?`
*
* @internal
*
* @param query - query object to stringify
* @returns string version of the query without the leading `?`
*/
declare function stringifyQuery(query: LocationQueryRaw | undefined): string; //#endregion
//#region src/config.d.ts
/**
* Allows customizing existing types of the router that are used globally like `$router`, `<RouterLink>`, etc. **ONLY FOR INTERNAL USAGE**.
*
* - `$router` - the router instance
* - `$route` - the current route location
* - `beforeRouteEnter` - Page component option
* - `beforeRouteUpdate` - Page component option
* - `beforeRouteLeave` - Page component option
* - `RouterLink` - RouterLink Component
* - `RouterView` - RouterView Component
*
* @internal
*/
interface TypesConfig {} //#endregion
//#region src/typed-routes/route-map.d.ts
/**
* Helper type to define a Typed `RouteRecord`
* @see {@link RouteRecord}
*/
interface RouteRecordInfo<Name extends string | symbol = string, Path extends string = string, ParamsRaw extends RouteParamsRawGeneric = RouteParamsRawGeneric, Params extends RouteParamsGeneric = RouteParamsGeneric, ChildrenNames extends string | symbol = never> {
name: Name;
path: Path;
paramsRaw: ParamsRaw;
params: Params;
childrenNames: ChildrenNames;
}
type RouteRecordInfoGeneric = RouteRecordInfo<string | symbol, string, RouteParamsRawGeneric, RouteParamsGeneric, string | symbol>;
/**
* Convenience type to get the typed RouteMap or a generic one if not provided. It is extracted from the {@link TypesConfig} if it exists, it becomes {@link RouteMapGeneric} otherwise.
*/
type RouteMap = TypesConfig extends Record<'RouteNamedMap', infer RouteNamedMap> ? RouteNamedMap : RouteMapGeneric;
/**
* Generic version of the `RouteMap`.
*/
type RouteMapGeneric = Record<string | symbol, RouteRecordInfoGeneric>; //#endregion
//#region src/typed-routes/params.d.ts
/**
* Utility type for raw and non raw params like :id+
*
*/
//#endregion
//#region src/types/utils.d.ts
/**
* Creates a union type that still allows autocompletion for strings.
* @internal
*/
type _LiteralUnion<LiteralType, BaseType extends string = string> = LiteralType | (BaseType & Record<never, never>);
/**
* Maybe a promise maybe not
* @internal
*/
type _Awaitable<T> = T | PromiseLike<T>;
/**
* @internal
*/
//#endregion
//#region src/typed-routes/route-records.d.ts
/**
* @internal
*/
type RouteRecordRedirectOption = RouteLocationRaw | ((to: RouteLocation, from: RouteLocationNormalizedLoaded) => RouteLocationRaw);
/**
* Generic version of {@link RouteRecordName}.
*/
type RouteRecordNameGeneric = string | symbol | undefined;
/**
* Possible values for a route record **after normalization**
*
* NOTE: since `RouteRecordName` is a type, it evaluates too early and it's often the generic version {@link RouteRecordNameGeneric}. If you need a typed version of all of the names of routes, use {@link RouteMap | `keyof RouteMap`}
*/
/**
* @internal
*/
type _RouteRecordProps<Name extends keyof RouteMap = keyof RouteMap> = boolean | Record<string, any> | ((to: RouteLocationNormalized<Name>) => Record<string, any>); //#endregion
//#region src/typed-routes/route-location.d.ts
/**
* Generic version of {@link RouteLocation}. It is used when no {@link RouteMap} is provided.
*/
interface RouteLocationGeneric extends _RouteLocationBase, RouteLocationOptions {
/**
* Array of {@link RouteRecord} containing components as they were
* passed when adding records. It can also contain redirect records. This
* can't be used directly. **This property is non-enumerable**.
*/
matched: RouteRecord[];
}
/**
* Helper to generate a type safe version of the {@link RouteLocation} type.
*/
interface RouteLocationTyped<RouteMap$1 extends RouteMapGeneric, Name extends keyof RouteMap$1> extends RouteLocationGeneric {
name: Extract<Name, string | symbol>;
params: RouteMap$1[Name]['params'];
}
/**
* List of all possible {@link RouteLocation} indexed by the route name.
* @internal
*/
type RouteLocationTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationTyped<RouteMap$1, N> };
/**
* Generic version of {@link RouteLocationNormalized} that is used when no {@link RouteMap} is provided.
*/
interface RouteLocationNormalizedGeneric extends _RouteLocationBase {
name: RouteRecordNameGeneric;
/**
* Array of {@link RouteRecordNormalized}
*/
matched: RouteRecordNormalized[];
}
/**
* Helper to generate a type safe version of the {@link RouteLocationNormalized} type.
*/
interface RouteLocationNormalizedTyped<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric, Name extends keyof RouteMap$1 = keyof RouteMap$1> extends RouteLocationNormalizedGeneric {
name: Extract<Name, string | symbol>;
params: RouteMap$1[Name]['params'];
/**
* Array of {@link RouteRecordNormalized}
*/
matched: RouteRecordNormalized[];
}
/**
* List of all possible {@link RouteLocationNormalized} indexed by the route name.
* @internal
*/
type RouteLocationNormalizedTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationNormalizedTyped<RouteMap$1, N> };
/**
* Generic version of {@link RouteLocationNormalizedLoaded} that is used when no {@link RouteMap} is provided.
*/
interface RouteLocationNormalizedLoadedGeneric extends RouteLocationNormalizedGeneric {
/**
* Array of {@link RouteLocationMatched} containing only plain components (any
* lazy-loaded components have been loaded and were replaced inside the
* `components` object) so it can be directly used to display routes. It
* cannot contain redirect records either. **This property is non-enumerable**.
*/
matched: RouteLocationMatched[];
}
/**
* Helper to generate a type safe version of the {@link RouteLocationNormalizedLoaded} type.
*/
interface RouteLocationNormalizedLoadedTyped<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric, Name extends keyof RouteMap$1 = keyof RouteMap$1> extends RouteLocationNormalizedLoadedGeneric {
name: Extract<Name, string | symbol>;
params: RouteMap$1[Name]['params'];
}
/**
* List of all possible {@link RouteLocationNormalizedLoaded} indexed by the route name.
* @internal
*/
type RouteLocationNormalizedLoadedTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationNormalizedLoadedTyped<RouteMap$1, N> };
/**
* Generic version of {@link RouteLocationAsRelative}. It is used when no {@link RouteMap} is provided.
*/
interface RouteLocationAsRelativeGeneric extends RouteQueryAndHash, RouteLocationOptions {
name?: RouteRecordNameGeneric;
params?: RouteParamsRawGeneric;
/**
* A relative path to the current location. This property should be removed
*/
path?: undefined;
}
/**
* Helper to generate a type safe version of the {@link RouteLocationAsRelative} type.
*/
interface RouteLocationAsRelativeTyped<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric, Name extends keyof RouteMap$1 = keyof RouteMap$1> extends RouteLocationAsRelativeGeneric {
name?: Extract<Name, string | symbol>;
params?: RouteMap$1[Name]['paramsRaw'];
}
/**
* List of all possible {@link RouteLocationAsRelative} indexed by the route name.
* @internal
*/
type RouteLocationAsRelativeTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationAsRelativeTyped<RouteMap$1, N> };
/**
* Generic version of {@link RouteLocationAsPath}. It is used when no {@link RouteMap} is provided.
*/
interface RouteLocationAsPathGeneric extends RouteQueryAndHash, RouteLocationOptions {
/**
* Percentage encoded pathname section of the URL.
*/
path: string;
}
/**
* Helper to generate a type safe version of the {@link RouteLocationAsPath} type.
*/
interface RouteLocationAsPathTyped<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric, Name extends keyof RouteMap$1 = keyof RouteMap$1> extends RouteLocationAsPathGeneric {
path: _LiteralUnion<RouteMap$1[Name]['path']>;
}
/**
* List of all possible {@link RouteLocationAsPath} indexed by the route name.
* @internal
*/
type RouteLocationAsPathTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationAsPathTyped<RouteMap$1, N> };
/**
* Helper to generate a type safe version of the {@link RouteLocationAsString} type.
*/
type RouteLocationAsStringTyped<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric, Name extends keyof RouteMap$1 = keyof RouteMap$1> = RouteMap$1[Name]['path'];
/**
* List of all possible {@link RouteLocationAsString} indexed by the route name.
* @internal
*/
type RouteLocationAsStringTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationAsStringTyped<RouteMap$1, N> };
/**
* Generic version of {@link RouteLocationResolved}. It is used when no {@link RouteMap} is provided.
*/
interface RouteLocationResolvedGeneric extends RouteLocationGeneric {
/**
* Resolved `href` for the route location that will be set on the `<a href="...">`.
*/
href: string;
}
/**
* Helper to generate a type safe version of the {@link RouteLocationResolved} type.
*/
interface RouteLocationResolvedTyped<RouteMap$1 extends RouteMapGeneric, Name extends keyof RouteMap$1> extends RouteLocationTyped<RouteMap$1, Name> {
/**
* Resolved `href` for the route location that will be set on the `<a href="...">`.
*/
href: string;
}
/**
* List of all possible {@link RouteLocationResolved} indexed by the route name.
* @internal
*/
type RouteLocationResolvedTypedList<RouteMap$1 extends RouteMapGeneric = RouteMapGeneric> = { [N in keyof RouteMap$1]: RouteLocationResolvedTyped<RouteMap$1, N> };
/**
* Type safe versions of types that are exposed by vue-router. We have to use a generic check to allow for names to be `undefined` when no `RouteMap` is provided.
*/
/**
* {@link RouteLocationRaw} resolved using the matcher
*/
type RouteLocation<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationGeneric : RouteLocationTypedList<RouteMap>[Name];
/**
* Similar to {@link RouteLocation} but its
* {@link RouteLocationNormalizedTyped.matched | `matched` property} cannot contain redirect records
*/
type RouteLocationNormalized<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationNormalizedGeneric : RouteLocationNormalizedTypedList<RouteMap>[Name];
/**
* Similar to {@link RouteLocationNormalized} but its `components` do not contain any function to lazy load components.
* In other words, it's ready to be rendered by `<RouterView>`.
*/
type RouteLocationNormalizedLoaded<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationNormalizedLoadedGeneric : RouteLocationNormalizedLoadedTypedList<RouteMap>[Name];
/**
* Route location relative to the current location. It accepts other properties than `path` like `params`, `query` and
* `hash` to conveniently change them.
*/
type RouteLocationAsRelative<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationAsRelativeGeneric : RouteLocationAsRelativeTypedList<RouteMap>[Name];
/**
* Route location resolved with {@link Router | `router.resolve()`}.
*/
type RouteLocationResolved<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationResolvedGeneric : RouteLocationResolvedTypedList<RouteMap>[Name];
/**
* Same as {@link RouteLocationAsPath} but as a string literal.
*/
type RouteLocationAsString<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? string : _LiteralUnion<RouteLocationAsStringTypedList<RouteMap>[Name], string>;
/**
* Route location as an object with a `path` property.
*/
type RouteLocationAsPath<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationAsPathGeneric : RouteLocationAsPathTypedList<RouteMap>[Name];
/**
* Route location that can be passed to `router.push()` and other user-facing APIs.
*/
type RouteLocationRaw<Name extends keyof RouteMap = keyof RouteMap> = RouteMapGeneric extends RouteMap ? RouteLocationAsString | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric : _LiteralUnion<RouteLocationAsStringTypedList<RouteMap>[Name], string> | RouteLocationAsRelativeTypedList<RouteMap>[Name] | RouteLocationAsPathTypedList<RouteMap>[Name]; //#endregion
//#region src/typed-routes/navigation-guards.d.ts
/**
* Return types for a Navigation Guard. Based on `TypesConfig`
*
* @see {@link TypesConfig}
*/
type NavigationGuardReturn = void | Error | boolean | RouteLocationRaw;
/**
* Navigation Guard with a type parameter for `this`.
* @see {@link TypesConfig}
*/
interface NavigationGuardWithThis<T> {
(this: T, to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded, next: NavigationGuardNext): _Awaitable<NavigationGuardReturn>;
}
/**
* Navigation Guard.
*/
interface NavigationGuard {
(to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded, next: NavigationGuardNext): _Awaitable<NavigationGuardReturn>;
}
/**
* Navigation hook triggered after a navigation is settled.
*/
interface NavigationHookAfter {
(to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded, failure?: NavigationFailure | void): unknown;
}
/**
* `next()` callback passed to navigation guards.
*/
interface NavigationGuardNext {
(): void;
(error: Error): void;
(location: RouteLocationRaw): void;
(valid: boolean | undefined): void;
(cb: NavigationGuardNextCallback): void;
}
/**
* Callback that can be passed to `next()` in `beforeRouteEnter()` guards.
*/
type NavigationGuardNextCallback = (vm: ComponentPublicInstance) => unknown; //#endregion
//#region src/matcher/types.d.ts
/**
* Normalized version of a {@link RouteRecord | route record}.
*/
interface RouteRecordNormalized {
/**
* {@inheritDoc _RouteRecordBase.path}
*/
path: _RouteRecordBase['path'];
/**
* {@inheritDoc _RouteRecordBase.redirect}
*/
redirect: _RouteRecordBase['redirect'] | undefined;
/**
* {@inheritDoc _RouteRecordBase.name}
*/
name: _RouteRecordBase['name'];
/**
* {@inheritDoc RouteRecordMultipleViews.components}
*/
components: RouteRecordMultipleViews['components'] | null | undefined;
/**
* Contains the original modules for lazy loaded components.
* @internal
*/
mods: Record<string, unknown>;
/**
* Nested route records.
*/
children: RouteRecordRaw[];
/**
* {@inheritDoc _RouteRecordBase.meta}
*/
meta: Exclude<_RouteRecordBase['meta'], void>;
/**
* {@inheritDoc RouteRecordMultipleViews.props}
*/
props: Record<string, _RouteRecordProps>;
/**
* Registered beforeEnter guards
*/
beforeEnter: _RouteRecordBase['beforeEnter'];
/**
* Registered leave guards
*
* @internal
*/
leaveGuards: Set<NavigationGuard>;
/**
* Registered update guards
*
* @internal
*/
updateGuards: Set<NavigationGuard>;
/**
* Registered beforeRouteEnter callbacks passed to `next` or returned in guards
*
* @internal
*/
enterCallbacks: Record<string, NavigationGuardNextCallback[]>;
/**
* Mounted route component instances
* Having the instances on the record mean beforeRouteUpdate and
* beforeRouteLeave guards can only be invoked with the latest mounted app
* instance if there are multiple application instances rendering the same
* view, basically duplicating the content on the page, which shouldn't happen
* in practice. It will work if multiple apps are rendering different named
* views.
*/
instances: Record<string, ComponentPublicInstance | undefined | null>;
/**
* Defines if this record is the alias of another one. This property is
* `undefined` if the record is the original one.
*/
aliasOf: RouteRecordNormalized | undefined;
}
/**
* {@inheritDoc RouteRecordNormalized}
*/
type RouteRecord = RouteRecordNormalized; //#endregion
//#region src/matcher/pathParserRanker.d.ts
/**
* @internal
*/
interface _PathParserOptions {
/**
* Makes the RegExp case-sensitive.
*
* @defaultValue `false`
*/
sensitive?: boolean;
/**
* Whether to disallow a trailing slash or not.
*
* @defaultValue `false`
*/
strict?: boolean;
/**
* Should the RegExp match from the beginning by prepending a `^` to it.
* @internal
*
* @defaultValue `true`
*/
start?: boolean;
/**
* Should the RegExp match until the end by appending a `$` to it.
*
* @deprecated this option will alsways be `true` in the future. Open a discussion in vuejs/router if you need this to be `false`
*
* @defaultValue `true`
*/
end?: boolean;
}
type PathParserOptions = Pick<_PathParserOptions, 'end' | 'sensitive' | 'strict'>; //#endregion
//#region src/matcher/pathMatcher.d.ts
//#endregion
//#region src/history/common.d.ts
type HistoryLocation = string;
/**
* Allowed variables in HTML5 history state. Note that pushState clones the state
* passed and does not accept everything: e.g.: it doesn't accept symbols, nor
* functions as values. It also ignores Symbols as keys.
*
* @internal
*/
type HistoryStateValue = string | number | boolean | null | undefined | HistoryState | HistoryStateArray;
/**
* Allowed HTML history.state
*/
interface HistoryState {
[x: number]: HistoryStateValue;
[x: string]: HistoryStateValue;
}
/**
* Allowed arrays for history.state.
*
* @internal
*/
interface HistoryStateArray extends Array<HistoryStateValue> {}
declare enum NavigationType {
pop = "pop",
push = "push"
}
declare enum NavigationDirection {
back = "back",
forward = "forward",
unknown = ""
}
interface NavigationInformation {
type: NavigationType;
direction: NavigationDirection;
delta: number;
}
interface NavigationCallback {
(to: HistoryLocation, from: HistoryLocation, information: NavigationInformation): void;
}
/**
* Interface implemented by History implementations that can be passed to the
* router as {@link Router.history}
*
* @alpha
*/
interface RouterHistory {
/**
* Base path that is prepended to every url. This allows hosting an SPA at a
* sub-folder of a domain like `example.com/sub-folder` by having a `base` of
* `/sub-folder`
*/
readonly base: string;
/**
* Current History location
*/
readonly location: HistoryLocation;
/**
* Current History state
*/
readonly state: HistoryState;
/**
* Navigates to a location. In the case of an HTML5 History implementation,
* this will call `history.pushState` to effectively change the URL.
*
* @param to - location to push
* @param data - optional {@link HistoryState} to be associated with the
* navigation entry
*/
push(to: HistoryLocation, data?: HistoryState): void;
/**
* Same as {@link RouterHistory.push} but performs a `history.replaceState`
* instead of `history.pushState`
*
* @param to - location to set
* @param data - optional {@link HistoryState} to be associated with the
* navigation entry
*/
replace(to: HistoryLocation, data?: HistoryState): void;
/**
* Traverses history in a given direction.
*
* @example
* ```js
* myHistory.go(-1) // equivalent to window.history.back()
* myHistory.go(1) // equivalent to window.history.forward()
* ```
*
* @param delta - distance to travel. If delta is \< 0, it will go back,
* if it's \> 0, it will go forward by that amount of entries.
* @param triggerListeners - whether this should trigger listeners attached to
* the history
*/
go(delta: number, triggerListeners?: boolean): void;
/**
* Attach a listener to the History implementation that is triggered when the
* navigation is triggered from outside (like the Browser back and forward
* buttons) or when passing `true` to {@link RouterHistory.back} and
* {@link RouterHistory.forward}
*
* @param callback - listener to attach
* @returns a callback to remove the listener
*/
listen(callback: NavigationCallback): () => void;
/**
* Generates the corresponding href to be used in an anchor tag.
*
* @param location - history location that should create an href
*/
createHref(location: HistoryLocation): string;
/**
* Clears any event listener attached by the history implementation.
*/
destroy(): void;
} //#endregion
//#region src/types/index.d.ts
type Lazy<T> = () => Promise<T>;
/**
* @internal
*/
type RouteParamValue = string;
/**
* @internal
*/
type RouteParamValueRaw = RouteParamValue | number | null | undefined;
type RouteParamsGeneric = Record<string, RouteParamValue | RouteParamValue[]>;
type RouteParamsRawGeneric = Record<string, RouteParamValueRaw | Exclude<RouteParamValueRaw, null | undefined>[]>;
/**
* @internal
*/
interface RouteQueryAndHash {
query?: LocationQueryRaw;
hash?: string;
}
/**
* @internal
*/
/**
* Common options for all navigation methods.
*/
interface RouteLocationOptions {
/**
* Replace the entry in the history instead of pushing a new entry
*/
replace?: boolean;
/**
* Triggers the navigation even if the location is the same as the current one.
* Note this will also add a new entry to the history unless `replace: true`
* is passed.
*/
force?: boolean;
/**
* State to save using the History API. This cannot contain any reactive
* values and some primitives like Symbols are forbidden. More info at
* https://developer.mozilla.org/en-US/docs/Web/API/History/state
*/
state?: HistoryState;
}
/**
* Route Location that can infer the necessary params based on the name.
*
* @internal
*/
interface RouteLocationMatched extends RouteRecordNormalized {
components: Record<string, RouteComponent> | null | undefined;
}
/**
* Base properties for a normalized route location.
*
* @internal
*/
interface _RouteLocationBase extends Pick<MatcherLocation, 'name' | 'path' | 'params' | 'meta'> {
/**
* The whole location including the `search` and `hash`. This string is
* percentage encoded.
*/
fullPath: string;
/**
* Object representation of the `search` property of the current location.
*/
query: LocationQuery;
/**
* Hash of the current location. If present, starts with a `#`.
*/
hash: string;
/**
* Contains the location we were initially trying to access before ending up
* on the current location.
*/
redirectedFrom: RouteLocation | undefined;
}
/**
* Allowed Component in {@link RouteLocationMatched}
*/
type RouteComponent = Component$1 | DefineComponent;
/**
* Allowed Component definitions in route records provided by the user
*/
type RawRouteComponent = RouteComponent | Lazy<RouteComponent>;
/**
* Internal type for common properties among all kind of {@link RouteRecordRaw}.
*/
interface _RouteRecordBase extends PathParserOptions {
/**
* Path of the record. Should start with `/` unless the record is the child of
* another record.
*
* @example `/users/:id` matches `/users/1` as well as `/users/posva`.
*/
path: string;
/**
* Where to redirect if the route is directly matched. The redirection happens
* before any navigation guard and triggers a new navigation with the new
* target location.
*/
redirect?: RouteRecordRedirectOption;
/**
* Aliases for the record. Allows defining extra paths that will behave like a
* copy of the record. Allows having paths shorthands like `/users/:id` and
* `/u/:id`. All `alias` and `path` values must share the same params.
*/
alias?: string | string[];
/**
* Name for the route record. Must be unique.
*/
name?: RouteRecordNameGeneric;
/**
* Before Enter guard specific to this record. Note `beforeEnter` has no
* effect if the record has a `redirect` property.
*/
beforeEnter?: NavigationGuardWithThis<undefined> | NavigationGuardWithThis<undefined>[];
/**
* Arbitrary data attached to the record.
*/
meta?: RouteMeta;
/**
* Array of nested routes.
*/
children?: RouteRecordRaw[];
/**
* Allow passing down params as props to the component rendered by `router-view`.
*/
props?: _RouteRecordProps | Record<string, _RouteRecordProps>;
}
/**
* Interface to type `meta` fields in route records.
*
* @example
*
* ```ts
* // typings.d.ts or router.ts
* import 'vue-router';
*
* declare module 'vue-router' {
* interface RouteMeta {
* requiresAuth?: boolean
* }
* }
* ```
*/
interface RouteMeta extends Record<PropertyKey, unknown> {}
/**
* Route Record defining one single component with the `component` option.
*/
interface RouteRecordSingleView extends _RouteRecordBase {
/**
* Component to display when the URL matches this route.
*/
component: RawRouteComponent;
components?: never;
children?: never;
redirect?: never;
/**
* Allow passing down params as props to the component rendered by `router-view`.
*/
props?: _RouteRecordProps;
}
/**
* Route Record defining one single component with a nested view. Differently
* from {@link RouteRecordSingleView}, this record has children and allows a
* `redirect` option.
*/
interface RouteRecordSingleViewWithChildren extends _RouteRecordBase {
/**
* Component to display when the URL matches this route.
*/
component?: RawRouteComponent | null | undefined;
components?: never;
children: RouteRecordRaw[];
/**
* Allow passing down params as props to the component rendered by `router-view`.
*/
props?: _RouteRecordProps;
}
/**
* Route Record defining multiple named components with the `components` option.
*/
interface RouteRecordMultipleViews extends _RouteRecordBase {
/**
* Components to display when the URL matches this route. Allow using named views.
*/
components: Record<string, RawRouteComponent>;
component?: never;
children?: never;
redirect?: never;
/**
* Allow passing down params as props to the component rendered by
* `router-view`. Should be an object with the same keys as `components` or a
* boolean to be applied to every component.
*/
props?: Record<string, _RouteRecordProps> | boolean;
}
/**
* Route Record defining multiple named components with the `components` option and children.
*/
interface RouteRecordMultipleViewsWithChildren extends _RouteRecordBase {
/**
* Components to display when the URL matches this route. Allow using named views.
*/
components?: Record<string, RawRouteComponent> | null | undefined;
component?: never;
children: RouteRecordRaw[];
/**
* Allow passing down params as props to the component rendered by
* `router-view`. Should be an object with the same keys as `components` or a
* boolean to be applied to every component.
*/
props?: Record<string, _RouteRecordProps> | boolean;
}
/**
* Route Record that defines a redirect. Cannot have `component` or `components`
* as it is never rendered.
*/
interface RouteRecordRedirect extends _RouteRecordBase {
redirect: RouteRecordRedirectOption;
component?: never;
components?: never;
props?: never;
}
type RouteRecordRaw = RouteRecordSingleView | RouteRecordSingleViewWithChildren | RouteRecordMultipleViews | RouteRecordMultipleViewsWithChildren | RouteRecordRedirect;
/**
* Route location that can be passed to the matcher.
*/
/**
* Normalized/resolved Route location that returned by the matcher.
*/
interface MatcherLocation {
/**
* Name of the matched record
*/
name: RouteRecordNameGeneric | null | undefined;
/**
* Percentage encoded pathname section of the URL.
*/
path: string;
/**
* Object of decoded params extracted from the `path`.
*/
params: RouteParamsGeneric;
/**
* Merged `meta` properties from all the matched route records.
*/
meta: RouteMeta;
/**
* Array of {@link RouteRecord} containing components as they were
* passed when adding records. It can also contain redirect records. This
* can't be used directly
*/
matched: RouteRecord[];
} //#endregion
//#region src/errors.d.ts
/**
* Flags so we can combine them when checking for multiple errors. This is the internal version of
* {@link NavigationFailureType}.
*
* @internal
*/
declare const enum ErrorTypes {
MATCHER_NOT_FOUND = 1,
NAVIGATION_GUARD_REDIRECT = 2,
NAVIGATION_ABORTED = 4,
NAVIGATION_CANCELLED = 8,
NAVIGATION_DUPLICATED = 16
}
/**
* Enumeration with all possible types for navigation failures. Can be passed to
* {@link isNavigationFailure} to check for specific failures.
*/
/**
* Extended Error that contains extra information regarding a failed navigation.
*/
interface NavigationFailure extends Error {
/**
* Type of the navigation. One of {@link NavigationFailureType}
*/
type: ErrorTypes.NAVIGATION_CANCELLED | ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_DUPLICATED;
/**
* Route location we were navigating from
*/
from: RouteLocationNormalized;
/**
* Route location we were navigating to
*/
to: RouteLocationNormalized;
}
/**
* Internal error used to detect a redirection.
*
* @internal
*/
/**
* Internal type to define an ErrorHandler
*
* @param error - error thrown
* @param to - location we were navigating to when the error happened
* @param from - location we were navigating from when the error happened
* @internal
*/
interface _ErrorListener {
(error: any, to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded): any;
} //#endregion
//#region src/scrollBehavior.d.ts
/**
* Scroll position similar to
* {@link https://developer.mozilla.org/en-US/docs/Web/API/ScrollToOptions | `ScrollToOptions`}.
* Note that not all browsers support `behavior`.
*/
type ScrollPositionCoordinates = {
behavior?: ScrollOptions['behavior'];
left?: number;
top?: number;
};
/**
* Internal normalized version of {@link ScrollPositionCoordinates} that always
* has `left` and `top` coordinates. Must be a type to be assignable to HistoryStateValue.
*
* @internal
*/
type _ScrollPositionNormalized = {
behavior?: ScrollOptions['behavior'];
left: number;
top: number;
};
/**
* Type of the `scrollBehavior` option that can be passed to `createRouter`.
*/
interface RouterScrollBehavior {
/**
* @param to - Route location where we are navigating to
* @param from - Route location where we are navigating from
* @param savedPosition - saved position if it exists, `null` otherwise
*/
(to: RouteLocationNormalized, from: RouteLocationNormalizedLoaded, savedPosition: _ScrollPositionNormalized | null): Awaitable<ScrollPosition | false | void>;
}
interface ScrollPositionElement extends ScrollToOptions {
/**
* A valid CSS selector. Note some characters must be escaped in id selectors (https://mathiasbynens.be/notes/css-escapes).
* @example
* Here are a few examples:
*
* - `.title`
* - `.content:first-child`
* - `#marker`
* - `#marker\~with\~symbols`
* - `#marker.with.dot`: selects `class="with dot" id="marker"`, not `id="marker.with.dot"`
*
*/
el: string | Element;
}
type ScrollPosition = ScrollPositionCoordinates | ScrollPositionElement;
type Awaitable<T> = T | PromiseLike<T>; //#endregion
//#region src/experimental/route-resolver/matchers/param-parsers/types.d.ts
/**
* Defines a parser that can read a param from the url (string-based) and
* transform it into a more complex type, or vice versa.
*
* @see MatcherPattern
*/
//#endregion
//#region src/experimental/router.d.ts
/**
* Options to initialize a {@link Router} instance.
*/
interface EXPERIMENTAL_RouterOptions_Base extends PathParserOptions {
/**
* History implementation used by the router. Most web applications should use
* `createWebHistory` but it requires the server to be properly configured.
* You can also use a _hash_ based history with `createWebHashHistory` that
* does not require any configuration on the server but isn't handled at all
* by search engines and does poorly on SEO.
*
* @example
* ```js
* createRouter({
* history: createWebHistory(),
* // other options...
* })
* ```
*/
history: RouterHistory;
/**
* Function to control scrolling when navigating between pages. Can return a
* Promise to delay scrolling.
*
* @see {@link RouterScrollBehavior}.
*
* @example
* ```js
* function scrollBehavior(to, from, savedPosition) {
* // `to` and `from` are both route locations
* // `savedPosition` can be null if there isn't one
* }
* ```
*/
scrollBehavior?: RouterScrollBehavior;
/**
* Custom implementation to parse a query. See its counterpart,
* {@link EXPERIMENTAL_RouterOptions_Base.stringifyQuery}.
*
* @example
* Let's say you want to use the [qs package](https://github.com/ljharb/qs)
* to parse queries, you can provide both `parseQuery` and `stringifyQuery`:
* ```js
* import qs from 'qs'
*
* createRouter({
* // other options...
* parseQuery: qs.parse,
* stringifyQuery: qs.stringify,
* })
* ```
*/
parseQuery?: typeof parseQuery;
/**
* Custom implementation to stringify a query object. Should not prepend a leading `?`.
* {@link parseQuery} counterpart to handle query parsing.
*/
stringifyQuery?: typeof stringifyQuery;
/**
* Default class applied to active {@link RouterLink}. If none is provided,
* `router-link-active` will be applied.
*/
linkActiveClass?: string;
/**
* Default class applied to exact active {@link RouterLink}. If none is provided,
* `router-link-exact-active` will be applied.
*/
linkExactActiveClass?: string;
}
/**
* Internal type for common properties among all kind of {@link RouteRecordRaw}.
*/
/**
* Router base instance.
*
* @experimental This version is not stable, it's meant to replace {@link Router} in the future.
*/
interface EXPERIMENTAL_Router_Base<TRecord> {
/**
* Current {@link RouteLocationNormalized}
*/
readonly currentRoute: ShallowRef<RouteLocationNormalizedLoaded>;
/**
* Allows turning off the listening of history events. This is a low level api for micro-frontend.
*/
listening: boolean;
/**
* Checks if a route with a given name exists
*
* @param name - Name of the route to check
*/
hasRoute(name: NonNullable<RouteRecordNameGeneric>): boolean;
/**
* Get a full list of all the {@link RouteRecord | route records}.
*/
getRoutes(): TRecord[];
/**
* Returns the {@link RouteLocation | normalized version} of a
* {@link RouteLocationRaw | route location}. Also includes an `href` property
* that includes any existing `base`. By default, the `currentLocation` used is
* `router.currentRoute` and should only be overridden in advanced use cases.
*
* @param to - Raw route location to resolve
* @param currentLocation - Optional current location to resolve against
*/
resolve<Name extends keyof RouteMap = keyof RouteMap>(to: RouteLocationAsRelativeTyped<RouteMap, Name>, currentLocation?: RouteLocationNormalizedLoaded): RouteLocationResolved<Name>;
resolve(to: RouteLocationAsString | RouteLocationAsRelative | RouteLocationAsPath, currentLocation?: RouteLocationNormalizedLoaded): RouteLocationResolved;
/**
* Programmatically navigate to a new URL by pushing an entry in the history
* stack.
*
* @param to - Route location to navigate to
*/
push(to: RouteLocationRaw): Promise<NavigationFailure | void | undefined>;
/**
* Programmatically navigate to a new URL by replacing the current entry in
* the history stack.
*
* @param to - Route location to navigate to
*/
replace(to: RouteLocationRaw): Promise<NavigationFailure | void | undefined>;
/**
* Go back in history if possible by calling `history.back()`. Equivalent to
* `router.go(-1)`.
*/
back(): void;
/**
* Go forward in history if possible by calling `history.forward()`.
* Equivalent to `router.go(1)`.
*/
forward(): void;
/**
* Allows you to move forward or backward through the history. Calls
* `history.go()`.
*
* @param delta - The position in the history to which you want to move,
* relative to the current page
*/
go(delta: number): void;
/**
* Add a navigation guard that executes before any navigation. Returns a
* function that removes the registered guard.
*
* @param guard - navigation guard to add
*/
beforeEach(guard: NavigationGuardWithThis<undefined>): () => void;
/**
* Add a navigation guard that executes before navigation is about to be
* resolved. At this state all component have been fetched and other
* navigation guards have been successful. Returns a function that removes the
* registered guard.
*
* @param guard - navigation guard to add
* @returns a function that removes the registered guard
*
* @example
* ```js
* router.beforeResolve(to => {
* if (to.meta.requiresAuth && !isAuthenticated) return false
* })
* ```
*
*/
beforeResolve(guard: NavigationGuardWithThis<undefined>): () => void;
/**
* Add a navigation hook that is executed after every navigation. Returns a
* function that removes the registered hook.
*
* @param guard - navigation hook to add
* @returns a function that removes the registered hook
*
* @example
* ```js
* router.afterEach((to, from, failure) => {
* if (isNavigationFailure(failure)) {
* console.log('failed navigation', failure)
* }
* })
* ```
*/
afterEach(guard: NavigationHookAfter): () => void;
/**
* Adds an error handler that is called every time a non caught error happens
* during navigation. This includes errors thrown synchronously and
* asynchronously, errors returned or passed to `next` in any navigation
* guard, and errors occurred when trying to resolve an async component that
* is required to render a route.
*
* @param handler - error handler to register
*/
onError(handler: _ErrorListener): () => void;
/**
* Returns a Promise that resolves when the router has completed the initial
* navigation, which means it has resolved all async enter hooks and async
* components that are associated with the initial route. If the initial
* navigation already happened, the promise resolves immediately.
*
* This is useful in server-side rendering to ensure consistent output on both
* the server and the client. Note that on server side, you need to manually
* push the initial location while on client side, the router automatically
* picks it up from the URL.
*/
isReady(): Promise<void>;
/**
* Called automatically by `app.use(router)`. Should not be called manually by
* the user. This will trigger the initial navigation when on client side.
*
* @internal
* @param app - Application that uses the router
*/
install(app: App): void;
}
//#endregion
//#region ../../node_modules/.pnpm/vue-router@4.6.4_vue@3.5.27_typescript@5.9.3_/node_modules/vue-router/dist/vue-router.d.mts
//#endregion
//#region src/router.d.ts
/**
* Options to initialize a {@link Router} instance.
*/
interface RouterOptions extends EXPERIMENTAL_RouterOptions_Base {
/**
* Initial list of routes that should be added to the router.
*/
routes: Readonly<RouteRecordRaw[]>;
}
/**
* Router instance.
*/
interface Router extends EXPERIMENTAL_Router_Base<RouteRecordNormalized> {
/**
* Original options object passed to create the Router
*/
readonly options: RouterOptions;
/**
* Add a new {@link RouteRecordRaw | route record} as the child of an existing route.
*
* @param parentName - Parent Route Record where `route` should be appended at
* @param route - Route Record to add
*/
addRoute(parentName: NonNullable<RouteRecordNameGeneric>, route: RouteRecordRaw): () => void;
/**
* Add a new {@link RouteRecordRaw | route record} to the router.
*
* @param route - Route Record to add
*/
addRoute(route: RouteRecordRaw): () => void;
/**
* Remove an existing route by its name.
*
* @param name - Name of the route to remove
*/
removeRoute(name: NonNullable<RouteRecordNameGeneric>): void;
/**
* Delete all routes from the router.
*/
clearRoutes(): void;
}
/**
* Creates a Router instance that can be used by a Vue app.
*
* @param options - {@link RouterOptions}
*/
//#endregion
//#region src/RouterLink.d.ts
interface RouterLinkOptions {
/**
* Route Location the link should navigate to when clicked on.
*/
to: RouteLocationRaw;
/**
* Calls `router.replace` instead of `router.push`.
*/
replace?: boolean;
}
interface RouterLinkProps extends RouterLinkOptions {
/**
* Whether RouterLink should not wrap its content in an `a` tag. Useful when
* using `v-slot` to create a custom RouterLink
*/
custom?: boolean;
/**
* Class to apply when the link is active
*/
activeClass?: string;
/**
* Class to apply when the link is exact active
*/
exactActiveClass?: string;
/**
* Value passed to the attribute `aria-current` when the link is exact active.
*
* @defaultValue `'page'`
*/
ariaCurrentValue?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';
/**
* Pass the returned promise of `router.push()` to `document.startViewTransition()` if supported.
*/
viewTransition?: boolean;
}
/**
* Options passed to {@link useLink}.
*/
interface UseLinkOptions<Name extends keyof RouteMap = keyof RouteMap> {
to: MaybeRef<RouteLocationAsString | RouteLocationAsRelativeTyped<RouteMap, Name> | RouteLocationAsPath | RouteLocationRaw>;
replace?: MaybeRef<boolean | undefined>;
/**
* Pass the returned promise of `router.push()` to `document.startViewTransition()` if supported.
*/
viewTransition?: boolean;
}
/**
* Return type of {@link useLink}.
* @internal
*/
interface UseLinkReturn<Name extends keyof RouteMap = keyof RouteMap> {
route: ComputedRef<RouteLocationResolved<Name>>;
href: ComputedRef<string>;
isActive: ComputedRef<boolean>;
isExactActive: ComputedRef<boolean>;
navigate(e?: MouseEvent): Promise<void | NavigationFailure>;
}
/**
* Returns the internal behavior of a {@link RouterLink} without the rendering part.
*
* @param props - a `to` location and an optional `replace` flag
*/
declare function useLink<Name extends keyof RouteMap = keyof RouteMap>(props: UseLinkOptions<Name>): UseLinkReturn<Name>;
/**
* Component to render a link that triggers a navigation on click.
*/
declare const RouterLink: _RouterLinkI;
/**
* @internal
*/
type _RouterLinkPropsTypedBase = AllowedComponentProps & ComponentCustomProps & VNodeProps & RouterLinkProps;
/**
* @internal
*/
type RouterLinkPropsTyped<Custom extends boolean | undefined> = Custom extends true ? _RouterLinkPropsTypedBase & {
custom: true;
} : _RouterLinkPropsTypedBase & {
custom?: false | undefined;
} & Omit<AnchorHTMLAttributes, 'href'>;
/**
* Typed version of the `RouterLink` component. Its generic defaults to the typed router, so it can be inferred
* automatically for JSX.
*
* @internal
*/
interface _RouterLinkI {
new <Custom extends boolean | undefined = boolean | undefined>(): {
$props: RouterLinkPropsTyped<Custom>;
$slots: {
default?: ({
route,
href,
isActive,
isExactActive,
navigate
}: UnwrapRef<UseLinkReturn>) => VNode[];
};
};
/**
* Access to `useLink()` without depending on using vue-router
*
* @internal
*/
useLink: typeof useLink;
} //#endregion
//#region src/RouterView.d.ts
interface RouterViewProps {
name?: string;
route?: RouteLocationNormalized;
}
/**
* Component to display the current route the user is at.
*/
declare const RouterView: {
new (): {
$props: AllowedComponentProps & ComponentCustomProps & VNodeProps & RouterViewProps;
$slots: {
default?: ({
Component,
route
}: {
Component: VNode;
route: RouteLocationNormalizedLoaded;
}) => VNode[];
};
};
}; //#endregion
//#region src/useApi.d.ts
/**
* Returns the router instance. Equivalent to using `$router` inside
* templates.
*/
//#endregion
//#region src/index.d.ts
declare module 'vue' {
interface ComponentCustomOptions {
/**
* Guard called when the router is navigating to the route that is rendering
* this component from a different route. Differently from `beforeRouteUpdate`
* and `beforeRouteLeave`, `beforeRouteEnter` does not have access to the
* component instance through `this` because it triggers before the component
* is even mounted.
*
* @param to - RouteLocationRaw we are navigating to
* @param from - RouteLocationRaw we are navigating from
* @param next - function to validate, cancel or modify (by redirecting) the
* navigation
*/
beforeRouteEnter?: TypesConfig extends Record<'beforeRouteEnter', infer T> ? T : NavigationGuardWithThis<undefined>;
/**
* Guard called whenever the route that renders this component has changed, but
* it is reused for the new route. This allows you to guard for changes in
* params, the query or the hash.
*
* @param to - RouteLocationRaw we are navigating to
* @param from - RouteLocationRaw we are navigating from
* @param next - function to validate, cancel or modify (by redirecting) the
* navigation
*/
beforeRouteUpdate?: TypesConfig extends Record<'beforeRouteUpdate', infer T> ? T : NavigationGuard;
/**
* Guard called when the router is navigating away from the current route that
* is rendering this component.
*
* @param to - RouteLocationRaw we are navigating to
* @param from - RouteLocationRaw we are navigating from
* @param next - function to validate, cancel or modify (by redirecting) the
* navigation
*/
beforeRouteLeave?: TypesConfig extends Record<'beforeRouteLeave', infer T> ? T : NavigationGuard;
}
interface ComponentCustomProperties {
/**
* Normalized current location. See {@link RouteLocationNormalizedLoaded}.
*/
$route: TypesConfig extends Record<'$route', infer T> ? T : RouteLocationNormalizedLoaded;
/**
* {@link Router} instance used by the application.
*/
$router: TypesConfig extends Record<'$router', infer T> ? T : Router;
}
interface GlobalComponents {
RouterView: TypesConfig extends Record<'RouterView', infer T> ? T : typeof RouterView;
RouterLink: TypesConfig extends Record<'RouterLink', infer T> ? T : typeof RouterLink;
}
} //#endregion
//#endregion
export { RouterHistory as i, RouteLocationRaw as n, RouteRecordRaw as r, RouterOptions as t };
import "node:module";
var __defProp = Object.defineProperty;
var __exportAll = (all, no_symbols) => {
let target = {};
for (var name in all) __defProp(target, name, {
get: all[name],
enumerable: true
});
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
return target;
};
export { __exportAll as t };

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display