vite 7.1.6 → 7.1.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/README.md +1 -1
- package/bin/openChrome.js +1 -1
- package/dist/client/client.mjs +11 -11
- package/dist/node/chunks/{dep-4S5XG83Z.js → dep-0_1MO8LM.js} +1 -1
- package/dist/node/chunks/{dep-BTc4Fpfo.js → dep-BABVH4H3.js} +1 -1
- package/dist/node/chunks/{dep-BLFux7-m.js → dep-Cmz3oSY2.js} +1 -1
- package/dist/node/chunks/{dep-D5b0Zz6C.js → dep-CuuNgwUk.js} +189 -147
- package/dist/node/chunks/dep-CxADCNV7.js +4 -0
- package/dist/node/chunks/{dep-D8ZQhg7-.js → dep-DrqJEUj9.js} +1 -1
- package/dist/node/chunks/{dep-BthugQ6r.js → dep-kz7ELjGS.js} +1 -1
- package/dist/node/cli.js +5 -5
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +1 -1
- package/dist/node/module-runner.js +9 -8
- package/package.json +14 -14
- package/dist/node/chunks/dep-C7LYi1xl.js +0 -4
package/README.md
CHANGED
package/bin/openChrome.js
CHANGED
@@ -3,7 +3,7 @@ Copyright (c) 2015-present, Facebook, Inc.
|
|
3
3
|
|
4
4
|
This source code is licensed under the MIT license found in the
|
5
5
|
LICENSE file at
|
6
|
-
https://github.com/
|
6
|
+
https://github.com/facebook/create-react-app/blob/main/LICENSE
|
7
7
|
*/
|
8
8
|
|
9
9
|
/* global Application */
|
package/dist/client/client.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import "@vite/env";
|
2
2
|
|
3
|
-
//#region
|
3
|
+
//#region \0@oxc-project+runtime@0.93.0/helpers/typeof.js
|
4
4
|
function _typeof(o) {
|
5
5
|
"@babel/helpers - typeof";
|
6
6
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
@@ -11,7 +11,7 @@ function _typeof(o) {
|
|
11
11
|
}
|
12
12
|
|
13
13
|
//#endregion
|
14
|
-
//#region
|
14
|
+
//#region \0@oxc-project+runtime@0.93.0/helpers/toPrimitive.js
|
15
15
|
function toPrimitive(t, r) {
|
16
16
|
if ("object" != _typeof(t) || !t) return t;
|
17
17
|
var e = t[Symbol.toPrimitive];
|
@@ -24,14 +24,14 @@ function toPrimitive(t, r) {
|
|
24
24
|
}
|
25
25
|
|
26
26
|
//#endregion
|
27
|
-
//#region
|
27
|
+
//#region \0@oxc-project+runtime@0.93.0/helpers/toPropertyKey.js
|
28
28
|
function toPropertyKey(t) {
|
29
29
|
var i = toPrimitive(t, "string");
|
30
30
|
return "symbol" == _typeof(i) ? i : i + "";
|
31
31
|
}
|
32
32
|
|
33
33
|
//#endregion
|
34
|
-
//#region
|
34
|
+
//#region \0@oxc-project+runtime@0.93.0/helpers/defineProperty.js
|
35
35
|
function _defineProperty(e, r, t) {
|
36
36
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
37
37
|
value: t,
|
@@ -171,10 +171,10 @@ var HMRClient = class {
|
|
171
171
|
const disposer = this.disposeMap.get(path);
|
172
172
|
if (disposer) return disposer(this.dataMap.get(path));
|
173
173
|
}));
|
174
|
-
paths.
|
174
|
+
await Promise.all(paths.map((path) => {
|
175
175
|
const fn = this.pruneMap.get(path);
|
176
|
-
if (fn) fn(this.dataMap.get(path));
|
177
|
-
});
|
176
|
+
if (fn) return fn(this.dataMap.get(path));
|
177
|
+
}));
|
178
178
|
}
|
179
179
|
warnFailedUpdate(err, path) {
|
180
180
|
if (!(err instanceof Error) || !err.message.includes("fetch")) this.logger.error(err);
|
@@ -226,7 +226,7 @@ var HMRClient = class {
|
|
226
226
|
};
|
227
227
|
|
228
228
|
//#endregion
|
229
|
-
//#region ../../node_modules/.pnpm/nanoid@5.1.
|
229
|
+
//#region ../../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/non-secure/index.js
|
230
230
|
let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
231
231
|
let nanoid = (size = 21) => {
|
232
232
|
let id = "";
|
@@ -489,9 +489,10 @@ var Queue = class {
|
|
489
489
|
//#region src/client/overlay.ts
|
490
490
|
const hmrConfigName = __HMR_CONFIG_NAME__;
|
491
491
|
const base$1 = __BASE__ || "/";
|
492
|
+
const cspNonce = "document" in globalThis ? document.querySelector("meta[property=csp-nonce]")?.nonce : void 0;
|
492
493
|
function h(e, attrs = {}, ...children) {
|
493
494
|
const elem = document.createElement(e);
|
494
|
-
for (const [k, v] of Object.entries(attrs)) elem.setAttribute(k, v);
|
495
|
+
for (const [k, v] of Object.entries(attrs)) if (v !== void 0) elem.setAttribute(k, v);
|
495
496
|
elem.append(...children);
|
496
497
|
return elem;
|
497
498
|
}
|
@@ -663,7 +664,7 @@ const createTemplate = () => h("div", {
|
|
663
664
|
}), h("div", {
|
664
665
|
class: "tip",
|
665
666
|
part: "tip"
|
666
|
-
}, "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));
|
667
|
+
}, "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", { nonce: cspNonce }, templateStyle));
|
667
668
|
const fileRE = /(?:file:\/\/)?(?:[a-zA-Z]:\\|\/).*?:\d+:\d+/g;
|
668
669
|
const codeframeRE = /^(?:>?\s*\d+\s+\|.*|\s+\|\s*\^.*)\r?\n/gm;
|
669
670
|
const { HTMLElement = class {} } = globalThis;
|
@@ -1049,7 +1050,6 @@ const sheetsMap = /* @__PURE__ */ new Map();
|
|
1049
1050
|
if ("document" in globalThis) document.querySelectorAll("style[data-vite-dev-id]").forEach((el) => {
|
1050
1051
|
sheetsMap.set(el.getAttribute("data-vite-dev-id"), el);
|
1051
1052
|
});
|
1052
|
-
const cspNonce = "document" in globalThis ? document.querySelector("meta[property=csp-nonce]")?.nonce : void 0;
|
1053
1053
|
let lastInsertedStyle;
|
1054
1054
|
function updateStyle(id, content) {
|
1055
1055
|
let style = sheetsMap.get(id);
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import "./dep-SmwnYDP9.js";
|
2
|
-
import { configDefaults, defineConfig, getDefaultEnvironmentOptions, isResolvedConfig, loadConfigFromFile, resolveBaseUrl, resolveConfig, resolveDevEnvironmentOptions, sortUserPlugins } from "./dep-
|
2
|
+
import { configDefaults, defineConfig, getDefaultEnvironmentOptions, isResolvedConfig, loadConfigFromFile, resolveBaseUrl, resolveConfig, resolveDevEnvironmentOptions, sortUserPlugins } from "./dep-CuuNgwUk.js";
|
3
3
|
|
4
4
|
export { resolveConfig };
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import "./dep-SmwnYDP9.js";
|
2
|
-
import { _createServer, createServer, createServerCloseFn, resolveServerOptions, restartServerWithUrls, serverConfigDefaults } from "./dep-
|
2
|
+
import { _createServer, createServer, createServerCloseFn, resolveServerOptions, restartServerWithUrls, serverConfigDefaults } from "./dep-CuuNgwUk.js";
|
3
3
|
|
4
4
|
export { createServer };
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import "./dep-SmwnYDP9.js";
|
2
|
-
import { addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, cleanupDepsCacheStaleDirs, createIsOptimizedDepFile, createIsOptimizedDepUrl, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, isDepOptimizationDisabled, loadCachedDepOptimizationMetadata, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, runOptimizeDeps, toDiscoveredDependencies } from "./dep-
|
2
|
+
import { addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, cleanupDepsCacheStaleDirs, createIsOptimizedDepFile, createIsOptimizedDepUrl, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, isDepOptimizationDisabled, loadCachedDepOptimizationMetadata, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, runOptimizeDeps, toDiscoveredDependencies } from "./dep-CuuNgwUk.js";
|
3
3
|
|
4
4
|
export { optimizeDeps };
|
@@ -2888,14 +2888,25 @@ function partialEncodeURIPath(uri) {
|
|
2888
2888
|
const postfix = filePath !== uri ? uri.slice(filePath.length) : "";
|
2889
2889
|
return filePath.replaceAll("%", "%25") + postfix;
|
2890
2890
|
}
|
2891
|
+
function decodeURIIfPossible(input) {
|
2892
|
+
try {
|
2893
|
+
return decodeURI(input);
|
2894
|
+
} catch {
|
2895
|
+
return;
|
2896
|
+
}
|
2897
|
+
}
|
2891
2898
|
const sigtermCallbacks = /* @__PURE__ */ new Set();
|
2892
2899
|
const parentSigtermCallback = async (signal, exitCode) => {
|
2893
2900
|
await Promise.all([...sigtermCallbacks].map((cb) => cb(signal, exitCode)));
|
2894
2901
|
};
|
2902
|
+
const drain = () => {};
|
2895
2903
|
const setupSIGTERMListener = (callback) => {
|
2896
2904
|
if (sigtermCallbacks.size === 0) {
|
2897
2905
|
process.once("SIGTERM", parentSigtermCallback);
|
2898
|
-
if (process.env.CI !== "true")
|
2906
|
+
if (process.env.CI !== "true") {
|
2907
|
+
if (!process.stdin.isTTY) process.stdin.on("data", drain);
|
2908
|
+
process.stdin.on("end", parentSigtermCallback);
|
2909
|
+
}
|
2899
2910
|
}
|
2900
2911
|
sigtermCallbacks.add(callback);
|
2901
2912
|
};
|
@@ -2903,7 +2914,10 @@ const teardownSIGTERMListener = (callback) => {
|
|
2903
2914
|
sigtermCallbacks.delete(callback);
|
2904
2915
|
if (sigtermCallbacks.size === 0) {
|
2905
2916
|
process.off("SIGTERM", parentSigtermCallback);
|
2906
|
-
if (process.env.CI !== "true")
|
2917
|
+
if (process.env.CI !== "true") {
|
2918
|
+
process.stdin.off("data", drain);
|
2919
|
+
process.stdin.off("end", parentSigtermCallback);
|
2920
|
+
}
|
2907
2921
|
}
|
2908
2922
|
};
|
2909
2923
|
function getServerUrlByHost(resolvedUrls, host) {
|
@@ -6480,10 +6494,11 @@ async function reloadOnTsconfigChange(server, changedFile) {
|
|
6480
6494
|
}
|
6481
6495
|
|
6482
6496
|
//#endregion
|
6483
|
-
//#region ../../node_modules/.pnpm/artichokie@0.4.
|
6497
|
+
//#region ../../node_modules/.pnpm/artichokie@0.4.2/node_modules/artichokie/dist/index.js
|
6484
6498
|
const AsyncFunction = async function() {}.constructor;
|
6485
6499
|
const codeToDataUrl = (code) => `data:application/javascript,${encodeURIComponent(code + "\n//# sourceURL=[worker-eval(artichokie)]")}`;
|
6486
6500
|
const viteSsrDynamicImport = "__vite_ssr_dynamic_import__";
|
6501
|
+
const stackBlitzImport = "𝐢𝐦𝐩𝐨𝐫𝐭";
|
6487
6502
|
var Worker$1 = class {
|
6488
6503
|
/** @internal */
|
6489
6504
|
_isModule;
|
@@ -6718,7 +6733,7 @@ function genWorkerCode(fn, isModule, waitTimeout, parentFunctions) {
|
|
6718
6733
|
});
|
6719
6734
|
return { call: call$1 };
|
6720
6735
|
};
|
6721
|
-
const fnString = fn.toString().replaceAll(viteSsrDynamicImport, "import");
|
6736
|
+
const fnString = fn.toString().replaceAll(stackBlitzImport, "import").replaceAll(viteSsrDynamicImport, "import");
|
6722
6737
|
return `
|
6723
6738
|
${isModule ? "import { parentPort, receiveMessageOnPort, workerData } from 'worker_threads'" : "const { parentPort, receiveMessageOnPort, workerData } = require('worker_threads')"}
|
6724
6739
|
${isModule ? "import { performance } from 'node:perf_hooks'" : "const { performance } = require('node:perf_hooks')"}
|
@@ -6750,7 +6765,7 @@ parentPort.on('message', async (args) => {
|
|
6750
6765
|
})
|
6751
6766
|
`;
|
6752
6767
|
}
|
6753
|
-
const importRe = /\bimport\s*\(
|
6768
|
+
const importRe = /\bimport\s*\(/g;
|
6754
6769
|
const internalImportName = "__artichokie_local_import__";
|
6755
6770
|
var FakeWorker = class {
|
6756
6771
|
/** @internal */
|
@@ -6777,7 +6792,7 @@ var FakeWorker = class {
|
|
6777
6792
|
stop() {}
|
6778
6793
|
};
|
6779
6794
|
function genFakeWorkerArgsAndCode(fn, declareRequire, parentFunctions) {
|
6780
|
-
const fnString = fn.toString().replace(importRe, `${internalImportName}(`).replaceAll(viteSsrDynamicImport, internalImportName);
|
6795
|
+
const fnString = fn.toString().replace(importRe, `${internalImportName}(`).replaceAll(stackBlitzImport, internalImportName).replaceAll(viteSsrDynamicImport, internalImportName);
|
6781
6796
|
return [
|
6782
6797
|
...declareRequire ? ["require"] : [],
|
6783
6798
|
internalImportName,
|
@@ -7965,7 +7980,7 @@ var require_convert_source_map = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
7965
7980
|
}) });
|
7966
7981
|
|
7967
7982
|
//#endregion
|
7968
|
-
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.
|
7983
|
+
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.41/node_modules/@rolldown/pluginutils/dist/index.mjs
|
7969
7984
|
/**
|
7970
7985
|
* Constructs a RegExp that matches the exact string specified.
|
7971
7986
|
*
|
@@ -8436,8 +8451,8 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
|
|
8436
8451
|
}) });
|
8437
8452
|
|
8438
8453
|
//#endregion
|
8439
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.
|
8440
|
-
var require_req = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.
|
8454
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.6_yaml@2.8.1/node_modules/postcss-load-config/src/req.js
|
8455
|
+
var require_req = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.6_yaml@2.8.1/node_modules/postcss-load-config/src/req.js": ((exports, module) => {
|
8441
8456
|
const { createRequire: createRequire$2 } = __require("node:module");
|
8442
8457
|
const { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1 } = __require("node:url");
|
8443
8458
|
const TS_EXT_RE = /\.[mc]?ts$/;
|
@@ -8479,8 +8494,8 @@ var require_req = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss
|
|
8479
8494
|
}) });
|
8480
8495
|
|
8481
8496
|
//#endregion
|
8482
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.
|
8483
|
-
var require_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.
|
8497
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.6_yaml@2.8.1/node_modules/postcss-load-config/src/options.js
|
8498
|
+
var require_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.6_yaml@2.8.1/node_modules/postcss-load-config/src/options.js": ((exports, module) => {
|
8484
8499
|
const req$2 = require_req();
|
8485
8500
|
/**
|
8486
8501
|
* Load Options
|
@@ -8514,8 +8529,8 @@ var require_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
|
|
8514
8529
|
}) });
|
8515
8530
|
|
8516
8531
|
//#endregion
|
8517
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.
|
8518
|
-
var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.
|
8532
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.6_yaml@2.8.1/node_modules/postcss-load-config/src/plugins.js
|
8533
|
+
var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.6_yaml@2.8.1/node_modules/postcss-load-config/src/plugins.js": ((exports, module) => {
|
8519
8534
|
const req$1 = require_req();
|
8520
8535
|
/**
|
8521
8536
|
* Plugin Loader
|
@@ -8569,8 +8584,8 @@ var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
|
|
8569
8584
|
}) });
|
8570
8585
|
|
8571
8586
|
//#endregion
|
8572
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.
|
8573
|
-
var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.
|
8587
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.6_yaml@2.8.1/node_modules/postcss-load-config/src/index.js
|
8588
|
+
var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.6_yaml@2.8.1/node_modules/postcss-load-config/src/index.js": ((exports, module) => {
|
8574
8589
|
const { resolve: resolve$2 } = __require("node:path");
|
8575
8590
|
const config$1 = require_src$1();
|
8576
8591
|
const loadOptions = require_options();
|
@@ -9949,82 +9964,50 @@ var require_js_tokens = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/j
|
|
9949
9964
|
}) });
|
9950
9965
|
|
9951
9966
|
//#endregion
|
9952
|
-
//#region ../../node_modules/.pnpm/strip-literal@3.
|
9967
|
+
//#region ../../node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.mjs
|
9953
9968
|
var import_js_tokens = /* @__PURE__ */ __toESM(require_js_tokens(), 1);
|
9954
|
-
|
9955
|
-
|
9956
|
-
|
9957
|
-
|
9958
|
-
|
9959
|
-
|
9960
|
-
|
9961
|
-
|
9962
|
-
|
9963
|
-
|
9964
|
-
|
9965
|
-
}
|
9966
|
-
|
9967
|
-
|
9968
|
-
|
9969
|
-
}
|
9970
|
-
|
9971
|
-
|
9972
|
-
|
9973
|
-
|
9974
|
-
|
9975
|
-
|
9976
|
-
|
9977
|
-
|
9978
|
-
|
9979
|
-
|
9980
|
-
|
9981
|
-
if (
|
9982
|
-
|
9983
|
-
|
9984
|
-
|
9985
|
-
|
9986
|
-
}
|
9987
|
-
}
|
9988
|
-
if (token.type === "RegularExpressionLiteral") {
|
9989
|
-
const body = token.value;
|
9990
|
-
if (filter$1(body)) {
|
9991
|
-
result += body.replace(/\/(.*)\/(\w?)$/g, (_, $1, $2) => `/${FILL.repeat($1.length)}/${$2}`);
|
9992
|
-
continue;
|
9993
|
-
}
|
9994
|
-
}
|
9995
|
-
if (token.type === "TemplateHead") {
|
9996
|
-
const body = token.value.slice(1, -2);
|
9997
|
-
if (filter$1(body)) {
|
9998
|
-
result += `\`${body.replace(/[^\n]/g, FILL)}\${`;
|
9999
|
-
continue;
|
10000
|
-
}
|
10001
|
-
}
|
10002
|
-
if (token.type === "TemplateTail") {
|
10003
|
-
const body = token.value.slice(0, -2);
|
10004
|
-
if (filter$1(body)) {
|
10005
|
-
result += `}${body.replace(/[^\n]/g, FILL)}\``;
|
10006
|
-
continue;
|
10007
|
-
}
|
10008
|
-
}
|
10009
|
-
if (token.type === "TemplateMiddle") {
|
10010
|
-
const body = token.value.slice(1, -2);
|
10011
|
-
if (filter$1(body)) {
|
10012
|
-
result += `}${body.replace(/[^\n]/g, FILL)}\${`;
|
10013
|
-
continue;
|
10014
|
-
}
|
10015
|
-
}
|
10016
|
-
result += token.value;
|
10017
|
-
}
|
9969
|
+
const FILL_COMMENT = " ";
|
9970
|
+
function stripLiteralFromToken(token, fillChar, filter$1) {
|
9971
|
+
if (token.type === "SingleLineComment") return FILL_COMMENT.repeat(token.value.length);
|
9972
|
+
if (token.type === "MultiLineComment") return token.value.replace(/[^\n]/g, FILL_COMMENT);
|
9973
|
+
if (token.type === "StringLiteral") {
|
9974
|
+
if (!token.closed) return token.value;
|
9975
|
+
const body = token.value.slice(1, -1);
|
9976
|
+
if (filter$1(body)) return token.value[0] + fillChar.repeat(body.length) + token.value[token.value.length - 1];
|
9977
|
+
}
|
9978
|
+
if (token.type === "NoSubstitutionTemplate") {
|
9979
|
+
const body = token.value.slice(1, -1);
|
9980
|
+
if (filter$1(body)) return `\`${body.replace(/[^\n]/g, fillChar)}\``;
|
9981
|
+
}
|
9982
|
+
if (token.type === "RegularExpressionLiteral") {
|
9983
|
+
const body = token.value;
|
9984
|
+
if (filter$1(body)) return body.replace(/\/(.*)\/(\w?)$/g, (_, $1, $2) => `/${fillChar.repeat($1.length)}/${$2}`);
|
9985
|
+
}
|
9986
|
+
if (token.type === "TemplateHead") {
|
9987
|
+
const body = token.value.slice(1, -2);
|
9988
|
+
if (filter$1(body)) return `\`${body.replace(/[^\n]/g, fillChar)}\${`;
|
9989
|
+
}
|
9990
|
+
if (token.type === "TemplateTail") {
|
9991
|
+
const body = token.value.slice(0, -2);
|
9992
|
+
if (filter$1(body)) return `}${body.replace(/[^\n]/g, fillChar)}\``;
|
9993
|
+
}
|
9994
|
+
if (token.type === "TemplateMiddle") {
|
9995
|
+
const body = token.value.slice(1, -2);
|
9996
|
+
if (filter$1(body)) return `}${body.replace(/[^\n]/g, fillChar)}\${`;
|
9997
|
+
}
|
9998
|
+
return token.value;
|
9999
|
+
}
|
10000
|
+
function optionsWithDefaults(options$1) {
|
10018
10001
|
return {
|
10019
|
-
|
10020
|
-
|
10002
|
+
fillChar: options$1?.fillChar ?? " ",
|
10003
|
+
filter: options$1?.filter ?? (() => true)
|
10021
10004
|
};
|
10022
10005
|
}
|
10023
10006
|
function stripLiteral(code, options$1) {
|
10024
|
-
|
10025
|
-
|
10026
|
-
|
10027
|
-
return
|
10007
|
+
let result = "";
|
10008
|
+
const _options = optionsWithDefaults(options$1);
|
10009
|
+
for (const token of (0, import_js_tokens.default)(code, { jsx: false })) result += stripLiteralFromToken(token, _options.fillChar, _options.filter);
|
10010
|
+
return result;
|
10028
10011
|
}
|
10029
10012
|
|
10030
10013
|
//#endregion
|
@@ -10047,7 +10030,8 @@ function importGlobPlugin(config$2) {
|
|
10047
10030
|
const globMatchers = allGlobs.map((globs) => {
|
10048
10031
|
const affirmed = [];
|
10049
10032
|
const negated = [];
|
10050
|
-
for (const glob$1 of globs) (glob$1[0] === "!"
|
10033
|
+
for (const glob$1 of globs) if (glob$1[0] === "!") negated.push(glob$1.slice(1));
|
10034
|
+
else affirmed.push(glob$1);
|
10051
10035
|
const affirmedMatcher = picomatch(affirmed);
|
10052
10036
|
const negatedMatcher = picomatch(negated);
|
10053
10037
|
return (file) => {
|
@@ -10239,23 +10223,23 @@ async function transformGlobImport(code, id, root, resolveId, restoreQueryExtens
|
|
10239
10223
|
if (!options$1.base && isRelative$1) throw new Error("In virtual modules, all globs must start with '/'");
|
10240
10224
|
const importPath$1 = `/${relative$2(root, file)}`;
|
10241
10225
|
let filePath$1 = options$1.base ? `${relative$2(posix.join(root, options$1.base), file)}` : importPath$1;
|
10242
|
-
if (options$1.base && filePath$1
|
10226
|
+
if (options$1.base && !filePath$1.startsWith("./") && !filePath$1.startsWith("../")) filePath$1 = `./${filePath$1}`;
|
10243
10227
|
return {
|
10244
10228
|
filePath: filePath$1,
|
10245
10229
|
importPath: importPath$1
|
10246
10230
|
};
|
10247
10231
|
}
|
10248
10232
|
let importPath = relative$2(dir, file);
|
10249
|
-
if (importPath
|
10233
|
+
if (!importPath.startsWith("./") && !importPath.startsWith("../")) importPath = `./${importPath}`;
|
10250
10234
|
let filePath;
|
10251
10235
|
if (options$1.base) {
|
10252
10236
|
filePath = relative$2(posix.join(options$1.base[0] === "/" ? root : dir, options$1.base), file);
|
10253
|
-
if (filePath
|
10237
|
+
if (!filePath.startsWith("./") && !filePath.startsWith("../")) filePath = `./${filePath}`;
|
10254
10238
|
if (options$1.base[0] === "/") importPath = `/${relative$2(root, file)}`;
|
10255
10239
|
} else if (isRelative$1) filePath = importPath;
|
10256
10240
|
else {
|
10257
10241
|
filePath = relative$2(root, file);
|
10258
|
-
if (filePath
|
10242
|
+
if (!filePath.startsWith("./") && !filePath.startsWith("../")) filePath = `/${filePath}`;
|
10259
10243
|
}
|
10260
10244
|
return {
|
10261
10245
|
filePath,
|
@@ -12131,11 +12115,11 @@ function throwFileNotFoundInOptimizedDep(id) {
|
|
12131
12115
|
}
|
12132
12116
|
|
12133
12117
|
//#endregion
|
12134
|
-
//#region ../../node_modules/.pnpm/dotenv@17.2.
|
12135
|
-
var require_package = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv@17.2.
|
12118
|
+
//#region ../../node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.json
|
12119
|
+
var require_package = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/package.json": ((exports, module) => {
|
12136
12120
|
module.exports = {
|
12137
12121
|
"name": "dotenv",
|
12138
|
-
"version": "17.2.
|
12122
|
+
"version": "17.2.3",
|
12139
12123
|
"description": "Loads environment variables from .env file",
|
12140
12124
|
"main": "lib/main.js",
|
12141
12125
|
"types": "lib/main.d.ts",
|
@@ -12157,8 +12141,8 @@ var require_package = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dot
|
|
12157
12141
|
"dts-check": "tsc --project tests/types/tsconfig.json",
|
12158
12142
|
"lint": "standard",
|
12159
12143
|
"pretest": "npm run lint && npm run dts-check",
|
12160
|
-
"test": "tap run --allow-empty-coverage --disable-coverage --timeout=60000",
|
12161
|
-
"test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
|
12144
|
+
"test": "tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000",
|
12145
|
+
"test:coverage": "tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
|
12162
12146
|
"prerelease": "npm test",
|
12163
12147
|
"release": "standard-version"
|
12164
12148
|
},
|
@@ -12194,8 +12178,8 @@ var require_package = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dot
|
|
12194
12178
|
}) });
|
12195
12179
|
|
12196
12180
|
//#endregion
|
12197
|
-
//#region ../../node_modules/.pnpm/dotenv@17.2.
|
12198
|
-
var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv@17.2.
|
12181
|
+
//#region ../../node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.js
|
12182
|
+
var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv@17.2.3/node_modules/dotenv/lib/main.js": ((exports, module) => {
|
12199
12183
|
const fs$10 = __require("fs");
|
12200
12184
|
const path$10 = __require("path");
|
12201
12185
|
const os$3 = __require("os");
|
@@ -12205,9 +12189,12 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
12205
12189
|
"🔐 encrypt with Dotenvx: https://dotenvx.com",
|
12206
12190
|
"🔐 prevent committing .env to code: https://dotenvx.com/precommit",
|
12207
12191
|
"🔐 prevent building .env in docker: https://dotenvx.com/prebuild",
|
12208
|
-
"📡
|
12209
|
-
"
|
12210
|
-
"
|
12192
|
+
"📡 add observability to secrets: https://dotenvx.com/ops",
|
12193
|
+
"👥 sync secrets across teammates & machines: https://dotenvx.com/ops",
|
12194
|
+
"🗂️ backup and recover secrets: https://dotenvx.com/ops",
|
12195
|
+
"✅ audit secrets and track compliance: https://dotenvx.com/ops",
|
12196
|
+
"🔄 add secrets lifecycle management: https://dotenvx.com/ops",
|
12197
|
+
"🔑 add access controls to secrets: https://dotenvx.com/ops",
|
12211
12198
|
"🛠️ run anywhere with `dotenvx run -- yourcommand`",
|
12212
12199
|
"⚙️ specify custom .env file path with { path: '/custom/path/.env' }",
|
12213
12200
|
"⚙️ enable debug logging with { debug: true }",
|
@@ -24096,9 +24083,10 @@ function baseMiddleware(rawBase, middlewareMode) {
|
|
24096
24083
|
}
|
24097
24084
|
|
24098
24085
|
//#endregion
|
24099
|
-
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.
|
24100
|
-
var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.
|
24086
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/http-proxy/common.js
|
24087
|
+
var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/http-proxy/common.js": ((exports) => {
|
24101
24088
|
Object.defineProperty(exports, "__esModule", { value: true });
|
24089
|
+
exports.isSSL = void 0;
|
24102
24090
|
exports.setupOutgoing = setupOutgoing;
|
24103
24091
|
exports.setupSocket = setupSocket;
|
24104
24092
|
exports.getPort = getPort;
|
@@ -24233,8 +24221,8 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http
|
|
24233
24221
|
}) });
|
24234
24222
|
|
24235
24223
|
//#endregion
|
24236
|
-
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.
|
24237
|
-
var require_web_outgoing = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.
|
24224
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js
|
24225
|
+
var require_web_outgoing = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js": ((exports) => {
|
24238
24226
|
var __createBinding$3 = exports && exports.__createBinding || (Object.create ? (function(o$1, m$2, k, k2) {
|
24239
24227
|
if (k2 === void 0) k2 = k;
|
24240
24228
|
var desc = Object.getOwnPropertyDescriptor(m$2, k);
|
@@ -24284,8 +24272,8 @@ var require_web_outgoing = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
24284
24272
|
exports.writeStatusCode = writeStatusCode;
|
24285
24273
|
const common$2 = __importStar$3(require_common());
|
24286
24274
|
const redirectRegex = /^201|30(1|2|7|8)$/;
|
24287
|
-
function removeChunked(
|
24288
|
-
|
24275
|
+
function removeChunked(_req, _res, proxyRes) {
|
24276
|
+
delete proxyRes.headers["transfer-encoding"];
|
24289
24277
|
}
|
24290
24278
|
function setConnection(req$4, _res, proxyRes) {
|
24291
24279
|
if (req$4.httpVersion === "1.0") proxyRes.headers["connection"] = req$4.headers["connection"] || "close";
|
@@ -24345,8 +24333,8 @@ var require_web_outgoing = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
24345
24333
|
}) });
|
24346
24334
|
|
24347
24335
|
//#endregion
|
24348
|
-
//#region ../../node_modules/.pnpm/follow-redirects@1.15.
|
24349
|
-
var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.
|
24336
|
+
//#region ../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/debug.js
|
24337
|
+
var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/debug.js": ((exports, module) => {
|
24350
24338
|
var debug$7;
|
24351
24339
|
module.exports = function() {
|
24352
24340
|
if (!debug$7) {
|
@@ -24360,8 +24348,8 @@ var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follo
|
|
24360
24348
|
}) });
|
24361
24349
|
|
24362
24350
|
//#endregion
|
24363
|
-
//#region ../../node_modules/.pnpm/follow-redirects@1.15.
|
24364
|
-
var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.
|
24351
|
+
//#region ../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/index.js
|
24352
|
+
var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/index.js": ((exports, module) => {
|
24365
24353
|
var url = __require("url");
|
24366
24354
|
var URL$2 = url.URL;
|
24367
24355
|
var http$3 = __require("http");
|
@@ -24791,8 +24779,8 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
24791
24779
|
}) });
|
24792
24780
|
|
24793
24781
|
//#endregion
|
24794
|
-
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.
|
24795
|
-
var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.
|
24782
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js
|
24783
|
+
var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js": ((exports) => {
|
24796
24784
|
var __createBinding$2 = exports && exports.__createBinding || (Object.create ? (function(o$1, m$2, k, k2) {
|
24797
24785
|
if (k2 === void 0) k2 = k;
|
24798
24786
|
var desc = Object.getOwnPropertyDescriptor(m$2, k);
|
@@ -24841,10 +24829,10 @@ var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
24841
24829
|
exports.stream = stream$1;
|
24842
24830
|
const http$2 = __importStar$2(__require("node:http"));
|
24843
24831
|
const https$2 = __importStar$2(__require("node:https"));
|
24844
|
-
const web_outgoing_1 = require_web_outgoing();
|
24832
|
+
const web_outgoing_1$1 = require_web_outgoing();
|
24845
24833
|
const common$1 = __importStar$2(require_common());
|
24846
24834
|
const followRedirects = __importStar$2(require_follow_redirects());
|
24847
|
-
const web_o = Object.values(web_outgoing_1.OUTGOING_PASSES);
|
24835
|
+
const web_o$1 = Object.values(web_outgoing_1$1.OUTGOING_PASSES);
|
24848
24836
|
const nativeAgents = {
|
24849
24837
|
http: http$2,
|
24850
24838
|
https: https$2
|
@@ -24917,7 +24905,7 @@ var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
24917
24905
|
(options$1.buffer || req$4).pipe(proxyReq);
|
24918
24906
|
proxyReq.on("response", (proxyRes) => {
|
24919
24907
|
server?.emit("proxyRes", proxyRes, req$4, res);
|
24920
|
-
if (!res.headersSent && !options$1.selfHandleResponse) for (const pass of web_o) pass(req$4, res, proxyRes, options$1);
|
24908
|
+
if (!res.headersSent && !options$1.selfHandleResponse) for (const pass of web_o$1) pass(req$4, res, proxyRes, options$1);
|
24921
24909
|
if (!res.finished) {
|
24922
24910
|
proxyRes.on("end", () => {
|
24923
24911
|
server?.emit("end", req$4, res, proxyRes);
|
@@ -24935,8 +24923,8 @@ var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
24935
24923
|
}) });
|
24936
24924
|
|
24937
24925
|
//#endregion
|
24938
|
-
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.
|
24939
|
-
var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.
|
24926
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js
|
24927
|
+
var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js": ((exports) => {
|
24940
24928
|
var __createBinding$1 = exports && exports.__createBinding || (Object.create ? (function(o$1, m$2, k, k2) {
|
24941
24929
|
if (k2 === void 0) k2 = k;
|
24942
24930
|
var desc = Object.getOwnPropertyDescriptor(m$2, k);
|
@@ -24989,7 +24977,9 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
24989
24977
|
const http$1 = __importStar$1(__require("node:http"));
|
24990
24978
|
const https$1 = __importStar$1(__require("node:https"));
|
24991
24979
|
const common = __importStar$1(require_common());
|
24980
|
+
const web_outgoing_1 = require_web_outgoing();
|
24992
24981
|
const log$1 = (0, __importDefault$1(require_node$1()).default)("http-proxy-3:ws-incoming");
|
24982
|
+
const web_o = Object.values(web_outgoing_1.OUTGOING_PASSES);
|
24993
24983
|
function createSocketCounter(name) {
|
24994
24984
|
let sockets = /* @__PURE__ */ new Set();
|
24995
24985
|
return ({ add, rm } = {}) => {
|
@@ -25007,6 +24997,17 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
25007
24997
|
}
|
25008
24998
|
const socketCounter = createSocketCounter("socket");
|
25009
24999
|
const proxySocketCounter = createSocketCounter("proxySocket");
|
25000
|
+
var MockResponse = class {
|
25001
|
+
constructor() {
|
25002
|
+
this.headers = {};
|
25003
|
+
this.statusCode = 200;
|
25004
|
+
this.statusMessage = "";
|
25005
|
+
}
|
25006
|
+
setHeader(key, value$1) {
|
25007
|
+
this.headers[key] = value$1;
|
25008
|
+
return this;
|
25009
|
+
}
|
25010
|
+
};
|
25010
25011
|
function numOpenSockets() {
|
25011
25012
|
return socketCounter() + proxySocketCounter();
|
25012
25013
|
}
|
@@ -25090,6 +25091,37 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
25090
25091
|
else server.emit("error", err$2, req$4, socket);
|
25091
25092
|
socket.destroySoon();
|
25092
25093
|
}
|
25094
|
+
proxyReq.on("response", (proxyRes) => {
|
25095
|
+
log$1("got non-ws HTTP response", {
|
25096
|
+
statusCode: proxyRes.statusCode,
|
25097
|
+
statusMessage: proxyRes.statusMessage
|
25098
|
+
});
|
25099
|
+
const res = new MockResponse();
|
25100
|
+
for (const pass of web_o) pass(req$4, res, proxyRes, options$1);
|
25101
|
+
let writeChunk = (chunk) => {
|
25102
|
+
socket.write(chunk);
|
25103
|
+
};
|
25104
|
+
if (req$4.httpVersion === "1.1" && proxyRes.headers["content-length"] === void 0) {
|
25105
|
+
res.headers["transfer-encoding"] = "chunked";
|
25106
|
+
writeChunk = (chunk) => {
|
25107
|
+
socket.write(chunk.length.toString(16));
|
25108
|
+
socket.write("\r\n");
|
25109
|
+
socket.write(chunk);
|
25110
|
+
socket.write("\r\n");
|
25111
|
+
};
|
25112
|
+
}
|
25113
|
+
const proxyHead = createHttpHeader(`HTTP/${req$4.httpVersion} ${proxyRes.statusCode} ${proxyRes.statusMessage}`, res.headers);
|
25114
|
+
if (!socket.destroyed) {
|
25115
|
+
socket.write(proxyHead);
|
25116
|
+
proxyRes.on("data", (chunk) => {
|
25117
|
+
writeChunk(chunk);
|
25118
|
+
});
|
25119
|
+
proxyRes.on("end", () => {
|
25120
|
+
writeChunk("");
|
25121
|
+
socket.destroySoon();
|
25122
|
+
});
|
25123
|
+
} else proxyRes.resume();
|
25124
|
+
});
|
25093
25125
|
proxyReq.end();
|
25094
25126
|
}
|
25095
25127
|
exports.WS_PASSES = {
|
@@ -25100,8 +25132,8 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
25100
25132
|
}) });
|
25101
25133
|
|
25102
25134
|
//#endregion
|
25103
|
-
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.
|
25104
|
-
var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.
|
25135
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/http-proxy/index.js
|
25136
|
+
var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/http-proxy/index.js": ((exports) => {
|
25105
25137
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o$1, m$2, k, k2) {
|
25106
25138
|
if (k2 === void 0) k2 = k;
|
25107
25139
|
var desc = Object.getOwnPropertyDescriptor(m$2, k);
|
@@ -25307,13 +25339,11 @@ var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
25307
25339
|
}) });
|
25308
25340
|
|
25309
25341
|
//#endregion
|
25310
|
-
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.
|
25311
|
-
var require_lib = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.
|
25342
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/index.js
|
25343
|
+
var require_lib = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/index.js": ((exports) => {
|
25312
25344
|
Object.defineProperty(exports, "__esModule", { value: true });
|
25313
25345
|
exports.numOpenSockets = exports.ProxyServer = void 0;
|
25314
25346
|
exports.createProxyServer = createProxyServer;
|
25315
|
-
exports.createServer = createProxyServer;
|
25316
|
-
exports.createProxy = createProxyServer;
|
25317
25347
|
const index_1 = require_http_proxy();
|
25318
25348
|
Object.defineProperty(exports, "ProxyServer", {
|
25319
25349
|
enumerable: true,
|
@@ -25345,10 +25375,6 @@ var require_lib = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-pr
|
|
25345
25375
|
function createProxyServer(options$1 = {}) {
|
25346
25376
|
return new index_1.ProxyServer(options$1);
|
25347
25377
|
}
|
25348
|
-
/**
|
25349
|
-
* Export the proxy "Server" as the main export.
|
25350
|
-
*/
|
25351
|
-
exports.default = index_1.ProxyServer;
|
25352
25378
|
}) });
|
25353
25379
|
|
25354
25380
|
//#endregion
|
@@ -25478,7 +25504,12 @@ function htmlFallbackMiddleware(root, spaFallback) {
|
|
25478
25504
|
return function viteHtmlFallbackMiddleware(req$4, _res, next) {
|
25479
25505
|
if (req$4.method !== "GET" && req$4.method !== "HEAD" || req$4.url === "/favicon.ico" || !(req$4.headers.accept === void 0 || req$4.headers.accept === "" || req$4.headers.accept.includes("text/html") || req$4.headers.accept.includes("*/*"))) return next();
|
25480
25506
|
const url$3 = cleanUrl(req$4.url);
|
25481
|
-
|
25507
|
+
let pathname;
|
25508
|
+
try {
|
25509
|
+
pathname = decodeURIComponent(url$3);
|
25510
|
+
} catch {
|
25511
|
+
return next();
|
25512
|
+
}
|
25482
25513
|
if (pathname.endsWith(".html")) {
|
25483
25514
|
const filePath = path.join(root, pathname);
|
25484
25515
|
if (fs.existsSync(filePath)) {
|
@@ -25879,7 +25910,8 @@ function serveStaticMiddleware(server) {
|
|
25879
25910
|
const cleanedUrl = cleanUrl(req$4.url);
|
25880
25911
|
if (cleanedUrl.endsWith("/") || path.extname(cleanedUrl) === ".html" || isInternalRequest(req$4.url) || req$4.url?.startsWith("//")) return next();
|
25881
25912
|
const url$3 = new URL(req$4.url, "http://example.com");
|
25882
|
-
const pathname =
|
25913
|
+
const pathname = decodeURIIfPossible(url$3.pathname);
|
25914
|
+
if (pathname === void 0) return next();
|
25883
25915
|
let redirectedPathname;
|
25884
25916
|
for (const { find: find$1, replacement } of server.config.resolve.alias) if (typeof find$1 === "string" ? pathname.startsWith(find$1) : find$1.test(pathname)) {
|
25885
25917
|
redirectedPathname = pathname.replace(find$1, replacement);
|
@@ -25914,7 +25946,9 @@ function serveRawFsMiddleware(server) {
|
|
25914
25946
|
return function viteServeRawFsMiddleware(req$4, res, next) {
|
25915
25947
|
if (req$4.url.startsWith(FS_PREFIX)) {
|
25916
25948
|
const url$3 = new URL(req$4.url, "http://example.com");
|
25917
|
-
|
25949
|
+
const pathname = decodeURIIfPossible(url$3.pathname);
|
25950
|
+
if (pathname === void 0) return next();
|
25951
|
+
let newPathname = pathname.slice(FS_PREFIX.length);
|
25918
25952
|
if (isWindows) newPathname = newPathname.replace(/^[A-Z]:/i, "");
|
25919
25953
|
url$3.pathname = encodeURI(newPathname);
|
25920
25954
|
req$4.url = url$3.href.slice(url$3.origin.length);
|
@@ -27085,19 +27119,22 @@ function serializeAttrs(attrs) {
|
|
27085
27119
|
function incrementIndent(indent = "") {
|
27086
27120
|
return `${indent}${indent[0] === " " ? " " : " "}`;
|
27087
27121
|
}
|
27088
|
-
function decodeURIIfPossible(input) {
|
27089
|
-
try {
|
27090
|
-
return decodeURI(input);
|
27091
|
-
} catch {
|
27092
|
-
return;
|
27093
|
-
}
|
27094
|
-
}
|
27095
27122
|
|
27096
27123
|
//#endregion
|
27097
27124
|
//#region src/node/server/middlewares/transform.ts
|
27098
27125
|
var import_picocolors$12 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
27099
27126
|
const debugCache = createDebugger("vite:cache");
|
27100
27127
|
const knownIgnoreList = new Set(["/", "/favicon.ico"]);
|
27128
|
+
const documentFetchDests = new Set([
|
27129
|
+
"document",
|
27130
|
+
"iframe",
|
27131
|
+
"frame",
|
27132
|
+
"fencedframe"
|
27133
|
+
]);
|
27134
|
+
function isDocumentFetchDest(req$4) {
|
27135
|
+
const fetchDest = req$4.headers["sec-fetch-dest"];
|
27136
|
+
return fetchDest !== void 0 && documentFetchDests.has(fetchDest);
|
27137
|
+
}
|
27101
27138
|
const urlRE$1 = /[?&]url\b/;
|
27102
27139
|
const rawRE$1 = /[?&]raw\b/;
|
27103
27140
|
const inlineRE$2 = /[?&]inline\b/;
|
@@ -27112,6 +27149,10 @@ function isServerAccessDeniedForTransform(config$2, id) {
|
|
27112
27149
|
function cachedTransformMiddleware(server) {
|
27113
27150
|
return function viteCachedTransformMiddleware(req$4, res, next) {
|
27114
27151
|
const environment = server.environments.client;
|
27152
|
+
if (isDocumentFetchDest(req$4)) {
|
27153
|
+
res.appendHeader("Vary", "Sec-Fetch-Dest");
|
27154
|
+
return next();
|
27155
|
+
}
|
27115
27156
|
const ifNoneMatch = req$4.headers["if-none-match"];
|
27116
27157
|
if (ifNoneMatch) {
|
27117
27158
|
const moduleByEtag = environment.moduleGraph.getModuleByEtag(ifNoneMatch);
|
@@ -27132,13 +27173,13 @@ function transformMiddleware(server) {
|
|
27132
27173
|
const publicPath = `${publicDir.slice(root.length)}/`;
|
27133
27174
|
return async function viteTransformMiddleware(req$4, res, next) {
|
27134
27175
|
const environment = server.environments.client;
|
27135
|
-
if (req$4.method !== "GET" && req$4.method !== "HEAD" || knownIgnoreList.has(req$4.url)) return next();
|
27176
|
+
if (req$4.method !== "GET" && req$4.method !== "HEAD" || knownIgnoreList.has(req$4.url) || isDocumentFetchDest(req$4)) return next();
|
27136
27177
|
let url$3;
|
27137
27178
|
try {
|
27138
27179
|
url$3 = decodeURI(removeTimestampQuery(req$4.url)).replace(NULL_BYTE_PLACEHOLDER, "\0");
|
27139
27180
|
} catch (e$1) {
|
27140
27181
|
if (e$1 instanceof URIError) {
|
27141
|
-
server.config.logger.warn(import_picocolors$12.default.yellow(
|
27182
|
+
server.config.logger.warn(import_picocolors$12.default.yellow(`Malformed URI sequence in request URL: ${removeTimestampQuery(req$4.url)}`));
|
27142
27183
|
return next();
|
27143
27184
|
}
|
27144
27185
|
return next(e$1);
|
@@ -29810,7 +29851,7 @@ function importAnalysisPlugin(config$2) {
|
|
29810
29851
|
if (ssr && importerModule.isSelfAccepting) isSelfAccepting = true;
|
29811
29852
|
if (!isSelfAccepting && isPartiallySelfAccepting && acceptedExports.size >= exports$1.length && exports$1.every((e$1) => acceptedExports.has(e$1.n))) isSelfAccepting = true;
|
29812
29853
|
const prunedImports = await moduleGraph.updateModuleInfo(importerModule, importedUrls, importedBindings, normalizedAcceptedUrls, isPartiallySelfAccepting ? acceptedExports : null, isSelfAccepting, staticImportedUrls);
|
29813
|
-
if (
|
29854
|
+
if (prunedImports) handlePrunedModules(prunedImports, environment);
|
29814
29855
|
}
|
29815
29856
|
debug$2?.(`${timeFrom(msAtStart)} ${import_picocolors$8.default.dim(`[${importedUrls.size} imports rewritten] ${prettifyUrl(importer, root)}`)}`);
|
29816
29857
|
if (s$2) return transformStableResult(s$2, importer, config$2);
|
@@ -30599,7 +30640,7 @@ function createFilterForTransform(idFilter, codeFilter, cwd) {
|
|
30599
30640
|
async function resolvePlugins(config$2, prePlugins, normalPlugins, postPlugins) {
|
30600
30641
|
const isBuild = config$2.command === "build";
|
30601
30642
|
const isWorker = config$2.isWorker;
|
30602
|
-
const buildPlugins = isBuild ? await (await import("./dep-
|
30643
|
+
const buildPlugins = isBuild ? await (await import("./dep-kz7ELjGS.js")).resolveBuildPlugins(config$2) : {
|
30603
30644
|
pre: [],
|
30604
30645
|
post: []
|
30605
30646
|
};
|
@@ -30919,7 +30960,7 @@ var EnvironmentPluginContainer = class {
|
|
30919
30960
|
}
|
30920
30961
|
}
|
30921
30962
|
if (id) {
|
30922
|
-
partial.id = isExternalUrl(id) ? id : normalizePath(id);
|
30963
|
+
partial.id = isExternalUrl(id) || id[0] === "\0" ? id : normalizePath(id);
|
30923
30964
|
return partial;
|
30924
30965
|
} else return null;
|
30925
30966
|
}
|
@@ -32193,7 +32234,7 @@ function createCachedImport(imp) {
|
|
32193
32234
|
};
|
32194
32235
|
}
|
32195
32236
|
const importPostcssImport = createCachedImport(() => import("./dep-CwrJo3zV.js").then(__toDynamicImportESM(1)));
|
32196
|
-
const importPostcssModules = createCachedImport(() => import("./dep-
|
32237
|
+
const importPostcssModules = createCachedImport(() => import("./dep-DrqJEUj9.js").then(__toDynamicImportESM(1)));
|
32197
32238
|
const importPostcss = createCachedImport(() => import("postcss"));
|
32198
32239
|
const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
|
32199
32240
|
let alwaysFakeWorkerWorkerControllerCache;
|
@@ -32269,7 +32310,7 @@ async function resolvePostcssConfig(config$2) {
|
|
32269
32310
|
postcssConfigCache.set(config$2, result);
|
32270
32311
|
return result;
|
32271
32312
|
}
|
32272
|
-
const cssUrlRE = /(?<!@import\s+)(?<=^|[^\w\-\u0080-\uffff])url\((\s*('[^']+'|"[^"]+")\s*|[^'")]+)\)/;
|
32313
|
+
const cssUrlRE = /(?<!@import\s+)(?<=^|[^\w\-\u0080-\uffff])url\((\s*('[^']+'|"[^"]+")\s*|(?:\\.|[^'")\\])+)\)/;
|
32273
32314
|
const cssDataUriRE = /(?<=^|[^\w\-\u0080-\uffff])data-uri\((\s*('[^']+'|"[^"]+")\s*|[^'")]+)\)/;
|
32274
32315
|
const importCssRE = /@import\s+(?:url\()?('[^']+\.css'|"[^"]+\.css"|[^'"\s)]+\.css)/;
|
32275
32316
|
const cssImageSetRE = /(?<=image-set\()((?:[\w-]{1,256}\([^)]*\)|[^)])*)(?=\))/;
|
@@ -32344,9 +32385,10 @@ async function doUrlReplace(rawUrl, matched, replacer, funcName = "url") {
|
|
32344
32385
|
unquotedUrl = rawUrl.slice(1, -1);
|
32345
32386
|
}
|
32346
32387
|
if (skipUrlReplacer(unquotedUrl)) return matched;
|
32388
|
+
unquotedUrl = unquotedUrl.replace(/\\(\W)/g, "$1");
|
32347
32389
|
let newUrl = await replacer(unquotedUrl, rawUrl);
|
32348
32390
|
if (newUrl === false) return matched;
|
32349
|
-
if (wrap$1 === "" && newUrl !== encodeURI(newUrl)) wrap$1 = "\"";
|
32391
|
+
if (wrap$1 === "" && (newUrl !== encodeURI(newUrl) || newUrl.includes(")"))) wrap$1 = "\"";
|
32350
32392
|
if (wrap$1 === "'" && newUrl.includes("'")) wrap$1 = "\"";
|
32351
32393
|
if (wrap$1 === "\"" && newUrl.includes("\"")) newUrl = newUrl.replace(nonEscapedDoubleQuoteRe, "\\\"");
|
32352
32394
|
return `${funcName}(${wrap$1}${newUrl}${wrap$1})`;
|
@@ -35995,7 +36037,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
35995
36037
|
for (const name of Object.keys(resolved.environments)) resolved.environments[name].plugins = await resolveEnvironmentPlugins(new PartialEnvironment(name, resolved));
|
35996
36038
|
optimizeDepsDisabledBackwardCompatibility(resolved, resolved.optimizeDeps);
|
35997
36039
|
optimizeDepsDisabledBackwardCompatibility(resolved, resolved.ssr.optimizeDeps, "ssr.");
|
35998
|
-
if (resolved.environments.ssr) resolved.environments.ssr.build.emitAssets = resolved.build.ssrEmitAssets || resolved.build.emitAssets;
|
36040
|
+
if (!resolved.builder?.sharedConfigBuild && resolved.environments.ssr) resolved.environments.ssr.build.emitAssets = resolved.build.ssrEmitAssets || resolved.build.emitAssets;
|
35999
36041
|
debug?.(`using resolved config: %O`, {
|
36000
36042
|
...resolved,
|
36001
36043
|
plugins: resolved.plugins.map((p) => p.name),
|
@@ -3405,7 +3405,7 @@ var require_tokenize = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/po
|
|
3405
3405
|
function tokenize(input) {
|
3406
3406
|
var tokens$1 = [];
|
3407
3407
|
var css = input.css.valueOf();
|
3408
|
-
var
|
3408
|
+
var length = css.length;
|
3409
3409
|
var offset = -1;
|
3410
3410
|
var line = 1;
|
3411
3411
|
var start = 0;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import "./dep-SmwnYDP9.js";
|
2
|
-
import { BuildEnvironment, build, buildEnvironmentOptionsDefaults, builderOptionsDefaults, createBuilder, createToImportMetaURLBasedRelativeRuntime, injectEnvironmentToHooks, onRollupLog, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveLibFilename, resolveUserExternal, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime } from "./dep-
|
2
|
+
import { BuildEnvironment, build, buildEnvironmentOptionsDefaults, builderOptionsDefaults, createBuilder, createToImportMetaURLBasedRelativeRuntime, injectEnvironmentToHooks, onRollupLog, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveLibFilename, resolveUserExternal, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime } from "./dep-CuuNgwUk.js";
|
3
3
|
|
4
4
|
export { createBuilder, resolveBuildPlugins };
|
package/dist/node/cli.js
CHANGED
@@ -568,7 +568,7 @@ const convertBase = (v) => {
|
|
568
568
|
cli.option("-c, --config <file>", `[string] use specified config file`).option("--base <path>", `[string] public base path (default: /)`, { type: [convertBase] }).option("-l, --logLevel <level>", `[string] info | warn | error | silent`).option("--clearScreen", `[boolean] allow/disable clear screen when logging`).option("--configLoader <loader>", `[string] use 'bundle' to bundle the config with esbuild, or 'runner' (experimental) to process it on the fly, or 'native' (experimental) to load using the native runtime (default: bundle)`).option("-d, --debug [feat]", `[string | boolean] show debug logs`).option("-f, --filter <filter>", `[string] filter debug logs`).option("-m, --mode <mode>", `[string] set env mode`);
|
569
569
|
cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--open [path]", `[boolean | string] open browser on startup`).option("--cors", `[boolean] enable CORS`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).action(async (root, options) => {
|
570
570
|
filterDuplicateOptions(options);
|
571
|
-
const { createServer } = await import("./chunks/dep-
|
571
|
+
const { createServer } = await import("./chunks/dep-BABVH4H3.js");
|
572
572
|
try {
|
573
573
|
const server = await createServer({
|
574
574
|
root,
|
@@ -624,7 +624,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
624
624
|
});
|
625
625
|
cli.command("build [root]", "build for production").option("--target <target>", `[string] transpile target (default: 'baseline-widely-available')`).option("--outDir <dir>", `[string] output directory (default: dist)`).option("--assetsDir <dir>", `[string] directory under outDir to place assets in (default: assets)`).option("--assetsInlineLimit <number>", `[number] static asset base64 inline threshold in bytes (default: 4096)`).option("--ssr [entry]", `[string] build specified entry for server-side rendering`).option("--sourcemap [output]", `[boolean | "inline" | "hidden"] output source maps for build (default: false)`).option("--minify [minifier]", "[boolean | \"terser\" | \"esbuild\"] enable/disable minification, or specify minifier to use (default: esbuild)").option("--manifest [name]", `[boolean | string] emit build manifest json`).option("--ssrManifest [name]", `[boolean | string] emit ssr manifest json`).option("--emptyOutDir", `[boolean] force empty outDir when it's outside of root`).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(async (root, options) => {
|
626
626
|
filterDuplicateOptions(options);
|
627
|
-
const { createBuilder } = await import("./chunks/dep-
|
627
|
+
const { createBuilder } = await import("./chunks/dep-kz7ELjGS.js");
|
628
628
|
const buildOptions = cleanGlobalCLIOptions(cleanBuilderCLIOptions(options));
|
629
629
|
try {
|
630
630
|
const inlineConfig = {
|
@@ -648,8 +648,8 @@ cli.command("build [root]", "build for production").option("--target <target>",
|
|
648
648
|
});
|
649
649
|
cli.command("optimize [root]", "pre-bundle dependencies (deprecated, the pre-bundle process runs automatically and does not need to be called)").option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).action(async (root, options) => {
|
650
650
|
filterDuplicateOptions(options);
|
651
|
-
const { resolveConfig } = await import("./chunks/dep-
|
652
|
-
const { optimizeDeps } = await import("./chunks/dep-
|
651
|
+
const { resolveConfig } = await import("./chunks/dep-0_1MO8LM.js");
|
652
|
+
const { optimizeDeps } = await import("./chunks/dep-Cmz3oSY2.js");
|
653
653
|
try {
|
654
654
|
const config = await resolveConfig({
|
655
655
|
root,
|
@@ -667,7 +667,7 @@ cli.command("optimize [root]", "pre-bundle dependencies (deprecated, the pre-bun
|
|
667
667
|
});
|
668
668
|
cli.command("preview [root]", "locally preview production build").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--open [path]", `[boolean | string] open browser on startup`).option("--outDir <dir>", `[string] output directory (default: dist)`).action(async (root, options) => {
|
669
669
|
filterDuplicateOptions(options);
|
670
|
-
const { preview } = await import("./chunks/dep-
|
670
|
+
const { preview } = await import("./chunks/dep-CxADCNV7.js");
|
671
671
|
try {
|
672
672
|
const server = await preview({
|
673
673
|
root,
|
package/dist/node/index.d.ts
CHANGED
@@ -317,7 +317,7 @@ declare namespace Connect {
|
|
317
317
|
}
|
318
318
|
}
|
319
319
|
//#endregion
|
320
|
-
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.
|
320
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/http-proxy/index.d.ts
|
321
321
|
interface ProxyTargetDetailed {
|
322
322
|
host: string;
|
323
323
|
port: number;
|
@@ -489,7 +489,7 @@ declare class ProxyServer<TIncomingMessage extends typeof http.IncomingMessage =
|
|
489
489
|
after: <PT extends ProxyType>(type: PT, passName: string, cb: PassFunctions<TIncomingMessage, TServerResponse, TError>[PT]) => void;
|
490
490
|
}
|
491
491
|
//#endregion
|
492
|
-
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.
|
492
|
+
//#region ../../node_modules/.pnpm/http-proxy-3@1.21.1/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.d.ts
|
493
493
|
declare function numOpenSockets(): number;
|
494
494
|
declare namespace index_d_exports {
|
495
495
|
export { ErrorCallback, ProxyServer, ProxyTarget, ProxyTargetUrl, ServerOptions$3 as ServerOptions, createProxyServer as createProxy, createProxyServer, createProxyServer as createServer, ProxyServer as default, numOpenSockets };
|
package/dist/node/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, VERSION, createLogger, defaultAllowedOrigins } from "./chunks/dep-SmwnYDP9.js";
|
2
|
-
import { BuildEnvironment, DevEnvironment, build, buildErrorMessage, createBuilder, createFilter, createIdResolver, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, optimizeDeps, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, ssrTransform, transformWithEsbuild } from "./chunks/dep-
|
2
|
+
import { BuildEnvironment, DevEnvironment, build, buildErrorMessage, createBuilder, createFilter, createIdResolver, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, optimizeDeps, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, ssrTransform, transformWithEsbuild } from "./chunks/dep-CuuNgwUk.js";
|
3
3
|
import { parseAst, parseAstAsync } from "rollup/parseAst";
|
4
4
|
import { version as esbuildVersion } from "esbuild";
|
5
5
|
|
@@ -407,10 +407,10 @@ var HMRContext = class {
|
|
407
407
|
await Promise.all(paths.map((path) => {
|
408
408
|
let disposer = this.disposeMap.get(path);
|
409
409
|
if (disposer) return disposer(this.dataMap.get(path));
|
410
|
-
})), paths.
|
410
|
+
})), await Promise.all(paths.map((path) => {
|
411
411
|
let fn = this.pruneMap.get(path);
|
412
|
-
fn
|
413
|
-
});
|
412
|
+
if (fn) return fn(this.dataMap.get(path));
|
413
|
+
}));
|
414
414
|
}
|
415
415
|
warnFailedUpdate(err, path) {
|
416
416
|
(!(err instanceof Error) || !err.message.includes("fetch")) && this.logger.error(err), this.logger.error(`Failed to reload ${path}. This could be due to syntax errors or importing non-existent modules. (see errors above)`);
|
@@ -701,12 +701,13 @@ function getModulesEntrypoints(runner, modules, visited = /* @__PURE__ */ new Se
|
|
701
701
|
if (visited.has(moduleId)) continue;
|
702
702
|
visited.add(moduleId);
|
703
703
|
let module = runner.evaluatedModules.getModuleById(moduleId);
|
704
|
-
if (
|
705
|
-
|
706
|
-
|
707
|
-
|
704
|
+
if (module) {
|
705
|
+
if (!module.importers.size) {
|
706
|
+
entrypoints.add(module.url);
|
707
|
+
continue;
|
708
|
+
}
|
709
|
+
for (let importer of module.importers) getModulesEntrypoints(runner, [importer], visited, entrypoints);
|
708
710
|
}
|
709
|
-
for (let importer of module.importers) getModulesEntrypoints(runner, [importer], visited, entrypoints);
|
710
711
|
}
|
711
712
|
return entrypoints;
|
712
713
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "7.1.
|
3
|
+
"version": "7.1.8",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Evan You",
|
@@ -82,17 +82,17 @@
|
|
82
82
|
"@babel/parser": "^7.28.4",
|
83
83
|
"@jridgewell/remapping": "^2.3.5",
|
84
84
|
"@jridgewell/trace-mapping": "^0.3.31",
|
85
|
-
"@oxc-project/types": "0.
|
85
|
+
"@oxc-project/types": "0.90.0",
|
86
86
|
"@polka/compression": "^1.0.0-next.25",
|
87
|
-
"@rolldown/pluginutils": "^1.0.0-beta.
|
87
|
+
"@rolldown/pluginutils": "^1.0.0-beta.41",
|
88
88
|
"@rollup/plugin-alias": "^5.1.1",
|
89
89
|
"@rollup/plugin-commonjs": "^28.0.6",
|
90
90
|
"@rollup/plugin-dynamic-import-vars": "2.1.4",
|
91
91
|
"@rollup/pluginutils": "^5.3.0",
|
92
92
|
"@types/escape-html": "^1.0.4",
|
93
93
|
"@types/pnpapi": "^0.0.5",
|
94
|
-
"artichokie": "^0.4.
|
95
|
-
"baseline-browser-mapping": "^2.8.
|
94
|
+
"artichokie": "^0.4.2",
|
95
|
+
"baseline-browser-mapping": "^2.8.9",
|
96
96
|
"cac": "^6.7.14",
|
97
97
|
"chokidar": "^3.6.0",
|
98
98
|
"connect": "^3.7.0",
|
@@ -101,20 +101,20 @@
|
|
101
101
|
"cross-spawn": "^7.0.6",
|
102
102
|
"debug": "^4.4.3",
|
103
103
|
"dep-types": "link:./src/types",
|
104
|
-
"dotenv": "^17.2.
|
104
|
+
"dotenv": "^17.2.3",
|
105
105
|
"dotenv-expand": "^12.0.3",
|
106
106
|
"es-module-lexer": "^1.7.0",
|
107
107
|
"escape-html": "^1.0.3",
|
108
108
|
"estree-walker": "^3.0.3",
|
109
109
|
"etag": "^1.8.1",
|
110
110
|
"host-validation-middleware": "^0.1.1",
|
111
|
-
"http-proxy-3": "^1.21.
|
111
|
+
"http-proxy-3": "^1.21.1",
|
112
112
|
"launch-editor-middleware": "^2.11.1",
|
113
|
-
"lightningcss": "^1.30.
|
113
|
+
"lightningcss": "^1.30.2",
|
114
114
|
"magic-string": "^0.30.19",
|
115
115
|
"mlly": "^1.8.0",
|
116
116
|
"mrmime": "^2.0.1",
|
117
|
-
"nanoid": "^5.1.
|
117
|
+
"nanoid": "^5.1.6",
|
118
118
|
"open": "^10.2.0",
|
119
119
|
"parse5": "^8.0.0",
|
120
120
|
"pathe": "^2.0.3",
|
@@ -125,13 +125,13 @@
|
|
125
125
|
"postcss-modules": "^6.0.1",
|
126
126
|
"premove": "^4.0.0",
|
127
127
|
"resolve.exports": "^2.0.3",
|
128
|
-
"rolldown": "^1.0.0-beta.
|
129
|
-
"rolldown-plugin-dts": "^0.16.
|
128
|
+
"rolldown": "^1.0.0-beta.41",
|
129
|
+
"rolldown-plugin-dts": "^0.16.11",
|
130
130
|
"rollup-plugin-license": "^3.6.0",
|
131
|
-
"sass": "^1.
|
132
|
-
"sass-embedded": "^1.
|
131
|
+
"sass": "^1.93.2",
|
132
|
+
"sass-embedded": "^1.93.2",
|
133
133
|
"sirv": "^3.0.2",
|
134
|
-
"strip-literal": "^3.
|
134
|
+
"strip-literal": "^3.1.0",
|
135
135
|
"terser": "^5.44.0",
|
136
136
|
"tsconfck": "^3.1.6",
|
137
137
|
"types": "link:./types",
|