vite 7.2.1 → 7.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +22 -46
- package/dist/client/client.mjs +4 -4
- package/dist/node/chunks/build.js +1 -1
- package/dist/node/chunks/build2.js +1 -1
- package/dist/node/chunks/chunk.js +28 -7
- package/dist/node/chunks/config.js +1025 -1375
- package/dist/node/chunks/config2.js +1 -1
- package/dist/node/chunks/dist.js +1 -1
- package/dist/node/chunks/logger.js +1 -1
- package/dist/node/chunks/optimizer.js +1 -1
- package/dist/node/chunks/postcss-import.js +1 -1
- package/dist/node/chunks/preview.js +1 -1
- package/dist/node/chunks/server.js +1 -1
- package/dist/node/cli.js +1 -1
- package/package.json +11 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as
|
|
1
|
+
import { a as __toCommonJS, i as __require, n as __esm, o as __toDynamicImportESM, r as __export, s as __toESM, 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, inspect, promisify, stripVTControlCharacters } from "node:util";
|
|
10
|
+
import { format, formatWithOptions, 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,6 +16,7 @@ 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";
|
|
19
20
|
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";
|
|
20
21
|
import { existsSync as existsSync$1, readFileSync as readFileSync$1, readdirSync, statSync } from "fs";
|
|
21
22
|
import { fdir } from "fdir";
|
|
@@ -585,7 +586,7 @@ function memoizedBinarySearch(haystack, needle, state, key) {
|
|
|
585
586
|
state.lastNeedle = needle;
|
|
586
587
|
return state.lastIndex = binarySearch(haystack, needle, low, high);
|
|
587
588
|
}
|
|
588
|
-
function parse$
|
|
589
|
+
function parse$14(map$1) {
|
|
589
590
|
return typeof map$1 === "string" ? JSON.parse(map$1) : map$1;
|
|
590
591
|
}
|
|
591
592
|
var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
|
|
@@ -596,11 +597,11 @@ var TraceMap = class {
|
|
|
596
597
|
constructor(map$1, mapUrl) {
|
|
597
598
|
const isString$1 = typeof map$1 === "string";
|
|
598
599
|
if (!isString$1 && map$1._decodedMemo) return map$1;
|
|
599
|
-
const parsed = parse$
|
|
600
|
-
const { version: version$2, file, names, sourceRoot, sources, sourcesContent } = parsed;
|
|
600
|
+
const parsed = parse$14(map$1);
|
|
601
|
+
const { version: version$2, file, names: names$1, sourceRoot, sources, sourcesContent } = parsed;
|
|
601
602
|
this.version = version$2;
|
|
602
603
|
this.file = file;
|
|
603
|
-
this.names = names || [];
|
|
604
|
+
this.names = names$1 || [];
|
|
604
605
|
this.sourceRoot = sourceRoot;
|
|
605
606
|
this.sources = sources;
|
|
606
607
|
this.sourcesContent = sourcesContent;
|
|
@@ -651,8 +652,8 @@ function originalPositionFor(map$1, needle) {
|
|
|
651
652
|
if (index === -1) return OMapping(null, null, null, null);
|
|
652
653
|
const segment = segments[index];
|
|
653
654
|
if (segment.length === 1) return OMapping(null, null, null, null);
|
|
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);
|
|
655
|
+
const { names: names$1, resolvedSources } = map$1;
|
|
656
|
+
return OMapping(resolvedSources[segment[SOURCES_INDEX$1]], segment[SOURCE_LINE$1] + 1, segment[SOURCE_COLUMN$1], segment.length === 5 ? names$1[segment[NAMES_INDEX$1]] : null);
|
|
656
657
|
}
|
|
657
658
|
function decodedMap(map$1) {
|
|
658
659
|
return clone(map$1, decodedMappings(map$1));
|
|
@@ -756,12 +757,12 @@ function setIgnore(map$1, source, ignore = true) {
|
|
|
756
757
|
else remove(ignoreList, index);
|
|
757
758
|
}
|
|
758
759
|
function toDecodedMap(map$1) {
|
|
759
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList } = cast2(map$1);
|
|
760
|
+
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names$1, _ignoreList: ignoreList } = cast2(map$1);
|
|
760
761
|
removeEmptyFinalLines(mappings);
|
|
761
762
|
return {
|
|
762
763
|
version: 3,
|
|
763
764
|
file: map$1.file || void 0,
|
|
764
|
-
names: names.array,
|
|
765
|
+
names: names$1.array,
|
|
765
766
|
sourceRoot: map$1.sourceRoot || void 0,
|
|
766
767
|
sources: sources.array,
|
|
767
768
|
sourcesContent,
|
|
@@ -774,7 +775,7 @@ function toEncodedMap(map$1) {
|
|
|
774
775
|
return Object.assign({}, decoded, { mappings: encode$1(decoded.mappings) });
|
|
775
776
|
}
|
|
776
777
|
function addSegmentInternal(skipable, map$1, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
|
|
777
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = cast2(map$1);
|
|
778
|
+
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names$1 } = cast2(map$1);
|
|
778
779
|
const line = getIndex(mappings, genLine);
|
|
779
780
|
const index = getColumnIndex(line, genColumn);
|
|
780
781
|
if (!source) {
|
|
@@ -784,7 +785,7 @@ function addSegmentInternal(skipable, map$1, genLine, genColumn, source, sourceL
|
|
|
784
785
|
assert$2(sourceLine);
|
|
785
786
|
assert$2(sourceColumn);
|
|
786
787
|
const sourcesIndex = put(sources, source);
|
|
787
|
-
const namesIndex = name ? put(names, name) : NO_NAME;
|
|
788
|
+
const namesIndex = name ? put(names$1, name) : NO_NAME;
|
|
788
789
|
if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
|
|
789
790
|
if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) return;
|
|
790
791
|
return insert(line, index, name ? [
|
|
@@ -896,7 +897,7 @@ function asArray(value$1) {
|
|
|
896
897
|
return [value$1];
|
|
897
898
|
}
|
|
898
899
|
function buildSourceMapTree(input, loader$1) {
|
|
899
|
-
const maps = asArray(input).map((m
|
|
900
|
+
const maps = asArray(input).map((m) => new TraceMap(m, ""));
|
|
900
901
|
const map$1 = maps.pop();
|
|
901
902
|
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.
|
|
902
903
|
Did you specify these with the most recent transformation maps first?`);
|
|
@@ -946,534 +947,285 @@ function remapping(input, loader$1, options$1) {
|
|
|
946
947
|
}
|
|
947
948
|
|
|
948
949
|
//#endregion
|
|
949
|
-
//#region ../../node_modules/.pnpm/
|
|
950
|
-
|
|
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
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
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;
|
|
950
|
+
//#region ../../node_modules/.pnpm/obug@1.0.2_ms@2.1.3/node_modules/obug/dist/core.js
|
|
951
|
+
function coerce$1(value$1) {
|
|
952
|
+
if (value$1 instanceof Error) return value$1.stack || value$1.message;
|
|
953
|
+
return value$1;
|
|
954
|
+
}
|
|
955
|
+
function selectColor$1(colors$37, namespace) {
|
|
956
|
+
let hash$1 = 0;
|
|
957
|
+
for (let i$1 = 0; i$1 < namespace.length; i$1++) {
|
|
958
|
+
hash$1 = (hash$1 << 5) - hash$1 + namespace.charCodeAt(i$1);
|
|
959
|
+
hash$1 |= 0;
|
|
960
|
+
}
|
|
961
|
+
return colors$37[Math.abs(hash$1) % colors$37.length];
|
|
962
|
+
}
|
|
963
|
+
function matchesTemplate$1(search, template) {
|
|
964
|
+
let searchIndex = 0;
|
|
965
|
+
let templateIndex = 0;
|
|
966
|
+
let starIndex = -1;
|
|
967
|
+
let matchIndex = 0;
|
|
968
|
+
while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) if (template[templateIndex] === "*") {
|
|
969
|
+
starIndex = templateIndex;
|
|
970
|
+
matchIndex = searchIndex;
|
|
971
|
+
templateIndex++;
|
|
972
|
+
} else {
|
|
973
|
+
searchIndex++;
|
|
974
|
+
templateIndex++;
|
|
975
|
+
}
|
|
976
|
+
else if (starIndex !== -1) {
|
|
977
|
+
templateIndex = starIndex + 1;
|
|
978
|
+
matchIndex++;
|
|
979
|
+
searchIndex = matchIndex;
|
|
980
|
+
} else return false;
|
|
981
|
+
while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++;
|
|
982
|
+
return templateIndex === template.length;
|
|
983
|
+
}
|
|
984
|
+
function humanize$1(value$1) {
|
|
985
|
+
if (value$1 >= 1e3) return `${(value$1 / 1e3).toFixed(1)}s`;
|
|
986
|
+
return `${value$1}ms`;
|
|
987
|
+
}
|
|
988
|
+
function setup(useColors$2, colors$37, log$4, load$2, save$2, formatArgs$2, init$2) {
|
|
989
|
+
const createDebug$3 = (namespace) => {
|
|
990
|
+
let prevTime;
|
|
991
|
+
let enableOverride;
|
|
992
|
+
let namespacesCache;
|
|
993
|
+
let enabledCache;
|
|
994
|
+
const debug$18 = (...args) => {
|
|
995
|
+
if (!debug$18.enabled) return;
|
|
996
|
+
const curr = Date.now();
|
|
997
|
+
debug$18.diff = curr - (prevTime || curr);
|
|
998
|
+
debug$18.prev = prevTime;
|
|
999
|
+
debug$18.curr = curr;
|
|
1000
|
+
prevTime = curr;
|
|
1001
|
+
args[0] = coerce$1(args[0]);
|
|
1002
|
+
if (typeof args[0] !== "string") args.unshift("%O");
|
|
1003
|
+
let index = 0;
|
|
1004
|
+
args[0] = args[0].replace(/%([a-z%])/gi, (match, format$3) => {
|
|
1005
|
+
if (match === "%%") return "%";
|
|
1006
|
+
index++;
|
|
1007
|
+
const formatter = createDebug$3.formatters[format$3];
|
|
1008
|
+
if (typeof formatter === "function") {
|
|
1009
|
+
const value$1 = args[index];
|
|
1010
|
+
match = formatter.call(debug$18, value$1);
|
|
1011
|
+
args.splice(index, 1);
|
|
1012
|
+
index--;
|
|
1168
1013
|
}
|
|
1014
|
+
return match;
|
|
1169
1015
|
});
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
}
|
|
1173
|
-
function extend(namespace, delimiter) {
|
|
1174
|
-
const newDebug = createDebug$
|
|
1016
|
+
createDebug$3.formatArgs.call(debug$18, args);
|
|
1017
|
+
(debug$18.log || createDebug$3.log).apply(debug$18, args);
|
|
1018
|
+
};
|
|
1019
|
+
function extend(namespace$1, delimiter = ":") {
|
|
1020
|
+
const newDebug = createDebug$3(this.namespace + delimiter + namespace$1);
|
|
1175
1021
|
newDebug.log = this.log;
|
|
1176
1022
|
return newDebug;
|
|
1177
1023
|
}
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
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++;
|
|
1024
|
+
debug$18.namespace = namespace;
|
|
1025
|
+
debug$18.useColors = useColors$2;
|
|
1026
|
+
debug$18.color = selectColor$1(colors$37, namespace);
|
|
1027
|
+
debug$18.extend = extend;
|
|
1028
|
+
debug$18.log = log$4;
|
|
1029
|
+
Object.defineProperty(debug$18, "enabled", {
|
|
1030
|
+
enumerable: true,
|
|
1031
|
+
configurable: false,
|
|
1032
|
+
get: () => {
|
|
1033
|
+
if (enableOverride != null) return enableOverride;
|
|
1034
|
+
if (namespacesCache !== createDebug$3.namespaces) {
|
|
1035
|
+
namespacesCache = createDebug$3.namespaces;
|
|
1036
|
+
enabledCache = createDebug$3.enabled(namespace);
|
|
1037
|
+
}
|
|
1038
|
+
return enabledCache;
|
|
1039
|
+
},
|
|
1040
|
+
set: (v) => {
|
|
1041
|
+
enableOverride = v;
|
|
1214
1042
|
}
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
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;
|
|
1043
|
+
});
|
|
1044
|
+
init$2 && init$2(debug$18);
|
|
1045
|
+
return debug$18;
|
|
1046
|
+
};
|
|
1047
|
+
function enable$2(namespaces$1) {
|
|
1048
|
+
save$2(namespaces$1);
|
|
1049
|
+
createDebug$3.namespaces = namespaces$1;
|
|
1050
|
+
createDebug$3.names = [];
|
|
1051
|
+
createDebug$3.skips = [];
|
|
1052
|
+
const split = namespaces$1.trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
1053
|
+
for (const ns of split) if (ns[0] === "-") createDebug$3.skips.push(ns.slice(1));
|
|
1054
|
+
else createDebug$3.names.push(ns);
|
|
1055
|
+
}
|
|
1056
|
+
function disable$1() {
|
|
1057
|
+
const namespaces$1 = [...createDebug$3.names, ...createDebug$3.skips.map((namespace) => `-${namespace}`)].join(",");
|
|
1058
|
+
createDebug$3.enable("");
|
|
1059
|
+
return namespaces$1;
|
|
1060
|
+
}
|
|
1061
|
+
function enabled$1(name) {
|
|
1062
|
+
for (const skip of createDebug$3.skips) if (matchesTemplate$1(name, skip)) return false;
|
|
1063
|
+
for (const ns of createDebug$3.names) if (matchesTemplate$1(name, ns)) return true;
|
|
1064
|
+
return false;
|
|
1266
1065
|
}
|
|
1267
|
-
|
|
1268
|
-
|
|
1066
|
+
createDebug$3.namespaces = "";
|
|
1067
|
+
createDebug$3.formatters = {};
|
|
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
|
+
}
|
|
1269
1079
|
|
|
1270
1080
|
//#endregion
|
|
1271
|
-
//#region ../../node_modules/.pnpm/
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
*/
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
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
|
-
}) });
|
|
1081
|
+
//#region ../../node_modules/.pnpm/obug@1.0.2_ms@2.1.3/node_modules/obug/dist/node.js
|
|
1082
|
+
const require$1 = createRequire(import.meta.url);
|
|
1083
|
+
function log$3(...args) {
|
|
1084
|
+
process.stderr.write(`${formatWithOptions(inspectOpts$1, ...args)}\n`);
|
|
1085
|
+
}
|
|
1086
|
+
const colors$36 = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2 ? [
|
|
1087
|
+
20,
|
|
1088
|
+
21,
|
|
1089
|
+
26,
|
|
1090
|
+
27,
|
|
1091
|
+
32,
|
|
1092
|
+
33,
|
|
1093
|
+
38,
|
|
1094
|
+
39,
|
|
1095
|
+
40,
|
|
1096
|
+
41,
|
|
1097
|
+
42,
|
|
1098
|
+
43,
|
|
1099
|
+
44,
|
|
1100
|
+
45,
|
|
1101
|
+
56,
|
|
1102
|
+
57,
|
|
1103
|
+
62,
|
|
1104
|
+
63,
|
|
1105
|
+
68,
|
|
1106
|
+
69,
|
|
1107
|
+
74,
|
|
1108
|
+
75,
|
|
1109
|
+
76,
|
|
1110
|
+
77,
|
|
1111
|
+
78,
|
|
1112
|
+
79,
|
|
1113
|
+
80,
|
|
1114
|
+
81,
|
|
1115
|
+
92,
|
|
1116
|
+
93,
|
|
1117
|
+
98,
|
|
1118
|
+
99,
|
|
1119
|
+
112,
|
|
1120
|
+
113,
|
|
1121
|
+
128,
|
|
1122
|
+
129,
|
|
1123
|
+
134,
|
|
1124
|
+
135,
|
|
1125
|
+
148,
|
|
1126
|
+
149,
|
|
1127
|
+
160,
|
|
1128
|
+
161,
|
|
1129
|
+
162,
|
|
1130
|
+
163,
|
|
1131
|
+
164,
|
|
1132
|
+
165,
|
|
1133
|
+
166,
|
|
1134
|
+
167,
|
|
1135
|
+
168,
|
|
1136
|
+
169,
|
|
1137
|
+
170,
|
|
1138
|
+
171,
|
|
1139
|
+
172,
|
|
1140
|
+
173,
|
|
1141
|
+
178,
|
|
1142
|
+
179,
|
|
1143
|
+
184,
|
|
1144
|
+
185,
|
|
1145
|
+
196,
|
|
1146
|
+
197,
|
|
1147
|
+
198,
|
|
1148
|
+
199,
|
|
1149
|
+
200,
|
|
1150
|
+
201,
|
|
1151
|
+
202,
|
|
1152
|
+
203,
|
|
1153
|
+
204,
|
|
1154
|
+
205,
|
|
1155
|
+
206,
|
|
1156
|
+
207,
|
|
1157
|
+
208,
|
|
1158
|
+
209,
|
|
1159
|
+
214,
|
|
1160
|
+
215,
|
|
1161
|
+
220,
|
|
1162
|
+
221
|
|
1163
|
+
] : [
|
|
1164
|
+
6,
|
|
1165
|
+
2,
|
|
1166
|
+
3,
|
|
1167
|
+
4,
|
|
1168
|
+
5,
|
|
1169
|
+
1
|
|
1170
|
+
];
|
|
1171
|
+
const inspectOpts$1 = Object.keys(process.env).filter((key) => {
|
|
1172
|
+
return /^debug_/i.test(key);
|
|
1173
|
+
}).reduce((obj, key) => {
|
|
1174
|
+
const prop = key.slice(6).toLowerCase().replace(/_([a-z])/g, (_, k) => k.toUpperCase());
|
|
1175
|
+
let value$1 = process.env[key];
|
|
1176
|
+
if (value$1 === "null") value$1 = null;
|
|
1177
|
+
else if (/^yes|on|true|enabled$/i.test(value$1)) value$1 = true;
|
|
1178
|
+
else if (/^no|off|false|disabled$/i.test(value$1)) value$1 = false;
|
|
1179
|
+
else value$1 = Number(value$1);
|
|
1180
|
+
obj[prop] = value$1;
|
|
1181
|
+
return obj;
|
|
1182
|
+
}, {});
|
|
1183
|
+
function load$1() {
|
|
1184
|
+
return process.env.DEBUG || "";
|
|
1185
|
+
}
|
|
1186
|
+
function save$1(namespaces$1) {
|
|
1187
|
+
if (namespaces$1) process.env.DEBUG = namespaces$1;
|
|
1188
|
+
else delete process.env.DEBUG;
|
|
1189
|
+
}
|
|
1190
|
+
function useColors$1() {
|
|
1191
|
+
return "colors" in inspectOpts$1 ? Boolean(inspectOpts$1.colors) : isatty(process.stderr.fd);
|
|
1192
|
+
}
|
|
1193
|
+
let humanize$1$1;
|
|
1194
|
+
try {
|
|
1195
|
+
humanize$1$1 = require$1("ms");
|
|
1196
|
+
} catch (_unused) {
|
|
1197
|
+
humanize$1$1 = humanize$1;
|
|
1198
|
+
}
|
|
1199
|
+
function formatArgs$1(args) {
|
|
1200
|
+
const { namespace: name, useColors: useColors$1$1 } = this;
|
|
1201
|
+
if (useColors$1$1) {
|
|
1202
|
+
const c = this.color;
|
|
1203
|
+
const colorCode = `\u001B[3${c < 8 ? c : `8;5;${c}`}`;
|
|
1204
|
+
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
|
1205
|
+
args[0] = prefix + args[0].split("\n").join(`\n${prefix}`);
|
|
1206
|
+
args.push(`${colorCode}m+${humanize$1$1(this.diff)}\u001B[0m`);
|
|
1207
|
+
} else args[0] = `${getDate$1()}${name} ${args[0]}`;
|
|
1208
|
+
}
|
|
1209
|
+
function getDate$1() {
|
|
1210
|
+
if (inspectOpts$1.hideDate) return "";
|
|
1211
|
+
return `${(/* @__PURE__ */ new Date()).toISOString()} `;
|
|
1212
|
+
}
|
|
1213
|
+
function init$1(debug$18) {
|
|
1214
|
+
debug$18.inspectOpts = Object.assign({}, inspectOpts$1);
|
|
1215
|
+
}
|
|
1216
|
+
const createDebug$2 = setup(useColors$1(), colors$36, log$3, load$1, save$1, formatArgs$1, init$1);
|
|
1217
|
+
createDebug$2.inspectOpts = inspectOpts$1;
|
|
1218
|
+
createDebug$2.formatters.o = function(v) {
|
|
1219
|
+
this.inspectOpts.colors = this.useColors;
|
|
1220
|
+
return inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
1221
|
+
};
|
|
1222
|
+
createDebug$2.formatters.O = function(v) {
|
|
1223
|
+
this.inspectOpts.colors = this.useColors;
|
|
1224
|
+
return inspect(v, this.inspectOpts);
|
|
1225
|
+
};
|
|
1226
|
+
var node_default = createDebug$2;
|
|
1227
|
+
createDebug$2.default = createDebug$2;
|
|
1228
|
+
createDebug$2.debug = createDebug$2;
|
|
1477
1229
|
|
|
1478
1230
|
//#endregion
|
|
1479
1231
|
//#region ../../node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/esm/estree-walker.js
|
|
@@ -1621,28 +1373,28 @@ function walk$2(ast, { enter, leave }) {
|
|
|
1621
1373
|
//#endregion
|
|
1622
1374
|
//#region ../../node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.43.0/node_modules/@rollup/pluginutils/dist/es/index.js
|
|
1623
1375
|
const extractors = {
|
|
1624
|
-
ArrayPattern(names, param) {
|
|
1625
|
-
for (const element of param.elements) if (element) extractors[element.type](names, element);
|
|
1376
|
+
ArrayPattern(names$1, param) {
|
|
1377
|
+
for (const element of param.elements) if (element) extractors[element.type](names$1, element);
|
|
1626
1378
|
},
|
|
1627
|
-
AssignmentPattern(names, param) {
|
|
1628
|
-
extractors[param.left.type](names, param.left);
|
|
1379
|
+
AssignmentPattern(names$1, param) {
|
|
1380
|
+
extractors[param.left.type](names$1, param.left);
|
|
1629
1381
|
},
|
|
1630
|
-
Identifier(names, param) {
|
|
1631
|
-
names.push(param.name);
|
|
1382
|
+
Identifier(names$1, param) {
|
|
1383
|
+
names$1.push(param.name);
|
|
1632
1384
|
},
|
|
1633
1385
|
MemberExpression() {},
|
|
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);
|
|
1386
|
+
ObjectPattern(names$1, param) {
|
|
1387
|
+
for (const prop of param.properties) if (prop.type === "RestElement") extractors.RestElement(names$1, prop);
|
|
1388
|
+
else extractors[prop.value.type](names$1, prop.value);
|
|
1637
1389
|
},
|
|
1638
|
-
RestElement(names, param) {
|
|
1639
|
-
extractors[param.argument.type](names, param.argument);
|
|
1390
|
+
RestElement(names$1, param) {
|
|
1391
|
+
extractors[param.argument.type](names$1, param.argument);
|
|
1640
1392
|
}
|
|
1641
1393
|
};
|
|
1642
1394
|
const extractAssignedNames = function extractAssignedNames$1(param) {
|
|
1643
|
-
const names = [];
|
|
1644
|
-
extractors[param.type](names, param);
|
|
1645
|
-
return names;
|
|
1395
|
+
const names$1 = [];
|
|
1396
|
+
extractors[param.type](names$1, param);
|
|
1397
|
+
return names$1;
|
|
1646
1398
|
};
|
|
1647
1399
|
const blockDeclarations = {
|
|
1648
1400
|
const: true,
|
|
@@ -2073,7 +1825,6 @@ function traverseBetweenDirs(longerDir, shorterDir, cb) {
|
|
|
2073
1825
|
//#endregion
|
|
2074
1826
|
//#region src/node/utils.ts
|
|
2075
1827
|
var import_picocolors$33 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
2076
|
-
var import_node = /* @__PURE__ */ __toESM(require_node$1(), 1);
|
|
2077
1828
|
const createFilter = createFilter$2;
|
|
2078
1829
|
const replaceSlashOrColonRE = /[/:]/g;
|
|
2079
1830
|
const replaceDotRE = /\./g;
|
|
@@ -2117,7 +1868,7 @@ function isInNodeModules(id) {
|
|
|
2117
1868
|
return id.includes("node_modules");
|
|
2118
1869
|
}
|
|
2119
1870
|
function moduleListContains(moduleList, id) {
|
|
2120
|
-
return moduleList?.some((m
|
|
1871
|
+
return moduleList?.some((m) => m === id || id.startsWith(withTrailingSlash(m)));
|
|
2121
1872
|
}
|
|
2122
1873
|
function isOptimizable(id, optimizeDeps$1) {
|
|
2123
1874
|
const { extensions: extensions$1 } = optimizeDeps$1;
|
|
@@ -2133,7 +1884,7 @@ const rollupVersion = resolvePackageData("rollup", _dirname, true)?.data.version
|
|
|
2133
1884
|
const filter = process.env.VITE_DEBUG_FILTER;
|
|
2134
1885
|
const DEBUG = process.env.DEBUG;
|
|
2135
1886
|
function createDebugger(namespace, options$1 = {}) {
|
|
2136
|
-
const log$4 = (
|
|
1887
|
+
const log$4 = node_default(namespace);
|
|
2137
1888
|
const { onlyWhenFocused, depth } = options$1;
|
|
2138
1889
|
if (depth && log$4.inspectOpts && log$4.inspectOpts.depth == null) log$4.inspectOpts.depth = options$1.depth;
|
|
2139
1890
|
let enabled$1 = log$4.enabled;
|
|
@@ -2406,6 +2157,16 @@ function emptyDir(dir, skip) {
|
|
|
2406
2157
|
});
|
|
2407
2158
|
}
|
|
2408
2159
|
}
|
|
2160
|
+
function copyDir(srcDir, destDir) {
|
|
2161
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
2162
|
+
for (const file of fs.readdirSync(srcDir)) {
|
|
2163
|
+
const srcFile = path.resolve(srcDir, file);
|
|
2164
|
+
if (srcFile === destDir) continue;
|
|
2165
|
+
const destFile = path.resolve(destDir, file);
|
|
2166
|
+
if (fs.statSync(srcFile).isDirectory()) copyDir(srcFile, destFile);
|
|
2167
|
+
else fs.copyFileSync(srcFile, destFile);
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2409
2170
|
const ERR_SYMLINK_IN_RECURSIVE_READDIR = "ERR_SYMLINK_IN_RECURSIVE_READDIR";
|
|
2410
2171
|
async function recursiveReaddir(dir) {
|
|
2411
2172
|
if (!fs.existsSync(dir)) return [];
|
|
@@ -2457,8 +2218,8 @@ function optimizeSafeRealPathSync() {
|
|
|
2457
2218
|
if (error$1) return;
|
|
2458
2219
|
const lines = stdout.split("\n");
|
|
2459
2220
|
for (const line of lines) {
|
|
2460
|
-
const m
|
|
2461
|
-
if (m
|
|
2221
|
+
const m = parseNetUseRE.exec(line);
|
|
2222
|
+
if (m) windowsNetworkMap.set(m[2], m[1]);
|
|
2462
2223
|
}
|
|
2463
2224
|
if (windowsNetworkMap.size === 0) safeRealpathSync = fs.realpathSync.native;
|
|
2464
2225
|
else safeRealpathSync = windowsMappedRealpathSync;
|
|
@@ -2535,7 +2296,7 @@ const nullSourceMap = {
|
|
|
2535
2296
|
* Note that the length of sourcemapList must be 2.
|
|
2536
2297
|
*/
|
|
2537
2298
|
function combineSourcemaps(filename, sourcemapList) {
|
|
2538
|
-
if (sourcemapList.length === 0 || sourcemapList.every((m
|
|
2299
|
+
if (sourcemapList.length === 0 || sourcemapList.every((m) => m.sources.length === 0)) return { ...nullSourceMap };
|
|
2539
2300
|
sourcemapList = sourcemapList.map((sourcemap) => {
|
|
2540
2301
|
const newSourcemaps = { ...sourcemap };
|
|
2541
2302
|
newSourcemaps.sources = sourcemap.sources.map((source) => source ? escapeToLinuxLikePath(source) : null);
|
|
@@ -2545,7 +2306,7 @@ function combineSourcemaps(filename, sourcemapList) {
|
|
|
2545
2306
|
const escapedFilename = escapeToLinuxLikePath(filename);
|
|
2546
2307
|
let map$1;
|
|
2547
2308
|
let mapIndex = 1;
|
|
2548
|
-
if (sourcemapList.slice(0, -1).find((m
|
|
2309
|
+
if (sourcemapList.slice(0, -1).find((m) => m.sources.length !== 1) === void 0) map$1 = remapping(sourcemapList, () => null);
|
|
2549
2310
|
else map$1 = remapping(sourcemapList[0], function loader$1(sourcefile) {
|
|
2550
2311
|
if (sourcefile === escapedFilename && sourcemapList[mapIndex]) return sourcemapList[mapIndex++];
|
|
2551
2312
|
else return null;
|
|
@@ -2667,9 +2428,9 @@ const requestQuerySplitRE = /\?(?!.*[/|}])/;
|
|
|
2667
2428
|
const requestQueryMaybeEscapedSplitRE = /\\?\?(?!.*[/|}])/;
|
|
2668
2429
|
const blankReplacer = (match) => " ".repeat(match.length);
|
|
2669
2430
|
function getHash(text, length = 8) {
|
|
2670
|
-
const h
|
|
2671
|
-
if (length <= 64) return h
|
|
2672
|
-
return h
|
|
2431
|
+
const h = crypto.hash("sha256", text, "hex").substring(0, length);
|
|
2432
|
+
if (length <= 64) return h;
|
|
2433
|
+
return h.padEnd(length, "_");
|
|
2673
2434
|
}
|
|
2674
2435
|
function emptyCssComments(raw) {
|
|
2675
2436
|
return raw.replace(multilineCommentsRE, blankReplacer);
|
|
@@ -2786,10 +2547,10 @@ function normalizeSingleAlias({ find: find$1, replacement, customResolver }) {
|
|
|
2786
2547
|
* Transforms transpiled code result where line numbers aren't altered,
|
|
2787
2548
|
* so we can skip sourcemap generation during dev
|
|
2788
2549
|
*/
|
|
2789
|
-
function transformStableResult(s
|
|
2550
|
+
function transformStableResult(s, id, config$2) {
|
|
2790
2551
|
return {
|
|
2791
|
-
code: s
|
|
2792
|
-
map: config$2.command === "build" && config$2.build.sourcemap ? s
|
|
2552
|
+
code: s.toString(),
|
|
2553
|
+
map: config$2.command === "build" && config$2.build.sourcemap ? s.generateMap({
|
|
2793
2554
|
hires: "boundary",
|
|
2794
2555
|
source: id
|
|
2795
2556
|
}) : null
|
|
@@ -3231,9 +2992,9 @@ function getLocator(source) {
|
|
|
3231
2992
|
let i$1 = 0;
|
|
3232
2993
|
let j = lineOffsets.length;
|
|
3233
2994
|
while (i$1 < j) {
|
|
3234
|
-
const m
|
|
3235
|
-
if (index < lineOffsets[m
|
|
3236
|
-
else i$1 = m
|
|
2995
|
+
const m = i$1 + j >> 1;
|
|
2996
|
+
if (index < lineOffsets[m]) j = m;
|
|
2997
|
+
else i$1 = m + 1;
|
|
3237
2998
|
}
|
|
3238
2999
|
const line = i$1 - 1;
|
|
3239
3000
|
return {
|
|
@@ -3469,14 +3230,14 @@ var MagicString = class MagicString {
|
|
|
3469
3230
|
generateDecodedMap(options$1) {
|
|
3470
3231
|
options$1 = options$1 || {};
|
|
3471
3232
|
const sourceIndex = 0;
|
|
3472
|
-
const names = Object.keys(this.storedNames);
|
|
3233
|
+
const names$1 = Object.keys(this.storedNames);
|
|
3473
3234
|
const mappings = new Mappings(options$1.hires);
|
|
3474
3235
|
const locate = getLocator(this.original);
|
|
3475
3236
|
if (this.intro) mappings.advance(this.intro);
|
|
3476
3237
|
this.firstChunk.eachNext((chunk) => {
|
|
3477
3238
|
const loc = locate(chunk.start);
|
|
3478
3239
|
if (chunk.intro.length) mappings.advance(chunk.intro);
|
|
3479
|
-
if (chunk.edited) mappings.addEdit(sourceIndex, chunk.content, loc, chunk.storeName ? names.indexOf(chunk.original) : -1);
|
|
3240
|
+
if (chunk.edited) mappings.addEdit(sourceIndex, chunk.content, loc, chunk.storeName ? names$1.indexOf(chunk.original) : -1);
|
|
3480
3241
|
else mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);
|
|
3481
3242
|
if (chunk.outro.length) mappings.advance(chunk.outro);
|
|
3482
3243
|
});
|
|
@@ -3485,7 +3246,7 @@ var MagicString = class MagicString {
|
|
|
3485
3246
|
file: options$1.file ? options$1.file.split(/[/\\]/).pop() : void 0,
|
|
3486
3247
|
sources: [options$1.source ? getRelativePath(options$1.file || "", options$1.source) : options$1.file || ""],
|
|
3487
3248
|
sourcesContent: options$1.includeContent ? [this.original] : void 0,
|
|
3488
|
-
names,
|
|
3249
|
+
names: names$1,
|
|
3489
3250
|
mappings: mappings.raw,
|
|
3490
3251
|
x_google_ignoreList: this.ignoreList ? [sourceIndex] : void 0
|
|
3491
3252
|
};
|
|
@@ -3967,6 +3728,7 @@ var require_is_reference = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
3967
3728
|
(function(global$1, factory) {
|
|
3968
3729
|
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());
|
|
3969
3730
|
})(exports, (function() {
|
|
3731
|
+
"use strict";
|
|
3970
3732
|
function isReference$1(node, parent) {
|
|
3971
3733
|
if (node.type === "MemberExpression") return !node.computed && isReference$1(node.object, node);
|
|
3972
3734
|
if (node.type === "Identifier") {
|
|
@@ -3991,14 +3753,14 @@ var require_is_reference = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
3991
3753
|
}) });
|
|
3992
3754
|
|
|
3993
3755
|
//#endregion
|
|
3994
|
-
//#region ../../node_modules/.pnpm/@rollup+plugin-commonjs@
|
|
3756
|
+
//#region ../../node_modules/.pnpm/@rollup+plugin-commonjs@29.0.0_rollup@4.43.0/node_modules/@rollup/plugin-commonjs/dist/es/index.js
|
|
3995
3757
|
var import_commondir = /* @__PURE__ */ __toESM(require_commondir(), 1);
|
|
3996
3758
|
var import_is_reference = /* @__PURE__ */ __toESM(require_is_reference(), 1);
|
|
3997
|
-
var version$1 = "
|
|
3759
|
+
var version$1 = "29.0.0";
|
|
3998
3760
|
var peerDependencies = { rollup: "^2.68.0||^3.0.0||^4.0.0" };
|
|
3999
|
-
function tryParse(parse$
|
|
3761
|
+
function tryParse(parse$15, code, id) {
|
|
4000
3762
|
try {
|
|
4001
|
-
return parse$
|
|
3763
|
+
return parse$15(code, { allowReturnOutsideFunction: true });
|
|
4002
3764
|
} catch (err$2) {
|
|
4003
3765
|
err$2.message += ` in ${id}`;
|
|
4004
3766
|
throw err$2;
|
|
@@ -4009,8 +3771,8 @@ const firstpassNoGlobal = /\b(?:require|module|exports)\b/;
|
|
|
4009
3771
|
function hasCjsKeywords(code, ignoreGlobal) {
|
|
4010
3772
|
return (ignoreGlobal ? firstpassNoGlobal : firstpassGlobal).test(code);
|
|
4011
3773
|
}
|
|
4012
|
-
function analyzeTopLevelStatements(parse$
|
|
4013
|
-
const ast = tryParse(parse$
|
|
3774
|
+
function analyzeTopLevelStatements(parse$15, code, id) {
|
|
3775
|
+
const ast = tryParse(parse$15, code, id);
|
|
4014
3776
|
let isEsModule = false;
|
|
4015
3777
|
let hasDefaultExport = false;
|
|
4016
3778
|
let hasNamedExports = false;
|
|
@@ -4330,6 +4092,11 @@ function getEsImportProxy(id, defaultIsModuleExports, moduleSideEffects) {
|
|
|
4330
4092
|
syntheticNamedExports: "__moduleExports"
|
|
4331
4093
|
};
|
|
4332
4094
|
}
|
|
4095
|
+
function getExternalBuiltinRequireProxy(id) {
|
|
4096
|
+
return `import { createRequire } from 'node:module';
|
|
4097
|
+
const require = createRequire(import.meta.url);
|
|
4098
|
+
export function __require() { return require(${JSON.stringify(id)}); }`;
|
|
4099
|
+
}
|
|
4333
4100
|
function getCandidatesForExtension(resolved, extension$1) {
|
|
4334
4101
|
return [resolved + extension$1, `${resolved}${sep$1}index${extension$1}`];
|
|
4335
4102
|
}
|
|
@@ -4392,7 +4159,7 @@ function getResolveId(extensions$1, isPossibleCjsId) {
|
|
|
4392
4159
|
}
|
|
4393
4160
|
};
|
|
4394
4161
|
}
|
|
4395
|
-
function getRequireResolver(extensions$1, detectCyclesAndConditional, currentlyResolving) {
|
|
4162
|
+
function getRequireResolver(extensions$1, detectCyclesAndConditional, currentlyResolving, requireNodeBuiltins) {
|
|
4396
4163
|
const knownCjsModuleTypes = Object.create(null);
|
|
4397
4164
|
const requiredIds = Object.create(null);
|
|
4398
4165
|
const unconditionallyRequiredIds = Object.create(null);
|
|
@@ -4491,13 +4258,27 @@ function getRequireResolver(extensions$1, detectCyclesAndConditional, currentlyR
|
|
|
4491
4258
|
parentMeta.isCommonJS = getTypeForFullyAnalyzedModule(parentId);
|
|
4492
4259
|
fullyAnalyzedModules[parentId] = true;
|
|
4493
4260
|
return requireTargets.map(({ id: dependencyId, allowProxy }, index) => {
|
|
4494
|
-
|
|
4261
|
+
let isCommonJS = parentMeta.isRequiredCommonJS[dependencyId] = getTypeForFullyAnalyzedModule(dependencyId);
|
|
4262
|
+
const isExternalWrapped = isWrappedId(dependencyId, EXTERNAL_SUFFIX);
|
|
4263
|
+
let resolvedDependencyId = dependencyId;
|
|
4264
|
+
if (requireNodeBuiltins === true) {
|
|
4265
|
+
if (parentMeta.isCommonJS === IS_WRAPPED_COMMONJS && !allowProxy && isExternalWrapped) {
|
|
4266
|
+
if (unwrapId$1(dependencyId, EXTERNAL_SUFFIX).startsWith("node:")) {
|
|
4267
|
+
isCommonJS = IS_WRAPPED_COMMONJS;
|
|
4268
|
+
parentMeta.isRequiredCommonJS[dependencyId] = isCommonJS;
|
|
4269
|
+
}
|
|
4270
|
+
} else if (isExternalWrapped && !allowProxy) {
|
|
4271
|
+
const actualExternalId = unwrapId$1(dependencyId, EXTERNAL_SUFFIX);
|
|
4272
|
+
if (actualExternalId.startsWith("node:")) resolvedDependencyId = actualExternalId;
|
|
4273
|
+
}
|
|
4274
|
+
}
|
|
4495
4275
|
const isWrappedCommonJS = isCommonJS === IS_WRAPPED_COMMONJS;
|
|
4496
4276
|
fullyAnalyzedModules[dependencyId] = true;
|
|
4277
|
+
const moduleInfo = isWrappedCommonJS && !isExternalWrapped ? rollupContext.getModuleInfo(dependencyId) : null;
|
|
4497
4278
|
return {
|
|
4498
|
-
wrappedModuleSideEffects: isWrappedCommonJS
|
|
4279
|
+
wrappedModuleSideEffects: !isWrappedCommonJS ? false : moduleInfo?.moduleSideEffects ?? true,
|
|
4499
4280
|
source: sources[index].source,
|
|
4500
|
-
id: allowProxy ? wrapId$1(
|
|
4281
|
+
id: allowProxy ? wrapId$1(resolvedDependencyId, isWrappedCommonJS ? WRAPPED_SUFFIX : PROXY_SUFFIX) : resolvedDependencyId,
|
|
4501
4282
|
isCommonJS
|
|
4502
4283
|
};
|
|
4503
4284
|
});
|
|
@@ -4731,7 +4512,7 @@ function getRequireHandlers() {
|
|
|
4731
4512
|
processRequireExpressions(imports, await resolveRequireSourcesAndUpdateMeta(id, needsRequireWrapper ? IS_WRAPPED_COMMONJS : !isEsModule, commonjsMeta, Object.keys(requiresBySource).map((source) => {
|
|
4732
4513
|
return {
|
|
4733
4514
|
source,
|
|
4734
|
-
isConditional: requiresBySource[source].every((require$
|
|
4515
|
+
isConditional: requiresBySource[source].every((require$2) => require$2.isInsideConditional)
|
|
4735
4516
|
};
|
|
4736
4517
|
})), requiresBySource, getIgnoreTryCatchRequireStatementMode, magicString);
|
|
4737
4518
|
return imports.length ? `${imports.join(";\n")};\n\n` : "";
|
|
@@ -4791,8 +4572,8 @@ function getGenerateRequireName() {
|
|
|
4791
4572
|
}
|
|
4792
4573
|
const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
|
|
4793
4574
|
const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
|
|
4794
|
-
async function transformCommonjs(parse$
|
|
4795
|
-
const ast = astCache || tryParse(parse$
|
|
4575
|
+
async function transformCommonjs(parse$15, code, id, isEsModule, ignoreGlobal, ignoreRequire, ignoreDynamicRequires, getIgnoreTryCatchRequireStatementMode, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModules, commonDir, astCache, defaultIsModuleExports, needsRequireWrapper, resolveRequireSourcesAndUpdateMeta, isRequired, checkDynamicRequire, commonjsMeta) {
|
|
4576
|
+
const ast = astCache || tryParse(parse$15, code, id);
|
|
4796
4577
|
const magicString = new MagicString(code);
|
|
4797
4578
|
const uses = {
|
|
4798
4579
|
module: false,
|
|
@@ -5077,7 +4858,7 @@ function ${requireName} () {
|
|
|
5077
4858
|
}
|
|
5078
4859
|
const PLUGIN_NAME = "commonjs";
|
|
5079
4860
|
function commonjs(options$1 = {}) {
|
|
5080
|
-
const { ignoreGlobal, ignoreDynamicRequires, requireReturnsDefault: requireReturnsDefaultOption, defaultIsModuleExports: defaultIsModuleExportsOption, esmExternals } = options$1;
|
|
4861
|
+
const { ignoreGlobal, ignoreDynamicRequires, requireReturnsDefault: requireReturnsDefaultOption, defaultIsModuleExports: defaultIsModuleExportsOption, esmExternals, requireNodeBuiltins = false } = options$1;
|
|
5081
4862
|
const extensions$1 = options$1.extensions || [".js"];
|
|
5082
4863
|
const filter$1 = createFilter$2(options$1.include, options$1.exclude);
|
|
5083
4864
|
const isPossibleCjsId = (id) => {
|
|
@@ -5144,7 +4925,7 @@ function commonjs(options$1 = {}) {
|
|
|
5144
4925
|
const nodeResolve = plugins$1.find(({ name }) => name === "node-resolve");
|
|
5145
4926
|
if (nodeResolve) validateVersion(nodeResolve.version, "^13.0.6", "@rollup/plugin-node-resolve");
|
|
5146
4927
|
if (options$1.namedExports != null) this.warn("The namedExports option from \"@rollup/plugin-commonjs\" is deprecated. Named exports are now handled automatically.");
|
|
5147
|
-
requireResolver = getRequireResolver(extensions$1, detectCyclesAndConditional, currentlyResolving);
|
|
4928
|
+
requireResolver = getRequireResolver(extensions$1, detectCyclesAndConditional, currentlyResolving, requireNodeBuiltins);
|
|
5148
4929
|
},
|
|
5149
4930
|
buildEnd() {
|
|
5150
4931
|
if (options$1.strictRequires === "debug") {
|
|
@@ -5179,6 +4960,7 @@ function commonjs(options$1 = {}) {
|
|
|
5179
4960
|
}
|
|
5180
4961
|
if (isWrappedId(id, EXTERNAL_SUFFIX)) {
|
|
5181
4962
|
const actualId = unwrapId$1(id, EXTERNAL_SUFFIX);
|
|
4963
|
+
if (requireNodeBuiltins === true && actualId.startsWith("node:")) return getExternalBuiltinRequireProxy(actualId);
|
|
5182
4964
|
return getUnknownRequireProxy(actualId, isEsmExternal(actualId) ? getRequireReturnsDefault(actualId) : true);
|
|
5183
4965
|
}
|
|
5184
4966
|
if (id.endsWith(ENTRY_SUFFIX)) {
|
|
@@ -5261,7 +5043,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5261
5043
|
const displaySize = (bytes) => {
|
|
5262
5044
|
return `${numberFormatter.format(bytes / 1e3)} kB`;
|
|
5263
5045
|
};
|
|
5264
|
-
const tty
|
|
5046
|
+
const tty = process.stdout.isTTY && !process.env.CI;
|
|
5265
5047
|
const shouldLogInfo = LogLevels[config$2.logLevel || "info"] >= LogLevels.info;
|
|
5266
5048
|
const modulesReporter = shouldLogInfo ? perEnvironmentState((environment) => {
|
|
5267
5049
|
let hasTransformed = false;
|
|
@@ -5275,7 +5057,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5275
5057
|
},
|
|
5276
5058
|
register(id) {
|
|
5277
5059
|
transformedCount++;
|
|
5278
|
-
if (!tty
|
|
5060
|
+
if (!tty) {
|
|
5279
5061
|
if (!hasTransformed) config$2.logger.info(`transforming...`);
|
|
5280
5062
|
} else {
|
|
5281
5063
|
if (id.includes(`?`)) return;
|
|
@@ -5284,7 +5066,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5284
5066
|
hasTransformed = true;
|
|
5285
5067
|
},
|
|
5286
5068
|
log() {
|
|
5287
|
-
if (tty
|
|
5069
|
+
if (tty) clearLine$1();
|
|
5288
5070
|
environment.logger.info(`${import_picocolors$32.default.green(`✓`)} ${transformedCount} modules transformed.`);
|
|
5289
5071
|
}
|
|
5290
5072
|
};
|
|
@@ -5297,13 +5079,13 @@ function buildReporterPlugin(config$2) {
|
|
|
5297
5079
|
async function getCompressedSize(code) {
|
|
5298
5080
|
if (environment.config.consumer !== "client" || !environment.config.build.reportCompressedSize) return null;
|
|
5299
5081
|
if (shouldLogInfo && !hasCompressChunk) {
|
|
5300
|
-
if (!tty
|
|
5082
|
+
if (!tty) config$2.logger.info("computing gzip size...");
|
|
5301
5083
|
else writeLine("computing gzip size (0)...");
|
|
5302
5084
|
hasCompressChunk = true;
|
|
5303
5085
|
}
|
|
5304
5086
|
const compressed = await compress(typeof code === "string" ? code : Buffer.from(code));
|
|
5305
5087
|
compressedCount++;
|
|
5306
|
-
if (shouldLogInfo && tty
|
|
5088
|
+
if (shouldLogInfo && tty) writeLine(`computing gzip size (${compressedCount})...`);
|
|
5307
5089
|
return compressed.length;
|
|
5308
5090
|
}
|
|
5309
5091
|
return {
|
|
@@ -5314,7 +5096,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5314
5096
|
register() {
|
|
5315
5097
|
chunkCount++;
|
|
5316
5098
|
if (shouldLogInfo) {
|
|
5317
|
-
if (!tty
|
|
5099
|
+
if (!tty) {
|
|
5318
5100
|
if (!hasRenderedChunk) environment.logger.info("rendering chunks...");
|
|
5319
5101
|
} else writeLine(`rendering chunks (${chunkCount})...`);
|
|
5320
5102
|
hasRenderedChunk = true;
|
|
@@ -5345,7 +5127,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5345
5127
|
};
|
|
5346
5128
|
}
|
|
5347
5129
|
}))).filter(isDefined);
|
|
5348
|
-
if (tty
|
|
5130
|
+
if (tty) clearLine$1();
|
|
5349
5131
|
let longest = 0;
|
|
5350
5132
|
let biggestSize = 0;
|
|
5351
5133
|
let biggestMap = 0;
|
|
@@ -5412,7 +5194,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5412
5194
|
chunksReporter(this).register();
|
|
5413
5195
|
},
|
|
5414
5196
|
generateBundle() {
|
|
5415
|
-
if (shouldLogInfo && tty
|
|
5197
|
+
if (shouldLogInfo && tty) clearLine$1();
|
|
5416
5198
|
},
|
|
5417
5199
|
async writeBundle({ dir }, output) {
|
|
5418
5200
|
await chunksReporter(this).log(output, dir);
|
|
@@ -5863,7 +5645,7 @@ const not_found_result = {
|
|
|
5863
5645
|
* @returns {Promise<import('./public.d.ts').TSConfckParseResult>}
|
|
5864
5646
|
* @throws {TSConfckParseError}
|
|
5865
5647
|
*/
|
|
5866
|
-
async function parse$
|
|
5648
|
+
async function parse$13(filename, options$1) {
|
|
5867
5649
|
/** @type {import('./cache.js').TSConfckCache} */
|
|
5868
5650
|
const cache$1 = options$1?.cache;
|
|
5869
5651
|
if (cache$1?.hasParseResult(filename)) return getParsedDeep(filename, cache$1, options$1);
|
|
@@ -6340,9 +6122,9 @@ async function transformWithEsbuild(code, filename, options$1, inMap, config$2,
|
|
|
6340
6122
|
debug$17?.(`esbuild error with options used: `, resolvedOptions);
|
|
6341
6123
|
if (e$1.errors) {
|
|
6342
6124
|
e$1.frame = "";
|
|
6343
|
-
e$1.errors.forEach((m
|
|
6344
|
-
if (m
|
|
6345
|
-
e$1.frame += `\n` + prettifyMessage(m
|
|
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);
|
|
6346
6128
|
});
|
|
6347
6129
|
e$1.loc = e$1.errors[0].location;
|
|
6348
6130
|
}
|
|
@@ -6350,7 +6132,7 @@ async function transformWithEsbuild(code, filename, options$1, inMap, config$2,
|
|
|
6350
6132
|
}
|
|
6351
6133
|
}
|
|
6352
6134
|
function esbuildPlugin(config$2) {
|
|
6353
|
-
const { jsxInject, include, exclude
|
|
6135
|
+
const { jsxInject, include, exclude, ...esbuildTransformOptions } = config$2.esbuild;
|
|
6354
6136
|
const filter$1 = createFilter(include || /\.(m?ts|[jt]sx)$/, exclude || /\.js$/);
|
|
6355
6137
|
const transformOptions = {
|
|
6356
6138
|
target: "esnext",
|
|
@@ -6375,8 +6157,8 @@ function esbuildPlugin(config$2) {
|
|
|
6375
6157
|
async transform(code, id) {
|
|
6376
6158
|
if (filter$1(id) || filter$1(cleanUrl(id))) {
|
|
6377
6159
|
const result = await transformWithEsbuild(code, id, transformOptions, void 0, config$2, server?.watcher);
|
|
6378
|
-
if (result.warnings.length) result.warnings.forEach((m
|
|
6379
|
-
this.warn(prettifyMessage(m
|
|
6160
|
+
if (result.warnings.length) result.warnings.forEach((m) => {
|
|
6161
|
+
this.warn(prettifyMessage(m, code));
|
|
6380
6162
|
});
|
|
6381
6163
|
if (jsxInject && jsxExtensionsRE.test(id)) result.code = jsxInject + ";" + result.code;
|
|
6382
6164
|
return {
|
|
@@ -6396,7 +6178,7 @@ const injectEsbuildHelpers = (esbuildCode, format$3) => {
|
|
|
6396
6178
|
const contentIndex = format$3 === "iife" ? Math.max(esbuildCode.search(IIFE_BEGIN_RE), 0) : format$3 === "umd" ? esbuildCode.indexOf(`(function(`) : 0;
|
|
6397
6179
|
if (contentIndex > 0) {
|
|
6398
6180
|
const esbuildHelpers = esbuildCode.slice(0, contentIndex);
|
|
6399
|
-
return esbuildCode.slice(contentIndex).replace("\"use strict\";", (m
|
|
6181
|
+
return esbuildCode.slice(contentIndex).replace("\"use strict\";", (m) => m + esbuildHelpers);
|
|
6400
6182
|
}
|
|
6401
6183
|
return esbuildCode;
|
|
6402
6184
|
};
|
|
@@ -6471,9 +6253,9 @@ function resolveEsbuildTranspileOptions(config$2, format$3) {
|
|
|
6471
6253
|
treeShaking: true
|
|
6472
6254
|
};
|
|
6473
6255
|
}
|
|
6474
|
-
function prettifyMessage(m
|
|
6475
|
-
let res = import_picocolors$31.default.yellow(m
|
|
6476
|
-
if (m
|
|
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);
|
|
6477
6259
|
return res + `\n`;
|
|
6478
6260
|
}
|
|
6479
6261
|
let globalTSConfckCache;
|
|
@@ -6488,7 +6270,7 @@ function getTSConfckCache(config$2) {
|
|
|
6488
6270
|
return cache$1;
|
|
6489
6271
|
}
|
|
6490
6272
|
async function loadTsconfigJsonForFile(filename, config$2) {
|
|
6491
|
-
const { tsconfig, tsconfigFile } = await parse$
|
|
6273
|
+
const { tsconfig, tsconfigFile } = await parse$13(filename, {
|
|
6492
6274
|
cache: getTSConfckCache(config$2),
|
|
6493
6275
|
ignoreNodeModules: true
|
|
6494
6276
|
});
|
|
@@ -6555,7 +6337,7 @@ var Worker$1 = class {
|
|
|
6555
6337
|
});
|
|
6556
6338
|
}
|
|
6557
6339
|
stop() {
|
|
6558
|
-
this._pool.forEach((w
|
|
6340
|
+
this._pool.forEach((w) => w.unref());
|
|
6559
6341
|
this._queue.forEach(([, reject]) => reject(/* @__PURE__ */ new Error("Main worker pool stopped before a worker was available.")));
|
|
6560
6342
|
this._pool = [];
|
|
6561
6343
|
this._idlePool = [];
|
|
@@ -6856,7 +6638,7 @@ function e(e$1, n$2, r$1) {
|
|
|
6856
6638
|
throw new Error(r$1 ? `No known conditions for "${n$2}" specifier in "${e$1}" package` : `Missing "${n$2}" specifier in "${e$1}" package`);
|
|
6857
6639
|
}
|
|
6858
6640
|
function n(n$2, i$1, o$1, f$1) {
|
|
6859
|
-
let s
|
|
6641
|
+
let s, u, l = r(n$2, o$1), c = function(e$1) {
|
|
6860
6642
|
let n$3 = new Set(["default", ...e$1.conditions || []]);
|
|
6861
6643
|
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;
|
|
6862
6644
|
}(f$1 || {}), a = i$1[l];
|
|
@@ -6865,10 +6647,10 @@ function n(n$2, i$1, o$1, f$1) {
|
|
|
6865
6647
|
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))));
|
|
6866
6648
|
a = i$1[n$3];
|
|
6867
6649
|
}
|
|
6868
|
-
return a || e(n$2, l), s
|
|
6650
|
+
return a || e(n$2, l), s = t(a, c), s || e(n$2, l, 1), u && function(e$1, n$3) {
|
|
6869
6651
|
let r$1, t$1 = 0, i$2 = e$1.length, o$2 = /[*]/g, f$2 = /[/]$/;
|
|
6870
6652
|
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;
|
|
6871
|
-
}(s
|
|
6653
|
+
}(s, u), s;
|
|
6872
6654
|
}
|
|
6873
6655
|
function r(e$1, n$2, r$1) {
|
|
6874
6656
|
if (e$1 === n$2 || "." === n$2) return ".";
|
|
@@ -7303,7 +7085,7 @@ function hasESMSyntax(code, opts = {}) {
|
|
|
7303
7085
|
}
|
|
7304
7086
|
|
|
7305
7087
|
//#endregion
|
|
7306
|
-
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.
|
|
7088
|
+
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.50/node_modules/@rolldown/pluginutils/dist/simple-filters.js
|
|
7307
7089
|
/**
|
|
7308
7090
|
* Constructs a RegExp that matches the exact string specified.
|
|
7309
7091
|
*
|
|
@@ -7364,33 +7146,33 @@ var ImportType;
|
|
|
7364
7146
|
const A = 1 === new Uint8Array(new Uint16Array([1]).buffer)[0];
|
|
7365
7147
|
function parse(E$1, g = "@") {
|
|
7366
7148
|
if (!C) return init.then((() => parse(E$1)));
|
|
7367
|
-
const I = E$1.length + 1, w
|
|
7368
|
-
w
|
|
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));
|
|
7369
7151
|
const K = C.sa(I - 1);
|
|
7370
7152
|
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() });
|
|
7371
7153
|
const o$1 = [], D = [];
|
|
7372
7154
|
for (; C.ri();) {
|
|
7373
|
-
const A$1 = C.is(), Q$1 = C.ie(), B$1 = C.it(), g$1 = C.ai(), I$1 = C.id(), w$
|
|
7155
|
+
const A$1 = C.is(), Q$1 = C.ie(), B$1 = C.it(), g$1 = C.ai(), I$1 = C.id(), w$1 = C.ss(), K$1 = C.se();
|
|
7374
7156
|
let D$1;
|
|
7375
7157
|
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({
|
|
7376
7158
|
n: D$1,
|
|
7377
7159
|
t: B$1,
|
|
7378
7160
|
s: A$1,
|
|
7379
7161
|
e: Q$1,
|
|
7380
|
-
ss: w$
|
|
7162
|
+
ss: w$1,
|
|
7381
7163
|
se: K$1,
|
|
7382
7164
|
d: I$1,
|
|
7383
7165
|
a: g$1
|
|
7384
7166
|
});
|
|
7385
7167
|
}
|
|
7386
7168
|
for (; C.re();) {
|
|
7387
|
-
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$
|
|
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$1 = I$1[0], K$1 = B$1 < 0 ? void 0 : E$1.slice(B$1, g$1), o$2 = K$1 ? K$1[0] : "";
|
|
7388
7170
|
D.push({
|
|
7389
7171
|
s: A$1,
|
|
7390
7172
|
e: Q$1,
|
|
7391
7173
|
ls: B$1,
|
|
7392
7174
|
le: g$1,
|
|
7393
|
-
n: "\"" === w$
|
|
7175
|
+
n: "\"" === w$1 || "'" === w$1 ? k(I$1) : I$1,
|
|
7394
7176
|
ln: "\"" === o$2 || "'" === o$2 ? k(K$1) : K$1
|
|
7395
7177
|
});
|
|
7396
7178
|
}
|
|
@@ -7857,7 +7639,7 @@ var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
|
|
|
7857
7639
|
*
|
|
7858
7640
|
* @return {Promise<Function>} PostCSS Plugin
|
|
7859
7641
|
*/
|
|
7860
|
-
async function load
|
|
7642
|
+
async function load(plugin, options$1, file) {
|
|
7861
7643
|
try {
|
|
7862
7644
|
if (options$1 === null || options$1 === void 0 || Object.keys(options$1).length === 0) return await req$1(plugin, file);
|
|
7863
7645
|
else return (await req$1(plugin, file))(options$1);
|
|
@@ -7882,7 +7664,7 @@ var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
|
|
|
7882
7664
|
list = Object.entries(config$2.plugins).filter(([, options$1]) => {
|
|
7883
7665
|
return options$1 !== false;
|
|
7884
7666
|
}).map(([plugin, options$1]) => {
|
|
7885
|
-
return load
|
|
7667
|
+
return load(plugin, options$1, file);
|
|
7886
7668
|
});
|
|
7887
7669
|
list = await Promise.all(list);
|
|
7888
7670
|
}
|
|
@@ -8151,10 +7933,10 @@ var require_convert_source_map = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
8151
7933
|
return new Converter(base64, { encoding: "base64" });
|
|
8152
7934
|
};
|
|
8153
7935
|
exports.fromComment = function(comment) {
|
|
8154
|
-
var m
|
|
7936
|
+
var m, encoding;
|
|
8155
7937
|
comment = comment.replace(/^\/\*/g, "//").replace(/\*\/$/g, "");
|
|
8156
|
-
m
|
|
8157
|
-
encoding = m
|
|
7938
|
+
m = exports.commentRegex.exec(comment);
|
|
7939
|
+
encoding = m && m[4] || "uri";
|
|
8158
7940
|
return new Converter(comment, {
|
|
8159
7941
|
encoding,
|
|
8160
7942
|
hasComment: true
|
|
@@ -8170,13 +7952,13 @@ var require_convert_source_map = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
8170
7952
|
else return makeConverter(sm);
|
|
8171
7953
|
};
|
|
8172
7954
|
exports.fromSource = function(content) {
|
|
8173
|
-
var m
|
|
8174
|
-
return m
|
|
7955
|
+
var m = content.match(exports.commentRegex);
|
|
7956
|
+
return m ? exports.fromComment(m.pop()) : null;
|
|
8175
7957
|
};
|
|
8176
7958
|
exports.fromMapFileSource = function(content, read) {
|
|
8177
7959
|
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");
|
|
8178
|
-
var m
|
|
8179
|
-
return m
|
|
7960
|
+
var m = content.match(exports.mapFileCommentRegex);
|
|
7961
|
+
return m ? exports.fromMapFileComment(m.pop(), read) : null;
|
|
8180
7962
|
};
|
|
8181
7963
|
exports.removeComments = function(src) {
|
|
8182
7964
|
return src.replace(exports.commentRegex, "");
|
|
@@ -8825,27 +8607,27 @@ function renderAssetUrlInJS(pluginContext, chunk, opts, code) {
|
|
|
8825
8607
|
const { environment } = pluginContext;
|
|
8826
8608
|
const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(opts.format, environment.config.isWorker);
|
|
8827
8609
|
let match;
|
|
8828
|
-
let s
|
|
8610
|
+
let s;
|
|
8829
8611
|
assetUrlRE.lastIndex = 0;
|
|
8830
8612
|
while (match = assetUrlRE.exec(code)) {
|
|
8831
|
-
s
|
|
8613
|
+
s ||= new MagicString(code);
|
|
8832
8614
|
const [full, referenceId, postfix = ""] = match;
|
|
8833
8615
|
const file = pluginContext.getFileName(referenceId);
|
|
8834
8616
|
chunk.viteMetadata.importedAssets.add(cleanUrl(file));
|
|
8835
8617
|
const replacement = toOutputFilePathInJS(environment, file + postfix, "asset", chunk.fileName, "js", toRelativeRuntime);
|
|
8836
8618
|
const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`;
|
|
8837
|
-
s
|
|
8619
|
+
s.update(match.index, match.index + full.length, replacementString);
|
|
8838
8620
|
}
|
|
8839
8621
|
const publicAssetUrlMap = publicAssetUrlCache.get(environment.getTopLevelConfig());
|
|
8840
8622
|
publicAssetUrlRE.lastIndex = 0;
|
|
8841
8623
|
while (match = publicAssetUrlRE.exec(code)) {
|
|
8842
|
-
s
|
|
8624
|
+
s ||= new MagicString(code);
|
|
8843
8625
|
const [full, hash$1] = match;
|
|
8844
8626
|
const replacement = toOutputFilePathInJS(environment, publicAssetUrlMap.get(hash$1).slice(1), "public", chunk.fileName, "js", toRelativeRuntime);
|
|
8845
8627
|
const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`;
|
|
8846
|
-
s
|
|
8628
|
+
s.update(match.index, match.index + full.length, replacementString);
|
|
8847
8629
|
}
|
|
8848
|
-
return s
|
|
8630
|
+
return s;
|
|
8849
8631
|
}
|
|
8850
8632
|
/**
|
|
8851
8633
|
* Also supports loading plain strings with import text from './foo.txt?raw'
|
|
@@ -8886,10 +8668,10 @@ function assetPlugin(config$2) {
|
|
|
8886
8668
|
}
|
|
8887
8669
|
},
|
|
8888
8670
|
renderChunk(code, chunk, opts) {
|
|
8889
|
-
const s
|
|
8890
|
-
if (s
|
|
8891
|
-
code: s
|
|
8892
|
-
map: this.environment.config.build.sourcemap ? s
|
|
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
|
|
8893
8675
|
};
|
|
8894
8676
|
else return null;
|
|
8895
8677
|
},
|
|
@@ -9279,7 +9061,7 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9279
9061
|
return supportsAnsi() ? `\x1b[2m${text}\x1b[0m` : text;
|
|
9280
9062
|
}
|
|
9281
9063
|
const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
|
|
9282
|
-
function parse$
|
|
9064
|
+
function parse$12(src) {
|
|
9283
9065
|
const obj = {};
|
|
9284
9066
|
let lines = src.toString();
|
|
9285
9067
|
lines = lines.replace(/\r\n?/gm, "\n");
|
|
@@ -9383,9 +9165,9 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9383
9165
|
return envPath[0] === "~" ? path$10.join(os$3.homedir(), envPath.slice(1)) : envPath;
|
|
9384
9166
|
}
|
|
9385
9167
|
function _configVault(options$1) {
|
|
9386
|
-
const debug$
|
|
9168
|
+
const debug$18 = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options$1 && options$1.debug);
|
|
9387
9169
|
const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || options$1 && options$1.quiet);
|
|
9388
|
-
if (debug$
|
|
9170
|
+
if (debug$18 || !quiet) _log("Loading env from encrypted .env.vault");
|
|
9389
9171
|
const parsed = DotenvModule._parseVault(options$1);
|
|
9390
9172
|
let processEnv = process.env;
|
|
9391
9173
|
if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv;
|
|
@@ -9397,10 +9179,10 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9397
9179
|
let encoding = "utf8";
|
|
9398
9180
|
let processEnv = process.env;
|
|
9399
9181
|
if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv;
|
|
9400
|
-
let debug$
|
|
9182
|
+
let debug$18 = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || options$1 && options$1.debug);
|
|
9401
9183
|
let quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || options$1 && options$1.quiet);
|
|
9402
9184
|
if (options$1 && options$1.encoding) encoding = options$1.encoding;
|
|
9403
|
-
else if (debug$
|
|
9185
|
+
else if (debug$18) _debug("No encoding is specified. UTF-8 is used by default");
|
|
9404
9186
|
let optionPaths = [dotenvPath];
|
|
9405
9187
|
if (options$1 && options$1.path) if (!Array.isArray(options$1.path)) optionPaths = [_resolveHome(options$1.path)];
|
|
9406
9188
|
else {
|
|
@@ -9413,20 +9195,20 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9413
9195
|
const parsed = DotenvModule.parse(fs$10.readFileSync(path$13, { encoding }));
|
|
9414
9196
|
DotenvModule.populate(parsedAll, parsed, options$1);
|
|
9415
9197
|
} catch (e$1) {
|
|
9416
|
-
if (debug$
|
|
9198
|
+
if (debug$18) _debug(`Failed to load ${path$13} ${e$1.message}`);
|
|
9417
9199
|
lastError = e$1;
|
|
9418
9200
|
}
|
|
9419
9201
|
const populated = DotenvModule.populate(processEnv, parsedAll, options$1);
|
|
9420
|
-
debug$
|
|
9202
|
+
debug$18 = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || debug$18);
|
|
9421
9203
|
quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || quiet);
|
|
9422
|
-
if (debug$
|
|
9204
|
+
if (debug$18 || !quiet) {
|
|
9423
9205
|
const keysCount = Object.keys(populated).length;
|
|
9424
9206
|
const shortPaths = [];
|
|
9425
9207
|
for (const filePath of optionPaths) try {
|
|
9426
9208
|
const relative$3 = path$10.relative(process.cwd(), filePath);
|
|
9427
9209
|
shortPaths.push(relative$3);
|
|
9428
9210
|
} catch (e$1) {
|
|
9429
|
-
if (debug$
|
|
9211
|
+
if (debug$18) _debug(`Failed to load ${filePath} ${e$1.message}`);
|
|
9430
9212
|
lastError = e$1;
|
|
9431
9213
|
}
|
|
9432
9214
|
_log(`injecting env (${keysCount}) from ${shortPaths.join(",")} ${dim(`-- tip: ${_getRandomTip()}`)}`);
|
|
@@ -9472,7 +9254,7 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9472
9254
|
}
|
|
9473
9255
|
}
|
|
9474
9256
|
function populate(processEnv, parsed, options$1 = {}) {
|
|
9475
|
-
const debug$
|
|
9257
|
+
const debug$18 = Boolean(options$1 && options$1.debug);
|
|
9476
9258
|
const override = Boolean(options$1 && options$1.override);
|
|
9477
9259
|
const populated = {};
|
|
9478
9260
|
if (typeof parsed !== "object") {
|
|
@@ -9485,7 +9267,7 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9485
9267
|
processEnv[key] = parsed[key];
|
|
9486
9268
|
populated[key] = parsed[key];
|
|
9487
9269
|
}
|
|
9488
|
-
if (debug$
|
|
9270
|
+
if (debug$18) if (override === true) _debug(`"${key}" is already defined and WAS overwritten`);
|
|
9489
9271
|
else _debug(`"${key}" is already defined and was NOT overwritten`);
|
|
9490
9272
|
} else {
|
|
9491
9273
|
processEnv[key] = parsed[key];
|
|
@@ -9499,7 +9281,7 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9499
9281
|
_parseVault,
|
|
9500
9282
|
config,
|
|
9501
9283
|
decrypt,
|
|
9502
|
-
parse: parse$
|
|
9284
|
+
parse: parse$12,
|
|
9503
9285
|
populate
|
|
9504
9286
|
};
|
|
9505
9287
|
module.exports.configDotenv = DotenvModule.configDotenv;
|
|
@@ -9569,8 +9351,8 @@ var require_main = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv
|
|
|
9569
9351
|
|
|
9570
9352
|
//#endregion
|
|
9571
9353
|
//#region src/node/env.ts
|
|
9572
|
-
var import_main =
|
|
9573
|
-
var import_main$1 =
|
|
9354
|
+
var import_main = require_main$1();
|
|
9355
|
+
var import_main$1 = require_main();
|
|
9574
9356
|
const debug$14 = createDebugger("vite:env");
|
|
9575
9357
|
function getEnvFilesForMode(mode, envDir) {
|
|
9576
9358
|
if (envDir !== false) return [
|
|
@@ -9747,280 +9529,253 @@ function errorMiddleware(server, allowNext = false) {
|
|
|
9747
9529
|
}
|
|
9748
9530
|
|
|
9749
9531
|
//#endregion
|
|
9750
|
-
//#region ../../node_modules/.pnpm/
|
|
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
|
-
|
|
9532
|
+
//#region ../../node_modules/.pnpm/obug@2.1.0/node_modules/obug/dist/core.js
|
|
9533
|
+
function coerce(value$1) {
|
|
9534
|
+
if (value$1 instanceof Error) return value$1.stack || value$1.message;
|
|
9535
|
+
return value$1;
|
|
9536
|
+
}
|
|
9537
|
+
function selectColor(colors$37, namespace) {
|
|
9538
|
+
let hash$1 = 0;
|
|
9539
|
+
for (let i$1 = 0; i$1 < namespace.length; i$1++) {
|
|
9540
|
+
hash$1 = (hash$1 << 5) - hash$1 + namespace.charCodeAt(i$1);
|
|
9541
|
+
hash$1 |= 0;
|
|
9542
|
+
}
|
|
9543
|
+
return colors$37[Math.abs(hash$1) % colors$37.length];
|
|
9544
|
+
}
|
|
9545
|
+
function matchesTemplate(search, template) {
|
|
9546
|
+
let searchIndex = 0;
|
|
9547
|
+
let templateIndex = 0;
|
|
9548
|
+
let starIndex = -1;
|
|
9549
|
+
let matchIndex = 0;
|
|
9550
|
+
while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) if (template[templateIndex] === "*") {
|
|
9551
|
+
starIndex = templateIndex;
|
|
9552
|
+
matchIndex = searchIndex;
|
|
9553
|
+
templateIndex++;
|
|
9554
|
+
} else {
|
|
9555
|
+
searchIndex++;
|
|
9556
|
+
templateIndex++;
|
|
9557
|
+
}
|
|
9558
|
+
else if (starIndex !== -1) {
|
|
9559
|
+
templateIndex = starIndex + 1;
|
|
9560
|
+
matchIndex++;
|
|
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
|
+
});
|
|
9779
9611
|
};
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
case "year":
|
|
9796
|
-
case "yrs":
|
|
9797
|
-
case "yr":
|
|
9798
|
-
case "y": return n$2 * y;
|
|
9799
|
-
case "days":
|
|
9800
|
-
case "day":
|
|
9801
|
-
case "d": return n$2 * d;
|
|
9802
|
-
case "hours":
|
|
9803
|
-
case "hour":
|
|
9804
|
-
case "hrs":
|
|
9805
|
-
case "hr":
|
|
9806
|
-
case "h": return n$2 * h;
|
|
9807
|
-
case "minutes":
|
|
9808
|
-
case "minute":
|
|
9809
|
-
case "mins":
|
|
9810
|
-
case "min":
|
|
9811
|
-
case "m": return n$2 * m;
|
|
9812
|
-
case "seconds":
|
|
9813
|
-
case "second":
|
|
9814
|
-
case "secs":
|
|
9815
|
-
case "sec":
|
|
9816
|
-
case "s": return n$2 * s;
|
|
9817
|
-
case "milliseconds":
|
|
9818
|
-
case "millisecond":
|
|
9819
|
-
case "msecs":
|
|
9820
|
-
case "msec":
|
|
9821
|
-
case "ms": return n$2;
|
|
9822
|
-
default: return;
|
|
9823
|
-
}
|
|
9824
|
-
}
|
|
9825
|
-
/**
|
|
9826
|
-
* Short format for `ms`.
|
|
9827
|
-
*
|
|
9828
|
-
* @param {Number} ms
|
|
9829
|
-
* @return {String}
|
|
9830
|
-
* @api private
|
|
9831
|
-
*/
|
|
9832
|
-
function fmtShort(ms) {
|
|
9833
|
-
if (ms >= d) return Math.round(ms / d) + "d";
|
|
9834
|
-
if (ms >= h) return Math.round(ms / h) + "h";
|
|
9835
|
-
if (ms >= m) return Math.round(ms / m) + "m";
|
|
9836
|
-
if (ms >= s) return Math.round(ms / s) + "s";
|
|
9837
|
-
return ms + "ms";
|
|
9838
|
-
}
|
|
9839
|
-
/**
|
|
9840
|
-
* Long format for `ms`.
|
|
9841
|
-
*
|
|
9842
|
-
* @param {Number} ms
|
|
9843
|
-
* @return {String}
|
|
9844
|
-
* @api private
|
|
9845
|
-
*/
|
|
9846
|
-
function fmtLong(ms) {
|
|
9847
|
-
return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
|
|
9848
|
-
}
|
|
9849
|
-
/**
|
|
9850
|
-
* Pluralization helper.
|
|
9851
|
-
*/
|
|
9852
|
-
function plural(ms, n$2, name) {
|
|
9853
|
-
if (ms < n$2) return;
|
|
9854
|
-
if (ms < n$2 * 1.5) return Math.floor(ms / n$2) + " " + name;
|
|
9855
|
-
return Math.ceil(ms / n$2) + " " + name + "s";
|
|
9856
|
-
}
|
|
9857
|
-
}) });
|
|
9858
|
-
|
|
9859
|
-
//#endregion
|
|
9860
|
-
//#region ../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/debug.js
|
|
9861
|
-
var require_debug$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/debug.js": ((exports, module) => {
|
|
9862
|
-
/**
|
|
9863
|
-
* This is the common logic for both the Node.js and web browser
|
|
9864
|
-
* implementations of `debug()`.
|
|
9865
|
-
*
|
|
9866
|
-
* Expose `debug()` as the module.
|
|
9867
|
-
*/
|
|
9868
|
-
exports = module.exports = createDebug.debug = createDebug["default"] = createDebug;
|
|
9869
|
-
exports.coerce = coerce;
|
|
9870
|
-
exports.disable = disable;
|
|
9871
|
-
exports.enable = enable;
|
|
9872
|
-
exports.enabled = enabled;
|
|
9873
|
-
exports.humanize = require_ms();
|
|
9874
|
-
/**
|
|
9875
|
-
* The currently active debug mode names, and names to skip.
|
|
9876
|
-
*/
|
|
9877
|
-
exports.names = [];
|
|
9878
|
-
exports.skips = [];
|
|
9879
|
-
/**
|
|
9880
|
-
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
9881
|
-
*
|
|
9882
|
-
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
9883
|
-
*/
|
|
9884
|
-
exports.formatters = {};
|
|
9885
|
-
/**
|
|
9886
|
-
* Previous log timestamp.
|
|
9887
|
-
*/
|
|
9888
|
-
var prevTime;
|
|
9889
|
-
/**
|
|
9890
|
-
* Select a color.
|
|
9891
|
-
* @param {String} namespace
|
|
9892
|
-
* @return {Number}
|
|
9893
|
-
* @api private
|
|
9894
|
-
*/
|
|
9895
|
-
function selectColor(namespace) {
|
|
9896
|
-
var hash$1 = 0, i$1;
|
|
9897
|
-
for (i$1 in namespace) {
|
|
9898
|
-
hash$1 = (hash$1 << 5) - hash$1 + namespace.charCodeAt(i$1);
|
|
9899
|
-
hash$1 |= 0;
|
|
9900
|
-
}
|
|
9901
|
-
return exports.colors[Math.abs(hash$1) % exports.colors.length];
|
|
9902
|
-
}
|
|
9903
|
-
/**
|
|
9904
|
-
* Create a debugger with the given `namespace`.
|
|
9905
|
-
*
|
|
9906
|
-
* @param {String} namespace
|
|
9907
|
-
* @return {Function}
|
|
9908
|
-
* @api public
|
|
9909
|
-
*/
|
|
9910
|
-
function createDebug(namespace) {
|
|
9911
|
-
function debug$19() {
|
|
9912
|
-
if (!debug$19.enabled) return;
|
|
9913
|
-
var self$1 = debug$19;
|
|
9914
|
-
var curr = +/* @__PURE__ */ new Date();
|
|
9915
|
-
self$1.diff = curr - (prevTime || curr);
|
|
9916
|
-
self$1.prev = prevTime;
|
|
9917
|
-
self$1.curr = curr;
|
|
9918
|
-
prevTime = curr;
|
|
9919
|
-
var args = new Array(arguments.length);
|
|
9920
|
-
for (var i$1 = 0; i$1 < args.length; i$1++) args[i$1] = arguments[i$1];
|
|
9921
|
-
args[0] = exports.coerce(args[0]);
|
|
9922
|
-
if ("string" !== typeof args[0]) args.unshift("%O");
|
|
9923
|
-
var index = 0;
|
|
9924
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format$3) {
|
|
9925
|
-
if (match === "%%") return match;
|
|
9926
|
-
index++;
|
|
9927
|
-
var formatter = exports.formatters[format$3];
|
|
9928
|
-
if ("function" === typeof formatter) {
|
|
9929
|
-
var val = args[index];
|
|
9930
|
-
match = formatter.call(self$1, val);
|
|
9931
|
-
args.splice(index, 1);
|
|
9932
|
-
index--;
|
|
9933
|
-
}
|
|
9934
|
-
return match;
|
|
9935
|
-
});
|
|
9936
|
-
exports.formatArgs.call(self$1, args);
|
|
9937
|
-
(debug$19.log || exports.log || console.log.bind(console)).apply(self$1, args);
|
|
9938
|
-
}
|
|
9939
|
-
debug$19.namespace = namespace;
|
|
9940
|
-
debug$19.enabled = exports.enabled(namespace);
|
|
9941
|
-
debug$19.useColors = exports.useColors();
|
|
9942
|
-
debug$19.color = selectColor(namespace);
|
|
9943
|
-
if ("function" === typeof exports.init) exports.init(debug$19);
|
|
9944
|
-
return debug$19;
|
|
9945
|
-
}
|
|
9946
|
-
/**
|
|
9947
|
-
* Enables a debug mode by namespaces. This can include modes
|
|
9948
|
-
* separated by a colon and wildcards.
|
|
9949
|
-
*
|
|
9950
|
-
* @param {String} namespaces
|
|
9951
|
-
* @api public
|
|
9952
|
-
*/
|
|
9953
|
-
function enable(namespaces) {
|
|
9954
|
-
exports.save(namespaces);
|
|
9955
|
-
exports.names = [];
|
|
9956
|
-
exports.skips = [];
|
|
9957
|
-
var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
|
|
9958
|
-
var len = split.length;
|
|
9959
|
-
for (var i$1 = 0; i$1 < len; i$1++) {
|
|
9960
|
-
if (!split[i$1]) continue;
|
|
9961
|
-
namespaces = split[i$1].replace(/\*/g, ".*?");
|
|
9962
|
-
if (namespaces[0] === "-") exports.skips.push(/* @__PURE__ */ new RegExp("^" + namespaces.substr(1) + "$"));
|
|
9963
|
-
else exports.names.push(/* @__PURE__ */ new RegExp("^" + namespaces + "$"));
|
|
9612
|
+
Object.assign(debug$18, options$1);
|
|
9613
|
+
debug$18.namespace = namespace;
|
|
9614
|
+
Object.defineProperty(debug$18, "enabled", {
|
|
9615
|
+
enumerable: true,
|
|
9616
|
+
configurable: false,
|
|
9617
|
+
get: () => {
|
|
9618
|
+
if (enableOverride != null) return enableOverride;
|
|
9619
|
+
if (namespacesCache !== globalNamespaces) {
|
|
9620
|
+
namespacesCache = globalNamespaces;
|
|
9621
|
+
enabledCache = enabled(namespace);
|
|
9622
|
+
}
|
|
9623
|
+
return enabledCache;
|
|
9624
|
+
},
|
|
9625
|
+
set: (v) => {
|
|
9626
|
+
enableOverride = v;
|
|
9964
9627
|
}
|
|
9965
|
-
}
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
* @return {Mixed}
|
|
9992
|
-
* @api private
|
|
9993
|
-
*/
|
|
9994
|
-
function coerce(val) {
|
|
9995
|
-
if (val instanceof Error) return val.stack || val.message;
|
|
9996
|
-
return val;
|
|
9997
|
-
}
|
|
9628
|
+
});
|
|
9629
|
+
return debug$18;
|
|
9630
|
+
}
|
|
9631
|
+
function enable(namespaces$1) {
|
|
9632
|
+
globalNamespaces = namespaces$1;
|
|
9633
|
+
names = [];
|
|
9634
|
+
skips = [];
|
|
9635
|
+
const split = globalNamespaces.trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
9636
|
+
for (const ns of split) if (ns[0] === "-") skips.push(ns.slice(1));
|
|
9637
|
+
else names.push(ns);
|
|
9638
|
+
}
|
|
9639
|
+
function disable() {
|
|
9640
|
+
const namespaces$1 = [...names, ...skips.map((namespace) => `-${namespace}`)].join(",");
|
|
9641
|
+
enable("");
|
|
9642
|
+
return namespaces$1;
|
|
9643
|
+
}
|
|
9644
|
+
function enabled(name) {
|
|
9645
|
+
for (const skip of skips) if (matchesTemplate(name, skip)) return false;
|
|
9646
|
+
for (const ns of names) if (matchesTemplate(name, ns)) return true;
|
|
9647
|
+
return false;
|
|
9648
|
+
}
|
|
9649
|
+
var globalNamespaces, names, skips;
|
|
9650
|
+
var init_core = __esm({ "../../node_modules/.pnpm/obug@2.1.0/node_modules/obug/dist/core.js": (() => {
|
|
9651
|
+
globalNamespaces = "";
|
|
9652
|
+
names = [];
|
|
9653
|
+
skips = [];
|
|
9998
9654
|
}) });
|
|
9999
9655
|
|
|
10000
9656
|
//#endregion
|
|
10001
|
-
//#region ../../node_modules/.pnpm/
|
|
10002
|
-
var
|
|
10003
|
-
|
|
10004
|
-
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
9657
|
+
//#region ../../node_modules/.pnpm/obug@2.1.0/node_modules/obug/dist/node.js
|
|
9658
|
+
var node_exports = /* @__PURE__ */ __export({
|
|
9659
|
+
createDebug: () => createDebug$1,
|
|
9660
|
+
disable: () => disable,
|
|
9661
|
+
enable: () => enable$1,
|
|
9662
|
+
enabled: () => enabled,
|
|
9663
|
+
namespaces: () => namespaces
|
|
9664
|
+
});
|
|
9665
|
+
function useColors() {
|
|
9666
|
+
return "colors" in inspectOpts ? Boolean(inspectOpts.colors) : isatty(process.stderr.fd);
|
|
9667
|
+
}
|
|
9668
|
+
function getDate() {
|
|
9669
|
+
if (inspectOpts.hideDate) return "";
|
|
9670
|
+
return `${(/* @__PURE__ */ new Date()).toISOString()} `;
|
|
9671
|
+
}
|
|
9672
|
+
function formatArgs(diff, args) {
|
|
9673
|
+
const { namespace: name, useColors: useColors$1$1 } = this;
|
|
9674
|
+
if (useColors$1$1) {
|
|
9675
|
+
const c = this.color;
|
|
9676
|
+
const colorCode = `\u001B[3${c < 8 ? c : `8;5;${c}`}`;
|
|
9677
|
+
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
|
9678
|
+
args[0] = prefix + args[0].split("\n").join(`\n${prefix}`);
|
|
9679
|
+
args.push(`${colorCode}m+${this.humanize(diff)}\u001B[0m`);
|
|
9680
|
+
} else args[0] = `${getDate()}${name} ${args[0]}`;
|
|
9681
|
+
}
|
|
9682
|
+
function log$2(...args) {
|
|
9683
|
+
process.stderr.write(`${formatWithOptions(this.inspectOpts, ...args)}\n`);
|
|
9684
|
+
}
|
|
9685
|
+
function createDebug$1(namespace, options$1) {
|
|
9686
|
+
var _ref;
|
|
9687
|
+
const color = (_ref = options$1 && options$1.color) !== null && _ref !== void 0 ? _ref : selectColor(colors$28, namespace);
|
|
9688
|
+
return createDebug(namespace, Object.assign(defaultOptions, { color }, options$1));
|
|
9689
|
+
}
|
|
9690
|
+
function save(namespaces$1) {
|
|
9691
|
+
if (namespaces$1) process.env.DEBUG = namespaces$1;
|
|
9692
|
+
else delete process.env.DEBUG;
|
|
9693
|
+
}
|
|
9694
|
+
function enable$1(namespaces$1) {
|
|
9695
|
+
save(namespaces$1);
|
|
9696
|
+
enable(namespaces$1);
|
|
9697
|
+
}
|
|
9698
|
+
var colors$28, inspectOpts, defaultOptions;
|
|
9699
|
+
var init_node = __esm({ "../../node_modules/.pnpm/obug@2.1.0/node_modules/obug/dist/node.js": (() => {
|
|
9700
|
+
init_core();
|
|
9701
|
+
colors$28 = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2 ? [
|
|
9702
|
+
20,
|
|
9703
|
+
21,
|
|
9704
|
+
26,
|
|
9705
|
+
27,
|
|
9706
|
+
32,
|
|
9707
|
+
33,
|
|
9708
|
+
38,
|
|
9709
|
+
39,
|
|
9710
|
+
40,
|
|
9711
|
+
41,
|
|
9712
|
+
42,
|
|
9713
|
+
43,
|
|
9714
|
+
44,
|
|
9715
|
+
45,
|
|
9716
|
+
56,
|
|
9717
|
+
57,
|
|
9718
|
+
62,
|
|
9719
|
+
63,
|
|
9720
|
+
68,
|
|
9721
|
+
69,
|
|
9722
|
+
74,
|
|
9723
|
+
75,
|
|
9724
|
+
76,
|
|
9725
|
+
77,
|
|
9726
|
+
78,
|
|
9727
|
+
79,
|
|
9728
|
+
80,
|
|
9729
|
+
81,
|
|
9730
|
+
92,
|
|
9731
|
+
93,
|
|
9732
|
+
98,
|
|
9733
|
+
99,
|
|
9734
|
+
112,
|
|
9735
|
+
113,
|
|
9736
|
+
128,
|
|
9737
|
+
129,
|
|
9738
|
+
134,
|
|
9739
|
+
135,
|
|
9740
|
+
148,
|
|
9741
|
+
149,
|
|
9742
|
+
160,
|
|
9743
|
+
161,
|
|
9744
|
+
162,
|
|
9745
|
+
163,
|
|
9746
|
+
164,
|
|
9747
|
+
165,
|
|
9748
|
+
166,
|
|
9749
|
+
167,
|
|
9750
|
+
168,
|
|
9751
|
+
169,
|
|
9752
|
+
170,
|
|
9753
|
+
171,
|
|
9754
|
+
172,
|
|
9755
|
+
173,
|
|
9756
|
+
178,
|
|
9757
|
+
179,
|
|
9758
|
+
184,
|
|
9759
|
+
185,
|
|
9760
|
+
196,
|
|
9761
|
+
197,
|
|
9762
|
+
198,
|
|
9763
|
+
199,
|
|
9764
|
+
200,
|
|
9765
|
+
201,
|
|
9766
|
+
202,
|
|
9767
|
+
203,
|
|
9768
|
+
204,
|
|
9769
|
+
205,
|
|
9770
|
+
206,
|
|
9771
|
+
207,
|
|
9772
|
+
208,
|
|
9773
|
+
209,
|
|
9774
|
+
214,
|
|
9775
|
+
215,
|
|
9776
|
+
220,
|
|
9777
|
+
221
|
|
9778
|
+
] : [
|
|
10024
9779
|
6,
|
|
10025
9780
|
2,
|
|
10026
9781
|
3,
|
|
@@ -10028,146 +9783,34 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@
|
|
|
10028
9783
|
5,
|
|
10029
9784
|
1
|
|
10030
9785
|
];
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
|
|
10040
|
-
return k.toUpperCase();
|
|
10041
|
-
});
|
|
10042
|
-
var val = process.env[key];
|
|
10043
|
-
if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
|
|
10044
|
-
else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
|
|
10045
|
-
else if (val === "null") val = null;
|
|
10046
|
-
else val = Number(val);
|
|
10047
|
-
obj[prop] = val;
|
|
9786
|
+
inspectOpts = Object.keys(process.env).filter((key) => /^debug_/i.test(key)).reduce((obj, key) => {
|
|
9787
|
+
const prop = key.slice(6).toLowerCase().replace(/_([a-z])/g, (_, k) => k.toUpperCase());
|
|
9788
|
+
let value$1 = process.env[key];
|
|
9789
|
+
if (value$1 === "null") value$1 = null;
|
|
9790
|
+
else if (/^yes|on|true|enabled$/i.test(value$1)) value$1 = true;
|
|
9791
|
+
else if (/^no|off|false|disabled$/i.test(value$1)) value$1 = false;
|
|
9792
|
+
else value$1 = Number(value$1);
|
|
9793
|
+
obj[prop] = value$1;
|
|
10048
9794
|
return obj;
|
|
10049
9795
|
}, {});
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
* Map %o to `util.inspect()`, all on a single line.
|
|
10067
|
-
*/
|
|
10068
|
-
exports.formatters.o = function(v) {
|
|
10069
|
-
this.inspectOpts.colors = this.useColors;
|
|
10070
|
-
return util$1.inspect(v, this.inspectOpts).split("\n").map(function(str) {
|
|
10071
|
-
return str.trim();
|
|
10072
|
-
}).join(" ");
|
|
10073
|
-
};
|
|
10074
|
-
/**
|
|
10075
|
-
* Map %o to `util.inspect()`, allowing multiple lines if needed.
|
|
10076
|
-
*/
|
|
10077
|
-
exports.formatters.O = function(v) {
|
|
10078
|
-
this.inspectOpts.colors = this.useColors;
|
|
10079
|
-
return util$1.inspect(v, this.inspectOpts);
|
|
9796
|
+
defaultOptions = {
|
|
9797
|
+
useColors: useColors(),
|
|
9798
|
+
formatArgs,
|
|
9799
|
+
formatters: {
|
|
9800
|
+
o(v) {
|
|
9801
|
+
this.inspectOpts.colors = this.useColors;
|
|
9802
|
+
return inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
9803
|
+
},
|
|
9804
|
+
O(v) {
|
|
9805
|
+
this.inspectOpts.colors = this.useColors;
|
|
9806
|
+
return inspect(v, this.inspectOpts);
|
|
9807
|
+
}
|
|
9808
|
+
},
|
|
9809
|
+
inspectOpts,
|
|
9810
|
+
log: log$2,
|
|
9811
|
+
humanize
|
|
10080
9812
|
};
|
|
10081
|
-
|
|
10082
|
-
* Adds ANSI color escape codes if enabled.
|
|
10083
|
-
*
|
|
10084
|
-
* @api public
|
|
10085
|
-
*/
|
|
10086
|
-
function formatArgs(args) {
|
|
10087
|
-
var name = this.namespace;
|
|
10088
|
-
if (this.useColors) {
|
|
10089
|
-
var c = this.color;
|
|
10090
|
-
var prefix = " \x1B[3" + c + ";1m" + name + " \x1B[0m";
|
|
10091
|
-
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
10092
|
-
args.push("\x1B[3" + c + "m+" + exports.humanize(this.diff) + "\x1B[0m");
|
|
10093
|
-
} else args[0] = (/* @__PURE__ */ new Date()).toUTCString() + " " + name + " " + args[0];
|
|
10094
|
-
}
|
|
10095
|
-
/**
|
|
10096
|
-
* Invokes `util.format()` with the specified arguments and writes to `stream`.
|
|
10097
|
-
*/
|
|
10098
|
-
function log$2() {
|
|
10099
|
-
return stream$2.write(util$1.format.apply(util$1, arguments) + "\n");
|
|
10100
|
-
}
|
|
10101
|
-
/**
|
|
10102
|
-
* Save `namespaces`.
|
|
10103
|
-
*
|
|
10104
|
-
* @param {String} namespaces
|
|
10105
|
-
* @api private
|
|
10106
|
-
*/
|
|
10107
|
-
function save(namespaces) {
|
|
10108
|
-
if (null == namespaces) delete process.env.DEBUG;
|
|
10109
|
-
else process.env.DEBUG = namespaces;
|
|
10110
|
-
}
|
|
10111
|
-
/**
|
|
10112
|
-
* Load `namespaces`.
|
|
10113
|
-
*
|
|
10114
|
-
* @return {String} returns the previously persisted debug modes
|
|
10115
|
-
* @api private
|
|
10116
|
-
*/
|
|
10117
|
-
function load() {
|
|
10118
|
-
return process.env.DEBUG;
|
|
10119
|
-
}
|
|
10120
|
-
/**
|
|
10121
|
-
* Copied from `node/src/node.js`.
|
|
10122
|
-
*
|
|
10123
|
-
* XXX: It's lame that node doesn't expose this API out-of-the-box. It also
|
|
10124
|
-
* relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
|
|
10125
|
-
*/
|
|
10126
|
-
function createWritableStdioStream(fd$1) {
|
|
10127
|
-
var stream$3;
|
|
10128
|
-
switch (process.binding("tty_wrap").guessHandleType(fd$1)) {
|
|
10129
|
-
case "TTY":
|
|
10130
|
-
stream$3 = new tty.WriteStream(fd$1);
|
|
10131
|
-
stream$3._type = "tty";
|
|
10132
|
-
if (stream$3._handle && stream$3._handle.unref) stream$3._handle.unref();
|
|
10133
|
-
break;
|
|
10134
|
-
case "FILE":
|
|
10135
|
-
stream$3 = new (__require("fs")).SyncWriteStream(fd$1, { autoClose: false });
|
|
10136
|
-
stream$3._type = "fs";
|
|
10137
|
-
break;
|
|
10138
|
-
case "PIPE":
|
|
10139
|
-
case "TCP":
|
|
10140
|
-
stream$3 = new (__require("net")).Socket({
|
|
10141
|
-
fd: fd$1,
|
|
10142
|
-
readable: false,
|
|
10143
|
-
writable: true
|
|
10144
|
-
});
|
|
10145
|
-
stream$3.readable = false;
|
|
10146
|
-
stream$3.read = null;
|
|
10147
|
-
stream$3._type = "pipe";
|
|
10148
|
-
if (stream$3._handle && stream$3._handle.unref) stream$3._handle.unref();
|
|
10149
|
-
break;
|
|
10150
|
-
default: throw new Error("Implement me. Unknown stream file type!");
|
|
10151
|
-
}
|
|
10152
|
-
stream$3.fd = fd$1;
|
|
10153
|
-
stream$3._isStdio = true;
|
|
10154
|
-
return stream$3;
|
|
10155
|
-
}
|
|
10156
|
-
/**
|
|
10157
|
-
* Init logic for `debug` instances.
|
|
10158
|
-
*
|
|
10159
|
-
* Create a new `inspectOpts` object in case `useColors` is set
|
|
10160
|
-
* differently for a particular `debug` instance.
|
|
10161
|
-
*/
|
|
10162
|
-
function init$1(debug$19) {
|
|
10163
|
-
debug$19.inspectOpts = {};
|
|
10164
|
-
var keys = Object.keys(exports.inspectOpts);
|
|
10165
|
-
for (var i$1 = 0; i$1 < keys.length; i$1++) debug$19.inspectOpts[keys[i$1]] = exports.inspectOpts[keys[i$1]];
|
|
10166
|
-
}
|
|
10167
|
-
/**
|
|
10168
|
-
* Enable namespaces listed in `process.env.DEBUG` initially.
|
|
10169
|
-
*/
|
|
10170
|
-
exports.enable(load());
|
|
9813
|
+
enable(process.env.DEBUG || "");
|
|
10171
9814
|
}) });
|
|
10172
9815
|
|
|
10173
9816
|
//#endregion
|
|
@@ -10779,8 +10422,8 @@ var require_unpipe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/unpi
|
|
|
10779
10422
|
* Determine if there are Node.js pipe-like data listeners.
|
|
10780
10423
|
* @private
|
|
10781
10424
|
*/
|
|
10782
|
-
function hasPipeDataListeners(stream$
|
|
10783
|
-
var listeners = stream$
|
|
10425
|
+
function hasPipeDataListeners(stream$2) {
|
|
10426
|
+
var listeners = stream$2.listeners("data");
|
|
10784
10427
|
for (var i$1 = 0; i$1 < listeners.length; i$1++) if (listeners[i$1].name === "ondata") return true;
|
|
10785
10428
|
return false;
|
|
10786
10429
|
}
|
|
@@ -10790,19 +10433,19 @@ var require_unpipe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/unpi
|
|
|
10790
10433
|
* @param {object} stream
|
|
10791
10434
|
* @public
|
|
10792
10435
|
*/
|
|
10793
|
-
function unpipe$1(stream$
|
|
10794
|
-
if (!stream$
|
|
10795
|
-
if (typeof stream$
|
|
10796
|
-
stream$
|
|
10436
|
+
function unpipe$1(stream$2) {
|
|
10437
|
+
if (!stream$2) throw new TypeError("argument stream is required");
|
|
10438
|
+
if (typeof stream$2.unpipe === "function") {
|
|
10439
|
+
stream$2.unpipe();
|
|
10797
10440
|
return;
|
|
10798
10441
|
}
|
|
10799
|
-
if (!hasPipeDataListeners(stream$
|
|
10442
|
+
if (!hasPipeDataListeners(stream$2)) return;
|
|
10800
10443
|
var listener$1;
|
|
10801
|
-
var listeners = stream$
|
|
10444
|
+
var listeners = stream$2.listeners("close");
|
|
10802
10445
|
for (var i$1 = 0; i$1 < listeners.length; i$1++) {
|
|
10803
10446
|
listener$1 = listeners[i$1];
|
|
10804
10447
|
if (listener$1.name !== "cleanup" && listener$1.name !== "onclose") continue;
|
|
10805
|
-
listener$1.call(stream$
|
|
10448
|
+
listener$1.call(stream$2);
|
|
10806
10449
|
}
|
|
10807
10450
|
}
|
|
10808
10451
|
}) });
|
|
@@ -10819,7 +10462,7 @@ var require_finalhandler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
10819
10462
|
* Module dependencies.
|
|
10820
10463
|
* @private
|
|
10821
10464
|
*/
|
|
10822
|
-
var debug$13 =
|
|
10465
|
+
var debug$13 = (init_node(), __toCommonJS(node_exports))("finalhandler");
|
|
10823
10466
|
var encodeUrl = require_encodeurl();
|
|
10824
10467
|
var escapeHtml$2 = require_escape_html();
|
|
10825
10468
|
var onFinished = require_on_finished();
|
|
@@ -11063,7 +10706,7 @@ var require_connect = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/con
|
|
|
11063
10706
|
* Module dependencies.
|
|
11064
10707
|
* @private
|
|
11065
10708
|
*/
|
|
11066
|
-
var debug$12 =
|
|
10709
|
+
var debug$12 = (init_node(), __toCommonJS(node_exports))("connect:dispatcher");
|
|
11067
10710
|
var EventEmitter$4 = __require("events").EventEmitter;
|
|
11068
10711
|
var finalhandler = require_finalhandler();
|
|
11069
10712
|
var http$6 = __require("http");
|
|
@@ -11300,8 +10943,8 @@ var require_object_assign = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
|
11300
10943
|
var from;
|
|
11301
10944
|
var to = toObject(target);
|
|
11302
10945
|
var symbols;
|
|
11303
|
-
for (var s
|
|
11304
|
-
from = Object(arguments[s
|
|
10946
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
10947
|
+
from = Object(arguments[s]);
|
|
11305
10948
|
for (var key in from) if (hasOwnProperty.call(from, key)) to[key] = from[key];
|
|
11306
10949
|
if (getOwnPropertySymbols) {
|
|
11307
10950
|
symbols = getOwnPropertySymbols(from);
|
|
@@ -11406,6 +11049,7 @@ var require_vary = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/vary@1
|
|
|
11406
11049
|
//#region ../../node_modules/.pnpm/cors@2.8.5/node_modules/cors/lib/index.js
|
|
11407
11050
|
var require_lib$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cors@2.8.5/node_modules/cors/lib/index.js": ((exports, module) => {
|
|
11408
11051
|
(function() {
|
|
11052
|
+
"use strict";
|
|
11409
11053
|
var assign = require_object_assign();
|
|
11410
11054
|
var vary$1 = require_vary();
|
|
11411
11055
|
var defaults = {
|
|
@@ -11414,8 +11058,8 @@ var require_lib$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cors@
|
|
|
11414
11058
|
preflightContinue: false,
|
|
11415
11059
|
optionsSuccessStatus: 204
|
|
11416
11060
|
};
|
|
11417
|
-
function isString$1(s
|
|
11418
|
-
return typeof s
|
|
11061
|
+
function isString$1(s) {
|
|
11062
|
+
return typeof s === "string" || s instanceof String;
|
|
11419
11063
|
}
|
|
11420
11064
|
function isOriginAllowed(origin, allowedOrigin) {
|
|
11421
11065
|
if (Array.isArray(allowedOrigin)) {
|
|
@@ -13819,13 +13463,13 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
13819
13463
|
}
|
|
13820
13464
|
const previous = this.fsw._getWatchedDir(wh.path);
|
|
13821
13465
|
const current = /* @__PURE__ */ new Set();
|
|
13822
|
-
let stream$
|
|
13466
|
+
let stream$2 = this.fsw._readdirp(directory, {
|
|
13823
13467
|
fileFilter: (entry) => wh.filterPath(entry),
|
|
13824
13468
|
directoryFilter: (entry) => wh.filterDir(entry),
|
|
13825
13469
|
depth: 0
|
|
13826
13470
|
}).on(STR_DATA$1, async (entry) => {
|
|
13827
13471
|
if (this.fsw.closed) {
|
|
13828
|
-
stream$
|
|
13472
|
+
stream$2 = void 0;
|
|
13829
13473
|
return;
|
|
13830
13474
|
}
|
|
13831
13475
|
const item = entry.path;
|
|
@@ -13833,7 +13477,7 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
13833
13477
|
current.add(item);
|
|
13834
13478
|
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path$13, item)) return;
|
|
13835
13479
|
if (this.fsw.closed) {
|
|
13836
|
-
stream$
|
|
13480
|
+
stream$2 = void 0;
|
|
13837
13481
|
return;
|
|
13838
13482
|
}
|
|
13839
13483
|
if (item === target || !target && !previous.has(item)) {
|
|
@@ -13842,9 +13486,9 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
13842
13486
|
this._addToNodeFs(path$13, initialAdd, wh, depth + 1);
|
|
13843
13487
|
}
|
|
13844
13488
|
}).on(EV_ERROR$2, this._boundHandleError);
|
|
13845
|
-
return new Promise((resolve$4) => stream$
|
|
13489
|
+
return new Promise((resolve$4) => stream$2.once(STR_END$2, () => {
|
|
13846
13490
|
if (this.fsw.closed) {
|
|
13847
|
-
stream$
|
|
13491
|
+
stream$2 = void 0;
|
|
13848
13492
|
return;
|
|
13849
13493
|
}
|
|
13850
13494
|
const wasThrottled = throttler ? throttler.clear() : false;
|
|
@@ -13854,7 +13498,7 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
13854
13498
|
}).forEach((item) => {
|
|
13855
13499
|
this.fsw._remove(directory, item);
|
|
13856
13500
|
});
|
|
13857
|
-
stream$
|
|
13501
|
+
stream$2 = void 0;
|
|
13858
13502
|
if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler);
|
|
13859
13503
|
}));
|
|
13860
13504
|
}
|
|
@@ -14628,7 +14272,7 @@ var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ch
|
|
|
14628
14272
|
const promise = closer();
|
|
14629
14273
|
if (promise instanceof Promise) closers.push(promise);
|
|
14630
14274
|
}));
|
|
14631
|
-
this._streams.forEach((stream$
|
|
14275
|
+
this._streams.forEach((stream$2) => stream$2.destroy());
|
|
14632
14276
|
this._userIgnored = void 0;
|
|
14633
14277
|
this._readyCount = 0;
|
|
14634
14278
|
this._readyEmitted = false;
|
|
@@ -14943,23 +14587,23 @@ var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ch
|
|
|
14943
14587
|
}
|
|
14944
14588
|
_readdirp(root, opts) {
|
|
14945
14589
|
if (this.closed) return;
|
|
14946
|
-
let stream$
|
|
14590
|
+
let stream$2 = readdirp(root, {
|
|
14947
14591
|
type: EV_ALL,
|
|
14948
14592
|
alwaysStat: true,
|
|
14949
14593
|
lstat: true,
|
|
14950
14594
|
...opts
|
|
14951
14595
|
});
|
|
14952
|
-
this._streams.add(stream$
|
|
14953
|
-
stream$
|
|
14954
|
-
stream$
|
|
14596
|
+
this._streams.add(stream$2);
|
|
14597
|
+
stream$2.once(STR_CLOSE, () => {
|
|
14598
|
+
stream$2 = void 0;
|
|
14955
14599
|
});
|
|
14956
|
-
stream$
|
|
14957
|
-
if (stream$
|
|
14958
|
-
this._streams.delete(stream$
|
|
14959
|
-
stream$
|
|
14600
|
+
stream$2.once(STR_END, () => {
|
|
14601
|
+
if (stream$2) {
|
|
14602
|
+
this._streams.delete(stream$2);
|
|
14603
|
+
stream$2 = void 0;
|
|
14960
14604
|
}
|
|
14961
14605
|
});
|
|
14962
|
-
return stream$
|
|
14606
|
+
return stream$2;
|
|
14963
14607
|
}
|
|
14964
14608
|
};
|
|
14965
14609
|
/**
|
|
@@ -14980,12 +14624,12 @@ var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ch
|
|
|
14980
14624
|
//#region ../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/quote.js
|
|
14981
14625
|
var require_quote = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/quote.js": ((exports, module) => {
|
|
14982
14626
|
module.exports = function quote(xs) {
|
|
14983
|
-
return xs.map(function(s
|
|
14984
|
-
if (s
|
|
14985
|
-
if (s
|
|
14986
|
-
if (/["\s\\]/.test(s
|
|
14987
|
-
if (/["'\s]/.test(s
|
|
14988
|
-
return String(s
|
|
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");
|
|
14989
14633
|
}).join(" ");
|
|
14990
14634
|
};
|
|
14991
14635
|
}) });
|
|
@@ -15017,11 +14661,11 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
15017
14661
|
var mult = 4294967296;
|
|
15018
14662
|
for (var i = 0; i < 4; i++) TOKEN += (mult * Math.random()).toString(16);
|
|
15019
14663
|
var startsWithToken = /* @__PURE__ */ new RegExp("^" + TOKEN);
|
|
15020
|
-
function matchAll(s
|
|
14664
|
+
function matchAll(s, r$1) {
|
|
15021
14665
|
var origIndex = r$1.lastIndex;
|
|
15022
14666
|
var matches$2 = [];
|
|
15023
14667
|
var matchObj;
|
|
15024
|
-
while (matchObj = r$1.exec(s
|
|
14668
|
+
while (matchObj = r$1.exec(s)) {
|
|
15025
14669
|
matches$2.push(matchObj);
|
|
15026
14670
|
if (r$1.lastIndex === matchObj.index) r$1.lastIndex += 1;
|
|
15027
14671
|
}
|
|
@@ -15044,9 +14688,9 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
15044
14688
|
if (!env$1) env$1 = {};
|
|
15045
14689
|
var commented = false;
|
|
15046
14690
|
return matches$2.map(function(match) {
|
|
15047
|
-
var s
|
|
15048
|
-
if (!s
|
|
15049
|
-
if (controlRE.test(s
|
|
14691
|
+
var s = match[0];
|
|
14692
|
+
if (!s || commented) return;
|
|
14693
|
+
if (controlRE.test(s)) return { op: s };
|
|
15050
14694
|
var quote = false;
|
|
15051
14695
|
var esc = false;
|
|
15052
14696
|
var out = "";
|
|
@@ -15056,23 +14700,23 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
15056
14700
|
i$1 += 1;
|
|
15057
14701
|
var varend;
|
|
15058
14702
|
var varname;
|
|
15059
|
-
var char = s
|
|
14703
|
+
var char = s.charAt(i$1);
|
|
15060
14704
|
if (char === "{") {
|
|
15061
14705
|
i$1 += 1;
|
|
15062
|
-
if (s
|
|
15063
|
-
varend = s
|
|
15064
|
-
if (varend < 0) throw new Error("Bad substitution: " + s
|
|
15065
|
-
varname = s
|
|
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);
|
|
15066
14710
|
i$1 = varend;
|
|
15067
14711
|
} else if (/[*@#?$!_-]/.test(char)) {
|
|
15068
14712
|
varname = char;
|
|
15069
14713
|
i$1 += 1;
|
|
15070
14714
|
} else {
|
|
15071
|
-
var slicedFromI = s
|
|
14715
|
+
var slicedFromI = s.slice(i$1);
|
|
15072
14716
|
varend = slicedFromI.match(/[^\w\d_]/);
|
|
15073
14717
|
if (!varend) {
|
|
15074
14718
|
varname = slicedFromI;
|
|
15075
|
-
i$1 = s
|
|
14719
|
+
i$1 = s.length;
|
|
15076
14720
|
} else {
|
|
15077
14721
|
varname = slicedFromI.slice(0, varend.index);
|
|
15078
14722
|
i$1 += varend.index - 1;
|
|
@@ -15080,8 +14724,8 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
15080
14724
|
}
|
|
15081
14725
|
return getVar(env$1, "", varname);
|
|
15082
14726
|
}
|
|
15083
|
-
for (i$1 = 0; i$1 < s
|
|
15084
|
-
var c = s
|
|
14727
|
+
for (i$1 = 0; i$1 < s.length; i$1++) {
|
|
14728
|
+
var c = s.charAt(i$1);
|
|
15085
14729
|
isGlob$2 = isGlob$2 || !quote && (c === "*" || c === "?");
|
|
15086
14730
|
if (esc) {
|
|
15087
14731
|
out += c;
|
|
@@ -15090,13 +14734,13 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
15090
14734
|
else if (quote == SQ) out += c;
|
|
15091
14735
|
else if (c === BS) {
|
|
15092
14736
|
i$1 += 1;
|
|
15093
|
-
c = s
|
|
14737
|
+
c = s.charAt(i$1);
|
|
15094
14738
|
if (c === DQ || c === BS || c === DS) out += c;
|
|
15095
14739
|
else out += BS + c;
|
|
15096
14740
|
} else if (c === DS) out += parseEnvVar();
|
|
15097
14741
|
else out += c;
|
|
15098
14742
|
else if (c === DQ || c === SQ) quote = c;
|
|
15099
|
-
else if (controlRE.test(c)) return { op: s
|
|
14743
|
+
else if (controlRE.test(c)) return { op: s };
|
|
15100
14744
|
else if (hash.test(c)) {
|
|
15101
14745
|
commented = true;
|
|
15102
14746
|
var commentObj = { comment: string.slice(match.index + i$1 + 1) };
|
|
@@ -15115,12 +14759,12 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
15115
14759
|
return typeof arg === "undefined" ? prev : prev.concat(arg);
|
|
15116
14760
|
}, []);
|
|
15117
14761
|
}
|
|
15118
|
-
module.exports = function parse$
|
|
15119
|
-
var mapped = parseInternal(s
|
|
14762
|
+
module.exports = function parse$15(s, env$1, opts) {
|
|
14763
|
+
var mapped = parseInternal(s, env$1, opts);
|
|
15120
14764
|
if (typeof env$1 !== "function") return mapped;
|
|
15121
|
-
return mapped.reduce(function(acc, s$
|
|
15122
|
-
if (typeof s$
|
|
15123
|
-
var xs = s$
|
|
14765
|
+
return mapped.reduce(function(acc, s$1) {
|
|
14766
|
+
if (typeof s$1 === "object") return acc.concat(s$1);
|
|
14767
|
+
var xs = s$1.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
|
|
15124
14768
|
if (xs.length === 1) return acc.concat(xs[0]);
|
|
15125
14769
|
return acc.concat(xs.filter(Boolean).map(function(x) {
|
|
15126
14770
|
if (startsWithToken.test(x)) return JSON.parse(x.split(TOKEN)[1]);
|
|
@@ -15138,8 +14782,8 @@ var require_shell_quote = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
15138
14782
|
}) });
|
|
15139
14783
|
|
|
15140
14784
|
//#endregion
|
|
15141
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
15142
|
-
var require_macos = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.
|
|
14785
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/editor-info/macos.js
|
|
14786
|
+
var require_macos = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/editor-info/macos.js": ((exports, module) => {
|
|
15143
14787
|
module.exports = {
|
|
15144
14788
|
"/Applications/Atom.app/Contents/MacOS/Atom": "atom",
|
|
15145
14789
|
"/Applications/Atom Beta.app/Contents/MacOS/Atom Beta": "/Applications/Atom Beta.app/Contents/MacOS/Atom Beta",
|
|
@@ -15171,8 +14815,8 @@ var require_macos = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launc
|
|
|
15171
14815
|
}) });
|
|
15172
14816
|
|
|
15173
14817
|
//#endregion
|
|
15174
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
15175
|
-
var require_linux = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.
|
|
14818
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/editor-info/linux.js
|
|
14819
|
+
var require_linux = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/editor-info/linux.js": ((exports, module) => {
|
|
15176
14820
|
module.exports = {
|
|
15177
14821
|
atom: "atom",
|
|
15178
14822
|
Brackets: "brackets",
|
|
@@ -15180,6 +14824,7 @@ var require_linux = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launc
|
|
|
15180
14824
|
code: "code",
|
|
15181
14825
|
vscodium: "vscodium",
|
|
15182
14826
|
codium: "codium",
|
|
14827
|
+
cursor: "cursor",
|
|
15183
14828
|
trae: "trae",
|
|
15184
14829
|
emacs: "emacs",
|
|
15185
14830
|
gvim: "gvim",
|
|
@@ -15204,8 +14849,8 @@ var require_linux = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launc
|
|
|
15204
14849
|
}) });
|
|
15205
14850
|
|
|
15206
14851
|
//#endregion
|
|
15207
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
15208
|
-
var require_windows$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.
|
|
14852
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/editor-info/windows.js
|
|
14853
|
+
var require_windows$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/editor-info/windows.js": ((exports, module) => {
|
|
15209
14854
|
module.exports = [
|
|
15210
14855
|
"Brackets.exe",
|
|
15211
14856
|
"Code.exe",
|
|
@@ -15236,8 +14881,8 @@ var require_windows$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/l
|
|
|
15236
14881
|
}) });
|
|
15237
14882
|
|
|
15238
14883
|
//#endregion
|
|
15239
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
15240
|
-
var require_guess = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.
|
|
14884
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/guess.js
|
|
14885
|
+
var require_guess = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/guess.js": ((exports, module) => {
|
|
15241
14886
|
const path$8 = __require("path");
|
|
15242
14887
|
const shellQuote = require_shell_quote();
|
|
15243
14888
|
const childProcess$2 = __require("child_process");
|
|
@@ -15298,8 +14943,8 @@ var require_guess = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launc
|
|
|
15298
14943
|
}) });
|
|
15299
14944
|
|
|
15300
14945
|
//#endregion
|
|
15301
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
15302
|
-
var require_get_args = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.
|
|
14946
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/get-args.js
|
|
14947
|
+
var require_get_args = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/get-args.js": ((exports, module) => {
|
|
15303
14948
|
const path$7 = __require("path");
|
|
15304
14949
|
module.exports = function getArgumentsForPosition$1(editor, fileName, lineNumber, columnNumber = 1) {
|
|
15305
14950
|
switch (path$7.basename(editor).replace(/\.(exe|cmd|bat)$/i, "")) {
|
|
@@ -15377,8 +15022,8 @@ var require_get_args = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/la
|
|
|
15377
15022
|
}) });
|
|
15378
15023
|
|
|
15379
15024
|
//#endregion
|
|
15380
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
15381
|
-
var require_launch_editor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.
|
|
15025
|
+
//#region ../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/index.js
|
|
15026
|
+
var require_launch_editor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.12.0/node_modules/launch-editor/index.js": ((exports, module) => {
|
|
15382
15027
|
/**
|
|
15383
15028
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
15384
15029
|
*
|
|
@@ -15477,8 +15122,8 @@ var require_launch_editor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
|
15477
15122
|
}) });
|
|
15478
15123
|
|
|
15479
15124
|
//#endregion
|
|
15480
|
-
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.
|
|
15481
|
-
var require_launch_editor_middleware = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor-middleware@2.
|
|
15125
|
+
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.12.0/node_modules/launch-editor-middleware/index.js
|
|
15126
|
+
var require_launch_editor_middleware = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor-middleware@2.12.0/node_modules/launch-editor-middleware/index.js": ((exports, module) => {
|
|
15482
15127
|
const path$5 = __require("path");
|
|
15483
15128
|
const launch = require_launch_editor();
|
|
15484
15129
|
module.exports = (specifiedEditor, srcRoot, onErrorCallback) => {
|
|
@@ -15994,7 +15639,7 @@ async function ssrTransformJSON(code, inMap) {
|
|
|
15994
15639
|
};
|
|
15995
15640
|
}
|
|
15996
15641
|
async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
15997
|
-
const s
|
|
15642
|
+
const s = new MagicString(code);
|
|
15998
15643
|
let ast;
|
|
15999
15644
|
try {
|
|
16000
15645
|
ast = await parseAstAsync(code);
|
|
@@ -16024,13 +15669,13 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16024
15669
|
const metadataArg = (metadata?.importedNames?.length ?? 0) > 0 ? `, ${JSON.stringify(metadata)}` : "";
|
|
16025
15670
|
const importId = `__vite_ssr_import_${uid++}__`;
|
|
16026
15671
|
const transformedImport = `const ${importId} = await ${ssrImportKey}(${JSON.stringify(source)}${metadataArg});\n`;
|
|
16027
|
-
s
|
|
15672
|
+
s.update(importNode.start, importNode.end, transformedImport);
|
|
16028
15673
|
if (importNode.start === index) hoistIndex = importNode.end;
|
|
16029
|
-
else s
|
|
15674
|
+
else s.move(importNode.start, importNode.end, index);
|
|
16030
15675
|
return importId;
|
|
16031
15676
|
}
|
|
16032
15677
|
function defineExport(name, local = name) {
|
|
16033
|
-
s
|
|
15678
|
+
s.appendLeft(fileStartIndex, `${ssrExportNameKey}(${JSON.stringify(name)}, () => { try { return ${local} } catch {} });\n`);
|
|
16034
15679
|
}
|
|
16035
15680
|
const imports = [];
|
|
16036
15681
|
const exports$1 = [];
|
|
@@ -16044,7 +15689,7 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16044
15689
|
for (const node of imports) {
|
|
16045
15690
|
if (node.type === "ExportNamedDeclaration") {
|
|
16046
15691
|
if (node.source) {
|
|
16047
|
-
const importId$1 = defineImport(hoistIndex, node, { importedNames: node.specifiers.map((s$
|
|
15692
|
+
const importId$1 = defineImport(hoistIndex, node, { importedNames: node.specifiers.map((s$1) => getIdentifierNameOrLiteralValue$1(s$1.local)) });
|
|
16048
15693
|
reExportImportIdMap.set(node, importId$1);
|
|
16049
15694
|
}
|
|
16050
15695
|
continue;
|
|
@@ -16056,9 +15701,9 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16056
15701
|
}
|
|
16057
15702
|
continue;
|
|
16058
15703
|
}
|
|
16059
|
-
const importId = defineImport(hoistIndex, node, { importedNames: node.specifiers.map((s$
|
|
16060
|
-
if (s$
|
|
16061
|
-
else if (s$
|
|
15704
|
+
const importId = defineImport(hoistIndex, node, { importedNames: node.specifiers.map((s$1) => {
|
|
15705
|
+
if (s$1.type === "ImportSpecifier") return getIdentifierNameOrLiteralValue$1(s$1.imported);
|
|
15706
|
+
else if (s$1.type === "ImportDefaultSpecifier") return "default";
|
|
16062
15707
|
}).filter(isDefined) });
|
|
16063
15708
|
for (const spec of node.specifiers) if (spec.type === "ImportSpecifier") if (spec.imported.type === "Identifier") idToImportMap.set(spec.local.name, `${importId}.${spec.imported.name}`);
|
|
16064
15709
|
else idToImportMap.set(spec.local.name, `${importId}[${JSON.stringify(spec.imported.value)}]`);
|
|
@@ -16069,10 +15714,10 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16069
15714
|
if (node.type === "ExportNamedDeclaration") if (node.declaration) {
|
|
16070
15715
|
if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") defineExport(node.declaration.id.name);
|
|
16071
15716
|
else for (const declaration of node.declaration.declarations) {
|
|
16072
|
-
const names = extract_names(declaration.id);
|
|
16073
|
-
for (const name of names) defineExport(name);
|
|
15717
|
+
const names$1 = extract_names(declaration.id);
|
|
15718
|
+
for (const name of names$1) defineExport(name);
|
|
16074
15719
|
}
|
|
16075
|
-
s
|
|
15720
|
+
s.remove(node.start, node.declaration.start);
|
|
16076
15721
|
} else if (node.source) {
|
|
16077
15722
|
const importId = reExportImportIdMap.get(node);
|
|
16078
15723
|
for (const spec of node.specifiers) {
|
|
@@ -16081,7 +15726,7 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16081
15726
|
else defineExport(exportedAs, `${importId}[${JSON.stringify(spec.local.value)}]`);
|
|
16082
15727
|
}
|
|
16083
15728
|
} else {
|
|
16084
|
-
s
|
|
15729
|
+
s.remove(node.start, node.end);
|
|
16085
15730
|
for (const spec of node.specifiers) {
|
|
16086
15731
|
const local = spec.local.name;
|
|
16087
15732
|
const binding = idToImportMap.get(local);
|
|
@@ -16090,24 +15735,24 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16090
15735
|
}
|
|
16091
15736
|
if (node.type === "ExportDefaultDeclaration") if ("id" in node.declaration && node.declaration.id && !["FunctionExpression", "ClassExpression"].includes(node.declaration.type)) {
|
|
16092
15737
|
const { name } = node.declaration.id;
|
|
16093
|
-
s
|
|
15738
|
+
s.remove(node.start, node.start + 15);
|
|
16094
15739
|
defineExport("default", name);
|
|
16095
15740
|
} else {
|
|
16096
15741
|
const name = `__vite_ssr_export_default__`;
|
|
16097
|
-
s
|
|
15742
|
+
s.update(node.start, node.start + 14, `const ${name} =`);
|
|
16098
15743
|
defineExport("default", name);
|
|
16099
15744
|
}
|
|
16100
15745
|
if (node.type === "ExportAllDeclaration") {
|
|
16101
15746
|
const importId = reExportImportIdMap.get(node);
|
|
16102
15747
|
if (node.exported) defineExport(getIdentifierNameOrLiteralValue$1(node.exported), `${importId}`);
|
|
16103
|
-
else s
|
|
15748
|
+
else s.appendLeft(node.end, `${ssrExportAllKey}(${importId});\n`);
|
|
16104
15749
|
}
|
|
16105
15750
|
}
|
|
16106
15751
|
walk$1(ast, {
|
|
16107
15752
|
onStatements(statements) {
|
|
16108
15753
|
for (let i$1 = 0; i$1 < statements.length - 1; i$1++) {
|
|
16109
15754
|
const stmt = statements[i$1];
|
|
16110
|
-
if (code[stmt.end - 1] !== ";" && stmt.type !== "FunctionDeclaration" && stmt.type !== "ClassDeclaration" && stmt.type !== "BlockStatement" && stmt.type !== "ImportDeclaration") s
|
|
15755
|
+
if (code[stmt.end - 1] !== ";" && stmt.type !== "FunctionDeclaration" && stmt.type !== "ClassDeclaration" && stmt.type !== "BlockStatement" && stmt.type !== "ImportDeclaration") s.appendLeft(stmt.end, ";");
|
|
16111
15756
|
}
|
|
16112
15757
|
},
|
|
16113
15758
|
onIdentifier(id, parent, parentStack) {
|
|
@@ -16115,37 +15760,37 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16115
15760
|
const binding = idToImportMap.get(id.name);
|
|
16116
15761
|
if (!binding) return;
|
|
16117
15762
|
if (isStaticProperty(parent) && parent.shorthand) {
|
|
16118
|
-
if (!isNodeInPattern(parent) || isInDestructuringAssignment(parent, parentStack)) s
|
|
15763
|
+
if (!isNodeInPattern(parent) || isInDestructuringAssignment(parent, parentStack)) s.appendLeft(id.end, `: ${binding}`);
|
|
16119
15764
|
} else if (parent.type === "PropertyDefinition" && grandparent?.type === "ClassBody" || parent.type === "ClassDeclaration" && id === parent.superClass) {
|
|
16120
15765
|
if (!declaredConst.has(id.name)) {
|
|
16121
15766
|
declaredConst.add(id.name);
|
|
16122
15767
|
const topNode = parentStack[parentStack.length - 2];
|
|
16123
|
-
s
|
|
15768
|
+
s.prependRight(topNode.start, `const ${id.name} = ${binding};\n`);
|
|
16124
15769
|
}
|
|
16125
15770
|
} else if (parent.type === "CallExpression") {
|
|
16126
|
-
s
|
|
16127
|
-
s
|
|
16128
|
-
s
|
|
16129
|
-
} else if (!(parent.type === "ClassExpression" && id === parent.id)) s
|
|
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);
|
|
16130
15775
|
},
|
|
16131
15776
|
onImportMeta(node) {
|
|
16132
|
-
s
|
|
15777
|
+
s.update(node.start, node.end, ssrImportMetaKey);
|
|
16133
15778
|
},
|
|
16134
15779
|
onDynamicImport(node) {
|
|
16135
|
-
s
|
|
15780
|
+
s.update(node.start, node.start + 6, ssrDynamicImportKey);
|
|
16136
15781
|
if (node.type === "ImportExpression" && node.source.type === "Literal") dynamicDeps.add(node.source.value);
|
|
16137
15782
|
}
|
|
16138
15783
|
});
|
|
16139
15784
|
let map$1;
|
|
16140
15785
|
if (inMap?.mappings === "") map$1 = inMap;
|
|
16141
15786
|
else {
|
|
16142
|
-
map$1 = s
|
|
15787
|
+
map$1 = s.generateMap({ hires: "boundary" });
|
|
16143
15788
|
map$1.sources = [path.basename(url$3)];
|
|
16144
15789
|
map$1.sourcesContent = [originalCode];
|
|
16145
15790
|
if (inMap && inMap.mappings && "sources" in inMap && inMap.sources.length > 0) map$1 = combineSourcemaps(url$3, [map$1, inMap]);
|
|
16146
15791
|
}
|
|
16147
15792
|
return {
|
|
16148
|
-
code: s
|
|
15793
|
+
code: s.toString(),
|
|
16149
15794
|
map: map$1,
|
|
16150
15795
|
ssr: true,
|
|
16151
15796
|
deps: [...deps],
|
|
@@ -16973,11 +16618,11 @@ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
16973
16618
|
function readShebang$1(command) {
|
|
16974
16619
|
const size = 150;
|
|
16975
16620
|
const buffer = Buffer.alloc(size);
|
|
16976
|
-
let fd
|
|
16621
|
+
let fd;
|
|
16977
16622
|
try {
|
|
16978
|
-
fd
|
|
16979
|
-
fs$2.readSync(fd
|
|
16980
|
-
fs$2.closeSync(fd
|
|
16623
|
+
fd = fs$2.openSync(command, "r");
|
|
16624
|
+
fs$2.readSync(fd, buffer, 0, size, 0);
|
|
16625
|
+
fs$2.closeSync(fd);
|
|
16981
16626
|
} catch (e$1) {}
|
|
16982
16627
|
return shebangCommand(buffer.toString());
|
|
16983
16628
|
}
|
|
@@ -17192,12 +16837,17 @@ function execAsync(command, options$1) {
|
|
|
17192
16837
|
//#endregion
|
|
17193
16838
|
//#region src/node/shortcuts.ts
|
|
17194
16839
|
var import_picocolors$23 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
17195
|
-
function bindCLIShortcuts(server, opts) {
|
|
17196
|
-
if (!server.httpServer || !
|
|
16840
|
+
function bindCLIShortcuts(server, opts, enabled$1 = process.stdin.isTTY && !process.env.CI) {
|
|
16841
|
+
if (!server.httpServer || !enabled$1) return;
|
|
17197
16842
|
const isDev = isDevServer(server);
|
|
17198
|
-
|
|
16843
|
+
const customShortcuts = opts?.customShortcuts ?? [];
|
|
16844
|
+
for (const shortcut of server._shortcutsOptions?.customShortcuts ?? []) if (!customShortcuts.some((s) => s.key === shortcut.key)) customShortcuts.push(shortcut);
|
|
16845
|
+
server._shortcutsOptions = {
|
|
16846
|
+
...opts,
|
|
16847
|
+
customShortcuts
|
|
16848
|
+
};
|
|
17199
16849
|
if (opts?.print) server.config.logger.info(import_picocolors$23.default.dim(import_picocolors$23.default.green(" ➜")) + import_picocolors$23.default.dim(" press ") + import_picocolors$23.default.bold("h + enter") + import_picocolors$23.default.dim(" to show help"));
|
|
17200
|
-
const shortcuts =
|
|
16850
|
+
const shortcuts = customShortcuts.concat(isDev ? BASE_DEV_SHORTCUTS : BASE_PREVIEW_SHORTCUTS);
|
|
17201
16851
|
let actionRunning = false;
|
|
17202
16852
|
const onInput = async (input) => {
|
|
17203
16853
|
if (actionRunning) return;
|
|
@@ -17218,9 +16868,12 @@ function bindCLIShortcuts(server, opts) {
|
|
|
17218
16868
|
await shortcut.action(server);
|
|
17219
16869
|
actionRunning = false;
|
|
17220
16870
|
};
|
|
17221
|
-
|
|
17222
|
-
|
|
17223
|
-
|
|
16871
|
+
if (!server._rl) {
|
|
16872
|
+
const rl = readline.createInterface({ input: process.stdin });
|
|
16873
|
+
server._rl = rl;
|
|
16874
|
+
server.httpServer.on("close", () => rl.close());
|
|
16875
|
+
} else server._rl.removeAllListeners("line");
|
|
16876
|
+
server._rl.on("line", onInput);
|
|
17224
16877
|
}
|
|
17225
16878
|
const BASE_DEV_SHORTCUTS = [
|
|
17226
16879
|
{
|
|
@@ -17301,7 +16954,7 @@ function resolveEmptyOutDir(emptyOutDir, root, outDirs, logger) {
|
|
|
17301
16954
|
return true;
|
|
17302
16955
|
}
|
|
17303
16956
|
function resolveChokidarOptions(options$1, resolvedOutDirs, emptyOutDir, cacheDir) {
|
|
17304
|
-
const { ignored: ignoredList
|
|
16957
|
+
const { ignored: ignoredList, ...otherOptions } = options$1 ?? {};
|
|
17305
16958
|
const ignored = [
|
|
17306
16959
|
"**/.git/**",
|
|
17307
16960
|
"**/node_modules/**",
|
|
@@ -20111,19 +19764,19 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/w
|
|
|
20111
19764
|
* @param {String} message The error message
|
|
20112
19765
|
* @private
|
|
20113
19766
|
*/
|
|
20114
|
-
function abortHandshake$1(websocket, stream$
|
|
19767
|
+
function abortHandshake$1(websocket, stream$2, message) {
|
|
20115
19768
|
websocket._readyState = WebSocket$2.CLOSING;
|
|
20116
19769
|
const err$2 = new Error(message);
|
|
20117
19770
|
Error.captureStackTrace(err$2, abortHandshake$1);
|
|
20118
|
-
if (stream$
|
|
20119
|
-
stream$
|
|
20120
|
-
stream$
|
|
20121
|
-
if (stream$
|
|
19771
|
+
if (stream$2.setHeader) {
|
|
19772
|
+
stream$2[kAborted] = true;
|
|
19773
|
+
stream$2.abort();
|
|
19774
|
+
if (stream$2.socket && !stream$2.socket.destroyed) stream$2.socket.destroy();
|
|
20122
19775
|
process.nextTick(emitErrorAndClose, websocket, err$2);
|
|
20123
19776
|
} else {
|
|
20124
|
-
stream$
|
|
20125
|
-
stream$
|
|
20126
|
-
stream$
|
|
19777
|
+
stream$2.destroy(err$2);
|
|
19778
|
+
stream$2.once("error", websocket.emit.bind(websocket, "error"));
|
|
19779
|
+
stream$2.once("close", websocket.emitClose.bind(websocket));
|
|
20127
19780
|
}
|
|
20128
19781
|
}
|
|
20129
19782
|
/**
|
|
@@ -20235,8 +19888,8 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/w
|
|
|
20235
19888
|
* @param {Readable} stream The readable stream
|
|
20236
19889
|
* @private
|
|
20237
19890
|
*/
|
|
20238
|
-
function resume(stream$
|
|
20239
|
-
stream$
|
|
19891
|
+
function resume(stream$2) {
|
|
19892
|
+
stream$2.resume();
|
|
20240
19893
|
}
|
|
20241
19894
|
/**
|
|
20242
19895
|
* The `Sender` error event handler.
|
|
@@ -20335,8 +19988,8 @@ var require_stream = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8
|
|
|
20335
19988
|
* @param {Duplex} stream The stream.
|
|
20336
19989
|
* @private
|
|
20337
19990
|
*/
|
|
20338
|
-
function emitClose$1(stream$
|
|
20339
|
-
stream$
|
|
19991
|
+
function emitClose$1(stream$2) {
|
|
19992
|
+
stream$2.emit("close");
|
|
20340
19993
|
}
|
|
20341
19994
|
/**
|
|
20342
19995
|
* The listener of the `'end'` event.
|
|
@@ -20829,7 +20482,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
20829
20482
|
...headers
|
|
20830
20483
|
};
|
|
20831
20484
|
socket.once("finish", socket.destroy);
|
|
20832
|
-
socket.end(`HTTP/1.1 ${code} ${http$4.STATUS_CODES[code]}\r\n` + Object.keys(headers).map((h
|
|
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);
|
|
20833
20486
|
}
|
|
20834
20487
|
/**
|
|
20835
20488
|
* Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least
|
|
@@ -21340,19 +20993,19 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http
|
|
|
21340
20993
|
//#endregion
|
|
21341
20994
|
//#region ../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js
|
|
21342
20995
|
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) => {
|
|
21343
|
-
var __createBinding$3 = exports && exports.__createBinding || (Object.create ? (function(o$1, m
|
|
20996
|
+
var __createBinding$3 = exports && exports.__createBinding || (Object.create ? (function(o$1, m, k, k2) {
|
|
21344
20997
|
if (k2 === void 0) k2 = k;
|
|
21345
|
-
var desc = Object.getOwnPropertyDescriptor(m
|
|
21346
|
-
if (!desc || ("get" in desc ? !m
|
|
20998
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20999
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
21347
21000
|
enumerable: true,
|
|
21348
21001
|
get: function() {
|
|
21349
|
-
return m
|
|
21002
|
+
return m[k];
|
|
21350
21003
|
}
|
|
21351
21004
|
};
|
|
21352
21005
|
Object.defineProperty(o$1, k2, desc);
|
|
21353
|
-
}) : (function(o$1, m
|
|
21006
|
+
}) : (function(o$1, m, k, k2) {
|
|
21354
21007
|
if (k2 === void 0) k2 = k;
|
|
21355
|
-
o$1[k2] = m
|
|
21008
|
+
o$1[k2] = m[k];
|
|
21356
21009
|
}));
|
|
21357
21010
|
var __setModuleDefault$3 = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
|
|
21358
21011
|
Object.defineProperty(o$1, "default", {
|
|
@@ -21450,13 +21103,13 @@ var require_web_outgoing = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
21450
21103
|
}) });
|
|
21451
21104
|
|
|
21452
21105
|
//#endregion
|
|
21453
|
-
//#region ../../node_modules/.pnpm/follow-redirects@1.15.
|
|
21454
|
-
var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.
|
|
21106
|
+
//#region ../../node_modules/.pnpm/follow-redirects@1.15.11_obug@2.1.0/node_modules/follow-redirects/debug.js
|
|
21107
|
+
var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.11_obug@2.1.0/node_modules/follow-redirects/debug.js": ((exports, module) => {
|
|
21455
21108
|
var debug$11;
|
|
21456
21109
|
module.exports = function() {
|
|
21457
21110
|
if (!debug$11) {
|
|
21458
21111
|
try {
|
|
21459
|
-
debug$11 =
|
|
21112
|
+
debug$11 = (init_node(), __toCommonJS(node_exports))("follow-redirects");
|
|
21460
21113
|
} catch (error$1) {}
|
|
21461
21114
|
if (typeof debug$11 !== "function") debug$11 = function() {};
|
|
21462
21115
|
}
|
|
@@ -21465,8 +21118,8 @@ var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follo
|
|
|
21465
21118
|
}) });
|
|
21466
21119
|
|
|
21467
21120
|
//#endregion
|
|
21468
|
-
//#region ../../node_modules/.pnpm/follow-redirects@1.15.
|
|
21469
|
-
var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.
|
|
21121
|
+
//#region ../../node_modules/.pnpm/follow-redirects@1.15.11_obug@2.1.0/node_modules/follow-redirects/index.js
|
|
21122
|
+
var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.11_obug@2.1.0/node_modules/follow-redirects/index.js": ((exports, module) => {
|
|
21470
21123
|
var url = __require("url");
|
|
21471
21124
|
var URL$2 = url.URL;
|
|
21472
21125
|
var http$3 = __require("http");
|
|
@@ -21898,19 +21551,19 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
21898
21551
|
//#endregion
|
|
21899
21552
|
//#region ../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js
|
|
21900
21553
|
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) => {
|
|
21901
|
-
var __createBinding$2 = exports && exports.__createBinding || (Object.create ? (function(o$1, m
|
|
21554
|
+
var __createBinding$2 = exports && exports.__createBinding || (Object.create ? (function(o$1, m, k, k2) {
|
|
21902
21555
|
if (k2 === void 0) k2 = k;
|
|
21903
|
-
var desc = Object.getOwnPropertyDescriptor(m
|
|
21904
|
-
if (!desc || ("get" in desc ? !m
|
|
21556
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
21557
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
21905
21558
|
enumerable: true,
|
|
21906
21559
|
get: function() {
|
|
21907
|
-
return m
|
|
21560
|
+
return m[k];
|
|
21908
21561
|
}
|
|
21909
21562
|
};
|
|
21910
21563
|
Object.defineProperty(o$1, k2, desc);
|
|
21911
|
-
}) : (function(o$1, m
|
|
21564
|
+
}) : (function(o$1, m, k, k2) {
|
|
21912
21565
|
if (k2 === void 0) k2 = k;
|
|
21913
|
-
o$1[k2] = m
|
|
21566
|
+
o$1[k2] = m[k];
|
|
21914
21567
|
}));
|
|
21915
21568
|
var __setModuleDefault$2 = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
|
|
21916
21569
|
Object.defineProperty(o$1, "default", {
|
|
@@ -22043,19 +21696,19 @@ var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
22043
21696
|
//#endregion
|
|
22044
21697
|
//#region ../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js
|
|
22045
21698
|
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) => {
|
|
22046
|
-
var __createBinding$1 = exports && exports.__createBinding || (Object.create ? (function(o$1, m
|
|
21699
|
+
var __createBinding$1 = exports && exports.__createBinding || (Object.create ? (function(o$1, m, k, k2) {
|
|
22047
21700
|
if (k2 === void 0) k2 = k;
|
|
22048
|
-
var desc = Object.getOwnPropertyDescriptor(m
|
|
22049
|
-
if (!desc || ("get" in desc ? !m
|
|
21701
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
21702
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
22050
21703
|
enumerable: true,
|
|
22051
21704
|
get: function() {
|
|
22052
|
-
return m
|
|
21705
|
+
return m[k];
|
|
22053
21706
|
}
|
|
22054
21707
|
};
|
|
22055
21708
|
Object.defineProperty(o$1, k2, desc);
|
|
22056
|
-
}) : (function(o$1, m
|
|
21709
|
+
}) : (function(o$1, m, k, k2) {
|
|
22057
21710
|
if (k2 === void 0) k2 = k;
|
|
22058
|
-
o$1[k2] = m
|
|
21711
|
+
o$1[k2] = m[k];
|
|
22059
21712
|
}));
|
|
22060
21713
|
var __setModuleDefault$1 = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
|
|
22061
21714
|
Object.defineProperty(o$1, "default", {
|
|
@@ -22097,7 +21750,7 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
22097
21750
|
const https = __importStar$1(__require("node:https"));
|
|
22098
21751
|
const common = __importStar$1(require_common());
|
|
22099
21752
|
const web_outgoing_1 = require_web_outgoing();
|
|
22100
|
-
const log$1 = (0, __importDefault$1(
|
|
21753
|
+
const log$1 = (0, __importDefault$1((init_node(), __toCommonJS(node_exports))).default)("http-proxy-3:ws-incoming");
|
|
22101
21754
|
const web_o = Object.values(web_outgoing_1.OUTGOING_PASSES);
|
|
22102
21755
|
function createSocketCounter(name) {
|
|
22103
21756
|
let sockets = /* @__PURE__ */ new Set();
|
|
@@ -22253,19 +21906,19 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
22253
21906
|
//#endregion
|
|
22254
21907
|
//#region ../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/index.js
|
|
22255
21908
|
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) => {
|
|
22256
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o$1, m
|
|
21909
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o$1, m, k, k2) {
|
|
22257
21910
|
if (k2 === void 0) k2 = k;
|
|
22258
|
-
var desc = Object.getOwnPropertyDescriptor(m
|
|
22259
|
-
if (!desc || ("get" in desc ? !m
|
|
21911
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
21912
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
|
|
22260
21913
|
enumerable: true,
|
|
22261
21914
|
get: function() {
|
|
22262
|
-
return m
|
|
21915
|
+
return m[k];
|
|
22263
21916
|
}
|
|
22264
21917
|
};
|
|
22265
21918
|
Object.defineProperty(o$1, k2, desc);
|
|
22266
|
-
}) : (function(o$1, m
|
|
21919
|
+
}) : (function(o$1, m, k, k2) {
|
|
22267
21920
|
if (k2 === void 0) k2 = k;
|
|
22268
|
-
o$1[k2] = m
|
|
21921
|
+
o$1[k2] = m[k];
|
|
22269
21922
|
}));
|
|
22270
21923
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
|
|
22271
21924
|
Object.defineProperty(o$1, "default", {
|
|
@@ -22304,7 +21957,7 @@ var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
22304
21957
|
const web_incoming_1 = require_web_incoming();
|
|
22305
21958
|
const ws_incoming_1$1 = require_ws_incoming();
|
|
22306
21959
|
const node_events_1 = __require("node:events");
|
|
22307
|
-
const debug_1 = __importDefault(
|
|
21960
|
+
const debug_1 = __importDefault((init_node(), __toCommonJS(node_exports)));
|
|
22308
21961
|
const common_1 = require_common();
|
|
22309
21962
|
const log = (0, debug_1.default)("http-proxy-3");
|
|
22310
21963
|
var ProxyServer = class ProxyServer extends node_events_1.EventEmitter {
|
|
@@ -22887,8 +22540,8 @@ function send$1(req$4, res, file, stats, headers) {
|
|
|
22887
22540
|
if (tmp = res.getHeader("content-type")) headers["Content-Type"] = tmp;
|
|
22888
22541
|
if (req$4.headers.range) {
|
|
22889
22542
|
code = 206;
|
|
22890
|
-
let [x, y
|
|
22891
|
-
let end = opts.end = parseInt(y
|
|
22543
|
+
let [x, y] = req$4.headers.range.replace("bytes=", "").split("-");
|
|
22544
|
+
let end = opts.end = parseInt(y, 10) || stats.size - 1;
|
|
22892
22545
|
let start = opts.start = parseInt(x, 10) || 0;
|
|
22893
22546
|
if (end >= stats.size) end = stats.size - 1;
|
|
22894
22547
|
if (start >= stats.size) {
|
|
@@ -23330,7 +22983,7 @@ async function handleModuleSoftInvalidation(environment, mod, timestamp) {
|
|
|
23330
22983
|
else {
|
|
23331
22984
|
await init;
|
|
23332
22985
|
const source = transformResult.code;
|
|
23333
|
-
const s
|
|
22986
|
+
const s = new MagicString(source);
|
|
23334
22987
|
const [imports] = parse(source, mod.id || void 0);
|
|
23335
22988
|
for (const imp of imports) {
|
|
23336
22989
|
let rawUrl = source.slice(imp.s, imp.e);
|
|
@@ -23345,13 +22998,13 @@ async function handleModuleSoftInvalidation(environment, mod, timestamp) {
|
|
|
23345
22998
|
const replacedUrl = injectQuery(urlWithoutTimestamp, `t=${importedMod.lastHMRTimestamp}`);
|
|
23346
22999
|
const start = hasQuotes ? imp.s + 1 : imp.s;
|
|
23347
23000
|
const end = hasQuotes ? imp.e - 1 : imp.e;
|
|
23348
|
-
s
|
|
23001
|
+
s.overwrite(start, end, replacedUrl);
|
|
23349
23002
|
}
|
|
23350
23003
|
if (imp.d === -1 && environment.config.dev.preTransformRequests) environment.warmupRequest(hmrUrl);
|
|
23351
23004
|
break;
|
|
23352
23005
|
}
|
|
23353
23006
|
}
|
|
23354
|
-
const code = s
|
|
23007
|
+
const code = s.toString();
|
|
23355
23008
|
result = {
|
|
23356
23009
|
...transformResult,
|
|
23357
23010
|
code,
|
|
@@ -24017,23 +23670,23 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
24017
23670
|
continue;
|
|
24018
23671
|
}
|
|
24019
23672
|
if (match[3]) {
|
|
24020
|
-
let names$
|
|
24021
|
-
if (names$
|
|
23673
|
+
let names$2 = /\.([^.?]+)/.exec(match[4])?.[1] || "";
|
|
23674
|
+
if (names$2 === "default") names$2 = "default: __vite_default__";
|
|
24022
23675
|
dynamicImports[dynamicImportTreeshakenRE.lastIndex - match[4]?.length - 1] = {
|
|
24023
|
-
declaration: `const {${names$
|
|
24024
|
-
names: `{ ${names$
|
|
23676
|
+
declaration: `const {${names$2}}`,
|
|
23677
|
+
names: `{ ${names$2} }`
|
|
24025
23678
|
};
|
|
24026
23679
|
continue;
|
|
24027
23680
|
}
|
|
24028
|
-
const names = match[6]?.trim();
|
|
23681
|
+
const names$1 = match[6]?.trim();
|
|
24029
23682
|
dynamicImports[dynamicImportTreeshakenRE.lastIndex - match[5]?.length] = {
|
|
24030
|
-
declaration: `const {${names}}`,
|
|
24031
|
-
names: `{ ${names} }`
|
|
23683
|
+
declaration: `const {${names$1}}`,
|
|
23684
|
+
names: `{ ${names$1} }`
|
|
24032
23685
|
};
|
|
24033
23686
|
}
|
|
24034
23687
|
}
|
|
24035
|
-
let s
|
|
24036
|
-
const str = () => s
|
|
23688
|
+
let s;
|
|
23689
|
+
const str = () => s || (s = new MagicString(source));
|
|
24037
23690
|
let needPreloadHelper = false;
|
|
24038
23691
|
for (let index = 0; index < imports.length; index++) {
|
|
24039
23692
|
const { s: start, e: end, ss: expStart, se: expEnd, d: dynamicIndex, a: attributeIndex } = imports[index];
|
|
@@ -24041,18 +23694,18 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
24041
23694
|
if (!isDynamicImport && attributeIndex > -1) str().remove(end + 1, expEnd);
|
|
24042
23695
|
if (isDynamicImport && insertPreload && (source[start] === "\"" || source[start] === "'" || source[start] === "`")) {
|
|
24043
23696
|
needPreloadHelper = true;
|
|
24044
|
-
const { declaration, names } = dynamicImports[expEnd] || {};
|
|
24045
|
-
if (names) {
|
|
23697
|
+
const { declaration, names: names$1 } = dynamicImports[expEnd] || {};
|
|
23698
|
+
if (names$1) {
|
|
24046
23699
|
str().prependLeft(expStart, `${preloadMethod}(async () => { ${declaration} = await `);
|
|
24047
|
-
str().appendRight(expEnd, `;return ${names}}`);
|
|
23700
|
+
str().appendRight(expEnd, `;return ${names$1}}`);
|
|
24048
23701
|
} else str().prependLeft(expStart, `${preloadMethod}(() => `);
|
|
24049
23702
|
str().appendRight(expEnd, `,${isModernFlag}?${preloadMarker}:void 0${renderBuiltUrl || isRelativeBase ? ",import.meta.url" : ""})`);
|
|
24050
23703
|
}
|
|
24051
23704
|
}
|
|
24052
23705
|
if (needPreloadHelper && insertPreload && !source.includes(`const ${preloadMethod} =`)) str().prepend(`import { ${preloadMethod} } from "${preloadHelperId}";`);
|
|
24053
|
-
if (s
|
|
24054
|
-
code: s
|
|
24055
|
-
map: this.environment.config.build.sourcemap ? s
|
|
23706
|
+
if (s) return {
|
|
23707
|
+
code: s.toString(),
|
|
23708
|
+
map: this.environment.config.build.sourcemap ? s.generateMap({ hires: "boundary" }) : null
|
|
24056
23709
|
};
|
|
24057
23710
|
}
|
|
24058
23711
|
},
|
|
@@ -24133,7 +23786,7 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
24133
23786
|
frame: generateCodeFrame(code, loc)
|
|
24134
23787
|
});
|
|
24135
23788
|
}
|
|
24136
|
-
const s
|
|
23789
|
+
const s = new MagicString(code);
|
|
24137
23790
|
const rewroteMarkerStartPos = /* @__PURE__ */ new Set();
|
|
24138
23791
|
const fileDeps = [];
|
|
24139
23792
|
const addFileDep = (url$3, runtime = false) => {
|
|
@@ -24180,7 +23833,7 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
24180
23833
|
});
|
|
24181
23834
|
hasRemovedPureCssChunk = true;
|
|
24182
23835
|
}
|
|
24183
|
-
s
|
|
23836
|
+
s.update(expStart, expEnd, "Promise.resolve({})");
|
|
24184
23837
|
}
|
|
24185
23838
|
}
|
|
24186
23839
|
};
|
|
@@ -24189,7 +23842,7 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
24189
23842
|
let markerStartPos$1 = findPreloadMarker(code, end);
|
|
24190
23843
|
if (markerStartPos$1 === -1 && imports.length === 1) markerStartPos$1 = findPreloadMarker(code);
|
|
24191
23844
|
if (markerStartPos$1 > 0) {
|
|
24192
|
-
let depsArray = deps.size > 1 || hasRemovedPureCssChunk && deps.size > 0 ? modulePreload === false ? [...deps].filter((d
|
|
23845
|
+
let depsArray = deps.size > 1 || hasRemovedPureCssChunk && deps.size > 0 ? modulePreload === false ? [...deps].filter((d) => d.endsWith(".css")) : [...deps] : [];
|
|
24193
23846
|
const resolveDependencies = modulePreload ? modulePreload.resolveDependencies : void 0;
|
|
24194
23847
|
if (resolveDependencies && normalizedFile) {
|
|
24195
23848
|
const cssDeps = [];
|
|
@@ -24206,25 +23859,25 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
24206
23859
|
if (typeof replacement === "string") return addFileDep(replacement);
|
|
24207
23860
|
return addFileDep(replacement.runtime, true);
|
|
24208
23861
|
});
|
|
24209
|
-
else renderedDeps = depsArray.map((d
|
|
24210
|
-
s
|
|
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(",")}])` : `[]`);
|
|
24211
23864
|
rewroteMarkerStartPos.add(markerStartPos$1);
|
|
24212
23865
|
}
|
|
24213
23866
|
}
|
|
24214
23867
|
if (fileDeps.length > 0) {
|
|
24215
23868
|
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`;
|
|
24216
|
-
if (code.startsWith("#!")) s
|
|
24217
|
-
else s
|
|
23869
|
+
if (code.startsWith("#!")) s.prependLeft(code.indexOf("\n") + 1, mapDepsCode);
|
|
23870
|
+
else s.prepend(mapDepsCode);
|
|
24218
23871
|
}
|
|
24219
23872
|
let markerStartPos = findPreloadMarker(code);
|
|
24220
23873
|
while (markerStartPos >= 0) {
|
|
24221
|
-
if (!rewroteMarkerStartPos.has(markerStartPos)) s
|
|
23874
|
+
if (!rewroteMarkerStartPos.has(markerStartPos)) s.update(markerStartPos, markerStartPos + preloadMarker.length, "void 0");
|
|
24222
23875
|
markerStartPos = findPreloadMarker(code, markerStartPos + preloadMarker.length);
|
|
24223
23876
|
}
|
|
24224
|
-
if (s
|
|
24225
|
-
chunk.code = s
|
|
23877
|
+
if (s.hasChanged()) {
|
|
23878
|
+
chunk.code = s.toString();
|
|
24226
23879
|
if (buildSourcemap && chunk.map) {
|
|
24227
|
-
const nextMap = s
|
|
23880
|
+
const nextMap = s.generateMap({
|
|
24228
23881
|
source: chunk.fileName,
|
|
24229
23882
|
hires: "boundary"
|
|
24230
23883
|
});
|
|
@@ -24375,9 +24028,9 @@ function traverseNodes(node, visitor) {
|
|
|
24375
24028
|
if (nodeIsElement(node) || node.nodeName === "#document" || node.nodeName === "#document-fragment") node.childNodes.forEach((childNode) => traverseNodes(childNode, visitor));
|
|
24376
24029
|
}
|
|
24377
24030
|
async function traverseHtml(html, filePath, warn, visitor) {
|
|
24378
|
-
const { parse: parse$
|
|
24031
|
+
const { parse: parse$15 } = await import("./dist.js");
|
|
24379
24032
|
const warnings = {};
|
|
24380
|
-
traverseNodes(parse$
|
|
24033
|
+
traverseNodes(parse$15(html, {
|
|
24381
24034
|
scriptingEnabled: false,
|
|
24382
24035
|
sourceCodeLocationInfo: true,
|
|
24383
24036
|
onParseError: (e$1) => {
|
|
@@ -24412,19 +24065,19 @@ function getScriptInfo(node) {
|
|
|
24412
24065
|
};
|
|
24413
24066
|
}
|
|
24414
24067
|
const attrValueStartRE = /=\s*(.)/;
|
|
24415
|
-
function overwriteAttrValue(s
|
|
24416
|
-
const srcString = s
|
|
24068
|
+
function overwriteAttrValue(s, sourceCodeLocation, newValue) {
|
|
24069
|
+
const srcString = s.slice(sourceCodeLocation.startOffset, sourceCodeLocation.endOffset);
|
|
24417
24070
|
const valueStart = attrValueStartRE.exec(srcString);
|
|
24418
24071
|
if (!valueStart) throw new Error(`[vite:html] internal error, failed to overwrite attribute value`);
|
|
24419
24072
|
const wrapOffset = valueStart[1] === "\"" || valueStart[1] === "'" ? 1 : 0;
|
|
24420
24073
|
const valueOffset = valueStart.index + valueStart[0].length - 1;
|
|
24421
|
-
s
|
|
24422
|
-
return s
|
|
24074
|
+
s.update(sourceCodeLocation.startOffset + valueOffset + wrapOffset, sourceCodeLocation.endOffset - wrapOffset, newValue);
|
|
24075
|
+
return s;
|
|
24423
24076
|
}
|
|
24424
|
-
function removeViteIgnoreAttr(s
|
|
24077
|
+
function removeViteIgnoreAttr(s, sourceCodeLocation) {
|
|
24425
24078
|
const loc = sourceCodeLocation.attrs?.["vite-ignore"];
|
|
24426
|
-
if (loc) s
|
|
24427
|
-
return s
|
|
24079
|
+
if (loc) s.remove(loc.startOffset, loc.endOffset);
|
|
24080
|
+
return s;
|
|
24428
24081
|
}
|
|
24429
24082
|
/**
|
|
24430
24083
|
* Format parse5 @type {ParserError} to @type {RollupError}
|
|
@@ -24482,7 +24135,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24482
24135
|
const lineStartOffset = startOffset - node.sourceCodeLocation.startCol;
|
|
24483
24136
|
let isLineEmpty = false;
|
|
24484
24137
|
try {
|
|
24485
|
-
isLineEmpty = !s
|
|
24138
|
+
isLineEmpty = !s.slice(Math.max(0, lineStartOffset), startOffset).trim();
|
|
24486
24139
|
} catch {}
|
|
24487
24140
|
return isLineEmpty ? lineStartOffset : startOffset;
|
|
24488
24141
|
};
|
|
@@ -24491,7 +24144,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24491
24144
|
filename: id
|
|
24492
24145
|
});
|
|
24493
24146
|
let js = "";
|
|
24494
|
-
const s
|
|
24147
|
+
const s = new MagicString(html);
|
|
24495
24148
|
const scriptUrls = [];
|
|
24496
24149
|
const styleUrls = [];
|
|
24497
24150
|
let inlineModuleIndex = -1;
|
|
@@ -24514,11 +24167,11 @@ function buildHtmlPlugin(config$2) {
|
|
|
24514
24167
|
let shouldRemove = false;
|
|
24515
24168
|
if (node.nodeName === "script") {
|
|
24516
24169
|
const { src, srcSourceCodeLocation, isModule, isAsync, isIgnored } = getScriptInfo(node);
|
|
24517
|
-
if (isIgnored) removeViteIgnoreAttr(s
|
|
24170
|
+
if (isIgnored) removeViteIgnoreAttr(s, node.sourceCodeLocation);
|
|
24518
24171
|
else {
|
|
24519
24172
|
const url$3 = src && src.value;
|
|
24520
24173
|
const isPublicFile = !!(url$3 && checkPublicFile(url$3, config$2));
|
|
24521
|
-
if (isPublicFile) overwriteAttrValue(s
|
|
24174
|
+
if (isPublicFile) overwriteAttrValue(s, srcSourceCodeLocation, partialEncodeURIPath(toOutputPublicFilePath(url$3)));
|
|
24522
24175
|
if (isModule) {
|
|
24523
24176
|
inlineModuleIndex++;
|
|
24524
24177
|
if (url$3 && !isExcludedUrl(url$3) && !isPublicFile) {
|
|
@@ -24551,7 +24204,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24551
24204
|
}
|
|
24552
24205
|
const assetAttributes = getNodeAssetAttributes(node);
|
|
24553
24206
|
for (const attr of assetAttributes) if (attr.type === "remove") {
|
|
24554
|
-
s
|
|
24207
|
+
s.remove(attr.location.startOffset, attr.location.endOffset);
|
|
24555
24208
|
continue;
|
|
24556
24209
|
} else if (attr.type === "srcset") assetUrlsPromises.push((async () => {
|
|
24557
24210
|
const processedEncodedUrl = await processSrcSet(attr.value, async ({ url: url$3 }) => {
|
|
@@ -24562,11 +24215,11 @@ function buildHtmlPlugin(config$2) {
|
|
|
24562
24215
|
}
|
|
24563
24216
|
return url$3;
|
|
24564
24217
|
});
|
|
24565
|
-
if (processedEncodedUrl !== attr.value) overwriteAttrValue(s
|
|
24218
|
+
if (processedEncodedUrl !== attr.value) overwriteAttrValue(s, attr.location, processedEncodedUrl);
|
|
24566
24219
|
})());
|
|
24567
24220
|
else if (attr.type === "src") {
|
|
24568
24221
|
const url$3 = decodeURIIfPossible(attr.value);
|
|
24569
|
-
if (url$3 === void 0) {} else if (checkPublicFile(url$3, config$2)) overwriteAttrValue(s
|
|
24222
|
+
if (url$3 === void 0) {} else if (checkPublicFile(url$3, config$2)) overwriteAttrValue(s, attr.location, partialEncodeURIPath(toOutputPublicFilePath(url$3)));
|
|
24570
24223
|
else if (!isExcludedUrl(url$3)) if (node.nodeName === "link" && isCSSRequest(url$3) && !("media" in attr.attributes || "disabled" in attr.attributes)) {
|
|
24571
24224
|
const importExpression = `\nimport ${JSON.stringify(url$3)}`;
|
|
24572
24225
|
styleUrls.push({
|
|
@@ -24579,7 +24232,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24579
24232
|
const shouldInline$1 = node.nodeName === "link" && attr.attributes.rel && parseRelAttr(attr.attributes.rel).some((v) => noInlineLinkRels.has(v)) ? false : void 0;
|
|
24580
24233
|
assetUrlsPromises.push((async () => {
|
|
24581
24234
|
const processedUrl = await processAssetUrl(url$3, shouldInline$1);
|
|
24582
|
-
if (processedUrl !== url$3) overwriteAttrValue(s
|
|
24235
|
+
if (processedUrl !== url$3) overwriteAttrValue(s, attr.location, partialEncodeURIPath(processedUrl));
|
|
24583
24236
|
})());
|
|
24584
24237
|
}
|
|
24585
24238
|
}
|
|
@@ -24590,7 +24243,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24590
24243
|
addToHTMLProxyCache(config$2, id.replace(normalizePath(config$2.root), ""), inlineModuleIndex, { code });
|
|
24591
24244
|
js += `\nimport "${id}?html-proxy&inline-css&style-attr&index=${inlineModuleIndex}.css"`;
|
|
24592
24245
|
const hash$1 = getHash(cleanUrl(id));
|
|
24593
|
-
overwriteAttrValue(s
|
|
24246
|
+
overwriteAttrValue(s, inlineStyle.location, `__VITE_INLINE_CSS__${hash$1}_${inlineModuleIndex}__`);
|
|
24594
24247
|
}
|
|
24595
24248
|
if (node.nodeName === "style" && node.childNodes.length) {
|
|
24596
24249
|
const styleNode = node.childNodes.pop();
|
|
@@ -24599,15 +24252,15 @@ function buildHtmlPlugin(config$2) {
|
|
|
24599
24252
|
addToHTMLProxyCache(config$2, filePath, inlineModuleIndex, { code: styleNode.value });
|
|
24600
24253
|
js += `\nimport "${id}?html-proxy&inline-css&index=${inlineModuleIndex}.css"`;
|
|
24601
24254
|
const hash$1 = getHash(cleanUrl(id));
|
|
24602
|
-
s
|
|
24255
|
+
s.update(styleNode.sourceCodeLocation.startOffset, styleNode.sourceCodeLocation.endOffset, `__VITE_INLINE_CSS__${hash$1}_${inlineModuleIndex}__`);
|
|
24603
24256
|
}
|
|
24604
|
-
if (shouldRemove) s
|
|
24257
|
+
if (shouldRemove) s.remove(nodeStartWithLeadingWhitespace(node), node.sourceCodeLocation.endOffset);
|
|
24605
24258
|
});
|
|
24606
24259
|
isAsyncScriptMap.get(config$2).set(id, everyScriptIsAsync);
|
|
24607
24260
|
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.`);
|
|
24608
24261
|
await Promise.all(assetUrlsPromises);
|
|
24609
|
-
for (const { start, end, url: url$3 } of scriptUrls) if (checkPublicFile(url$3, config$2)) s
|
|
24610
|
-
else if (!isExcludedUrl(url$3)) s
|
|
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)));
|
|
24611
24264
|
const resolvedStyleUrls = await Promise.all(styleUrls.map(async (styleUrl) => ({
|
|
24612
24265
|
...styleUrl,
|
|
24613
24266
|
resolved: await this.resolve(styleUrl.url, id)
|
|
@@ -24616,8 +24269,8 @@ function buildHtmlPlugin(config$2) {
|
|
|
24616
24269
|
config$2.logger.warnOnce(`\n${url$3} doesn't exist at build time, it will remain unchanged to be resolved at runtime`);
|
|
24617
24270
|
const importExpression = `\nimport ${JSON.stringify(url$3)}`;
|
|
24618
24271
|
js = js.replace(importExpression, "");
|
|
24619
|
-
} else s
|
|
24620
|
-
processedHtml(this).set(id, s
|
|
24272
|
+
} else s.remove(start, end);
|
|
24273
|
+
processedHtml(this).set(id, s.toString());
|
|
24621
24274
|
const { modulePreload } = this.environment.config.build;
|
|
24622
24275
|
if (modulePreload !== false && modulePreload.polyfill && (someScriptsAreAsync || someScriptsAreDefer)) js = `import "${modulePreloadPolyfillId}";\n${js}`;
|
|
24623
24276
|
await Promise.all(setModuleSideEffectPromises);
|
|
@@ -24739,15 +24392,15 @@ function buildHtmlPlugin(config$2) {
|
|
|
24739
24392
|
}]);
|
|
24740
24393
|
}
|
|
24741
24394
|
let match;
|
|
24742
|
-
let s
|
|
24395
|
+
let s;
|
|
24743
24396
|
inlineCSSRE$1.lastIndex = 0;
|
|
24744
24397
|
while (match = inlineCSSRE$1.exec(result)) {
|
|
24745
|
-
s
|
|
24398
|
+
s ||= new MagicString(result);
|
|
24746
24399
|
const { 0: full, 1: scopedName } = match;
|
|
24747
24400
|
const cssTransformedCode = htmlProxyResult.get(scopedName);
|
|
24748
|
-
s
|
|
24401
|
+
s.update(match.index, match.index + full.length, cssTransformedCode);
|
|
24749
24402
|
}
|
|
24750
|
-
if (s
|
|
24403
|
+
if (s) result = s.toString();
|
|
24751
24404
|
result = await applyHtmlTransforms(result, [...normalHooks, ...postHooks], this, {
|
|
24752
24405
|
path: "/" + relativeUrlPath,
|
|
24753
24406
|
filename: normalizedId,
|
|
@@ -24884,7 +24537,7 @@ function injectNonceAttributeTagHook(config$2) {
|
|
|
24884
24537
|
return async (html, { filename }) => {
|
|
24885
24538
|
const nonce = config$2.html?.cspNonce;
|
|
24886
24539
|
if (!nonce) return;
|
|
24887
|
-
const s
|
|
24540
|
+
const s = new MagicString(html);
|
|
24888
24541
|
await traverseHtml(html, filename, config$2.logger.warn, (node) => {
|
|
24889
24542
|
if (!nodeIsElement(node)) return;
|
|
24890
24543
|
const { nodeName, attrs, sourceCodeLocation } = node;
|
|
@@ -24892,10 +24545,10 @@ function injectNonceAttributeTagHook(config$2) {
|
|
|
24892
24545
|
if (attrs.some(({ name }) => name === "nonce")) return;
|
|
24893
24546
|
const startTagEndOffset = sourceCodeLocation.startTag.endOffset;
|
|
24894
24547
|
const appendOffset = html[startTagEndOffset - 2] === "/" ? 2 : 1;
|
|
24895
|
-
s
|
|
24548
|
+
s.appendRight(startTagEndOffset - appendOffset, ` nonce="${nonce}"`);
|
|
24896
24549
|
}
|
|
24897
24550
|
});
|
|
24898
|
-
return s
|
|
24551
|
+
return s.toString();
|
|
24899
24552
|
};
|
|
24900
24553
|
}
|
|
24901
24554
|
function resolveHtmlTransforms(plugins$1) {
|
|
@@ -25303,7 +24956,7 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
|
25303
24956
|
proxyModuleUrl = wrapId(proxyModulePath);
|
|
25304
24957
|
}
|
|
25305
24958
|
proxyModuleUrl = joinUrlSegments(decodedBase, proxyModuleUrl);
|
|
25306
|
-
const s
|
|
24959
|
+
const s = new MagicString(html);
|
|
25307
24960
|
let inlineModuleIndex = -1;
|
|
25308
24961
|
const proxyCacheUrl = decodeURI(cleanUrl(proxyModulePath).replace(normalizePath(config$2.root), ""));
|
|
25309
24962
|
const styleUrl = [];
|
|
@@ -25325,23 +24978,23 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
|
25325
24978
|
});
|
|
25326
24979
|
const modulePath = `${proxyModuleUrl}?html-proxy&index=${inlineModuleIndex}.${ext}`;
|
|
25327
24980
|
inlineModulePaths.push(modulePath);
|
|
25328
|
-
s
|
|
24981
|
+
s.update(node.sourceCodeLocation.startOffset, node.sourceCodeLocation.endOffset, `<script type="module" src="${modulePath}"><\/script>`);
|
|
25329
24982
|
preTransformRequest(server, modulePath, decodedBase);
|
|
25330
24983
|
};
|
|
25331
24984
|
await traverseHtml(html, filename, config$2.logger.warn, (node) => {
|
|
25332
24985
|
if (!nodeIsElement(node)) return;
|
|
25333
24986
|
if (node.nodeName === "script") {
|
|
25334
24987
|
const { src, srcSourceCodeLocation, isModule, isIgnored } = getScriptInfo(node);
|
|
25335
|
-
if (isIgnored) removeViteIgnoreAttr(s
|
|
24988
|
+
if (isIgnored) removeViteIgnoreAttr(s, node.sourceCodeLocation);
|
|
25336
24989
|
else if (src) {
|
|
25337
24990
|
const processedUrl = processNodeUrl(src.value, false, config$2, htmlPath, originalUrl, server, !isModule);
|
|
25338
|
-
if (processedUrl !== src.value) overwriteAttrValue(s
|
|
24991
|
+
if (processedUrl !== src.value) overwriteAttrValue(s, srcSourceCodeLocation, processedUrl);
|
|
25339
24992
|
} else if (isModule && node.childNodes.length) addInlineModule(node, "js");
|
|
25340
24993
|
else if (node.childNodes.length) {
|
|
25341
24994
|
const scriptNode = node.childNodes[node.childNodes.length - 1];
|
|
25342
24995
|
for (const { url: url$3, start, end } of extractImportExpressionFromClassicScript(scriptNode)) {
|
|
25343
24996
|
const processedUrl = processNodeUrl(url$3, false, config$2, htmlPath, originalUrl);
|
|
25344
|
-
if (processedUrl !== url$3) s
|
|
24997
|
+
if (processedUrl !== url$3) s.update(start, end, processedUrl);
|
|
25345
24998
|
}
|
|
25346
24999
|
}
|
|
25347
25000
|
}
|
|
@@ -25363,10 +25016,10 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
|
25363
25016
|
});
|
|
25364
25017
|
}
|
|
25365
25018
|
const assetAttributes = getNodeAssetAttributes(node);
|
|
25366
|
-
for (const attr of assetAttributes) if (attr.type === "remove") s
|
|
25019
|
+
for (const attr of assetAttributes) if (attr.type === "remove") s.remove(attr.location.startOffset, attr.location.endOffset);
|
|
25367
25020
|
else {
|
|
25368
25021
|
const processedUrl = processNodeUrl(attr.value, attr.type === "srcset", config$2, htmlPath, originalUrl);
|
|
25369
|
-
if (processedUrl !== attr.value) overwriteAttrValue(s
|
|
25022
|
+
if (processedUrl !== attr.value) overwriteAttrValue(s, attr.location, processedUrl);
|
|
25370
25023
|
}
|
|
25371
25024
|
});
|
|
25372
25025
|
const clientModuelGraph = server?.environments.client.moduleGraph;
|
|
@@ -25384,16 +25037,16 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
|
25384
25037
|
if (result.map.mappings) await injectSourcesContent(result.map, proxyModulePath, config$2.logger);
|
|
25385
25038
|
content = getCodeWithSourcemap("css", result.code, result.map);
|
|
25386
25039
|
} else content = result.code;
|
|
25387
|
-
s
|
|
25040
|
+
s.overwrite(start, end, content);
|
|
25388
25041
|
}), ...inlineStyles.map(async ({ index, location: location$1, code }) => {
|
|
25389
25042
|
const url$3 = `${proxyModulePath}?html-proxy&inline-css&style-attr&index=${index}.css`;
|
|
25390
25043
|
const mod = await server.environments.client.moduleGraph.ensureEntryFromUrl(url$3, false);
|
|
25391
25044
|
ensureWatchedFile(watcher, mod.file, config$2.root);
|
|
25392
25045
|
await server?.environments.client.pluginContainer.transform(code, mod.id);
|
|
25393
25046
|
const hash$1 = getHash(cleanUrl(mod.id));
|
|
25394
|
-
overwriteAttrValue(s
|
|
25047
|
+
overwriteAttrValue(s, location$1, htmlProxyResult.get(`${hash$1}_${index}`) ?? "");
|
|
25395
25048
|
})]);
|
|
25396
|
-
html = s
|
|
25049
|
+
html = s.toString();
|
|
25397
25050
|
return {
|
|
25398
25051
|
html,
|
|
25399
25052
|
tags: [{
|
|
@@ -26033,8 +25686,8 @@ async function _createServer(inlineConfig = {}, options$1) {
|
|
|
26033
25686
|
warnFutureDeprecation(config$2, "removeServerHot");
|
|
26034
25687
|
return hot;
|
|
26035
25688
|
},
|
|
26036
|
-
set hot(h
|
|
26037
|
-
hot = h
|
|
25689
|
+
set hot(h) {
|
|
25690
|
+
hot = h;
|
|
26038
25691
|
},
|
|
26039
25692
|
environments,
|
|
26040
25693
|
get pluginContainer() {
|
|
@@ -26286,7 +25939,7 @@ function createServerCloseFn(server) {
|
|
|
26286
25939
|
hasListened = true;
|
|
26287
25940
|
});
|
|
26288
25941
|
return () => new Promise((resolve$4, reject) => {
|
|
26289
|
-
openSockets.forEach((s
|
|
25942
|
+
openSockets.forEach((s) => s.destroy());
|
|
26290
25943
|
if (hasListened) server.close((err$2) => {
|
|
26291
25944
|
if (err$2) reject(err$2);
|
|
26292
25945
|
else resolve$4();
|
|
@@ -26807,7 +26460,7 @@ function isNodeWithinCircularImports(node, nodeChain, currentChain = [node], tra
|
|
|
26807
26460
|
...[...currentChain].reverse(),
|
|
26808
26461
|
...nodeChain.slice(importerIndex, -1).reverse()
|
|
26809
26462
|
];
|
|
26810
|
-
debugHmr(import_picocolors$15.default.yellow(`circular imports detected: `) + importChain.map((m
|
|
26463
|
+
debugHmr(import_picocolors$15.default.yellow(`circular imports detected: `) + importChain.map((m) => import_picocolors$15.default.dim(m.url)).join(" -> "));
|
|
26811
26464
|
}
|
|
26812
26465
|
return true;
|
|
26813
26466
|
}
|
|
@@ -26827,7 +26480,7 @@ function handlePrunedModules(mods, { hot }) {
|
|
|
26827
26480
|
});
|
|
26828
26481
|
hot.send({
|
|
26829
26482
|
type: "prune",
|
|
26830
|
-
paths: [...mods].map((m
|
|
26483
|
+
paths: [...mods].map((m) => m.url)
|
|
26831
26484
|
});
|
|
26832
26485
|
}
|
|
26833
26486
|
var LexerState = /* @__PURE__ */ function(LexerState$1) {
|
|
@@ -27119,7 +26772,7 @@ function definePlugin(config$2) {
|
|
|
27119
26772
|
}
|
|
27120
26773
|
const result = await replaceDefine(this.environment, code, id, define$1);
|
|
27121
26774
|
if (hasDefineImportMetaEnv) {
|
|
27122
|
-
result.code = result.code.replaceAll(getImportMetaEnvKeyRe(marker), (m
|
|
26775
|
+
result.code = result.code.replaceAll(getImportMetaEnvKeyRe(marker), (m) => "undefined".padEnd(m.length));
|
|
27123
26776
|
if (result.code.includes(marker)) {
|
|
27124
26777
|
result.code = `const ${marker} = ${importMetaEnvVal};\n` + result.code;
|
|
27125
26778
|
if (result.map) {
|
|
@@ -27442,29 +27095,29 @@ function webWorkerPlugin(config$2) {
|
|
|
27442
27095
|
injectEnv = ((environment.mode === "dev" ? environment.moduleGraph : void 0)?.getModuleById(ENV_ENTRY))?.transformResult?.code || "";
|
|
27443
27096
|
}
|
|
27444
27097
|
if (injectEnv) {
|
|
27445
|
-
const s
|
|
27446
|
-
s
|
|
27098
|
+
const s = new MagicString(raw);
|
|
27099
|
+
s.prepend(injectEnv + ";\n");
|
|
27447
27100
|
return {
|
|
27448
|
-
code: s
|
|
27449
|
-
map: s
|
|
27101
|
+
code: s.toString(),
|
|
27102
|
+
map: s.generateMap({ hires: "boundary" })
|
|
27450
27103
|
};
|
|
27451
27104
|
}
|
|
27452
27105
|
}
|
|
27453
27106
|
}
|
|
27454
27107
|
},
|
|
27455
27108
|
renderChunk(code, chunk, outputOptions) {
|
|
27456
|
-
let s
|
|
27109
|
+
let s;
|
|
27457
27110
|
const result = () => {
|
|
27458
|
-
return s
|
|
27459
|
-
code: s
|
|
27460
|
-
map: this.environment.config.build.sourcemap ? s
|
|
27111
|
+
return s && {
|
|
27112
|
+
code: s.toString(),
|
|
27113
|
+
map: this.environment.config.build.sourcemap ? s.generateMap({ hires: "boundary" }) : null
|
|
27461
27114
|
};
|
|
27462
27115
|
};
|
|
27463
27116
|
workerAssetUrlRE.lastIndex = 0;
|
|
27464
27117
|
if (workerAssetUrlRE.test(code)) {
|
|
27465
27118
|
const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(outputOptions.format, this.environment.config.isWorker);
|
|
27466
27119
|
let match;
|
|
27467
|
-
s
|
|
27120
|
+
s = new MagicString(code);
|
|
27468
27121
|
workerAssetUrlRE.lastIndex = 0;
|
|
27469
27122
|
const workerOutputCache = workerOutputCaches.get(config$2.mainConfig || config$2);
|
|
27470
27123
|
while (match = workerAssetUrlRE.exec(code)) {
|
|
@@ -27476,7 +27129,7 @@ function webWorkerPlugin(config$2) {
|
|
|
27476
27129
|
}
|
|
27477
27130
|
const replacement = toOutputFilePathInJS(this.environment, filename, "asset", chunk.fileName, "js", toRelativeRuntime);
|
|
27478
27131
|
const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`;
|
|
27479
|
-
s
|
|
27132
|
+
s.update(match.index, match.index + full.length, replacementString);
|
|
27480
27133
|
}
|
|
27481
27134
|
}
|
|
27482
27135
|
return result();
|
|
@@ -27702,8 +27355,8 @@ function importAnalysisPlugin(config$2) {
|
|
|
27702
27355
|
let isSelfAccepting = false;
|
|
27703
27356
|
let hasEnv = false;
|
|
27704
27357
|
let needQueryInjectHelper = false;
|
|
27705
|
-
let s
|
|
27706
|
-
const str = () => s
|
|
27358
|
+
let s;
|
|
27359
|
+
const str = () => s || (s = new MagicString(source));
|
|
27707
27360
|
let isPartiallySelfAccepting = false;
|
|
27708
27361
|
const importedBindings = enablePartialAccept ? /* @__PURE__ */ new Map() : null;
|
|
27709
27362
|
const toAbsoluteUrl = (url$3) => path.posix.resolve(path.posix.dirname(importerModule.url), url$3);
|
|
@@ -27804,9 +27457,9 @@ function importAnalysisPlugin(config$2) {
|
|
|
27804
27457
|
}
|
|
27805
27458
|
if (!rewriteDone) {
|
|
27806
27459
|
const rewrittenUrl = JSON.stringify(url$3);
|
|
27807
|
-
const s$
|
|
27460
|
+
const s$1 = isDynamicImport ? start : start - 1;
|
|
27808
27461
|
const e$1 = isDynamicImport ? end : end + 1;
|
|
27809
|
-
str().overwrite(s$
|
|
27462
|
+
str().overwrite(s$1, e$1, rewrittenUrl, { contentOnly: true });
|
|
27810
27463
|
}
|
|
27811
27464
|
}
|
|
27812
27465
|
const hmrUrl = unwrapId(stripBase(url$3, base));
|
|
@@ -27876,7 +27529,7 @@ function importAnalysisPlugin(config$2) {
|
|
|
27876
27529
|
if (prunedImports) handlePrunedModules(prunedImports, environment);
|
|
27877
27530
|
}
|
|
27878
27531
|
debug$5?.(`${timeFrom(msAtStart)} ${import_picocolors$13.default.dim(`[${importedUrls.size} imports rewritten] ${prettifyUrl(importer, root)}`)}`);
|
|
27879
|
-
if (s
|
|
27532
|
+
if (s) return transformStableResult(s, importer, config$2);
|
|
27880
27533
|
else return source;
|
|
27881
27534
|
}
|
|
27882
27535
|
};
|
|
@@ -27899,9 +27552,9 @@ function createParseErrorInfo(importer, source) {
|
|
|
27899
27552
|
showCodeFrame: !probablyBinary
|
|
27900
27553
|
};
|
|
27901
27554
|
}
|
|
27902
|
-
const interopHelper = (m
|
|
27903
|
-
...typeof m
|
|
27904
|
-
default: m
|
|
27555
|
+
const interopHelper = (m) => m?.__esModule ? m : {
|
|
27556
|
+
...typeof m === "object" && !Array.isArray(m) || typeof m === "function" ? m : {},
|
|
27557
|
+
default: m
|
|
27905
27558
|
};
|
|
27906
27559
|
const interopHelperStr = interopHelper.toString().replaceAll("\n", "");
|
|
27907
27560
|
function interopNamedImports(str, importSpecifier, rewrittenUrl, importIndex, importer, config$2) {
|
|
@@ -28216,7 +27869,7 @@ function workerImportMetaUrlPlugin(config$2) {
|
|
|
28216
27869
|
transform: {
|
|
28217
27870
|
filter: { code: workerImportMetaUrlRE },
|
|
28218
27871
|
async handler(code, id) {
|
|
28219
|
-
let s
|
|
27872
|
+
let s;
|
|
28220
27873
|
const cleanString = stripLiteral(code);
|
|
28221
27874
|
const workerImportMetaUrlRE$1 = /\bnew\s+(?:Worker|SharedWorker)\s*\(\s*(new\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*\))/dg;
|
|
28222
27875
|
let match;
|
|
@@ -28224,7 +27877,7 @@ function workerImportMetaUrlPlugin(config$2) {
|
|
|
28224
27877
|
const [[, endIndex], [expStart, expEnd], [urlStart, urlEnd]] = match.indices;
|
|
28225
27878
|
const rawUrl = code.slice(urlStart, urlEnd);
|
|
28226
27879
|
if (rawUrl[0] === "`" && rawUrl.includes("${")) this.error(`\`new URL(url, import.meta.url)\` is not supported in dynamic template string.`, expStart);
|
|
28227
|
-
s
|
|
27880
|
+
s ||= new MagicString(code);
|
|
28228
27881
|
const workerType = await getWorkerType(code, cleanString, endIndex);
|
|
28229
27882
|
const url$3 = rawUrl.slice(1, -1);
|
|
28230
27883
|
let file;
|
|
@@ -28240,7 +27893,7 @@ function workerImportMetaUrlPlugin(config$2) {
|
|
|
28240
27893
|
file = await workerResolver(this.environment, url$3, id);
|
|
28241
27894
|
file ??= url$3[0] === "/" ? slash(path.join(config$2.publicDir, url$3)) : slash(path.resolve(path.dirname(id), url$3));
|
|
28242
27895
|
}
|
|
28243
|
-
if (isBuild && config$2.isWorker && config$2.bundleChain.at(-1) === cleanUrl(file)) s
|
|
27896
|
+
if (isBuild && config$2.isWorker && config$2.bundleChain.at(-1) === cleanUrl(file)) s.update(expStart, expEnd, "self.location.href");
|
|
28244
27897
|
else {
|
|
28245
27898
|
let builtUrl;
|
|
28246
27899
|
if (isBuild) {
|
|
@@ -28251,10 +27904,10 @@ function workerImportMetaUrlPlugin(config$2) {
|
|
|
28251
27904
|
builtUrl = await fileToUrl$1(this, cleanUrl(file));
|
|
28252
27905
|
builtUrl = injectQuery(builtUrl, `${WORKER_FILE_ID}&type=${workerType}`);
|
|
28253
27906
|
}
|
|
28254
|
-
s
|
|
27907
|
+
s.update(expStart, expEnd, `new URL(/* @vite-ignore */ ${JSON.stringify(builtUrl)}, import.meta.url)`);
|
|
28255
27908
|
}
|
|
28256
27909
|
}
|
|
28257
|
-
if (s
|
|
27910
|
+
if (s) return transformStableResult(s, id, config$2);
|
|
28258
27911
|
return null;
|
|
28259
27912
|
}
|
|
28260
27913
|
}
|
|
@@ -28295,7 +27948,7 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
|
28295
27948
|
code: /new\s+URL.+import\.meta\.url/s
|
|
28296
27949
|
},
|
|
28297
27950
|
async handler(code, id) {
|
|
28298
|
-
let s
|
|
27951
|
+
let s;
|
|
28299
27952
|
const assetImportMetaUrlRE = /\bnew\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*(?:,\s*)?\)/dg;
|
|
28300
27953
|
const cleanString = stripLiteral(code);
|
|
28301
27954
|
let match;
|
|
@@ -28303,7 +27956,7 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
|
28303
27956
|
const [[startIndex, endIndex], [urlStart, urlEnd]] = match.indices;
|
|
28304
27957
|
if (hasViteIgnoreRE.test(code.slice(startIndex, urlStart))) continue;
|
|
28305
27958
|
const rawUrl = code.slice(urlStart, urlEnd);
|
|
28306
|
-
if (!s
|
|
27959
|
+
if (!s) s = new MagicString(code);
|
|
28307
27960
|
if (rawUrl[0] === "`" && rawUrl.includes("${")) {
|
|
28308
27961
|
const queryDelimiterIndex = getQueryDelimiterIndex(rawUrl);
|
|
28309
27962
|
const hasQueryDelimiter = queryDelimiterIndex !== -1;
|
|
@@ -28318,7 +27971,7 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
|
28318
27971
|
import: "default",
|
|
28319
27972
|
query: injectQuery(queryString, "url")
|
|
28320
27973
|
};
|
|
28321
|
-
s
|
|
27974
|
+
s.update(startIndex, endIndex, `new URL((import.meta.glob(${JSON.stringify(pattern)}, ${JSON.stringify(globOptions)}))[${pureUrl}], import.meta.url)`);
|
|
28322
27975
|
continue;
|
|
28323
27976
|
}
|
|
28324
27977
|
}
|
|
@@ -28353,9 +28006,9 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
|
28353
28006
|
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.`);
|
|
28354
28007
|
builtUrl = url$3;
|
|
28355
28008
|
}
|
|
28356
|
-
s
|
|
28009
|
+
s.update(startIndex, endIndex, `new URL(${JSON.stringify(builtUrl)}, import.meta.url)`);
|
|
28357
28010
|
}
|
|
28358
|
-
if (s
|
|
28011
|
+
if (s) return transformStableResult(s, id, config$2);
|
|
28359
28012
|
}
|
|
28360
28013
|
}
|
|
28361
28014
|
};
|
|
@@ -28557,13 +28210,13 @@ function dynamicImportVarsPlugin(config$2) {
|
|
|
28557
28210
|
return null;
|
|
28558
28211
|
}
|
|
28559
28212
|
if (!imports.length) return null;
|
|
28560
|
-
let s
|
|
28213
|
+
let s;
|
|
28561
28214
|
let needDynamicImportHelper = false;
|
|
28562
28215
|
for (let index = 0; index < imports.length; index++) {
|
|
28563
28216
|
const { s: start, e: end, ss: expStart, se: expEnd, d: dynamicIndex } = imports[index];
|
|
28564
28217
|
if (dynamicIndex === -1 || source[start] !== "`") continue;
|
|
28565
28218
|
if (hasViteIgnoreRE.test(source.slice(expStart, expEnd))) continue;
|
|
28566
|
-
s
|
|
28219
|
+
s ||= new MagicString(source);
|
|
28567
28220
|
let result;
|
|
28568
28221
|
try {
|
|
28569
28222
|
result = await transformDynamicImport(source.slice(start, end), importer, (id, importer$1) => resolve$4(environment, id, importer$1), config$2.root);
|
|
@@ -28574,11 +28227,11 @@ function dynamicImportVarsPlugin(config$2) {
|
|
|
28574
28227
|
if (!result) continue;
|
|
28575
28228
|
const { rawPattern, glob: glob$1 } = result;
|
|
28576
28229
|
needDynamicImportHelper = true;
|
|
28577
|
-
s
|
|
28230
|
+
s.overwrite(expStart, expEnd, `__variableDynamicImportRuntimeHelper(${glob$1}, \`${rawPattern}\`, ${rawPattern.split("/").length})`);
|
|
28578
28231
|
}
|
|
28579
|
-
if (s
|
|
28580
|
-
if (needDynamicImportHelper) s
|
|
28581
|
-
return transformStableResult(s
|
|
28232
|
+
if (s) {
|
|
28233
|
+
if (needDynamicImportHelper) s.prepend(`import __variableDynamicImportRuntimeHelper from "${dynamicImportHelperId}";`);
|
|
28234
|
+
return transformStableResult(s, importer, config$2);
|
|
28582
28235
|
}
|
|
28583
28236
|
}
|
|
28584
28237
|
}
|
|
@@ -28780,7 +28433,7 @@ async function transformGlobImport(code, id, root, resolveId, restoreQueryExtens
|
|
|
28780
28433
|
const matches$2 = await parseImportGlob(code, isVirtual ? void 0 : id, root, resolveId, logger);
|
|
28781
28434
|
const matchedFiles = /* @__PURE__ */ new Set();
|
|
28782
28435
|
if (!matches$2.length) return null;
|
|
28783
|
-
const s
|
|
28436
|
+
const s = new MagicString(code);
|
|
28784
28437
|
const staticImports = (await Promise.all(matches$2.map(async ({ globsResolved, isRelative: isRelative$1, options: options$1, index, start, end, onlyKeys, onlyValues }) => {
|
|
28785
28438
|
const files = (await glob(globsResolved, {
|
|
28786
28439
|
absolute: true,
|
|
@@ -28852,12 +28505,12 @@ async function transformGlobImport(code, id, root, resolveId, restoreQueryExtens
|
|
|
28852
28505
|
if (onlyKeys) replacement = `{${objectProps.join(",")}${lineBreaks}}`;
|
|
28853
28506
|
else if (onlyValues) replacement = `[${objectProps.join(",")}${lineBreaks}]`;
|
|
28854
28507
|
else replacement = `/* #__PURE__ */ Object.assign({${objectProps.join(",")}${lineBreaks}})`;
|
|
28855
|
-
s
|
|
28508
|
+
s.overwrite(start, end, replacement);
|
|
28856
28509
|
return staticImports$1;
|
|
28857
28510
|
}))).flat();
|
|
28858
|
-
if (staticImports.length) s
|
|
28511
|
+
if (staticImports.length) s.prepend(`${staticImports.join(";")};`);
|
|
28859
28512
|
return {
|
|
28860
|
-
s
|
|
28513
|
+
s,
|
|
28861
28514
|
matches: matches$2,
|
|
28862
28515
|
files: matchedFiles
|
|
28863
28516
|
};
|
|
@@ -29723,10 +29376,10 @@ var TransformPluginContext = class extends LoadPluginContext {
|
|
|
29723
29376
|
this.sourcemapChain.length = 0;
|
|
29724
29377
|
return combinedMap;
|
|
29725
29378
|
}
|
|
29726
|
-
for (let m
|
|
29727
|
-
if (typeof m
|
|
29728
|
-
if (!("version" in m
|
|
29729
|
-
if (m
|
|
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 === "") {
|
|
29730
29383
|
combinedMap = { mappings: "" };
|
|
29731
29384
|
break;
|
|
29732
29385
|
}
|
|
@@ -29734,14 +29387,14 @@ var TransformPluginContext = class extends LoadPluginContext {
|
|
|
29734
29387
|
break;
|
|
29735
29388
|
}
|
|
29736
29389
|
if (!combinedMap) {
|
|
29737
|
-
const sm = m
|
|
29390
|
+
const sm = m;
|
|
29738
29391
|
if (sm.sources.length === 1 && !sm.sources[0]) combinedMap = {
|
|
29739
29392
|
...sm,
|
|
29740
29393
|
sources: [this.filename],
|
|
29741
29394
|
sourcesContent: [this.originalCode]
|
|
29742
29395
|
};
|
|
29743
29396
|
else combinedMap = sm;
|
|
29744
|
-
} else combinedMap = combineSourcemaps(cleanUrl(this.filename), [m
|
|
29397
|
+
} else combinedMap = combineSourcemaps(cleanUrl(this.filename), [m, combinedMap]);
|
|
29745
29398
|
}
|
|
29746
29399
|
if (combinedMap !== this.combinedMap) {
|
|
29747
29400
|
this.combinedMap = combinedMap;
|
|
@@ -30358,7 +30011,7 @@ function cssPostPlugin(config$2) {
|
|
|
30358
30011
|
ext
|
|
30359
30012
|
}));
|
|
30360
30013
|
}
|
|
30361
|
-
let s
|
|
30014
|
+
let s;
|
|
30362
30015
|
const urlEmitTasks = [];
|
|
30363
30016
|
if (code.includes("__VITE_CSS_URL__")) {
|
|
30364
30017
|
let match;
|
|
@@ -30385,7 +30038,7 @@ function cssPostPlugin(config$2) {
|
|
|
30385
30038
|
})));
|
|
30386
30039
|
if (urlEmitTasks.length > 0) {
|
|
30387
30040
|
const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(opts.format, config$2.isWorker);
|
|
30388
|
-
s
|
|
30041
|
+
s ||= new MagicString(code);
|
|
30389
30042
|
for (const { cssAssetName, originalFileName, content, start, end } of urlEmitTasks) {
|
|
30390
30043
|
const referenceId = this.emitFile({
|
|
30391
30044
|
type: "asset",
|
|
@@ -30397,7 +30050,7 @@ function cssPostPlugin(config$2) {
|
|
|
30397
30050
|
chunk.viteMetadata.importedAssets.add(cleanUrl(filename));
|
|
30398
30051
|
const replacement = toOutputFilePathInJS(this.environment, filename, "asset", chunk.fileName, "js", toRelativeRuntime);
|
|
30399
30052
|
const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`;
|
|
30400
|
-
s
|
|
30053
|
+
s.update(start, end, replacementString);
|
|
30401
30054
|
}
|
|
30402
30055
|
}
|
|
30403
30056
|
if (chunkCSS !== void 0) {
|
|
@@ -30436,19 +30089,19 @@ function cssPostPlugin(config$2) {
|
|
|
30436
30089
|
} else if (code.includes(singleQuoteUseStrict)) injectionPoint = code.indexOf(singleQuoteUseStrict) + singleQuoteUseStrict.length;
|
|
30437
30090
|
else if (code.includes(doubleQuoteUseStrict)) injectionPoint = code.indexOf(doubleQuoteUseStrict) + doubleQuoteUseStrict.length;
|
|
30438
30091
|
else throw new Error("Injection point for inlined CSS not found");
|
|
30439
|
-
s
|
|
30440
|
-
s
|
|
30092
|
+
s ||= new MagicString(code);
|
|
30093
|
+
s.appendRight(injectionPoint, injectCode);
|
|
30441
30094
|
}
|
|
30442
30095
|
} else {
|
|
30443
30096
|
chunkCSS = resolveAssetUrlsInCss(chunkCSS, getCssBundleName());
|
|
30444
30097
|
chunkCSSMap.set(chunk.fileName, chunkCSS);
|
|
30445
30098
|
}
|
|
30446
30099
|
}
|
|
30447
|
-
if (s
|
|
30448
|
-
code: s
|
|
30449
|
-
map: s
|
|
30100
|
+
if (s) if (config$2.build.sourcemap) return {
|
|
30101
|
+
code: s.toString(),
|
|
30102
|
+
map: s.generateMap({ hires: "boundary" })
|
|
30450
30103
|
};
|
|
30451
|
-
else return { code: s
|
|
30104
|
+
else return { code: s.toString() };
|
|
30452
30105
|
return null;
|
|
30453
30106
|
},
|
|
30454
30107
|
augmentChunkHash(chunk) {
|
|
@@ -30554,10 +30207,10 @@ function isCssScopeToRendered(cssScopeTo, renderedModules) {
|
|
|
30554
30207
|
function getEmptyChunkReplacer(pureCssChunkNames, outputFormat) {
|
|
30555
30208
|
const emptyChunkFiles = pureCssChunkNames.map((file) => escapeRegex(path.basename(file))).join("|");
|
|
30556
30209
|
const emptyChunkRE = new RegExp(outputFormat === "es" ? `\\bimport\\s*["'][^"']*(?:${emptyChunkFiles})["'];` : `(\\b|,\\s*)require\\(\\s*["'][^"']*(?:${emptyChunkFiles})["']\\)(;|,)`, "g");
|
|
30557
|
-
return (code) => code.replace(emptyChunkRE, (m
|
|
30558
|
-
if (outputFormat === "es") return `/* empty css ${"".padEnd(m
|
|
30559
|
-
if (p2 === ";") return `${p2}/* empty css ${"".padEnd(m
|
|
30560
|
-
return `${p1}/* empty css ${"".padEnd(m
|
|
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)}*/`;
|
|
30561
30214
|
});
|
|
30562
30215
|
}
|
|
30563
30216
|
const fileURLWithWindowsDriveRE = /^file:\/\/\/[a-zA-Z]:\//;
|
|
@@ -31058,24 +30711,24 @@ function resolveMinifyCssEsbuildOptions(options$1) {
|
|
|
31058
30711
|
const atImportRE = /@import(?:\s*(?:url\([^)]*\)|"(?:[^"]|(?<=\\)")*"|'(?:[^']|(?<=\\)')*').*?|[^;]*);/g;
|
|
31059
30712
|
const atCharsetRE = /@charset(?:\s*(?:"(?:[^"]|(?<=\\)")*"|'(?:[^']|(?<=\\)')*').*?|[^;]*);/g;
|
|
31060
30713
|
async function hoistAtRules(css) {
|
|
31061
|
-
const s
|
|
30714
|
+
const s = new MagicString(css);
|
|
31062
30715
|
const cleanCss = emptyCssComments(css);
|
|
31063
30716
|
let match;
|
|
31064
30717
|
atImportRE.lastIndex = 0;
|
|
31065
30718
|
while (match = atImportRE.exec(cleanCss)) {
|
|
31066
|
-
s
|
|
31067
|
-
s
|
|
30719
|
+
s.remove(match.index, match.index + match[0].length);
|
|
30720
|
+
s.appendLeft(0, match[0]);
|
|
31068
30721
|
}
|
|
31069
30722
|
atCharsetRE.lastIndex = 0;
|
|
31070
30723
|
let foundCharset = false;
|
|
31071
30724
|
while (match = atCharsetRE.exec(cleanCss)) {
|
|
31072
|
-
s
|
|
30725
|
+
s.remove(match.index, match.index + match[0].length);
|
|
31073
30726
|
if (!foundCharset) {
|
|
31074
|
-
s
|
|
30727
|
+
s.prepend(match[0]);
|
|
31075
30728
|
foundCharset = true;
|
|
31076
30729
|
}
|
|
31077
30730
|
}
|
|
31078
|
-
return s
|
|
30731
|
+
return s.toString();
|
|
31079
30732
|
}
|
|
31080
30733
|
const loadedPreprocessorPath = {};
|
|
31081
30734
|
function loadPreprocessorPath(lang, root) {
|
|
@@ -31389,7 +31042,7 @@ const makeStylWorker = (maxWorkers) => {
|
|
|
31389
31042
|
};
|
|
31390
31043
|
}, {
|
|
31391
31044
|
shouldUseFake(_stylusPath, _content, _root, options$1) {
|
|
31392
|
-
return !!(options$1.define && Object.values(options$1.define).some((d
|
|
31045
|
+
return !!(options$1.define && Object.values(options$1.define).some((d) => typeof d === "function"));
|
|
31393
31046
|
},
|
|
31394
31047
|
max: maxWorkers
|
|
31395
31048
|
});
|
|
@@ -32048,7 +31701,7 @@ async function computeEntries(environment) {
|
|
|
32048
31701
|
}
|
|
32049
31702
|
async function prepareEsbuildScanner(environment, entries, deps, missing) {
|
|
32050
31703
|
const plugin = esbuildScanPlugin(environment, deps, missing, entries);
|
|
32051
|
-
const { plugins: plugins$1 = []
|
|
31704
|
+
const { plugins: plugins$1 = [], ...esbuildOptions } = environment.config.optimizeDeps.esbuildOptions ?? {};
|
|
32052
31705
|
let tsconfigRaw = esbuildOptions.tsconfigRaw;
|
|
32053
31706
|
if (!tsconfigRaw && !esbuildOptions.tsconfig) {
|
|
32054
31707
|
const { tsconfig } = await loadTsconfigJsonForFile(path.join(environment.config.root, "_dummy.js"));
|
|
@@ -32312,9 +31965,9 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
|
|
|
32312
31965
|
function extractImportPaths(code) {
|
|
32313
31966
|
code = code.replace(multilineCommentsRE, "/* */").replace(singlelineCommentsRE, "");
|
|
32314
31967
|
let js = "";
|
|
32315
|
-
let m
|
|
31968
|
+
let m;
|
|
32316
31969
|
importsRE.lastIndex = 0;
|
|
32317
|
-
while ((m
|
|
31970
|
+
while ((m = importsRE.exec(code)) != null) js += `\nimport ${m[1]}`;
|
|
32318
31971
|
return js;
|
|
32319
31972
|
}
|
|
32320
31973
|
function shouldExternalizeDep(resolvedId, rawId) {
|
|
@@ -32621,7 +32274,7 @@ function runOptimizeDeps(environment, depsInfo) {
|
|
|
32621
32274
|
const processingCacheDirOutputPath = path.relative(process.cwd(), processingCacheDir);
|
|
32622
32275
|
for (const id in depsInfo) {
|
|
32623
32276
|
const output = esbuildOutputFromId(meta.outputs, id, processingCacheDir);
|
|
32624
|
-
const { exportsData
|
|
32277
|
+
const { exportsData, ...info } = depsInfo[id];
|
|
32625
32278
|
addOptimizedDepInfo(metadata, "optimized", {
|
|
32626
32279
|
...info,
|
|
32627
32280
|
fileHash: getHash(metadata.hash + depsInfo[id].file + JSON.stringify(output.imports)),
|
|
@@ -32680,7 +32333,7 @@ async function prepareEsbuildOptimizerRun(environment, depsInfo, processingCache
|
|
|
32680
32333
|
const flatIdDeps = {};
|
|
32681
32334
|
const idToExports = {};
|
|
32682
32335
|
const { optimizeDeps: optimizeDeps$1 } = environment.config;
|
|
32683
|
-
const { plugins: pluginsFromConfig = []
|
|
32336
|
+
const { plugins: pluginsFromConfig = [], ...esbuildOptions } = optimizeDeps$1.esbuildOptions ?? {};
|
|
32684
32337
|
await Promise.all(Object.keys(depsInfo).map(async (id) => {
|
|
32685
32338
|
const src = depsInfo[id].src;
|
|
32686
32339
|
const exportsData = await (depsInfo[id].exportsData ?? extractExportsData(environment, src));
|
|
@@ -33583,7 +33236,7 @@ function loadTerserPath(root) {
|
|
|
33583
33236
|
throw new Error("terser not found. Since Vite v3, terser has become an optional dependency. You need to install it.");
|
|
33584
33237
|
}
|
|
33585
33238
|
function terserPlugin(config$2) {
|
|
33586
|
-
const { maxWorkers
|
|
33239
|
+
const { maxWorkers, ...terserOptions } = config$2.build.terserOptions;
|
|
33587
33240
|
const makeWorker = () => new WorkerWithFallback(() => async (terserPath$1, code, options$1) => {
|
|
33588
33241
|
const terser = await import(terserPath$1);
|
|
33589
33242
|
try {
|
|
@@ -33816,7 +33469,7 @@ function completeSystemWrapPlugin() {
|
|
|
33816
33469
|
name: "vite:force-systemjs-wrap-complete",
|
|
33817
33470
|
renderChunk(code, _chunk, opts) {
|
|
33818
33471
|
if (opts.format === "system") return {
|
|
33819
|
-
code: code.replace(SystemJSWrapRE, (s
|
|
33472
|
+
code: code.replace(SystemJSWrapRE, (s, s1) => s.replace(s1, "(exports, module)")),
|
|
33820
33473
|
map: null
|
|
33821
33474
|
};
|
|
33822
33475
|
}
|
|
@@ -33938,10 +33591,7 @@ function prepareOutDir(outDirs, emptyOutDir, environment) {
|
|
|
33938
33591
|
}).filter(Boolean), ".git"]);
|
|
33939
33592
|
if (environment.config.build.copyPublicDir && publicDir && fs.existsSync(publicDir)) {
|
|
33940
33593
|
if (!areSeparateFolders(outDir, publicDir)) environment.logger.warn(import_picocolors$5.default.yellow(`\n${import_picocolors$5.default.bold(`(!)`)} The public directory feature may not work correctly. outDir ${import_picocolors$5.default.white(import_picocolors$5.default.dim(outDir))} and publicDir ${import_picocolors$5.default.white(import_picocolors$5.default.dim(publicDir))} are not separate folders.\n`));
|
|
33941
|
-
|
|
33942
|
-
recursive: true,
|
|
33943
|
-
mode: fs.constants.COPYFILE_FICLONE
|
|
33944
|
-
});
|
|
33594
|
+
copyDir(publicDir, outDir);
|
|
33945
33595
|
}
|
|
33946
33596
|
}
|
|
33947
33597
|
}
|
|
@@ -33987,7 +33637,7 @@ const _buildEnvironmentOptionsDefaults = Object.freeze({
|
|
|
33987
33637
|
const buildEnvironmentOptionsDefaults = _buildEnvironmentOptionsDefaults;
|
|
33988
33638
|
function resolveBuildEnvironmentOptions(raw, logger, consumer) {
|
|
33989
33639
|
const deprecatedPolyfillModulePreload = raw.polyfillModulePreload;
|
|
33990
|
-
const { polyfillModulePreload
|
|
33640
|
+
const { polyfillModulePreload, ...rest } = raw;
|
|
33991
33641
|
raw = rest;
|
|
33992
33642
|
if (deprecatedPolyfillModulePreload !== void 0) logger.warn("polyfillModulePreload is deprecated. Use modulePreload.polyfill instead.");
|
|
33993
33643
|
if (deprecatedPolyfillModulePreload === false && raw.modulePreload === void 0) raw.modulePreload = { polyfill: false };
|
|
@@ -34293,14 +33943,14 @@ function isExternal(id, test) {
|
|
|
34293
33943
|
else return test.test(id);
|
|
34294
33944
|
}
|
|
34295
33945
|
function injectEnvironmentToHooks(environment, plugin) {
|
|
34296
|
-
const { resolveId, load: load$
|
|
33946
|
+
const { resolveId, load: load$2, transform: transform$2 } = plugin;
|
|
34297
33947
|
const clone$1 = { ...plugin };
|
|
34298
33948
|
for (const hook of Object.keys(clone$1)) switch (hook) {
|
|
34299
33949
|
case "resolveId":
|
|
34300
33950
|
clone$1[hook] = wrapEnvironmentResolveId(environment, resolveId, plugin.name);
|
|
34301
33951
|
break;
|
|
34302
33952
|
case "load":
|
|
34303
|
-
clone$1[hook] = wrapEnvironmentLoad(environment, load$
|
|
33953
|
+
clone$1[hook] = wrapEnvironmentLoad(environment, load$2, plugin.name);
|
|
34304
33954
|
break;
|
|
34305
33955
|
case "transform":
|
|
34306
33956
|
clone$1[hook] = wrapEnvironmentTransform(environment, transform$2, plugin.name);
|
|
@@ -34605,7 +34255,7 @@ async function fetchModule(environment, url$3, importer, options$1 = {}) {
|
|
|
34605
34255
|
let result = await environment.transformRequest(url$3);
|
|
34606
34256
|
if (!result) throw new Error(`[vite] transform failed for module '${url$3}'${importer ? ` imported from '${importer}'` : ""}.`);
|
|
34607
34257
|
if (options$1.inlineSourceMap !== false) result = inlineSourceMap(mod, result, options$1.startOffset);
|
|
34608
|
-
if (result.code[0] === "#") result.code = result.code.replace(/^#!.*/, (s
|
|
34258
|
+
if (result.code[0] === "#") result.code = result.code.replace(/^#!.*/, (s) => " ".repeat(s.length));
|
|
34609
34259
|
return {
|
|
34610
34260
|
code: result.code,
|
|
34611
34261
|
file: mod.file,
|
|
@@ -34644,7 +34294,7 @@ function createDepsOptimizer(environment) {
|
|
|
34644
34294
|
const { noDiscovery, holdUntilCrawlEnd } = options$1;
|
|
34645
34295
|
let metadata = initDepsOptimizerMetadata(environment, sessionTimestamp);
|
|
34646
34296
|
const depsOptimizer = {
|
|
34647
|
-
init: init$
|
|
34297
|
+
init: init$2,
|
|
34648
34298
|
metadata,
|
|
34649
34299
|
registerMissingImport,
|
|
34650
34300
|
run: () => debouncedProcessing(0),
|
|
@@ -34692,7 +34342,7 @@ function createDepsOptimizer(environment) {
|
|
|
34692
34342
|
]);
|
|
34693
34343
|
}
|
|
34694
34344
|
let inited = false;
|
|
34695
|
-
async function init$
|
|
34345
|
+
async function init$2() {
|
|
34696
34346
|
if (inited) return;
|
|
34697
34347
|
inited = true;
|
|
34698
34348
|
const cachedMetadata = await loadCachedDepOptimizationMetadata(environment);
|
|
@@ -34757,7 +34407,7 @@ function createDepsOptimizer(environment) {
|
|
|
34757
34407
|
const metadata$1 = depsOptimizer.metadata;
|
|
34758
34408
|
for (const dep of Object.keys(metadata$1.optimized)) knownDeps[dep] = { ...metadata$1.optimized[dep] };
|
|
34759
34409
|
for (const dep of Object.keys(metadata$1.discovered)) {
|
|
34760
|
-
const { processing
|
|
34410
|
+
const { processing, ...info } = metadata$1.discovered[dep];
|
|
34761
34411
|
knownDeps[dep] = info;
|
|
34762
34412
|
}
|
|
34763
34413
|
return knownDeps;
|
|
@@ -34967,13 +34617,13 @@ function createExplicitDepsOptimizer(environment) {
|
|
|
34967
34617
|
registerMissingImport: () => {
|
|
34968
34618
|
throw new Error(`Vite Internal Error: registerMissingImport is not supported in dev ${environment.name}`);
|
|
34969
34619
|
},
|
|
34970
|
-
init: init$
|
|
34620
|
+
init: init$2,
|
|
34971
34621
|
run: () => {},
|
|
34972
34622
|
close: async () => {},
|
|
34973
34623
|
options: environment.config.optimizeDeps
|
|
34974
34624
|
};
|
|
34975
34625
|
let inited = false;
|
|
34976
|
-
async function init$
|
|
34626
|
+
async function init$2() {
|
|
34977
34627
|
if (inited) return;
|
|
34978
34628
|
inited = true;
|
|
34979
34629
|
depsOptimizer.metadata = await optimizeExplicitEnvironmentDeps(environment);
|
|
@@ -35229,7 +34879,7 @@ var EnvironmentModuleGraph = class {
|
|
|
35229
34879
|
this.fileToModulesMap.set(file, fileMappedModules);
|
|
35230
34880
|
}
|
|
35231
34881
|
const url$3 = `${FS_PREFIX}${file}`;
|
|
35232
|
-
for (const m
|
|
34882
|
+
for (const m of fileMappedModules) if ((m.url === url$3 || m.id === file) && m.type === "asset") return m;
|
|
35233
34883
|
const mod = new EnvironmentModuleNode(url$3, this.environment);
|
|
35234
34884
|
mod.type = "asset";
|
|
35235
34885
|
mod.file = file;
|
|
@@ -35487,12 +35137,12 @@ var DevEnvironment = class extends BaseEnvironment {
|
|
|
35487
35137
|
this._crawlEndFinder.registerRequestProcessing(id, done);
|
|
35488
35138
|
}
|
|
35489
35139
|
};
|
|
35490
|
-
function invalidateModule(environment, m
|
|
35491
|
-
const mod = environment.moduleGraph.urlToModuleMap.get(m
|
|
35140
|
+
function invalidateModule(environment, m) {
|
|
35141
|
+
const mod = environment.moduleGraph.urlToModuleMap.get(m.path);
|
|
35492
35142
|
if (mod && mod.isSelfAccepting && mod.lastHMRTimestamp > 0 && !mod.lastHMRInvalidationReceived) {
|
|
35493
35143
|
mod.lastHMRInvalidationReceived = true;
|
|
35494
|
-
environment.logger.info(import_picocolors$1.default.yellow(`hmr invalidate `) + import_picocolors$1.default.dim(m
|
|
35495
|
-
updateModules(environment, getShortName(mod.file, environment.config.root), [...mod.importers], mod.lastHMRTimestamp, m
|
|
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);
|
|
35496
35146
|
}
|
|
35497
35147
|
}
|
|
35498
35148
|
const callCrawlEndIfIdleAfterMs = 50;
|
|
@@ -35808,10 +35458,10 @@ async function runnerImport(moduleId, inlineConfig) {
|
|
|
35808
35458
|
const module$1 = await environment.runner.import(moduleId);
|
|
35809
35459
|
return {
|
|
35810
35460
|
module: module$1,
|
|
35811
|
-
dependencies: [...environment.runner.evaluatedModules.urlToIdModuleMap.values()].filter((m
|
|
35812
|
-
if (!m
|
|
35813
|
-
return m
|
|
35814
|
-
}).map((m
|
|
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)
|
|
35815
35465
|
};
|
|
35816
35466
|
} finally {
|
|
35817
35467
|
await environment.close();
|