vite 7.2.3 → 7.2.4
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 +46 -22
- package/dist/client/client.mjs +4 -4
- package/dist/node/chunks/build2.js +1 -1
- package/dist/node/chunks/chunk.js +7 -28
- package/dist/node/chunks/config.js +1332 -946
- package/dist/node/chunks/logger.js +1 -1
- package/dist/node/chunks/postcss-import.js +1 -1
- package/dist/node/cli.js +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as __toESM, n as __require, r as __toDynamicImportESM, t as __commonJS } from "./chunk.js";
|
|
2
2
|
import { A as OPTIMIZABLE_ENTRY_RE, C as ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, D as JS_TYPES_RE, E as FS_PREFIX, F as defaultAllowedOrigins, I as loopbackHosts, L as wildcardHosts, M as SPECIAL_QUERY_RE, N as VERSION, O as KNOWN_ASSET_TYPES, P as VITE_PACKAGE_DIR, R as require_picocolors, S as ENV_PUBLIC_PATH, T as ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, _ as DEFAULT_SERVER_CONDITIONS, a as CLIENT_ENTRY, b as DEV_PROD_CONDITION, c as DEFAULT_ASSETS_INLINE_LIMIT, d as DEFAULT_CLIENT_MAIN_FIELDS, f as DEFAULT_CONFIG_FILES, g as DEFAULT_PREVIEW_PORT, h as DEFAULT_EXTERNAL_CONDITIONS, i as CLIENT_DIR, j as ROLLUP_HOOKS, k as METADATA_FILENAME, l as DEFAULT_ASSETS_RE, m as DEFAULT_EXTENSIONS, n as createLogger, o as CLIENT_PUBLIC_PATH, p as DEFAULT_DEV_PORT, r as printServerUrls, s as CSS_LANGS_RE, t as LogLevels, u as DEFAULT_CLIENT_CONDITIONS, v as DEFAULT_SERVER_MAIN_FIELDS, w as ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, x as ENV_ENTRY, y as DEP_VERSION_RE } from "./logger.js";
|
|
3
3
|
import { builtinModules, createRequire } from "node:module";
|
|
4
4
|
import { parseAst, parseAstAsync } from "rollup/parseAst";
|
|
@@ -7,7 +7,7 @@ import fs, { existsSync, promises, readFileSync } from "node:fs";
|
|
|
7
7
|
import path, { basename, dirname, extname, isAbsolute, join, normalize, posix, relative, resolve, sep } from "node:path";
|
|
8
8
|
import fsp, { constants } from "node:fs/promises";
|
|
9
9
|
import { URL as URL$1, fileURLToPath, pathToFileURL } from "node:url";
|
|
10
|
-
import { format,
|
|
10
|
+
import { format, inspect, promisify, stripVTControlCharacters } from "node:util";
|
|
11
11
|
import { performance as performance$1 } from "node:perf_hooks";
|
|
12
12
|
import crypto from "node:crypto";
|
|
13
13
|
import picomatch from "picomatch";
|
|
@@ -16,7 +16,6 @@ import os from "node:os";
|
|
|
16
16
|
import net from "node:net";
|
|
17
17
|
import childProcess, { exec, execFile, execSync } from "node:child_process";
|
|
18
18
|
import { promises as promises$1 } from "node:dns";
|
|
19
|
-
import { isatty } from "node:tty";
|
|
20
19
|
import path$1, { basename as basename$1, dirname as dirname$1, extname as extname$1, isAbsolute as isAbsolute$1, join as join$1, posix as posix$1, relative as relative$1, resolve as resolve$1, sep as sep$1, win32 } from "path";
|
|
21
20
|
import { existsSync as existsSync$1, readFileSync as readFileSync$1, readdirSync, statSync } from "fs";
|
|
22
21
|
import { fdir } from "fdir";
|
|
@@ -586,7 +585,7 @@ function memoizedBinarySearch(haystack, needle, state, key) {
|
|
|
586
585
|
state.lastNeedle = needle;
|
|
587
586
|
return state.lastIndex = binarySearch(haystack, needle, low, high);
|
|
588
587
|
}
|
|
589
|
-
function parse$
|
|
588
|
+
function parse$16(map$1) {
|
|
590
589
|
return typeof map$1 === "string" ? JSON.parse(map$1) : map$1;
|
|
591
590
|
}
|
|
592
591
|
var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
|
|
@@ -597,11 +596,11 @@ var TraceMap = class {
|
|
|
597
596
|
constructor(map$1, mapUrl) {
|
|
598
597
|
const isString$1 = typeof map$1 === "string";
|
|
599
598
|
if (!isString$1 && map$1._decodedMemo) return map$1;
|
|
600
|
-
const parsed = parse$
|
|
601
|
-
const { version: version$2, file, names
|
|
599
|
+
const parsed = parse$16(map$1);
|
|
600
|
+
const { version: version$2, file, names, sourceRoot, sources, sourcesContent } = parsed;
|
|
602
601
|
this.version = version$2;
|
|
603
602
|
this.file = file;
|
|
604
|
-
this.names = names
|
|
603
|
+
this.names = names || [];
|
|
605
604
|
this.sourceRoot = sourceRoot;
|
|
606
605
|
this.sources = sources;
|
|
607
606
|
this.sourcesContent = sourcesContent;
|
|
@@ -652,8 +651,8 @@ function originalPositionFor(map$1, needle) {
|
|
|
652
651
|
if (index === -1) return OMapping(null, null, null, null);
|
|
653
652
|
const segment = segments[index];
|
|
654
653
|
if (segment.length === 1) return OMapping(null, null, null, null);
|
|
655
|
-
const { names
|
|
656
|
-
return OMapping(resolvedSources[segment[SOURCES_INDEX$1]], segment[SOURCE_LINE$1] + 1, segment[SOURCE_COLUMN$1], segment.length === 5 ? names
|
|
654
|
+
const { names, resolvedSources } = map$1;
|
|
655
|
+
return OMapping(resolvedSources[segment[SOURCES_INDEX$1]], segment[SOURCE_LINE$1] + 1, segment[SOURCE_COLUMN$1], segment.length === 5 ? names[segment[NAMES_INDEX$1]] : null);
|
|
657
656
|
}
|
|
658
657
|
function decodedMap(map$1) {
|
|
659
658
|
return clone(map$1, decodedMappings(map$1));
|
|
@@ -757,12 +756,12 @@ function setIgnore(map$1, source, ignore = true) {
|
|
|
757
756
|
else remove(ignoreList, index);
|
|
758
757
|
}
|
|
759
758
|
function toDecodedMap(map$1) {
|
|
760
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names
|
|
759
|
+
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList } = cast2(map$1);
|
|
761
760
|
removeEmptyFinalLines(mappings);
|
|
762
761
|
return {
|
|
763
762
|
version: 3,
|
|
764
763
|
file: map$1.file || void 0,
|
|
765
|
-
names: names
|
|
764
|
+
names: names.array,
|
|
766
765
|
sourceRoot: map$1.sourceRoot || void 0,
|
|
767
766
|
sources: sources.array,
|
|
768
767
|
sourcesContent,
|
|
@@ -775,7 +774,7 @@ function toEncodedMap(map$1) {
|
|
|
775
774
|
return Object.assign({}, decoded, { mappings: encode$1(decoded.mappings) });
|
|
776
775
|
}
|
|
777
776
|
function addSegmentInternal(skipable, map$1, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
|
|
778
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names
|
|
777
|
+
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = cast2(map$1);
|
|
779
778
|
const line = getIndex(mappings, genLine);
|
|
780
779
|
const index = getColumnIndex(line, genColumn);
|
|
781
780
|
if (!source) {
|
|
@@ -785,7 +784,7 @@ function addSegmentInternal(skipable, map$1, genLine, genColumn, source, sourceL
|
|
|
785
784
|
assert$2(sourceLine);
|
|
786
785
|
assert$2(sourceColumn);
|
|
787
786
|
const sourcesIndex = put(sources, source);
|
|
788
|
-
const namesIndex = name ? put(names
|
|
787
|
+
const namesIndex = name ? put(names, name) : NO_NAME;
|
|
789
788
|
if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
|
|
790
789
|
if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) return;
|
|
791
790
|
return insert(line, index, name ? [
|
|
@@ -897,7 +896,7 @@ function asArray(value$1) {
|
|
|
897
896
|
return [value$1];
|
|
898
897
|
}
|
|
899
898
|
function buildSourceMapTree(input, loader$1) {
|
|
900
|
-
const maps = asArray(input).map((m) => new TraceMap(m, ""));
|
|
899
|
+
const maps = asArray(input).map((m$2) => new TraceMap(m$2, ""));
|
|
901
900
|
const map$1 = maps.pop();
|
|
902
901
|
for (let i$1 = 0; i$1 < maps.length; i$1++) if (maps[i$1].sources.length > 1) throw new Error(`Transformation map ${i$1} must have exactly one source file.
|
|
903
902
|
Did you specify these with the most recent transformation maps first?`);
|
|
@@ -947,285 +946,534 @@ function remapping(input, loader$1, options$1) {
|
|
|
947
946
|
}
|
|
948
947
|
|
|
949
948
|
//#endregion
|
|
950
|
-
//#region ../../node_modules/.pnpm/
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
function
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
949
|
+
//#region ../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
|
|
950
|
+
var require_ms$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js": ((exports, module) => {
|
|
951
|
+
/**
|
|
952
|
+
* Helpers.
|
|
953
|
+
*/
|
|
954
|
+
var s$1 = 1e3;
|
|
955
|
+
var m$1 = s$1 * 60;
|
|
956
|
+
var h$1 = m$1 * 60;
|
|
957
|
+
var d$1 = h$1 * 24;
|
|
958
|
+
var w = d$1 * 7;
|
|
959
|
+
var y$1 = d$1 * 365.25;
|
|
960
|
+
/**
|
|
961
|
+
* Parse or format the given `val`.
|
|
962
|
+
*
|
|
963
|
+
* Options:
|
|
964
|
+
*
|
|
965
|
+
* - `long` verbose formatting [false]
|
|
966
|
+
*
|
|
967
|
+
* @param {String|Number} val
|
|
968
|
+
* @param {Object} [options]
|
|
969
|
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
970
|
+
* @return {String|Number}
|
|
971
|
+
* @api public
|
|
972
|
+
*/
|
|
973
|
+
module.exports = function(val, options$1) {
|
|
974
|
+
options$1 = options$1 || {};
|
|
975
|
+
var type = typeof val;
|
|
976
|
+
if (type === "string" && val.length > 0) return parse$15(val);
|
|
977
|
+
else if (type === "number" && isFinite(val)) return options$1.long ? fmtLong$1(val) : fmtShort$1(val);
|
|
978
|
+
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
|
|
979
|
+
};
|
|
980
|
+
/**
|
|
981
|
+
* Parse the given `str` and return milliseconds.
|
|
982
|
+
*
|
|
983
|
+
* @param {String} str
|
|
984
|
+
* @return {Number}
|
|
985
|
+
* @api private
|
|
986
|
+
*/
|
|
987
|
+
function parse$15(str) {
|
|
988
|
+
str = String(str);
|
|
989
|
+
if (str.length > 100) return;
|
|
990
|
+
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
|
|
991
|
+
if (!match) return;
|
|
992
|
+
var n$2 = parseFloat(match[1]);
|
|
993
|
+
switch ((match[2] || "ms").toLowerCase()) {
|
|
994
|
+
case "years":
|
|
995
|
+
case "year":
|
|
996
|
+
case "yrs":
|
|
997
|
+
case "yr":
|
|
998
|
+
case "y": return n$2 * y$1;
|
|
999
|
+
case "weeks":
|
|
1000
|
+
case "week":
|
|
1001
|
+
case "w": return n$2 * w;
|
|
1002
|
+
case "days":
|
|
1003
|
+
case "day":
|
|
1004
|
+
case "d": return n$2 * d$1;
|
|
1005
|
+
case "hours":
|
|
1006
|
+
case "hour":
|
|
1007
|
+
case "hrs":
|
|
1008
|
+
case "hr":
|
|
1009
|
+
case "h": return n$2 * h$1;
|
|
1010
|
+
case "minutes":
|
|
1011
|
+
case "minute":
|
|
1012
|
+
case "mins":
|
|
1013
|
+
case "min":
|
|
1014
|
+
case "m": return n$2 * m$1;
|
|
1015
|
+
case "seconds":
|
|
1016
|
+
case "second":
|
|
1017
|
+
case "secs":
|
|
1018
|
+
case "sec":
|
|
1019
|
+
case "s": return n$2 * s$1;
|
|
1020
|
+
case "milliseconds":
|
|
1021
|
+
case "millisecond":
|
|
1022
|
+
case "msecs":
|
|
1023
|
+
case "msec":
|
|
1024
|
+
case "ms": return n$2;
|
|
1025
|
+
default: return;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* Short format for `ms`.
|
|
1030
|
+
*
|
|
1031
|
+
* @param {Number} ms
|
|
1032
|
+
* @return {String}
|
|
1033
|
+
* @api private
|
|
1034
|
+
*/
|
|
1035
|
+
function fmtShort$1(ms) {
|
|
1036
|
+
var msAbs = Math.abs(ms);
|
|
1037
|
+
if (msAbs >= d$1) return Math.round(ms / d$1) + "d";
|
|
1038
|
+
if (msAbs >= h$1) return Math.round(ms / h$1) + "h";
|
|
1039
|
+
if (msAbs >= m$1) return Math.round(ms / m$1) + "m";
|
|
1040
|
+
if (msAbs >= s$1) return Math.round(ms / s$1) + "s";
|
|
1041
|
+
return ms + "ms";
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* Long format for `ms`.
|
|
1045
|
+
*
|
|
1046
|
+
* @param {Number} ms
|
|
1047
|
+
* @return {String}
|
|
1048
|
+
* @api private
|
|
1049
|
+
*/
|
|
1050
|
+
function fmtLong$1(ms) {
|
|
1051
|
+
var msAbs = Math.abs(ms);
|
|
1052
|
+
if (msAbs >= d$1) return plural$1(ms, msAbs, d$1, "day");
|
|
1053
|
+
if (msAbs >= h$1) return plural$1(ms, msAbs, h$1, "hour");
|
|
1054
|
+
if (msAbs >= m$1) return plural$1(ms, msAbs, m$1, "minute");
|
|
1055
|
+
if (msAbs >= s$1) return plural$1(ms, msAbs, s$1, "second");
|
|
1056
|
+
return ms + " ms";
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Pluralization helper.
|
|
1060
|
+
*/
|
|
1061
|
+
function plural$1(ms, msAbs, n$2, name) {
|
|
1062
|
+
var isPlural = msAbs >= n$2 * 1.5;
|
|
1063
|
+
return Math.round(ms / n$2) + " " + name + (isPlural ? "s" : "");
|
|
1064
|
+
}
|
|
1065
|
+
}) });
|
|
1066
|
+
|
|
1067
|
+
//#endregion
|
|
1068
|
+
//#region ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
|
|
1069
|
+
var require_common$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js": ((exports, module) => {
|
|
1070
|
+
/**
|
|
1071
|
+
* This is the common logic for both the Node.js and web browser
|
|
1072
|
+
* implementations of `debug()`.
|
|
1073
|
+
*/
|
|
1074
|
+
function setup(env$1) {
|
|
1075
|
+
createDebug$1.debug = createDebug$1;
|
|
1076
|
+
createDebug$1.default = createDebug$1;
|
|
1077
|
+
createDebug$1.coerce = coerce$1;
|
|
1078
|
+
createDebug$1.disable = disable$1;
|
|
1079
|
+
createDebug$1.enable = enable$1;
|
|
1080
|
+
createDebug$1.enabled = enabled$1;
|
|
1081
|
+
createDebug$1.humanize = require_ms$1();
|
|
1082
|
+
createDebug$1.destroy = destroy$1;
|
|
1083
|
+
Object.keys(env$1).forEach((key) => {
|
|
1084
|
+
createDebug$1[key] = env$1[key];
|
|
1085
|
+
});
|
|
1086
|
+
/**
|
|
1087
|
+
* The currently active debug mode names, and names to skip.
|
|
1088
|
+
*/
|
|
1089
|
+
createDebug$1.names = [];
|
|
1090
|
+
createDebug$1.skips = [];
|
|
1091
|
+
/**
|
|
1092
|
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
1093
|
+
*
|
|
1094
|
+
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
1095
|
+
*/
|
|
1096
|
+
createDebug$1.formatters = {};
|
|
1097
|
+
/**
|
|
1098
|
+
* Selects a color for a debug namespace
|
|
1099
|
+
* @param {String} namespace The namespace string for the debug instance to be colored
|
|
1100
|
+
* @return {Number|String} An ANSI color code for the given namespace
|
|
1101
|
+
* @api private
|
|
1102
|
+
*/
|
|
1103
|
+
function selectColor$1(namespace) {
|
|
1104
|
+
let hash$1 = 0;
|
|
1105
|
+
for (let i$1 = 0; i$1 < namespace.length; i$1++) {
|
|
1106
|
+
hash$1 = (hash$1 << 5) - hash$1 + namespace.charCodeAt(i$1);
|
|
1107
|
+
hash$1 |= 0;
|
|
1108
|
+
}
|
|
1109
|
+
return createDebug$1.colors[Math.abs(hash$1) % createDebug$1.colors.length];
|
|
1110
|
+
}
|
|
1111
|
+
createDebug$1.selectColor = selectColor$1;
|
|
1112
|
+
/**
|
|
1113
|
+
* Create a debugger with the given `namespace`.
|
|
1114
|
+
*
|
|
1115
|
+
* @param {String} namespace
|
|
1116
|
+
* @return {Function}
|
|
1117
|
+
* @api public
|
|
1118
|
+
*/
|
|
1119
|
+
function createDebug$1(namespace) {
|
|
1120
|
+
let prevTime$1;
|
|
1121
|
+
let enableOverride = null;
|
|
1122
|
+
let namespacesCache;
|
|
1123
|
+
let enabledCache;
|
|
1124
|
+
function debug$19(...args) {
|
|
1125
|
+
if (!debug$19.enabled) return;
|
|
1126
|
+
const self$1 = debug$19;
|
|
1127
|
+
const curr = Number(/* @__PURE__ */ new Date());
|
|
1128
|
+
self$1.diff = curr - (prevTime$1 || curr);
|
|
1129
|
+
self$1.prev = prevTime$1;
|
|
1130
|
+
self$1.curr = curr;
|
|
1131
|
+
prevTime$1 = curr;
|
|
1132
|
+
args[0] = createDebug$1.coerce(args[0]);
|
|
1133
|
+
if (typeof args[0] !== "string") args.unshift("%O");
|
|
1134
|
+
let index = 0;
|
|
1135
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format$3) => {
|
|
1136
|
+
if (match === "%%") return "%";
|
|
1137
|
+
index++;
|
|
1138
|
+
const formatter = createDebug$1.formatters[format$3];
|
|
1139
|
+
if (typeof formatter === "function") {
|
|
1140
|
+
const val = args[index];
|
|
1141
|
+
match = formatter.call(self$1, val);
|
|
1142
|
+
args.splice(index, 1);
|
|
1143
|
+
index--;
|
|
1144
|
+
}
|
|
1145
|
+
return match;
|
|
1146
|
+
});
|
|
1147
|
+
createDebug$1.formatArgs.call(self$1, args);
|
|
1148
|
+
(self$1.log || createDebug$1.log).apply(self$1, args);
|
|
1149
|
+
}
|
|
1150
|
+
debug$19.namespace = namespace;
|
|
1151
|
+
debug$19.useColors = createDebug$1.useColors();
|
|
1152
|
+
debug$19.color = createDebug$1.selectColor(namespace);
|
|
1153
|
+
debug$19.extend = extend;
|
|
1154
|
+
debug$19.destroy = createDebug$1.destroy;
|
|
1155
|
+
Object.defineProperty(debug$19, "enabled", {
|
|
1156
|
+
enumerable: true,
|
|
1157
|
+
configurable: false,
|
|
1158
|
+
get: () => {
|
|
1159
|
+
if (enableOverride !== null) return enableOverride;
|
|
1160
|
+
if (namespacesCache !== createDebug$1.namespaces) {
|
|
1161
|
+
namespacesCache = createDebug$1.namespaces;
|
|
1162
|
+
enabledCache = createDebug$1.enabled(namespace);
|
|
1163
|
+
}
|
|
1164
|
+
return enabledCache;
|
|
1165
|
+
},
|
|
1166
|
+
set: (v) => {
|
|
1167
|
+
enableOverride = v;
|
|
1013
1168
|
}
|
|
1014
|
-
return match;
|
|
1015
1169
|
});
|
|
1016
|
-
createDebug$
|
|
1017
|
-
|
|
1018
|
-
}
|
|
1019
|
-
function extend(namespace
|
|
1020
|
-
const newDebug = createDebug$
|
|
1170
|
+
if (typeof createDebug$1.init === "function") createDebug$1.init(debug$19);
|
|
1171
|
+
return debug$19;
|
|
1172
|
+
}
|
|
1173
|
+
function extend(namespace, delimiter) {
|
|
1174
|
+
const newDebug = createDebug$1(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
1021
1175
|
newDebug.log = this.log;
|
|
1022
1176
|
return newDebug;
|
|
1023
1177
|
}
|
|
1024
|
-
|
|
1025
|
-
debug
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1178
|
+
/**
|
|
1179
|
+
* Enables a debug mode by namespaces. This can include modes
|
|
1180
|
+
* separated by a colon and wildcards.
|
|
1181
|
+
*
|
|
1182
|
+
* @param {String} namespaces
|
|
1183
|
+
* @api public
|
|
1184
|
+
*/
|
|
1185
|
+
function enable$1(namespaces) {
|
|
1186
|
+
createDebug$1.save(namespaces);
|
|
1187
|
+
createDebug$1.namespaces = namespaces;
|
|
1188
|
+
createDebug$1.names = [];
|
|
1189
|
+
createDebug$1.skips = [];
|
|
1190
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
1191
|
+
for (const ns of split) if (ns[0] === "-") createDebug$1.skips.push(ns.slice(1));
|
|
1192
|
+
else createDebug$1.names.push(ns);
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* Checks if the given string matches a namespace template, honoring
|
|
1196
|
+
* asterisks as wildcards.
|
|
1197
|
+
*
|
|
1198
|
+
* @param {String} search
|
|
1199
|
+
* @param {String} template
|
|
1200
|
+
* @return {Boolean}
|
|
1201
|
+
*/
|
|
1202
|
+
function matchesTemplate(search, template) {
|
|
1203
|
+
let searchIndex = 0;
|
|
1204
|
+
let templateIndex = 0;
|
|
1205
|
+
let starIndex = -1;
|
|
1206
|
+
let matchIndex = 0;
|
|
1207
|
+
while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) if (template[templateIndex] === "*") {
|
|
1208
|
+
starIndex = templateIndex;
|
|
1209
|
+
matchIndex = searchIndex;
|
|
1210
|
+
templateIndex++;
|
|
1211
|
+
} else {
|
|
1212
|
+
searchIndex++;
|
|
1213
|
+
templateIndex++;
|
|
1042
1214
|
}
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1215
|
+
else if (starIndex !== -1) {
|
|
1216
|
+
templateIndex = starIndex + 1;
|
|
1217
|
+
matchIndex++;
|
|
1218
|
+
searchIndex = matchIndex;
|
|
1219
|
+
} else return false;
|
|
1220
|
+
while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++;
|
|
1221
|
+
return templateIndex === template.length;
|
|
1222
|
+
}
|
|
1223
|
+
/**
|
|
1224
|
+
* Disable debug output.
|
|
1225
|
+
*
|
|
1226
|
+
* @return {String} namespaces
|
|
1227
|
+
* @api public
|
|
1228
|
+
*/
|
|
1229
|
+
function disable$1() {
|
|
1230
|
+
const namespaces = [...createDebug$1.names, ...createDebug$1.skips.map((namespace) => "-" + namespace)].join(",");
|
|
1231
|
+
createDebug$1.enable("");
|
|
1232
|
+
return namespaces;
|
|
1233
|
+
}
|
|
1234
|
+
/**
|
|
1235
|
+
* Returns true if the given mode name is enabled, false otherwise.
|
|
1236
|
+
*
|
|
1237
|
+
* @param {String} name
|
|
1238
|
+
* @return {Boolean}
|
|
1239
|
+
* @api public
|
|
1240
|
+
*/
|
|
1241
|
+
function enabled$1(name) {
|
|
1242
|
+
for (const skip of createDebug$1.skips) if (matchesTemplate(name, skip)) return false;
|
|
1243
|
+
for (const ns of createDebug$1.names) if (matchesTemplate(name, ns)) return true;
|
|
1244
|
+
return false;
|
|
1245
|
+
}
|
|
1246
|
+
/**
|
|
1247
|
+
* Coerce `val`.
|
|
1248
|
+
*
|
|
1249
|
+
* @param {Mixed} val
|
|
1250
|
+
* @return {Mixed}
|
|
1251
|
+
* @api private
|
|
1252
|
+
*/
|
|
1253
|
+
function coerce$1(val) {
|
|
1254
|
+
if (val instanceof Error) return val.stack || val.message;
|
|
1255
|
+
return val;
|
|
1256
|
+
}
|
|
1257
|
+
/**
|
|
1258
|
+
* XXX DO NOT USE. This is a temporary stub function.
|
|
1259
|
+
* XXX It WILL be removed in the next major release.
|
|
1260
|
+
*/
|
|
1261
|
+
function destroy$1() {
|
|
1262
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
1263
|
+
}
|
|
1264
|
+
createDebug$1.enable(createDebug$1.load());
|
|
1265
|
+
return createDebug$1;
|
|
1065
1266
|
}
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
createDebug$3.enable = enable$2;
|
|
1069
|
-
createDebug$3.disable = disable$1;
|
|
1070
|
-
createDebug$3.enabled = enabled$1;
|
|
1071
|
-
createDebug$3.names = [];
|
|
1072
|
-
createDebug$3.skips = [];
|
|
1073
|
-
createDebug$3.selectColor = (ns) => selectColor$1(colors$37, ns);
|
|
1074
|
-
createDebug$3.formatArgs = formatArgs$2;
|
|
1075
|
-
createDebug$3.log = log$4;
|
|
1076
|
-
createDebug$3.enable(load$2());
|
|
1077
|
-
return createDebug$3;
|
|
1078
|
-
}
|
|
1267
|
+
module.exports = setup;
|
|
1268
|
+
}) });
|
|
1079
1269
|
|
|
1080
1270
|
//#endregion
|
|
1081
|
-
//#region ../../node_modules/.pnpm/
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
};
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
};
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1271
|
+
//#region ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
|
|
1272
|
+
var require_node$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js": ((exports, module) => {
|
|
1273
|
+
/**
|
|
1274
|
+
* Module dependencies.
|
|
1275
|
+
*/
|
|
1276
|
+
const tty$1 = __require("tty");
|
|
1277
|
+
const util$2 = __require("util");
|
|
1278
|
+
/**
|
|
1279
|
+
* This is the Node.js implementation of `debug()`.
|
|
1280
|
+
*/
|
|
1281
|
+
exports.init = init$2;
|
|
1282
|
+
exports.log = log$3;
|
|
1283
|
+
exports.formatArgs = formatArgs$1;
|
|
1284
|
+
exports.save = save$1;
|
|
1285
|
+
exports.load = load$2;
|
|
1286
|
+
exports.useColors = useColors$1;
|
|
1287
|
+
exports.destroy = util$2.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
1288
|
+
/**
|
|
1289
|
+
* Colors.
|
|
1290
|
+
*/
|
|
1291
|
+
exports.colors = [
|
|
1292
|
+
6,
|
|
1293
|
+
2,
|
|
1294
|
+
3,
|
|
1295
|
+
4,
|
|
1296
|
+
5,
|
|
1297
|
+
1
|
|
1298
|
+
];
|
|
1299
|
+
try {
|
|
1300
|
+
const supportsColor = __require("supports-color");
|
|
1301
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) exports.colors = [
|
|
1302
|
+
20,
|
|
1303
|
+
21,
|
|
1304
|
+
26,
|
|
1305
|
+
27,
|
|
1306
|
+
32,
|
|
1307
|
+
33,
|
|
1308
|
+
38,
|
|
1309
|
+
39,
|
|
1310
|
+
40,
|
|
1311
|
+
41,
|
|
1312
|
+
42,
|
|
1313
|
+
43,
|
|
1314
|
+
44,
|
|
1315
|
+
45,
|
|
1316
|
+
56,
|
|
1317
|
+
57,
|
|
1318
|
+
62,
|
|
1319
|
+
63,
|
|
1320
|
+
68,
|
|
1321
|
+
69,
|
|
1322
|
+
74,
|
|
1323
|
+
75,
|
|
1324
|
+
76,
|
|
1325
|
+
77,
|
|
1326
|
+
78,
|
|
1327
|
+
79,
|
|
1328
|
+
80,
|
|
1329
|
+
81,
|
|
1330
|
+
92,
|
|
1331
|
+
93,
|
|
1332
|
+
98,
|
|
1333
|
+
99,
|
|
1334
|
+
112,
|
|
1335
|
+
113,
|
|
1336
|
+
128,
|
|
1337
|
+
129,
|
|
1338
|
+
134,
|
|
1339
|
+
135,
|
|
1340
|
+
148,
|
|
1341
|
+
149,
|
|
1342
|
+
160,
|
|
1343
|
+
161,
|
|
1344
|
+
162,
|
|
1345
|
+
163,
|
|
1346
|
+
164,
|
|
1347
|
+
165,
|
|
1348
|
+
166,
|
|
1349
|
+
167,
|
|
1350
|
+
168,
|
|
1351
|
+
169,
|
|
1352
|
+
170,
|
|
1353
|
+
171,
|
|
1354
|
+
172,
|
|
1355
|
+
173,
|
|
1356
|
+
178,
|
|
1357
|
+
179,
|
|
1358
|
+
184,
|
|
1359
|
+
185,
|
|
1360
|
+
196,
|
|
1361
|
+
197,
|
|
1362
|
+
198,
|
|
1363
|
+
199,
|
|
1364
|
+
200,
|
|
1365
|
+
201,
|
|
1366
|
+
202,
|
|
1367
|
+
203,
|
|
1368
|
+
204,
|
|
1369
|
+
205,
|
|
1370
|
+
206,
|
|
1371
|
+
207,
|
|
1372
|
+
208,
|
|
1373
|
+
209,
|
|
1374
|
+
214,
|
|
1375
|
+
215,
|
|
1376
|
+
220,
|
|
1377
|
+
221
|
|
1378
|
+
];
|
|
1379
|
+
} catch (error$1) {}
|
|
1380
|
+
/**
|
|
1381
|
+
* Build up the default `inspectOpts` object from the environment variables.
|
|
1382
|
+
*
|
|
1383
|
+
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
1384
|
+
*/
|
|
1385
|
+
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
1386
|
+
return /^debug_/i.test(key);
|
|
1387
|
+
}).reduce((obj, key) => {
|
|
1388
|
+
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
|
|
1389
|
+
return k.toUpperCase();
|
|
1390
|
+
});
|
|
1391
|
+
let val = process.env[key];
|
|
1392
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
|
|
1393
|
+
else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
|
|
1394
|
+
else if (val === "null") val = null;
|
|
1395
|
+
else val = Number(val);
|
|
1396
|
+
obj[prop] = val;
|
|
1397
|
+
return obj;
|
|
1398
|
+
}, {});
|
|
1399
|
+
/**
|
|
1400
|
+
* Is stdout a TTY? Colored output is enabled when `true`.
|
|
1401
|
+
*/
|
|
1402
|
+
function useColors$1() {
|
|
1403
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty$1.isatty(process.stderr.fd);
|
|
1404
|
+
}
|
|
1405
|
+
/**
|
|
1406
|
+
* Adds ANSI color escape codes if enabled.
|
|
1407
|
+
*
|
|
1408
|
+
* @api public
|
|
1409
|
+
*/
|
|
1410
|
+
function formatArgs$1(args) {
|
|
1411
|
+
const { namespace: name, useColors: useColors$2 } = this;
|
|
1412
|
+
if (useColors$2) {
|
|
1413
|
+
const c = this.color;
|
|
1414
|
+
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
1415
|
+
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
|
1416
|
+
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
1417
|
+
args.push(colorCode + "m+" + module.exports.humanize(this.diff) + "\x1B[0m");
|
|
1418
|
+
} else args[0] = getDate() + name + " " + args[0];
|
|
1419
|
+
}
|
|
1420
|
+
function getDate() {
|
|
1421
|
+
if (exports.inspectOpts.hideDate) return "";
|
|
1422
|
+
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
1423
|
+
}
|
|
1424
|
+
/**
|
|
1425
|
+
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
|
|
1426
|
+
*/
|
|
1427
|
+
function log$3(...args) {
|
|
1428
|
+
return process.stderr.write(util$2.formatWithOptions(exports.inspectOpts, ...args) + "\n");
|
|
1429
|
+
}
|
|
1430
|
+
/**
|
|
1431
|
+
* Save `namespaces`.
|
|
1432
|
+
*
|
|
1433
|
+
* @param {String} namespaces
|
|
1434
|
+
* @api private
|
|
1435
|
+
*/
|
|
1436
|
+
function save$1(namespaces) {
|
|
1437
|
+
if (namespaces) process.env.DEBUG = namespaces;
|
|
1438
|
+
else delete process.env.DEBUG;
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* Load `namespaces`.
|
|
1442
|
+
*
|
|
1443
|
+
* @return {String} returns the previously persisted debug modes
|
|
1444
|
+
* @api private
|
|
1445
|
+
*/
|
|
1446
|
+
function load$2() {
|
|
1447
|
+
return process.env.DEBUG;
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
* Init logic for `debug` instances.
|
|
1451
|
+
*
|
|
1452
|
+
* Create a new `inspectOpts` object in case `useColors` is set
|
|
1453
|
+
* differently for a particular `debug` instance.
|
|
1454
|
+
*/
|
|
1455
|
+
function init$2(debug$19) {
|
|
1456
|
+
debug$19.inspectOpts = {};
|
|
1457
|
+
const keys = Object.keys(exports.inspectOpts);
|
|
1458
|
+
for (let i$1 = 0; i$1 < keys.length; i$1++) debug$19.inspectOpts[keys[i$1]] = exports.inspectOpts[keys[i$1]];
|
|
1459
|
+
}
|
|
1460
|
+
module.exports = require_common$1()(exports);
|
|
1461
|
+
const { formatters } = module.exports;
|
|
1462
|
+
/**
|
|
1463
|
+
* Map %o to `util.inspect()`, all on a single line.
|
|
1464
|
+
*/
|
|
1465
|
+
formatters.o = function(v) {
|
|
1466
|
+
this.inspectOpts.colors = this.useColors;
|
|
1467
|
+
return util$2.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
1468
|
+
};
|
|
1469
|
+
/**
|
|
1470
|
+
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
|
1471
|
+
*/
|
|
1472
|
+
formatters.O = function(v) {
|
|
1473
|
+
this.inspectOpts.colors = this.useColors;
|
|
1474
|
+
return util$2.inspect(v, this.inspectOpts);
|
|
1475
|
+
};
|
|
1476
|
+
}) });
|
|
1229
1477
|
|
|
1230
1478
|
//#endregion
|
|
1231
1479
|
//#region ../../node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/esm/estree-walker.js
|
|
@@ -1373,28 +1621,28 @@ function walk$2(ast, { enter, leave }) {
|
|
|
1373
1621
|
//#endregion
|
|
1374
1622
|
//#region ../../node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.43.0/node_modules/@rollup/pluginutils/dist/es/index.js
|
|
1375
1623
|
const extractors = {
|
|
1376
|
-
ArrayPattern(names
|
|
1377
|
-
for (const element of param.elements) if (element) extractors[element.type](names
|
|
1624
|
+
ArrayPattern(names, param) {
|
|
1625
|
+
for (const element of param.elements) if (element) extractors[element.type](names, element);
|
|
1378
1626
|
},
|
|
1379
|
-
AssignmentPattern(names
|
|
1380
|
-
extractors[param.left.type](names
|
|
1627
|
+
AssignmentPattern(names, param) {
|
|
1628
|
+
extractors[param.left.type](names, param.left);
|
|
1381
1629
|
},
|
|
1382
|
-
Identifier(names
|
|
1383
|
-
names
|
|
1630
|
+
Identifier(names, param) {
|
|
1631
|
+
names.push(param.name);
|
|
1384
1632
|
},
|
|
1385
1633
|
MemberExpression() {},
|
|
1386
|
-
ObjectPattern(names
|
|
1387
|
-
for (const prop of param.properties) if (prop.type === "RestElement") extractors.RestElement(names
|
|
1388
|
-
else extractors[prop.value.type](names
|
|
1634
|
+
ObjectPattern(names, param) {
|
|
1635
|
+
for (const prop of param.properties) if (prop.type === "RestElement") extractors.RestElement(names, prop);
|
|
1636
|
+
else extractors[prop.value.type](names, prop.value);
|
|
1389
1637
|
},
|
|
1390
|
-
RestElement(names
|
|
1391
|
-
extractors[param.argument.type](names
|
|
1638
|
+
RestElement(names, param) {
|
|
1639
|
+
extractors[param.argument.type](names, param.argument);
|
|
1392
1640
|
}
|
|
1393
1641
|
};
|
|
1394
1642
|
const extractAssignedNames = function extractAssignedNames$1(param) {
|
|
1395
|
-
const names
|
|
1396
|
-
extractors[param.type](names
|
|
1397
|
-
return names
|
|
1643
|
+
const names = [];
|
|
1644
|
+
extractors[param.type](names, param);
|
|
1645
|
+
return names;
|
|
1398
1646
|
};
|
|
1399
1647
|
const blockDeclarations = {
|
|
1400
1648
|
const: true,
|
|
@@ -1825,6 +2073,7 @@ function traverseBetweenDirs(longerDir, shorterDir, cb) {
|
|
|
1825
2073
|
//#endregion
|
|
1826
2074
|
//#region src/node/utils.ts
|
|
1827
2075
|
var import_picocolors$33 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
2076
|
+
var import_node = /* @__PURE__ */ __toESM(require_node$1(), 1);
|
|
1828
2077
|
const createFilter = createFilter$2;
|
|
1829
2078
|
const replaceSlashOrColonRE = /[/:]/g;
|
|
1830
2079
|
const replaceDotRE = /\./g;
|
|
@@ -1868,7 +2117,7 @@ function isInNodeModules(id) {
|
|
|
1868
2117
|
return id.includes("node_modules");
|
|
1869
2118
|
}
|
|
1870
2119
|
function moduleListContains(moduleList, id) {
|
|
1871
|
-
return moduleList?.some((m) => m === id || id.startsWith(withTrailingSlash(m)));
|
|
2120
|
+
return moduleList?.some((m$2) => m$2 === id || id.startsWith(withTrailingSlash(m$2)));
|
|
1872
2121
|
}
|
|
1873
2122
|
function isOptimizable(id, optimizeDeps$1) {
|
|
1874
2123
|
const { extensions: extensions$1 } = optimizeDeps$1;
|
|
@@ -1884,7 +2133,7 @@ const rollupVersion = resolvePackageData("rollup", _dirname, true)?.data.version
|
|
|
1884
2133
|
const filter = process.env.VITE_DEBUG_FILTER;
|
|
1885
2134
|
const DEBUG = process.env.DEBUG;
|
|
1886
2135
|
function createDebugger(namespace, options$1 = {}) {
|
|
1887
|
-
const log$4 =
|
|
2136
|
+
const log$4 = (0, import_node.default)(namespace);
|
|
1888
2137
|
const { onlyWhenFocused, depth } = options$1;
|
|
1889
2138
|
if (depth && log$4.inspectOpts && log$4.inspectOpts.depth == null) log$4.inspectOpts.depth = options$1.depth;
|
|
1890
2139
|
let enabled$1 = log$4.enabled;
|
|
@@ -2218,8 +2467,8 @@ function optimizeSafeRealPathSync() {
|
|
|
2218
2467
|
if (error$1) return;
|
|
2219
2468
|
const lines = stdout.split("\n");
|
|
2220
2469
|
for (const line of lines) {
|
|
2221
|
-
const m = parseNetUseRE.exec(line);
|
|
2222
|
-
if (m) windowsNetworkMap.set(m[2], m[1]);
|
|
2470
|
+
const m$2 = parseNetUseRE.exec(line);
|
|
2471
|
+
if (m$2) windowsNetworkMap.set(m$2[2], m$2[1]);
|
|
2223
2472
|
}
|
|
2224
2473
|
if (windowsNetworkMap.size === 0) safeRealpathSync = fs.realpathSync.native;
|
|
2225
2474
|
else safeRealpathSync = windowsMappedRealpathSync;
|
|
@@ -2296,7 +2545,7 @@ const nullSourceMap = {
|
|
|
2296
2545
|
* Note that the length of sourcemapList must be 2.
|
|
2297
2546
|
*/
|
|
2298
2547
|
function combineSourcemaps(filename, sourcemapList) {
|
|
2299
|
-
if (sourcemapList.length === 0 || sourcemapList.every((m) => m.sources.length === 0)) return { ...nullSourceMap };
|
|
2548
|
+
if (sourcemapList.length === 0 || sourcemapList.every((m$2) => m$2.sources.length === 0)) return { ...nullSourceMap };
|
|
2300
2549
|
sourcemapList = sourcemapList.map((sourcemap) => {
|
|
2301
2550
|
const newSourcemaps = { ...sourcemap };
|
|
2302
2551
|
newSourcemaps.sources = sourcemap.sources.map((source) => source ? escapeToLinuxLikePath(source) : null);
|
|
@@ -2306,7 +2555,7 @@ function combineSourcemaps(filename, sourcemapList) {
|
|
|
2306
2555
|
const escapedFilename = escapeToLinuxLikePath(filename);
|
|
2307
2556
|
let map$1;
|
|
2308
2557
|
let mapIndex = 1;
|
|
2309
|
-
if (sourcemapList.slice(0, -1).find((m) => m.sources.length !== 1) === void 0) map$1 = remapping(sourcemapList, () => null);
|
|
2558
|
+
if (sourcemapList.slice(0, -1).find((m$2) => m$2.sources.length !== 1) === void 0) map$1 = remapping(sourcemapList, () => null);
|
|
2310
2559
|
else map$1 = remapping(sourcemapList[0], function loader$1(sourcefile) {
|
|
2311
2560
|
if (sourcefile === escapedFilename && sourcemapList[mapIndex]) return sourcemapList[mapIndex++];
|
|
2312
2561
|
else return null;
|
|
@@ -2428,9 +2677,9 @@ const requestQuerySplitRE = /\?(?!.*[/|}])/;
|
|
|
2428
2677
|
const requestQueryMaybeEscapedSplitRE = /\\?\?(?!.*[/|}])/;
|
|
2429
2678
|
const blankReplacer = (match) => " ".repeat(match.length);
|
|
2430
2679
|
function getHash(text, length = 8) {
|
|
2431
|
-
const h = crypto.hash("sha256", text, "hex").substring(0, length);
|
|
2432
|
-
if (length <= 64) return h;
|
|
2433
|
-
return h.padEnd(length, "_");
|
|
2680
|
+
const h$2 = crypto.hash("sha256", text, "hex").substring(0, length);
|
|
2681
|
+
if (length <= 64) return h$2;
|
|
2682
|
+
return h$2.padEnd(length, "_");
|
|
2434
2683
|
}
|
|
2435
2684
|
function emptyCssComments(raw) {
|
|
2436
2685
|
return raw.replace(multilineCommentsRE, blankReplacer);
|
|
@@ -2547,10 +2796,10 @@ function normalizeSingleAlias({ find: find$1, replacement, customResolver }) {
|
|
|
2547
2796
|
* Transforms transpiled code result where line numbers aren't altered,
|
|
2548
2797
|
* so we can skip sourcemap generation during dev
|
|
2549
2798
|
*/
|
|
2550
|
-
function transformStableResult(s, id, config$2) {
|
|
2799
|
+
function transformStableResult(s$2, id, config$2) {
|
|
2551
2800
|
return {
|
|
2552
|
-
code: s.toString(),
|
|
2553
|
-
map: config$2.command === "build" && config$2.build.sourcemap ? s.generateMap({
|
|
2801
|
+
code: s$2.toString(),
|
|
2802
|
+
map: config$2.command === "build" && config$2.build.sourcemap ? s$2.generateMap({
|
|
2554
2803
|
hires: "boundary",
|
|
2555
2804
|
source: id
|
|
2556
2805
|
}) : null
|
|
@@ -2992,9 +3241,9 @@ function getLocator(source) {
|
|
|
2992
3241
|
let i$1 = 0;
|
|
2993
3242
|
let j = lineOffsets.length;
|
|
2994
3243
|
while (i$1 < j) {
|
|
2995
|
-
const m = i$1 + j >> 1;
|
|
2996
|
-
if (index < lineOffsets[m]) j = m;
|
|
2997
|
-
else i$1 = m + 1;
|
|
3244
|
+
const m$2 = i$1 + j >> 1;
|
|
3245
|
+
if (index < lineOffsets[m$2]) j = m$2;
|
|
3246
|
+
else i$1 = m$2 + 1;
|
|
2998
3247
|
}
|
|
2999
3248
|
const line = i$1 - 1;
|
|
3000
3249
|
return {
|
|
@@ -3230,14 +3479,14 @@ var MagicString = class MagicString {
|
|
|
3230
3479
|
generateDecodedMap(options$1) {
|
|
3231
3480
|
options$1 = options$1 || {};
|
|
3232
3481
|
const sourceIndex = 0;
|
|
3233
|
-
const names
|
|
3482
|
+
const names = Object.keys(this.storedNames);
|
|
3234
3483
|
const mappings = new Mappings(options$1.hires);
|
|
3235
3484
|
const locate = getLocator(this.original);
|
|
3236
3485
|
if (this.intro) mappings.advance(this.intro);
|
|
3237
3486
|
this.firstChunk.eachNext((chunk) => {
|
|
3238
3487
|
const loc = locate(chunk.start);
|
|
3239
3488
|
if (chunk.intro.length) mappings.advance(chunk.intro);
|
|
3240
|
-
if (chunk.edited) mappings.addEdit(sourceIndex, chunk.content, loc, chunk.storeName ? names
|
|
3489
|
+
if (chunk.edited) mappings.addEdit(sourceIndex, chunk.content, loc, chunk.storeName ? names.indexOf(chunk.original) : -1);
|
|
3241
3490
|
else mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);
|
|
3242
3491
|
if (chunk.outro.length) mappings.advance(chunk.outro);
|
|
3243
3492
|
});
|
|
@@ -3246,7 +3495,7 @@ var MagicString = class MagicString {
|
|
|
3246
3495
|
file: options$1.file ? options$1.file.split(/[/\\]/).pop() : void 0,
|
|
3247
3496
|
sources: [options$1.source ? getRelativePath(options$1.file || "", options$1.source) : options$1.file || ""],
|
|
3248
3497
|
sourcesContent: options$1.includeContent ? [this.original] : void 0,
|
|
3249
|
-
names
|
|
3498
|
+
names,
|
|
3250
3499
|
mappings: mappings.raw,
|
|
3251
3500
|
x_google_ignoreList: this.ignoreList ? [sourceIndex] : void 0
|
|
3252
3501
|
};
|
|
@@ -3728,7 +3977,6 @@ var require_is_reference = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
3728
3977
|
(function(global$1, factory) {
|
|
3729
3978
|
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global$1 = global$1 || self, global$1.isReference = factory());
|
|
3730
3979
|
})(exports, (function() {
|
|
3731
|
-
"use strict";
|
|
3732
3980
|
function isReference$1(node, parent) {
|
|
3733
3981
|
if (node.type === "MemberExpression") return !node.computed && isReference$1(node.object, node);
|
|
3734
3982
|
if (node.type === "Identifier") {
|
|
@@ -3758,9 +4006,9 @@ var import_commondir = /* @__PURE__ */ __toESM(require_commondir(), 1);
|
|
|
3758
4006
|
var import_is_reference = /* @__PURE__ */ __toESM(require_is_reference(), 1);
|
|
3759
4007
|
var version$1 = "29.0.0";
|
|
3760
4008
|
var peerDependencies = { rollup: "^2.68.0||^3.0.0||^4.0.0" };
|
|
3761
|
-
function tryParse(parse$
|
|
4009
|
+
function tryParse(parse$17, code, id) {
|
|
3762
4010
|
try {
|
|
3763
|
-
return parse$
|
|
4011
|
+
return parse$17(code, { allowReturnOutsideFunction: true });
|
|
3764
4012
|
} catch (err$2) {
|
|
3765
4013
|
err$2.message += ` in ${id}`;
|
|
3766
4014
|
throw err$2;
|
|
@@ -3771,8 +4019,8 @@ const firstpassNoGlobal = /\b(?:require|module|exports)\b/;
|
|
|
3771
4019
|
function hasCjsKeywords(code, ignoreGlobal) {
|
|
3772
4020
|
return (ignoreGlobal ? firstpassNoGlobal : firstpassGlobal).test(code);
|
|
3773
4021
|
}
|
|
3774
|
-
function analyzeTopLevelStatements(parse$
|
|
3775
|
-
const ast = tryParse(parse$
|
|
4022
|
+
function analyzeTopLevelStatements(parse$17, code, id) {
|
|
4023
|
+
const ast = tryParse(parse$17, code, id);
|
|
3776
4024
|
let isEsModule = false;
|
|
3777
4025
|
let hasDefaultExport = false;
|
|
3778
4026
|
let hasNamedExports = false;
|
|
@@ -4512,7 +4760,7 @@ function getRequireHandlers() {
|
|
|
4512
4760
|
processRequireExpressions(imports, await resolveRequireSourcesAndUpdateMeta(id, needsRequireWrapper ? IS_WRAPPED_COMMONJS : !isEsModule, commonjsMeta, Object.keys(requiresBySource).map((source) => {
|
|
4513
4761
|
return {
|
|
4514
4762
|
source,
|
|
4515
|
-
isConditional: requiresBySource[source].every((require$
|
|
4763
|
+
isConditional: requiresBySource[source].every((require$1) => require$1.isInsideConditional)
|
|
4516
4764
|
};
|
|
4517
4765
|
})), requiresBySource, getIgnoreTryCatchRequireStatementMode, magicString);
|
|
4518
4766
|
return imports.length ? `${imports.join(";\n")};\n\n` : "";
|
|
@@ -4572,8 +4820,8 @@ function getGenerateRequireName() {
|
|
|
4572
4820
|
}
|
|
4573
4821
|
const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
|
|
4574
4822
|
const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
|
|
4575
|
-
async function transformCommonjs(parse$
|
|
4576
|
-
const ast = astCache || tryParse(parse$
|
|
4823
|
+
async function transformCommonjs(parse$17, code, id, isEsModule, ignoreGlobal, ignoreRequire, ignoreDynamicRequires, getIgnoreTryCatchRequireStatementMode, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModules, commonDir, astCache, defaultIsModuleExports, needsRequireWrapper, resolveRequireSourcesAndUpdateMeta, isRequired, checkDynamicRequire, commonjsMeta) {
|
|
4824
|
+
const ast = astCache || tryParse(parse$17, code, id);
|
|
4577
4825
|
const magicString = new MagicString(code);
|
|
4578
4826
|
const uses = {
|
|
4579
4827
|
module: false,
|
|
@@ -5043,7 +5291,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5043
5291
|
const displaySize = (bytes) => {
|
|
5044
5292
|
return `${numberFormatter.format(bytes / 1e3)} kB`;
|
|
5045
5293
|
};
|
|
5046
|
-
const tty = process.stdout.isTTY && !process.env.CI;
|
|
5294
|
+
const tty$2 = process.stdout.isTTY && !process.env.CI;
|
|
5047
5295
|
const shouldLogInfo = LogLevels[config$2.logLevel || "info"] >= LogLevels.info;
|
|
5048
5296
|
const modulesReporter = shouldLogInfo ? perEnvironmentState((environment) => {
|
|
5049
5297
|
let hasTransformed = false;
|
|
@@ -5057,7 +5305,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5057
5305
|
},
|
|
5058
5306
|
register(id) {
|
|
5059
5307
|
transformedCount++;
|
|
5060
|
-
if (!tty) {
|
|
5308
|
+
if (!tty$2) {
|
|
5061
5309
|
if (!hasTransformed) config$2.logger.info(`transforming...`);
|
|
5062
5310
|
} else {
|
|
5063
5311
|
if (id.includes(`?`)) return;
|
|
@@ -5066,7 +5314,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5066
5314
|
hasTransformed = true;
|
|
5067
5315
|
},
|
|
5068
5316
|
log() {
|
|
5069
|
-
if (tty) clearLine$1();
|
|
5317
|
+
if (tty$2) clearLine$1();
|
|
5070
5318
|
environment.logger.info(`${import_picocolors$32.default.green(`✓`)} ${transformedCount} modules transformed.`);
|
|
5071
5319
|
}
|
|
5072
5320
|
};
|
|
@@ -5079,13 +5327,13 @@ function buildReporterPlugin(config$2) {
|
|
|
5079
5327
|
async function getCompressedSize(code) {
|
|
5080
5328
|
if (environment.config.consumer !== "client" || !environment.config.build.reportCompressedSize) return null;
|
|
5081
5329
|
if (shouldLogInfo && !hasCompressChunk) {
|
|
5082
|
-
if (!tty) config$2.logger.info("computing gzip size...");
|
|
5330
|
+
if (!tty$2) config$2.logger.info("computing gzip size...");
|
|
5083
5331
|
else writeLine("computing gzip size (0)...");
|
|
5084
5332
|
hasCompressChunk = true;
|
|
5085
5333
|
}
|
|
5086
5334
|
const compressed = await compress(typeof code === "string" ? code : Buffer.from(code));
|
|
5087
5335
|
compressedCount++;
|
|
5088
|
-
if (shouldLogInfo && tty) writeLine(`computing gzip size (${compressedCount})...`);
|
|
5336
|
+
if (shouldLogInfo && tty$2) writeLine(`computing gzip size (${compressedCount})...`);
|
|
5089
5337
|
return compressed.length;
|
|
5090
5338
|
}
|
|
5091
5339
|
return {
|
|
@@ -5096,7 +5344,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5096
5344
|
register() {
|
|
5097
5345
|
chunkCount++;
|
|
5098
5346
|
if (shouldLogInfo) {
|
|
5099
|
-
if (!tty) {
|
|
5347
|
+
if (!tty$2) {
|
|
5100
5348
|
if (!hasRenderedChunk) environment.logger.info("rendering chunks...");
|
|
5101
5349
|
} else writeLine(`rendering chunks (${chunkCount})...`);
|
|
5102
5350
|
hasRenderedChunk = true;
|
|
@@ -5127,7 +5375,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5127
5375
|
};
|
|
5128
5376
|
}
|
|
5129
5377
|
}))).filter(isDefined);
|
|
5130
|
-
if (tty) clearLine$1();
|
|
5378
|
+
if (tty$2) clearLine$1();
|
|
5131
5379
|
let longest = 0;
|
|
5132
5380
|
let biggestSize = 0;
|
|
5133
5381
|
let biggestMap = 0;
|
|
@@ -5194,7 +5442,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5194
5442
|
chunksReporter(this).register();
|
|
5195
5443
|
},
|
|
5196
5444
|
generateBundle() {
|
|
5197
|
-
if (shouldLogInfo && tty) clearLine$1();
|
|
5445
|
+
if (shouldLogInfo && tty$2) clearLine$1();
|
|
5198
5446
|
},
|
|
5199
5447
|
async writeBundle({ dir }, output) {
|
|
5200
5448
|
await chunksReporter(this).log(output, dir);
|
|
@@ -5645,7 +5893,7 @@ const not_found_result = {
|
|
|
5645
5893
|
* @returns {Promise<import('./public.d.ts').TSConfckParseResult>}
|
|
5646
5894
|
* @throws {TSConfckParseError}
|
|
5647
5895
|
*/
|
|
5648
|
-
async function parse$
|
|
5896
|
+
async function parse$14(filename, options$1) {
|
|
5649
5897
|
/** @type {import('./cache.js').TSConfckCache} */
|
|
5650
5898
|
const cache$1 = options$1?.cache;
|
|
5651
5899
|
if (cache$1?.hasParseResult(filename)) return getParsedDeep(filename, cache$1, options$1);
|
|
@@ -6122,9 +6370,9 @@ async function transformWithEsbuild(code, filename, options$1, inMap, config$2,
|
|
|
6122
6370
|
debug$17?.(`esbuild error with options used: `, resolvedOptions);
|
|
6123
6371
|
if (e$1.errors) {
|
|
6124
6372
|
e$1.frame = "";
|
|
6125
|
-
e$1.errors.forEach((m) => {
|
|
6126
|
-
if (m.text === "Experimental decorators are not currently enabled" || m.text === "Parameter decorators only work when experimental decorators are enabled") m.text += ". Vite 5 now uses esbuild 0.18 and you need to enable them by adding \"experimentalDecorators\": true in your \"tsconfig.json\" file.";
|
|
6127
|
-
e$1.frame += `\n` + prettifyMessage(m, code);
|
|
6373
|
+
e$1.errors.forEach((m$2) => {
|
|
6374
|
+
if (m$2.text === "Experimental decorators are not currently enabled" || m$2.text === "Parameter decorators only work when experimental decorators are enabled") m$2.text += ". Vite 5 now uses esbuild 0.18 and you need to enable them by adding \"experimentalDecorators\": true in your \"tsconfig.json\" file.";
|
|
6375
|
+
e$1.frame += `\n` + prettifyMessage(m$2, code);
|
|
6128
6376
|
});
|
|
6129
6377
|
e$1.loc = e$1.errors[0].location;
|
|
6130
6378
|
}
|
|
@@ -6157,8 +6405,8 @@ function esbuildPlugin(config$2) {
|
|
|
6157
6405
|
async transform(code, id) {
|
|
6158
6406
|
if (filter$1(id) || filter$1(cleanUrl(id))) {
|
|
6159
6407
|
const result = await transformWithEsbuild(code, id, transformOptions, void 0, config$2, server?.watcher);
|
|
6160
|
-
if (result.warnings.length) result.warnings.forEach((m) => {
|
|
6161
|
-
this.warn(prettifyMessage(m, code));
|
|
6408
|
+
if (result.warnings.length) result.warnings.forEach((m$2) => {
|
|
6409
|
+
this.warn(prettifyMessage(m$2, code));
|
|
6162
6410
|
});
|
|
6163
6411
|
if (jsxInject && jsxExtensionsRE.test(id)) result.code = jsxInject + ";" + result.code;
|
|
6164
6412
|
return {
|
|
@@ -6178,7 +6426,7 @@ const injectEsbuildHelpers = (esbuildCode, format$3) => {
|
|
|
6178
6426
|
const contentIndex = format$3 === "iife" ? Math.max(esbuildCode.search(IIFE_BEGIN_RE), 0) : format$3 === "umd" ? esbuildCode.indexOf(`(function(`) : 0;
|
|
6179
6427
|
if (contentIndex > 0) {
|
|
6180
6428
|
const esbuildHelpers = esbuildCode.slice(0, contentIndex);
|
|
6181
|
-
return esbuildCode.slice(contentIndex).replace("\"use strict\";", (m) => m + esbuildHelpers);
|
|
6429
|
+
return esbuildCode.slice(contentIndex).replace("\"use strict\";", (m$2) => m$2 + esbuildHelpers);
|
|
6182
6430
|
}
|
|
6183
6431
|
return esbuildCode;
|
|
6184
6432
|
};
|
|
@@ -6253,9 +6501,9 @@ function resolveEsbuildTranspileOptions(config$2, format$3) {
|
|
|
6253
6501
|
treeShaking: true
|
|
6254
6502
|
};
|
|
6255
6503
|
}
|
|
6256
|
-
function prettifyMessage(m, code) {
|
|
6257
|
-
let res = import_picocolors$31.default.yellow(m.text);
|
|
6258
|
-
if (m.location) res += `\n` + generateCodeFrame(code, m.location);
|
|
6504
|
+
function prettifyMessage(m$2, code) {
|
|
6505
|
+
let res = import_picocolors$31.default.yellow(m$2.text);
|
|
6506
|
+
if (m$2.location) res += `\n` + generateCodeFrame(code, m$2.location);
|
|
6259
6507
|
return res + `\n`;
|
|
6260
6508
|
}
|
|
6261
6509
|
let globalTSConfckCache;
|
|
@@ -6270,7 +6518,7 @@ function getTSConfckCache(config$2) {
|
|
|
6270
6518
|
return cache$1;
|
|
6271
6519
|
}
|
|
6272
6520
|
async function loadTsconfigJsonForFile(filename, config$2) {
|
|
6273
|
-
const { tsconfig, tsconfigFile } = await parse$
|
|
6521
|
+
const { tsconfig, tsconfigFile } = await parse$14(filename, {
|
|
6274
6522
|
cache: getTSConfckCache(config$2),
|
|
6275
6523
|
ignoreNodeModules: true
|
|
6276
6524
|
});
|
|
@@ -6337,7 +6585,7 @@ var Worker$1 = class {
|
|
|
6337
6585
|
});
|
|
6338
6586
|
}
|
|
6339
6587
|
stop() {
|
|
6340
|
-
this._pool.forEach((w) => w.unref());
|
|
6588
|
+
this._pool.forEach((w$1) => w$1.unref());
|
|
6341
6589
|
this._queue.forEach(([, reject]) => reject(/* @__PURE__ */ new Error("Main worker pool stopped before a worker was available.")));
|
|
6342
6590
|
this._pool = [];
|
|
6343
6591
|
this._idlePool = [];
|
|
@@ -6638,7 +6886,7 @@ function e(e$1, n$2, r$1) {
|
|
|
6638
6886
|
throw new Error(r$1 ? `No known conditions for "${n$2}" specifier in "${e$1}" package` : `Missing "${n$2}" specifier in "${e$1}" package`);
|
|
6639
6887
|
}
|
|
6640
6888
|
function n(n$2, i$1, o$1, f$1) {
|
|
6641
|
-
let s, u, l = r(n$2, o$1), c = function(e$1) {
|
|
6889
|
+
let s$2, u, l = r(n$2, o$1), c = function(e$1) {
|
|
6642
6890
|
let n$3 = new Set(["default", ...e$1.conditions || []]);
|
|
6643
6891
|
return e$1.unsafe || n$3.add(e$1.require ? "require" : "import"), e$1.unsafe || n$3.add(e$1.browser ? "browser" : "node"), n$3;
|
|
6644
6892
|
}(f$1 || {}), a = i$1[l];
|
|
@@ -6647,10 +6895,10 @@ function n(n$2, i$1, o$1, f$1) {
|
|
|
6647
6895
|
for (t$1 in i$1) n$3 && t$1.length < n$3.length || ("/" === t$1[t$1.length - 1] && l.startsWith(t$1) ? (u = l.substring(t$1.length), n$3 = t$1) : t$1.length > 1 && (r$1 = t$1.indexOf("*", 1), ~r$1 && (e$1 = RegExp("^" + t$1.substring(0, r$1) + "(.*)" + t$1.substring(1 + r$1) + "$").exec(l), e$1 && e$1[1] && (u = e$1[1], n$3 = t$1))));
|
|
6648
6896
|
a = i$1[n$3];
|
|
6649
6897
|
}
|
|
6650
|
-
return a || e(n$2, l), s = t(a, c), s || e(n$2, l, 1), u && function(e$1, n$3) {
|
|
6898
|
+
return a || e(n$2, l), s$2 = t(a, c), s$2 || e(n$2, l, 1), u && function(e$1, n$3) {
|
|
6651
6899
|
let r$1, t$1 = 0, i$2 = e$1.length, o$2 = /[*]/g, f$2 = /[/]$/;
|
|
6652
6900
|
for (; t$1 < i$2; t$1++) e$1[t$1] = o$2.test(r$1 = e$1[t$1]) ? r$1.replace(o$2, n$3) : f$2.test(r$1) ? r$1 + n$3 : r$1;
|
|
6653
|
-
}(s, u), s;
|
|
6901
|
+
}(s$2, u), s$2;
|
|
6654
6902
|
}
|
|
6655
6903
|
function r(e$1, n$2, r$1) {
|
|
6656
6904
|
if (e$1 === n$2 || "." === n$2) return ".";
|
|
@@ -7146,33 +7394,33 @@ var ImportType;
|
|
|
7146
7394
|
const A = 1 === new Uint8Array(new Uint16Array([1]).buffer)[0];
|
|
7147
7395
|
function parse(E$1, g = "@") {
|
|
7148
7396
|
if (!C) return init.then((() => parse(E$1)));
|
|
7149
|
-
const I = E$1.length + 1, w = (C.__heap_base.value || C.__heap_base) + 4 * I - C.memory.buffer.byteLength;
|
|
7150
|
-
w > 0 && C.memory.grow(Math.ceil(w / 65536));
|
|
7397
|
+
const I = E$1.length + 1, w$1 = (C.__heap_base.value || C.__heap_base) + 4 * I - C.memory.buffer.byteLength;
|
|
7398
|
+
w$1 > 0 && C.memory.grow(Math.ceil(w$1 / 65536));
|
|
7151
7399
|
const K = C.sa(I - 1);
|
|
7152
7400
|
if ((A ? B : Q)(E$1, new Uint16Array(C.memory.buffer, K, I)), !C.parse()) throw Object.assign(/* @__PURE__ */ new Error(`Parse error ${g}:${E$1.slice(0, C.e()).split("\n").length}:${C.e() - E$1.lastIndexOf("\n", C.e() - 1)}`), { idx: C.e() });
|
|
7153
7401
|
const o$1 = [], D = [];
|
|
7154
7402
|
for (; C.ri();) {
|
|
7155
|
-
const A$1 = C.is(), Q$1 = C.ie(), B$1 = C.it(), g$1 = C.ai(), I$1 = C.id(), w$
|
|
7403
|
+
const A$1 = C.is(), Q$1 = C.ie(), B$1 = C.it(), g$1 = C.ai(), I$1 = C.id(), w$2 = C.ss(), K$1 = C.se();
|
|
7156
7404
|
let D$1;
|
|
7157
7405
|
C.ip() && (D$1 = k(E$1.slice(-1 === I$1 ? A$1 - 1 : A$1, -1 === I$1 ? Q$1 + 1 : Q$1))), o$1.push({
|
|
7158
7406
|
n: D$1,
|
|
7159
7407
|
t: B$1,
|
|
7160
7408
|
s: A$1,
|
|
7161
7409
|
e: Q$1,
|
|
7162
|
-
ss: w$
|
|
7410
|
+
ss: w$2,
|
|
7163
7411
|
se: K$1,
|
|
7164
7412
|
d: I$1,
|
|
7165
7413
|
a: g$1
|
|
7166
7414
|
});
|
|
7167
7415
|
}
|
|
7168
7416
|
for (; C.re();) {
|
|
7169
|
-
const A$1 = C.es(), Q$1 = C.ee(), B$1 = C.els(), g$1 = C.ele(), I$1 = E$1.slice(A$1, Q$1), w$
|
|
7417
|
+
const A$1 = C.es(), Q$1 = C.ee(), B$1 = C.els(), g$1 = C.ele(), I$1 = E$1.slice(A$1, Q$1), w$2 = I$1[0], K$1 = B$1 < 0 ? void 0 : E$1.slice(B$1, g$1), o$2 = K$1 ? K$1[0] : "";
|
|
7170
7418
|
D.push({
|
|
7171
7419
|
s: A$1,
|
|
7172
7420
|
e: Q$1,
|
|
7173
7421
|
ls: B$1,
|
|
7174
7422
|
le: g$1,
|
|
7175
|
-
n: "\"" === w$
|
|
7423
|
+
n: "\"" === w$2 || "'" === w$2 ? k(I$1) : I$1,
|
|
7176
7424
|
ln: "\"" === o$2 || "'" === o$2 ? k(K$1) : K$1
|
|
7177
7425
|
});
|
|
7178
7426
|
}
|
|
@@ -7639,7 +7887,7 @@ var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
|
|
|
7639
7887
|
*
|
|
7640
7888
|
* @return {Promise<Function>} PostCSS Plugin
|
|
7641
7889
|
*/
|
|
7642
|
-
async function load(plugin, options$1, file) {
|
|
7890
|
+
async function load$1(plugin, options$1, file) {
|
|
7643
7891
|
try {
|
|
7644
7892
|
if (options$1 === null || options$1 === void 0 || Object.keys(options$1).length === 0) return await req$1(plugin, file);
|
|
7645
7893
|
else return (await req$1(plugin, file))(options$1);
|
|
@@ -7664,7 +7912,7 @@ var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
|
|
|
7664
7912
|
list = Object.entries(config$2.plugins).filter(([, options$1]) => {
|
|
7665
7913
|
return options$1 !== false;
|
|
7666
7914
|
}).map(([plugin, options$1]) => {
|
|
7667
|
-
return load(plugin, options$1, file);
|
|
7915
|
+
return load$1(plugin, options$1, file);
|
|
7668
7916
|
});
|
|
7669
7917
|
list = await Promise.all(list);
|
|
7670
7918
|
}
|
|
@@ -7933,10 +8181,10 @@ var require_convert_source_map = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
7933
8181
|
return new Converter(base64, { encoding: "base64" });
|
|
7934
8182
|
};
|
|
7935
8183
|
exports.fromComment = function(comment) {
|
|
7936
|
-
var m, encoding;
|
|
8184
|
+
var m$2, encoding;
|
|
7937
8185
|
comment = comment.replace(/^\/\*/g, "//").replace(/\*\/$/g, "");
|
|
7938
|
-
m = exports.commentRegex.exec(comment);
|
|
7939
|
-
encoding = m && m[4] || "uri";
|
|
8186
|
+
m$2 = exports.commentRegex.exec(comment);
|
|
8187
|
+
encoding = m$2 && m$2[4] || "uri";
|
|
7940
8188
|
return new Converter(comment, {
|
|
7941
8189
|
encoding,
|
|
7942
8190
|
hasComment: true
|
|
@@ -7952,13 +8200,13 @@ var require_convert_source_map = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
7952
8200
|
else return makeConverter(sm);
|
|
7953
8201
|
};
|
|
7954
8202
|
exports.fromSource = function(content) {
|
|
7955
|
-
var m = content.match(exports.commentRegex);
|
|
7956
|
-
return m ? exports.fromComment(m.pop()) : null;
|
|
8203
|
+
var m$2 = content.match(exports.commentRegex);
|
|
8204
|
+
return m$2 ? exports.fromComment(m$2.pop()) : null;
|
|
7957
8205
|
};
|
|
7958
8206
|
exports.fromMapFileSource = function(content, read) {
|
|
7959
8207
|
if (typeof read === "string") throw new Error("String directory paths are no longer supported with `fromMapFileSource`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading");
|
|
7960
|
-
var m = content.match(exports.mapFileCommentRegex);
|
|
7961
|
-
return m ? exports.fromMapFileComment(m.pop(), read) : null;
|
|
8208
|
+
var m$2 = content.match(exports.mapFileCommentRegex);
|
|
8209
|
+
return m$2 ? exports.fromMapFileComment(m$2.pop(), read) : null;
|
|
7962
8210
|
};
|
|
7963
8211
|
exports.removeComments = function(src) {
|
|
7964
8212
|
return src.replace(exports.commentRegex, "");
|
|
@@ -8607,27 +8855,27 @@ function renderAssetUrlInJS(pluginContext, chunk, opts, code) {
|
|
|
8607
8855
|
const { environment } = pluginContext;
|
|
8608
8856
|
const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(opts.format, environment.config.isWorker);
|
|
8609
8857
|
let match;
|
|
8610
|
-
let s;
|
|
8858
|
+
let s$2;
|
|
8611
8859
|
assetUrlRE.lastIndex = 0;
|
|
8612
8860
|
while (match = assetUrlRE.exec(code)) {
|
|
8613
|
-
s ||= new MagicString(code);
|
|
8861
|
+
s$2 ||= new MagicString(code);
|
|
8614
8862
|
const [full, referenceId, postfix = ""] = match;
|
|
8615
8863
|
const file = pluginContext.getFileName(referenceId);
|
|
8616
8864
|
chunk.viteMetadata.importedAssets.add(cleanUrl(file));
|
|
8617
8865
|
const replacement = toOutputFilePathInJS(environment, file + postfix, "asset", chunk.fileName, "js", toRelativeRuntime);
|
|
8618
8866
|
const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`;
|
|
8619
|
-
s.update(match.index, match.index + full.length, replacementString);
|
|
8867
|
+
s$2.update(match.index, match.index + full.length, replacementString);
|
|
8620
8868
|
}
|
|
8621
8869
|
const publicAssetUrlMap = publicAssetUrlCache.get(environment.getTopLevelConfig());
|
|
8622
8870
|
publicAssetUrlRE.lastIndex = 0;
|
|
8623
8871
|
while (match = publicAssetUrlRE.exec(code)) {
|
|
8624
|
-
s ||= new MagicString(code);
|
|
8872
|
+
s$2 ||= new MagicString(code);
|
|
8625
8873
|
const [full, hash$1] = match;
|
|
8626
8874
|
const replacement = toOutputFilePathInJS(environment, publicAssetUrlMap.get(hash$1).slice(1), "public", chunk.fileName, "js", toRelativeRuntime);
|
|
8627
8875
|
const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`;
|
|
8628
|
-
s.update(match.index, match.index + full.length, replacementString);
|
|
8876
|
+
s$2.update(match.index, match.index + full.length, replacementString);
|
|
8629
8877
|
}
|
|
8630
|
-
return s;
|
|
8878
|
+
return s$2;
|
|
8631
8879
|
}
|
|
8632
8880
|
/**
|
|
8633
8881
|
* Also supports loading plain strings with import text from './foo.txt?raw'
|
|
@@ -8668,10 +8916,10 @@ function assetPlugin(config$2) {
|
|
|
8668
8916
|
}
|
|
8669
8917
|
},
|
|
8670
8918
|
renderChunk(code, chunk, opts) {
|
|
8671
|
-
const s = renderAssetUrlInJS(this, chunk, opts, code);
|
|
8672
|
-
if (s) return {
|
|
8673
|
-
code: s.toString(),
|
|
8674
|
-
map: this.environment.config.build.sourcemap ? s.generateMap({ hires: "boundary" }) : null
|
|
8919
|
+
const s$2 = renderAssetUrlInJS(this, chunk, opts, code);
|
|
8920
|
+
if (s$2) return {
|
|
8921
|
+
code: s$2.toString(),
|
|
8922
|
+
map: this.environment.config.build.sourcemap ? s$2.generateMap({ hires: "boundary" }) : null
|
|
8675
8923
|
};
|
|
8676
8924
|
else return null;
|
|
8677
8925
|
},
|
|
@@ -9061,7 +9309,7 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9061
9309
|
return supportsAnsi() ? `\x1b[2m${text}\x1b[0m` : text;
|
|
9062
9310
|
}
|
|
9063
9311
|
const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
|
|
9064
|
-
function parse$
|
|
9312
|
+
function parse$13(src) {
|
|
9065
9313
|
const obj = {};
|
|
9066
9314
|
let lines = src.toString();
|
|
9067
9315
|
lines = lines.replace(/\r\n?/gm, "\n");
|
|
@@ -9165,9 +9413,9 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9165
9413
|
return envPath[0] === "~" ? path$10.join(os$3.homedir(), envPath.slice(1)) : envPath;
|
|
9166
9414
|
}
|
|
9167
9415
|
function _configVault(options$1) {
|
|
9168
|
-
const debug$
|
|
9416
|
+
const debug$19 = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options$1 && options$1.debug);
|
|
9169
9417
|
const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || options$1 && options$1.quiet);
|
|
9170
|
-
if (debug$
|
|
9418
|
+
if (debug$19 || !quiet) _log("Loading env from encrypted .env.vault");
|
|
9171
9419
|
const parsed = DotenvModule._parseVault(options$1);
|
|
9172
9420
|
let processEnv = process.env;
|
|
9173
9421
|
if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv;
|
|
@@ -9179,10 +9427,10 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9179
9427
|
let encoding = "utf8";
|
|
9180
9428
|
let processEnv = process.env;
|
|
9181
9429
|
if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv;
|
|
9182
|
-
let debug$
|
|
9430
|
+
let debug$19 = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || options$1 && options$1.debug);
|
|
9183
9431
|
let quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || options$1 && options$1.quiet);
|
|
9184
9432
|
if (options$1 && options$1.encoding) encoding = options$1.encoding;
|
|
9185
|
-
else if (debug$
|
|
9433
|
+
else if (debug$19) _debug("No encoding is specified. UTF-8 is used by default");
|
|
9186
9434
|
let optionPaths = [dotenvPath];
|
|
9187
9435
|
if (options$1 && options$1.path) if (!Array.isArray(options$1.path)) optionPaths = [_resolveHome(options$1.path)];
|
|
9188
9436
|
else {
|
|
@@ -9195,20 +9443,20 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9195
9443
|
const parsed = DotenvModule.parse(fs$10.readFileSync(path$13, { encoding }));
|
|
9196
9444
|
DotenvModule.populate(parsedAll, parsed, options$1);
|
|
9197
9445
|
} catch (e$1) {
|
|
9198
|
-
if (debug$
|
|
9446
|
+
if (debug$19) _debug(`Failed to load ${path$13} ${e$1.message}`);
|
|
9199
9447
|
lastError = e$1;
|
|
9200
9448
|
}
|
|
9201
9449
|
const populated = DotenvModule.populate(processEnv, parsedAll, options$1);
|
|
9202
|
-
debug$
|
|
9450
|
+
debug$19 = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || debug$19);
|
|
9203
9451
|
quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || quiet);
|
|
9204
|
-
if (debug$
|
|
9452
|
+
if (debug$19 || !quiet) {
|
|
9205
9453
|
const keysCount = Object.keys(populated).length;
|
|
9206
9454
|
const shortPaths = [];
|
|
9207
9455
|
for (const filePath of optionPaths) try {
|
|
9208
9456
|
const relative$3 = path$10.relative(process.cwd(), filePath);
|
|
9209
9457
|
shortPaths.push(relative$3);
|
|
9210
9458
|
} catch (e$1) {
|
|
9211
|
-
if (debug$
|
|
9459
|
+
if (debug$19) _debug(`Failed to load ${filePath} ${e$1.message}`);
|
|
9212
9460
|
lastError = e$1;
|
|
9213
9461
|
}
|
|
9214
9462
|
_log(`injecting env (${keysCount}) from ${shortPaths.join(",")} ${dim(`-- tip: ${_getRandomTip()}`)}`);
|
|
@@ -9254,7 +9502,7 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9254
9502
|
}
|
|
9255
9503
|
}
|
|
9256
9504
|
function populate(processEnv, parsed, options$1 = {}) {
|
|
9257
|
-
const debug$
|
|
9505
|
+
const debug$19 = Boolean(options$1 && options$1.debug);
|
|
9258
9506
|
const override = Boolean(options$1 && options$1.override);
|
|
9259
9507
|
const populated = {};
|
|
9260
9508
|
if (typeof parsed !== "object") {
|
|
@@ -9267,7 +9515,7 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9267
9515
|
processEnv[key] = parsed[key];
|
|
9268
9516
|
populated[key] = parsed[key];
|
|
9269
9517
|
}
|
|
9270
|
-
if (debug$
|
|
9518
|
+
if (debug$19) if (override === true) _debug(`"${key}" is already defined and WAS overwritten`);
|
|
9271
9519
|
else _debug(`"${key}" is already defined and was NOT overwritten`);
|
|
9272
9520
|
} else {
|
|
9273
9521
|
processEnv[key] = parsed[key];
|
|
@@ -9281,7 +9529,7 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9281
9529
|
_parseVault,
|
|
9282
9530
|
config,
|
|
9283
9531
|
decrypt,
|
|
9284
|
-
parse: parse$
|
|
9532
|
+
parse: parse$13,
|
|
9285
9533
|
populate
|
|
9286
9534
|
};
|
|
9287
9535
|
module.exports.configDotenv = DotenvModule.configDotenv;
|
|
@@ -9529,253 +9777,280 @@ function errorMiddleware(server, allowNext = false) {
|
|
|
9529
9777
|
}
|
|
9530
9778
|
|
|
9531
9779
|
//#endregion
|
|
9532
|
-
//#region ../../node_modules/.pnpm/
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
searchIndex = matchIndex;
|
|
9562
|
-
} else return false;
|
|
9563
|
-
while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++;
|
|
9564
|
-
return templateIndex === template.length;
|
|
9565
|
-
}
|
|
9566
|
-
function humanize(value$1) {
|
|
9567
|
-
if (value$1 >= 1e3) return `${(value$1 / 1e3).toFixed(1)}s`;
|
|
9568
|
-
return `${value$1}ms`;
|
|
9569
|
-
}
|
|
9570
|
-
function namespaces() {
|
|
9571
|
-
return globalNamespaces;
|
|
9572
|
-
}
|
|
9573
|
-
function createDebug(namespace, options$1) {
|
|
9574
|
-
let prevTime;
|
|
9575
|
-
let enableOverride;
|
|
9576
|
-
let namespacesCache;
|
|
9577
|
-
let enabledCache;
|
|
9578
|
-
const debug$18 = (...args) => {
|
|
9579
|
-
if (!debug$18.enabled) return;
|
|
9580
|
-
const curr = Date.now();
|
|
9581
|
-
const diff = curr - (prevTime || curr);
|
|
9582
|
-
prevTime = curr;
|
|
9583
|
-
args[0] = coerce(args[0]);
|
|
9584
|
-
if (typeof args[0] !== "string") args.unshift("%O");
|
|
9585
|
-
let index = 0;
|
|
9586
|
-
args[0] = args[0].replace(/%([a-z%])/gi, (match, format$3) => {
|
|
9587
|
-
if (match === "%%") return "%";
|
|
9588
|
-
index++;
|
|
9589
|
-
const formatter = options$1.formatters[format$3];
|
|
9590
|
-
if (typeof formatter === "function") {
|
|
9591
|
-
const value$1 = args[index];
|
|
9592
|
-
match = formatter.call(debug$18, value$1);
|
|
9593
|
-
args.splice(index, 1);
|
|
9594
|
-
index--;
|
|
9595
|
-
}
|
|
9596
|
-
return match;
|
|
9597
|
-
});
|
|
9598
|
-
options$1.formatArgs.call(debug$18, diff, args);
|
|
9599
|
-
debug$18.log(...args);
|
|
9600
|
-
};
|
|
9601
|
-
debug$18.extend = function(namespace$1, delimiter = ":") {
|
|
9602
|
-
return createDebug(this.namespace + delimiter + namespace$1, {
|
|
9603
|
-
useColors: this.useColors,
|
|
9604
|
-
color: this.color,
|
|
9605
|
-
formatArgs: this.formatArgs,
|
|
9606
|
-
formatters: this.formatters,
|
|
9607
|
-
inspectOpts: this.inspectOpts,
|
|
9608
|
-
log: this.log,
|
|
9609
|
-
humanize: this.humanize
|
|
9610
|
-
});
|
|
9780
|
+
//#region ../../node_modules/.pnpm/ms@2.0.0/node_modules/ms/index.js
|
|
9781
|
+
var require_ms = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ms@2.0.0/node_modules/ms/index.js": ((exports, module) => {
|
|
9782
|
+
/**
|
|
9783
|
+
* Helpers.
|
|
9784
|
+
*/
|
|
9785
|
+
var s = 1e3;
|
|
9786
|
+
var m = s * 60;
|
|
9787
|
+
var h = m * 60;
|
|
9788
|
+
var d = h * 24;
|
|
9789
|
+
var y = d * 365.25;
|
|
9790
|
+
/**
|
|
9791
|
+
* Parse or format the given `val`.
|
|
9792
|
+
*
|
|
9793
|
+
* Options:
|
|
9794
|
+
*
|
|
9795
|
+
* - `long` verbose formatting [false]
|
|
9796
|
+
*
|
|
9797
|
+
* @param {String|Number} val
|
|
9798
|
+
* @param {Object} [options]
|
|
9799
|
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
9800
|
+
* @return {String|Number}
|
|
9801
|
+
* @api public
|
|
9802
|
+
*/
|
|
9803
|
+
module.exports = function(val, options$1) {
|
|
9804
|
+
options$1 = options$1 || {};
|
|
9805
|
+
var type = typeof val;
|
|
9806
|
+
if (type === "string" && val.length > 0) return parse$11(val);
|
|
9807
|
+
else if (type === "number" && isNaN(val) === false) return options$1.long ? fmtLong(val) : fmtShort(val);
|
|
9808
|
+
throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val));
|
|
9611
9809
|
};
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9810
|
+
/**
|
|
9811
|
+
* Parse the given `str` and return milliseconds.
|
|
9812
|
+
*
|
|
9813
|
+
* @param {String} str
|
|
9814
|
+
* @return {Number}
|
|
9815
|
+
* @api private
|
|
9816
|
+
*/
|
|
9817
|
+
function parse$11(str) {
|
|
9818
|
+
str = String(str);
|
|
9819
|
+
if (str.length > 100) return;
|
|
9820
|
+
var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);
|
|
9821
|
+
if (!match) return;
|
|
9822
|
+
var n$2 = parseFloat(match[1]);
|
|
9823
|
+
switch ((match[2] || "ms").toLowerCase()) {
|
|
9824
|
+
case "years":
|
|
9825
|
+
case "year":
|
|
9826
|
+
case "yrs":
|
|
9827
|
+
case "yr":
|
|
9828
|
+
case "y": return n$2 * y;
|
|
9829
|
+
case "days":
|
|
9830
|
+
case "day":
|
|
9831
|
+
case "d": return n$2 * d;
|
|
9832
|
+
case "hours":
|
|
9833
|
+
case "hour":
|
|
9834
|
+
case "hrs":
|
|
9835
|
+
case "hr":
|
|
9836
|
+
case "h": return n$2 * h;
|
|
9837
|
+
case "minutes":
|
|
9838
|
+
case "minute":
|
|
9839
|
+
case "mins":
|
|
9840
|
+
case "min":
|
|
9841
|
+
case "m": return n$2 * m;
|
|
9842
|
+
case "seconds":
|
|
9843
|
+
case "second":
|
|
9844
|
+
case "secs":
|
|
9845
|
+
case "sec":
|
|
9846
|
+
case "s": return n$2 * s;
|
|
9847
|
+
case "milliseconds":
|
|
9848
|
+
case "millisecond":
|
|
9849
|
+
case "msecs":
|
|
9850
|
+
case "msec":
|
|
9851
|
+
case "ms": return n$2;
|
|
9852
|
+
default: return;
|
|
9627
9853
|
}
|
|
9628
|
-
}
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
return
|
|
9648
|
-
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9854
|
+
}
|
|
9855
|
+
/**
|
|
9856
|
+
* Short format for `ms`.
|
|
9857
|
+
*
|
|
9858
|
+
* @param {Number} ms
|
|
9859
|
+
* @return {String}
|
|
9860
|
+
* @api private
|
|
9861
|
+
*/
|
|
9862
|
+
function fmtShort(ms) {
|
|
9863
|
+
if (ms >= d) return Math.round(ms / d) + "d";
|
|
9864
|
+
if (ms >= h) return Math.round(ms / h) + "h";
|
|
9865
|
+
if (ms >= m) return Math.round(ms / m) + "m";
|
|
9866
|
+
if (ms >= s) return Math.round(ms / s) + "s";
|
|
9867
|
+
return ms + "ms";
|
|
9868
|
+
}
|
|
9869
|
+
/**
|
|
9870
|
+
* Long format for `ms`.
|
|
9871
|
+
*
|
|
9872
|
+
* @param {Number} ms
|
|
9873
|
+
* @return {String}
|
|
9874
|
+
* @api private
|
|
9875
|
+
*/
|
|
9876
|
+
function fmtLong(ms) {
|
|
9877
|
+
return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
|
|
9878
|
+
}
|
|
9879
|
+
/**
|
|
9880
|
+
* Pluralization helper.
|
|
9881
|
+
*/
|
|
9882
|
+
function plural(ms, n$2, name) {
|
|
9883
|
+
if (ms < n$2) return;
|
|
9884
|
+
if (ms < n$2 * 1.5) return Math.floor(ms / n$2) + " " + name;
|
|
9885
|
+
return Math.ceil(ms / n$2) + " " + name + "s";
|
|
9886
|
+
}
|
|
9654
9887
|
}) });
|
|
9655
9888
|
|
|
9656
9889
|
//#endregion
|
|
9657
|
-
//#region ../../node_modules/.pnpm/
|
|
9658
|
-
var
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
|
|
9672
|
-
|
|
9673
|
-
|
|
9674
|
-
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9680
|
-
|
|
9681
|
-
}
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
|
|
9685
|
-
|
|
9686
|
-
|
|
9687
|
-
|
|
9688
|
-
|
|
9689
|
-
}
|
|
9690
|
-
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
}
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9770
|
-
|
|
9771
|
-
|
|
9772
|
-
|
|
9773
|
-
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
9890
|
+
//#region ../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/debug.js
|
|
9891
|
+
var require_debug$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/debug.js": ((exports, module) => {
|
|
9892
|
+
/**
|
|
9893
|
+
* This is the common logic for both the Node.js and web browser
|
|
9894
|
+
* implementations of `debug()`.
|
|
9895
|
+
*
|
|
9896
|
+
* Expose `debug()` as the module.
|
|
9897
|
+
*/
|
|
9898
|
+
exports = module.exports = createDebug.debug = createDebug["default"] = createDebug;
|
|
9899
|
+
exports.coerce = coerce;
|
|
9900
|
+
exports.disable = disable;
|
|
9901
|
+
exports.enable = enable;
|
|
9902
|
+
exports.enabled = enabled;
|
|
9903
|
+
exports.humanize = require_ms();
|
|
9904
|
+
/**
|
|
9905
|
+
* The currently active debug mode names, and names to skip.
|
|
9906
|
+
*/
|
|
9907
|
+
exports.names = [];
|
|
9908
|
+
exports.skips = [];
|
|
9909
|
+
/**
|
|
9910
|
+
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
9911
|
+
*
|
|
9912
|
+
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
9913
|
+
*/
|
|
9914
|
+
exports.formatters = {};
|
|
9915
|
+
/**
|
|
9916
|
+
* Previous log timestamp.
|
|
9917
|
+
*/
|
|
9918
|
+
var prevTime;
|
|
9919
|
+
/**
|
|
9920
|
+
* Select a color.
|
|
9921
|
+
* @param {String} namespace
|
|
9922
|
+
* @return {Number}
|
|
9923
|
+
* @api private
|
|
9924
|
+
*/
|
|
9925
|
+
function selectColor(namespace) {
|
|
9926
|
+
var hash$1 = 0, i$1;
|
|
9927
|
+
for (i$1 in namespace) {
|
|
9928
|
+
hash$1 = (hash$1 << 5) - hash$1 + namespace.charCodeAt(i$1);
|
|
9929
|
+
hash$1 |= 0;
|
|
9930
|
+
}
|
|
9931
|
+
return exports.colors[Math.abs(hash$1) % exports.colors.length];
|
|
9932
|
+
}
|
|
9933
|
+
/**
|
|
9934
|
+
* Create a debugger with the given `namespace`.
|
|
9935
|
+
*
|
|
9936
|
+
* @param {String} namespace
|
|
9937
|
+
* @return {Function}
|
|
9938
|
+
* @api public
|
|
9939
|
+
*/
|
|
9940
|
+
function createDebug(namespace) {
|
|
9941
|
+
function debug$19() {
|
|
9942
|
+
if (!debug$19.enabled) return;
|
|
9943
|
+
var self$1 = debug$19;
|
|
9944
|
+
var curr = +/* @__PURE__ */ new Date();
|
|
9945
|
+
self$1.diff = curr - (prevTime || curr);
|
|
9946
|
+
self$1.prev = prevTime;
|
|
9947
|
+
self$1.curr = curr;
|
|
9948
|
+
prevTime = curr;
|
|
9949
|
+
var args = new Array(arguments.length);
|
|
9950
|
+
for (var i$1 = 0; i$1 < args.length; i$1++) args[i$1] = arguments[i$1];
|
|
9951
|
+
args[0] = exports.coerce(args[0]);
|
|
9952
|
+
if ("string" !== typeof args[0]) args.unshift("%O");
|
|
9953
|
+
var index = 0;
|
|
9954
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format$3) {
|
|
9955
|
+
if (match === "%%") return match;
|
|
9956
|
+
index++;
|
|
9957
|
+
var formatter = exports.formatters[format$3];
|
|
9958
|
+
if ("function" === typeof formatter) {
|
|
9959
|
+
var val = args[index];
|
|
9960
|
+
match = formatter.call(self$1, val);
|
|
9961
|
+
args.splice(index, 1);
|
|
9962
|
+
index--;
|
|
9963
|
+
}
|
|
9964
|
+
return match;
|
|
9965
|
+
});
|
|
9966
|
+
exports.formatArgs.call(self$1, args);
|
|
9967
|
+
(debug$19.log || exports.log || console.log.bind(console)).apply(self$1, args);
|
|
9968
|
+
}
|
|
9969
|
+
debug$19.namespace = namespace;
|
|
9970
|
+
debug$19.enabled = exports.enabled(namespace);
|
|
9971
|
+
debug$19.useColors = exports.useColors();
|
|
9972
|
+
debug$19.color = selectColor(namespace);
|
|
9973
|
+
if ("function" === typeof exports.init) exports.init(debug$19);
|
|
9974
|
+
return debug$19;
|
|
9975
|
+
}
|
|
9976
|
+
/**
|
|
9977
|
+
* Enables a debug mode by namespaces. This can include modes
|
|
9978
|
+
* separated by a colon and wildcards.
|
|
9979
|
+
*
|
|
9980
|
+
* @param {String} namespaces
|
|
9981
|
+
* @api public
|
|
9982
|
+
*/
|
|
9983
|
+
function enable(namespaces) {
|
|
9984
|
+
exports.save(namespaces);
|
|
9985
|
+
exports.names = [];
|
|
9986
|
+
exports.skips = [];
|
|
9987
|
+
var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
|
|
9988
|
+
var len = split.length;
|
|
9989
|
+
for (var i$1 = 0; i$1 < len; i$1++) {
|
|
9990
|
+
if (!split[i$1]) continue;
|
|
9991
|
+
namespaces = split[i$1].replace(/\*/g, ".*?");
|
|
9992
|
+
if (namespaces[0] === "-") exports.skips.push(/* @__PURE__ */ new RegExp("^" + namespaces.substr(1) + "$"));
|
|
9993
|
+
else exports.names.push(/* @__PURE__ */ new RegExp("^" + namespaces + "$"));
|
|
9994
|
+
}
|
|
9995
|
+
}
|
|
9996
|
+
/**
|
|
9997
|
+
* Disable debug output.
|
|
9998
|
+
*
|
|
9999
|
+
* @api public
|
|
10000
|
+
*/
|
|
10001
|
+
function disable() {
|
|
10002
|
+
exports.enable("");
|
|
10003
|
+
}
|
|
10004
|
+
/**
|
|
10005
|
+
* Returns true if the given mode name is enabled, false otherwise.
|
|
10006
|
+
*
|
|
10007
|
+
* @param {String} name
|
|
10008
|
+
* @return {Boolean}
|
|
10009
|
+
* @api public
|
|
10010
|
+
*/
|
|
10011
|
+
function enabled(name) {
|
|
10012
|
+
var i$1, len;
|
|
10013
|
+
for (i$1 = 0, len = exports.skips.length; i$1 < len; i$1++) if (exports.skips[i$1].test(name)) return false;
|
|
10014
|
+
for (i$1 = 0, len = exports.names.length; i$1 < len; i$1++) if (exports.names[i$1].test(name)) return true;
|
|
10015
|
+
return false;
|
|
10016
|
+
}
|
|
10017
|
+
/**
|
|
10018
|
+
* Coerce `val`.
|
|
10019
|
+
*
|
|
10020
|
+
* @param {Mixed} val
|
|
10021
|
+
* @return {Mixed}
|
|
10022
|
+
* @api private
|
|
10023
|
+
*/
|
|
10024
|
+
function coerce(val) {
|
|
10025
|
+
if (val instanceof Error) return val.stack || val.message;
|
|
10026
|
+
return val;
|
|
10027
|
+
}
|
|
10028
|
+
}) });
|
|
10029
|
+
|
|
10030
|
+
//#endregion
|
|
10031
|
+
//#region ../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/node.js
|
|
10032
|
+
var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/node.js": ((exports, module) => {
|
|
10033
|
+
/**
|
|
10034
|
+
* Module dependencies.
|
|
10035
|
+
*/
|
|
10036
|
+
var tty = __require("tty");
|
|
10037
|
+
var util$1 = __require("util");
|
|
10038
|
+
/**
|
|
10039
|
+
* This is the Node.js implementation of `debug()`.
|
|
10040
|
+
*
|
|
10041
|
+
* Expose `debug()` as the module.
|
|
10042
|
+
*/
|
|
10043
|
+
exports = module.exports = require_debug$1();
|
|
10044
|
+
exports.init = init$1;
|
|
10045
|
+
exports.log = log$2;
|
|
10046
|
+
exports.formatArgs = formatArgs;
|
|
10047
|
+
exports.save = save;
|
|
10048
|
+
exports.load = load;
|
|
10049
|
+
exports.useColors = useColors;
|
|
10050
|
+
/**
|
|
10051
|
+
* Colors.
|
|
10052
|
+
*/
|
|
10053
|
+
exports.colors = [
|
|
9779
10054
|
6,
|
|
9780
10055
|
2,
|
|
9781
10056
|
3,
|
|
@@ -9783,34 +10058,146 @@ var init_node = __esm({ "../../node_modules/.pnpm/obug@2.1.0/node_modules/obug/d
|
|
|
9783
10058
|
5,
|
|
9784
10059
|
1
|
|
9785
10060
|
];
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
|
|
10061
|
+
/**
|
|
10062
|
+
* Build up the default `inspectOpts` object from the environment variables.
|
|
10063
|
+
*
|
|
10064
|
+
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
|
10065
|
+
*/
|
|
10066
|
+
exports.inspectOpts = Object.keys(process.env).filter(function(key) {
|
|
10067
|
+
return /^debug_/i.test(key);
|
|
10068
|
+
}).reduce(function(obj, key) {
|
|
10069
|
+
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
|
|
10070
|
+
return k.toUpperCase();
|
|
10071
|
+
});
|
|
10072
|
+
var val = process.env[key];
|
|
10073
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
|
|
10074
|
+
else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
|
|
10075
|
+
else if (val === "null") val = null;
|
|
10076
|
+
else val = Number(val);
|
|
10077
|
+
obj[prop] = val;
|
|
9794
10078
|
return obj;
|
|
9795
10079
|
}, {});
|
|
9796
|
-
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
|
|
9808
|
-
|
|
9809
|
-
inspectOpts
|
|
9810
|
-
|
|
9811
|
-
|
|
10080
|
+
/**
|
|
10081
|
+
* The file descriptor to write the `debug()` calls to.
|
|
10082
|
+
* Set the `DEBUG_FD` env variable to override with another value. i.e.:
|
|
10083
|
+
*
|
|
10084
|
+
* $ DEBUG_FD=3 node script.js 3>debug.log
|
|
10085
|
+
*/
|
|
10086
|
+
var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
|
|
10087
|
+
if (1 !== fd && 2 !== fd) util$1.deprecate(function() {}, "except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();
|
|
10088
|
+
var stream$2 = 1 === fd ? process.stdout : 2 === fd ? process.stderr : createWritableStdioStream(fd);
|
|
10089
|
+
/**
|
|
10090
|
+
* Is stdout a TTY? Colored output is enabled when `true`.
|
|
10091
|
+
*/
|
|
10092
|
+
function useColors() {
|
|
10093
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(fd);
|
|
10094
|
+
}
|
|
10095
|
+
/**
|
|
10096
|
+
* Map %o to `util.inspect()`, all on a single line.
|
|
10097
|
+
*/
|
|
10098
|
+
exports.formatters.o = function(v) {
|
|
10099
|
+
this.inspectOpts.colors = this.useColors;
|
|
10100
|
+
return util$1.inspect(v, this.inspectOpts).split("\n").map(function(str) {
|
|
10101
|
+
return str.trim();
|
|
10102
|
+
}).join(" ");
|
|
10103
|
+
};
|
|
10104
|
+
/**
|
|
10105
|
+
* Map %o to `util.inspect()`, allowing multiple lines if needed.
|
|
10106
|
+
*/
|
|
10107
|
+
exports.formatters.O = function(v) {
|
|
10108
|
+
this.inspectOpts.colors = this.useColors;
|
|
10109
|
+
return util$1.inspect(v, this.inspectOpts);
|
|
9812
10110
|
};
|
|
9813
|
-
|
|
10111
|
+
/**
|
|
10112
|
+
* Adds ANSI color escape codes if enabled.
|
|
10113
|
+
*
|
|
10114
|
+
* @api public
|
|
10115
|
+
*/
|
|
10116
|
+
function formatArgs(args) {
|
|
10117
|
+
var name = this.namespace;
|
|
10118
|
+
if (this.useColors) {
|
|
10119
|
+
var c = this.color;
|
|
10120
|
+
var prefix = " \x1B[3" + c + ";1m" + name + " \x1B[0m";
|
|
10121
|
+
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
10122
|
+
args.push("\x1B[3" + c + "m+" + exports.humanize(this.diff) + "\x1B[0m");
|
|
10123
|
+
} else args[0] = (/* @__PURE__ */ new Date()).toUTCString() + " " + name + " " + args[0];
|
|
10124
|
+
}
|
|
10125
|
+
/**
|
|
10126
|
+
* Invokes `util.format()` with the specified arguments and writes to `stream`.
|
|
10127
|
+
*/
|
|
10128
|
+
function log$2() {
|
|
10129
|
+
return stream$2.write(util$1.format.apply(util$1, arguments) + "\n");
|
|
10130
|
+
}
|
|
10131
|
+
/**
|
|
10132
|
+
* Save `namespaces`.
|
|
10133
|
+
*
|
|
10134
|
+
* @param {String} namespaces
|
|
10135
|
+
* @api private
|
|
10136
|
+
*/
|
|
10137
|
+
function save(namespaces) {
|
|
10138
|
+
if (null == namespaces) delete process.env.DEBUG;
|
|
10139
|
+
else process.env.DEBUG = namespaces;
|
|
10140
|
+
}
|
|
10141
|
+
/**
|
|
10142
|
+
* Load `namespaces`.
|
|
10143
|
+
*
|
|
10144
|
+
* @return {String} returns the previously persisted debug modes
|
|
10145
|
+
* @api private
|
|
10146
|
+
*/
|
|
10147
|
+
function load() {
|
|
10148
|
+
return process.env.DEBUG;
|
|
10149
|
+
}
|
|
10150
|
+
/**
|
|
10151
|
+
* Copied from `node/src/node.js`.
|
|
10152
|
+
*
|
|
10153
|
+
* XXX: It's lame that node doesn't expose this API out-of-the-box. It also
|
|
10154
|
+
* relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
|
|
10155
|
+
*/
|
|
10156
|
+
function createWritableStdioStream(fd$1) {
|
|
10157
|
+
var stream$3;
|
|
10158
|
+
switch (process.binding("tty_wrap").guessHandleType(fd$1)) {
|
|
10159
|
+
case "TTY":
|
|
10160
|
+
stream$3 = new tty.WriteStream(fd$1);
|
|
10161
|
+
stream$3._type = "tty";
|
|
10162
|
+
if (stream$3._handle && stream$3._handle.unref) stream$3._handle.unref();
|
|
10163
|
+
break;
|
|
10164
|
+
case "FILE":
|
|
10165
|
+
stream$3 = new (__require("fs")).SyncWriteStream(fd$1, { autoClose: false });
|
|
10166
|
+
stream$3._type = "fs";
|
|
10167
|
+
break;
|
|
10168
|
+
case "PIPE":
|
|
10169
|
+
case "TCP":
|
|
10170
|
+
stream$3 = new (__require("net")).Socket({
|
|
10171
|
+
fd: fd$1,
|
|
10172
|
+
readable: false,
|
|
10173
|
+
writable: true
|
|
10174
|
+
});
|
|
10175
|
+
stream$3.readable = false;
|
|
10176
|
+
stream$3.read = null;
|
|
10177
|
+
stream$3._type = "pipe";
|
|
10178
|
+
if (stream$3._handle && stream$3._handle.unref) stream$3._handle.unref();
|
|
10179
|
+
break;
|
|
10180
|
+
default: throw new Error("Implement me. Unknown stream file type!");
|
|
10181
|
+
}
|
|
10182
|
+
stream$3.fd = fd$1;
|
|
10183
|
+
stream$3._isStdio = true;
|
|
10184
|
+
return stream$3;
|
|
10185
|
+
}
|
|
10186
|
+
/**
|
|
10187
|
+
* Init logic for `debug` instances.
|
|
10188
|
+
*
|
|
10189
|
+
* Create a new `inspectOpts` object in case `useColors` is set
|
|
10190
|
+
* differently for a particular `debug` instance.
|
|
10191
|
+
*/
|
|
10192
|
+
function init$1(debug$19) {
|
|
10193
|
+
debug$19.inspectOpts = {};
|
|
10194
|
+
var keys = Object.keys(exports.inspectOpts);
|
|
10195
|
+
for (var i$1 = 0; i$1 < keys.length; i$1++) debug$19.inspectOpts[keys[i$1]] = exports.inspectOpts[keys[i$1]];
|
|
10196
|
+
}
|
|
10197
|
+
/**
|
|
10198
|
+
* Enable namespaces listed in `process.env.DEBUG` initially.
|
|
10199
|
+
*/
|
|
10200
|
+
exports.enable(load());
|
|
9814
10201
|
}) });
|
|
9815
10202
|
|
|
9816
10203
|
//#endregion
|
|
@@ -10422,8 +10809,8 @@ var require_unpipe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/unpi
|
|
|
10422
10809
|
* Determine if there are Node.js pipe-like data listeners.
|
|
10423
10810
|
* @private
|
|
10424
10811
|
*/
|
|
10425
|
-
function hasPipeDataListeners(stream$
|
|
10426
|
-
var listeners = stream$
|
|
10812
|
+
function hasPipeDataListeners(stream$3) {
|
|
10813
|
+
var listeners = stream$3.listeners("data");
|
|
10427
10814
|
for (var i$1 = 0; i$1 < listeners.length; i$1++) if (listeners[i$1].name === "ondata") return true;
|
|
10428
10815
|
return false;
|
|
10429
10816
|
}
|
|
@@ -10433,19 +10820,19 @@ var require_unpipe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/unpi
|
|
|
10433
10820
|
* @param {object} stream
|
|
10434
10821
|
* @public
|
|
10435
10822
|
*/
|
|
10436
|
-
function unpipe$1(stream$
|
|
10437
|
-
if (!stream$
|
|
10438
|
-
if (typeof stream$
|
|
10439
|
-
stream$
|
|
10823
|
+
function unpipe$1(stream$3) {
|
|
10824
|
+
if (!stream$3) throw new TypeError("argument stream is required");
|
|
10825
|
+
if (typeof stream$3.unpipe === "function") {
|
|
10826
|
+
stream$3.unpipe();
|
|
10440
10827
|
return;
|
|
10441
10828
|
}
|
|
10442
|
-
if (!hasPipeDataListeners(stream$
|
|
10829
|
+
if (!hasPipeDataListeners(stream$3)) return;
|
|
10443
10830
|
var listener$1;
|
|
10444
|
-
var listeners = stream$
|
|
10831
|
+
var listeners = stream$3.listeners("close");
|
|
10445
10832
|
for (var i$1 = 0; i$1 < listeners.length; i$1++) {
|
|
10446
10833
|
listener$1 = listeners[i$1];
|
|
10447
10834
|
if (listener$1.name !== "cleanup" && listener$1.name !== "onclose") continue;
|
|
10448
|
-
listener$1.call(stream$
|
|
10835
|
+
listener$1.call(stream$3);
|
|
10449
10836
|
}
|
|
10450
10837
|
}
|
|
10451
10838
|
}) });
|
|
@@ -10462,7 +10849,7 @@ var require_finalhandler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
10462
10849
|
* Module dependencies.
|
|
10463
10850
|
* @private
|
|
10464
10851
|
*/
|
|
10465
|
-
var debug$13 = (
|
|
10852
|
+
var debug$13 = require_node()("finalhandler");
|
|
10466
10853
|
var encodeUrl = require_encodeurl();
|
|
10467
10854
|
var escapeHtml$2 = require_escape_html();
|
|
10468
10855
|
var onFinished = require_on_finished();
|
|
@@ -10706,7 +11093,7 @@ var require_connect = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/con
|
|
|
10706
11093
|
* Module dependencies.
|
|
10707
11094
|
* @private
|
|
10708
11095
|
*/
|
|
10709
|
-
var debug$12 = (
|
|
11096
|
+
var debug$12 = require_node()("connect:dispatcher");
|
|
10710
11097
|
var EventEmitter$4 = __require("events").EventEmitter;
|
|
10711
11098
|
var finalhandler = require_finalhandler();
|
|
10712
11099
|
var http$6 = __require("http");
|
|
@@ -10943,8 +11330,8 @@ var require_object_assign = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
|
10943
11330
|
var from;
|
|
10944
11331
|
var to = toObject(target);
|
|
10945
11332
|
var symbols;
|
|
10946
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
10947
|
-
from = Object(arguments[s]);
|
|
11333
|
+
for (var s$2 = 1; s$2 < arguments.length; s$2++) {
|
|
11334
|
+
from = Object(arguments[s$2]);
|
|
10948
11335
|
for (var key in from) if (hasOwnProperty.call(from, key)) to[key] = from[key];
|
|
10949
11336
|
if (getOwnPropertySymbols) {
|
|
10950
11337
|
symbols = getOwnPropertySymbols(from);
|
|
@@ -11049,7 +11436,6 @@ var require_vary = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/vary@1
|
|
|
11049
11436
|
//#region ../../node_modules/.pnpm/cors@2.8.5/node_modules/cors/lib/index.js
|
|
11050
11437
|
var require_lib$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cors@2.8.5/node_modules/cors/lib/index.js": ((exports, module) => {
|
|
11051
11438
|
(function() {
|
|
11052
|
-
"use strict";
|
|
11053
11439
|
var assign = require_object_assign();
|
|
11054
11440
|
var vary$1 = require_vary();
|
|
11055
11441
|
var defaults = {
|
|
@@ -11058,8 +11444,8 @@ var require_lib$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cors@
|
|
|
11058
11444
|
preflightContinue: false,
|
|
11059
11445
|
optionsSuccessStatus: 204
|
|
11060
11446
|
};
|
|
11061
|
-
function isString$1(s) {
|
|
11062
|
-
return typeof s === "string" || s instanceof String;
|
|
11447
|
+
function isString$1(s$2) {
|
|
11448
|
+
return typeof s$2 === "string" || s$2 instanceof String;
|
|
11063
11449
|
}
|
|
11064
11450
|
function isOriginAllowed(origin, allowedOrigin) {
|
|
11065
11451
|
if (Array.isArray(allowedOrigin)) {
|
|
@@ -13463,13 +13849,13 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
13463
13849
|
}
|
|
13464
13850
|
const previous = this.fsw._getWatchedDir(wh.path);
|
|
13465
13851
|
const current = /* @__PURE__ */ new Set();
|
|
13466
|
-
let stream$
|
|
13852
|
+
let stream$3 = this.fsw._readdirp(directory, {
|
|
13467
13853
|
fileFilter: (entry) => wh.filterPath(entry),
|
|
13468
13854
|
directoryFilter: (entry) => wh.filterDir(entry),
|
|
13469
13855
|
depth: 0
|
|
13470
13856
|
}).on(STR_DATA$1, async (entry) => {
|
|
13471
13857
|
if (this.fsw.closed) {
|
|
13472
|
-
stream$
|
|
13858
|
+
stream$3 = void 0;
|
|
13473
13859
|
return;
|
|
13474
13860
|
}
|
|
13475
13861
|
const item = entry.path;
|
|
@@ -13477,7 +13863,7 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
13477
13863
|
current.add(item);
|
|
13478
13864
|
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path$13, item)) return;
|
|
13479
13865
|
if (this.fsw.closed) {
|
|
13480
|
-
stream$
|
|
13866
|
+
stream$3 = void 0;
|
|
13481
13867
|
return;
|
|
13482
13868
|
}
|
|
13483
13869
|
if (item === target || !target && !previous.has(item)) {
|
|
@@ -13486,9 +13872,9 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
13486
13872
|
this._addToNodeFs(path$13, initialAdd, wh, depth + 1);
|
|
13487
13873
|
}
|
|
13488
13874
|
}).on(EV_ERROR$2, this._boundHandleError);
|
|
13489
|
-
return new Promise((resolve$4) => stream$
|
|
13875
|
+
return new Promise((resolve$4) => stream$3.once(STR_END$2, () => {
|
|
13490
13876
|
if (this.fsw.closed) {
|
|
13491
|
-
stream$
|
|
13877
|
+
stream$3 = void 0;
|
|
13492
13878
|
return;
|
|
13493
13879
|
}
|
|
13494
13880
|
const wasThrottled = throttler ? throttler.clear() : false;
|
|
@@ -13498,7 +13884,7 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
13498
13884
|
}).forEach((item) => {
|
|
13499
13885
|
this.fsw._remove(directory, item);
|
|
13500
13886
|
});
|
|
13501
|
-
stream$
|
|
13887
|
+
stream$3 = void 0;
|
|
13502
13888
|
if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler);
|
|
13503
13889
|
}));
|
|
13504
13890
|
}
|
|
@@ -14272,7 +14658,7 @@ var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ch
|
|
|
14272
14658
|
const promise = closer();
|
|
14273
14659
|
if (promise instanceof Promise) closers.push(promise);
|
|
14274
14660
|
}));
|
|
14275
|
-
this._streams.forEach((stream$
|
|
14661
|
+
this._streams.forEach((stream$3) => stream$3.destroy());
|
|
14276
14662
|
this._userIgnored = void 0;
|
|
14277
14663
|
this._readyCount = 0;
|
|
14278
14664
|
this._readyEmitted = false;
|
|
@@ -14587,23 +14973,23 @@ var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ch
|
|
|
14587
14973
|
}
|
|
14588
14974
|
_readdirp(root, opts) {
|
|
14589
14975
|
if (this.closed) return;
|
|
14590
|
-
let stream$
|
|
14976
|
+
let stream$3 = readdirp(root, {
|
|
14591
14977
|
type: EV_ALL,
|
|
14592
14978
|
alwaysStat: true,
|
|
14593
14979
|
lstat: true,
|
|
14594
14980
|
...opts
|
|
14595
14981
|
});
|
|
14596
|
-
this._streams.add(stream$
|
|
14597
|
-
stream$
|
|
14598
|
-
stream$
|
|
14982
|
+
this._streams.add(stream$3);
|
|
14983
|
+
stream$3.once(STR_CLOSE, () => {
|
|
14984
|
+
stream$3 = void 0;
|
|
14599
14985
|
});
|
|
14600
|
-
stream$
|
|
14601
|
-
if (stream$
|
|
14602
|
-
this._streams.delete(stream$
|
|
14603
|
-
stream$
|
|
14986
|
+
stream$3.once(STR_END, () => {
|
|
14987
|
+
if (stream$3) {
|
|
14988
|
+
this._streams.delete(stream$3);
|
|
14989
|
+
stream$3 = void 0;
|
|
14604
14990
|
}
|
|
14605
14991
|
});
|
|
14606
|
-
return stream$
|
|
14992
|
+
return stream$3;
|
|
14607
14993
|
}
|
|
14608
14994
|
};
|
|
14609
14995
|
/**
|
|
@@ -14624,12 +15010,12 @@ var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ch
|
|
|
14624
15010
|
//#region ../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/quote.js
|
|
14625
15011
|
var require_quote = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/quote.js": ((exports, module) => {
|
|
14626
15012
|
module.exports = function quote(xs) {
|
|
14627
|
-
return xs.map(function(s) {
|
|
14628
|
-
if (s === "") return "''";
|
|
14629
|
-
if (s && typeof s === "object") return s.op.replace(/(.)/g, "\\$1");
|
|
14630
|
-
if (/["\s\\]/.test(s) && !/'/.test(s)) return "'" + s.replace(/(['])/g, "\\$1") + "'";
|
|
14631
|
-
if (/["'\s]/.test(s)) return "\"" + s.replace(/(["\\$`!])/g, "\\$1") + "\"";
|
|
14632
|
-
return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, "$1\\$2");
|
|
15013
|
+
return xs.map(function(s$2) {
|
|
15014
|
+
if (s$2 === "") return "''";
|
|
15015
|
+
if (s$2 && typeof s$2 === "object") return s$2.op.replace(/(.)/g, "\\$1");
|
|
15016
|
+
if (/["\s\\]/.test(s$2) && !/'/.test(s$2)) return "'" + s$2.replace(/(['])/g, "\\$1") + "'";
|
|
15017
|
+
if (/["'\s]/.test(s$2)) return "\"" + s$2.replace(/(["\\$`!])/g, "\\$1") + "\"";
|
|
15018
|
+
return String(s$2).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, "$1\\$2");
|
|
14633
15019
|
}).join(" ");
|
|
14634
15020
|
};
|
|
14635
15021
|
}) });
|
|
@@ -14661,11 +15047,11 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
14661
15047
|
var mult = 4294967296;
|
|
14662
15048
|
for (var i = 0; i < 4; i++) TOKEN += (mult * Math.random()).toString(16);
|
|
14663
15049
|
var startsWithToken = /* @__PURE__ */ new RegExp("^" + TOKEN);
|
|
14664
|
-
function matchAll(s, r$1) {
|
|
15050
|
+
function matchAll(s$2, r$1) {
|
|
14665
15051
|
var origIndex = r$1.lastIndex;
|
|
14666
15052
|
var matches$2 = [];
|
|
14667
15053
|
var matchObj;
|
|
14668
|
-
while (matchObj = r$1.exec(s)) {
|
|
15054
|
+
while (matchObj = r$1.exec(s$2)) {
|
|
14669
15055
|
matches$2.push(matchObj);
|
|
14670
15056
|
if (r$1.lastIndex === matchObj.index) r$1.lastIndex += 1;
|
|
14671
15057
|
}
|
|
@@ -14688,9 +15074,9 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
14688
15074
|
if (!env$1) env$1 = {};
|
|
14689
15075
|
var commented = false;
|
|
14690
15076
|
return matches$2.map(function(match) {
|
|
14691
|
-
var s = match[0];
|
|
14692
|
-
if (!s || commented) return;
|
|
14693
|
-
if (controlRE.test(s)) return { op: s };
|
|
15077
|
+
var s$2 = match[0];
|
|
15078
|
+
if (!s$2 || commented) return;
|
|
15079
|
+
if (controlRE.test(s$2)) return { op: s$2 };
|
|
14694
15080
|
var quote = false;
|
|
14695
15081
|
var esc = false;
|
|
14696
15082
|
var out = "";
|
|
@@ -14700,23 +15086,23 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
14700
15086
|
i$1 += 1;
|
|
14701
15087
|
var varend;
|
|
14702
15088
|
var varname;
|
|
14703
|
-
var char = s.charAt(i$1);
|
|
15089
|
+
var char = s$2.charAt(i$1);
|
|
14704
15090
|
if (char === "{") {
|
|
14705
15091
|
i$1 += 1;
|
|
14706
|
-
if (s.charAt(i$1) === "}") throw new Error("Bad substitution: " + s.slice(i$1 - 2, i$1 + 1));
|
|
14707
|
-
varend = s.indexOf("}", i$1);
|
|
14708
|
-
if (varend < 0) throw new Error("Bad substitution: " + s.slice(i$1));
|
|
14709
|
-
varname = s.slice(i$1, varend);
|
|
15092
|
+
if (s$2.charAt(i$1) === "}") throw new Error("Bad substitution: " + s$2.slice(i$1 - 2, i$1 + 1));
|
|
15093
|
+
varend = s$2.indexOf("}", i$1);
|
|
15094
|
+
if (varend < 0) throw new Error("Bad substitution: " + s$2.slice(i$1));
|
|
15095
|
+
varname = s$2.slice(i$1, varend);
|
|
14710
15096
|
i$1 = varend;
|
|
14711
15097
|
} else if (/[*@#?$!_-]/.test(char)) {
|
|
14712
15098
|
varname = char;
|
|
14713
15099
|
i$1 += 1;
|
|
14714
15100
|
} else {
|
|
14715
|
-
var slicedFromI = s.slice(i$1);
|
|
15101
|
+
var slicedFromI = s$2.slice(i$1);
|
|
14716
15102
|
varend = slicedFromI.match(/[^\w\d_]/);
|
|
14717
15103
|
if (!varend) {
|
|
14718
15104
|
varname = slicedFromI;
|
|
14719
|
-
i$1 = s.length;
|
|
15105
|
+
i$1 = s$2.length;
|
|
14720
15106
|
} else {
|
|
14721
15107
|
varname = slicedFromI.slice(0, varend.index);
|
|
14722
15108
|
i$1 += varend.index - 1;
|
|
@@ -14724,8 +15110,8 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
14724
15110
|
}
|
|
14725
15111
|
return getVar(env$1, "", varname);
|
|
14726
15112
|
}
|
|
14727
|
-
for (i$1 = 0; i$1 < s.length; i$1++) {
|
|
14728
|
-
var c = s.charAt(i$1);
|
|
15113
|
+
for (i$1 = 0; i$1 < s$2.length; i$1++) {
|
|
15114
|
+
var c = s$2.charAt(i$1);
|
|
14729
15115
|
isGlob$2 = isGlob$2 || !quote && (c === "*" || c === "?");
|
|
14730
15116
|
if (esc) {
|
|
14731
15117
|
out += c;
|
|
@@ -14734,13 +15120,13 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
14734
15120
|
else if (quote == SQ) out += c;
|
|
14735
15121
|
else if (c === BS) {
|
|
14736
15122
|
i$1 += 1;
|
|
14737
|
-
c = s.charAt(i$1);
|
|
15123
|
+
c = s$2.charAt(i$1);
|
|
14738
15124
|
if (c === DQ || c === BS || c === DS) out += c;
|
|
14739
15125
|
else out += BS + c;
|
|
14740
15126
|
} else if (c === DS) out += parseEnvVar();
|
|
14741
15127
|
else out += c;
|
|
14742
15128
|
else if (c === DQ || c === SQ) quote = c;
|
|
14743
|
-
else if (controlRE.test(c)) return { op: s };
|
|
15129
|
+
else if (controlRE.test(c)) return { op: s$2 };
|
|
14744
15130
|
else if (hash.test(c)) {
|
|
14745
15131
|
commented = true;
|
|
14746
15132
|
var commentObj = { comment: string.slice(match.index + i$1 + 1) };
|
|
@@ -14759,12 +15145,12 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
14759
15145
|
return typeof arg === "undefined" ? prev : prev.concat(arg);
|
|
14760
15146
|
}, []);
|
|
14761
15147
|
}
|
|
14762
|
-
module.exports = function parse$
|
|
14763
|
-
var mapped = parseInternal(s, env$1, opts);
|
|
15148
|
+
module.exports = function parse$17(s$2, env$1, opts) {
|
|
15149
|
+
var mapped = parseInternal(s$2, env$1, opts);
|
|
14764
15150
|
if (typeof env$1 !== "function") return mapped;
|
|
14765
|
-
return mapped.reduce(function(acc, s$
|
|
14766
|
-
if (typeof s$
|
|
14767
|
-
var xs = s$
|
|
15151
|
+
return mapped.reduce(function(acc, s$3) {
|
|
15152
|
+
if (typeof s$3 === "object") return acc.concat(s$3);
|
|
15153
|
+
var xs = s$3.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
|
|
14768
15154
|
if (xs.length === 1) return acc.concat(xs[0]);
|
|
14769
15155
|
return acc.concat(xs.filter(Boolean).map(function(x) {
|
|
14770
15156
|
if (startsWithToken.test(x)) return JSON.parse(x.split(TOKEN)[1]);
|
|
@@ -15639,7 +16025,7 @@ async function ssrTransformJSON(code, inMap) {
|
|
|
15639
16025
|
};
|
|
15640
16026
|
}
|
|
15641
16027
|
async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
15642
|
-
const s = new MagicString(code);
|
|
16028
|
+
const s$2 = new MagicString(code);
|
|
15643
16029
|
let ast;
|
|
15644
16030
|
try {
|
|
15645
16031
|
ast = await parseAstAsync(code);
|
|
@@ -15669,13 +16055,13 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
15669
16055
|
const metadataArg = (metadata?.importedNames?.length ?? 0) > 0 ? `, ${JSON.stringify(metadata)}` : "";
|
|
15670
16056
|
const importId = `__vite_ssr_import_${uid++}__`;
|
|
15671
16057
|
const transformedImport = `const ${importId} = await ${ssrImportKey}(${JSON.stringify(source)}${metadataArg});\n`;
|
|
15672
|
-
s.update(importNode.start, importNode.end, transformedImport);
|
|
16058
|
+
s$2.update(importNode.start, importNode.end, transformedImport);
|
|
15673
16059
|
if (importNode.start === index) hoistIndex = importNode.end;
|
|
15674
|
-
else s.move(importNode.start, importNode.end, index);
|
|
16060
|
+
else s$2.move(importNode.start, importNode.end, index);
|
|
15675
16061
|
return importId;
|
|
15676
16062
|
}
|
|
15677
16063
|
function defineExport(name, local = name) {
|
|
15678
|
-
s.appendLeft(fileStartIndex, `${ssrExportNameKey}(${JSON.stringify(name)}, () => { try { return ${local} } catch {} });\n`);
|
|
16064
|
+
s$2.appendLeft(fileStartIndex, `${ssrExportNameKey}(${JSON.stringify(name)}, () => { try { return ${local} } catch {} });\n`);
|
|
15679
16065
|
}
|
|
15680
16066
|
const imports = [];
|
|
15681
16067
|
const exports$1 = [];
|
|
@@ -15689,7 +16075,7 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
15689
16075
|
for (const node of imports) {
|
|
15690
16076
|
if (node.type === "ExportNamedDeclaration") {
|
|
15691
16077
|
if (node.source) {
|
|
15692
|
-
const importId$1 = defineImport(hoistIndex, node, { importedNames: node.specifiers.map((s$
|
|
16078
|
+
const importId$1 = defineImport(hoistIndex, node, { importedNames: node.specifiers.map((s$3) => getIdentifierNameOrLiteralValue$1(s$3.local)) });
|
|
15693
16079
|
reExportImportIdMap.set(node, importId$1);
|
|
15694
16080
|
}
|
|
15695
16081
|
continue;
|
|
@@ -15701,9 +16087,9 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
15701
16087
|
}
|
|
15702
16088
|
continue;
|
|
15703
16089
|
}
|
|
15704
|
-
const importId = defineImport(hoistIndex, node, { importedNames: node.specifiers.map((s$
|
|
15705
|
-
if (s$
|
|
15706
|
-
else if (s$
|
|
16090
|
+
const importId = defineImport(hoistIndex, node, { importedNames: node.specifiers.map((s$3) => {
|
|
16091
|
+
if (s$3.type === "ImportSpecifier") return getIdentifierNameOrLiteralValue$1(s$3.imported);
|
|
16092
|
+
else if (s$3.type === "ImportDefaultSpecifier") return "default";
|
|
15707
16093
|
}).filter(isDefined) });
|
|
15708
16094
|
for (const spec of node.specifiers) if (spec.type === "ImportSpecifier") if (spec.imported.type === "Identifier") idToImportMap.set(spec.local.name, `${importId}.${spec.imported.name}`);
|
|
15709
16095
|
else idToImportMap.set(spec.local.name, `${importId}[${JSON.stringify(spec.imported.value)}]`);
|
|
@@ -15714,10 +16100,10 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
15714
16100
|
if (node.type === "ExportNamedDeclaration") if (node.declaration) {
|
|
15715
16101
|
if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") defineExport(node.declaration.id.name);
|
|
15716
16102
|
else for (const declaration of node.declaration.declarations) {
|
|
15717
|
-
const names
|
|
15718
|
-
for (const name of names
|
|
16103
|
+
const names = extract_names(declaration.id);
|
|
16104
|
+
for (const name of names) defineExport(name);
|
|
15719
16105
|
}
|
|
15720
|
-
s.remove(node.start, node.declaration.start);
|
|
16106
|
+
s$2.remove(node.start, node.declaration.start);
|
|
15721
16107
|
} else if (node.source) {
|
|
15722
16108
|
const importId = reExportImportIdMap.get(node);
|
|
15723
16109
|
for (const spec of node.specifiers) {
|
|
@@ -15726,7 +16112,7 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
15726
16112
|
else defineExport(exportedAs, `${importId}[${JSON.stringify(spec.local.value)}]`);
|
|
15727
16113
|
}
|
|
15728
16114
|
} else {
|
|
15729
|
-
s.remove(node.start, node.end);
|
|
16115
|
+
s$2.remove(node.start, node.end);
|
|
15730
16116
|
for (const spec of node.specifiers) {
|
|
15731
16117
|
const local = spec.local.name;
|
|
15732
16118
|
const binding = idToImportMap.get(local);
|
|
@@ -15735,24 +16121,24 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
15735
16121
|
}
|
|
15736
16122
|
if (node.type === "ExportDefaultDeclaration") if ("id" in node.declaration && node.declaration.id && !["FunctionExpression", "ClassExpression"].includes(node.declaration.type)) {
|
|
15737
16123
|
const { name } = node.declaration.id;
|
|
15738
|
-
s.remove(node.start, node.start + 15);
|
|
16124
|
+
s$2.remove(node.start, node.start + 15);
|
|
15739
16125
|
defineExport("default", name);
|
|
15740
16126
|
} else {
|
|
15741
16127
|
const name = `__vite_ssr_export_default__`;
|
|
15742
|
-
s.update(node.start, node.start + 14, `const ${name} =`);
|
|
16128
|
+
s$2.update(node.start, node.start + 14, `const ${name} =`);
|
|
15743
16129
|
defineExport("default", name);
|
|
15744
16130
|
}
|
|
15745
16131
|
if (node.type === "ExportAllDeclaration") {
|
|
15746
16132
|
const importId = reExportImportIdMap.get(node);
|
|
15747
16133
|
if (node.exported) defineExport(getIdentifierNameOrLiteralValue$1(node.exported), `${importId}`);
|
|
15748
|
-
else s.appendLeft(node.end, `${ssrExportAllKey}(${importId});\n`);
|
|
16134
|
+
else s$2.appendLeft(node.end, `${ssrExportAllKey}(${importId});\n`);
|
|
15749
16135
|
}
|
|
15750
16136
|
}
|
|
15751
16137
|
walk$1(ast, {
|
|
15752
16138
|
onStatements(statements) {
|
|
15753
16139
|
for (let i$1 = 0; i$1 < statements.length - 1; i$1++) {
|
|
15754
16140
|
const stmt = statements[i$1];
|
|
15755
|
-
if (code[stmt.end - 1] !== ";" && stmt.type !== "FunctionDeclaration" && stmt.type !== "ClassDeclaration" && stmt.type !== "BlockStatement" && stmt.type !== "ImportDeclaration") s.appendLeft(stmt.end, ";");
|
|
16141
|
+
if (code[stmt.end - 1] !== ";" && stmt.type !== "FunctionDeclaration" && stmt.type !== "ClassDeclaration" && stmt.type !== "BlockStatement" && stmt.type !== "ImportDeclaration") s$2.appendLeft(stmt.end, ";");
|
|
15756
16142
|
}
|
|
15757
16143
|
},
|
|
15758
16144
|
onIdentifier(id, parent, parentStack) {
|
|
@@ -15760,37 +16146,37 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
15760
16146
|
const binding = idToImportMap.get(id.name);
|
|
15761
16147
|
if (!binding) return;
|
|
15762
16148
|
if (isStaticProperty(parent) && parent.shorthand) {
|
|
15763
|
-
if (!isNodeInPattern(parent) || isInDestructuringAssignment(parent, parentStack)) s.appendLeft(id.end, `: ${binding}`);
|
|
16149
|
+
if (!isNodeInPattern(parent) || isInDestructuringAssignment(parent, parentStack)) s$2.appendLeft(id.end, `: ${binding}`);
|
|
15764
16150
|
} else if (parent.type === "PropertyDefinition" && grandparent?.type === "ClassBody" || parent.type === "ClassDeclaration" && id === parent.superClass) {
|
|
15765
16151
|
if (!declaredConst.has(id.name)) {
|
|
15766
16152
|
declaredConst.add(id.name);
|
|
15767
16153
|
const topNode = parentStack[parentStack.length - 2];
|
|
15768
|
-
s.prependRight(topNode.start, `const ${id.name} = ${binding};\n`);
|
|
16154
|
+
s$2.prependRight(topNode.start, `const ${id.name} = ${binding};\n`);
|
|
15769
16155
|
}
|
|
15770
16156
|
} else if (parent.type === "CallExpression") {
|
|
15771
|
-
s.update(id.start, id.end, binding);
|
|
15772
|
-
s.prependRight(id.start, `(0,`);
|
|
15773
|
-
s.appendLeft(id.end, `)`);
|
|
15774
|
-
} else if (!(parent.type === "ClassExpression" && id === parent.id)) s.update(id.start, id.end, binding);
|
|
16157
|
+
s$2.update(id.start, id.end, binding);
|
|
16158
|
+
s$2.prependRight(id.start, `(0,`);
|
|
16159
|
+
s$2.appendLeft(id.end, `)`);
|
|
16160
|
+
} else if (!(parent.type === "ClassExpression" && id === parent.id)) s$2.update(id.start, id.end, binding);
|
|
15775
16161
|
},
|
|
15776
16162
|
onImportMeta(node) {
|
|
15777
|
-
s.update(node.start, node.end, ssrImportMetaKey);
|
|
16163
|
+
s$2.update(node.start, node.end, ssrImportMetaKey);
|
|
15778
16164
|
},
|
|
15779
16165
|
onDynamicImport(node) {
|
|
15780
|
-
s.update(node.start, node.start + 6, ssrDynamicImportKey);
|
|
16166
|
+
s$2.update(node.start, node.start + 6, ssrDynamicImportKey);
|
|
15781
16167
|
if (node.type === "ImportExpression" && node.source.type === "Literal") dynamicDeps.add(node.source.value);
|
|
15782
16168
|
}
|
|
15783
16169
|
});
|
|
15784
16170
|
let map$1;
|
|
15785
16171
|
if (inMap?.mappings === "") map$1 = inMap;
|
|
15786
16172
|
else {
|
|
15787
|
-
map$1 = s.generateMap({ hires: "boundary" });
|
|
16173
|
+
map$1 = s$2.generateMap({ hires: "boundary" });
|
|
15788
16174
|
map$1.sources = [path.basename(url$3)];
|
|
15789
16175
|
map$1.sourcesContent = [originalCode];
|
|
15790
16176
|
if (inMap && inMap.mappings && "sources" in inMap && inMap.sources.length > 0) map$1 = combineSourcemaps(url$3, [map$1, inMap]);
|
|
15791
16177
|
}
|
|
15792
16178
|
return {
|
|
15793
|
-
code: s.toString(),
|
|
16179
|
+
code: s$2.toString(),
|
|
15794
16180
|
map: map$1,
|
|
15795
16181
|
ssr: true,
|
|
15796
16182
|
deps: [...deps],
|
|
@@ -16618,11 +17004,11 @@ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
16618
17004
|
function readShebang$1(command) {
|
|
16619
17005
|
const size = 150;
|
|
16620
17006
|
const buffer = Buffer.alloc(size);
|
|
16621
|
-
let fd;
|
|
17007
|
+
let fd$1;
|
|
16622
17008
|
try {
|
|
16623
|
-
fd = fs$2.openSync(command, "r");
|
|
16624
|
-
fs$2.readSync(fd, buffer, 0, size, 0);
|
|
16625
|
-
fs$2.closeSync(fd);
|
|
17009
|
+
fd$1 = fs$2.openSync(command, "r");
|
|
17010
|
+
fs$2.readSync(fd$1, buffer, 0, size, 0);
|
|
17011
|
+
fs$2.closeSync(fd$1);
|
|
16626
17012
|
} catch (e$1) {}
|
|
16627
17013
|
return shebangCommand(buffer.toString());
|
|
16628
17014
|
}
|
|
@@ -16841,7 +17227,7 @@ function bindCLIShortcuts(server, opts, enabled$1 = process.stdin.isTTY && !proc
|
|
|
16841
17227
|
if (!server.httpServer || !enabled$1) return;
|
|
16842
17228
|
const isDev = isDevServer(server);
|
|
16843
17229
|
const customShortcuts = opts?.customShortcuts ?? [];
|
|
16844
|
-
for (const shortcut of server._shortcutsOptions?.customShortcuts ?? []) if (!customShortcuts.some((s) => s.key === shortcut.key)) customShortcuts.push(shortcut);
|
|
17230
|
+
for (const shortcut of server._shortcutsOptions?.customShortcuts ?? []) if (!customShortcuts.some((s$2) => s$2.key === shortcut.key)) customShortcuts.push(shortcut);
|
|
16845
17231
|
server._shortcutsOptions = {
|
|
16846
17232
|
...opts,
|
|
16847
17233
|
customShortcuts
|
|
@@ -19764,19 +20150,19 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/w
|
|
|
19764
20150
|
* @param {String} message The error message
|
|
19765
20151
|
* @private
|
|
19766
20152
|
*/
|
|
19767
|
-
function abortHandshake$1(websocket, stream$
|
|
20153
|
+
function abortHandshake$1(websocket, stream$3, message) {
|
|
19768
20154
|
websocket._readyState = WebSocket$2.CLOSING;
|
|
19769
20155
|
const err$2 = new Error(message);
|
|
19770
20156
|
Error.captureStackTrace(err$2, abortHandshake$1);
|
|
19771
|
-
if (stream$
|
|
19772
|
-
stream$
|
|
19773
|
-
stream$
|
|
19774
|
-
if (stream$
|
|
20157
|
+
if (stream$3.setHeader) {
|
|
20158
|
+
stream$3[kAborted] = true;
|
|
20159
|
+
stream$3.abort();
|
|
20160
|
+
if (stream$3.socket && !stream$3.socket.destroyed) stream$3.socket.destroy();
|
|
19775
20161
|
process.nextTick(emitErrorAndClose, websocket, err$2);
|
|
19776
20162
|
} else {
|
|
19777
|
-
stream$
|
|
19778
|
-
stream$
|
|
19779
|
-
stream$
|
|
20163
|
+
stream$3.destroy(err$2);
|
|
20164
|
+
stream$3.once("error", websocket.emit.bind(websocket, "error"));
|
|
20165
|
+
stream$3.once("close", websocket.emitClose.bind(websocket));
|
|
19780
20166
|
}
|
|
19781
20167
|
}
|
|
19782
20168
|
/**
|
|
@@ -19888,8 +20274,8 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/w
|
|
|
19888
20274
|
* @param {Readable} stream The readable stream
|
|
19889
20275
|
* @private
|
|
19890
20276
|
*/
|
|
19891
|
-
function resume(stream$
|
|
19892
|
-
stream$
|
|
20277
|
+
function resume(stream$3) {
|
|
20278
|
+
stream$3.resume();
|
|
19893
20279
|
}
|
|
19894
20280
|
/**
|
|
19895
20281
|
* The `Sender` error event handler.
|
|
@@ -19988,8 +20374,8 @@ var require_stream = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8
|
|
|
19988
20374
|
* @param {Duplex} stream The stream.
|
|
19989
20375
|
* @private
|
|
19990
20376
|
*/
|
|
19991
|
-
function emitClose$1(stream$
|
|
19992
|
-
stream$
|
|
20377
|
+
function emitClose$1(stream$3) {
|
|
20378
|
+
stream$3.emit("close");
|
|
19993
20379
|
}
|
|
19994
20380
|
/**
|
|
19995
20381
|
* The listener of the `'end'` event.
|
|
@@ -20482,7 +20868,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
20482
20868
|
...headers
|
|
20483
20869
|
};
|
|
20484
20870
|
socket.once("finish", socket.destroy);
|
|
20485
|
-
socket.end(`HTTP/1.1 ${code} ${http$4.STATUS_CODES[code]}\r\n` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join("\r\n") + "\r\n\r\n" + message);
|
|
20871
|
+
socket.end(`HTTP/1.1 ${code} ${http$4.STATUS_CODES[code]}\r\n` + Object.keys(headers).map((h$2) => `${h$2}: ${headers[h$2]}`).join("\r\n") + "\r\n\r\n" + message);
|
|
20486
20872
|
}
|
|
20487
20873
|
/**
|
|
20488
20874
|
* Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least
|
|
@@ -20993,19 +21379,19 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http
|
|
|
20993
21379
|
//#endregion
|
|
20994
21380
|
//#region ../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js
|
|
20995
21381
|
var require_web_outgoing = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js": ((exports) => {
|
|
20996
|
-
var __createBinding$3 = exports && exports.__createBinding || (Object.create ? (function(o$1, m, k, k2) {
|
|
21382
|
+
var __createBinding$3 = exports && exports.__createBinding || (Object.create ? (function(o$1, m$2, k, k2) {
|
|
20997
21383
|
if (k2 === void 0) k2 = k;
|
|
20998
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20999
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
21384
|
+
var desc = Object.getOwnPropertyDescriptor(m$2, k);
|
|
21385
|
+
if (!desc || ("get" in desc ? !m$2.__esModule : desc.writable || desc.configurable)) desc = {
|
|
21000
21386
|
enumerable: true,
|
|
21001
21387
|
get: function() {
|
|
21002
|
-
return m[k];
|
|
21388
|
+
return m$2[k];
|
|
21003
21389
|
}
|
|
21004
21390
|
};
|
|
21005
21391
|
Object.defineProperty(o$1, k2, desc);
|
|
21006
|
-
}) : (function(o$1, m, k, k2) {
|
|
21392
|
+
}) : (function(o$1, m$2, k, k2) {
|
|
21007
21393
|
if (k2 === void 0) k2 = k;
|
|
21008
|
-
o$1[k2] = m[k];
|
|
21394
|
+
o$1[k2] = m$2[k];
|
|
21009
21395
|
}));
|
|
21010
21396
|
var __setModuleDefault$3 = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
|
|
21011
21397
|
Object.defineProperty(o$1, "default", {
|
|
@@ -21103,13 +21489,13 @@ var require_web_outgoing = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
21103
21489
|
}) });
|
|
21104
21490
|
|
|
21105
21491
|
//#endregion
|
|
21106
|
-
//#region ../../node_modules/.pnpm/follow-redirects@1.15.
|
|
21107
|
-
var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.
|
|
21492
|
+
//#region ../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/debug.js
|
|
21493
|
+
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) => {
|
|
21108
21494
|
var debug$11;
|
|
21109
21495
|
module.exports = function() {
|
|
21110
21496
|
if (!debug$11) {
|
|
21111
21497
|
try {
|
|
21112
|
-
debug$11 = (
|
|
21498
|
+
debug$11 = require_node$1()("follow-redirects");
|
|
21113
21499
|
} catch (error$1) {}
|
|
21114
21500
|
if (typeof debug$11 !== "function") debug$11 = function() {};
|
|
21115
21501
|
}
|
|
@@ -21118,8 +21504,8 @@ var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follo
|
|
|
21118
21504
|
}) });
|
|
21119
21505
|
|
|
21120
21506
|
//#endregion
|
|
21121
|
-
//#region ../../node_modules/.pnpm/follow-redirects@1.15.
|
|
21122
|
-
var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.
|
|
21507
|
+
//#region ../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/index.js
|
|
21508
|
+
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) => {
|
|
21123
21509
|
var url = __require("url");
|
|
21124
21510
|
var URL$2 = url.URL;
|
|
21125
21511
|
var http$3 = __require("http");
|
|
@@ -21551,19 +21937,19 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
21551
21937
|
//#endregion
|
|
21552
21938
|
//#region ../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js
|
|
21553
21939
|
var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js": ((exports) => {
|
|
21554
|
-
var __createBinding$2 = exports && exports.__createBinding || (Object.create ? (function(o$1, m, k, k2) {
|
|
21940
|
+
var __createBinding$2 = exports && exports.__createBinding || (Object.create ? (function(o$1, m$2, k, k2) {
|
|
21555
21941
|
if (k2 === void 0) k2 = k;
|
|
21556
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
21557
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
21942
|
+
var desc = Object.getOwnPropertyDescriptor(m$2, k);
|
|
21943
|
+
if (!desc || ("get" in desc ? !m$2.__esModule : desc.writable || desc.configurable)) desc = {
|
|
21558
21944
|
enumerable: true,
|
|
21559
21945
|
get: function() {
|
|
21560
|
-
return m[k];
|
|
21946
|
+
return m$2[k];
|
|
21561
21947
|
}
|
|
21562
21948
|
};
|
|
21563
21949
|
Object.defineProperty(o$1, k2, desc);
|
|
21564
|
-
}) : (function(o$1, m, k, k2) {
|
|
21950
|
+
}) : (function(o$1, m$2, k, k2) {
|
|
21565
21951
|
if (k2 === void 0) k2 = k;
|
|
21566
|
-
o$1[k2] = m[k];
|
|
21952
|
+
o$1[k2] = m$2[k];
|
|
21567
21953
|
}));
|
|
21568
21954
|
var __setModuleDefault$2 = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
|
|
21569
21955
|
Object.defineProperty(o$1, "default", {
|
|
@@ -21696,19 +22082,19 @@ var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
21696
22082
|
//#endregion
|
|
21697
22083
|
//#region ../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js
|
|
21698
22084
|
var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js": ((exports) => {
|
|
21699
|
-
var __createBinding$1 = exports && exports.__createBinding || (Object.create ? (function(o$1, m, k, k2) {
|
|
22085
|
+
var __createBinding$1 = exports && exports.__createBinding || (Object.create ? (function(o$1, m$2, k, k2) {
|
|
21700
22086
|
if (k2 === void 0) k2 = k;
|
|
21701
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
21702
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
22087
|
+
var desc = Object.getOwnPropertyDescriptor(m$2, k);
|
|
22088
|
+
if (!desc || ("get" in desc ? !m$2.__esModule : desc.writable || desc.configurable)) desc = {
|
|
21703
22089
|
enumerable: true,
|
|
21704
22090
|
get: function() {
|
|
21705
|
-
return m[k];
|
|
22091
|
+
return m$2[k];
|
|
21706
22092
|
}
|
|
21707
22093
|
};
|
|
21708
22094
|
Object.defineProperty(o$1, k2, desc);
|
|
21709
|
-
}) : (function(o$1, m, k, k2) {
|
|
22095
|
+
}) : (function(o$1, m$2, k, k2) {
|
|
21710
22096
|
if (k2 === void 0) k2 = k;
|
|
21711
|
-
o$1[k2] = m[k];
|
|
22097
|
+
o$1[k2] = m$2[k];
|
|
21712
22098
|
}));
|
|
21713
22099
|
var __setModuleDefault$1 = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
|
|
21714
22100
|
Object.defineProperty(o$1, "default", {
|
|
@@ -21750,7 +22136,7 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
21750
22136
|
const https = __importStar$1(__require("node:https"));
|
|
21751
22137
|
const common = __importStar$1(require_common());
|
|
21752
22138
|
const web_outgoing_1 = require_web_outgoing();
|
|
21753
|
-
const log$1 = (0, __importDefault$1((
|
|
22139
|
+
const log$1 = (0, __importDefault$1(require_node$1()).default)("http-proxy-3:ws-incoming");
|
|
21754
22140
|
const web_o = Object.values(web_outgoing_1.OUTGOING_PASSES);
|
|
21755
22141
|
function createSocketCounter(name) {
|
|
21756
22142
|
let sockets = /* @__PURE__ */ new Set();
|
|
@@ -21906,19 +22292,19 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
21906
22292
|
//#endregion
|
|
21907
22293
|
//#region ../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/index.js
|
|
21908
22294
|
var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/index.js": ((exports) => {
|
|
21909
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o$1, m, k, k2) {
|
|
22295
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o$1, m$2, k, k2) {
|
|
21910
22296
|
if (k2 === void 0) k2 = k;
|
|
21911
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
21912
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
22297
|
+
var desc = Object.getOwnPropertyDescriptor(m$2, k);
|
|
22298
|
+
if (!desc || ("get" in desc ? !m$2.__esModule : desc.writable || desc.configurable)) desc = {
|
|
21913
22299
|
enumerable: true,
|
|
21914
22300
|
get: function() {
|
|
21915
|
-
return m[k];
|
|
22301
|
+
return m$2[k];
|
|
21916
22302
|
}
|
|
21917
22303
|
};
|
|
21918
22304
|
Object.defineProperty(o$1, k2, desc);
|
|
21919
|
-
}) : (function(o$1, m, k, k2) {
|
|
22305
|
+
}) : (function(o$1, m$2, k, k2) {
|
|
21920
22306
|
if (k2 === void 0) k2 = k;
|
|
21921
|
-
o$1[k2] = m[k];
|
|
22307
|
+
o$1[k2] = m$2[k];
|
|
21922
22308
|
}));
|
|
21923
22309
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
|
|
21924
22310
|
Object.defineProperty(o$1, "default", {
|
|
@@ -21957,7 +22343,7 @@ var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
21957
22343
|
const web_incoming_1 = require_web_incoming();
|
|
21958
22344
|
const ws_incoming_1$1 = require_ws_incoming();
|
|
21959
22345
|
const node_events_1 = __require("node:events");
|
|
21960
|
-
const debug_1 = __importDefault((
|
|
22346
|
+
const debug_1 = __importDefault(require_node$1());
|
|
21961
22347
|
const common_1 = require_common();
|
|
21962
22348
|
const log = (0, debug_1.default)("http-proxy-3");
|
|
21963
22349
|
var ProxyServer = class ProxyServer extends node_events_1.EventEmitter {
|
|
@@ -22540,8 +22926,8 @@ function send$1(req$4, res, file, stats, headers) {
|
|
|
22540
22926
|
if (tmp = res.getHeader("content-type")) headers["Content-Type"] = tmp;
|
|
22541
22927
|
if (req$4.headers.range) {
|
|
22542
22928
|
code = 206;
|
|
22543
|
-
let [x, y] = req$4.headers.range.replace("bytes=", "").split("-");
|
|
22544
|
-
let end = opts.end = parseInt(y, 10) || stats.size - 1;
|
|
22929
|
+
let [x, y$2] = req$4.headers.range.replace("bytes=", "").split("-");
|
|
22930
|
+
let end = opts.end = parseInt(y$2, 10) || stats.size - 1;
|
|
22545
22931
|
let start = opts.start = parseInt(x, 10) || 0;
|
|
22546
22932
|
if (end >= stats.size) end = stats.size - 1;
|
|
22547
22933
|
if (start >= stats.size) {
|
|
@@ -22983,7 +23369,7 @@ async function handleModuleSoftInvalidation(environment, mod, timestamp) {
|
|
|
22983
23369
|
else {
|
|
22984
23370
|
await init;
|
|
22985
23371
|
const source = transformResult.code;
|
|
22986
|
-
const s = new MagicString(source);
|
|
23372
|
+
const s$2 = new MagicString(source);
|
|
22987
23373
|
const [imports] = parse(source, mod.id || void 0);
|
|
22988
23374
|
for (const imp of imports) {
|
|
22989
23375
|
let rawUrl = source.slice(imp.s, imp.e);
|
|
@@ -22998,13 +23384,13 @@ async function handleModuleSoftInvalidation(environment, mod, timestamp) {
|
|
|
22998
23384
|
const replacedUrl = injectQuery(urlWithoutTimestamp, `t=${importedMod.lastHMRTimestamp}`);
|
|
22999
23385
|
const start = hasQuotes ? imp.s + 1 : imp.s;
|
|
23000
23386
|
const end = hasQuotes ? imp.e - 1 : imp.e;
|
|
23001
|
-
s.overwrite(start, end, replacedUrl);
|
|
23387
|
+
s$2.overwrite(start, end, replacedUrl);
|
|
23002
23388
|
}
|
|
23003
23389
|
if (imp.d === -1 && environment.config.dev.preTransformRequests) environment.warmupRequest(hmrUrl);
|
|
23004
23390
|
break;
|
|
23005
23391
|
}
|
|
23006
23392
|
}
|
|
23007
|
-
const code = s.toString();
|
|
23393
|
+
const code = s$2.toString();
|
|
23008
23394
|
result = {
|
|
23009
23395
|
...transformResult,
|
|
23010
23396
|
code,
|
|
@@ -23670,23 +24056,23 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
23670
24056
|
continue;
|
|
23671
24057
|
}
|
|
23672
24058
|
if (match[3]) {
|
|
23673
|
-
let names$
|
|
23674
|
-
if (names$
|
|
24059
|
+
let names$1 = /\.([^.?]+)/.exec(match[4])?.[1] || "";
|
|
24060
|
+
if (names$1 === "default") names$1 = "default: __vite_default__";
|
|
23675
24061
|
dynamicImports[dynamicImportTreeshakenRE.lastIndex - match[4]?.length - 1] = {
|
|
23676
|
-
declaration: `const {${names$
|
|
23677
|
-
names: `{ ${names$
|
|
24062
|
+
declaration: `const {${names$1}}`,
|
|
24063
|
+
names: `{ ${names$1} }`
|
|
23678
24064
|
};
|
|
23679
24065
|
continue;
|
|
23680
24066
|
}
|
|
23681
|
-
const names
|
|
24067
|
+
const names = match[6]?.trim();
|
|
23682
24068
|
dynamicImports[dynamicImportTreeshakenRE.lastIndex - match[5]?.length] = {
|
|
23683
|
-
declaration: `const {${names
|
|
23684
|
-
names: `{ ${names
|
|
24069
|
+
declaration: `const {${names}}`,
|
|
24070
|
+
names: `{ ${names} }`
|
|
23685
24071
|
};
|
|
23686
24072
|
}
|
|
23687
24073
|
}
|
|
23688
|
-
let s;
|
|
23689
|
-
const str = () => s || (s = new MagicString(source));
|
|
24074
|
+
let s$2;
|
|
24075
|
+
const str = () => s$2 || (s$2 = new MagicString(source));
|
|
23690
24076
|
let needPreloadHelper = false;
|
|
23691
24077
|
for (let index = 0; index < imports.length; index++) {
|
|
23692
24078
|
const { s: start, e: end, ss: expStart, se: expEnd, d: dynamicIndex, a: attributeIndex } = imports[index];
|
|
@@ -23694,18 +24080,18 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
23694
24080
|
if (!isDynamicImport && attributeIndex > -1) str().remove(end + 1, expEnd);
|
|
23695
24081
|
if (isDynamicImport && insertPreload && (source[start] === "\"" || source[start] === "'" || source[start] === "`")) {
|
|
23696
24082
|
needPreloadHelper = true;
|
|
23697
|
-
const { declaration, names
|
|
23698
|
-
if (names
|
|
24083
|
+
const { declaration, names } = dynamicImports[expEnd] || {};
|
|
24084
|
+
if (names) {
|
|
23699
24085
|
str().prependLeft(expStart, `${preloadMethod}(async () => { ${declaration} = await `);
|
|
23700
|
-
str().appendRight(expEnd, `;return ${names
|
|
24086
|
+
str().appendRight(expEnd, `;return ${names}}`);
|
|
23701
24087
|
} else str().prependLeft(expStart, `${preloadMethod}(() => `);
|
|
23702
24088
|
str().appendRight(expEnd, `,${isModernFlag}?${preloadMarker}:void 0${renderBuiltUrl || isRelativeBase ? ",import.meta.url" : ""})`);
|
|
23703
24089
|
}
|
|
23704
24090
|
}
|
|
23705
24091
|
if (needPreloadHelper && insertPreload && !source.includes(`const ${preloadMethod} =`)) str().prepend(`import { ${preloadMethod} } from "${preloadHelperId}";`);
|
|
23706
|
-
if (s) return {
|
|
23707
|
-
code: s.toString(),
|
|
23708
|
-
map: this.environment.config.build.sourcemap ? s.generateMap({ hires: "boundary" }) : null
|
|
24092
|
+
if (s$2) return {
|
|
24093
|
+
code: s$2.toString(),
|
|
24094
|
+
map: this.environment.config.build.sourcemap ? s$2.generateMap({ hires: "boundary" }) : null
|
|
23709
24095
|
};
|
|
23710
24096
|
}
|
|
23711
24097
|
},
|
|
@@ -23786,7 +24172,7 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
23786
24172
|
frame: generateCodeFrame(code, loc)
|
|
23787
24173
|
});
|
|
23788
24174
|
}
|
|
23789
|
-
const s = new MagicString(code);
|
|
24175
|
+
const s$2 = new MagicString(code);
|
|
23790
24176
|
const rewroteMarkerStartPos = /* @__PURE__ */ new Set();
|
|
23791
24177
|
const fileDeps = [];
|
|
23792
24178
|
const addFileDep = (url$3, runtime = false) => {
|
|
@@ -23833,7 +24219,7 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
23833
24219
|
});
|
|
23834
24220
|
hasRemovedPureCssChunk = true;
|
|
23835
24221
|
}
|
|
23836
|
-
s.update(expStart, expEnd, "Promise.resolve({})");
|
|
24222
|
+
s$2.update(expStart, expEnd, "Promise.resolve({})");
|
|
23837
24223
|
}
|
|
23838
24224
|
}
|
|
23839
24225
|
};
|
|
@@ -23842,7 +24228,7 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
23842
24228
|
let markerStartPos$1 = findPreloadMarker(code, end);
|
|
23843
24229
|
if (markerStartPos$1 === -1 && imports.length === 1) markerStartPos$1 = findPreloadMarker(code);
|
|
23844
24230
|
if (markerStartPos$1 > 0) {
|
|
23845
|
-
let depsArray = deps.size > 1 || hasRemovedPureCssChunk && deps.size > 0 ? modulePreload === false ? [...deps].filter((d) => d.endsWith(".css")) : [...deps] : [];
|
|
24231
|
+
let depsArray = deps.size > 1 || hasRemovedPureCssChunk && deps.size > 0 ? modulePreload === false ? [...deps].filter((d$2) => d$2.endsWith(".css")) : [...deps] : [];
|
|
23846
24232
|
const resolveDependencies = modulePreload ? modulePreload.resolveDependencies : void 0;
|
|
23847
24233
|
if (resolveDependencies && normalizedFile) {
|
|
23848
24234
|
const cssDeps = [];
|
|
@@ -23859,25 +24245,25 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
23859
24245
|
if (typeof replacement === "string") return addFileDep(replacement);
|
|
23860
24246
|
return addFileDep(replacement.runtime, true);
|
|
23861
24247
|
});
|
|
23862
|
-
else renderedDeps = depsArray.map((d) => isRelativeBase ? addFileDep(toRelativePath(d, file)) : addFileDep(d));
|
|
23863
|
-
s.update(markerStartPos$1, markerStartPos$1 + preloadMarker.length, renderedDeps.length > 0 ? `__vite__mapDeps([${renderedDeps.join(",")}])` : `[]`);
|
|
24248
|
+
else renderedDeps = depsArray.map((d$2) => isRelativeBase ? addFileDep(toRelativePath(d$2, file)) : addFileDep(d$2));
|
|
24249
|
+
s$2.update(markerStartPos$1, markerStartPos$1 + preloadMarker.length, renderedDeps.length > 0 ? `__vite__mapDeps([${renderedDeps.join(",")}])` : `[]`);
|
|
23864
24250
|
rewroteMarkerStartPos.add(markerStartPos$1);
|
|
23865
24251
|
}
|
|
23866
24252
|
}
|
|
23867
24253
|
if (fileDeps.length > 0) {
|
|
23868
24254
|
const mapDepsCode = `const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=${`[${fileDeps.map((fileDep) => fileDep.runtime ? fileDep.url : JSON.stringify(fileDep.url)).join(",")}]`})))=>i.map(i=>d[i]);\n`;
|
|
23869
|
-
if (code.startsWith("#!")) s.prependLeft(code.indexOf("\n") + 1, mapDepsCode);
|
|
23870
|
-
else s.prepend(mapDepsCode);
|
|
24255
|
+
if (code.startsWith("#!")) s$2.prependLeft(code.indexOf("\n") + 1, mapDepsCode);
|
|
24256
|
+
else s$2.prepend(mapDepsCode);
|
|
23871
24257
|
}
|
|
23872
24258
|
let markerStartPos = findPreloadMarker(code);
|
|
23873
24259
|
while (markerStartPos >= 0) {
|
|
23874
|
-
if (!rewroteMarkerStartPos.has(markerStartPos)) s.update(markerStartPos, markerStartPos + preloadMarker.length, "void 0");
|
|
24260
|
+
if (!rewroteMarkerStartPos.has(markerStartPos)) s$2.update(markerStartPos, markerStartPos + preloadMarker.length, "void 0");
|
|
23875
24261
|
markerStartPos = findPreloadMarker(code, markerStartPos + preloadMarker.length);
|
|
23876
24262
|
}
|
|
23877
|
-
if (s.hasChanged()) {
|
|
23878
|
-
chunk.code = s.toString();
|
|
24263
|
+
if (s$2.hasChanged()) {
|
|
24264
|
+
chunk.code = s$2.toString();
|
|
23879
24265
|
if (buildSourcemap && chunk.map) {
|
|
23880
|
-
const nextMap = s.generateMap({
|
|
24266
|
+
const nextMap = s$2.generateMap({
|
|
23881
24267
|
source: chunk.fileName,
|
|
23882
24268
|
hires: "boundary"
|
|
23883
24269
|
});
|
|
@@ -24028,9 +24414,9 @@ function traverseNodes(node, visitor) {
|
|
|
24028
24414
|
if (nodeIsElement(node) || node.nodeName === "#document" || node.nodeName === "#document-fragment") node.childNodes.forEach((childNode) => traverseNodes(childNode, visitor));
|
|
24029
24415
|
}
|
|
24030
24416
|
async function traverseHtml(html, filePath, warn, visitor) {
|
|
24031
|
-
const { parse: parse$
|
|
24417
|
+
const { parse: parse$17 } = await import("./dist.js");
|
|
24032
24418
|
const warnings = {};
|
|
24033
|
-
traverseNodes(parse$
|
|
24419
|
+
traverseNodes(parse$17(html, {
|
|
24034
24420
|
scriptingEnabled: false,
|
|
24035
24421
|
sourceCodeLocationInfo: true,
|
|
24036
24422
|
onParseError: (e$1) => {
|
|
@@ -24065,19 +24451,19 @@ function getScriptInfo(node) {
|
|
|
24065
24451
|
};
|
|
24066
24452
|
}
|
|
24067
24453
|
const attrValueStartRE = /=\s*(.)/;
|
|
24068
|
-
function overwriteAttrValue(s, sourceCodeLocation, newValue) {
|
|
24069
|
-
const srcString = s.slice(sourceCodeLocation.startOffset, sourceCodeLocation.endOffset);
|
|
24454
|
+
function overwriteAttrValue(s$2, sourceCodeLocation, newValue) {
|
|
24455
|
+
const srcString = s$2.slice(sourceCodeLocation.startOffset, sourceCodeLocation.endOffset);
|
|
24070
24456
|
const valueStart = attrValueStartRE.exec(srcString);
|
|
24071
24457
|
if (!valueStart) throw new Error(`[vite:html] internal error, failed to overwrite attribute value`);
|
|
24072
24458
|
const wrapOffset = valueStart[1] === "\"" || valueStart[1] === "'" ? 1 : 0;
|
|
24073
24459
|
const valueOffset = valueStart.index + valueStart[0].length - 1;
|
|
24074
|
-
s.update(sourceCodeLocation.startOffset + valueOffset + wrapOffset, sourceCodeLocation.endOffset - wrapOffset, newValue);
|
|
24075
|
-
return s;
|
|
24460
|
+
s$2.update(sourceCodeLocation.startOffset + valueOffset + wrapOffset, sourceCodeLocation.endOffset - wrapOffset, newValue);
|
|
24461
|
+
return s$2;
|
|
24076
24462
|
}
|
|
24077
|
-
function removeViteIgnoreAttr(s, sourceCodeLocation) {
|
|
24463
|
+
function removeViteIgnoreAttr(s$2, sourceCodeLocation) {
|
|
24078
24464
|
const loc = sourceCodeLocation.attrs?.["vite-ignore"];
|
|
24079
|
-
if (loc) s.remove(loc.startOffset, loc.endOffset);
|
|
24080
|
-
return s;
|
|
24465
|
+
if (loc) s$2.remove(loc.startOffset, loc.endOffset);
|
|
24466
|
+
return s$2;
|
|
24081
24467
|
}
|
|
24082
24468
|
/**
|
|
24083
24469
|
* Format parse5 @type {ParserError} to @type {RollupError}
|
|
@@ -24135,7 +24521,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24135
24521
|
const lineStartOffset = startOffset - node.sourceCodeLocation.startCol;
|
|
24136
24522
|
let isLineEmpty = false;
|
|
24137
24523
|
try {
|
|
24138
|
-
isLineEmpty = !s.slice(Math.max(0, lineStartOffset), startOffset).trim();
|
|
24524
|
+
isLineEmpty = !s$2.slice(Math.max(0, lineStartOffset), startOffset).trim();
|
|
24139
24525
|
} catch {}
|
|
24140
24526
|
return isLineEmpty ? lineStartOffset : startOffset;
|
|
24141
24527
|
};
|
|
@@ -24144,7 +24530,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24144
24530
|
filename: id
|
|
24145
24531
|
});
|
|
24146
24532
|
let js = "";
|
|
24147
|
-
const s = new MagicString(html);
|
|
24533
|
+
const s$2 = new MagicString(html);
|
|
24148
24534
|
const scriptUrls = [];
|
|
24149
24535
|
const styleUrls = [];
|
|
24150
24536
|
let inlineModuleIndex = -1;
|
|
@@ -24167,11 +24553,11 @@ function buildHtmlPlugin(config$2) {
|
|
|
24167
24553
|
let shouldRemove = false;
|
|
24168
24554
|
if (node.nodeName === "script") {
|
|
24169
24555
|
const { src, srcSourceCodeLocation, isModule, isAsync, isIgnored } = getScriptInfo(node);
|
|
24170
|
-
if (isIgnored) removeViteIgnoreAttr(s, node.sourceCodeLocation);
|
|
24556
|
+
if (isIgnored) removeViteIgnoreAttr(s$2, node.sourceCodeLocation);
|
|
24171
24557
|
else {
|
|
24172
24558
|
const url$3 = src && src.value;
|
|
24173
24559
|
const isPublicFile = !!(url$3 && checkPublicFile(url$3, config$2));
|
|
24174
|
-
if (isPublicFile) overwriteAttrValue(s, srcSourceCodeLocation, partialEncodeURIPath(toOutputPublicFilePath(url$3)));
|
|
24560
|
+
if (isPublicFile) overwriteAttrValue(s$2, srcSourceCodeLocation, partialEncodeURIPath(toOutputPublicFilePath(url$3)));
|
|
24175
24561
|
if (isModule) {
|
|
24176
24562
|
inlineModuleIndex++;
|
|
24177
24563
|
if (url$3 && !isExcludedUrl(url$3) && !isPublicFile) {
|
|
@@ -24204,7 +24590,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24204
24590
|
}
|
|
24205
24591
|
const assetAttributes = getNodeAssetAttributes(node);
|
|
24206
24592
|
for (const attr of assetAttributes) if (attr.type === "remove") {
|
|
24207
|
-
s.remove(attr.location.startOffset, attr.location.endOffset);
|
|
24593
|
+
s$2.remove(attr.location.startOffset, attr.location.endOffset);
|
|
24208
24594
|
continue;
|
|
24209
24595
|
} else if (attr.type === "srcset") assetUrlsPromises.push((async () => {
|
|
24210
24596
|
const processedEncodedUrl = await processSrcSet(attr.value, async ({ url: url$3 }) => {
|
|
@@ -24215,11 +24601,11 @@ function buildHtmlPlugin(config$2) {
|
|
|
24215
24601
|
}
|
|
24216
24602
|
return url$3;
|
|
24217
24603
|
});
|
|
24218
|
-
if (processedEncodedUrl !== attr.value) overwriteAttrValue(s, attr.location, processedEncodedUrl);
|
|
24604
|
+
if (processedEncodedUrl !== attr.value) overwriteAttrValue(s$2, attr.location, processedEncodedUrl);
|
|
24219
24605
|
})());
|
|
24220
24606
|
else if (attr.type === "src") {
|
|
24221
24607
|
const url$3 = decodeURIIfPossible(attr.value);
|
|
24222
|
-
if (url$3 === void 0) {} else if (checkPublicFile(url$3, config$2)) overwriteAttrValue(s, attr.location, partialEncodeURIPath(toOutputPublicFilePath(url$3)));
|
|
24608
|
+
if (url$3 === void 0) {} else if (checkPublicFile(url$3, config$2)) overwriteAttrValue(s$2, attr.location, partialEncodeURIPath(toOutputPublicFilePath(url$3)));
|
|
24223
24609
|
else if (!isExcludedUrl(url$3)) if (node.nodeName === "link" && isCSSRequest(url$3) && !("media" in attr.attributes || "disabled" in attr.attributes)) {
|
|
24224
24610
|
const importExpression = `\nimport ${JSON.stringify(url$3)}`;
|
|
24225
24611
|
styleUrls.push({
|
|
@@ -24232,7 +24618,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24232
24618
|
const shouldInline$1 = node.nodeName === "link" && attr.attributes.rel && parseRelAttr(attr.attributes.rel).some((v) => noInlineLinkRels.has(v)) ? false : void 0;
|
|
24233
24619
|
assetUrlsPromises.push((async () => {
|
|
24234
24620
|
const processedUrl = await processAssetUrl(url$3, shouldInline$1);
|
|
24235
|
-
if (processedUrl !== url$3) overwriteAttrValue(s, attr.location, partialEncodeURIPath(processedUrl));
|
|
24621
|
+
if (processedUrl !== url$3) overwriteAttrValue(s$2, attr.location, partialEncodeURIPath(processedUrl));
|
|
24236
24622
|
})());
|
|
24237
24623
|
}
|
|
24238
24624
|
}
|
|
@@ -24243,7 +24629,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24243
24629
|
addToHTMLProxyCache(config$2, id.replace(normalizePath(config$2.root), ""), inlineModuleIndex, { code });
|
|
24244
24630
|
js += `\nimport "${id}?html-proxy&inline-css&style-attr&index=${inlineModuleIndex}.css"`;
|
|
24245
24631
|
const hash$1 = getHash(cleanUrl(id));
|
|
24246
|
-
overwriteAttrValue(s, inlineStyle.location, `__VITE_INLINE_CSS__${hash$1}_${inlineModuleIndex}__`);
|
|
24632
|
+
overwriteAttrValue(s$2, inlineStyle.location, `__VITE_INLINE_CSS__${hash$1}_${inlineModuleIndex}__`);
|
|
24247
24633
|
}
|
|
24248
24634
|
if (node.nodeName === "style" && node.childNodes.length) {
|
|
24249
24635
|
const styleNode = node.childNodes.pop();
|
|
@@ -24252,15 +24638,15 @@ function buildHtmlPlugin(config$2) {
|
|
|
24252
24638
|
addToHTMLProxyCache(config$2, filePath, inlineModuleIndex, { code: styleNode.value });
|
|
24253
24639
|
js += `\nimport "${id}?html-proxy&inline-css&index=${inlineModuleIndex}.css"`;
|
|
24254
24640
|
const hash$1 = getHash(cleanUrl(id));
|
|
24255
|
-
s.update(styleNode.sourceCodeLocation.startOffset, styleNode.sourceCodeLocation.endOffset, `__VITE_INLINE_CSS__${hash$1}_${inlineModuleIndex}__`);
|
|
24641
|
+
s$2.update(styleNode.sourceCodeLocation.startOffset, styleNode.sourceCodeLocation.endOffset, `__VITE_INLINE_CSS__${hash$1}_${inlineModuleIndex}__`);
|
|
24256
24642
|
}
|
|
24257
|
-
if (shouldRemove) s.remove(nodeStartWithLeadingWhitespace(node), node.sourceCodeLocation.endOffset);
|
|
24643
|
+
if (shouldRemove) s$2.remove(nodeStartWithLeadingWhitespace(node), node.sourceCodeLocation.endOffset);
|
|
24258
24644
|
});
|
|
24259
24645
|
isAsyncScriptMap.get(config$2).set(id, everyScriptIsAsync);
|
|
24260
24646
|
if (someScriptsAreAsync && someScriptsAreDefer) config$2.logger.warn(`\nMixed async and defer script modules in ${id}, output script will fallback to defer. Every script, including inline ones, need to be marked as async for your output script to be async.`);
|
|
24261
24647
|
await Promise.all(assetUrlsPromises);
|
|
24262
|
-
for (const { start, end, url: url$3 } of scriptUrls) if (checkPublicFile(url$3, config$2)) s.update(start, end, partialEncodeURIPath(toOutputPublicFilePath(url$3)));
|
|
24263
|
-
else if (!isExcludedUrl(url$3)) s.update(start, end, partialEncodeURIPath(await urlToBuiltUrl(this, url$3, id)));
|
|
24648
|
+
for (const { start, end, url: url$3 } of scriptUrls) if (checkPublicFile(url$3, config$2)) s$2.update(start, end, partialEncodeURIPath(toOutputPublicFilePath(url$3)));
|
|
24649
|
+
else if (!isExcludedUrl(url$3)) s$2.update(start, end, partialEncodeURIPath(await urlToBuiltUrl(this, url$3, id)));
|
|
24264
24650
|
const resolvedStyleUrls = await Promise.all(styleUrls.map(async (styleUrl) => ({
|
|
24265
24651
|
...styleUrl,
|
|
24266
24652
|
resolved: await this.resolve(styleUrl.url, id)
|
|
@@ -24269,8 +24655,8 @@ function buildHtmlPlugin(config$2) {
|
|
|
24269
24655
|
config$2.logger.warnOnce(`\n${url$3} doesn't exist at build time, it will remain unchanged to be resolved at runtime`);
|
|
24270
24656
|
const importExpression = `\nimport ${JSON.stringify(url$3)}`;
|
|
24271
24657
|
js = js.replace(importExpression, "");
|
|
24272
|
-
} else s.remove(start, end);
|
|
24273
|
-
processedHtml(this).set(id, s.toString());
|
|
24658
|
+
} else s$2.remove(start, end);
|
|
24659
|
+
processedHtml(this).set(id, s$2.toString());
|
|
24274
24660
|
const { modulePreload } = this.environment.config.build;
|
|
24275
24661
|
if (modulePreload !== false && modulePreload.polyfill && (someScriptsAreAsync || someScriptsAreDefer)) js = `import "${modulePreloadPolyfillId}";\n${js}`;
|
|
24276
24662
|
await Promise.all(setModuleSideEffectPromises);
|
|
@@ -24392,15 +24778,15 @@ function buildHtmlPlugin(config$2) {
|
|
|
24392
24778
|
}]);
|
|
24393
24779
|
}
|
|
24394
24780
|
let match;
|
|
24395
|
-
let s;
|
|
24781
|
+
let s$2;
|
|
24396
24782
|
inlineCSSRE$1.lastIndex = 0;
|
|
24397
24783
|
while (match = inlineCSSRE$1.exec(result)) {
|
|
24398
|
-
s ||= new MagicString(result);
|
|
24784
|
+
s$2 ||= new MagicString(result);
|
|
24399
24785
|
const { 0: full, 1: scopedName } = match;
|
|
24400
24786
|
const cssTransformedCode = htmlProxyResult.get(scopedName);
|
|
24401
|
-
s.update(match.index, match.index + full.length, cssTransformedCode);
|
|
24787
|
+
s$2.update(match.index, match.index + full.length, cssTransformedCode);
|
|
24402
24788
|
}
|
|
24403
|
-
if (s) result = s.toString();
|
|
24789
|
+
if (s$2) result = s$2.toString();
|
|
24404
24790
|
result = await applyHtmlTransforms(result, [...normalHooks, ...postHooks], this, {
|
|
24405
24791
|
path: "/" + relativeUrlPath,
|
|
24406
24792
|
filename: normalizedId,
|
|
@@ -24537,7 +24923,7 @@ function injectNonceAttributeTagHook(config$2) {
|
|
|
24537
24923
|
return async (html, { filename }) => {
|
|
24538
24924
|
const nonce = config$2.html?.cspNonce;
|
|
24539
24925
|
if (!nonce) return;
|
|
24540
|
-
const s = new MagicString(html);
|
|
24926
|
+
const s$2 = new MagicString(html);
|
|
24541
24927
|
await traverseHtml(html, filename, config$2.logger.warn, (node) => {
|
|
24542
24928
|
if (!nodeIsElement(node)) return;
|
|
24543
24929
|
const { nodeName, attrs, sourceCodeLocation } = node;
|
|
@@ -24545,10 +24931,10 @@ function injectNonceAttributeTagHook(config$2) {
|
|
|
24545
24931
|
if (attrs.some(({ name }) => name === "nonce")) return;
|
|
24546
24932
|
const startTagEndOffset = sourceCodeLocation.startTag.endOffset;
|
|
24547
24933
|
const appendOffset = html[startTagEndOffset - 2] === "/" ? 2 : 1;
|
|
24548
|
-
s.appendRight(startTagEndOffset - appendOffset, ` nonce="${nonce}"`);
|
|
24934
|
+
s$2.appendRight(startTagEndOffset - appendOffset, ` nonce="${nonce}"`);
|
|
24549
24935
|
}
|
|
24550
24936
|
});
|
|
24551
|
-
return s.toString();
|
|
24937
|
+
return s$2.toString();
|
|
24552
24938
|
};
|
|
24553
24939
|
}
|
|
24554
24940
|
function resolveHtmlTransforms(plugins$1) {
|
|
@@ -24956,7 +25342,7 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
|
24956
25342
|
proxyModuleUrl = wrapId(proxyModulePath);
|
|
24957
25343
|
}
|
|
24958
25344
|
proxyModuleUrl = joinUrlSegments(decodedBase, proxyModuleUrl);
|
|
24959
|
-
const s = new MagicString(html);
|
|
25345
|
+
const s$2 = new MagicString(html);
|
|
24960
25346
|
let inlineModuleIndex = -1;
|
|
24961
25347
|
const proxyCacheUrl = decodeURI(cleanUrl(proxyModulePath).replace(normalizePath(config$2.root), ""));
|
|
24962
25348
|
const styleUrl = [];
|
|
@@ -24978,23 +25364,23 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
|
24978
25364
|
});
|
|
24979
25365
|
const modulePath = `${proxyModuleUrl}?html-proxy&index=${inlineModuleIndex}.${ext}`;
|
|
24980
25366
|
inlineModulePaths.push(modulePath);
|
|
24981
|
-
s.update(node.sourceCodeLocation.startOffset, node.sourceCodeLocation.endOffset, `<script type="module" src="${modulePath}"><\/script>`);
|
|
25367
|
+
s$2.update(node.sourceCodeLocation.startOffset, node.sourceCodeLocation.endOffset, `<script type="module" src="${modulePath}"><\/script>`);
|
|
24982
25368
|
preTransformRequest(server, modulePath, decodedBase);
|
|
24983
25369
|
};
|
|
24984
25370
|
await traverseHtml(html, filename, config$2.logger.warn, (node) => {
|
|
24985
25371
|
if (!nodeIsElement(node)) return;
|
|
24986
25372
|
if (node.nodeName === "script") {
|
|
24987
25373
|
const { src, srcSourceCodeLocation, isModule, isIgnored } = getScriptInfo(node);
|
|
24988
|
-
if (isIgnored) removeViteIgnoreAttr(s, node.sourceCodeLocation);
|
|
25374
|
+
if (isIgnored) removeViteIgnoreAttr(s$2, node.sourceCodeLocation);
|
|
24989
25375
|
else if (src) {
|
|
24990
25376
|
const processedUrl = processNodeUrl(src.value, false, config$2, htmlPath, originalUrl, server, !isModule);
|
|
24991
|
-
if (processedUrl !== src.value) overwriteAttrValue(s, srcSourceCodeLocation, processedUrl);
|
|
25377
|
+
if (processedUrl !== src.value) overwriteAttrValue(s$2, srcSourceCodeLocation, processedUrl);
|
|
24992
25378
|
} else if (isModule && node.childNodes.length) addInlineModule(node, "js");
|
|
24993
25379
|
else if (node.childNodes.length) {
|
|
24994
25380
|
const scriptNode = node.childNodes[node.childNodes.length - 1];
|
|
24995
25381
|
for (const { url: url$3, start, end } of extractImportExpressionFromClassicScript(scriptNode)) {
|
|
24996
25382
|
const processedUrl = processNodeUrl(url$3, false, config$2, htmlPath, originalUrl);
|
|
24997
|
-
if (processedUrl !== url$3) s.update(start, end, processedUrl);
|
|
25383
|
+
if (processedUrl !== url$3) s$2.update(start, end, processedUrl);
|
|
24998
25384
|
}
|
|
24999
25385
|
}
|
|
25000
25386
|
}
|
|
@@ -25016,10 +25402,10 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
|
25016
25402
|
});
|
|
25017
25403
|
}
|
|
25018
25404
|
const assetAttributes = getNodeAssetAttributes(node);
|
|
25019
|
-
for (const attr of assetAttributes) if (attr.type === "remove") s.remove(attr.location.startOffset, attr.location.endOffset);
|
|
25405
|
+
for (const attr of assetAttributes) if (attr.type === "remove") s$2.remove(attr.location.startOffset, attr.location.endOffset);
|
|
25020
25406
|
else {
|
|
25021
25407
|
const processedUrl = processNodeUrl(attr.value, attr.type === "srcset", config$2, htmlPath, originalUrl);
|
|
25022
|
-
if (processedUrl !== attr.value) overwriteAttrValue(s, attr.location, processedUrl);
|
|
25408
|
+
if (processedUrl !== attr.value) overwriteAttrValue(s$2, attr.location, processedUrl);
|
|
25023
25409
|
}
|
|
25024
25410
|
});
|
|
25025
25411
|
const clientModuelGraph = server?.environments.client.moduleGraph;
|
|
@@ -25037,16 +25423,16 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
|
25037
25423
|
if (result.map.mappings) await injectSourcesContent(result.map, proxyModulePath, config$2.logger);
|
|
25038
25424
|
content = getCodeWithSourcemap("css", result.code, result.map);
|
|
25039
25425
|
} else content = result.code;
|
|
25040
|
-
s.overwrite(start, end, content);
|
|
25426
|
+
s$2.overwrite(start, end, content);
|
|
25041
25427
|
}), ...inlineStyles.map(async ({ index, location: location$1, code }) => {
|
|
25042
25428
|
const url$3 = `${proxyModulePath}?html-proxy&inline-css&style-attr&index=${index}.css`;
|
|
25043
25429
|
const mod = await server.environments.client.moduleGraph.ensureEntryFromUrl(url$3, false);
|
|
25044
25430
|
ensureWatchedFile(watcher, mod.file, config$2.root);
|
|
25045
25431
|
await server?.environments.client.pluginContainer.transform(code, mod.id);
|
|
25046
25432
|
const hash$1 = getHash(cleanUrl(mod.id));
|
|
25047
|
-
overwriteAttrValue(s, location$1, htmlProxyResult.get(`${hash$1}_${index}`) ?? "");
|
|
25433
|
+
overwriteAttrValue(s$2, location$1, htmlProxyResult.get(`${hash$1}_${index}`) ?? "");
|
|
25048
25434
|
})]);
|
|
25049
|
-
html = s.toString();
|
|
25435
|
+
html = s$2.toString();
|
|
25050
25436
|
return {
|
|
25051
25437
|
html,
|
|
25052
25438
|
tags: [{
|
|
@@ -25686,8 +26072,8 @@ async function _createServer(inlineConfig = {}, options$1) {
|
|
|
25686
26072
|
warnFutureDeprecation(config$2, "removeServerHot");
|
|
25687
26073
|
return hot;
|
|
25688
26074
|
},
|
|
25689
|
-
set hot(h) {
|
|
25690
|
-
hot = h;
|
|
26075
|
+
set hot(h$2) {
|
|
26076
|
+
hot = h$2;
|
|
25691
26077
|
},
|
|
25692
26078
|
environments,
|
|
25693
26079
|
get pluginContainer() {
|
|
@@ -25939,7 +26325,7 @@ function createServerCloseFn(server) {
|
|
|
25939
26325
|
hasListened = true;
|
|
25940
26326
|
});
|
|
25941
26327
|
return () => new Promise((resolve$4, reject) => {
|
|
25942
|
-
openSockets.forEach((s) => s.destroy());
|
|
26328
|
+
openSockets.forEach((s$2) => s$2.destroy());
|
|
25943
26329
|
if (hasListened) server.close((err$2) => {
|
|
25944
26330
|
if (err$2) reject(err$2);
|
|
25945
26331
|
else resolve$4();
|
|
@@ -26460,7 +26846,7 @@ function isNodeWithinCircularImports(node, nodeChain, currentChain = [node], tra
|
|
|
26460
26846
|
...[...currentChain].reverse(),
|
|
26461
26847
|
...nodeChain.slice(importerIndex, -1).reverse()
|
|
26462
26848
|
];
|
|
26463
|
-
debugHmr(import_picocolors$15.default.yellow(`circular imports detected: `) + importChain.map((m) => import_picocolors$15.default.dim(m.url)).join(" -> "));
|
|
26849
|
+
debugHmr(import_picocolors$15.default.yellow(`circular imports detected: `) + importChain.map((m$2) => import_picocolors$15.default.dim(m$2.url)).join(" -> "));
|
|
26464
26850
|
}
|
|
26465
26851
|
return true;
|
|
26466
26852
|
}
|
|
@@ -26480,7 +26866,7 @@ function handlePrunedModules(mods, { hot }) {
|
|
|
26480
26866
|
});
|
|
26481
26867
|
hot.send({
|
|
26482
26868
|
type: "prune",
|
|
26483
|
-
paths: [...mods].map((m) => m.url)
|
|
26869
|
+
paths: [...mods].map((m$2) => m$2.url)
|
|
26484
26870
|
});
|
|
26485
26871
|
}
|
|
26486
26872
|
var LexerState = /* @__PURE__ */ function(LexerState$1) {
|
|
@@ -26772,7 +27158,7 @@ function definePlugin(config$2) {
|
|
|
26772
27158
|
}
|
|
26773
27159
|
const result = await replaceDefine(this.environment, code, id, define$1);
|
|
26774
27160
|
if (hasDefineImportMetaEnv) {
|
|
26775
|
-
result.code = result.code.replaceAll(getImportMetaEnvKeyRe(marker), (m) => "undefined".padEnd(m.length));
|
|
27161
|
+
result.code = result.code.replaceAll(getImportMetaEnvKeyRe(marker), (m$2) => "undefined".padEnd(m$2.length));
|
|
26776
27162
|
if (result.code.includes(marker)) {
|
|
26777
27163
|
result.code = `const ${marker} = ${importMetaEnvVal};\n` + result.code;
|
|
26778
27164
|
if (result.map) {
|
|
@@ -27095,29 +27481,29 @@ function webWorkerPlugin(config$2) {
|
|
|
27095
27481
|
injectEnv = ((environment.mode === "dev" ? environment.moduleGraph : void 0)?.getModuleById(ENV_ENTRY))?.transformResult?.code || "";
|
|
27096
27482
|
}
|
|
27097
27483
|
if (injectEnv) {
|
|
27098
|
-
const s = new MagicString(raw);
|
|
27099
|
-
s.prepend(injectEnv + ";\n");
|
|
27484
|
+
const s$2 = new MagicString(raw);
|
|
27485
|
+
s$2.prepend(injectEnv + ";\n");
|
|
27100
27486
|
return {
|
|
27101
|
-
code: s.toString(),
|
|
27102
|
-
map: s.generateMap({ hires: "boundary" })
|
|
27487
|
+
code: s$2.toString(),
|
|
27488
|
+
map: s$2.generateMap({ hires: "boundary" })
|
|
27103
27489
|
};
|
|
27104
27490
|
}
|
|
27105
27491
|
}
|
|
27106
27492
|
}
|
|
27107
27493
|
},
|
|
27108
27494
|
renderChunk(code, chunk, outputOptions) {
|
|
27109
|
-
let s;
|
|
27495
|
+
let s$2;
|
|
27110
27496
|
const result = () => {
|
|
27111
|
-
return s && {
|
|
27112
|
-
code: s.toString(),
|
|
27113
|
-
map: this.environment.config.build.sourcemap ? s.generateMap({ hires: "boundary" }) : null
|
|
27497
|
+
return s$2 && {
|
|
27498
|
+
code: s$2.toString(),
|
|
27499
|
+
map: this.environment.config.build.sourcemap ? s$2.generateMap({ hires: "boundary" }) : null
|
|
27114
27500
|
};
|
|
27115
27501
|
};
|
|
27116
27502
|
workerAssetUrlRE.lastIndex = 0;
|
|
27117
27503
|
if (workerAssetUrlRE.test(code)) {
|
|
27118
27504
|
const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(outputOptions.format, this.environment.config.isWorker);
|
|
27119
27505
|
let match;
|
|
27120
|
-
s = new MagicString(code);
|
|
27506
|
+
s$2 = new MagicString(code);
|
|
27121
27507
|
workerAssetUrlRE.lastIndex = 0;
|
|
27122
27508
|
const workerOutputCache = workerOutputCaches.get(config$2.mainConfig || config$2);
|
|
27123
27509
|
while (match = workerAssetUrlRE.exec(code)) {
|
|
@@ -27129,7 +27515,7 @@ function webWorkerPlugin(config$2) {
|
|
|
27129
27515
|
}
|
|
27130
27516
|
const replacement = toOutputFilePathInJS(this.environment, filename, "asset", chunk.fileName, "js", toRelativeRuntime);
|
|
27131
27517
|
const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`;
|
|
27132
|
-
s.update(match.index, match.index + full.length, replacementString);
|
|
27518
|
+
s$2.update(match.index, match.index + full.length, replacementString);
|
|
27133
27519
|
}
|
|
27134
27520
|
}
|
|
27135
27521
|
return result();
|
|
@@ -27355,8 +27741,8 @@ function importAnalysisPlugin(config$2) {
|
|
|
27355
27741
|
let isSelfAccepting = false;
|
|
27356
27742
|
let hasEnv = false;
|
|
27357
27743
|
let needQueryInjectHelper = false;
|
|
27358
|
-
let s;
|
|
27359
|
-
const str = () => s || (s = new MagicString(source));
|
|
27744
|
+
let s$2;
|
|
27745
|
+
const str = () => s$2 || (s$2 = new MagicString(source));
|
|
27360
27746
|
let isPartiallySelfAccepting = false;
|
|
27361
27747
|
const importedBindings = enablePartialAccept ? /* @__PURE__ */ new Map() : null;
|
|
27362
27748
|
const toAbsoluteUrl = (url$3) => path.posix.resolve(path.posix.dirname(importerModule.url), url$3);
|
|
@@ -27457,9 +27843,9 @@ function importAnalysisPlugin(config$2) {
|
|
|
27457
27843
|
}
|
|
27458
27844
|
if (!rewriteDone) {
|
|
27459
27845
|
const rewrittenUrl = JSON.stringify(url$3);
|
|
27460
|
-
const s$
|
|
27846
|
+
const s$3 = isDynamicImport ? start : start - 1;
|
|
27461
27847
|
const e$1 = isDynamicImport ? end : end + 1;
|
|
27462
|
-
str().overwrite(s$
|
|
27848
|
+
str().overwrite(s$3, e$1, rewrittenUrl, { contentOnly: true });
|
|
27463
27849
|
}
|
|
27464
27850
|
}
|
|
27465
27851
|
const hmrUrl = unwrapId(stripBase(url$3, base));
|
|
@@ -27529,7 +27915,7 @@ function importAnalysisPlugin(config$2) {
|
|
|
27529
27915
|
if (prunedImports) handlePrunedModules(prunedImports, environment);
|
|
27530
27916
|
}
|
|
27531
27917
|
debug$5?.(`${timeFrom(msAtStart)} ${import_picocolors$13.default.dim(`[${importedUrls.size} imports rewritten] ${prettifyUrl(importer, root)}`)}`);
|
|
27532
|
-
if (s) return transformStableResult(s, importer, config$2);
|
|
27918
|
+
if (s$2) return transformStableResult(s$2, importer, config$2);
|
|
27533
27919
|
else return source;
|
|
27534
27920
|
}
|
|
27535
27921
|
};
|
|
@@ -27552,9 +27938,9 @@ function createParseErrorInfo(importer, source) {
|
|
|
27552
27938
|
showCodeFrame: !probablyBinary
|
|
27553
27939
|
};
|
|
27554
27940
|
}
|
|
27555
|
-
const interopHelper = (m) => m?.__esModule ? m : {
|
|
27556
|
-
...typeof m === "object" && !Array.isArray(m) || typeof m === "function" ? m : {},
|
|
27557
|
-
default: m
|
|
27941
|
+
const interopHelper = (m$2) => m$2?.__esModule ? m$2 : {
|
|
27942
|
+
...typeof m$2 === "object" && !Array.isArray(m$2) || typeof m$2 === "function" ? m$2 : {},
|
|
27943
|
+
default: m$2
|
|
27558
27944
|
};
|
|
27559
27945
|
const interopHelperStr = interopHelper.toString().replaceAll("\n", "");
|
|
27560
27946
|
function interopNamedImports(str, importSpecifier, rewrittenUrl, importIndex, importer, config$2) {
|
|
@@ -27869,7 +28255,7 @@ function workerImportMetaUrlPlugin(config$2) {
|
|
|
27869
28255
|
transform: {
|
|
27870
28256
|
filter: { code: workerImportMetaUrlRE },
|
|
27871
28257
|
async handler(code, id) {
|
|
27872
|
-
let s;
|
|
28258
|
+
let s$2;
|
|
27873
28259
|
const cleanString = stripLiteral(code);
|
|
27874
28260
|
const workerImportMetaUrlRE$1 = /\bnew\s+(?:Worker|SharedWorker)\s*\(\s*(new\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*\))/dg;
|
|
27875
28261
|
let match;
|
|
@@ -27877,7 +28263,7 @@ function workerImportMetaUrlPlugin(config$2) {
|
|
|
27877
28263
|
const [[, endIndex], [expStart, expEnd], [urlStart, urlEnd]] = match.indices;
|
|
27878
28264
|
const rawUrl = code.slice(urlStart, urlEnd);
|
|
27879
28265
|
if (rawUrl[0] === "`" && rawUrl.includes("${")) this.error(`\`new URL(url, import.meta.url)\` is not supported in dynamic template string.`, expStart);
|
|
27880
|
-
s ||= new MagicString(code);
|
|
28266
|
+
s$2 ||= new MagicString(code);
|
|
27881
28267
|
const workerType = await getWorkerType(code, cleanString, endIndex);
|
|
27882
28268
|
const url$3 = rawUrl.slice(1, -1);
|
|
27883
28269
|
let file;
|
|
@@ -27893,7 +28279,7 @@ function workerImportMetaUrlPlugin(config$2) {
|
|
|
27893
28279
|
file = await workerResolver(this.environment, url$3, id);
|
|
27894
28280
|
file ??= url$3[0] === "/" ? slash(path.join(config$2.publicDir, url$3)) : slash(path.resolve(path.dirname(id), url$3));
|
|
27895
28281
|
}
|
|
27896
|
-
if (isBuild && config$2.isWorker && config$2.bundleChain.at(-1) === cleanUrl(file)) s.update(expStart, expEnd, "self.location.href");
|
|
28282
|
+
if (isBuild && config$2.isWorker && config$2.bundleChain.at(-1) === cleanUrl(file)) s$2.update(expStart, expEnd, "self.location.href");
|
|
27897
28283
|
else {
|
|
27898
28284
|
let builtUrl;
|
|
27899
28285
|
if (isBuild) {
|
|
@@ -27904,10 +28290,10 @@ function workerImportMetaUrlPlugin(config$2) {
|
|
|
27904
28290
|
builtUrl = await fileToUrl$1(this, cleanUrl(file));
|
|
27905
28291
|
builtUrl = injectQuery(builtUrl, `${WORKER_FILE_ID}&type=${workerType}`);
|
|
27906
28292
|
}
|
|
27907
|
-
s.update(expStart, expEnd, `new URL(/* @vite-ignore */ ${JSON.stringify(builtUrl)}, import.meta.url)`);
|
|
28293
|
+
s$2.update(expStart, expEnd, `new URL(/* @vite-ignore */ ${JSON.stringify(builtUrl)}, import.meta.url)`);
|
|
27908
28294
|
}
|
|
27909
28295
|
}
|
|
27910
|
-
if (s) return transformStableResult(s, id, config$2);
|
|
28296
|
+
if (s$2) return transformStableResult(s$2, id, config$2);
|
|
27911
28297
|
return null;
|
|
27912
28298
|
}
|
|
27913
28299
|
}
|
|
@@ -27948,7 +28334,7 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
|
27948
28334
|
code: /new\s+URL.+import\.meta\.url/s
|
|
27949
28335
|
},
|
|
27950
28336
|
async handler(code, id) {
|
|
27951
|
-
let s;
|
|
28337
|
+
let s$2;
|
|
27952
28338
|
const assetImportMetaUrlRE = /\bnew\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*(?:,\s*)?\)/dg;
|
|
27953
28339
|
const cleanString = stripLiteral(code);
|
|
27954
28340
|
let match;
|
|
@@ -27956,7 +28342,7 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
|
27956
28342
|
const [[startIndex, endIndex], [urlStart, urlEnd]] = match.indices;
|
|
27957
28343
|
if (hasViteIgnoreRE.test(code.slice(startIndex, urlStart))) continue;
|
|
27958
28344
|
const rawUrl = code.slice(urlStart, urlEnd);
|
|
27959
|
-
if (!s) s = new MagicString(code);
|
|
28345
|
+
if (!s$2) s$2 = new MagicString(code);
|
|
27960
28346
|
if (rawUrl[0] === "`" && rawUrl.includes("${")) {
|
|
27961
28347
|
const queryDelimiterIndex = getQueryDelimiterIndex(rawUrl);
|
|
27962
28348
|
const hasQueryDelimiter = queryDelimiterIndex !== -1;
|
|
@@ -27971,7 +28357,7 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
|
27971
28357
|
import: "default",
|
|
27972
28358
|
query: injectQuery(queryString, "url")
|
|
27973
28359
|
};
|
|
27974
|
-
s.update(startIndex, endIndex, `new URL((import.meta.glob(${JSON.stringify(pattern)}, ${JSON.stringify(globOptions)}))[${pureUrl}], import.meta.url)`);
|
|
28360
|
+
s$2.update(startIndex, endIndex, `new URL((import.meta.glob(${JSON.stringify(pattern)}, ${JSON.stringify(globOptions)}))[${pureUrl}], import.meta.url)`);
|
|
27975
28361
|
continue;
|
|
27976
28362
|
}
|
|
27977
28363
|
}
|
|
@@ -28006,9 +28392,9 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
|
28006
28392
|
config$2.logger.warnOnce(`\n${rawExp} doesn't exist at build time, it will remain unchanged to be resolved at runtime. If this is intended, you can use the /* @vite-ignore */ comment to suppress this warning.`);
|
|
28007
28393
|
builtUrl = url$3;
|
|
28008
28394
|
}
|
|
28009
|
-
s.update(startIndex, endIndex, `new URL(${JSON.stringify(builtUrl)}, import.meta.url)`);
|
|
28395
|
+
s$2.update(startIndex, endIndex, `new URL(${JSON.stringify(builtUrl)}, import.meta.url)`);
|
|
28010
28396
|
}
|
|
28011
|
-
if (s) return transformStableResult(s, id, config$2);
|
|
28397
|
+
if (s$2) return transformStableResult(s$2, id, config$2);
|
|
28012
28398
|
}
|
|
28013
28399
|
}
|
|
28014
28400
|
};
|
|
@@ -28210,13 +28596,13 @@ function dynamicImportVarsPlugin(config$2) {
|
|
|
28210
28596
|
return null;
|
|
28211
28597
|
}
|
|
28212
28598
|
if (!imports.length) return null;
|
|
28213
|
-
let s;
|
|
28599
|
+
let s$2;
|
|
28214
28600
|
let needDynamicImportHelper = false;
|
|
28215
28601
|
for (let index = 0; index < imports.length; index++) {
|
|
28216
28602
|
const { s: start, e: end, ss: expStart, se: expEnd, d: dynamicIndex } = imports[index];
|
|
28217
28603
|
if (dynamicIndex === -1 || source[start] !== "`") continue;
|
|
28218
28604
|
if (hasViteIgnoreRE.test(source.slice(expStart, expEnd))) continue;
|
|
28219
|
-
s ||= new MagicString(source);
|
|
28605
|
+
s$2 ||= new MagicString(source);
|
|
28220
28606
|
let result;
|
|
28221
28607
|
try {
|
|
28222
28608
|
result = await transformDynamicImport(source.slice(start, end), importer, (id, importer$1) => resolve$4(environment, id, importer$1), config$2.root);
|
|
@@ -28227,11 +28613,11 @@ function dynamicImportVarsPlugin(config$2) {
|
|
|
28227
28613
|
if (!result) continue;
|
|
28228
28614
|
const { rawPattern, glob: glob$1 } = result;
|
|
28229
28615
|
needDynamicImportHelper = true;
|
|
28230
|
-
s.overwrite(expStart, expEnd, `__variableDynamicImportRuntimeHelper(${glob$1}, \`${rawPattern}\`, ${rawPattern.split("/").length})`);
|
|
28616
|
+
s$2.overwrite(expStart, expEnd, `__variableDynamicImportRuntimeHelper(${glob$1}, \`${rawPattern}\`, ${rawPattern.split("/").length})`);
|
|
28231
28617
|
}
|
|
28232
|
-
if (s) {
|
|
28233
|
-
if (needDynamicImportHelper) s.prepend(`import __variableDynamicImportRuntimeHelper from "${dynamicImportHelperId}";`);
|
|
28234
|
-
return transformStableResult(s, importer, config$2);
|
|
28618
|
+
if (s$2) {
|
|
28619
|
+
if (needDynamicImportHelper) s$2.prepend(`import __variableDynamicImportRuntimeHelper from "${dynamicImportHelperId}";`);
|
|
28620
|
+
return transformStableResult(s$2, importer, config$2);
|
|
28235
28621
|
}
|
|
28236
28622
|
}
|
|
28237
28623
|
}
|
|
@@ -28433,7 +28819,7 @@ async function transformGlobImport(code, id, root, resolveId, restoreQueryExtens
|
|
|
28433
28819
|
const matches$2 = await parseImportGlob(code, isVirtual ? void 0 : id, root, resolveId, logger);
|
|
28434
28820
|
const matchedFiles = /* @__PURE__ */ new Set();
|
|
28435
28821
|
if (!matches$2.length) return null;
|
|
28436
|
-
const s = new MagicString(code);
|
|
28822
|
+
const s$2 = new MagicString(code);
|
|
28437
28823
|
const staticImports = (await Promise.all(matches$2.map(async ({ globsResolved, isRelative: isRelative$1, options: options$1, index, start, end, onlyKeys, onlyValues }) => {
|
|
28438
28824
|
const files = (await glob(globsResolved, {
|
|
28439
28825
|
absolute: true,
|
|
@@ -28505,12 +28891,12 @@ async function transformGlobImport(code, id, root, resolveId, restoreQueryExtens
|
|
|
28505
28891
|
if (onlyKeys) replacement = `{${objectProps.join(",")}${lineBreaks}}`;
|
|
28506
28892
|
else if (onlyValues) replacement = `[${objectProps.join(",")}${lineBreaks}]`;
|
|
28507
28893
|
else replacement = `/* #__PURE__ */ Object.assign({${objectProps.join(",")}${lineBreaks}})`;
|
|
28508
|
-
s.overwrite(start, end, replacement);
|
|
28894
|
+
s$2.overwrite(start, end, replacement);
|
|
28509
28895
|
return staticImports$1;
|
|
28510
28896
|
}))).flat();
|
|
28511
|
-
if (staticImports.length) s.prepend(`${staticImports.join(";")};`);
|
|
28897
|
+
if (staticImports.length) s$2.prepend(`${staticImports.join(";")};`);
|
|
28512
28898
|
return {
|
|
28513
|
-
s,
|
|
28899
|
+
s: s$2,
|
|
28514
28900
|
matches: matches$2,
|
|
28515
28901
|
files: matchedFiles
|
|
28516
28902
|
};
|
|
@@ -29376,10 +29762,10 @@ var TransformPluginContext = class extends LoadPluginContext {
|
|
|
29376
29762
|
this.sourcemapChain.length = 0;
|
|
29377
29763
|
return combinedMap;
|
|
29378
29764
|
}
|
|
29379
|
-
for (let m of this.sourcemapChain) {
|
|
29380
|
-
if (typeof m === "string") m = JSON.parse(m);
|
|
29381
|
-
if (!("version" in m)) {
|
|
29382
|
-
if (m.mappings === "") {
|
|
29765
|
+
for (let m$2 of this.sourcemapChain) {
|
|
29766
|
+
if (typeof m$2 === "string") m$2 = JSON.parse(m$2);
|
|
29767
|
+
if (!("version" in m$2)) {
|
|
29768
|
+
if (m$2.mappings === "") {
|
|
29383
29769
|
combinedMap = { mappings: "" };
|
|
29384
29770
|
break;
|
|
29385
29771
|
}
|
|
@@ -29387,14 +29773,14 @@ var TransformPluginContext = class extends LoadPluginContext {
|
|
|
29387
29773
|
break;
|
|
29388
29774
|
}
|
|
29389
29775
|
if (!combinedMap) {
|
|
29390
|
-
const sm = m;
|
|
29776
|
+
const sm = m$2;
|
|
29391
29777
|
if (sm.sources.length === 1 && !sm.sources[0]) combinedMap = {
|
|
29392
29778
|
...sm,
|
|
29393
29779
|
sources: [this.filename],
|
|
29394
29780
|
sourcesContent: [this.originalCode]
|
|
29395
29781
|
};
|
|
29396
29782
|
else combinedMap = sm;
|
|
29397
|
-
} else combinedMap = combineSourcemaps(cleanUrl(this.filename), [m, combinedMap]);
|
|
29783
|
+
} else combinedMap = combineSourcemaps(cleanUrl(this.filename), [m$2, combinedMap]);
|
|
29398
29784
|
}
|
|
29399
29785
|
if (combinedMap !== this.combinedMap) {
|
|
29400
29786
|
this.combinedMap = combinedMap;
|
|
@@ -30011,7 +30397,7 @@ function cssPostPlugin(config$2) {
|
|
|
30011
30397
|
ext
|
|
30012
30398
|
}));
|
|
30013
30399
|
}
|
|
30014
|
-
let s;
|
|
30400
|
+
let s$2;
|
|
30015
30401
|
const urlEmitTasks = [];
|
|
30016
30402
|
if (code.includes("__VITE_CSS_URL__")) {
|
|
30017
30403
|
let match;
|
|
@@ -30038,7 +30424,7 @@ function cssPostPlugin(config$2) {
|
|
|
30038
30424
|
})));
|
|
30039
30425
|
if (urlEmitTasks.length > 0) {
|
|
30040
30426
|
const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(opts.format, config$2.isWorker);
|
|
30041
|
-
s ||= new MagicString(code);
|
|
30427
|
+
s$2 ||= new MagicString(code);
|
|
30042
30428
|
for (const { cssAssetName, originalFileName, content, start, end } of urlEmitTasks) {
|
|
30043
30429
|
const referenceId = this.emitFile({
|
|
30044
30430
|
type: "asset",
|
|
@@ -30050,7 +30436,7 @@ function cssPostPlugin(config$2) {
|
|
|
30050
30436
|
chunk.viteMetadata.importedAssets.add(cleanUrl(filename));
|
|
30051
30437
|
const replacement = toOutputFilePathInJS(this.environment, filename, "asset", chunk.fileName, "js", toRelativeRuntime);
|
|
30052
30438
|
const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`;
|
|
30053
|
-
s.update(start, end, replacementString);
|
|
30439
|
+
s$2.update(start, end, replacementString);
|
|
30054
30440
|
}
|
|
30055
30441
|
}
|
|
30056
30442
|
if (chunkCSS !== void 0) {
|
|
@@ -30089,19 +30475,19 @@ function cssPostPlugin(config$2) {
|
|
|
30089
30475
|
} else if (code.includes(singleQuoteUseStrict)) injectionPoint = code.indexOf(singleQuoteUseStrict) + singleQuoteUseStrict.length;
|
|
30090
30476
|
else if (code.includes(doubleQuoteUseStrict)) injectionPoint = code.indexOf(doubleQuoteUseStrict) + doubleQuoteUseStrict.length;
|
|
30091
30477
|
else throw new Error("Injection point for inlined CSS not found");
|
|
30092
|
-
s ||= new MagicString(code);
|
|
30093
|
-
s.appendRight(injectionPoint, injectCode);
|
|
30478
|
+
s$2 ||= new MagicString(code);
|
|
30479
|
+
s$2.appendRight(injectionPoint, injectCode);
|
|
30094
30480
|
}
|
|
30095
30481
|
} else {
|
|
30096
30482
|
chunkCSS = resolveAssetUrlsInCss(chunkCSS, getCssBundleName());
|
|
30097
30483
|
chunkCSSMap.set(chunk.fileName, chunkCSS);
|
|
30098
30484
|
}
|
|
30099
30485
|
}
|
|
30100
|
-
if (s) if (config$2.build.sourcemap) return {
|
|
30101
|
-
code: s.toString(),
|
|
30102
|
-
map: s.generateMap({ hires: "boundary" })
|
|
30486
|
+
if (s$2) if (config$2.build.sourcemap) return {
|
|
30487
|
+
code: s$2.toString(),
|
|
30488
|
+
map: s$2.generateMap({ hires: "boundary" })
|
|
30103
30489
|
};
|
|
30104
|
-
else return { code: s.toString() };
|
|
30490
|
+
else return { code: s$2.toString() };
|
|
30105
30491
|
return null;
|
|
30106
30492
|
},
|
|
30107
30493
|
augmentChunkHash(chunk) {
|
|
@@ -30207,10 +30593,10 @@ function isCssScopeToRendered(cssScopeTo, renderedModules) {
|
|
|
30207
30593
|
function getEmptyChunkReplacer(pureCssChunkNames, outputFormat) {
|
|
30208
30594
|
const emptyChunkFiles = pureCssChunkNames.map((file) => escapeRegex(path.basename(file))).join("|");
|
|
30209
30595
|
const emptyChunkRE = new RegExp(outputFormat === "es" ? `\\bimport\\s*["'][^"']*(?:${emptyChunkFiles})["'];` : `(\\b|,\\s*)require\\(\\s*["'][^"']*(?:${emptyChunkFiles})["']\\)(;|,)`, "g");
|
|
30210
|
-
return (code) => code.replace(emptyChunkRE, (m, p1, p2) => {
|
|
30211
|
-
if (outputFormat === "es") return `/* empty css ${"".padEnd(m.length - 15)}*/`;
|
|
30212
|
-
if (p2 === ";") return `${p2}/* empty css ${"".padEnd(m.length - 16)}*/`;
|
|
30213
|
-
return `${p1}/* empty css ${"".padEnd(m.length - 15 - p1.length)}*/`;
|
|
30596
|
+
return (code) => code.replace(emptyChunkRE, (m$2, p1, p2) => {
|
|
30597
|
+
if (outputFormat === "es") return `/* empty css ${"".padEnd(m$2.length - 15)}*/`;
|
|
30598
|
+
if (p2 === ";") return `${p2}/* empty css ${"".padEnd(m$2.length - 16)}*/`;
|
|
30599
|
+
return `${p1}/* empty css ${"".padEnd(m$2.length - 15 - p1.length)}*/`;
|
|
30214
30600
|
});
|
|
30215
30601
|
}
|
|
30216
30602
|
const fileURLWithWindowsDriveRE = /^file:\/\/\/[a-zA-Z]:\//;
|
|
@@ -30711,24 +31097,24 @@ function resolveMinifyCssEsbuildOptions(options$1) {
|
|
|
30711
31097
|
const atImportRE = /@import(?:\s*(?:url\([^)]*\)|"(?:[^"]|(?<=\\)")*"|'(?:[^']|(?<=\\)')*').*?|[^;]*);/g;
|
|
30712
31098
|
const atCharsetRE = /@charset(?:\s*(?:"(?:[^"]|(?<=\\)")*"|'(?:[^']|(?<=\\)')*').*?|[^;]*);/g;
|
|
30713
31099
|
async function hoistAtRules(css) {
|
|
30714
|
-
const s = new MagicString(css);
|
|
31100
|
+
const s$2 = new MagicString(css);
|
|
30715
31101
|
const cleanCss = emptyCssComments(css);
|
|
30716
31102
|
let match;
|
|
30717
31103
|
atImportRE.lastIndex = 0;
|
|
30718
31104
|
while (match = atImportRE.exec(cleanCss)) {
|
|
30719
|
-
s.remove(match.index, match.index + match[0].length);
|
|
30720
|
-
s.appendLeft(0, match[0]);
|
|
31105
|
+
s$2.remove(match.index, match.index + match[0].length);
|
|
31106
|
+
s$2.appendLeft(0, match[0]);
|
|
30721
31107
|
}
|
|
30722
31108
|
atCharsetRE.lastIndex = 0;
|
|
30723
31109
|
let foundCharset = false;
|
|
30724
31110
|
while (match = atCharsetRE.exec(cleanCss)) {
|
|
30725
|
-
s.remove(match.index, match.index + match[0].length);
|
|
31111
|
+
s$2.remove(match.index, match.index + match[0].length);
|
|
30726
31112
|
if (!foundCharset) {
|
|
30727
|
-
s.prepend(match[0]);
|
|
31113
|
+
s$2.prepend(match[0]);
|
|
30728
31114
|
foundCharset = true;
|
|
30729
31115
|
}
|
|
30730
31116
|
}
|
|
30731
|
-
return s.toString();
|
|
31117
|
+
return s$2.toString();
|
|
30732
31118
|
}
|
|
30733
31119
|
const loadedPreprocessorPath = {};
|
|
30734
31120
|
function loadPreprocessorPath(lang, root) {
|
|
@@ -31042,7 +31428,7 @@ const makeStylWorker = (maxWorkers) => {
|
|
|
31042
31428
|
};
|
|
31043
31429
|
}, {
|
|
31044
31430
|
shouldUseFake(_stylusPath, _content, _root, options$1) {
|
|
31045
|
-
return !!(options$1.define && Object.values(options$1.define).some((d) => typeof d === "function"));
|
|
31431
|
+
return !!(options$1.define && Object.values(options$1.define).some((d$2) => typeof d$2 === "function"));
|
|
31046
31432
|
},
|
|
31047
31433
|
max: maxWorkers
|
|
31048
31434
|
});
|
|
@@ -31965,9 +32351,9 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
|
|
|
31965
32351
|
function extractImportPaths(code) {
|
|
31966
32352
|
code = code.replace(multilineCommentsRE, "/* */").replace(singlelineCommentsRE, "");
|
|
31967
32353
|
let js = "";
|
|
31968
|
-
let m;
|
|
32354
|
+
let m$2;
|
|
31969
32355
|
importsRE.lastIndex = 0;
|
|
31970
|
-
while ((m = importsRE.exec(code)) != null) js += `\nimport ${m[1]}`;
|
|
32356
|
+
while ((m$2 = importsRE.exec(code)) != null) js += `\nimport ${m$2[1]}`;
|
|
31971
32357
|
return js;
|
|
31972
32358
|
}
|
|
31973
32359
|
function shouldExternalizeDep(resolvedId, rawId) {
|
|
@@ -33469,7 +33855,7 @@ function completeSystemWrapPlugin() {
|
|
|
33469
33855
|
name: "vite:force-systemjs-wrap-complete",
|
|
33470
33856
|
renderChunk(code, _chunk, opts) {
|
|
33471
33857
|
if (opts.format === "system") return {
|
|
33472
|
-
code: code.replace(SystemJSWrapRE, (s, s1) => s.replace(s1, "(exports, module)")),
|
|
33858
|
+
code: code.replace(SystemJSWrapRE, (s$2, s1) => s$2.replace(s1, "(exports, module)")),
|
|
33473
33859
|
map: null
|
|
33474
33860
|
};
|
|
33475
33861
|
}
|
|
@@ -33943,14 +34329,14 @@ function isExternal(id, test) {
|
|
|
33943
34329
|
else return test.test(id);
|
|
33944
34330
|
}
|
|
33945
34331
|
function injectEnvironmentToHooks(environment, plugin) {
|
|
33946
|
-
const { resolveId, load: load$
|
|
34332
|
+
const { resolveId, load: load$3, transform: transform$2 } = plugin;
|
|
33947
34333
|
const clone$1 = { ...plugin };
|
|
33948
34334
|
for (const hook of Object.keys(clone$1)) switch (hook) {
|
|
33949
34335
|
case "resolveId":
|
|
33950
34336
|
clone$1[hook] = wrapEnvironmentResolveId(environment, resolveId, plugin.name);
|
|
33951
34337
|
break;
|
|
33952
34338
|
case "load":
|
|
33953
|
-
clone$1[hook] = wrapEnvironmentLoad(environment, load$
|
|
34339
|
+
clone$1[hook] = wrapEnvironmentLoad(environment, load$3, plugin.name);
|
|
33954
34340
|
break;
|
|
33955
34341
|
case "transform":
|
|
33956
34342
|
clone$1[hook] = wrapEnvironmentTransform(environment, transform$2, plugin.name);
|
|
@@ -34255,7 +34641,7 @@ async function fetchModule(environment, url$3, importer, options$1 = {}) {
|
|
|
34255
34641
|
let result = await environment.transformRequest(url$3);
|
|
34256
34642
|
if (!result) throw new Error(`[vite] transform failed for module '${url$3}'${importer ? ` imported from '${importer}'` : ""}.`);
|
|
34257
34643
|
if (options$1.inlineSourceMap !== false) result = inlineSourceMap(mod, result, options$1.startOffset);
|
|
34258
|
-
if (result.code[0] === "#") result.code = result.code.replace(/^#!.*/, (s) => " ".repeat(s.length));
|
|
34644
|
+
if (result.code[0] === "#") result.code = result.code.replace(/^#!.*/, (s$2) => " ".repeat(s$2.length));
|
|
34259
34645
|
return {
|
|
34260
34646
|
code: result.code,
|
|
34261
34647
|
file: mod.file,
|
|
@@ -34294,7 +34680,7 @@ function createDepsOptimizer(environment) {
|
|
|
34294
34680
|
const { noDiscovery, holdUntilCrawlEnd } = options$1;
|
|
34295
34681
|
let metadata = initDepsOptimizerMetadata(environment, sessionTimestamp);
|
|
34296
34682
|
const depsOptimizer = {
|
|
34297
|
-
init: init$
|
|
34683
|
+
init: init$3,
|
|
34298
34684
|
metadata,
|
|
34299
34685
|
registerMissingImport,
|
|
34300
34686
|
run: () => debouncedProcessing(0),
|
|
@@ -34342,7 +34728,7 @@ function createDepsOptimizer(environment) {
|
|
|
34342
34728
|
]);
|
|
34343
34729
|
}
|
|
34344
34730
|
let inited = false;
|
|
34345
|
-
async function init$
|
|
34731
|
+
async function init$3() {
|
|
34346
34732
|
if (inited) return;
|
|
34347
34733
|
inited = true;
|
|
34348
34734
|
const cachedMetadata = await loadCachedDepOptimizationMetadata(environment);
|
|
@@ -34617,13 +35003,13 @@ function createExplicitDepsOptimizer(environment) {
|
|
|
34617
35003
|
registerMissingImport: () => {
|
|
34618
35004
|
throw new Error(`Vite Internal Error: registerMissingImport is not supported in dev ${environment.name}`);
|
|
34619
35005
|
},
|
|
34620
|
-
init: init$
|
|
35006
|
+
init: init$3,
|
|
34621
35007
|
run: () => {},
|
|
34622
35008
|
close: async () => {},
|
|
34623
35009
|
options: environment.config.optimizeDeps
|
|
34624
35010
|
};
|
|
34625
35011
|
let inited = false;
|
|
34626
|
-
async function init$
|
|
35012
|
+
async function init$3() {
|
|
34627
35013
|
if (inited) return;
|
|
34628
35014
|
inited = true;
|
|
34629
35015
|
depsOptimizer.metadata = await optimizeExplicitEnvironmentDeps(environment);
|
|
@@ -34879,7 +35265,7 @@ var EnvironmentModuleGraph = class {
|
|
|
34879
35265
|
this.fileToModulesMap.set(file, fileMappedModules);
|
|
34880
35266
|
}
|
|
34881
35267
|
const url$3 = `${FS_PREFIX}${file}`;
|
|
34882
|
-
for (const m of fileMappedModules) if ((m.url === url$3 || m.id === file) && m.type === "asset") return m;
|
|
35268
|
+
for (const m$2 of fileMappedModules) if ((m$2.url === url$3 || m$2.id === file) && m$2.type === "asset") return m$2;
|
|
34883
35269
|
const mod = new EnvironmentModuleNode(url$3, this.environment);
|
|
34884
35270
|
mod.type = "asset";
|
|
34885
35271
|
mod.file = file;
|
|
@@ -35137,12 +35523,12 @@ var DevEnvironment = class extends BaseEnvironment {
|
|
|
35137
35523
|
this._crawlEndFinder.registerRequestProcessing(id, done);
|
|
35138
35524
|
}
|
|
35139
35525
|
};
|
|
35140
|
-
function invalidateModule(environment, m) {
|
|
35141
|
-
const mod = environment.moduleGraph.urlToModuleMap.get(m.path);
|
|
35526
|
+
function invalidateModule(environment, m$2) {
|
|
35527
|
+
const mod = environment.moduleGraph.urlToModuleMap.get(m$2.path);
|
|
35142
35528
|
if (mod && mod.isSelfAccepting && mod.lastHMRTimestamp > 0 && !mod.lastHMRInvalidationReceived) {
|
|
35143
35529
|
mod.lastHMRInvalidationReceived = true;
|
|
35144
|
-
environment.logger.info(import_picocolors$1.default.yellow(`hmr invalidate `) + import_picocolors$1.default.dim(m.path) + (m.message ? ` ${m.message}` : ""), { timestamp: true });
|
|
35145
|
-
updateModules(environment, getShortName(mod.file, environment.config.root), [...mod.importers], mod.lastHMRTimestamp, m.firstInvalidatedBy);
|
|
35530
|
+
environment.logger.info(import_picocolors$1.default.yellow(`hmr invalidate `) + import_picocolors$1.default.dim(m$2.path) + (m$2.message ? ` ${m$2.message}` : ""), { timestamp: true });
|
|
35531
|
+
updateModules(environment, getShortName(mod.file, environment.config.root), [...mod.importers], mod.lastHMRTimestamp, m$2.firstInvalidatedBy);
|
|
35146
35532
|
}
|
|
35147
35533
|
}
|
|
35148
35534
|
const callCrawlEndIfIdleAfterMs = 50;
|
|
@@ -35458,10 +35844,10 @@ async function runnerImport(moduleId, inlineConfig) {
|
|
|
35458
35844
|
const module$1 = await environment.runner.import(moduleId);
|
|
35459
35845
|
return {
|
|
35460
35846
|
module: module$1,
|
|
35461
|
-
dependencies: [...environment.runner.evaluatedModules.urlToIdModuleMap.values()].filter((m) => {
|
|
35462
|
-
if (!m.meta || "externalize" in m.meta) return false;
|
|
35463
|
-
return m.exports !== module$1;
|
|
35464
|
-
}).map((m) => m.file)
|
|
35847
|
+
dependencies: [...environment.runner.evaluatedModules.urlToIdModuleMap.values()].filter((m$2) => {
|
|
35848
|
+
if (!m$2.meta || "externalize" in m$2.meta) return false;
|
|
35849
|
+
return m$2.exports !== module$1;
|
|
35850
|
+
}).map((m$2) => m$2.file)
|
|
35465
35851
|
};
|
|
35466
35852
|
} finally {
|
|
35467
35853
|
await environment.close();
|