vite 8.0.1 → 8.0.3
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 +4 -4
- package/dist/node/chunks/build.js +0 -1
- package/dist/node/chunks/build2.js +1 -0
- package/dist/node/chunks/config.js +0 -1
- package/dist/node/chunks/node.js +90 -58
- package/dist/node/chunks/optimizer.js +0 -1
- package/dist/node/chunks/preview.js +0 -1
- package/dist/node/chunks/server.js +0 -1
- package/dist/node/index.d.ts +9 -2
- package/dist/node/module-runner.js +9 -5
- package/package.json +10 -10
package/dist/client/client.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@vite/env";
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.122.0/helpers/typeof.js
|
|
3
3
|
function _typeof(o) {
|
|
4
4
|
"@babel/helpers - typeof";
|
|
5
5
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -9,7 +9,7 @@ function _typeof(o) {
|
|
|
9
9
|
}, _typeof(o);
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
|
-
//#region \0@oxc-project+runtime@0.
|
|
12
|
+
//#region \0@oxc-project+runtime@0.122.0/helpers/toPrimitive.js
|
|
13
13
|
function toPrimitive(t, r) {
|
|
14
14
|
if ("object" != _typeof(t) || !t) return t;
|
|
15
15
|
var e = t[Symbol.toPrimitive];
|
|
@@ -21,13 +21,13 @@ function toPrimitive(t, r) {
|
|
|
21
21
|
return ("string" === r ? String : Number)(t);
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
|
-
//#region \0@oxc-project+runtime@0.
|
|
24
|
+
//#region \0@oxc-project+runtime@0.122.0/helpers/toPropertyKey.js
|
|
25
25
|
function toPropertyKey(t) {
|
|
26
26
|
var i = toPrimitive(t, "string");
|
|
27
27
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
|
-
//#region \0@oxc-project+runtime@0.
|
|
30
|
+
//#region \0@oxc-project+runtime@0.122.0/helpers/defineProperty.js
|
|
31
31
|
function _defineProperty(e, r, t) {
|
|
32
32
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
33
33
|
value: t,
|
|
@@ -4555,6 +4555,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4555
4555
|
return new _processor["default"](processor);
|
|
4556
4556
|
};
|
|
4557
4557
|
Object.assign(parser, selectors);
|
|
4558
|
+
delete parser.__esModule;
|
|
4558
4559
|
exports["default"] = parser;
|
|
4559
4560
|
module.exports = exports.default;
|
|
4560
4561
|
}));
|
package/dist/node/chunks/node.js
CHANGED
|
@@ -10043,7 +10043,7 @@ var require_shell_quote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
10043
10043
|
exports.parse = require_parse$1();
|
|
10044
10044
|
}));
|
|
10045
10045
|
//#endregion
|
|
10046
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.13.
|
|
10046
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/macos.js
|
|
10047
10047
|
var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10048
10048
|
module.exports = {
|
|
10049
10049
|
"/Applications/Atom.app/Contents/MacOS/Atom": "atom",
|
|
@@ -10053,6 +10053,7 @@ var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10053
10053
|
"/Applications/Sublime Text.app/Contents/MacOS/sublime_text": "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl",
|
|
10054
10054
|
"/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2": "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl",
|
|
10055
10055
|
"/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text": "/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl",
|
|
10056
|
+
"/Applications/Visual Studio Code.app/Contents/MacOS/Code": "code",
|
|
10056
10057
|
"/Applications/Visual Studio Code.app/Contents/MacOS/Electron": "code",
|
|
10057
10058
|
"/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders": "code-insiders",
|
|
10058
10059
|
"/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron": "code-insiders",
|
|
@@ -10077,7 +10078,7 @@ var require_macos = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10077
10078
|
};
|
|
10078
10079
|
}));
|
|
10079
10080
|
//#endregion
|
|
10080
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.13.
|
|
10081
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/linux.js
|
|
10081
10082
|
var require_linux = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10082
10083
|
module.exports = {
|
|
10083
10084
|
atom: "atom",
|
|
@@ -10111,7 +10112,7 @@ var require_linux = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10111
10112
|
};
|
|
10112
10113
|
}));
|
|
10113
10114
|
//#endregion
|
|
10114
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.13.
|
|
10115
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/editor-info/windows.js
|
|
10115
10116
|
var require_windows$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10116
10117
|
module.exports = [
|
|
10117
10118
|
"Brackets.exe",
|
|
@@ -10138,13 +10139,13 @@ var require_windows$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10138
10139
|
"goland64.exe",
|
|
10139
10140
|
"rider.exe",
|
|
10140
10141
|
"rider64.exe",
|
|
10141
|
-
"
|
|
10142
|
+
"Trae.exe",
|
|
10142
10143
|
"zed.exe",
|
|
10143
10144
|
"Antigravity.exe"
|
|
10144
10145
|
];
|
|
10145
10146
|
}));
|
|
10146
10147
|
//#endregion
|
|
10147
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.13.
|
|
10148
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/guess.js
|
|
10148
10149
|
var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10149
10150
|
const path$9 = __require("path");
|
|
10150
10151
|
const shellQuote = require_shell_quote();
|
|
@@ -10205,7 +10206,7 @@ var require_guess = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10205
10206
|
};
|
|
10206
10207
|
}));
|
|
10207
10208
|
//#endregion
|
|
10208
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.13.
|
|
10209
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/get-args.js
|
|
10209
10210
|
var require_get_args = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10210
10211
|
const path$8 = __require("path");
|
|
10211
10212
|
module.exports = function getArgumentsForPosition(editor, fileName, lineNumber, columnNumber = 1) {
|
|
@@ -10284,7 +10285,7 @@ var require_get_args = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10284
10285
|
};
|
|
10285
10286
|
}));
|
|
10286
10287
|
//#endregion
|
|
10287
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.13.
|
|
10288
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.13.2/node_modules/launch-editor/index.js
|
|
10288
10289
|
var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10289
10290
|
/**
|
|
10290
10291
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
@@ -10383,7 +10384,7 @@ var require_launch_editor = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
10383
10384
|
module.exports = launchEditor;
|
|
10384
10385
|
}));
|
|
10385
10386
|
//#endregion
|
|
10386
|
-
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.13.
|
|
10387
|
+
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.13.2/node_modules/launch-editor-middleware/index.js
|
|
10387
10388
|
var require_launch_editor_middleware = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10388
10389
|
const path$6 = __require("path");
|
|
10389
10390
|
const launch = require_launch_editor();
|
|
@@ -11327,6 +11328,7 @@ function isRefIdentifier(id, parent, parentStack) {
|
|
|
11327
11328
|
if (isNodeInPattern(parent) && parent.value === id) return false;
|
|
11328
11329
|
if (parent.type === "ArrayPattern" && !isInDestructuringAssignment(parent, parentStack)) return false;
|
|
11329
11330
|
if (parent.type === "MemberExpression" && parent.property === id && !parent.computed) return false;
|
|
11331
|
+
if (parent.type === "MetaProperty") return false;
|
|
11330
11332
|
if (parent.type === "ExportSpecifier" || parent.type === "ExportAllDeclaration") return false;
|
|
11331
11333
|
if (id.name === "arguments") return false;
|
|
11332
11334
|
return true;
|
|
@@ -12476,7 +12478,7 @@ function checkPublicFile(url, config) {
|
|
|
12476
12478
|
return tryStatSync(publicFile)?.isFile() ? publicFile : void 0;
|
|
12477
12479
|
}
|
|
12478
12480
|
//#endregion
|
|
12479
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
12481
|
+
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/constants.js
|
|
12480
12482
|
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
12481
12483
|
const BINARY_TYPES = [
|
|
12482
12484
|
"nodebuffer",
|
|
@@ -12499,7 +12501,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12499
12501
|
};
|
|
12500
12502
|
}));
|
|
12501
12503
|
//#endregion
|
|
12502
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
12504
|
+
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/buffer-util.js
|
|
12503
12505
|
var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
12504
12506
|
const { EMPTY_BUFFER } = require_constants();
|
|
12505
12507
|
const FastBuffer = Buffer[Symbol.species];
|
|
@@ -12599,7 +12601,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12599
12601
|
} catch (e) {}
|
|
12600
12602
|
}));
|
|
12601
12603
|
//#endregion
|
|
12602
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
12604
|
+
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/limiter.js
|
|
12603
12605
|
var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
12604
12606
|
const kDone = Symbol("kDone");
|
|
12605
12607
|
const kRun = Symbol("kRun");
|
|
@@ -12650,7 +12652,7 @@ var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12650
12652
|
module.exports = Limiter;
|
|
12651
12653
|
}));
|
|
12652
12654
|
//#endregion
|
|
12653
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
12655
|
+
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/permessage-deflate.js
|
|
12654
12656
|
var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
12655
12657
|
const zlib$1 = __require("zlib");
|
|
12656
12658
|
const bufferUtil = require_buffer_util();
|
|
@@ -12683,6 +12685,9 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
12683
12685
|
* acknowledge disabling of client context takeover
|
|
12684
12686
|
* @param {Number} [options.concurrencyLimit=10] The number of concurrent
|
|
12685
12687
|
* calls to zlib
|
|
12688
|
+
* @param {Boolean} [options.isServer=false] Create the instance in either
|
|
12689
|
+
* server or client mode
|
|
12690
|
+
* @param {Number} [options.maxPayload=0] The maximum allowed message length
|
|
12686
12691
|
* @param {(Boolean|Number)} [options.serverMaxWindowBits] Request/confirm the
|
|
12687
12692
|
* use of a custom server window size
|
|
12688
12693
|
* @param {Boolean} [options.serverNoContextTakeover=false] Request/accept
|
|
@@ -12693,15 +12698,12 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
12693
12698
|
* deflate
|
|
12694
12699
|
* @param {Object} [options.zlibInflateOptions] Options to pass to zlib on
|
|
12695
12700
|
* inflate
|
|
12696
|
-
* @param {Boolean} [isServer=false] Create the instance in either server or
|
|
12697
|
-
* client mode
|
|
12698
|
-
* @param {Number} [maxPayload=0] The maximum allowed message length
|
|
12699
12701
|
*/
|
|
12700
|
-
constructor(options
|
|
12701
|
-
this._maxPayload = maxPayload | 0;
|
|
12702
|
+
constructor(options) {
|
|
12702
12703
|
this._options = options || {};
|
|
12703
12704
|
this._threshold = this._options.threshold !== void 0 ? this._options.threshold : 1024;
|
|
12704
|
-
this.
|
|
12705
|
+
this._maxPayload = this._options.maxPayload | 0;
|
|
12706
|
+
this._isServer = !!this._options.isServer;
|
|
12705
12707
|
this._deflate = null;
|
|
12706
12708
|
this._inflate = null;
|
|
12707
12709
|
this.params = null;
|
|
@@ -12983,7 +12985,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
12983
12985
|
}
|
|
12984
12986
|
}));
|
|
12985
12987
|
//#endregion
|
|
12986
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
12988
|
+
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/validation.js
|
|
12987
12989
|
var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
12988
12990
|
const { isUtf8 } = __require("buffer");
|
|
12989
12991
|
const { hasBlob } = require_constants();
|
|
@@ -13179,7 +13181,7 @@ var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
13179
13181
|
} catch (e) {}
|
|
13180
13182
|
}));
|
|
13181
13183
|
//#endregion
|
|
13182
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
13184
|
+
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/receiver.js
|
|
13183
13185
|
var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
13184
13186
|
const { Writable: Writable$1 } = __require("stream");
|
|
13185
13187
|
const PerMessageDeflate = require_permessage_deflate();
|
|
@@ -13626,7 +13628,7 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
13626
13628
|
module.exports = Receiver;
|
|
13627
13629
|
}));
|
|
13628
13630
|
//#endregion
|
|
13629
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
13631
|
+
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/sender.js
|
|
13630
13632
|
var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
13631
13633
|
const { Duplex: Duplex$3 } = __require("stream");
|
|
13632
13634
|
const { randomFillSync } = __require("crypto");
|
|
@@ -14117,7 +14119,7 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14117
14119
|
}
|
|
14118
14120
|
}));
|
|
14119
14121
|
//#endregion
|
|
14120
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
14122
|
+
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/event-target.js
|
|
14121
14123
|
var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14122
14124
|
const { kForOnEventAttribute, kListener } = require_constants();
|
|
14123
14125
|
const kCode = Symbol("kCode");
|
|
@@ -14329,7 +14331,7 @@ var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14329
14331
|
}
|
|
14330
14332
|
}));
|
|
14331
14333
|
//#endregion
|
|
14332
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
14334
|
+
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/extension.js
|
|
14333
14335
|
var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14334
14336
|
const { tokenChars } = require_validation();
|
|
14335
14337
|
/**
|
|
@@ -14472,7 +14474,7 @@ var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14472
14474
|
};
|
|
14473
14475
|
}));
|
|
14474
14476
|
//#endregion
|
|
14475
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
14477
|
+
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/websocket.js
|
|
14476
14478
|
var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14477
14479
|
const EventEmitter$2 = __require("events");
|
|
14478
14480
|
const https$3 = __require("https");
|
|
@@ -15013,7 +15015,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15013
15015
|
if (address instanceof URL$2) parsedUrl = address;
|
|
15014
15016
|
else try {
|
|
15015
15017
|
parsedUrl = new URL$2(address);
|
|
15016
|
-
} catch
|
|
15018
|
+
} catch {
|
|
15017
15019
|
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
15018
15020
|
}
|
|
15019
15021
|
if (parsedUrl.protocol === "http:") parsedUrl.protocol = "ws:";
|
|
@@ -15052,7 +15054,11 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15052
15054
|
opts.path = parsedUrl.pathname + parsedUrl.search;
|
|
15053
15055
|
opts.timeout = opts.handshakeTimeout;
|
|
15054
15056
|
if (opts.perMessageDeflate) {
|
|
15055
|
-
perMessageDeflate = new PerMessageDeflate(
|
|
15057
|
+
perMessageDeflate = new PerMessageDeflate({
|
|
15058
|
+
...opts.perMessageDeflate,
|
|
15059
|
+
isServer: false,
|
|
15060
|
+
maxPayload: opts.maxPayload
|
|
15061
|
+
});
|
|
15056
15062
|
opts.headers["Sec-WebSocket-Extensions"] = format({ [PerMessageDeflate.extensionName]: perMessageDeflate.offer() });
|
|
15057
15063
|
}
|
|
15058
15064
|
if (protocols.length) {
|
|
@@ -15443,7 +15449,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15443
15449
|
}
|
|
15444
15450
|
}));
|
|
15445
15451
|
//#endregion
|
|
15446
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
15452
|
+
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/stream.js
|
|
15447
15453
|
var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15448
15454
|
require_websocket();
|
|
15449
15455
|
const { Duplex: Duplex$1 } = __require("stream");
|
|
@@ -15559,7 +15565,7 @@ var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15559
15565
|
module.exports = createWebSocketStream;
|
|
15560
15566
|
}));
|
|
15561
15567
|
//#endregion
|
|
15562
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
15568
|
+
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/subprotocol.js
|
|
15563
15569
|
var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15564
15570
|
const { tokenChars } = require_validation();
|
|
15565
15571
|
/**
|
|
@@ -15598,7 +15604,7 @@ var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15598
15604
|
module.exports = { parse };
|
|
15599
15605
|
}));
|
|
15600
15606
|
//#endregion
|
|
15601
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
15607
|
+
//#region ../../node_modules/.pnpm/ws@8.20.0/node_modules/ws/lib/websocket-server.js
|
|
15602
15608
|
var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15603
15609
|
const EventEmitter$1 = __require("events");
|
|
15604
15610
|
const http$4 = __require("http");
|
|
@@ -15812,7 +15818,11 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
15812
15818
|
const secWebSocketExtensions = req.headers["sec-websocket-extensions"];
|
|
15813
15819
|
const extensions = {};
|
|
15814
15820
|
if (this.options.perMessageDeflate && secWebSocketExtensions !== void 0) {
|
|
15815
|
-
const perMessageDeflate = new PerMessageDeflate(
|
|
15821
|
+
const perMessageDeflate = new PerMessageDeflate({
|
|
15822
|
+
...this.options.perMessageDeflate,
|
|
15823
|
+
isServer: true,
|
|
15824
|
+
maxPayload: this.options.maxPayload
|
|
15825
|
+
});
|
|
15816
15826
|
try {
|
|
15817
15827
|
const offers = extension.parse(secWebSocketExtensions);
|
|
15818
15828
|
if (offers[PerMessageDeflate.extensionName]) {
|
|
@@ -15972,8 +15982,11 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
15972
15982
|
}
|
|
15973
15983
|
}));
|
|
15974
15984
|
require_stream();
|
|
15985
|
+
require_extension();
|
|
15986
|
+
require_permessage_deflate();
|
|
15975
15987
|
require_receiver();
|
|
15976
15988
|
require_sender();
|
|
15989
|
+
require_subprotocol();
|
|
15977
15990
|
require_websocket();
|
|
15978
15991
|
var import_websocket_server = /* @__PURE__ */ __toESM(require_websocket_server(), 1);
|
|
15979
15992
|
//#endregion
|
|
@@ -22114,6 +22127,40 @@ function handleParseError(parserError, html, filePath, warnings) {
|
|
|
22114
22127
|
warnings[parseError.code] ??= `Unable to parse HTML; ${parseError.message}\n at ${parseError.loc.file}:${parseError.loc.line}:${parseError.loc.column}\n` + parseError.frame;
|
|
22115
22128
|
}
|
|
22116
22129
|
/**
|
|
22130
|
+
* Collects CSS files for a chunk by traversing its imports depth-first,
|
|
22131
|
+
* using a cache to avoid re-analyzing chunks while still returning the
|
|
22132
|
+
* correct files when the same chunk is reached via different entry points.
|
|
22133
|
+
*/
|
|
22134
|
+
function getCssFilesForChunk(chunk, bundle, analyzedImportedCssFiles, seenChunks = /* @__PURE__ */ new Set(), seenCss = /* @__PURE__ */ new Set()) {
|
|
22135
|
+
if (seenChunks.has(chunk.fileName)) return [];
|
|
22136
|
+
seenChunks.add(chunk.fileName);
|
|
22137
|
+
if (analyzedImportedCssFiles.has(chunk)) {
|
|
22138
|
+
const additionals = analyzedImportedCssFiles.get(chunk).filter((file) => !seenCss.has(file));
|
|
22139
|
+
additionals.forEach((file) => seenCss.add(file));
|
|
22140
|
+
return additionals;
|
|
22141
|
+
}
|
|
22142
|
+
const allFiles = [];
|
|
22143
|
+
const filteredFiles = [];
|
|
22144
|
+
chunk.imports.forEach((file) => {
|
|
22145
|
+
const importee = bundle[file];
|
|
22146
|
+
if (importee?.type === "chunk") {
|
|
22147
|
+
const importeeCss = getCssFilesForChunk(importee, bundle, analyzedImportedCssFiles, seenChunks, seenCss);
|
|
22148
|
+
filteredFiles.push(...importeeCss);
|
|
22149
|
+
if (analyzedImportedCssFiles.has(importee)) allFiles.push(...analyzedImportedCssFiles.get(importee));
|
|
22150
|
+
else allFiles.push(...importeeCss);
|
|
22151
|
+
}
|
|
22152
|
+
});
|
|
22153
|
+
chunk.viteMetadata.importedCss.forEach((file) => {
|
|
22154
|
+
allFiles.push(file);
|
|
22155
|
+
if (!seenCss.has(file)) {
|
|
22156
|
+
seenCss.add(file);
|
|
22157
|
+
filteredFiles.push(file);
|
|
22158
|
+
}
|
|
22159
|
+
});
|
|
22160
|
+
analyzedImportedCssFiles.set(chunk, unique(allFiles));
|
|
22161
|
+
return filteredFiles;
|
|
22162
|
+
}
|
|
22163
|
+
/**
|
|
22117
22164
|
* Compiles index.html into an entry js module
|
|
22118
22165
|
*/
|
|
22119
22166
|
function buildHtmlPlugin(config) {
|
|
@@ -22331,29 +22378,7 @@ function buildHtmlPlugin(config) {
|
|
|
22331
22378
|
href: toOutputPath(file)
|
|
22332
22379
|
}
|
|
22333
22380
|
});
|
|
22334
|
-
const
|
|
22335
|
-
if (seenChunks.has(chunk.fileName)) return [];
|
|
22336
|
-
seenChunks.add(chunk.fileName);
|
|
22337
|
-
if (analyzedImportedCssFiles.has(chunk)) {
|
|
22338
|
-
const additionals = analyzedImportedCssFiles.get(chunk).filter((file) => !seenCss.has(file));
|
|
22339
|
-
additionals.forEach((file) => seenCss.add(file));
|
|
22340
|
-
return additionals;
|
|
22341
|
-
}
|
|
22342
|
-
const files = [];
|
|
22343
|
-
chunk.imports.forEach((file) => {
|
|
22344
|
-
const importee = bundle[file];
|
|
22345
|
-
if (importee?.type === "chunk") files.push(...getCssFilesForChunk(importee, seenChunks, seenCss));
|
|
22346
|
-
});
|
|
22347
|
-
analyzedImportedCssFiles.set(chunk, files);
|
|
22348
|
-
chunk.viteMetadata.importedCss.forEach((file) => {
|
|
22349
|
-
if (!seenCss.has(file)) {
|
|
22350
|
-
seenCss.add(file);
|
|
22351
|
-
files.push(file);
|
|
22352
|
-
}
|
|
22353
|
-
});
|
|
22354
|
-
return files;
|
|
22355
|
-
};
|
|
22356
|
-
const getCssTagsForChunk = (chunk, toOutputPath) => getCssFilesForChunk(chunk).map((file) => toStyleSheetLinkTag(file, toOutputPath));
|
|
22381
|
+
const getCssTagsForChunk = (chunk, toOutputPath) => getCssFilesForChunk(chunk, bundle, analyzedImportedCssFiles).map((file) => toStyleSheetLinkTag(file, toOutputPath));
|
|
22357
22382
|
for (const [normalizedId, html] of processedHtml(this)) {
|
|
22358
22383
|
const relativeUrlPath = normalizePath(path.relative(config.root, normalizedId));
|
|
22359
22384
|
const assetsBase = getBaseInHTML(relativeUrlPath, config);
|
|
@@ -30609,13 +30634,20 @@ const svelteScriptModuleRE = /\bcontext\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s'">]+)
|
|
|
30609
30634
|
const svelteModuleRE = /\smodule\b/i;
|
|
30610
30635
|
function rolldownScanPlugin(environment, depImports, missing, entries) {
|
|
30611
30636
|
const seen = /* @__PURE__ */ new Map();
|
|
30612
|
-
async function resolveId(id, importer) {
|
|
30613
|
-
return environment.pluginContainer.resolveId(id, importer && normalizePath(importer), {
|
|
30637
|
+
async function resolveId(id, importer, options) {
|
|
30638
|
+
return environment.pluginContainer.resolveId(id, importer && normalizePath(importer), {
|
|
30639
|
+
scan: true,
|
|
30640
|
+
...options
|
|
30641
|
+
});
|
|
30614
30642
|
}
|
|
30615
|
-
const resolve = async (id, importer) => {
|
|
30616
|
-
const key =
|
|
30643
|
+
const resolve = async (id, importer, options) => {
|
|
30644
|
+
const key = JSON.stringify([
|
|
30645
|
+
id,
|
|
30646
|
+
importer && path.dirname(importer),
|
|
30647
|
+
options
|
|
30648
|
+
]);
|
|
30617
30649
|
if (seen.has(key)) return seen.get(key);
|
|
30618
|
-
const res = (await resolveId(id, importer))?.id;
|
|
30650
|
+
const res = (await resolveId(id, importer, options))?.id;
|
|
30619
30651
|
seen.set(key, res);
|
|
30620
30652
|
return res;
|
|
30621
30653
|
};
|
package/dist/node/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ import { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownA
|
|
|
31
31
|
|
|
32
32
|
//#region \0rolldown/runtime.js
|
|
33
33
|
//#endregion
|
|
34
|
-
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.
|
|
34
|
+
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.5_typescript@5.9.3_vite@packages+vite_vue@3.5.30_typescript@5.9.3_/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
|
|
35
35
|
//#region src/node/cli-commands.d.ts
|
|
36
36
|
interface StartOptions {
|
|
37
37
|
root?: string;
|
|
@@ -41,7 +41,7 @@ interface StartOptions {
|
|
|
41
41
|
open?: boolean;
|
|
42
42
|
}
|
|
43
43
|
//#endregion
|
|
44
|
-
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.
|
|
44
|
+
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.5_typescript@5.9.3_vite@packages+vite_vue@3.5.30_typescript@5.9.3_/node_modules/@vitejs/devtools/dist/config.d.ts
|
|
45
45
|
//#region src/node/config.d.ts
|
|
46
46
|
interface DevToolsConfig extends Partial<StartOptions> {
|
|
47
47
|
enabled: boolean;
|
|
@@ -55,6 +55,13 @@ interface DevToolsConfig extends Partial<StartOptions> {
|
|
|
55
55
|
* @default true
|
|
56
56
|
*/
|
|
57
57
|
clientAuth?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Pre-configured auth tokens that are automatically trusted.
|
|
60
|
+
*
|
|
61
|
+
* Clients connecting with an auth token matching one of these
|
|
62
|
+
* will be auto-approved without a terminal prompt.
|
|
63
|
+
*/
|
|
64
|
+
clientAuthTokens?: string[];
|
|
58
65
|
}
|
|
59
66
|
interface ResolvedDevToolsConfig {
|
|
60
67
|
config: Omit<DevToolsConfig, 'enabled'> & {
|
|
@@ -88,7 +88,7 @@ const isAbsolute = function(p) {
|
|
|
88
88
|
}, dirname = function(p) {
|
|
89
89
|
let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
90
90
|
return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
91
|
-
}, decodeBase64 = typeof
|
|
91
|
+
}, textDecoder = new TextDecoder(), decodeBase64 = typeof Buffer == "function" && typeof Buffer.from == "function" ? (base64) => Buffer.from(base64, "base64").toString("utf-8") : (base64) => textDecoder.decode(Uint8Array.from(atob(base64), (c) => c.charCodeAt(0))), percentRegEx = /%/g, backslashRegEx = /\\/g, newlineRegEx = /\n/g, carriageReturnRegEx = /\r/g, tabRegEx = /\t/g, questionRegex = /\?/g, hashRegex = /#/g;
|
|
92
92
|
function encodePathChars(filepath) {
|
|
93
93
|
return filepath.indexOf("%") !== -1 && (filepath = filepath.replace(percentRegEx, "%25")), !isWindows && filepath.indexOf("\\") !== -1 && (filepath = filepath.replace(backslashRegEx, "%5C")), filepath.indexOf("\n") !== -1 && (filepath = filepath.replace(newlineRegEx, "%0A")), filepath.indexOf("\r") !== -1 && (filepath = filepath.replace(carriageReturnRegEx, "%0D")), filepath.indexOf(" ") !== -1 && (filepath = filepath.replace(tabRegEx, "%09")), filepath;
|
|
94
94
|
}
|
|
@@ -749,10 +749,14 @@ function createHMRHandlerForRunner(runner) {
|
|
|
749
749
|
let { triggeredBy } = payload, clearEntrypointUrls = triggeredBy ? getModulesEntrypoints(runner, getModulesByFile(runner, slash(triggeredBy))) : findAllEntrypoints(runner);
|
|
750
750
|
if (!clearEntrypointUrls.size) break;
|
|
751
751
|
hmrClient.logger.debug("program reload"), await hmrClient.notifyListeners("vite:beforeFullReload", payload), runner.evaluatedModules.clear();
|
|
752
|
-
for (let url of clearEntrypointUrls)
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
752
|
+
for (let url of clearEntrypointUrls) {
|
|
753
|
+
if (runner.isClosed()) break;
|
|
754
|
+
try {
|
|
755
|
+
await runner.import(url);
|
|
756
|
+
} catch (err) {
|
|
757
|
+
if (runner.isClosed()) break;
|
|
758
|
+
err.code !== "ERR_OUTDATED_OPTIMIZED_DEP" && hmrClient.logger.error(`An error happened during full reload\n${err.message}\n${err.stack}`);
|
|
759
|
+
}
|
|
756
760
|
}
|
|
757
761
|
break;
|
|
758
762
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -61,16 +61,16 @@
|
|
|
61
61
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"lightningcss": "^1.32.0",
|
|
64
|
-
"picomatch": "^4.0.
|
|
64
|
+
"picomatch": "^4.0.4",
|
|
65
65
|
"postcss": "^8.5.8",
|
|
66
|
-
"rolldown": "1.0.0-rc.
|
|
66
|
+
"rolldown": "1.0.0-rc.12",
|
|
67
67
|
"tinyglobby": "^0.2.15"
|
|
68
68
|
},
|
|
69
69
|
"optionalDependencies": {
|
|
70
70
|
"fsevents": "~2.3.3"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@babel/parser": "^7.29.
|
|
73
|
+
"@babel/parser": "^7.29.2",
|
|
74
74
|
"@jridgewell/remapping": "^2.3.5",
|
|
75
75
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
76
76
|
"@polka/compression": "^1.0.0-next.25",
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
"@types/escape-html": "^1.0.4",
|
|
82
82
|
"@types/pnpapi": "^0.0.5",
|
|
83
83
|
"@vitest/utils": "4.1.0",
|
|
84
|
-
"@vitejs/devtools": "^0.1.
|
|
84
|
+
"@vitejs/devtools": "^0.1.5",
|
|
85
85
|
"artichokie": "^0.4.2",
|
|
86
|
-
"baseline-browser-mapping": "^2.10.
|
|
86
|
+
"baseline-browser-mapping": "^2.10.10",
|
|
87
87
|
"cac": "^7.0.0",
|
|
88
88
|
"chokidar": "^3.6.0",
|
|
89
89
|
"connect": "^3.7.0",
|
|
@@ -98,9 +98,9 @@
|
|
|
98
98
|
"etag": "^1.8.1",
|
|
99
99
|
"host-validation-middleware": "^0.1.2",
|
|
100
100
|
"http-proxy-3": "^1.23.2",
|
|
101
|
-
"launch-editor-middleware": "^2.13.
|
|
101
|
+
"launch-editor-middleware": "^2.13.2",
|
|
102
102
|
"magic-string": "^0.30.21",
|
|
103
|
-
"mlly": "^1.8.
|
|
103
|
+
"mlly": "^1.8.2",
|
|
104
104
|
"mrmime": "^2.0.1",
|
|
105
105
|
"nanoid": "^5.1.7",
|
|
106
106
|
"obug": "^1.0.2",
|
|
@@ -121,9 +121,9 @@
|
|
|
121
121
|
"sass-embedded": "^1.98.0",
|
|
122
122
|
"sirv": "^3.0.2",
|
|
123
123
|
"strip-literal": "^3.1.0",
|
|
124
|
-
"terser": "^5.46.
|
|
124
|
+
"terser": "^5.46.1",
|
|
125
125
|
"ufo": "^1.6.3",
|
|
126
|
-
"ws": "^8.
|
|
126
|
+
"ws": "^8.20.0"
|
|
127
127
|
},
|
|
128
128
|
"peerDependencies": {
|
|
129
129
|
"@types/node": "^20.19.0 || >=22.12.0",
|