vite 8.1.4 → 8.2.0-beta.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.
- package/LICENSE.md +35 -0
- package/dist/client/bundledDevClient.mjs +1455 -0
- package/dist/client/client.mjs +52 -83
- package/dist/node/chunks/build.js +64 -27
- package/dist/node/chunks/moduleRunnerTransport.d.ts +25 -26
- package/dist/node/chunks/node.js +1145 -337
- package/dist/node/chunks/postcss-import.js +10 -10
- package/dist/node/index.d.ts +1334 -1294
- package/dist/node/module-runner.d.ts +76 -77
- package/dist/node/module-runner.js +18 -14
- package/package.json +14 -14
- package/types/customEvent.d.ts +1 -1
- package/types/hmrPayload.d.ts +20 -6
package/dist/client/client.mjs
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import "@vite/env";
|
|
2
|
-
//#region
|
|
3
|
-
let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
4
|
-
let nanoid = (size = 21) => {
|
|
5
|
-
let id = "";
|
|
6
|
-
let i = size | 0;
|
|
7
|
-
while (i-- > 0) id += urlAlphabet[Math.random() * 64 | 0];
|
|
8
|
-
return id;
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/typeof.js
|
|
2
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/typeof.js
|
|
12
3
|
function _typeof(o) {
|
|
13
4
|
"@babel/helpers - typeof";
|
|
14
5
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -18,7 +9,7 @@ function _typeof(o) {
|
|
|
18
9
|
}, _typeof(o);
|
|
19
10
|
}
|
|
20
11
|
//#endregion
|
|
21
|
-
//#region \0@oxc-project+runtime@0.
|
|
12
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/toPrimitive.js
|
|
22
13
|
function toPrimitive(t, r) {
|
|
23
14
|
if ("object" != _typeof(t) || !t) return t;
|
|
24
15
|
var e = t[Symbol.toPrimitive];
|
|
@@ -30,13 +21,13 @@ function toPrimitive(t, r) {
|
|
|
30
21
|
return ("string" === r ? String : Number)(t);
|
|
31
22
|
}
|
|
32
23
|
//#endregion
|
|
33
|
-
//#region \0@oxc-project+runtime@0.
|
|
24
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/toPropertyKey.js
|
|
34
25
|
function toPropertyKey(t) {
|
|
35
26
|
var i = toPrimitive(t, "string");
|
|
36
27
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
37
28
|
}
|
|
38
29
|
//#endregion
|
|
39
|
-
//#region \0@oxc-project+runtime@0.
|
|
30
|
+
//#region \0@oxc-project+runtime@0.140.0/helpers/esm/defineProperty.js
|
|
40
31
|
function _defineProperty(e, r, t) {
|
|
41
32
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
42
33
|
value: t,
|
|
@@ -171,14 +162,18 @@ var HMRClient = class {
|
|
|
171
162
|
this.ctxToListenersMap.clear();
|
|
172
163
|
}
|
|
173
164
|
async prunePaths(paths) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
165
|
+
try {
|
|
166
|
+
await Promise.all(paths.map((path) => {
|
|
167
|
+
const disposer = this.disposeMap.get(path);
|
|
168
|
+
if (disposer) return disposer(this.dataMap.get(path));
|
|
169
|
+
}));
|
|
170
|
+
await Promise.all(paths.map((path) => {
|
|
171
|
+
const fn = this.pruneMap.get(path);
|
|
172
|
+
if (fn) return fn(this.dataMap.get(path));
|
|
173
|
+
}));
|
|
174
|
+
} finally {
|
|
175
|
+
paths.forEach((path) => this.dataMap.delete(path));
|
|
176
|
+
}
|
|
182
177
|
}
|
|
183
178
|
warnFailedUpdate(err, path) {
|
|
184
179
|
if (!(err instanceof Error) || !err.message.includes("fetch")) this.logger.error(err);
|
|
@@ -229,6 +224,15 @@ var HMRClient = class {
|
|
|
229
224
|
}
|
|
230
225
|
};
|
|
231
226
|
//#endregion
|
|
227
|
+
//#region ../../node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/non-secure/index.js
|
|
228
|
+
let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
229
|
+
let nanoid = (size = 21) => {
|
|
230
|
+
let id = "";
|
|
231
|
+
let i = size | 0;
|
|
232
|
+
while (i-- > 0) id += urlAlphabet[Math.random() * 64 | 0];
|
|
233
|
+
return id;
|
|
234
|
+
};
|
|
235
|
+
//#endregion
|
|
232
236
|
//#region src/shared/constants.ts
|
|
233
237
|
let SOURCEMAPPING_URL = "sourceMa";
|
|
234
238
|
SOURCEMAPPING_URL += "ppingURL";
|
|
@@ -696,7 +700,7 @@ pre.frame {
|
|
|
696
700
|
|
|
697
701
|
.message {
|
|
698
702
|
line-height: 1.3;
|
|
699
|
-
font-weight:
|
|
703
|
+
font-weight: 400;
|
|
700
704
|
white-space: pre-wrap;
|
|
701
705
|
}
|
|
702
706
|
|
|
@@ -858,7 +862,6 @@ const directSocketHost = __HMR_DIRECT_TARGET__;
|
|
|
858
862
|
const base = __BASE__ || "/";
|
|
859
863
|
const hmrTimeout = __HMR_TIMEOUT__;
|
|
860
864
|
const wsToken = __WS_TOKEN__;
|
|
861
|
-
const isBundleMode = __BUNDLED_DEV__;
|
|
862
865
|
const forwardConsole = __SERVER_FORWARD_CONSOLE__;
|
|
863
866
|
const transport = normalizeModuleRunnerTransport((() => {
|
|
864
867
|
let wsTransport = createWebSocketModuleRunnerTransport({
|
|
@@ -928,14 +931,7 @@ const pageReload = debounceReload(20);
|
|
|
928
931
|
const hmrClient = new HMRClient({
|
|
929
932
|
error: (err) => console.error("[vite]", err),
|
|
930
933
|
debug: (...msg) => console.debug("[vite]", ...msg)
|
|
931
|
-
}, transport,
|
|
932
|
-
const importPromise = import(base + url).then(() => globalThis.__rolldown_runtime__.loadExports(acceptedPath));
|
|
933
|
-
if (isWithinCircularImport) importPromise.catch(() => {
|
|
934
|
-
console.info(`[hmr] ${acceptedPath} failed to apply HMR as it's within a circular import. Reloading page to reset the execution order. To debug and break the circular import, you can run \`vite --debug hmr\` to log the circular dependency path if a file change triggered it.`);
|
|
935
|
-
pageReload();
|
|
936
|
-
});
|
|
937
|
-
return await importPromise;
|
|
938
|
-
} : async function importUpdatedModule({ acceptedPath, timestamp, explicitImportRequired, isWithinCircularImport }) {
|
|
934
|
+
}, transport, async function importUpdatedModule({ acceptedPath, timestamp, explicitImportRequired, isWithinCircularImport }) {
|
|
939
935
|
const [acceptedPathWithoutQuery, query] = acceptedPath.split(`?`);
|
|
940
936
|
const importPromise = import(
|
|
941
937
|
/* @vite-ignore */
|
|
@@ -947,22 +943,32 @@ const hmrClient = new HMRClient({
|
|
|
947
943
|
});
|
|
948
944
|
return await importPromise;
|
|
949
945
|
});
|
|
946
|
+
let bundledDevClient;
|
|
950
947
|
transport.connect(createHMRHandler(handleMessage));
|
|
951
948
|
setupForwardConsoleHandler(transport, forwardConsole);
|
|
949
|
+
function clearOverlayOrReloadOnFirstUpdate() {
|
|
950
|
+
if (hasDocument) {
|
|
951
|
+
if (isFirstUpdate && hasErrorOverlay()) {
|
|
952
|
+
location.reload();
|
|
953
|
+
return "reload";
|
|
954
|
+
}
|
|
955
|
+
if (enableOverlay) clearErrorOverlay();
|
|
956
|
+
isFirstUpdate = false;
|
|
957
|
+
}
|
|
958
|
+
return "continue";
|
|
959
|
+
}
|
|
952
960
|
async function handleMessage(payload) {
|
|
961
|
+
const activeHmrClient = hmrClient;
|
|
953
962
|
switch (payload.type) {
|
|
954
963
|
case "connected":
|
|
955
964
|
console.debug(`[vite] connected.`);
|
|
956
965
|
break;
|
|
966
|
+
case "bundled-dev-update":
|
|
967
|
+
bundledDevClient.handlePush(payload);
|
|
968
|
+
break;
|
|
957
969
|
case "update":
|
|
958
|
-
await
|
|
959
|
-
if (
|
|
960
|
-
location.reload();
|
|
961
|
-
return;
|
|
962
|
-
} else {
|
|
963
|
-
if (enableOverlay) clearErrorOverlay();
|
|
964
|
-
isFirstUpdate = false;
|
|
965
|
-
}
|
|
970
|
+
await activeHmrClient.notifyListeners("vite:beforeUpdate", payload);
|
|
971
|
+
if (clearOverlayOrReloadOnFirstUpdate() === "reload") return;
|
|
966
972
|
await Promise.all(payload.updates.map(async (update) => {
|
|
967
973
|
if (update.type === "js-update") return hmrClient.queueUpdate(update);
|
|
968
974
|
const { path, timestamp } = update;
|
|
@@ -984,10 +990,10 @@ async function handleMessage(payload) {
|
|
|
984
990
|
el.after(newLinkTag);
|
|
985
991
|
});
|
|
986
992
|
}));
|
|
987
|
-
await
|
|
993
|
+
await activeHmrClient.notifyListeners("vite:afterUpdate", payload);
|
|
988
994
|
break;
|
|
989
995
|
case "custom":
|
|
990
|
-
await
|
|
996
|
+
await activeHmrClient.notifyListeners(payload.event, payload.data);
|
|
991
997
|
if (payload.event === "vite:ws:disconnect") {
|
|
992
998
|
if (hasDocument && !willUnload) {
|
|
993
999
|
console.log(`[vite] server connection lost. Polling for restart...`);
|
|
@@ -1000,7 +1006,8 @@ async function handleMessage(payload) {
|
|
|
1000
1006
|
}
|
|
1001
1007
|
break;
|
|
1002
1008
|
case "full-reload":
|
|
1003
|
-
|
|
1009
|
+
if (payload.ifFallback && !globalThis.__vite_is_fallback_page__) break;
|
|
1010
|
+
await activeHmrClient.notifyListeners("vite:beforeFullReload", payload);
|
|
1004
1011
|
if (hasDocument) if (payload.path && payload.path.endsWith(".html")) {
|
|
1005
1012
|
const pagePath = decodeURI(location.pathname);
|
|
1006
1013
|
const payloadPath = base + payload.path.slice(1);
|
|
@@ -1009,11 +1016,11 @@ async function handleMessage(payload) {
|
|
|
1009
1016
|
} else pageReload();
|
|
1010
1017
|
break;
|
|
1011
1018
|
case "prune":
|
|
1012
|
-
await
|
|
1013
|
-
await
|
|
1019
|
+
await activeHmrClient.notifyListeners("vite:beforePrune", payload);
|
|
1020
|
+
await activeHmrClient.prunePaths(payload.paths);
|
|
1014
1021
|
break;
|
|
1015
1022
|
case "error":
|
|
1016
|
-
await
|
|
1023
|
+
await activeHmrClient.notifyListeners("vite:error", payload);
|
|
1017
1024
|
if (hasDocument) {
|
|
1018
1025
|
const err = payload.err;
|
|
1019
1026
|
if (enableOverlay) createErrorOverlay(err);
|
|
@@ -1227,43 +1234,5 @@ function injectQuery(url, queryToInject) {
|
|
|
1227
1234
|
const { search, hash } = new URL(url, "http://vite.dev");
|
|
1228
1235
|
return `${pathname}?${queryToInject}${search ? `&` + search.slice(1) : ""}${hash || ""}`;
|
|
1229
1236
|
}
|
|
1230
|
-
if (isBundleMode && typeof DevRuntime !== "undefined") {
|
|
1231
|
-
var _ref;
|
|
1232
|
-
class ViteDevRuntime extends DevRuntime {
|
|
1233
|
-
createModuleHotContext(moduleId) {
|
|
1234
|
-
const ctx = createHotContext(moduleId);
|
|
1235
|
-
ctx._internal = {
|
|
1236
|
-
updateStyle,
|
|
1237
|
-
removeStyle
|
|
1238
|
-
};
|
|
1239
|
-
return ctx;
|
|
1240
|
-
}
|
|
1241
|
-
applyUpdates(_boundaries) {}
|
|
1242
|
-
}
|
|
1243
|
-
const clientId = nanoid();
|
|
1244
|
-
transport.send({
|
|
1245
|
-
type: "custom",
|
|
1246
|
-
event: "vite:module-loaded",
|
|
1247
|
-
data: {
|
|
1248
|
-
modules: [],
|
|
1249
|
-
clientId
|
|
1250
|
-
}
|
|
1251
|
-
});
|
|
1252
|
-
(_ref = globalThis).__rolldown_runtime__ ?? (_ref.__rolldown_runtime__ = new ViteDevRuntime({ send(message) {
|
|
1253
|
-
switch (message.type) {
|
|
1254
|
-
case "hmr:module-registered":
|
|
1255
|
-
transport.send({
|
|
1256
|
-
type: "custom",
|
|
1257
|
-
event: "vite:module-loaded",
|
|
1258
|
-
data: {
|
|
1259
|
-
modules: message.modules.slice(),
|
|
1260
|
-
clientId
|
|
1261
|
-
}
|
|
1262
|
-
});
|
|
1263
|
-
break;
|
|
1264
|
-
default: throw new Error(`Unknown message type: ${JSON.stringify(message)}`);
|
|
1265
|
-
}
|
|
1266
|
-
} }, clientId));
|
|
1267
|
-
}
|
|
1268
1237
|
//#endregion
|
|
1269
1238
|
export { ErrorOverlay, createHotContext, injectQuery, removeStyle, updateStyle };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ft as __commonJSMin, pt as __require } from "./node.js";
|
|
2
2
|
import { t as require_lib } from "./lib.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/postcss-modules@9.0.
|
|
3
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.20/node_modules/postcss-modules/build/fs.js
|
|
4
4
|
var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
function _export(target, all) {
|
|
@@ -34,7 +34,7 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
34
34
|
}
|
|
35
35
|
}));
|
|
36
36
|
//#endregion
|
|
37
|
-
//#region ../../node_modules/.pnpm/postcss-modules@9.0.
|
|
37
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.20/node_modules/postcss-modules/build/unquote.js
|
|
38
38
|
var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
Object.defineProperty(exports, "default", {
|
|
@@ -52,7 +52,7 @@ var require_unquote = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
52
52
|
}
|
|
53
53
|
}));
|
|
54
54
|
//#endregion
|
|
55
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
55
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.20/node_modules/icss-utils/src/replaceValueSymbols.js
|
|
56
56
|
var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
57
57
|
const matchValueName = /[$]?[\w-]+/g;
|
|
58
58
|
const replaceValueSymbols = (value, replacements) => {
|
|
@@ -69,7 +69,7 @@ var require_replaceValueSymbols = /* @__PURE__ */ __commonJSMin(((exports, modul
|
|
|
69
69
|
module.exports = replaceValueSymbols;
|
|
70
70
|
}));
|
|
71
71
|
//#endregion
|
|
72
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
72
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.20/node_modules/icss-utils/src/replaceSymbols.js
|
|
73
73
|
var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
74
74
|
const replaceValueSymbols = require_replaceValueSymbols();
|
|
75
75
|
const replaceSymbols = (css, replacements) => {
|
|
@@ -82,7 +82,7 @@ var require_replaceSymbols = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
82
82
|
module.exports = replaceSymbols;
|
|
83
83
|
}));
|
|
84
84
|
//#endregion
|
|
85
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
85
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.20/node_modules/icss-utils/src/extractICSS.js
|
|
86
86
|
var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
87
87
|
const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/;
|
|
88
88
|
const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/;
|
|
@@ -136,7 +136,7 @@ var require_extractICSS = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
136
136
|
module.exports = extractICSS;
|
|
137
137
|
}));
|
|
138
138
|
//#endregion
|
|
139
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
139
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.20/node_modules/icss-utils/src/createICSSRules.js
|
|
140
140
|
var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
141
141
|
const createImports = (imports, postcss, mode = "rule") => {
|
|
142
142
|
return Object.keys(imports).map((path) => {
|
|
@@ -180,7 +180,7 @@ var require_createICSSRules = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
180
180
|
module.exports = createICSSRules;
|
|
181
181
|
}));
|
|
182
182
|
//#endregion
|
|
183
|
-
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.
|
|
183
|
+
//#region ../../node_modules/.pnpm/icss-utils@5.1.0_postcss@8.5.20/node_modules/icss-utils/src/index.js
|
|
184
184
|
var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
185
185
|
module.exports = {
|
|
186
186
|
replaceValueSymbols: require_replaceValueSymbols(),
|
|
@@ -190,7 +190,7 @@ var require_src$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
190
190
|
};
|
|
191
191
|
}));
|
|
192
192
|
//#endregion
|
|
193
|
-
//#region ../../node_modules/.pnpm/postcss-modules@9.0.
|
|
193
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.20/node_modules/postcss-modules/build/Parser.js
|
|
194
194
|
var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
195
195
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
196
196
|
Object.defineProperty(exports, "default", {
|
|
@@ -262,7 +262,7 @@ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
262
262
|
};
|
|
263
263
|
}));
|
|
264
264
|
//#endregion
|
|
265
|
-
//#region ../../node_modules/.pnpm/postcss-modules@9.0.
|
|
265
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.20/node_modules/postcss-modules/build/saveJSON.js
|
|
266
266
|
var require_saveJSON = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
267
267
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
268
268
|
Object.defineProperty(exports, "default", {
|
|
@@ -289,19 +289,53 @@ var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
289
289
|
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
290
290
|
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
291
291
|
/** Used to compose unicode character classes. */
|
|
292
|
-
var rsAstralRange = "\\ud800-\\udfff"
|
|
292
|
+
var rsAstralRange = "\\ud800-\\udfff";
|
|
293
|
+
var rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23";
|
|
294
|
+
var rsComboSymbolsRange = "\\u20d0-\\u20f0";
|
|
295
|
+
var rsDingbatRange = "\\u2700-\\u27bf";
|
|
296
|
+
var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff";
|
|
297
|
+
var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7";
|
|
298
|
+
var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf";
|
|
299
|
+
var rsPunctuationRange = "\\u2000-\\u206f";
|
|
300
|
+
var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000";
|
|
301
|
+
var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde";
|
|
302
|
+
var rsVarRange = "\\ufe0e\\ufe0f";
|
|
303
|
+
var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
293
304
|
/** Used to compose unicode capture groups. */
|
|
294
|
-
var rsApos = "['’]"
|
|
305
|
+
var rsApos = "['’]";
|
|
306
|
+
var rsAstral = "[" + rsAstralRange + "]";
|
|
307
|
+
var rsBreak = "[" + rsBreakRange + "]";
|
|
308
|
+
var rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]";
|
|
309
|
+
var rsDigits = "\\d+";
|
|
310
|
+
var rsDingbat = "[" + rsDingbatRange + "]";
|
|
311
|
+
var rsLower = "[" + rsLowerRange + "]";
|
|
312
|
+
var rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]";
|
|
313
|
+
var rsFitz = "\\ud83c[\\udffb-\\udfff]";
|
|
314
|
+
var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
|
|
315
|
+
var rsNonAstral = "[^" + rsAstralRange + "]";
|
|
316
|
+
var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
|
|
317
|
+
var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
|
|
318
|
+
var rsUpper = "[" + rsUpperRange + "]";
|
|
319
|
+
var rsZWJ = "\\u200d";
|
|
295
320
|
/** Used to compose unicode regexes. */
|
|
296
|
-
var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")"
|
|
321
|
+
var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")";
|
|
322
|
+
var rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")";
|
|
323
|
+
var rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?";
|
|
324
|
+
var rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?";
|
|
325
|
+
var reOptMod = rsModifier + "?";
|
|
326
|
+
var rsOptVar = "[" + rsVarRange + "]?";
|
|
327
|
+
var rsOptJoin = "(?:" + rsZWJ + "(?:" + [
|
|
297
328
|
rsNonAstral,
|
|
298
329
|
rsRegional,
|
|
299
330
|
rsSurrPair
|
|
300
|
-
].join("|") + ")" + rsOptVar + reOptMod + ")*"
|
|
331
|
+
].join("|") + ")" + rsOptVar + reOptMod + ")*";
|
|
332
|
+
var rsSeq = rsOptVar + reOptMod + rsOptJoin;
|
|
333
|
+
var rsEmoji = "(?:" + [
|
|
301
334
|
rsDingbat,
|
|
302
335
|
rsRegional,
|
|
303
336
|
rsSurrPair
|
|
304
|
-
].join("|") + ")" + rsSeq
|
|
337
|
+
].join("|") + ")" + rsSeq;
|
|
338
|
+
var rsSymbol = "(?:" + [
|
|
305
339
|
rsNonAstral + rsCombo + "?",
|
|
306
340
|
rsCombo,
|
|
307
341
|
rsRegional,
|
|
@@ -651,7 +685,8 @@ var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
651
685
|
/** Built-in value references. */
|
|
652
686
|
var Symbol = root.Symbol;
|
|
653
687
|
/** Used to convert symbols to primitives and strings. */
|
|
654
|
-
var symbolProto = Symbol ? Symbol.prototype : void 0
|
|
688
|
+
var symbolProto = Symbol ? Symbol.prototype : void 0;
|
|
689
|
+
var symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
655
690
|
/**
|
|
656
691
|
* The base implementation of `_.slice` without an iteratee call guard.
|
|
657
692
|
*
|
|
@@ -909,7 +944,7 @@ var require_lodash_camelcase = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
909
944
|
module.exports = camelCase;
|
|
910
945
|
}));
|
|
911
946
|
//#endregion
|
|
912
|
-
//#region ../../node_modules/.pnpm/postcss-modules@9.0.
|
|
947
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.20/node_modules/postcss-modules/build/localsConvention.js
|
|
913
948
|
var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
914
949
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
915
950
|
Object.defineProperty(exports, "makeLocalsConventionReducer", {
|
|
@@ -966,7 +1001,7 @@ var require_localsConvention = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
966
1001
|
}
|
|
967
1002
|
}));
|
|
968
1003
|
//#endregion
|
|
969
|
-
//#region ../../node_modules/.pnpm/postcss-modules@9.0.
|
|
1004
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.20/node_modules/postcss-modules/build/FileSystemLoader.js
|
|
970
1005
|
var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
971
1006
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
972
1007
|
Object.defineProperty(exports, "default", {
|
|
@@ -1055,7 +1090,7 @@ var require_FileSystemLoader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1055
1090
|
};
|
|
1056
1091
|
}));
|
|
1057
1092
|
//#endregion
|
|
1058
|
-
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.
|
|
1093
|
+
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.20/node_modules/postcss-modules-extract-imports/src/topologicalSort.js
|
|
1059
1094
|
var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1060
1095
|
const PERMANENT_MARKER = 2;
|
|
1061
1096
|
const TEMPORARY_MARKER = 1;
|
|
@@ -1094,7 +1129,7 @@ var require_topologicalSort = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
1094
1129
|
module.exports = topologicalSort;
|
|
1095
1130
|
}));
|
|
1096
1131
|
//#endregion
|
|
1097
|
-
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.
|
|
1132
|
+
//#region ../../node_modules/.pnpm/postcss-modules-extract-imports@3.1.0_postcss@8.5.20/node_modules/postcss-modules-extract-imports/src/index.js
|
|
1098
1133
|
var require_src$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1099
1134
|
const topologicalSort = require_topologicalSort();
|
|
1100
1135
|
const matchImports = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/;
|
|
@@ -3250,7 +3285,8 @@ var require_tokenize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3250
3285
|
exports.FIELDS = void 0;
|
|
3251
3286
|
exports["default"] = tokenize;
|
|
3252
3287
|
var t = _interopRequireWildcard(require_tokenTypes());
|
|
3253
|
-
var _unescapable
|
|
3288
|
+
var _unescapable;
|
|
3289
|
+
var _wordDelimiters;
|
|
3254
3290
|
function _getRequireWildcardCache(nodeInterop) {
|
|
3255
3291
|
if (typeof WeakMap !== "function") return null;
|
|
3256
3292
|
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
@@ -3490,7 +3526,8 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3490
3526
|
var tokens = _interopRequireWildcard(require_tokenTypes());
|
|
3491
3527
|
var types = _interopRequireWildcard(require_types());
|
|
3492
3528
|
var _util = require_util();
|
|
3493
|
-
var _WHITESPACE_TOKENS
|
|
3529
|
+
var _WHITESPACE_TOKENS;
|
|
3530
|
+
var _Object$assign;
|
|
3494
3531
|
function _getRequireWildcardCache(nodeInterop) {
|
|
3495
3532
|
if (typeof WeakMap !== "function") return null;
|
|
3496
3533
|
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
@@ -4603,7 +4640,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4603
4640
|
module.exports = exports.default;
|
|
4604
4641
|
}));
|
|
4605
4642
|
//#endregion
|
|
4606
|
-
//#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.
|
|
4643
|
+
//#region ../../node_modules/.pnpm/postcss-modules-local-by-default@4.2.0_postcss@8.5.20/node_modules/postcss-modules-local-by-default/src/index.js
|
|
4607
4644
|
var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4608
4645
|
const selectorParser = require_dist();
|
|
4609
4646
|
const valueParser = require_lib();
|
|
@@ -5001,7 +5038,7 @@ var require_src$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5001
5038
|
module.exports.postcss = true;
|
|
5002
5039
|
}));
|
|
5003
5040
|
//#endregion
|
|
5004
|
-
//#region ../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.
|
|
5041
|
+
//#region ../../node_modules/.pnpm/postcss-modules-scope@3.2.1_postcss@8.5.20/node_modules/postcss-modules-scope/src/index.js
|
|
5005
5042
|
var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5006
5043
|
const selectorParser = require_dist();
|
|
5007
5044
|
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -5181,7 +5218,7 @@ var require_string_hash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5181
5218
|
module.exports = hash;
|
|
5182
5219
|
}));
|
|
5183
5220
|
//#endregion
|
|
5184
|
-
//#region ../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.
|
|
5221
|
+
//#region ../../node_modules/.pnpm/postcss-modules-values@4.0.0_postcss@8.5.20/node_modules/postcss-modules-values/src/index.js
|
|
5185
5222
|
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5186
5223
|
const ICSSUtils = require_src$4();
|
|
5187
5224
|
const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/;
|
|
@@ -5268,7 +5305,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5268
5305
|
module.exports.postcss = true;
|
|
5269
5306
|
}));
|
|
5270
5307
|
//#endregion
|
|
5271
|
-
//#region ../../node_modules/.pnpm/postcss-modules@9.0.
|
|
5308
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.20/node_modules/postcss-modules/build/scoping.js
|
|
5272
5309
|
var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5273
5310
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5274
5311
|
function _export(target, all) {
|
|
@@ -5347,7 +5384,7 @@ var require_scoping = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5347
5384
|
}
|
|
5348
5385
|
}));
|
|
5349
5386
|
//#endregion
|
|
5350
|
-
//#region ../../node_modules/.pnpm/postcss-modules@9.0.
|
|
5387
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.20/node_modules/postcss-modules/build/pluginFactory.js
|
|
5351
5388
|
var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5352
5389
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5353
5390
|
Object.defineProperty(exports, "makePlugin", {
|
|
@@ -5429,7 +5466,7 @@ var require_pluginFactory = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5429
5466
|
}
|
|
5430
5467
|
}));
|
|
5431
5468
|
//#endregion
|
|
5432
|
-
//#region ../../node_modules/.pnpm/postcss-modules@9.0.
|
|
5469
|
+
//#region ../../node_modules/.pnpm/postcss-modules@9.0.1_postcss@8.5.20/node_modules/postcss-modules/build/index.js
|
|
5433
5470
|
var require_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5434
5471
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5435
5472
|
const _fs = __require("fs");
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HotPayload } from "#types/hmrPayload";
|
|
2
|
-
|
|
3
2
|
//#region src/shared/invokeMethods.d.ts
|
|
4
3
|
interface FetchFunctionOptions {
|
|
5
4
|
cached?: boolean;
|
|
@@ -8,47 +7,47 @@ interface FetchFunctionOptions {
|
|
|
8
7
|
type FetchResult = CachedFetchResult | ExternalFetchResult | ViteFetchResult;
|
|
9
8
|
interface CachedFetchResult {
|
|
10
9
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
* If the module is cached in the runner, this confirms
|
|
11
|
+
* it was not invalidated on the server side.
|
|
12
|
+
*/
|
|
14
13
|
cache: true;
|
|
15
14
|
}
|
|
16
15
|
interface ExternalFetchResult {
|
|
17
16
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
* The path to the externalized module starting with file://.
|
|
18
|
+
* By default this will be imported via a dynamic "import"
|
|
19
|
+
* instead of being transformed by Vite and loaded with the Vite runner.
|
|
20
|
+
*/
|
|
22
21
|
externalize: string;
|
|
23
22
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
* Type of the module. Used to determine if the import statement is correct.
|
|
24
|
+
* For example, if Vite needs to throw an error if a variable is not actually exported.
|
|
25
|
+
*/
|
|
27
26
|
type: "module" | "commonjs" | "builtin" | "network";
|
|
28
27
|
}
|
|
29
28
|
interface ViteFetchResult {
|
|
30
29
|
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
* Code that will be evaluated by the Vite runner.
|
|
31
|
+
* By default this will be wrapped in an async function.
|
|
32
|
+
*/
|
|
34
33
|
code: string;
|
|
35
34
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
* File path of the module on disk.
|
|
36
|
+
* This will be resolved as import.meta.url/filename.
|
|
37
|
+
* Will be `null` for virtual modules.
|
|
38
|
+
*/
|
|
40
39
|
file: string | null;
|
|
41
40
|
/**
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
* Module ID in the server module graph.
|
|
42
|
+
*/
|
|
44
43
|
id: string;
|
|
45
44
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
* Module URL used in the import.
|
|
46
|
+
*/
|
|
48
47
|
url: string;
|
|
49
48
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
* Invalidate module on the client side.
|
|
50
|
+
*/
|
|
52
51
|
invalidate: boolean;
|
|
53
52
|
}
|
|
54
53
|
type InvokeMethods = {
|
|
@@ -69,8 +68,8 @@ type ModuleRunnerTransportHandlers = {
|
|
|
69
68
|
onDisconnection: () => void;
|
|
70
69
|
};
|
|
71
70
|
/**
|
|
72
|
-
* "send and connect" or "invoke" must be implemented
|
|
73
|
-
*/
|
|
71
|
+
* "send and connect" or "invoke" must be implemented
|
|
72
|
+
*/
|
|
74
73
|
interface ModuleRunnerTransport {
|
|
75
74
|
connect?(handlers: ModuleRunnerTransportHandlers): Promise<void> | void;
|
|
76
75
|
disconnect?(): Promise<void> | void;
|