vite 7.1.0-beta.0 → 7.1.0
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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/dist/client/client.mjs +28 -26
- package/dist/node/chunks/{dep-BpPEUsd2.js → dep-BeJ5EQ78.js} +126 -129
- package/dist/node/chunks/{dep-DQ3EcyiN.js → dep-Bh-1mzXX.js} +1 -1
- package/dist/node/chunks/{dep-KxHho39H.js → dep-Bq0QZiuR.js} +1 -1
- package/dist/node/chunks/{dep-CVQJZ3QI.js → dep-By9Vn5UD.js} +1 -1
- package/dist/node/chunks/{dep-CYKWp2mZ.js → dep-CZAfWeT9.js} +1049 -1021
- package/dist/node/chunks/{dep-C3Gi22Hg.js → dep-CxRDE86e.js} +1 -1
- package/dist/node/chunks/{dep-DcjhO6Jt.js → dep-G9cgWHwY.js} +21 -21
- package/dist/node/chunks/{dep-BeiFehmI.js → dep-V5uAjiuB.js} +530 -1060
- package/dist/node/chunks/{dep-DmY5m86w.js → dep-f94b-k0u.js} +10 -10
- package/dist/node/cli.js +6 -6
- package/dist/node/index.js +1 -1
- package/dist/node/module-runner.js +13 -13
- package/package.json +6 -6
package/dist/client/client.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import "@vite/env";
|
2
2
|
|
3
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.
|
3
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/esm/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 ../../node_modules/.pnpm/@oxc-project+runtime@0.
|
14
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/esm/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 ../../node_modules/.pnpm/@oxc-project+runtime@0.
|
27
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/esm/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 ../../node_modules/.pnpm/@oxc-project+runtime@0.
|
34
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/esm/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,
|
@@ -858,7 +858,7 @@ async function handleMessage(payload) {
|
|
858
858
|
}));
|
859
859
|
await hmrClient.notifyListeners("vite:afterUpdate", payload);
|
860
860
|
break;
|
861
|
-
case "custom":
|
861
|
+
case "custom":
|
862
862
|
await hmrClient.notifyListeners(payload.event, payload.data);
|
863
863
|
if (payload.event === "vite:ws:disconnect") {
|
864
864
|
if (hasDocument && !willUnload) {
|
@@ -871,7 +871,6 @@ async function handleMessage(payload) {
|
|
871
871
|
}
|
872
872
|
}
|
873
873
|
break;
|
874
|
-
}
|
875
874
|
case "full-reload":
|
876
875
|
await hmrClient.notifyListeners("vite:beforeFullReload", payload);
|
877
876
|
if (hasDocument) if (payload.path && payload.path.endsWith(".html")) {
|
@@ -885,7 +884,7 @@ async function handleMessage(payload) {
|
|
885
884
|
await hmrClient.notifyListeners("vite:beforePrune", payload);
|
886
885
|
await hmrClient.prunePaths(payload.paths);
|
887
886
|
break;
|
888
|
-
case "error":
|
887
|
+
case "error":
|
889
888
|
await hmrClient.notifyListeners("vite:error", payload);
|
890
889
|
if (hasDocument) {
|
891
890
|
const err = payload.err;
|
@@ -893,7 +892,6 @@ async function handleMessage(payload) {
|
|
893
892
|
else console.error(`[vite] Internal Server Error\n${err.message}\n${err.stack}`);
|
894
893
|
}
|
895
894
|
break;
|
896
|
-
}
|
897
895
|
case "ping": break;
|
898
896
|
default: {
|
899
897
|
const check = payload;
|
@@ -1011,24 +1009,28 @@ async function waitForSuccessfulPingInternal(socketUrl, visibilityManager, ms =
|
|
1011
1009
|
return new Promise((resolve) => setTimeout(resolve, ms$1));
|
1012
1010
|
}
|
1013
1011
|
async function ping() {
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1012
|
+
try {
|
1013
|
+
const socket = new WebSocket(socketUrl, "vite-ping");
|
1014
|
+
return new Promise((resolve) => {
|
1015
|
+
function onOpen() {
|
1016
|
+
resolve(true);
|
1017
|
+
close();
|
1018
|
+
}
|
1019
|
+
function onError() {
|
1020
|
+
resolve(false);
|
1021
|
+
close();
|
1022
|
+
}
|
1023
|
+
function close() {
|
1024
|
+
socket.removeEventListener("open", onOpen);
|
1025
|
+
socket.removeEventListener("error", onError);
|
1026
|
+
socket.close();
|
1027
|
+
}
|
1028
|
+
socket.addEventListener("open", onOpen);
|
1029
|
+
socket.addEventListener("error", onError);
|
1030
|
+
});
|
1031
|
+
} catch {
|
1032
|
+
return false;
|
1033
|
+
}
|
1032
1034
|
}
|
1033
1035
|
function waitForWindowShow(visibilityManager$1) {
|
1034
1036
|
return new Promise((resolve) => {
|