vite 5.2.7 → 5.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/client.mjs +46 -33
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-ThQVBShq.js → dep-2j8ZV8Rx.js} +2 -2
- package/dist/node/chunks/{dep-C1QONNHf.js → dep-D6I3Q2TL.js} +1 -1
- package/dist/node/chunks/{dep-C-KAszbv.js → dep-whKeNLxG.js} +283 -126
- package/dist/node/cli.js +5 -5
- package/dist/node/index.js +2 -2
- package/package.json +3 -2
package/dist/client/client.mjs
CHANGED
@@ -381,7 +381,8 @@ kbd {
|
|
381
381
|
}
|
382
382
|
`;
|
383
383
|
// Error Template
|
384
|
-
|
384
|
+
let template;
|
385
|
+
const createTemplate = () => h('div', { class: 'backdrop', part: 'backdrop' }, h('div', { class: 'window', part: 'window' }, h('pre', { class: 'message', part: 'message' }, h('span', { class: 'plugin', part: 'plugin' }), h('span', { class: 'message-body', part: 'message-body' })), h('pre', { class: 'file', part: 'file' }), h('pre', { class: 'frame', part: 'frame' }), h('pre', { class: 'stack', part: 'stack' }), h('div', { class: 'tip', part: 'tip' }, 'Click outside, press ', h('kbd', {}, 'Esc'), ' key, or fix the code to dismiss.', h('br'), 'You can also disable this overlay by setting ', h('code', { part: 'config-option-name' }, 'server.hmr.overlay'), ' to ', h('code', { part: 'config-option-value' }, 'false'), ' in ', h('code', { part: 'config-file-name' }, hmrConfigName), '.')), h('style', {}, templateStyle));
|
385
386
|
const fileRE = /(?:[a-zA-Z]:\\|\/).*?:\d+:\d+/g;
|
386
387
|
const codeframeRE = /^(?:>?\s*\d+\s+\|.*|\s+\|\s*\^.*)\r?\n/gm;
|
387
388
|
// Allow `ErrorOverlay` to extend `HTMLElement` even in environments where
|
@@ -393,6 +394,7 @@ class ErrorOverlay extends HTMLElement {
|
|
393
394
|
var _a;
|
394
395
|
super();
|
395
396
|
this.root = this.attachShadow({ mode: 'open' });
|
397
|
+
template !== null && template !== void 0 ? template : (template = createTemplate());
|
396
398
|
this.root.appendChild(template);
|
397
399
|
codeframeRE.lastIndex = 0;
|
398
400
|
const hasFrame = err.frame && codeframeRE.test(err.frame);
|
@@ -523,9 +525,11 @@ function setupWebSocket(protocol, hostAndPath, onCloseWithoutOpen) {
|
|
523
525
|
return;
|
524
526
|
}
|
525
527
|
notifyListeners('vite:ws:disconnect', { webSocket: socket });
|
526
|
-
|
527
|
-
|
528
|
-
|
528
|
+
if (hasDocument) {
|
529
|
+
console.log(`[vite] server connection lost. polling for restart...`);
|
530
|
+
await waitForSuccessfulPing(protocol, hostAndPath);
|
531
|
+
location.reload();
|
532
|
+
}
|
529
533
|
});
|
530
534
|
return socket;
|
531
535
|
}
|
@@ -583,17 +587,21 @@ async function handleMessage(payload) {
|
|
583
587
|
break;
|
584
588
|
case 'update':
|
585
589
|
notifyListeners('vite:beforeUpdate', payload);
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
590
|
+
if (hasDocument) {
|
591
|
+
// if this is the first update and there's already an error overlay, it
|
592
|
+
// means the page opened with existing server compile error and the whole
|
593
|
+
// module script failed to load (since one of the nested imports is 500).
|
594
|
+
// in this case a normal update won't work and a full reload is needed.
|
595
|
+
if (isFirstUpdate && hasErrorOverlay()) {
|
596
|
+
window.location.reload();
|
597
|
+
return;
|
598
|
+
}
|
599
|
+
else {
|
600
|
+
if (enableOverlay) {
|
601
|
+
clearErrorOverlay();
|
602
|
+
}
|
603
|
+
isFirstUpdate = false;
|
604
|
+
}
|
597
605
|
}
|
598
606
|
await Promise.all(payload.updates.map(async (update) => {
|
599
607
|
if (update.type === 'js-update') {
|
@@ -638,20 +646,22 @@ async function handleMessage(payload) {
|
|
638
646
|
}
|
639
647
|
case 'full-reload':
|
640
648
|
notifyListeners('vite:beforeFullReload', payload);
|
641
|
-
if (
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
+
if (hasDocument) {
|
650
|
+
if (payload.path && payload.path.endsWith('.html')) {
|
651
|
+
// if html file is edited, only reload the page if the browser is
|
652
|
+
// currently on that page.
|
653
|
+
const pagePath = decodeURI(location.pathname);
|
654
|
+
const payloadPath = base + payload.path.slice(1);
|
655
|
+
if (pagePath === payloadPath ||
|
656
|
+
payload.path === '/index.html' ||
|
657
|
+
(pagePath.endsWith('/') && pagePath + 'index.html' === payloadPath)) {
|
658
|
+
pageReload();
|
659
|
+
}
|
660
|
+
return;
|
661
|
+
}
|
662
|
+
else {
|
649
663
|
pageReload();
|
650
664
|
}
|
651
|
-
return;
|
652
|
-
}
|
653
|
-
else {
|
654
|
-
pageReload();
|
655
665
|
}
|
656
666
|
break;
|
657
667
|
case 'prune':
|
@@ -660,12 +670,14 @@ async function handleMessage(payload) {
|
|
660
670
|
break;
|
661
671
|
case 'error': {
|
662
672
|
notifyListeners('vite:error', payload);
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
673
|
+
if (hasDocument) {
|
674
|
+
const err = payload.err;
|
675
|
+
if (enableOverlay) {
|
676
|
+
createErrorOverlay(err);
|
677
|
+
}
|
678
|
+
else {
|
679
|
+
console.error(`[vite] Internal Server Error\n${err.message}\n${err.stack}`);
|
680
|
+
}
|
669
681
|
}
|
670
682
|
break;
|
671
683
|
}
|
@@ -679,6 +691,7 @@ function notifyListeners(event, data) {
|
|
679
691
|
hmrClient.notifyListeners(event, data);
|
680
692
|
}
|
681
693
|
const enableOverlay = __HMR_ENABLE_OVERLAY__;
|
694
|
+
const hasDocument = 'document' in globalThis;
|
682
695
|
function createErrorOverlay(err) {
|
683
696
|
clearErrorOverlay();
|
684
697
|
document.body.appendChild(new ErrorOverlay(err));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"client.mjs","sources":["hmr.ts","overlay.ts","client.ts"],"sourcesContent":["import type { Update } from 'types/hmrPayload'\nimport type { ModuleNamespace, ViteHotContext } from 'types/hot'\nimport type { InferCustomEventPayload } from 'types/customEvent'\n\ntype CustomListenersMap = Map<string, ((data: any) => void)[]>\n\ninterface HotModule {\n id: string\n callbacks: HotCallback[]\n}\n\ninterface HotCallback {\n // the dependencies must be fetchable paths\n deps: string[]\n fn: (modules: Array<ModuleNamespace | undefined>) => void\n}\n\nexport interface HMRLogger {\n error(msg: string | Error): void\n debug(...msg: unknown[]): void\n}\n\nexport interface HMRConnection {\n /**\n * Checked before sending messages to the client.\n */\n isReady(): boolean\n /**\n * Send message to the client.\n */\n send(messages: string): void\n}\n\nexport class HMRContext implements ViteHotContext {\n private newListeners: CustomListenersMap\n\n constructor(\n private hmrClient: HMRClient,\n private ownerPath: string,\n ) {\n if (!hmrClient.dataMap.has(ownerPath)) {\n hmrClient.dataMap.set(ownerPath, {})\n }\n\n // when a file is hot updated, a new context is created\n // clear its stale callbacks\n const mod = hmrClient.hotModulesMap.get(ownerPath)\n if (mod) {\n mod.callbacks = []\n }\n\n // clear stale custom event listeners\n const staleListeners = hmrClient.ctxToListenersMap.get(ownerPath)\n if (staleListeners) {\n for (const [event, staleFns] of staleListeners) {\n const listeners = hmrClient.customListenersMap.get(event)\n if (listeners) {\n hmrClient.customListenersMap.set(\n event,\n listeners.filter((l) => !staleFns.includes(l)),\n )\n }\n }\n }\n\n this.newListeners = new Map()\n hmrClient.ctxToListenersMap.set(ownerPath, this.newListeners)\n }\n\n get data(): any {\n return this.hmrClient.dataMap.get(this.ownerPath)\n }\n\n accept(deps?: any, callback?: any): void {\n if (typeof deps === 'function' || !deps) {\n // self-accept: hot.accept(() => {})\n this.acceptDeps([this.ownerPath], ([mod]) => deps?.(mod))\n } else if (typeof deps === 'string') {\n // explicit deps\n this.acceptDeps([deps], ([mod]) => callback?.(mod))\n } else if (Array.isArray(deps)) {\n this.acceptDeps(deps, callback)\n } else {\n throw new Error(`invalid hot.accept() usage.`)\n }\n }\n\n // export names (first arg) are irrelevant on the client side, they're\n // extracted in the server for propagation\n acceptExports(\n _: string | readonly string[],\n callback: (data: any) => void,\n ): void {\n this.acceptDeps([this.ownerPath], ([mod]) => callback?.(mod))\n }\n\n dispose(cb: (data: any) => void): void {\n this.hmrClient.disposeMap.set(this.ownerPath, cb)\n }\n\n prune(cb: (data: any) => void): void {\n this.hmrClient.pruneMap.set(this.ownerPath, cb)\n }\n\n // Kept for backward compatibility (#11036)\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n decline(): void {}\n\n invalidate(message: string): void {\n this.hmrClient.notifyListeners('vite:invalidate', {\n path: this.ownerPath,\n message,\n })\n this.send('vite:invalidate', { path: this.ownerPath, message })\n this.hmrClient.logger.debug(\n `[vite] invalidate ${this.ownerPath}${message ? `: ${message}` : ''}`,\n )\n }\n\n on<T extends string>(\n event: T,\n cb: (payload: InferCustomEventPayload<T>) => void,\n ): void {\n const addToMap = (map: Map<string, any[]>) => {\n const existing = map.get(event) || []\n existing.push(cb)\n map.set(event, existing)\n }\n addToMap(this.hmrClient.customListenersMap)\n addToMap(this.newListeners)\n }\n\n off<T extends string>(\n event: T,\n cb: (payload: InferCustomEventPayload<T>) => void,\n ): void {\n const removeFromMap = (map: Map<string, any[]>) => {\n const existing = map.get(event)\n if (existing === undefined) {\n return\n }\n const pruned = existing.filter((l) => l !== cb)\n if (pruned.length === 0) {\n map.delete(event)\n return\n }\n map.set(event, pruned)\n }\n removeFromMap(this.hmrClient.customListenersMap)\n removeFromMap(this.newListeners)\n }\n\n send<T extends string>(event: T, data?: InferCustomEventPayload<T>): void {\n this.hmrClient.messenger.send(\n JSON.stringify({ type: 'custom', event, data }),\n )\n }\n\n private acceptDeps(\n deps: string[],\n callback: HotCallback['fn'] = () => {},\n ): void {\n const mod: HotModule = this.hmrClient.hotModulesMap.get(this.ownerPath) || {\n id: this.ownerPath,\n callbacks: [],\n }\n mod.callbacks.push({\n deps,\n fn: callback,\n })\n this.hmrClient.hotModulesMap.set(this.ownerPath, mod)\n }\n}\n\nclass HMRMessenger {\n constructor(private connection: HMRConnection) {}\n\n private queue: string[] = []\n\n public send(message: string): void {\n this.queue.push(message)\n this.flush()\n }\n\n public flush(): void {\n if (this.connection.isReady()) {\n this.queue.forEach((msg) => this.connection.send(msg))\n this.queue = []\n }\n }\n}\n\nexport class HMRClient {\n public hotModulesMap = new Map<string, HotModule>()\n public disposeMap = new Map<string, (data: any) => void | Promise<void>>()\n public pruneMap = new Map<string, (data: any) => void | Promise<void>>()\n public dataMap = new Map<string, any>()\n public customListenersMap: CustomListenersMap = new Map()\n public ctxToListenersMap = new Map<string, CustomListenersMap>()\n\n public messenger: HMRMessenger\n\n constructor(\n public logger: HMRLogger,\n connection: HMRConnection,\n // This allows implementing reloading via different methods depending on the environment\n private importUpdatedModule: (update: Update) => Promise<ModuleNamespace>,\n ) {\n this.messenger = new HMRMessenger(connection)\n }\n\n public async notifyListeners<T extends string>(\n event: T,\n data: InferCustomEventPayload<T>,\n ): Promise<void>\n public async notifyListeners(event: string, data: any): Promise<void> {\n const cbs = this.customListenersMap.get(event)\n if (cbs) {\n await Promise.allSettled(cbs.map((cb) => cb(data)))\n }\n }\n\n public clear(): void {\n this.hotModulesMap.clear()\n this.disposeMap.clear()\n this.pruneMap.clear()\n this.dataMap.clear()\n this.customListenersMap.clear()\n this.ctxToListenersMap.clear()\n }\n\n // After an HMR update, some modules are no longer imported on the page\n // but they may have left behind side effects that need to be cleaned up\n // (.e.g style injections)\n public async prunePaths(paths: string[]): Promise<void> {\n await Promise.all(\n paths.map((path) => {\n const disposer = this.disposeMap.get(path)\n if (disposer) return disposer(this.dataMap.get(path))\n }),\n )\n paths.forEach((path) => {\n const fn = this.pruneMap.get(path)\n if (fn) {\n fn(this.dataMap.get(path))\n }\n })\n }\n\n protected warnFailedUpdate(err: Error, path: string | string[]): void {\n if (!err.message.includes('fetch')) {\n this.logger.error(err)\n }\n this.logger.error(\n `[hmr] Failed to reload ${path}. ` +\n `This could be due to syntax errors or importing non-existent ` +\n `modules. (see errors above)`,\n )\n }\n\n private updateQueue: Promise<(() => void) | undefined>[] = []\n private pendingUpdateQueue = false\n\n /**\n * buffer multiple hot updates triggered by the same src change\n * so that they are invoked in the same order they were sent.\n * (otherwise the order may be inconsistent because of the http request round trip)\n */\n public async queueUpdate(payload: Update): Promise<void> {\n this.updateQueue.push(this.fetchUpdate(payload))\n if (!this.pendingUpdateQueue) {\n this.pendingUpdateQueue = true\n await Promise.resolve()\n this.pendingUpdateQueue = false\n const loading = [...this.updateQueue]\n this.updateQueue = []\n ;(await Promise.all(loading)).forEach((fn) => fn && fn())\n }\n }\n\n private async fetchUpdate(update: Update): Promise<(() => void) | undefined> {\n const { path, acceptedPath } = update\n const mod = this.hotModulesMap.get(path)\n if (!mod) {\n // In a code-splitting project,\n // it is common that the hot-updating module is not loaded yet.\n // https://github.com/vitejs/vite/issues/721\n return\n }\n\n let fetchedModule: ModuleNamespace | undefined\n const isSelfUpdate = path === acceptedPath\n\n // determine the qualified callbacks before we re-import the modules\n const qualifiedCallbacks = mod.callbacks.filter(({ deps }) =>\n deps.includes(acceptedPath),\n )\n\n if (isSelfUpdate || qualifiedCallbacks.length > 0) {\n const disposer = this.disposeMap.get(acceptedPath)\n if (disposer) await disposer(this.dataMap.get(acceptedPath))\n try {\n fetchedModule = await this.importUpdatedModule(update)\n } catch (e) {\n this.warnFailedUpdate(e, acceptedPath)\n }\n }\n\n return () => {\n for (const { deps, fn } of qualifiedCallbacks) {\n fn(\n deps.map((dep) => (dep === acceptedPath ? fetchedModule : undefined)),\n )\n }\n const loggedPath = isSelfUpdate ? path : `${acceptedPath} via ${path}`\n this.logger.debug(`[vite] hot updated: ${loggedPath}`)\n }\n }\n}\n","import type { ErrorPayload } from 'types/hmrPayload'\n\n// injected by the hmr plugin when served\ndeclare const __BASE__: string\ndeclare const __HMR_CONFIG_NAME__: string\n\nconst hmrConfigName = __HMR_CONFIG_NAME__\nconst base = __BASE__ || '/'\n\n// Create an element with provided attributes and optional children\nfunction h(\n e: string,\n attrs: Record<string, string> = {},\n ...children: (string | Node)[]\n) {\n const elem = document.createElement(e)\n for (const [k, v] of Object.entries(attrs)) {\n elem.setAttribute(k, v)\n }\n elem.append(...children)\n return elem\n}\n\n// set :host styles to make playwright detect the element as visible\nconst templateStyle = /*css*/ `\n:host {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 99999;\n --monospace: 'SFMono-Regular', Consolas,\n 'Liberation Mono', Menlo, Courier, monospace;\n --red: #ff5555;\n --yellow: #e2aa53;\n --purple: #cfa4ff;\n --cyan: #2dd9da;\n --dim: #c9c9c9;\n\n --window-background: #181818;\n --window-color: #d8d8d8;\n}\n\n.backdrop {\n position: fixed;\n z-index: 99999;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-y: scroll;\n margin: 0;\n background: rgba(0, 0, 0, 0.66);\n}\n\n.window {\n font-family: var(--monospace);\n line-height: 1.5;\n max-width: 80vw;\n color: var(--window-color);\n box-sizing: border-box;\n margin: 30px auto;\n padding: 2.5vh 4vw;\n position: relative;\n background: var(--window-background);\n border-radius: 6px 6px 8px 8px;\n box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\n overflow: hidden;\n border-top: 8px solid var(--red);\n direction: ltr;\n text-align: left;\n}\n\npre {\n font-family: var(--monospace);\n font-size: 16px;\n margin-top: 0;\n margin-bottom: 1em;\n overflow-x: scroll;\n scrollbar-width: none;\n}\n\npre::-webkit-scrollbar {\n display: none;\n}\n\npre.frame::-webkit-scrollbar {\n display: block;\n height: 5px;\n}\n\npre.frame::-webkit-scrollbar-thumb {\n background: #999;\n border-radius: 5px;\n}\n\npre.frame {\n scrollbar-width: thin;\n}\n\n.message {\n line-height: 1.3;\n font-weight: 600;\n white-space: pre-wrap;\n}\n\n.message-body {\n color: var(--red);\n}\n\n.plugin {\n color: var(--purple);\n}\n\n.file {\n color: var(--cyan);\n margin-bottom: 0;\n white-space: pre-wrap;\n word-break: break-all;\n}\n\n.frame {\n color: var(--yellow);\n}\n\n.stack {\n font-size: 13px;\n color: var(--dim);\n}\n\n.tip {\n font-size: 13px;\n color: #999;\n border-top: 1px dotted #999;\n padding-top: 13px;\n line-height: 1.8;\n}\n\ncode {\n font-size: 13px;\n font-family: var(--monospace);\n color: var(--yellow);\n}\n\n.file-link {\n text-decoration: underline;\n cursor: pointer;\n}\n\nkbd {\n line-height: 1.5;\n font-family: ui-monospace, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n font-size: 0.75rem;\n font-weight: 700;\n background-color: rgb(38, 40, 44);\n color: rgb(166, 167, 171);\n padding: 0.15rem 0.3rem;\n border-radius: 0.25rem;\n border-width: 0.0625rem 0.0625rem 0.1875rem;\n border-style: solid;\n border-color: rgb(54, 57, 64);\n border-image: initial;\n}\n`\n\n// Error Template\nconst template = h(\n 'div',\n { class: 'backdrop', part: 'backdrop' },\n h(\n 'div',\n { class: 'window', part: 'window' },\n h(\n 'pre',\n { class: 'message', part: 'message' },\n h('span', { class: 'plugin', part: 'plugin' }),\n h('span', { class: 'message-body', part: 'message-body' }),\n ),\n h('pre', { class: 'file', part: 'file' }),\n h('pre', { class: 'frame', part: 'frame' }),\n h('pre', { class: 'stack', part: 'stack' }),\n h(\n 'div',\n { class: 'tip', part: 'tip' },\n 'Click outside, press ',\n h('kbd', {}, 'Esc'),\n ' key, or fix the code to dismiss.',\n h('br'),\n 'You can also disable this overlay by setting ',\n h('code', { part: 'config-option-name' }, 'server.hmr.overlay'),\n ' to ',\n h('code', { part: 'config-option-value' }, 'false'),\n ' in ',\n h('code', { part: 'config-file-name' }, hmrConfigName),\n '.',\n ),\n ),\n h('style', {}, templateStyle),\n)\n\nconst fileRE = /(?:[a-zA-Z]:\\\\|\\/).*?:\\d+:\\d+/g\nconst codeframeRE = /^(?:>?\\s*\\d+\\s+\\|.*|\\s+\\|\\s*\\^.*)\\r?\\n/gm\n\n// Allow `ErrorOverlay` to extend `HTMLElement` even in environments where\n// `HTMLElement` was not originally defined.\nconst { HTMLElement = class {} as typeof globalThis.HTMLElement } = globalThis\nexport class ErrorOverlay extends HTMLElement {\n root: ShadowRoot\n closeOnEsc: (e: KeyboardEvent) => void\n\n constructor(err: ErrorPayload['err'], links = true) {\n super()\n this.root = this.attachShadow({ mode: 'open' })\n\n this.root.appendChild(template)\n\n codeframeRE.lastIndex = 0\n const hasFrame = err.frame && codeframeRE.test(err.frame)\n const message = hasFrame\n ? err.message.replace(codeframeRE, '')\n : err.message\n if (err.plugin) {\n this.text('.plugin', `[plugin:${err.plugin}] `)\n }\n this.text('.message-body', message.trim())\n\n const [file] = (err.loc?.file || err.id || 'unknown file').split(`?`)\n if (err.loc) {\n this.text('.file', `${file}:${err.loc.line}:${err.loc.column}`, links)\n } else if (err.id) {\n this.text('.file', file)\n }\n\n if (hasFrame) {\n this.text('.frame', err.frame!.trim())\n }\n this.text('.stack', err.stack, links)\n\n this.root.querySelector('.window')!.addEventListener('click', (e) => {\n e.stopPropagation()\n })\n\n this.addEventListener('click', () => {\n this.close()\n })\n\n this.closeOnEsc = (e: KeyboardEvent) => {\n if (e.key === 'Escape' || e.code === 'Escape') {\n this.close()\n }\n }\n\n document.addEventListener('keydown', this.closeOnEsc)\n }\n\n text(selector: string, text: string, linkFiles = false): void {\n const el = this.root.querySelector(selector)!\n if (!linkFiles) {\n el.textContent = text\n } else {\n let curIndex = 0\n let match: RegExpExecArray | null\n fileRE.lastIndex = 0\n while ((match = fileRE.exec(text))) {\n const { 0: file, index } = match\n if (index != null) {\n const frag = text.slice(curIndex, index)\n el.appendChild(document.createTextNode(frag))\n const link = document.createElement('a')\n link.textContent = file\n link.className = 'file-link'\n link.onclick = () => {\n fetch(\n new URL(\n `${base}__open-in-editor?file=${encodeURIComponent(file)}`,\n import.meta.url,\n ),\n )\n }\n el.appendChild(link)\n curIndex += frag.length + file.length\n }\n }\n }\n }\n close(): void {\n this.parentNode?.removeChild(this)\n document.removeEventListener('keydown', this.closeOnEsc)\n }\n}\n\nexport const overlayId = 'vite-error-overlay'\nconst { customElements } = globalThis // Ensure `customElements` is defined before the next line.\nif (customElements && !customElements.get(overlayId)) {\n customElements.define(overlayId, ErrorOverlay)\n}\n","import type { ErrorPayload, HMRPayload } from 'types/hmrPayload'\nimport type { ViteHotContext } from 'types/hot'\nimport type { InferCustomEventPayload } from 'types/customEvent'\nimport { HMRClient, HMRContext } from '../shared/hmr'\nimport { ErrorOverlay, overlayId } from './overlay'\nimport '@vite/env'\n\n// injected by the hmr plugin when served\ndeclare const __BASE__: string\ndeclare const __SERVER_HOST__: string\ndeclare const __HMR_PROTOCOL__: string | null\ndeclare const __HMR_HOSTNAME__: string | null\ndeclare const __HMR_PORT__: number | null\ndeclare const __HMR_DIRECT_TARGET__: string\ndeclare const __HMR_BASE__: string\ndeclare const __HMR_TIMEOUT__: number\ndeclare const __HMR_ENABLE_OVERLAY__: boolean\n\nconsole.debug('[vite] connecting...')\n\nconst importMetaUrl = new URL(import.meta.url)\n\n// use server configuration, then fallback to inference\nconst serverHost = __SERVER_HOST__\nconst socketProtocol =\n __HMR_PROTOCOL__ || (importMetaUrl.protocol === 'https:' ? 'wss' : 'ws')\nconst hmrPort = __HMR_PORT__\nconst socketHost = `${__HMR_HOSTNAME__ || importMetaUrl.hostname}:${\n hmrPort || importMetaUrl.port\n}${__HMR_BASE__}`\nconst directSocketHost = __HMR_DIRECT_TARGET__\nconst base = __BASE__ || '/'\n\nlet socket: WebSocket\ntry {\n let fallback: (() => void) | undefined\n // only use fallback when port is inferred to prevent confusion\n if (!hmrPort) {\n fallback = () => {\n // fallback to connecting directly to the hmr server\n // for servers which does not support proxying websocket\n socket = setupWebSocket(socketProtocol, directSocketHost, () => {\n const currentScriptHostURL = new URL(import.meta.url)\n const currentScriptHost =\n currentScriptHostURL.host +\n currentScriptHostURL.pathname.replace(/@vite\\/client$/, '')\n console.error(\n '[vite] failed to connect to websocket.\\n' +\n 'your current setup:\\n' +\n ` (browser) ${currentScriptHost} <--[HTTP]--> ${serverHost} (server)\\n` +\n ` (browser) ${socketHost} <--[WebSocket (failing)]--> ${directSocketHost} (server)\\n` +\n 'Check out your Vite / network configuration and https://vitejs.dev/config/server-options.html#server-hmr .',\n )\n })\n socket.addEventListener(\n 'open',\n () => {\n console.info(\n '[vite] Direct websocket connection fallback. Check out https://vitejs.dev/config/server-options.html#server-hmr to remove the previous connection error.',\n )\n },\n { once: true },\n )\n }\n }\n\n socket = setupWebSocket(socketProtocol, socketHost, fallback)\n} catch (error) {\n console.error(`[vite] failed to connect to websocket (${error}). `)\n}\n\nfunction setupWebSocket(\n protocol: string,\n hostAndPath: string,\n onCloseWithoutOpen?: () => void,\n) {\n const socket = new WebSocket(`${protocol}://${hostAndPath}`, 'vite-hmr')\n let isOpened = false\n\n socket.addEventListener(\n 'open',\n () => {\n isOpened = true\n notifyListeners('vite:ws:connect', { webSocket: socket })\n },\n { once: true },\n )\n\n // Listen for messages\n socket.addEventListener('message', async ({ data }) => {\n handleMessage(JSON.parse(data))\n })\n\n // ping server\n socket.addEventListener('close', async ({ wasClean }) => {\n if (wasClean) return\n\n if (!isOpened && onCloseWithoutOpen) {\n onCloseWithoutOpen()\n return\n }\n\n notifyListeners('vite:ws:disconnect', { webSocket: socket })\n\n console.log(`[vite] server connection lost. polling for restart...`)\n await waitForSuccessfulPing(protocol, hostAndPath)\n location.reload()\n })\n\n return socket\n}\n\nfunction cleanUrl(pathname: string): string {\n const url = new URL(pathname, 'http://vitejs.dev')\n url.searchParams.delete('direct')\n return url.pathname + url.search\n}\n\nlet isFirstUpdate = true\nconst outdatedLinkTags = new WeakSet<HTMLLinkElement>()\n\nconst debounceReload = (time: number) => {\n let timer: ReturnType<typeof setTimeout> | null\n return () => {\n if (timer) {\n clearTimeout(timer)\n timer = null\n }\n timer = setTimeout(() => {\n location.reload()\n }, time)\n }\n}\nconst pageReload = debounceReload(50)\n\nconst hmrClient = new HMRClient(\n console,\n {\n isReady: () => socket && socket.readyState === 1,\n send: (message) => socket.send(message),\n },\n async function importUpdatedModule({\n acceptedPath,\n timestamp,\n explicitImportRequired,\n isWithinCircularImport,\n }) {\n const [acceptedPathWithoutQuery, query] = acceptedPath.split(`?`)\n const importPromise = import(\n /* @vite-ignore */\n base +\n acceptedPathWithoutQuery.slice(1) +\n `?${explicitImportRequired ? 'import&' : ''}t=${timestamp}${\n query ? `&${query}` : ''\n }`\n )\n if (isWithinCircularImport) {\n importPromise.catch(() => {\n console.info(\n `[hmr] ${acceptedPath} failed to apply HMR as it's within a circular import. Reloading page to reset the execution order. ` +\n `To debug and break the circular import, you can run \\`vite --debug hmr\\` to log the circular dependency path if a file change triggered it.`,\n )\n pageReload()\n })\n }\n return await importPromise\n },\n)\n\nasync function handleMessage(payload: HMRPayload) {\n switch (payload.type) {\n case 'connected':\n console.debug(`[vite] connected.`)\n hmrClient.messenger.flush()\n // proxy(nginx, docker) hmr ws maybe caused timeout,\n // so send ping package let ws keep alive.\n setInterval(() => {\n if (socket.readyState === socket.OPEN) {\n socket.send('{\"type\":\"ping\"}')\n }\n }, __HMR_TIMEOUT__)\n break\n case 'update':\n notifyListeners('vite:beforeUpdate', payload)\n // if this is the first update and there's already an error overlay, it\n // means the page opened with existing server compile error and the whole\n // module script failed to load (since one of the nested imports is 500).\n // in this case a normal update won't work and a full reload is needed.\n if (isFirstUpdate && hasErrorOverlay()) {\n window.location.reload()\n return\n } else {\n clearErrorOverlay()\n isFirstUpdate = false\n }\n await Promise.all(\n payload.updates.map(async (update): Promise<void> => {\n if (update.type === 'js-update') {\n return hmrClient.queueUpdate(update)\n }\n\n // css-update\n // this is only sent when a css file referenced with <link> is updated\n const { path, timestamp } = update\n const searchUrl = cleanUrl(path)\n // can't use querySelector with `[href*=]` here since the link may be\n // using relative paths so we need to use link.href to grab the full\n // URL for the include check.\n const el = Array.from(\n document.querySelectorAll<HTMLLinkElement>('link'),\n ).find(\n (e) =>\n !outdatedLinkTags.has(e) && cleanUrl(e.href).includes(searchUrl),\n )\n\n if (!el) {\n return\n }\n\n const newPath = `${base}${searchUrl.slice(1)}${\n searchUrl.includes('?') ? '&' : '?'\n }t=${timestamp}`\n\n // rather than swapping the href on the existing tag, we will\n // create a new link tag. Once the new stylesheet has loaded we\n // will remove the existing link tag. This removes a Flash Of\n // Unstyled Content that can occur when swapping out the tag href\n // directly, as the new stylesheet has not yet been loaded.\n return new Promise((resolve) => {\n const newLinkTag = el.cloneNode() as HTMLLinkElement\n newLinkTag.href = new URL(newPath, el.href).href\n const removeOldEl = () => {\n el.remove()\n console.debug(`[vite] css hot updated: ${searchUrl}`)\n resolve()\n }\n newLinkTag.addEventListener('load', removeOldEl)\n newLinkTag.addEventListener('error', removeOldEl)\n outdatedLinkTags.add(el)\n el.after(newLinkTag)\n })\n }),\n )\n notifyListeners('vite:afterUpdate', payload)\n break\n case 'custom': {\n notifyListeners(payload.event, payload.data)\n break\n }\n case 'full-reload':\n notifyListeners('vite:beforeFullReload', payload)\n if (payload.path && payload.path.endsWith('.html')) {\n // if html file is edited, only reload the page if the browser is\n // currently on that page.\n const pagePath = decodeURI(location.pathname)\n const payloadPath = base + payload.path.slice(1)\n if (\n pagePath === payloadPath ||\n payload.path === '/index.html' ||\n (pagePath.endsWith('/') && pagePath + 'index.html' === payloadPath)\n ) {\n pageReload()\n }\n return\n } else {\n pageReload()\n }\n break\n case 'prune':\n notifyListeners('vite:beforePrune', payload)\n await hmrClient.prunePaths(payload.paths)\n break\n case 'error': {\n notifyListeners('vite:error', payload)\n const err = payload.err\n if (enableOverlay) {\n createErrorOverlay(err)\n } else {\n console.error(\n `[vite] Internal Server Error\\n${err.message}\\n${err.stack}`,\n )\n }\n break\n }\n default: {\n const check: never = payload\n return check\n }\n }\n}\n\nfunction notifyListeners<T extends string>(\n event: T,\n data: InferCustomEventPayload<T>,\n): void\nfunction notifyListeners(event: string, data: any): void {\n hmrClient.notifyListeners(event, data)\n}\n\nconst enableOverlay = __HMR_ENABLE_OVERLAY__\n\nfunction createErrorOverlay(err: ErrorPayload['err']) {\n clearErrorOverlay()\n document.body.appendChild(new ErrorOverlay(err))\n}\n\nfunction clearErrorOverlay() {\n document.querySelectorAll<ErrorOverlay>(overlayId).forEach((n) => n.close())\n}\n\nfunction hasErrorOverlay() {\n return document.querySelectorAll(overlayId).length\n}\n\nasync function waitForSuccessfulPing(\n socketProtocol: string,\n hostAndPath: string,\n ms = 1000,\n) {\n const pingHostProtocol = socketProtocol === 'wss' ? 'https' : 'http'\n\n const ping = async () => {\n // A fetch on a websocket URL will return a successful promise with status 400,\n // but will reject a networking error.\n // When running on middleware mode, it returns status 426, and an cors error happens if mode is not no-cors\n try {\n await fetch(`${pingHostProtocol}://${hostAndPath}`, {\n mode: 'no-cors',\n headers: {\n // Custom headers won't be included in a request with no-cors so (ab)use one of the\n // safelisted headers to identify the ping request\n Accept: 'text/x-vite-ping',\n },\n })\n return true\n } catch {}\n return false\n }\n\n if (await ping()) {\n return\n }\n await wait(ms)\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (document.visibilityState === 'visible') {\n if (await ping()) {\n break\n }\n await wait(ms)\n } else {\n await waitForWindowShow()\n }\n }\n}\n\nfunction wait(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms))\n}\n\nfunction waitForWindowShow() {\n return new Promise<void>((resolve) => {\n const onChange = async () => {\n if (document.visibilityState === 'visible') {\n resolve()\n document.removeEventListener('visibilitychange', onChange)\n }\n }\n document.addEventListener('visibilitychange', onChange)\n })\n}\n\nconst sheetsMap = new Map<string, HTMLStyleElement>()\n\n// collect existing style elements that may have been inserted during SSR\n// to avoid FOUC or duplicate styles\nif ('document' in globalThis) {\n document\n .querySelectorAll<HTMLStyleElement>('style[data-vite-dev-id]')\n .forEach((el) => {\n sheetsMap.set(el.getAttribute('data-vite-dev-id')!, el)\n })\n}\n\nconst cspNonce =\n 'document' in globalThis\n ? document.querySelector<HTMLMetaElement>('meta[property=csp-nonce]')?.nonce\n : undefined\n\n// all css imports should be inserted at the same position\n// because after build it will be a single css file\nlet lastInsertedStyle: HTMLStyleElement | undefined\n\nexport function updateStyle(id: string, content: string): void {\n let style = sheetsMap.get(id)\n if (!style) {\n style = document.createElement('style')\n style.setAttribute('type', 'text/css')\n style.setAttribute('data-vite-dev-id', id)\n style.textContent = content\n if (cspNonce) {\n style.setAttribute('nonce', cspNonce)\n }\n\n if (!lastInsertedStyle) {\n document.head.appendChild(style)\n\n // reset lastInsertedStyle after async\n // because dynamically imported css will be splitted into a different file\n setTimeout(() => {\n lastInsertedStyle = undefined\n }, 0)\n } else {\n lastInsertedStyle.insertAdjacentElement('afterend', style)\n }\n lastInsertedStyle = style\n } else {\n style.textContent = content\n }\n sheetsMap.set(id, style)\n}\n\nexport function removeStyle(id: string): void {\n const style = sheetsMap.get(id)\n if (style) {\n document.head.removeChild(style)\n sheetsMap.delete(id)\n }\n}\n\nexport function createHotContext(ownerPath: string): ViteHotContext {\n return new HMRContext(hmrClient, ownerPath)\n}\n\n/**\n * urls here are dynamic import() urls that couldn't be statically analyzed\n */\nexport function injectQuery(url: string, queryToInject: string): string {\n // skip urls that won't be handled by vite\n if (url[0] !== '.' && url[0] !== '/') {\n return url\n }\n\n // can't use pathname from URL since it may be relative like ../\n const pathname = url.replace(/[?#].*$/, '')\n const { search, hash } = new URL(url, 'http://vitejs.dev')\n\n return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ''}${\n hash || ''\n }`\n}\n\nexport { ErrorOverlay }\n"],"names":["base"],"mappings":";;MAiCa,UAAU,CAAA;IAGrB,WACU,CAAA,SAAoB,EACpB,SAAiB,EAAA;QADjB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAW;QACpB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAQ;QAEzB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YACrC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,CAA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ACpC,QAAA,OAAO,GAAG,CAAA;AACX,KAAA;;IAGD,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAA;AAC3C,IAAA,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAA;IAE1D,OAAO,CAAA,EAAG,QAAQ,CAAA,CAAA,EAAI,aAAa,CAAA,EAAG,MAAM,GAAG,CAAG,CAAA,CAAA,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,CAAA,EACvE,IAAI,IAAI,EACV,CAAA,CAAE,CAAA;AACJ;;;;","x_google_ignoreList":[0,1,2]}
|
1
|
+
{"version":3,"file":"client.mjs","sources":["hmr.ts","overlay.ts","client.ts"],"sourcesContent":["import type { Update } from 'types/hmrPayload'\nimport type { ModuleNamespace, ViteHotContext } from 'types/hot'\nimport type { InferCustomEventPayload } from 'types/customEvent'\n\ntype CustomListenersMap = Map<string, ((data: any) => void)[]>\n\ninterface HotModule {\n id: string\n callbacks: HotCallback[]\n}\n\ninterface HotCallback {\n // the dependencies must be fetchable paths\n deps: string[]\n fn: (modules: Array<ModuleNamespace | undefined>) => void\n}\n\nexport interface HMRLogger {\n error(msg: string | Error): void\n debug(...msg: unknown[]): void\n}\n\nexport interface HMRConnection {\n /**\n * Checked before sending messages to the client.\n */\n isReady(): boolean\n /**\n * Send message to the client.\n */\n send(messages: string): void\n}\n\nexport class HMRContext implements ViteHotContext {\n private newListeners: CustomListenersMap\n\n constructor(\n private hmrClient: HMRClient,\n private ownerPath: string,\n ) {\n if (!hmrClient.dataMap.has(ownerPath)) {\n hmrClient.dataMap.set(ownerPath, {})\n }\n\n // when a file is hot updated, a new context is created\n // clear its stale callbacks\n const mod = hmrClient.hotModulesMap.get(ownerPath)\n if (mod) {\n mod.callbacks = []\n }\n\n // clear stale custom event listeners\n const staleListeners = hmrClient.ctxToListenersMap.get(ownerPath)\n if (staleListeners) {\n for (const [event, staleFns] of staleListeners) {\n const listeners = hmrClient.customListenersMap.get(event)\n if (listeners) {\n hmrClient.customListenersMap.set(\n event,\n listeners.filter((l) => !staleFns.includes(l)),\n )\n }\n }\n }\n\n this.newListeners = new Map()\n hmrClient.ctxToListenersMap.set(ownerPath, this.newListeners)\n }\n\n get data(): any {\n return this.hmrClient.dataMap.get(this.ownerPath)\n }\n\n accept(deps?: any, callback?: any): void {\n if (typeof deps === 'function' || !deps) {\n // self-accept: hot.accept(() => {})\n this.acceptDeps([this.ownerPath], ([mod]) => deps?.(mod))\n } else if (typeof deps === 'string') {\n // explicit deps\n this.acceptDeps([deps], ([mod]) => callback?.(mod))\n } else if (Array.isArray(deps)) {\n this.acceptDeps(deps, callback)\n } else {\n throw new Error(`invalid hot.accept() usage.`)\n }\n }\n\n // export names (first arg) are irrelevant on the client side, they're\n // extracted in the server for propagation\n acceptExports(\n _: string | readonly string[],\n callback: (data: any) => void,\n ): void {\n this.acceptDeps([this.ownerPath], ([mod]) => callback?.(mod))\n }\n\n dispose(cb: (data: any) => void): void {\n this.hmrClient.disposeMap.set(this.ownerPath, cb)\n }\n\n prune(cb: (data: any) => void): void {\n this.hmrClient.pruneMap.set(this.ownerPath, cb)\n }\n\n // Kept for backward compatibility (#11036)\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n decline(): void {}\n\n invalidate(message: string): void {\n this.hmrClient.notifyListeners('vite:invalidate', {\n path: this.ownerPath,\n message,\n })\n this.send('vite:invalidate', { path: this.ownerPath, message })\n this.hmrClient.logger.debug(\n `[vite] invalidate ${this.ownerPath}${message ? `: ${message}` : ''}`,\n )\n }\n\n on<T extends string>(\n event: T,\n cb: (payload: InferCustomEventPayload<T>) => void,\n ): void {\n const addToMap = (map: Map<string, any[]>) => {\n const existing = map.get(event) || []\n existing.push(cb)\n map.set(event, existing)\n }\n addToMap(this.hmrClient.customListenersMap)\n addToMap(this.newListeners)\n }\n\n off<T extends string>(\n event: T,\n cb: (payload: InferCustomEventPayload<T>) => void,\n ): void {\n const removeFromMap = (map: Map<string, any[]>) => {\n const existing = map.get(event)\n if (existing === undefined) {\n return\n }\n const pruned = existing.filter((l) => l !== cb)\n if (pruned.length === 0) {\n map.delete(event)\n return\n }\n map.set(event, pruned)\n }\n removeFromMap(this.hmrClient.customListenersMap)\n removeFromMap(this.newListeners)\n }\n\n send<T extends string>(event: T, data?: InferCustomEventPayload<T>): void {\n this.hmrClient.messenger.send(\n JSON.stringify({ type: 'custom', event, data }),\n )\n }\n\n private acceptDeps(\n deps: string[],\n callback: HotCallback['fn'] = () => {},\n ): void {\n const mod: HotModule = this.hmrClient.hotModulesMap.get(this.ownerPath) || {\n id: this.ownerPath,\n callbacks: [],\n }\n mod.callbacks.push({\n deps,\n fn: callback,\n })\n this.hmrClient.hotModulesMap.set(this.ownerPath, mod)\n }\n}\n\nclass HMRMessenger {\n constructor(private connection: HMRConnection) {}\n\n private queue: string[] = []\n\n public send(message: string): void {\n this.queue.push(message)\n this.flush()\n }\n\n public flush(): void {\n if (this.connection.isReady()) {\n this.queue.forEach((msg) => this.connection.send(msg))\n this.queue = []\n }\n }\n}\n\nexport class HMRClient {\n public hotModulesMap = new Map<string, HotModule>()\n public disposeMap = new Map<string, (data: any) => void | Promise<void>>()\n public pruneMap = new Map<string, (data: any) => void | Promise<void>>()\n public dataMap = new Map<string, any>()\n public customListenersMap: CustomListenersMap = new Map()\n public ctxToListenersMap = new Map<string, CustomListenersMap>()\n\n public messenger: HMRMessenger\n\n constructor(\n public logger: HMRLogger,\n connection: HMRConnection,\n // This allows implementing reloading via different methods depending on the environment\n private importUpdatedModule: (update: Update) => Promise<ModuleNamespace>,\n ) {\n this.messenger = new HMRMessenger(connection)\n }\n\n public async notifyListeners<T extends string>(\n event: T,\n data: InferCustomEventPayload<T>,\n ): Promise<void>\n public async notifyListeners(event: string, data: any): Promise<void> {\n const cbs = this.customListenersMap.get(event)\n if (cbs) {\n await Promise.allSettled(cbs.map((cb) => cb(data)))\n }\n }\n\n public clear(): void {\n this.hotModulesMap.clear()\n this.disposeMap.clear()\n this.pruneMap.clear()\n this.dataMap.clear()\n this.customListenersMap.clear()\n this.ctxToListenersMap.clear()\n }\n\n // After an HMR update, some modules are no longer imported on the page\n // but they may have left behind side effects that need to be cleaned up\n // (.e.g style injections)\n public async prunePaths(paths: string[]): Promise<void> {\n await Promise.all(\n paths.map((path) => {\n const disposer = this.disposeMap.get(path)\n if (disposer) return disposer(this.dataMap.get(path))\n }),\n )\n paths.forEach((path) => {\n const fn = this.pruneMap.get(path)\n if (fn) {\n fn(this.dataMap.get(path))\n }\n })\n }\n\n protected warnFailedUpdate(err: Error, path: string | string[]): void {\n if (!err.message.includes('fetch')) {\n this.logger.error(err)\n }\n this.logger.error(\n `[hmr] Failed to reload ${path}. ` +\n `This could be due to syntax errors or importing non-existent ` +\n `modules. (see errors above)`,\n )\n }\n\n private updateQueue: Promise<(() => void) | undefined>[] = []\n private pendingUpdateQueue = false\n\n /**\n * buffer multiple hot updates triggered by the same src change\n * so that they are invoked in the same order they were sent.\n * (otherwise the order may be inconsistent because of the http request round trip)\n */\n public async queueUpdate(payload: Update): Promise<void> {\n this.updateQueue.push(this.fetchUpdate(payload))\n if (!this.pendingUpdateQueue) {\n this.pendingUpdateQueue = true\n await Promise.resolve()\n this.pendingUpdateQueue = false\n const loading = [...this.updateQueue]\n this.updateQueue = []\n ;(await Promise.all(loading)).forEach((fn) => fn && fn())\n }\n }\n\n private async fetchUpdate(update: Update): Promise<(() => void) | undefined> {\n const { path, acceptedPath } = update\n const mod = this.hotModulesMap.get(path)\n if (!mod) {\n // In a code-splitting project,\n // it is common that the hot-updating module is not loaded yet.\n // https://github.com/vitejs/vite/issues/721\n return\n }\n\n let fetchedModule: ModuleNamespace | undefined\n const isSelfUpdate = path === acceptedPath\n\n // determine the qualified callbacks before we re-import the modules\n const qualifiedCallbacks = mod.callbacks.filter(({ deps }) =>\n deps.includes(acceptedPath),\n )\n\n if (isSelfUpdate || qualifiedCallbacks.length > 0) {\n const disposer = this.disposeMap.get(acceptedPath)\n if (disposer) await disposer(this.dataMap.get(acceptedPath))\n try {\n fetchedModule = await this.importUpdatedModule(update)\n } catch (e) {\n this.warnFailedUpdate(e, acceptedPath)\n }\n }\n\n return () => {\n for (const { deps, fn } of qualifiedCallbacks) {\n fn(\n deps.map((dep) => (dep === acceptedPath ? fetchedModule : undefined)),\n )\n }\n const loggedPath = isSelfUpdate ? path : `${acceptedPath} via ${path}`\n this.logger.debug(`[vite] hot updated: ${loggedPath}`)\n }\n }\n}\n","import type { ErrorPayload } from 'types/hmrPayload'\n\n// injected by the hmr plugin when served\ndeclare const __BASE__: string\ndeclare const __HMR_CONFIG_NAME__: string\n\nconst hmrConfigName = __HMR_CONFIG_NAME__\nconst base = __BASE__ || '/'\n\n// Create an element with provided attributes and optional children\nfunction h(\n e: string,\n attrs: Record<string, string> = {},\n ...children: (string | Node)[]\n) {\n const elem = document.createElement(e)\n for (const [k, v] of Object.entries(attrs)) {\n elem.setAttribute(k, v)\n }\n elem.append(...children)\n return elem\n}\n\n// set :host styles to make playwright detect the element as visible\nconst templateStyle = /*css*/ `\n:host {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 99999;\n --monospace: 'SFMono-Regular', Consolas,\n 'Liberation Mono', Menlo, Courier, monospace;\n --red: #ff5555;\n --yellow: #e2aa53;\n --purple: #cfa4ff;\n --cyan: #2dd9da;\n --dim: #c9c9c9;\n\n --window-background: #181818;\n --window-color: #d8d8d8;\n}\n\n.backdrop {\n position: fixed;\n z-index: 99999;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-y: scroll;\n margin: 0;\n background: rgba(0, 0, 0, 0.66);\n}\n\n.window {\n font-family: var(--monospace);\n line-height: 1.5;\n max-width: 80vw;\n color: var(--window-color);\n box-sizing: border-box;\n margin: 30px auto;\n padding: 2.5vh 4vw;\n position: relative;\n background: var(--window-background);\n border-radius: 6px 6px 8px 8px;\n box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\n overflow: hidden;\n border-top: 8px solid var(--red);\n direction: ltr;\n text-align: left;\n}\n\npre {\n font-family: var(--monospace);\n font-size: 16px;\n margin-top: 0;\n margin-bottom: 1em;\n overflow-x: scroll;\n scrollbar-width: none;\n}\n\npre::-webkit-scrollbar {\n display: none;\n}\n\npre.frame::-webkit-scrollbar {\n display: block;\n height: 5px;\n}\n\npre.frame::-webkit-scrollbar-thumb {\n background: #999;\n border-radius: 5px;\n}\n\npre.frame {\n scrollbar-width: thin;\n}\n\n.message {\n line-height: 1.3;\n font-weight: 600;\n white-space: pre-wrap;\n}\n\n.message-body {\n color: var(--red);\n}\n\n.plugin {\n color: var(--purple);\n}\n\n.file {\n color: var(--cyan);\n margin-bottom: 0;\n white-space: pre-wrap;\n word-break: break-all;\n}\n\n.frame {\n color: var(--yellow);\n}\n\n.stack {\n font-size: 13px;\n color: var(--dim);\n}\n\n.tip {\n font-size: 13px;\n color: #999;\n border-top: 1px dotted #999;\n padding-top: 13px;\n line-height: 1.8;\n}\n\ncode {\n font-size: 13px;\n font-family: var(--monospace);\n color: var(--yellow);\n}\n\n.file-link {\n text-decoration: underline;\n cursor: pointer;\n}\n\nkbd {\n line-height: 1.5;\n font-family: ui-monospace, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;\n font-size: 0.75rem;\n font-weight: 700;\n background-color: rgb(38, 40, 44);\n color: rgb(166, 167, 171);\n padding: 0.15rem 0.3rem;\n border-radius: 0.25rem;\n border-width: 0.0625rem 0.0625rem 0.1875rem;\n border-style: solid;\n border-color: rgb(54, 57, 64);\n border-image: initial;\n}\n`\n\n// Error Template\nlet template: HTMLElement\nconst createTemplate = () =>\n h(\n 'div',\n { class: 'backdrop', part: 'backdrop' },\n h(\n 'div',\n { class: 'window', part: 'window' },\n h(\n 'pre',\n { class: 'message', part: 'message' },\n h('span', { class: 'plugin', part: 'plugin' }),\n h('span', { class: 'message-body', part: 'message-body' }),\n ),\n h('pre', { class: 'file', part: 'file' }),\n h('pre', { class: 'frame', part: 'frame' }),\n h('pre', { class: 'stack', part: 'stack' }),\n h(\n 'div',\n { class: 'tip', part: 'tip' },\n 'Click outside, press ',\n h('kbd', {}, 'Esc'),\n ' key, or fix the code to dismiss.',\n h('br'),\n 'You can also disable this overlay by setting ',\n h('code', { part: 'config-option-name' }, 'server.hmr.overlay'),\n ' to ',\n h('code', { part: 'config-option-value' }, 'false'),\n ' in ',\n h('code', { part: 'config-file-name' }, hmrConfigName),\n '.',\n ),\n ),\n h('style', {}, templateStyle),\n )\n\nconst fileRE = /(?:[a-zA-Z]:\\\\|\\/).*?:\\d+:\\d+/g\nconst codeframeRE = /^(?:>?\\s*\\d+\\s+\\|.*|\\s+\\|\\s*\\^.*)\\r?\\n/gm\n\n// Allow `ErrorOverlay` to extend `HTMLElement` even in environments where\n// `HTMLElement` was not originally defined.\nconst { HTMLElement = class {} as typeof globalThis.HTMLElement } = globalThis\nexport class ErrorOverlay extends HTMLElement {\n root: ShadowRoot\n closeOnEsc: (e: KeyboardEvent) => void\n\n constructor(err: ErrorPayload['err'], links = true) {\n super()\n this.root = this.attachShadow({ mode: 'open' })\n\n template ??= createTemplate()\n this.root.appendChild(template)\n\n codeframeRE.lastIndex = 0\n const hasFrame = err.frame && codeframeRE.test(err.frame)\n const message = hasFrame\n ? err.message.replace(codeframeRE, '')\n : err.message\n if (err.plugin) {\n this.text('.plugin', `[plugin:${err.plugin}] `)\n }\n this.text('.message-body', message.trim())\n\n const [file] = (err.loc?.file || err.id || 'unknown file').split(`?`)\n if (err.loc) {\n this.text('.file', `${file}:${err.loc.line}:${err.loc.column}`, links)\n } else if (err.id) {\n this.text('.file', file)\n }\n\n if (hasFrame) {\n this.text('.frame', err.frame!.trim())\n }\n this.text('.stack', err.stack, links)\n\n this.root.querySelector('.window')!.addEventListener('click', (e) => {\n e.stopPropagation()\n })\n\n this.addEventListener('click', () => {\n this.close()\n })\n\n this.closeOnEsc = (e: KeyboardEvent) => {\n if (e.key === 'Escape' || e.code === 'Escape') {\n this.close()\n }\n }\n\n document.addEventListener('keydown', this.closeOnEsc)\n }\n\n text(selector: string, text: string, linkFiles = false): void {\n const el = this.root.querySelector(selector)!\n if (!linkFiles) {\n el.textContent = text\n } else {\n let curIndex = 0\n let match: RegExpExecArray | null\n fileRE.lastIndex = 0\n while ((match = fileRE.exec(text))) {\n const { 0: file, index } = match\n if (index != null) {\n const frag = text.slice(curIndex, index)\n el.appendChild(document.createTextNode(frag))\n const link = document.createElement('a')\n link.textContent = file\n link.className = 'file-link'\n link.onclick = () => {\n fetch(\n new URL(\n `${base}__open-in-editor?file=${encodeURIComponent(file)}`,\n import.meta.url,\n ),\n )\n }\n el.appendChild(link)\n curIndex += frag.length + file.length\n }\n }\n }\n }\n close(): void {\n this.parentNode?.removeChild(this)\n document.removeEventListener('keydown', this.closeOnEsc)\n }\n}\n\nexport const overlayId = 'vite-error-overlay'\nconst { customElements } = globalThis // Ensure `customElements` is defined before the next line.\nif (customElements && !customElements.get(overlayId)) {\n customElements.define(overlayId, ErrorOverlay)\n}\n","import type { ErrorPayload, HMRPayload } from 'types/hmrPayload'\nimport type { ViteHotContext } from 'types/hot'\nimport type { InferCustomEventPayload } from 'types/customEvent'\nimport { HMRClient, HMRContext } from '../shared/hmr'\nimport { ErrorOverlay, overlayId } from './overlay'\nimport '@vite/env'\n\n// injected by the hmr plugin when served\ndeclare const __BASE__: string\ndeclare const __SERVER_HOST__: string\ndeclare const __HMR_PROTOCOL__: string | null\ndeclare const __HMR_HOSTNAME__: string | null\ndeclare const __HMR_PORT__: number | null\ndeclare const __HMR_DIRECT_TARGET__: string\ndeclare const __HMR_BASE__: string\ndeclare const __HMR_TIMEOUT__: number\ndeclare const __HMR_ENABLE_OVERLAY__: boolean\n\nconsole.debug('[vite] connecting...')\n\nconst importMetaUrl = new URL(import.meta.url)\n\n// use server configuration, then fallback to inference\nconst serverHost = __SERVER_HOST__\nconst socketProtocol =\n __HMR_PROTOCOL__ || (importMetaUrl.protocol === 'https:' ? 'wss' : 'ws')\nconst hmrPort = __HMR_PORT__\nconst socketHost = `${__HMR_HOSTNAME__ || importMetaUrl.hostname}:${\n hmrPort || importMetaUrl.port\n}${__HMR_BASE__}`\nconst directSocketHost = __HMR_DIRECT_TARGET__\nconst base = __BASE__ || '/'\n\nlet socket: WebSocket\ntry {\n let fallback: (() => void) | undefined\n // only use fallback when port is inferred to prevent confusion\n if (!hmrPort) {\n fallback = () => {\n // fallback to connecting directly to the hmr server\n // for servers which does not support proxying websocket\n socket = setupWebSocket(socketProtocol, directSocketHost, () => {\n const currentScriptHostURL = new URL(import.meta.url)\n const currentScriptHost =\n currentScriptHostURL.host +\n currentScriptHostURL.pathname.replace(/@vite\\/client$/, '')\n console.error(\n '[vite] failed to connect to websocket.\\n' +\n 'your current setup:\\n' +\n ` (browser) ${currentScriptHost} <--[HTTP]--> ${serverHost} (server)\\n` +\n ` (browser) ${socketHost} <--[WebSocket (failing)]--> ${directSocketHost} (server)\\n` +\n 'Check out your Vite / network configuration and https://vitejs.dev/config/server-options.html#server-hmr .',\n )\n })\n socket.addEventListener(\n 'open',\n () => {\n console.info(\n '[vite] Direct websocket connection fallback. Check out https://vitejs.dev/config/server-options.html#server-hmr to remove the previous connection error.',\n )\n },\n { once: true },\n )\n }\n }\n\n socket = setupWebSocket(socketProtocol, socketHost, fallback)\n} catch (error) {\n console.error(`[vite] failed to connect to websocket (${error}). `)\n}\n\nfunction setupWebSocket(\n protocol: string,\n hostAndPath: string,\n onCloseWithoutOpen?: () => void,\n) {\n const socket = new WebSocket(`${protocol}://${hostAndPath}`, 'vite-hmr')\n let isOpened = false\n\n socket.addEventListener(\n 'open',\n () => {\n isOpened = true\n notifyListeners('vite:ws:connect', { webSocket: socket })\n },\n { once: true },\n )\n\n // Listen for messages\n socket.addEventListener('message', async ({ data }) => {\n handleMessage(JSON.parse(data))\n })\n\n // ping server\n socket.addEventListener('close', async ({ wasClean }) => {\n if (wasClean) return\n\n if (!isOpened && onCloseWithoutOpen) {\n onCloseWithoutOpen()\n return\n }\n\n notifyListeners('vite:ws:disconnect', { webSocket: socket })\n\n if (hasDocument) {\n console.log(`[vite] server connection lost. polling for restart...`)\n await waitForSuccessfulPing(protocol, hostAndPath)\n location.reload()\n }\n })\n\n return socket\n}\n\nfunction cleanUrl(pathname: string): string {\n const url = new URL(pathname, 'http://vitejs.dev')\n url.searchParams.delete('direct')\n return url.pathname + url.search\n}\n\nlet isFirstUpdate = true\nconst outdatedLinkTags = new WeakSet<HTMLLinkElement>()\n\nconst debounceReload = (time: number) => {\n let timer: ReturnType<typeof setTimeout> | null\n return () => {\n if (timer) {\n clearTimeout(timer)\n timer = null\n }\n timer = setTimeout(() => {\n location.reload()\n }, time)\n }\n}\nconst pageReload = debounceReload(50)\n\nconst hmrClient = new HMRClient(\n console,\n {\n isReady: () => socket && socket.readyState === 1,\n send: (message) => socket.send(message),\n },\n async function importUpdatedModule({\n acceptedPath,\n timestamp,\n explicitImportRequired,\n isWithinCircularImport,\n }) {\n const [acceptedPathWithoutQuery, query] = acceptedPath.split(`?`)\n const importPromise = import(\n /* @vite-ignore */\n base +\n acceptedPathWithoutQuery.slice(1) +\n `?${explicitImportRequired ? 'import&' : ''}t=${timestamp}${\n query ? `&${query}` : ''\n }`\n )\n if (isWithinCircularImport) {\n importPromise.catch(() => {\n console.info(\n `[hmr] ${acceptedPath} failed to apply HMR as it's within a circular import. Reloading page to reset the execution order. ` +\n `To debug and break the circular import, you can run \\`vite --debug hmr\\` to log the circular dependency path if a file change triggered it.`,\n )\n pageReload()\n })\n }\n return await importPromise\n },\n)\n\nasync function handleMessage(payload: HMRPayload) {\n switch (payload.type) {\n case 'connected':\n console.debug(`[vite] connected.`)\n hmrClient.messenger.flush()\n // proxy(nginx, docker) hmr ws maybe caused timeout,\n // so send ping package let ws keep alive.\n setInterval(() => {\n if (socket.readyState === socket.OPEN) {\n socket.send('{\"type\":\"ping\"}')\n }\n }, __HMR_TIMEOUT__)\n break\n case 'update':\n notifyListeners('vite:beforeUpdate', payload)\n if (hasDocument) {\n // if this is the first update and there's already an error overlay, it\n // means the page opened with existing server compile error and the whole\n // module script failed to load (since one of the nested imports is 500).\n // in this case a normal update won't work and a full reload is needed.\n if (isFirstUpdate && hasErrorOverlay()) {\n window.location.reload()\n return\n } else {\n if (enableOverlay) {\n clearErrorOverlay()\n }\n isFirstUpdate = false\n }\n }\n await Promise.all(\n payload.updates.map(async (update): Promise<void> => {\n if (update.type === 'js-update') {\n return hmrClient.queueUpdate(update)\n }\n\n // css-update\n // this is only sent when a css file referenced with <link> is updated\n const { path, timestamp } = update\n const searchUrl = cleanUrl(path)\n // can't use querySelector with `[href*=]` here since the link may be\n // using relative paths so we need to use link.href to grab the full\n // URL for the include check.\n const el = Array.from(\n document.querySelectorAll<HTMLLinkElement>('link'),\n ).find(\n (e) =>\n !outdatedLinkTags.has(e) && cleanUrl(e.href).includes(searchUrl),\n )\n\n if (!el) {\n return\n }\n\n const newPath = `${base}${searchUrl.slice(1)}${\n searchUrl.includes('?') ? '&' : '?'\n }t=${timestamp}`\n\n // rather than swapping the href on the existing tag, we will\n // create a new link tag. Once the new stylesheet has loaded we\n // will remove the existing link tag. This removes a Flash Of\n // Unstyled Content that can occur when swapping out the tag href\n // directly, as the new stylesheet has not yet been loaded.\n return new Promise((resolve) => {\n const newLinkTag = el.cloneNode() as HTMLLinkElement\n newLinkTag.href = new URL(newPath, el.href).href\n const removeOldEl = () => {\n el.remove()\n console.debug(`[vite] css hot updated: ${searchUrl}`)\n resolve()\n }\n newLinkTag.addEventListener('load', removeOldEl)\n newLinkTag.addEventListener('error', removeOldEl)\n outdatedLinkTags.add(el)\n el.after(newLinkTag)\n })\n }),\n )\n notifyListeners('vite:afterUpdate', payload)\n break\n case 'custom': {\n notifyListeners(payload.event, payload.data)\n break\n }\n case 'full-reload':\n notifyListeners('vite:beforeFullReload', payload)\n if (hasDocument) {\n if (payload.path && payload.path.endsWith('.html')) {\n // if html file is edited, only reload the page if the browser is\n // currently on that page.\n const pagePath = decodeURI(location.pathname)\n const payloadPath = base + payload.path.slice(1)\n if (\n pagePath === payloadPath ||\n payload.path === '/index.html' ||\n (pagePath.endsWith('/') && pagePath + 'index.html' === payloadPath)\n ) {\n pageReload()\n }\n return\n } else {\n pageReload()\n }\n }\n break\n case 'prune':\n notifyListeners('vite:beforePrune', payload)\n await hmrClient.prunePaths(payload.paths)\n break\n case 'error': {\n notifyListeners('vite:error', payload)\n if (hasDocument) {\n const err = payload.err\n if (enableOverlay) {\n createErrorOverlay(err)\n } else {\n console.error(\n `[vite] Internal Server Error\\n${err.message}\\n${err.stack}`,\n )\n }\n }\n break\n }\n default: {\n const check: never = payload\n return check\n }\n }\n}\n\nfunction notifyListeners<T extends string>(\n event: T,\n data: InferCustomEventPayload<T>,\n): void\nfunction notifyListeners(event: string, data: any): void {\n hmrClient.notifyListeners(event, data)\n}\n\nconst enableOverlay = __HMR_ENABLE_OVERLAY__\nconst hasDocument = 'document' in globalThis\n\nfunction createErrorOverlay(err: ErrorPayload['err']) {\n clearErrorOverlay()\n document.body.appendChild(new ErrorOverlay(err))\n}\n\nfunction clearErrorOverlay() {\n document.querySelectorAll<ErrorOverlay>(overlayId).forEach((n) => n.close())\n}\n\nfunction hasErrorOverlay() {\n return document.querySelectorAll(overlayId).length\n}\n\nasync function waitForSuccessfulPing(\n socketProtocol: string,\n hostAndPath: string,\n ms = 1000,\n) {\n const pingHostProtocol = socketProtocol === 'wss' ? 'https' : 'http'\n\n const ping = async () => {\n // A fetch on a websocket URL will return a successful promise with status 400,\n // but will reject a networking error.\n // When running on middleware mode, it returns status 426, and an cors error happens if mode is not no-cors\n try {\n await fetch(`${pingHostProtocol}://${hostAndPath}`, {\n mode: 'no-cors',\n headers: {\n // Custom headers won't be included in a request with no-cors so (ab)use one of the\n // safelisted headers to identify the ping request\n Accept: 'text/x-vite-ping',\n },\n })\n return true\n } catch {}\n return false\n }\n\n if (await ping()) {\n return\n }\n await wait(ms)\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (document.visibilityState === 'visible') {\n if (await ping()) {\n break\n }\n await wait(ms)\n } else {\n await waitForWindowShow()\n }\n }\n}\n\nfunction wait(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms))\n}\n\nfunction waitForWindowShow() {\n return new Promise<void>((resolve) => {\n const onChange = async () => {\n if (document.visibilityState === 'visible') {\n resolve()\n document.removeEventListener('visibilitychange', onChange)\n }\n }\n document.addEventListener('visibilitychange', onChange)\n })\n}\n\nconst sheetsMap = new Map<string, HTMLStyleElement>()\n\n// collect existing style elements that may have been inserted during SSR\n// to avoid FOUC or duplicate styles\nif ('document' in globalThis) {\n document\n .querySelectorAll<HTMLStyleElement>('style[data-vite-dev-id]')\n .forEach((el) => {\n sheetsMap.set(el.getAttribute('data-vite-dev-id')!, el)\n })\n}\n\nconst cspNonce =\n 'document' in globalThis\n ? document.querySelector<HTMLMetaElement>('meta[property=csp-nonce]')?.nonce\n : undefined\n\n// all css imports should be inserted at the same position\n// because after build it will be a single css file\nlet lastInsertedStyle: HTMLStyleElement | undefined\n\nexport function updateStyle(id: string, content: string): void {\n let style = sheetsMap.get(id)\n if (!style) {\n style = document.createElement('style')\n style.setAttribute('type', 'text/css')\n style.setAttribute('data-vite-dev-id', id)\n style.textContent = content\n if (cspNonce) {\n style.setAttribute('nonce', cspNonce)\n }\n\n if (!lastInsertedStyle) {\n document.head.appendChild(style)\n\n // reset lastInsertedStyle after async\n // because dynamically imported css will be splitted into a different file\n setTimeout(() => {\n lastInsertedStyle = undefined\n }, 0)\n } else {\n lastInsertedStyle.insertAdjacentElement('afterend', style)\n }\n lastInsertedStyle = style\n } else {\n style.textContent = content\n }\n sheetsMap.set(id, style)\n}\n\nexport function removeStyle(id: string): void {\n const style = sheetsMap.get(id)\n if (style) {\n document.head.removeChild(style)\n sheetsMap.delete(id)\n }\n}\n\nexport function createHotContext(ownerPath: string): ViteHotContext {\n return new HMRContext(hmrClient, ownerPath)\n}\n\n/**\n * urls here are dynamic import() urls that couldn't be statically analyzed\n */\nexport function injectQuery(url: string, queryToInject: string): string {\n // skip urls that won't be handled by vite\n if (url[0] !== '.' && url[0] !== '/') {\n return url\n }\n\n // can't use pathname from URL since it may be relative like ../\n const pathname = url.replace(/[?#].*$/, '')\n const { search, hash } = new URL(url, 'http://vitejs.dev')\n\n return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ''}${\n hash || ''\n }`\n}\n\nexport { ErrorOverlay }\n"],"names":["base"],"mappings":";;MAiCa,UAAU,CAAA;IAGrB,WACU,CAAA,SAAoB,EACpB,SAAiB,EAAA;QADjB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAW;QACpB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAQ;QAEzB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YACrC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC,CAAA;AACrC,SAAA;;;QAID,MAAM,GAAG,GAAG,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;AAClD,QAAA,IAAI,GAAG,EAAE;AACP,YAAA,GAAG,CAAC,SAAS,GAAG,EAAE,CAAA;AACnB,SAAA;;QAGD,MAAM,cAAc,GAAG,SAAS,CAAC,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;AACjE,QAAA,IAAI,cAAc,EAAE;YAClB,KAAK,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,cAAc,EAAE;gBAC9C,MAAM,SAAS,GAAG,SAAS,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;AACzD,gBAAA,IAAI,SAAS,EAAE;oBACb,SAAS,CAAC,kBAAkB,CAAC,GAAG,CAC9B,KAAK,EACL,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,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AI,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAA;IAE1D,OAAO,CAAA,EAAG,QAAQ,CAAA,CAAA,EAAI,aAAa,CAAA,EAAG,MAAM,GAAG,CAAG,CAAA,CAAA,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,CAAA,EACvE,IAAI,IAAI,EACV,CAAA,CAAE,CAAA;AACJ;;;;","x_google_ignoreList":[0,1,2]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-
|
1
|
+
import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-whKeNLxG.js';
|
2
2
|
import require$$0__default from 'fs';
|
3
3
|
import require$$0 from 'postcss';
|
4
4
|
import require$$0$1 from 'path';
|
@@ -2116,7 +2116,7 @@ function interpolateName$1(loaderContext, name, options = {}) {
|
|
2116
2116
|
// `hash` and `contenthash` are same in `loader-utils` context
|
2117
2117
|
// let's keep `hash` for backward compatibility
|
2118
2118
|
.replace(
|
2119
|
-
/\[(?:([
|
2119
|
+
/\[(?:([^[:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi,
|
2120
2120
|
(all, hashType, digestType, maxLength) =>
|
2121
2121
|
getHashDigest(content, hashType, digestType, parseInt(maxLength, 10))
|
2122
2122
|
);
|
@@ -9998,7 +9998,7 @@ function makeUrl(scheme, user, host, port, path, query, hash) {
|
|
9998
9998
|
type: 7 /* Absolute */,
|
9999
9999
|
};
|
10000
10000
|
}
|
10001
|
-
function parseUrl$
|
10001
|
+
function parseUrl$3(input) {
|
10002
10002
|
if (isSchemeRelativeUrl(input)) {
|
10003
10003
|
const url = parseAbsoluteUrl('http:' + input);
|
10004
10004
|
url.scheme = '';
|
@@ -10112,10 +10112,10 @@ function normalizePath$4(url, type) {
|
|
10112
10112
|
function resolve$2(input, base) {
|
10113
10113
|
if (!input && !base)
|
10114
10114
|
return '';
|
10115
|
-
const url = parseUrl$
|
10115
|
+
const url = parseUrl$3(input);
|
10116
10116
|
let inputType = url.type;
|
10117
10117
|
if (base && inputType !== 7 /* Absolute */) {
|
10118
|
-
const baseUrl = parseUrl$
|
10118
|
+
const baseUrl = parseUrl$3(base);
|
10119
10119
|
const baseType = baseUrl.type;
|
10120
10120
|
switch (inputType) {
|
10121
10121
|
case 1 /* Empty */:
|
@@ -10354,6 +10354,14 @@ class TraceMap {
|
|
10354
10354
|
function cast$2(map) {
|
10355
10355
|
return map;
|
10356
10356
|
}
|
10357
|
+
/**
|
10358
|
+
* Returns the encoded (VLQ string) form of the SourceMap's mappings field.
|
10359
|
+
*/
|
10360
|
+
function encodedMappings(map) {
|
10361
|
+
var _a;
|
10362
|
+
var _b;
|
10363
|
+
return ((_a = (_b = cast$2(map))._encoded) !== null && _a !== void 0 ? _a : (_b._encoded = encode$1(cast$2(map)._decoded)));
|
10364
|
+
}
|
10357
10365
|
/**
|
10358
10366
|
* Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
|
10359
10367
|
*/
|
@@ -10402,6 +10410,32 @@ function originalPositionFor$1(map, needle) {
|
|
10402
10410
|
const { names, resolvedSources } = map;
|
10403
10411
|
return OMapping(resolvedSources[segment[SOURCES_INDEX$1]], segment[SOURCE_LINE$1] + 1, segment[SOURCE_COLUMN$1], segment.length === 5 ? names[segment[NAMES_INDEX$1]] : null);
|
10404
10412
|
}
|
10413
|
+
/**
|
10414
|
+
* Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
|
10415
|
+
* a sourcemap, or to JSON.stringify.
|
10416
|
+
*/
|
10417
|
+
function decodedMap(map) {
|
10418
|
+
return clone(map, decodedMappings(map));
|
10419
|
+
}
|
10420
|
+
/**
|
10421
|
+
* Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
|
10422
|
+
* a sourcemap, or to JSON.stringify.
|
10423
|
+
*/
|
10424
|
+
function encodedMap(map) {
|
10425
|
+
return clone(map, encodedMappings(map));
|
10426
|
+
}
|
10427
|
+
function clone(map, mappings) {
|
10428
|
+
return {
|
10429
|
+
version: map.version,
|
10430
|
+
file: map.file,
|
10431
|
+
names: map.names,
|
10432
|
+
sourceRoot: map.sourceRoot,
|
10433
|
+
sources: map.sources,
|
10434
|
+
sourcesContent: map.sourcesContent,
|
10435
|
+
mappings,
|
10436
|
+
ignoreList: map.ignoreList || map.x_google_ignoreList,
|
10437
|
+
};
|
10438
|
+
}
|
10405
10439
|
function OMapping(source, line, column, name) {
|
10406
10440
|
return { source, line, column, name };
|
10407
10441
|
}
|
@@ -19258,10 +19292,10 @@ var string$2 = {};
|
|
19258
19292
|
|
19259
19293
|
Object.defineProperty(string$2, "__esModule", { value: true });
|
19260
19294
|
string$2.isEmpty = string$2.isString = void 0;
|
19261
|
-
function isString(input) {
|
19295
|
+
function isString$1(input) {
|
19262
19296
|
return typeof input === 'string';
|
19263
19297
|
}
|
19264
|
-
string$2.isString = isString;
|
19298
|
+
string$2.isString = isString$1;
|
19265
19299
|
function isEmpty$1(input) {
|
19266
19300
|
return input === '';
|
19267
19301
|
}
|
@@ -29291,7 +29325,7 @@ var postcssrc = /*@__PURE__*/getDefaultExportFromCjs(src$1);
|
|
29291
29325
|
|
29292
29326
|
// Copyright 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Simon Lydell
|
29293
29327
|
// License: MIT.
|
29294
|
-
var Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace;
|
29328
|
+
var HashbangComment, Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace;
|
29295
29329
|
RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]|[^\/\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;
|
29296
29330
|
Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;
|
29297
29331
|
Identifier = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;
|
@@ -29302,6 +29336,7 @@ WhiteSpace = /[\t\v\f\ufeff\p{Zs}]+/yu;
|
|
29302
29336
|
LineTerminatorSequence = /\r?\n|[\r\u2028\u2029]/y;
|
29303
29337
|
MultiLineComment = /\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y;
|
29304
29338
|
SingleLineComment = /\/\/.*/y;
|
29339
|
+
HashbangComment = /^#!.*/;
|
29305
29340
|
JSXPunctuator = /[<>.:={}]|\/(?![\/*])/y;
|
29306
29341
|
JSXIdentifier = /[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;
|
29307
29342
|
JSXString = /(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y;
|
@@ -29322,6 +29357,13 @@ var jsTokens_1 = function*(input, {jsx = false} = {}) {
|
|
29322
29357
|
braces = [];
|
29323
29358
|
parenNesting = 0;
|
29324
29359
|
postfixIncDec = false;
|
29360
|
+
if (match = HashbangComment.exec(input)) {
|
29361
|
+
yield ({
|
29362
|
+
type: "HashbangComment",
|
29363
|
+
value: match[0]
|
29364
|
+
});
|
29365
|
+
lastIndex = match[0].length;
|
29366
|
+
}
|
29325
29367
|
while (lastIndex < length) {
|
29326
29368
|
mode = stack[stack.length - 1];
|
29327
29369
|
switch (mode.tag) {
|
@@ -29697,6 +29739,10 @@ function stripLiteralJsTokens(code, options) {
|
|
29697
29739
|
continue;
|
29698
29740
|
}
|
29699
29741
|
if (token.type === "StringLiteral") {
|
29742
|
+
if (!token.closed) {
|
29743
|
+
result += token.value;
|
29744
|
+
continue;
|
29745
|
+
}
|
29700
29746
|
const body = token.value.slice(1, -1);
|
29701
29747
|
if (filter(body)) {
|
29702
29748
|
result += token.value[0] + FILL.repeat(body.length) + token.value[token.value.length - 1];
|
@@ -31185,7 +31231,10 @@ function injectNonceAttributeTagHook(config) {
|
|
31185
31231
|
(node.nodeName === 'link' &&
|
31186
31232
|
node.attrs.some((attr) => attr.name === 'rel' &&
|
31187
31233
|
parseRelAttr(attr.value).some((a) => processRelType.has(a))))) {
|
31188
|
-
|
31234
|
+
// if the closing of the start tag includes a `/`, the offset should be 2 so the nonce
|
31235
|
+
// is appended prior to the `/`
|
31236
|
+
const appendOffset = html[node.sourceCodeLocation.startTag.endOffset - 2] === '/' ? 2 : 1;
|
31237
|
+
s.appendRight(node.sourceCodeLocation.startTag.endOffset - appendOffset, ` nonce="${nonce}"`);
|
31189
31238
|
}
|
31190
31239
|
});
|
31191
31240
|
return s.toString();
|
@@ -32293,8 +32342,8 @@ function createCachedImport(imp) {
|
|
32293
32342
|
return cached;
|
32294
32343
|
};
|
32295
32344
|
}
|
32296
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
32297
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
32345
|
+
const importPostcssImport = createCachedImport(() => import('./dep-D6I3Q2TL.js').then(function (n) { return n.i; }));
|
32346
|
+
const importPostcssModules = createCachedImport(() => import('./dep-2j8ZV8Rx.js').then(function (n) { return n.i; }));
|
32298
32347
|
const importPostcss = createCachedImport(() => import('postcss'));
|
32299
32348
|
const preprocessorWorkerControllerCache = new WeakMap();
|
32300
32349
|
let alwaysFakeWorkerWorkerControllerCache;
|
@@ -33190,12 +33239,13 @@ async function compileLightningCSS(id, src, config, urlReplacer) {
|
|
33190
33239
|
switch (dep.type) {
|
33191
33240
|
case 'url':
|
33192
33241
|
if (skipUrlReplacer(dep.url)) {
|
33193
|
-
css = css.replace(dep.placeholder, dep.url);
|
33242
|
+
css = css.replace(dep.placeholder, () => dep.url);
|
33194
33243
|
break;
|
33195
33244
|
}
|
33196
33245
|
deps.add(dep.url);
|
33197
33246
|
if (urlReplacer) {
|
33198
|
-
|
33247
|
+
const replaceUrl = await urlReplacer(dep.url, id);
|
33248
|
+
css = css.replace(dep.placeholder, () => replaceUrl);
|
33199
33249
|
}
|
33200
33250
|
break;
|
33201
33251
|
default:
|
@@ -42286,7 +42336,7 @@ var debug$e = srcExports('finalhandler');
|
|
42286
42336
|
var encodeUrl = encodeurl;
|
42287
42337
|
var escapeHtml = escapeHtml_1;
|
42288
42338
|
var onFinished = onFinishedExports;
|
42289
|
-
var parseUrl$
|
42339
|
+
var parseUrl$2 = parseurlExports;
|
42290
42340
|
var statuses = statuses$1;
|
42291
42341
|
var unpipe = unpipe_1;
|
42292
42342
|
|
@@ -42490,7 +42540,7 @@ function getErrorStatusCode (err) {
|
|
42490
42540
|
|
42491
42541
|
function getResourceName (req) {
|
42492
42542
|
try {
|
42493
|
-
return parseUrl$
|
42543
|
+
return parseUrl$2.original(req).pathname
|
42494
42544
|
} catch (e) {
|
42495
42545
|
return 'resource'
|
42496
42546
|
}
|
@@ -42649,7 +42699,7 @@ var EventEmitter$3 = require$$0$5.EventEmitter;
|
|
42649
42699
|
var finalhandler = finalhandler_1;
|
42650
42700
|
var http$4 = require$$1;
|
42651
42701
|
var merge = utilsMergeExports;
|
42652
|
-
var parseUrl = parseurlExports;
|
42702
|
+
var parseUrl$1 = parseurlExports;
|
42653
42703
|
|
42654
42704
|
/**
|
42655
42705
|
* Module exports.
|
@@ -42784,7 +42834,7 @@ proto.handle = function handle(req, res, out) {
|
|
42784
42834
|
}
|
42785
42835
|
|
42786
42836
|
// route data
|
42787
|
-
var path = parseUrl(req).pathname || '/';
|
42837
|
+
var path = parseUrl$1(req).pathname || '/';
|
42788
42838
|
var route = layer.route;
|
42789
42839
|
|
42790
42840
|
// skip this layer if the route doesn't match
|
@@ -49063,6 +49113,23 @@ async function replaceDefine(code, id, define, config) {
|
|
49063
49113
|
sourcefile: id,
|
49064
49114
|
sourcemap: config.command === 'build' ? !!config.build.sourcemap : true,
|
49065
49115
|
});
|
49116
|
+
// remove esbuild's <define:...> source entries
|
49117
|
+
// since they would confuse source map remapping/collapsing which expects a single source
|
49118
|
+
if (result.map.includes('<define:')) {
|
49119
|
+
const originalMap = new TraceMap(result.map);
|
49120
|
+
if (originalMap.sources.length >= 2) {
|
49121
|
+
const sourceIndex = originalMap.sources.indexOf(id);
|
49122
|
+
const decoded = decodedMap(originalMap);
|
49123
|
+
decoded.sources = [id];
|
49124
|
+
decoded.mappings = decoded.mappings.map((segments) => segments.filter((segment) => {
|
49125
|
+
// modify and filter
|
49126
|
+
const index = segment[1];
|
49127
|
+
segment[1] = 0;
|
49128
|
+
return index === sourceIndex;
|
49129
|
+
}));
|
49130
|
+
result.map = JSON.stringify(encodedMap(new TraceMap(decoded)));
|
49131
|
+
}
|
49132
|
+
}
|
49066
49133
|
for (const marker in replacementMarkers) {
|
49067
49134
|
result.code = result.code.replaceAll(marker, replacementMarkers[marker]);
|
49068
49135
|
}
|
@@ -51428,12 +51495,10 @@ function esbuildScanPlugin(config, container, depImports, missing, entries) {
|
|
51428
51495
|
// Avoid matching the content of the comment
|
51429
51496
|
raw = raw.replace(commentRE, '<!---->');
|
51430
51497
|
const isHtml = p.endsWith('.html');
|
51431
|
-
scriptRE.lastIndex = 0;
|
51432
51498
|
let js = '';
|
51433
51499
|
let scriptId = 0;
|
51434
|
-
|
51435
|
-
|
51436
|
-
const [, openTag, content] = match;
|
51500
|
+
const matches = raw.matchAll(scriptRE);
|
51501
|
+
for (const [, openTag, content] of matches) {
|
51437
51502
|
const typeMatch = openTag.match(typeRE);
|
51438
51503
|
const type = typeMatch && (typeMatch[1] || typeMatch[2] || typeMatch[3]);
|
51439
51504
|
const langMatch = openTag.match(langRE);
|
@@ -54644,7 +54709,7 @@ function walk(root, { onIdentifier, onImportMeta, onDynamicImport }) {
|
|
54644
54709
|
identifiers.push([node, parentStack.slice(0)]);
|
54645
54710
|
}
|
54646
54711
|
}
|
54647
|
-
else if (isFunction(node)) {
|
54712
|
+
else if (isFunction$1(node)) {
|
54648
54713
|
// If it is a function declaration, it could be shadowing an import
|
54649
54714
|
// Add its name to the scope so it won't get replaced
|
54650
54715
|
if (node.type === 'FunctionDeclaration') {
|
@@ -54724,7 +54789,7 @@ function isRefIdentifier(id, parent, parentStack) {
|
|
54724
54789
|
parent.id === id)) {
|
54725
54790
|
return false;
|
54726
54791
|
}
|
54727
|
-
if (isFunction(parent)) {
|
54792
|
+
if (isFunction$1(parent)) {
|
54728
54793
|
// function declaration/expression id
|
54729
54794
|
if (parent.id === id) {
|
54730
54795
|
return false;
|
@@ -54769,7 +54834,7 @@ function isRefIdentifier(id, parent, parentStack) {
|
|
54769
54834
|
const isStaticProperty = (node) => node && node.type === 'Property' && !node.computed;
|
54770
54835
|
const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node;
|
54771
54836
|
const functionNodeTypeRE = /Function(?:Expression|Declaration)$|Method$/;
|
54772
|
-
function isFunction(node) {
|
54837
|
+
function isFunction$1(node) {
|
54773
54838
|
return functionNodeTypeRE.test(node.type);
|
54774
54839
|
}
|
54775
54840
|
const blockNodeTypeRE = /^BlockStatement$|^For(?:In|Of)?Statement$/;
|
@@ -54777,7 +54842,7 @@ function isBlock(node) {
|
|
54777
54842
|
return blockNodeTypeRE.test(node.type);
|
54778
54843
|
}
|
54779
54844
|
function findParentScope(parentStack, isVar = false) {
|
54780
|
-
return parentStack.find(isVar ? isFunction : isBlock);
|
54845
|
+
return parentStack.find(isVar ? isFunction$1 : isBlock);
|
54781
54846
|
}
|
54782
54847
|
function isInDestructuringAssignment(parent, parentStack) {
|
54783
54848
|
if (parent &&
|
@@ -62050,6 +62115,30 @@ var Writable = require$$0$7.Writable;
|
|
62050
62115
|
var assert = require$$5;
|
62051
62116
|
var debug$5 = debug_1;
|
62052
62117
|
|
62118
|
+
// Whether to use the native URL object or the legacy url module
|
62119
|
+
var useNativeURL = false;
|
62120
|
+
try {
|
62121
|
+
assert(new URL$1());
|
62122
|
+
}
|
62123
|
+
catch (error) {
|
62124
|
+
useNativeURL = error.code === "ERR_INVALID_URL";
|
62125
|
+
}
|
62126
|
+
|
62127
|
+
// URL fields to preserve in copy operations
|
62128
|
+
var preservedUrlFields = [
|
62129
|
+
"auth",
|
62130
|
+
"host",
|
62131
|
+
"hostname",
|
62132
|
+
"href",
|
62133
|
+
"path",
|
62134
|
+
"pathname",
|
62135
|
+
"port",
|
62136
|
+
"protocol",
|
62137
|
+
"query",
|
62138
|
+
"search",
|
62139
|
+
"hash",
|
62140
|
+
];
|
62141
|
+
|
62053
62142
|
// Create handlers that pass events from native requests
|
62054
62143
|
var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
|
62055
62144
|
var eventHandlers = Object.create(null);
|
@@ -62060,13 +62149,19 @@ events.forEach(function (event) {
|
|
62060
62149
|
});
|
62061
62150
|
|
62062
62151
|
// Error types with codes
|
62152
|
+
var InvalidUrlError = createErrorType(
|
62153
|
+
"ERR_INVALID_URL",
|
62154
|
+
"Invalid URL",
|
62155
|
+
TypeError
|
62156
|
+
);
|
62063
62157
|
var RedirectionError = createErrorType(
|
62064
62158
|
"ERR_FR_REDIRECTION_FAILURE",
|
62065
62159
|
"Redirected request failed"
|
62066
62160
|
);
|
62067
62161
|
var TooManyRedirectsError = createErrorType(
|
62068
62162
|
"ERR_FR_TOO_MANY_REDIRECTS",
|
62069
|
-
"Maximum number of redirects exceeded"
|
62163
|
+
"Maximum number of redirects exceeded",
|
62164
|
+
RedirectionError
|
62070
62165
|
);
|
62071
62166
|
var MaxBodyLengthExceededError = createErrorType(
|
62072
62167
|
"ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
|
@@ -62077,6 +62172,9 @@ var WriteAfterEndError = createErrorType(
|
|
62077
62172
|
"write after end"
|
62078
62173
|
);
|
62079
62174
|
|
62175
|
+
// istanbul ignore next
|
62176
|
+
var destroy = Writable.prototype.destroy || noop;
|
62177
|
+
|
62080
62178
|
// An HTTP(S) request that can be redirected
|
62081
62179
|
function RedirectableRequest(options, responseCallback) {
|
62082
62180
|
// Initialize the request
|
@@ -62098,7 +62196,13 @@ function RedirectableRequest(options, responseCallback) {
|
|
62098
62196
|
// React to responses of native requests
|
62099
62197
|
var self = this;
|
62100
62198
|
this._onNativeResponse = function (response) {
|
62101
|
-
|
62199
|
+
try {
|
62200
|
+
self._processResponse(response);
|
62201
|
+
}
|
62202
|
+
catch (cause) {
|
62203
|
+
self.emit("error", cause instanceof RedirectionError ?
|
62204
|
+
cause : new RedirectionError({ cause: cause }));
|
62205
|
+
}
|
62102
62206
|
};
|
62103
62207
|
|
62104
62208
|
// Perform the first request
|
@@ -62107,10 +62211,17 @@ function RedirectableRequest(options, responseCallback) {
|
|
62107
62211
|
RedirectableRequest.prototype = Object.create(Writable.prototype);
|
62108
62212
|
|
62109
62213
|
RedirectableRequest.prototype.abort = function () {
|
62110
|
-
|
62214
|
+
destroyRequest(this._currentRequest);
|
62215
|
+
this._currentRequest.abort();
|
62111
62216
|
this.emit("abort");
|
62112
62217
|
};
|
62113
62218
|
|
62219
|
+
RedirectableRequest.prototype.destroy = function (error) {
|
62220
|
+
destroyRequest(this._currentRequest, error);
|
62221
|
+
destroy.call(this, error);
|
62222
|
+
return this;
|
62223
|
+
};
|
62224
|
+
|
62114
62225
|
// Writes buffered data to the current native request
|
62115
62226
|
RedirectableRequest.prototype.write = function (data, encoding, callback) {
|
62116
62227
|
// Writing is not allowed if end has been called
|
@@ -62119,10 +62230,10 @@ RedirectableRequest.prototype.write = function (data, encoding, callback) {
|
|
62119
62230
|
}
|
62120
62231
|
|
62121
62232
|
// Validate input and shift parameters if necessary
|
62122
|
-
if (!(
|
62233
|
+
if (!isString(data) && !isBuffer(data)) {
|
62123
62234
|
throw new TypeError("data should be a string, Buffer or Uint8Array");
|
62124
62235
|
}
|
62125
|
-
if (
|
62236
|
+
if (isFunction(encoding)) {
|
62126
62237
|
callback = encoding;
|
62127
62238
|
encoding = null;
|
62128
62239
|
}
|
@@ -62151,11 +62262,11 @@ RedirectableRequest.prototype.write = function (data, encoding, callback) {
|
|
62151
62262
|
// Ends the current native request
|
62152
62263
|
RedirectableRequest.prototype.end = function (data, encoding, callback) {
|
62153
62264
|
// Shift parameters if necessary
|
62154
|
-
if (
|
62265
|
+
if (isFunction(data)) {
|
62155
62266
|
callback = data;
|
62156
62267
|
data = encoding = null;
|
62157
62268
|
}
|
62158
|
-
else if (
|
62269
|
+
else if (isFunction(encoding)) {
|
62159
62270
|
callback = encoding;
|
62160
62271
|
encoding = null;
|
62161
62272
|
}
|
@@ -62223,6 +62334,7 @@ RedirectableRequest.prototype.setTimeout = function (msecs, callback) {
|
|
62223
62334
|
self.removeListener("abort", clearTimer);
|
62224
62335
|
self.removeListener("error", clearTimer);
|
62225
62336
|
self.removeListener("response", clearTimer);
|
62337
|
+
self.removeListener("close", clearTimer);
|
62226
62338
|
if (callback) {
|
62227
62339
|
self.removeListener("timeout", callback);
|
62228
62340
|
}
|
@@ -62249,6 +62361,7 @@ RedirectableRequest.prototype.setTimeout = function (msecs, callback) {
|
|
62249
62361
|
this.on("abort", clearTimer);
|
62250
62362
|
this.on("error", clearTimer);
|
62251
62363
|
this.on("response", clearTimer);
|
62364
|
+
this.on("close", clearTimer);
|
62252
62365
|
|
62253
62366
|
return this;
|
62254
62367
|
};
|
@@ -62307,8 +62420,7 @@ RedirectableRequest.prototype._performRequest = function () {
|
|
62307
62420
|
var protocol = this._options.protocol;
|
62308
62421
|
var nativeProtocol = this._options.nativeProtocols[protocol];
|
62309
62422
|
if (!nativeProtocol) {
|
62310
|
-
|
62311
|
-
return;
|
62423
|
+
throw new TypeError("Unsupported protocol " + protocol);
|
62312
62424
|
}
|
62313
62425
|
|
62314
62426
|
// If specified, use the agent corresponding to the protocol
|
@@ -62318,21 +62430,26 @@ RedirectableRequest.prototype._performRequest = function () {
|
|
62318
62430
|
this._options.agent = this._options.agents[scheme];
|
62319
62431
|
}
|
62320
62432
|
|
62321
|
-
// Create the native request
|
62433
|
+
// Create the native request and set up its event handlers
|
62322
62434
|
var request = this._currentRequest =
|
62323
62435
|
nativeProtocol.request(this._options, this._onNativeResponse);
|
62324
|
-
this._currentUrl = url.format(this._options);
|
62325
|
-
|
62326
|
-
// Set up event handlers
|
62327
62436
|
request._redirectable = this;
|
62328
|
-
for (var
|
62329
|
-
request.on(
|
62437
|
+
for (var event of events) {
|
62438
|
+
request.on(event, eventHandlers[event]);
|
62330
62439
|
}
|
62331
62440
|
|
62441
|
+
// RFC7230§5.3.1: When making a request directly to an origin server, […]
|
62442
|
+
// a client MUST send only the absolute path […] as the request-target.
|
62443
|
+
this._currentUrl = /^\//.test(this._options.path) ?
|
62444
|
+
url.format(this._options) :
|
62445
|
+
// When making a request to a proxy, […]
|
62446
|
+
// a client MUST send the target URI in absolute-form […].
|
62447
|
+
this._options.path;
|
62448
|
+
|
62332
62449
|
// End a redirected request
|
62333
62450
|
// (The first request must be ended explicitly with RedirectableRequest#end)
|
62334
62451
|
if (this._isRedirect) {
|
62335
|
-
// Write the request entity and end
|
62452
|
+
// Write the request entity and end
|
62336
62453
|
var i = 0;
|
62337
62454
|
var self = this;
|
62338
62455
|
var buffers = this._requestBodyBuffers;
|
@@ -62395,15 +62512,14 @@ RedirectableRequest.prototype._processResponse = function (response) {
|
|
62395
62512
|
}
|
62396
62513
|
|
62397
62514
|
// The response is a redirect, so abort the current request
|
62398
|
-
|
62515
|
+
destroyRequest(this._currentRequest);
|
62399
62516
|
// Discard the remainder of the response to avoid waiting for data
|
62400
62517
|
response.destroy();
|
62401
62518
|
|
62402
62519
|
// RFC7231§6.4: A client SHOULD detect and intervene
|
62403
62520
|
// in cyclical redirections (i.e., "infinite" redirection loops).
|
62404
62521
|
if (++this._redirectCount > this._options.maxRedirects) {
|
62405
|
-
|
62406
|
-
return;
|
62522
|
+
throw new TooManyRedirectsError();
|
62407
62523
|
}
|
62408
62524
|
|
62409
62525
|
// Store the request headers if applicable
|
@@ -62437,38 +62553,28 @@ RedirectableRequest.prototype._processResponse = function (response) {
|
|
62437
62553
|
var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
|
62438
62554
|
|
62439
62555
|
// If the redirect is relative, carry over the host of the last request
|
62440
|
-
var currentUrlParts =
|
62556
|
+
var currentUrlParts = parseUrl(this._currentUrl);
|
62441
62557
|
var currentHost = currentHostHeader || currentUrlParts.host;
|
62442
62558
|
var currentUrl = /^\w+:/.test(location) ? this._currentUrl :
|
62443
62559
|
url.format(Object.assign(currentUrlParts, { host: currentHost }));
|
62444
62560
|
|
62445
|
-
// Determine the URL of the redirection
|
62446
|
-
var redirectUrl;
|
62447
|
-
try {
|
62448
|
-
redirectUrl = url.resolve(currentUrl, location);
|
62449
|
-
}
|
62450
|
-
catch (cause) {
|
62451
|
-
this.emit("error", new RedirectionError(cause));
|
62452
|
-
return;
|
62453
|
-
}
|
62454
|
-
|
62455
62561
|
// Create the redirected request
|
62456
|
-
|
62562
|
+
var redirectUrl = resolveUrl(location, currentUrl);
|
62563
|
+
debug$5("redirecting to", redirectUrl.href);
|
62457
62564
|
this._isRedirect = true;
|
62458
|
-
|
62459
|
-
Object.assign(this._options, redirectUrlParts);
|
62565
|
+
spreadUrlObject(redirectUrl, this._options);
|
62460
62566
|
|
62461
62567
|
// Drop confidential headers when redirecting to a less secure protocol
|
62462
62568
|
// or to a different domain that is not a superdomain
|
62463
|
-
if (
|
62464
|
-
|
62465
|
-
|
62466
|
-
!isSubdomain(
|
62467
|
-
removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
|
62569
|
+
if (redirectUrl.protocol !== currentUrlParts.protocol &&
|
62570
|
+
redirectUrl.protocol !== "https:" ||
|
62571
|
+
redirectUrl.host !== currentHost &&
|
62572
|
+
!isSubdomain(redirectUrl.host, currentHost)) {
|
62573
|
+
removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
|
62468
62574
|
}
|
62469
62575
|
|
62470
62576
|
// Evaluate the beforeRedirect callback
|
62471
|
-
if (
|
62577
|
+
if (isFunction(beforeRedirect)) {
|
62472
62578
|
var responseDetails = {
|
62473
62579
|
headers: response.headers,
|
62474
62580
|
statusCode: statusCode,
|
@@ -62478,23 +62584,12 @@ RedirectableRequest.prototype._processResponse = function (response) {
|
|
62478
62584
|
method: method,
|
62479
62585
|
headers: requestHeaders,
|
62480
62586
|
};
|
62481
|
-
|
62482
|
-
beforeRedirect(this._options, responseDetails, requestDetails);
|
62483
|
-
}
|
62484
|
-
catch (err) {
|
62485
|
-
this.emit("error", err);
|
62486
|
-
return;
|
62487
|
-
}
|
62587
|
+
beforeRedirect(this._options, responseDetails, requestDetails);
|
62488
62588
|
this._sanitizeOptions(this._options);
|
62489
62589
|
}
|
62490
62590
|
|
62491
62591
|
// Perform the redirected request
|
62492
|
-
|
62493
|
-
this._performRequest();
|
62494
|
-
}
|
62495
|
-
catch (cause) {
|
62496
|
-
this.emit("error", new RedirectionError(cause));
|
62497
|
-
}
|
62592
|
+
this._performRequest();
|
62498
62593
|
};
|
62499
62594
|
|
62500
62595
|
// Wraps the key/value object of protocols with redirect functionality
|
@@ -62514,26 +62609,19 @@ function wrap(protocols) {
|
|
62514
62609
|
|
62515
62610
|
// Executes a request, following redirects
|
62516
62611
|
function request(input, options, callback) {
|
62517
|
-
// Parse parameters
|
62518
|
-
if (
|
62519
|
-
|
62520
|
-
try {
|
62521
|
-
input = urlToOptions(new URL$1(urlStr));
|
62522
|
-
}
|
62523
|
-
catch (err) {
|
62524
|
-
/* istanbul ignore next */
|
62525
|
-
input = url.parse(urlStr);
|
62526
|
-
}
|
62612
|
+
// Parse parameters, ensuring that input is an object
|
62613
|
+
if (isURL(input)) {
|
62614
|
+
input = spreadUrlObject(input);
|
62527
62615
|
}
|
62528
|
-
else if (
|
62529
|
-
input =
|
62616
|
+
else if (isString(input)) {
|
62617
|
+
input = spreadUrlObject(parseUrl(input));
|
62530
62618
|
}
|
62531
62619
|
else {
|
62532
62620
|
callback = options;
|
62533
|
-
options = input;
|
62621
|
+
options = validateUrl(input);
|
62534
62622
|
input = { protocol: protocol };
|
62535
62623
|
}
|
62536
|
-
if (
|
62624
|
+
if (isFunction(options)) {
|
62537
62625
|
callback = options;
|
62538
62626
|
options = null;
|
62539
62627
|
}
|
@@ -62544,6 +62632,9 @@ function wrap(protocols) {
|
|
62544
62632
|
maxBodyLength: exports.maxBodyLength,
|
62545
62633
|
}, input, options);
|
62546
62634
|
options.nativeProtocols = nativeProtocols;
|
62635
|
+
if (!isString(options.host) && !isString(options.hostname)) {
|
62636
|
+
options.hostname = "::1";
|
62637
|
+
}
|
62547
62638
|
|
62548
62639
|
assert.equal(options.protocol, protocol, "protocol mismatch");
|
62549
62640
|
debug$5("options", options);
|
@@ -62566,27 +62657,57 @@ function wrap(protocols) {
|
|
62566
62657
|
return exports;
|
62567
62658
|
}
|
62568
62659
|
|
62569
|
-
/* istanbul ignore next */
|
62570
62660
|
function noop() { /* empty */ }
|
62571
62661
|
|
62572
|
-
|
62573
|
-
|
62574
|
-
|
62575
|
-
|
62576
|
-
|
62577
|
-
/* istanbul ignore next */
|
62578
|
-
urlObject.hostname.slice(1, -1) :
|
62579
|
-
urlObject.hostname,
|
62580
|
-
hash: urlObject.hash,
|
62581
|
-
search: urlObject.search,
|
62582
|
-
pathname: urlObject.pathname,
|
62583
|
-
path: urlObject.pathname + urlObject.search,
|
62584
|
-
href: urlObject.href,
|
62585
|
-
};
|
62586
|
-
if (urlObject.port !== "") {
|
62587
|
-
options.port = Number(urlObject.port);
|
62662
|
+
function parseUrl(input) {
|
62663
|
+
var parsed;
|
62664
|
+
/* istanbul ignore else */
|
62665
|
+
if (useNativeURL) {
|
62666
|
+
parsed = new URL$1(input);
|
62588
62667
|
}
|
62589
|
-
|
62668
|
+
else {
|
62669
|
+
// Ensure the URL is valid and absolute
|
62670
|
+
parsed = validateUrl(url.parse(input));
|
62671
|
+
if (!isString(parsed.protocol)) {
|
62672
|
+
throw new InvalidUrlError({ input });
|
62673
|
+
}
|
62674
|
+
}
|
62675
|
+
return parsed;
|
62676
|
+
}
|
62677
|
+
|
62678
|
+
function resolveUrl(relative, base) {
|
62679
|
+
/* istanbul ignore next */
|
62680
|
+
return useNativeURL ? new URL$1(relative, base) : parseUrl(url.resolve(base, relative));
|
62681
|
+
}
|
62682
|
+
|
62683
|
+
function validateUrl(input) {
|
62684
|
+
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
62685
|
+
throw new InvalidUrlError({ input: input.href || input });
|
62686
|
+
}
|
62687
|
+
if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) {
|
62688
|
+
throw new InvalidUrlError({ input: input.href || input });
|
62689
|
+
}
|
62690
|
+
return input;
|
62691
|
+
}
|
62692
|
+
|
62693
|
+
function spreadUrlObject(urlObject, target) {
|
62694
|
+
var spread = target || {};
|
62695
|
+
for (var key of preservedUrlFields) {
|
62696
|
+
spread[key] = urlObject[key];
|
62697
|
+
}
|
62698
|
+
|
62699
|
+
// Fix IPv6 hostname
|
62700
|
+
if (spread.hostname.startsWith("[")) {
|
62701
|
+
spread.hostname = spread.hostname.slice(1, -1);
|
62702
|
+
}
|
62703
|
+
// Ensure port is a number
|
62704
|
+
if (spread.port !== "") {
|
62705
|
+
spread.port = Number(spread.port);
|
62706
|
+
}
|
62707
|
+
// Concatenate path
|
62708
|
+
spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;
|
62709
|
+
|
62710
|
+
return spread;
|
62590
62711
|
}
|
62591
62712
|
|
62592
62713
|
function removeMatchingHeaders(regex, headers) {
|
@@ -62601,37 +62722,60 @@ function removeMatchingHeaders(regex, headers) {
|
|
62601
62722
|
undefined : String(lastValue).trim();
|
62602
62723
|
}
|
62603
62724
|
|
62604
|
-
function createErrorType(code,
|
62605
|
-
|
62725
|
+
function createErrorType(code, message, baseClass) {
|
62726
|
+
// Create constructor
|
62727
|
+
function CustomError(properties) {
|
62606
62728
|
Error.captureStackTrace(this, this.constructor);
|
62607
|
-
|
62608
|
-
|
62609
|
-
|
62610
|
-
else {
|
62611
|
-
this.message = defaultMessage + ": " + cause.message;
|
62612
|
-
this.cause = cause;
|
62613
|
-
}
|
62729
|
+
Object.assign(this, properties || {});
|
62730
|
+
this.code = code;
|
62731
|
+
this.message = this.cause ? message + ": " + this.cause.message : message;
|
62614
62732
|
}
|
62615
|
-
|
62616
|
-
|
62617
|
-
CustomError.prototype
|
62618
|
-
CustomError.prototype
|
62733
|
+
|
62734
|
+
// Attach constructor and set default properties
|
62735
|
+
CustomError.prototype = new (baseClass || Error)();
|
62736
|
+
Object.defineProperties(CustomError.prototype, {
|
62737
|
+
constructor: {
|
62738
|
+
value: CustomError,
|
62739
|
+
enumerable: false,
|
62740
|
+
},
|
62741
|
+
name: {
|
62742
|
+
value: "Error [" + code + "]",
|
62743
|
+
enumerable: false,
|
62744
|
+
},
|
62745
|
+
});
|
62619
62746
|
return CustomError;
|
62620
62747
|
}
|
62621
62748
|
|
62622
|
-
function
|
62623
|
-
for (var
|
62624
|
-
request.removeListener(
|
62749
|
+
function destroyRequest(request, error) {
|
62750
|
+
for (var event of events) {
|
62751
|
+
request.removeListener(event, eventHandlers[event]);
|
62625
62752
|
}
|
62626
62753
|
request.on("error", noop);
|
62627
|
-
request.
|
62754
|
+
request.destroy(error);
|
62628
62755
|
}
|
62629
62756
|
|
62630
62757
|
function isSubdomain(subdomain, domain) {
|
62631
|
-
|
62758
|
+
assert(isString(subdomain) && isString(domain));
|
62759
|
+
var dot = subdomain.length - domain.length - 1;
|
62632
62760
|
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
|
62633
62761
|
}
|
62634
62762
|
|
62763
|
+
function isString(value) {
|
62764
|
+
return typeof value === "string" || value instanceof String;
|
62765
|
+
}
|
62766
|
+
|
62767
|
+
function isFunction(value) {
|
62768
|
+
return typeof value === "function";
|
62769
|
+
}
|
62770
|
+
|
62771
|
+
function isBuffer(value) {
|
62772
|
+
return typeof value === "object" && ("length" in value);
|
62773
|
+
}
|
62774
|
+
|
62775
|
+
function isURL(value) {
|
62776
|
+
return URL$1 && value instanceof URL$1;
|
62777
|
+
}
|
62778
|
+
|
62635
62779
|
// Exports
|
62636
62780
|
followRedirects$1.exports = wrap({ http: http$1, https: https$1 });
|
62637
62781
|
followRedirects$1.exports.wrap = wrap;
|
@@ -64055,6 +64199,13 @@ class ModuleNode {
|
|
64055
64199
|
ssrModule = null;
|
64056
64200
|
ssrError = null;
|
64057
64201
|
lastHMRTimestamp = 0;
|
64202
|
+
/**
|
64203
|
+
* `import.meta.hot.invalidate` is called by the client.
|
64204
|
+
* If there's multiple clients, multiple `invalidate` request is received.
|
64205
|
+
* This property is used to dedupe those request to avoid multiple updates happening.
|
64206
|
+
* @internal
|
64207
|
+
*/
|
64208
|
+
lastHMRInvalidationReceived = false;
|
64058
64209
|
lastInvalidationTimestamp = 0;
|
64059
64210
|
/**
|
64060
64211
|
* If the module only needs to update its imports timestamp (e.g. within an HMR chain),
|
@@ -64179,6 +64330,7 @@ class ModuleGraph {
|
|
64179
64330
|
seen.add(mod);
|
64180
64331
|
if (isHmr) {
|
64181
64332
|
mod.lastHMRTimestamp = timestamp;
|
64333
|
+
mod.lastHMRInvalidationReceived = false;
|
64182
64334
|
}
|
64183
64335
|
else {
|
64184
64336
|
// Save the timestamp for this invalidation, so we can avoid caching the result of possible already started
|
@@ -64802,7 +64954,11 @@ async function _createServer(inlineConfig = {}, options) {
|
|
64802
64954
|
});
|
64803
64955
|
hot.on('vite:invalidate', async ({ path, message }) => {
|
64804
64956
|
const mod = moduleGraph.urlToModuleMap.get(path);
|
64805
|
-
if (mod &&
|
64957
|
+
if (mod &&
|
64958
|
+
mod.isSelfAccepting &&
|
64959
|
+
mod.lastHMRTimestamp > 0 &&
|
64960
|
+
!mod.lastHMRInvalidationReceived) {
|
64961
|
+
mod.lastHMRInvalidationReceived = true;
|
64806
64962
|
config.logger.info(colors$1.yellow(`hmr invalidate `) +
|
64807
64963
|
colors$1.dim(path) +
|
64808
64964
|
(message ? ` ${message}` : ''), { timestamp: true });
|
@@ -65488,6 +65644,7 @@ function handlePrunedModules(mods, { hot }) {
|
|
65488
65644
|
const t = Date.now();
|
65489
65645
|
mods.forEach((mod) => {
|
65490
65646
|
mod.lastHMRTimestamp = t;
|
65647
|
+
mod.lastHMRInvalidationReceived = false;
|
65491
65648
|
debugHmr?.(`[dispose] ${colors$1.dim(mod.file)}`);
|
65492
65649
|
});
|
65493
65650
|
hot.send({
|
package/dist/node/cli.js
CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
2
2
|
import fs from 'node:fs';
|
3
3
|
import { performance } from 'node:perf_hooks';
|
4
4
|
import { EventEmitter } from 'events';
|
5
|
-
import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-
|
5
|
+
import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-whKeNLxG.js';
|
6
6
|
import { VERSION } from './constants.js';
|
7
7
|
import 'node:fs/promises';
|
8
8
|
import 'node:url';
|
@@ -757,7 +757,7 @@ cli
|
|
757
757
|
filterDuplicateOptions(options);
|
758
758
|
// output structure is preserved even after bundling so require()
|
759
759
|
// is ok here
|
760
|
-
const { createServer } = await import('./chunks/dep-
|
760
|
+
const { createServer } = await import('./chunks/dep-whKeNLxG.js').then(function (n) { return n.E; });
|
761
761
|
try {
|
762
762
|
const server = await createServer({
|
763
763
|
root,
|
@@ -836,7 +836,7 @@ cli
|
|
836
836
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
837
837
|
.action(async (root, options) => {
|
838
838
|
filterDuplicateOptions(options);
|
839
|
-
const { build } = await import('./chunks/dep-
|
839
|
+
const { build } = await import('./chunks/dep-whKeNLxG.js').then(function (n) { return n.F; });
|
840
840
|
const buildOptions = cleanOptions(options);
|
841
841
|
try {
|
842
842
|
await build({
|
@@ -863,7 +863,7 @@ cli
|
|
863
863
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
864
864
|
.action(async (root, options) => {
|
865
865
|
filterDuplicateOptions(options);
|
866
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
866
|
+
const { optimizeDeps } = await import('./chunks/dep-whKeNLxG.js').then(function (n) { return n.D; });
|
867
867
|
try {
|
868
868
|
const config = await resolveConfig({
|
869
869
|
root,
|
@@ -889,7 +889,7 @@ cli
|
|
889
889
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
890
890
|
.action(async (root, options) => {
|
891
891
|
filterDuplicateOptions(options);
|
892
|
-
const { preview } = await import('./chunks/dep-
|
892
|
+
const { preview } = await import('./chunks/dep-whKeNLxG.js').then(function (n) { return n.G; });
|
893
893
|
try {
|
894
894
|
const server = await preview({
|
895
895
|
root,
|
package/dist/node/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
2
|
-
import { i as isInNodeModules, a as arraify } from './chunks/dep-
|
3
|
-
export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
2
|
+
import { i as isInNodeModules, a as arraify } from './chunks/dep-whKeNLxG.js';
|
3
|
+
export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-whKeNLxG.js';
|
4
4
|
export { VERSION as version } from './constants.js';
|
5
5
|
export { version as esbuildVersion } from 'esbuild';
|
6
6
|
import { existsSync, readFileSync } from 'node:fs';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "5.2.
|
3
|
+
"version": "5.2.8",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Evan You",
|
@@ -131,10 +131,11 @@
|
|
131
131
|
"rollup-plugin-dts": "^6.1.0",
|
132
132
|
"rollup-plugin-esbuild": "^6.1.1",
|
133
133
|
"rollup-plugin-license": "^3.3.1",
|
134
|
+
"sass": "^1.72.0",
|
134
135
|
"sirv": "^2.0.4",
|
135
136
|
"source-map-support": "^0.5.21",
|
136
137
|
"strip-ansi": "^7.1.0",
|
137
|
-
"strip-literal": "^2.
|
138
|
+
"strip-literal": "^2.1.0",
|
138
139
|
"tsconfck": "^3.0.3",
|
139
140
|
"tslib": "^2.6.2",
|
140
141
|
"types": "link:./types",
|