vite 7.2.2 → 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 +1014 -1371
- 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;
|
|
@@ -2467,8 +2218,8 @@ function optimizeSafeRealPathSync() {
|
|
|
2467
2218
|
if (error$1) return;
|
|
2468
2219
|
const lines = stdout.split("\n");
|
|
2469
2220
|
for (const line of lines) {
|
|
2470
|
-
const m
|
|
2471
|
-
if (m
|
|
2221
|
+
const m = parseNetUseRE.exec(line);
|
|
2222
|
+
if (m) windowsNetworkMap.set(m[2], m[1]);
|
|
2472
2223
|
}
|
|
2473
2224
|
if (windowsNetworkMap.size === 0) safeRealpathSync = fs.realpathSync.native;
|
|
2474
2225
|
else safeRealpathSync = windowsMappedRealpathSync;
|
|
@@ -2545,7 +2296,7 @@ const nullSourceMap = {
|
|
|
2545
2296
|
* Note that the length of sourcemapList must be 2.
|
|
2546
2297
|
*/
|
|
2547
2298
|
function combineSourcemaps(filename, sourcemapList) {
|
|
2548
|
-
if (sourcemapList.length === 0 || sourcemapList.every((m
|
|
2299
|
+
if (sourcemapList.length === 0 || sourcemapList.every((m) => m.sources.length === 0)) return { ...nullSourceMap };
|
|
2549
2300
|
sourcemapList = sourcemapList.map((sourcemap) => {
|
|
2550
2301
|
const newSourcemaps = { ...sourcemap };
|
|
2551
2302
|
newSourcemaps.sources = sourcemap.sources.map((source) => source ? escapeToLinuxLikePath(source) : null);
|
|
@@ -2555,7 +2306,7 @@ function combineSourcemaps(filename, sourcemapList) {
|
|
|
2555
2306
|
const escapedFilename = escapeToLinuxLikePath(filename);
|
|
2556
2307
|
let map$1;
|
|
2557
2308
|
let mapIndex = 1;
|
|
2558
|
-
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);
|
|
2559
2310
|
else map$1 = remapping(sourcemapList[0], function loader$1(sourcefile) {
|
|
2560
2311
|
if (sourcefile === escapedFilename && sourcemapList[mapIndex]) return sourcemapList[mapIndex++];
|
|
2561
2312
|
else return null;
|
|
@@ -2677,9 +2428,9 @@ const requestQuerySplitRE = /\?(?!.*[/|}])/;
|
|
|
2677
2428
|
const requestQueryMaybeEscapedSplitRE = /\\?\?(?!.*[/|}])/;
|
|
2678
2429
|
const blankReplacer = (match) => " ".repeat(match.length);
|
|
2679
2430
|
function getHash(text, length = 8) {
|
|
2680
|
-
const h
|
|
2681
|
-
if (length <= 64) return h
|
|
2682
|
-
return h
|
|
2431
|
+
const h = crypto.hash("sha256", text, "hex").substring(0, length);
|
|
2432
|
+
if (length <= 64) return h;
|
|
2433
|
+
return h.padEnd(length, "_");
|
|
2683
2434
|
}
|
|
2684
2435
|
function emptyCssComments(raw) {
|
|
2685
2436
|
return raw.replace(multilineCommentsRE, blankReplacer);
|
|
@@ -2796,10 +2547,10 @@ function normalizeSingleAlias({ find: find$1, replacement, customResolver }) {
|
|
|
2796
2547
|
* Transforms transpiled code result where line numbers aren't altered,
|
|
2797
2548
|
* so we can skip sourcemap generation during dev
|
|
2798
2549
|
*/
|
|
2799
|
-
function transformStableResult(s
|
|
2550
|
+
function transformStableResult(s, id, config$2) {
|
|
2800
2551
|
return {
|
|
2801
|
-
code: s
|
|
2802
|
-
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({
|
|
2803
2554
|
hires: "boundary",
|
|
2804
2555
|
source: id
|
|
2805
2556
|
}) : null
|
|
@@ -3241,9 +2992,9 @@ function getLocator(source) {
|
|
|
3241
2992
|
let i$1 = 0;
|
|
3242
2993
|
let j = lineOffsets.length;
|
|
3243
2994
|
while (i$1 < j) {
|
|
3244
|
-
const m
|
|
3245
|
-
if (index < lineOffsets[m
|
|
3246
|
-
else i$1 = m
|
|
2995
|
+
const m = i$1 + j >> 1;
|
|
2996
|
+
if (index < lineOffsets[m]) j = m;
|
|
2997
|
+
else i$1 = m + 1;
|
|
3247
2998
|
}
|
|
3248
2999
|
const line = i$1 - 1;
|
|
3249
3000
|
return {
|
|
@@ -3479,14 +3230,14 @@ var MagicString = class MagicString {
|
|
|
3479
3230
|
generateDecodedMap(options$1) {
|
|
3480
3231
|
options$1 = options$1 || {};
|
|
3481
3232
|
const sourceIndex = 0;
|
|
3482
|
-
const names = Object.keys(this.storedNames);
|
|
3233
|
+
const names$1 = Object.keys(this.storedNames);
|
|
3483
3234
|
const mappings = new Mappings(options$1.hires);
|
|
3484
3235
|
const locate = getLocator(this.original);
|
|
3485
3236
|
if (this.intro) mappings.advance(this.intro);
|
|
3486
3237
|
this.firstChunk.eachNext((chunk) => {
|
|
3487
3238
|
const loc = locate(chunk.start);
|
|
3488
3239
|
if (chunk.intro.length) mappings.advance(chunk.intro);
|
|
3489
|
-
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);
|
|
3490
3241
|
else mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);
|
|
3491
3242
|
if (chunk.outro.length) mappings.advance(chunk.outro);
|
|
3492
3243
|
});
|
|
@@ -3495,7 +3246,7 @@ var MagicString = class MagicString {
|
|
|
3495
3246
|
file: options$1.file ? options$1.file.split(/[/\\]/).pop() : void 0,
|
|
3496
3247
|
sources: [options$1.source ? getRelativePath(options$1.file || "", options$1.source) : options$1.file || ""],
|
|
3497
3248
|
sourcesContent: options$1.includeContent ? [this.original] : void 0,
|
|
3498
|
-
names,
|
|
3249
|
+
names: names$1,
|
|
3499
3250
|
mappings: mappings.raw,
|
|
3500
3251
|
x_google_ignoreList: this.ignoreList ? [sourceIndex] : void 0
|
|
3501
3252
|
};
|
|
@@ -3977,6 +3728,7 @@ var require_is_reference = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
3977
3728
|
(function(global$1, factory) {
|
|
3978
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());
|
|
3979
3730
|
})(exports, (function() {
|
|
3731
|
+
"use strict";
|
|
3980
3732
|
function isReference$1(node, parent) {
|
|
3981
3733
|
if (node.type === "MemberExpression") return !node.computed && isReference$1(node.object, node);
|
|
3982
3734
|
if (node.type === "Identifier") {
|
|
@@ -4001,14 +3753,14 @@ var require_is_reference = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
4001
3753
|
}) });
|
|
4002
3754
|
|
|
4003
3755
|
//#endregion
|
|
4004
|
-
//#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
|
|
4005
3757
|
var import_commondir = /* @__PURE__ */ __toESM(require_commondir(), 1);
|
|
4006
3758
|
var import_is_reference = /* @__PURE__ */ __toESM(require_is_reference(), 1);
|
|
4007
|
-
var version$1 = "
|
|
3759
|
+
var version$1 = "29.0.0";
|
|
4008
3760
|
var peerDependencies = { rollup: "^2.68.0||^3.0.0||^4.0.0" };
|
|
4009
|
-
function tryParse(parse$
|
|
3761
|
+
function tryParse(parse$15, code, id) {
|
|
4010
3762
|
try {
|
|
4011
|
-
return parse$
|
|
3763
|
+
return parse$15(code, { allowReturnOutsideFunction: true });
|
|
4012
3764
|
} catch (err$2) {
|
|
4013
3765
|
err$2.message += ` in ${id}`;
|
|
4014
3766
|
throw err$2;
|
|
@@ -4019,8 +3771,8 @@ const firstpassNoGlobal = /\b(?:require|module|exports)\b/;
|
|
|
4019
3771
|
function hasCjsKeywords(code, ignoreGlobal) {
|
|
4020
3772
|
return (ignoreGlobal ? firstpassNoGlobal : firstpassGlobal).test(code);
|
|
4021
3773
|
}
|
|
4022
|
-
function analyzeTopLevelStatements(parse$
|
|
4023
|
-
const ast = tryParse(parse$
|
|
3774
|
+
function analyzeTopLevelStatements(parse$15, code, id) {
|
|
3775
|
+
const ast = tryParse(parse$15, code, id);
|
|
4024
3776
|
let isEsModule = false;
|
|
4025
3777
|
let hasDefaultExport = false;
|
|
4026
3778
|
let hasNamedExports = false;
|
|
@@ -4340,6 +4092,11 @@ function getEsImportProxy(id, defaultIsModuleExports, moduleSideEffects) {
|
|
|
4340
4092
|
syntheticNamedExports: "__moduleExports"
|
|
4341
4093
|
};
|
|
4342
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
|
+
}
|
|
4343
4100
|
function getCandidatesForExtension(resolved, extension$1) {
|
|
4344
4101
|
return [resolved + extension$1, `${resolved}${sep$1}index${extension$1}`];
|
|
4345
4102
|
}
|
|
@@ -4402,7 +4159,7 @@ function getResolveId(extensions$1, isPossibleCjsId) {
|
|
|
4402
4159
|
}
|
|
4403
4160
|
};
|
|
4404
4161
|
}
|
|
4405
|
-
function getRequireResolver(extensions$1, detectCyclesAndConditional, currentlyResolving) {
|
|
4162
|
+
function getRequireResolver(extensions$1, detectCyclesAndConditional, currentlyResolving, requireNodeBuiltins) {
|
|
4406
4163
|
const knownCjsModuleTypes = Object.create(null);
|
|
4407
4164
|
const requiredIds = Object.create(null);
|
|
4408
4165
|
const unconditionallyRequiredIds = Object.create(null);
|
|
@@ -4501,13 +4258,27 @@ function getRequireResolver(extensions$1, detectCyclesAndConditional, currentlyR
|
|
|
4501
4258
|
parentMeta.isCommonJS = getTypeForFullyAnalyzedModule(parentId);
|
|
4502
4259
|
fullyAnalyzedModules[parentId] = true;
|
|
4503
4260
|
return requireTargets.map(({ id: dependencyId, allowProxy }, index) => {
|
|
4504
|
-
|
|
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
|
+
}
|
|
4505
4275
|
const isWrappedCommonJS = isCommonJS === IS_WRAPPED_COMMONJS;
|
|
4506
4276
|
fullyAnalyzedModules[dependencyId] = true;
|
|
4277
|
+
const moduleInfo = isWrappedCommonJS && !isExternalWrapped ? rollupContext.getModuleInfo(dependencyId) : null;
|
|
4507
4278
|
return {
|
|
4508
|
-
wrappedModuleSideEffects: isWrappedCommonJS
|
|
4279
|
+
wrappedModuleSideEffects: !isWrappedCommonJS ? false : moduleInfo?.moduleSideEffects ?? true,
|
|
4509
4280
|
source: sources[index].source,
|
|
4510
|
-
id: allowProxy ? wrapId$1(
|
|
4281
|
+
id: allowProxy ? wrapId$1(resolvedDependencyId, isWrappedCommonJS ? WRAPPED_SUFFIX : PROXY_SUFFIX) : resolvedDependencyId,
|
|
4511
4282
|
isCommonJS
|
|
4512
4283
|
};
|
|
4513
4284
|
});
|
|
@@ -4741,7 +4512,7 @@ function getRequireHandlers() {
|
|
|
4741
4512
|
processRequireExpressions(imports, await resolveRequireSourcesAndUpdateMeta(id, needsRequireWrapper ? IS_WRAPPED_COMMONJS : !isEsModule, commonjsMeta, Object.keys(requiresBySource).map((source) => {
|
|
4742
4513
|
return {
|
|
4743
4514
|
source,
|
|
4744
|
-
isConditional: requiresBySource[source].every((require$
|
|
4515
|
+
isConditional: requiresBySource[source].every((require$2) => require$2.isInsideConditional)
|
|
4745
4516
|
};
|
|
4746
4517
|
})), requiresBySource, getIgnoreTryCatchRequireStatementMode, magicString);
|
|
4747
4518
|
return imports.length ? `${imports.join(";\n")};\n\n` : "";
|
|
@@ -4801,8 +4572,8 @@ function getGenerateRequireName() {
|
|
|
4801
4572
|
}
|
|
4802
4573
|
const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
|
|
4803
4574
|
const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
|
|
4804
|
-
async function transformCommonjs(parse$
|
|
4805
|
-
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);
|
|
4806
4577
|
const magicString = new MagicString(code);
|
|
4807
4578
|
const uses = {
|
|
4808
4579
|
module: false,
|
|
@@ -5087,7 +4858,7 @@ function ${requireName} () {
|
|
|
5087
4858
|
}
|
|
5088
4859
|
const PLUGIN_NAME = "commonjs";
|
|
5089
4860
|
function commonjs(options$1 = {}) {
|
|
5090
|
-
const { ignoreGlobal, ignoreDynamicRequires, requireReturnsDefault: requireReturnsDefaultOption, defaultIsModuleExports: defaultIsModuleExportsOption, esmExternals } = options$1;
|
|
4861
|
+
const { ignoreGlobal, ignoreDynamicRequires, requireReturnsDefault: requireReturnsDefaultOption, defaultIsModuleExports: defaultIsModuleExportsOption, esmExternals, requireNodeBuiltins = false } = options$1;
|
|
5091
4862
|
const extensions$1 = options$1.extensions || [".js"];
|
|
5092
4863
|
const filter$1 = createFilter$2(options$1.include, options$1.exclude);
|
|
5093
4864
|
const isPossibleCjsId = (id) => {
|
|
@@ -5154,7 +4925,7 @@ function commonjs(options$1 = {}) {
|
|
|
5154
4925
|
const nodeResolve = plugins$1.find(({ name }) => name === "node-resolve");
|
|
5155
4926
|
if (nodeResolve) validateVersion(nodeResolve.version, "^13.0.6", "@rollup/plugin-node-resolve");
|
|
5156
4927
|
if (options$1.namedExports != null) this.warn("The namedExports option from \"@rollup/plugin-commonjs\" is deprecated. Named exports are now handled automatically.");
|
|
5157
|
-
requireResolver = getRequireResolver(extensions$1, detectCyclesAndConditional, currentlyResolving);
|
|
4928
|
+
requireResolver = getRequireResolver(extensions$1, detectCyclesAndConditional, currentlyResolving, requireNodeBuiltins);
|
|
5158
4929
|
},
|
|
5159
4930
|
buildEnd() {
|
|
5160
4931
|
if (options$1.strictRequires === "debug") {
|
|
@@ -5189,6 +4960,7 @@ function commonjs(options$1 = {}) {
|
|
|
5189
4960
|
}
|
|
5190
4961
|
if (isWrappedId(id, EXTERNAL_SUFFIX)) {
|
|
5191
4962
|
const actualId = unwrapId$1(id, EXTERNAL_SUFFIX);
|
|
4963
|
+
if (requireNodeBuiltins === true && actualId.startsWith("node:")) return getExternalBuiltinRequireProxy(actualId);
|
|
5192
4964
|
return getUnknownRequireProxy(actualId, isEsmExternal(actualId) ? getRequireReturnsDefault(actualId) : true);
|
|
5193
4965
|
}
|
|
5194
4966
|
if (id.endsWith(ENTRY_SUFFIX)) {
|
|
@@ -5271,7 +5043,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5271
5043
|
const displaySize = (bytes) => {
|
|
5272
5044
|
return `${numberFormatter.format(bytes / 1e3)} kB`;
|
|
5273
5045
|
};
|
|
5274
|
-
const tty
|
|
5046
|
+
const tty = process.stdout.isTTY && !process.env.CI;
|
|
5275
5047
|
const shouldLogInfo = LogLevels[config$2.logLevel || "info"] >= LogLevels.info;
|
|
5276
5048
|
const modulesReporter = shouldLogInfo ? perEnvironmentState((environment) => {
|
|
5277
5049
|
let hasTransformed = false;
|
|
@@ -5285,7 +5057,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5285
5057
|
},
|
|
5286
5058
|
register(id) {
|
|
5287
5059
|
transformedCount++;
|
|
5288
|
-
if (!tty
|
|
5060
|
+
if (!tty) {
|
|
5289
5061
|
if (!hasTransformed) config$2.logger.info(`transforming...`);
|
|
5290
5062
|
} else {
|
|
5291
5063
|
if (id.includes(`?`)) return;
|
|
@@ -5294,7 +5066,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5294
5066
|
hasTransformed = true;
|
|
5295
5067
|
},
|
|
5296
5068
|
log() {
|
|
5297
|
-
if (tty
|
|
5069
|
+
if (tty) clearLine$1();
|
|
5298
5070
|
environment.logger.info(`${import_picocolors$32.default.green(`✓`)} ${transformedCount} modules transformed.`);
|
|
5299
5071
|
}
|
|
5300
5072
|
};
|
|
@@ -5307,13 +5079,13 @@ function buildReporterPlugin(config$2) {
|
|
|
5307
5079
|
async function getCompressedSize(code) {
|
|
5308
5080
|
if (environment.config.consumer !== "client" || !environment.config.build.reportCompressedSize) return null;
|
|
5309
5081
|
if (shouldLogInfo && !hasCompressChunk) {
|
|
5310
|
-
if (!tty
|
|
5082
|
+
if (!tty) config$2.logger.info("computing gzip size...");
|
|
5311
5083
|
else writeLine("computing gzip size (0)...");
|
|
5312
5084
|
hasCompressChunk = true;
|
|
5313
5085
|
}
|
|
5314
5086
|
const compressed = await compress(typeof code === "string" ? code : Buffer.from(code));
|
|
5315
5087
|
compressedCount++;
|
|
5316
|
-
if (shouldLogInfo && tty
|
|
5088
|
+
if (shouldLogInfo && tty) writeLine(`computing gzip size (${compressedCount})...`);
|
|
5317
5089
|
return compressed.length;
|
|
5318
5090
|
}
|
|
5319
5091
|
return {
|
|
@@ -5324,7 +5096,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5324
5096
|
register() {
|
|
5325
5097
|
chunkCount++;
|
|
5326
5098
|
if (shouldLogInfo) {
|
|
5327
|
-
if (!tty
|
|
5099
|
+
if (!tty) {
|
|
5328
5100
|
if (!hasRenderedChunk) environment.logger.info("rendering chunks...");
|
|
5329
5101
|
} else writeLine(`rendering chunks (${chunkCount})...`);
|
|
5330
5102
|
hasRenderedChunk = true;
|
|
@@ -5355,7 +5127,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5355
5127
|
};
|
|
5356
5128
|
}
|
|
5357
5129
|
}))).filter(isDefined);
|
|
5358
|
-
if (tty
|
|
5130
|
+
if (tty) clearLine$1();
|
|
5359
5131
|
let longest = 0;
|
|
5360
5132
|
let biggestSize = 0;
|
|
5361
5133
|
let biggestMap = 0;
|
|
@@ -5422,7 +5194,7 @@ function buildReporterPlugin(config$2) {
|
|
|
5422
5194
|
chunksReporter(this).register();
|
|
5423
5195
|
},
|
|
5424
5196
|
generateBundle() {
|
|
5425
|
-
if (shouldLogInfo && tty
|
|
5197
|
+
if (shouldLogInfo && tty) clearLine$1();
|
|
5426
5198
|
},
|
|
5427
5199
|
async writeBundle({ dir }, output) {
|
|
5428
5200
|
await chunksReporter(this).log(output, dir);
|
|
@@ -5873,7 +5645,7 @@ const not_found_result = {
|
|
|
5873
5645
|
* @returns {Promise<import('./public.d.ts').TSConfckParseResult>}
|
|
5874
5646
|
* @throws {TSConfckParseError}
|
|
5875
5647
|
*/
|
|
5876
|
-
async function parse$
|
|
5648
|
+
async function parse$13(filename, options$1) {
|
|
5877
5649
|
/** @type {import('./cache.js').TSConfckCache} */
|
|
5878
5650
|
const cache$1 = options$1?.cache;
|
|
5879
5651
|
if (cache$1?.hasParseResult(filename)) return getParsedDeep(filename, cache$1, options$1);
|
|
@@ -6350,9 +6122,9 @@ async function transformWithEsbuild(code, filename, options$1, inMap, config$2,
|
|
|
6350
6122
|
debug$17?.(`esbuild error with options used: `, resolvedOptions);
|
|
6351
6123
|
if (e$1.errors) {
|
|
6352
6124
|
e$1.frame = "";
|
|
6353
|
-
e$1.errors.forEach((m
|
|
6354
|
-
if (m
|
|
6355
|
-
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);
|
|
6356
6128
|
});
|
|
6357
6129
|
e$1.loc = e$1.errors[0].location;
|
|
6358
6130
|
}
|
|
@@ -6360,7 +6132,7 @@ async function transformWithEsbuild(code, filename, options$1, inMap, config$2,
|
|
|
6360
6132
|
}
|
|
6361
6133
|
}
|
|
6362
6134
|
function esbuildPlugin(config$2) {
|
|
6363
|
-
const { jsxInject, include, exclude
|
|
6135
|
+
const { jsxInject, include, exclude, ...esbuildTransformOptions } = config$2.esbuild;
|
|
6364
6136
|
const filter$1 = createFilter(include || /\.(m?ts|[jt]sx)$/, exclude || /\.js$/);
|
|
6365
6137
|
const transformOptions = {
|
|
6366
6138
|
target: "esnext",
|
|
@@ -6385,8 +6157,8 @@ function esbuildPlugin(config$2) {
|
|
|
6385
6157
|
async transform(code, id) {
|
|
6386
6158
|
if (filter$1(id) || filter$1(cleanUrl(id))) {
|
|
6387
6159
|
const result = await transformWithEsbuild(code, id, transformOptions, void 0, config$2, server?.watcher);
|
|
6388
|
-
if (result.warnings.length) result.warnings.forEach((m
|
|
6389
|
-
this.warn(prettifyMessage(m
|
|
6160
|
+
if (result.warnings.length) result.warnings.forEach((m) => {
|
|
6161
|
+
this.warn(prettifyMessage(m, code));
|
|
6390
6162
|
});
|
|
6391
6163
|
if (jsxInject && jsxExtensionsRE.test(id)) result.code = jsxInject + ";" + result.code;
|
|
6392
6164
|
return {
|
|
@@ -6406,7 +6178,7 @@ const injectEsbuildHelpers = (esbuildCode, format$3) => {
|
|
|
6406
6178
|
const contentIndex = format$3 === "iife" ? Math.max(esbuildCode.search(IIFE_BEGIN_RE), 0) : format$3 === "umd" ? esbuildCode.indexOf(`(function(`) : 0;
|
|
6407
6179
|
if (contentIndex > 0) {
|
|
6408
6180
|
const esbuildHelpers = esbuildCode.slice(0, contentIndex);
|
|
6409
|
-
return esbuildCode.slice(contentIndex).replace("\"use strict\";", (m
|
|
6181
|
+
return esbuildCode.slice(contentIndex).replace("\"use strict\";", (m) => m + esbuildHelpers);
|
|
6410
6182
|
}
|
|
6411
6183
|
return esbuildCode;
|
|
6412
6184
|
};
|
|
@@ -6481,9 +6253,9 @@ function resolveEsbuildTranspileOptions(config$2, format$3) {
|
|
|
6481
6253
|
treeShaking: true
|
|
6482
6254
|
};
|
|
6483
6255
|
}
|
|
6484
|
-
function prettifyMessage(m
|
|
6485
|
-
let res = import_picocolors$31.default.yellow(m
|
|
6486
|
-
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);
|
|
6487
6259
|
return res + `\n`;
|
|
6488
6260
|
}
|
|
6489
6261
|
let globalTSConfckCache;
|
|
@@ -6498,7 +6270,7 @@ function getTSConfckCache(config$2) {
|
|
|
6498
6270
|
return cache$1;
|
|
6499
6271
|
}
|
|
6500
6272
|
async function loadTsconfigJsonForFile(filename, config$2) {
|
|
6501
|
-
const { tsconfig, tsconfigFile } = await parse$
|
|
6273
|
+
const { tsconfig, tsconfigFile } = await parse$13(filename, {
|
|
6502
6274
|
cache: getTSConfckCache(config$2),
|
|
6503
6275
|
ignoreNodeModules: true
|
|
6504
6276
|
});
|
|
@@ -6565,7 +6337,7 @@ var Worker$1 = class {
|
|
|
6565
6337
|
});
|
|
6566
6338
|
}
|
|
6567
6339
|
stop() {
|
|
6568
|
-
this._pool.forEach((w
|
|
6340
|
+
this._pool.forEach((w) => w.unref());
|
|
6569
6341
|
this._queue.forEach(([, reject]) => reject(/* @__PURE__ */ new Error("Main worker pool stopped before a worker was available.")));
|
|
6570
6342
|
this._pool = [];
|
|
6571
6343
|
this._idlePool = [];
|
|
@@ -6866,7 +6638,7 @@ function e(e$1, n$2, r$1) {
|
|
|
6866
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`);
|
|
6867
6639
|
}
|
|
6868
6640
|
function n(n$2, i$1, o$1, f$1) {
|
|
6869
|
-
let s
|
|
6641
|
+
let s, u, l = r(n$2, o$1), c = function(e$1) {
|
|
6870
6642
|
let n$3 = new Set(["default", ...e$1.conditions || []]);
|
|
6871
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;
|
|
6872
6644
|
}(f$1 || {}), a = i$1[l];
|
|
@@ -6875,10 +6647,10 @@ function n(n$2, i$1, o$1, f$1) {
|
|
|
6875
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))));
|
|
6876
6648
|
a = i$1[n$3];
|
|
6877
6649
|
}
|
|
6878
|
-
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) {
|
|
6879
6651
|
let r$1, t$1 = 0, i$2 = e$1.length, o$2 = /[*]/g, f$2 = /[/]$/;
|
|
6880
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;
|
|
6881
|
-
}(s
|
|
6653
|
+
}(s, u), s;
|
|
6882
6654
|
}
|
|
6883
6655
|
function r(e$1, n$2, r$1) {
|
|
6884
6656
|
if (e$1 === n$2 || "." === n$2) return ".";
|
|
@@ -7313,7 +7085,7 @@ function hasESMSyntax(code, opts = {}) {
|
|
|
7313
7085
|
}
|
|
7314
7086
|
|
|
7315
7087
|
//#endregion
|
|
7316
|
-
//#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
|
|
7317
7089
|
/**
|
|
7318
7090
|
* Constructs a RegExp that matches the exact string specified.
|
|
7319
7091
|
*
|
|
@@ -7374,33 +7146,33 @@ var ImportType;
|
|
|
7374
7146
|
const A = 1 === new Uint8Array(new Uint16Array([1]).buffer)[0];
|
|
7375
7147
|
function parse(E$1, g = "@") {
|
|
7376
7148
|
if (!C) return init.then((() => parse(E$1)));
|
|
7377
|
-
const I = E$1.length + 1, w
|
|
7378
|
-
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));
|
|
7379
7151
|
const K = C.sa(I - 1);
|
|
7380
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() });
|
|
7381
7153
|
const o$1 = [], D = [];
|
|
7382
7154
|
for (; C.ri();) {
|
|
7383
|
-
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();
|
|
7384
7156
|
let D$1;
|
|
7385
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({
|
|
7386
7158
|
n: D$1,
|
|
7387
7159
|
t: B$1,
|
|
7388
7160
|
s: A$1,
|
|
7389
7161
|
e: Q$1,
|
|
7390
|
-
ss: w$
|
|
7162
|
+
ss: w$1,
|
|
7391
7163
|
se: K$1,
|
|
7392
7164
|
d: I$1,
|
|
7393
7165
|
a: g$1
|
|
7394
7166
|
});
|
|
7395
7167
|
}
|
|
7396
7168
|
for (; C.re();) {
|
|
7397
|
-
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] : "";
|
|
7398
7170
|
D.push({
|
|
7399
7171
|
s: A$1,
|
|
7400
7172
|
e: Q$1,
|
|
7401
7173
|
ls: B$1,
|
|
7402
7174
|
le: g$1,
|
|
7403
|
-
n: "\"" === w$
|
|
7175
|
+
n: "\"" === w$1 || "'" === w$1 ? k(I$1) : I$1,
|
|
7404
7176
|
ln: "\"" === o$2 || "'" === o$2 ? k(K$1) : K$1
|
|
7405
7177
|
});
|
|
7406
7178
|
}
|
|
@@ -7867,7 +7639,7 @@ var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
|
|
|
7867
7639
|
*
|
|
7868
7640
|
* @return {Promise<Function>} PostCSS Plugin
|
|
7869
7641
|
*/
|
|
7870
|
-
async function load
|
|
7642
|
+
async function load(plugin, options$1, file) {
|
|
7871
7643
|
try {
|
|
7872
7644
|
if (options$1 === null || options$1 === void 0 || Object.keys(options$1).length === 0) return await req$1(plugin, file);
|
|
7873
7645
|
else return (await req$1(plugin, file))(options$1);
|
|
@@ -7892,7 +7664,7 @@ var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
|
|
|
7892
7664
|
list = Object.entries(config$2.plugins).filter(([, options$1]) => {
|
|
7893
7665
|
return options$1 !== false;
|
|
7894
7666
|
}).map(([plugin, options$1]) => {
|
|
7895
|
-
return load
|
|
7667
|
+
return load(plugin, options$1, file);
|
|
7896
7668
|
});
|
|
7897
7669
|
list = await Promise.all(list);
|
|
7898
7670
|
}
|
|
@@ -8161,10 +7933,10 @@ var require_convert_source_map = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
8161
7933
|
return new Converter(base64, { encoding: "base64" });
|
|
8162
7934
|
};
|
|
8163
7935
|
exports.fromComment = function(comment) {
|
|
8164
|
-
var m
|
|
7936
|
+
var m, encoding;
|
|
8165
7937
|
comment = comment.replace(/^\/\*/g, "//").replace(/\*\/$/g, "");
|
|
8166
|
-
m
|
|
8167
|
-
encoding = m
|
|
7938
|
+
m = exports.commentRegex.exec(comment);
|
|
7939
|
+
encoding = m && m[4] || "uri";
|
|
8168
7940
|
return new Converter(comment, {
|
|
8169
7941
|
encoding,
|
|
8170
7942
|
hasComment: true
|
|
@@ -8180,13 +7952,13 @@ var require_convert_source_map = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
|
8180
7952
|
else return makeConverter(sm);
|
|
8181
7953
|
};
|
|
8182
7954
|
exports.fromSource = function(content) {
|
|
8183
|
-
var m
|
|
8184
|
-
return m
|
|
7955
|
+
var m = content.match(exports.commentRegex);
|
|
7956
|
+
return m ? exports.fromComment(m.pop()) : null;
|
|
8185
7957
|
};
|
|
8186
7958
|
exports.fromMapFileSource = function(content, read) {
|
|
8187
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");
|
|
8188
|
-
var m
|
|
8189
|
-
return m
|
|
7960
|
+
var m = content.match(exports.mapFileCommentRegex);
|
|
7961
|
+
return m ? exports.fromMapFileComment(m.pop(), read) : null;
|
|
8190
7962
|
};
|
|
8191
7963
|
exports.removeComments = function(src) {
|
|
8192
7964
|
return src.replace(exports.commentRegex, "");
|
|
@@ -8835,27 +8607,27 @@ function renderAssetUrlInJS(pluginContext, chunk, opts, code) {
|
|
|
8835
8607
|
const { environment } = pluginContext;
|
|
8836
8608
|
const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(opts.format, environment.config.isWorker);
|
|
8837
8609
|
let match;
|
|
8838
|
-
let s
|
|
8610
|
+
let s;
|
|
8839
8611
|
assetUrlRE.lastIndex = 0;
|
|
8840
8612
|
while (match = assetUrlRE.exec(code)) {
|
|
8841
|
-
s
|
|
8613
|
+
s ||= new MagicString(code);
|
|
8842
8614
|
const [full, referenceId, postfix = ""] = match;
|
|
8843
8615
|
const file = pluginContext.getFileName(referenceId);
|
|
8844
8616
|
chunk.viteMetadata.importedAssets.add(cleanUrl(file));
|
|
8845
8617
|
const replacement = toOutputFilePathInJS(environment, file + postfix, "asset", chunk.fileName, "js", toRelativeRuntime);
|
|
8846
8618
|
const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`;
|
|
8847
|
-
s
|
|
8619
|
+
s.update(match.index, match.index + full.length, replacementString);
|
|
8848
8620
|
}
|
|
8849
8621
|
const publicAssetUrlMap = publicAssetUrlCache.get(environment.getTopLevelConfig());
|
|
8850
8622
|
publicAssetUrlRE.lastIndex = 0;
|
|
8851
8623
|
while (match = publicAssetUrlRE.exec(code)) {
|
|
8852
|
-
s
|
|
8624
|
+
s ||= new MagicString(code);
|
|
8853
8625
|
const [full, hash$1] = match;
|
|
8854
8626
|
const replacement = toOutputFilePathInJS(environment, publicAssetUrlMap.get(hash$1).slice(1), "public", chunk.fileName, "js", toRelativeRuntime);
|
|
8855
8627
|
const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`;
|
|
8856
|
-
s
|
|
8628
|
+
s.update(match.index, match.index + full.length, replacementString);
|
|
8857
8629
|
}
|
|
8858
|
-
return s
|
|
8630
|
+
return s;
|
|
8859
8631
|
}
|
|
8860
8632
|
/**
|
|
8861
8633
|
* Also supports loading plain strings with import text from './foo.txt?raw'
|
|
@@ -8896,10 +8668,10 @@ function assetPlugin(config$2) {
|
|
|
8896
8668
|
}
|
|
8897
8669
|
},
|
|
8898
8670
|
renderChunk(code, chunk, opts) {
|
|
8899
|
-
const s
|
|
8900
|
-
if (s
|
|
8901
|
-
code: s
|
|
8902
|
-
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
|
|
8903
8675
|
};
|
|
8904
8676
|
else return null;
|
|
8905
8677
|
},
|
|
@@ -9289,7 +9061,7 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9289
9061
|
return supportsAnsi() ? `\x1b[2m${text}\x1b[0m` : text;
|
|
9290
9062
|
}
|
|
9291
9063
|
const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
|
|
9292
|
-
function parse$
|
|
9064
|
+
function parse$12(src) {
|
|
9293
9065
|
const obj = {};
|
|
9294
9066
|
let lines = src.toString();
|
|
9295
9067
|
lines = lines.replace(/\r\n?/gm, "\n");
|
|
@@ -9393,9 +9165,9 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9393
9165
|
return envPath[0] === "~" ? path$10.join(os$3.homedir(), envPath.slice(1)) : envPath;
|
|
9394
9166
|
}
|
|
9395
9167
|
function _configVault(options$1) {
|
|
9396
|
-
const debug$
|
|
9168
|
+
const debug$18 = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options$1 && options$1.debug);
|
|
9397
9169
|
const quiet = parseBoolean(process.env.DOTENV_CONFIG_QUIET || options$1 && options$1.quiet);
|
|
9398
|
-
if (debug$
|
|
9170
|
+
if (debug$18 || !quiet) _log("Loading env from encrypted .env.vault");
|
|
9399
9171
|
const parsed = DotenvModule._parseVault(options$1);
|
|
9400
9172
|
let processEnv = process.env;
|
|
9401
9173
|
if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv;
|
|
@@ -9407,10 +9179,10 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9407
9179
|
let encoding = "utf8";
|
|
9408
9180
|
let processEnv = process.env;
|
|
9409
9181
|
if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv;
|
|
9410
|
-
let debug$
|
|
9182
|
+
let debug$18 = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || options$1 && options$1.debug);
|
|
9411
9183
|
let quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || options$1 && options$1.quiet);
|
|
9412
9184
|
if (options$1 && options$1.encoding) encoding = options$1.encoding;
|
|
9413
|
-
else if (debug$
|
|
9185
|
+
else if (debug$18) _debug("No encoding is specified. UTF-8 is used by default");
|
|
9414
9186
|
let optionPaths = [dotenvPath];
|
|
9415
9187
|
if (options$1 && options$1.path) if (!Array.isArray(options$1.path)) optionPaths = [_resolveHome(options$1.path)];
|
|
9416
9188
|
else {
|
|
@@ -9423,20 +9195,20 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9423
9195
|
const parsed = DotenvModule.parse(fs$10.readFileSync(path$13, { encoding }));
|
|
9424
9196
|
DotenvModule.populate(parsedAll, parsed, options$1);
|
|
9425
9197
|
} catch (e$1) {
|
|
9426
|
-
if (debug$
|
|
9198
|
+
if (debug$18) _debug(`Failed to load ${path$13} ${e$1.message}`);
|
|
9427
9199
|
lastError = e$1;
|
|
9428
9200
|
}
|
|
9429
9201
|
const populated = DotenvModule.populate(processEnv, parsedAll, options$1);
|
|
9430
|
-
debug$
|
|
9202
|
+
debug$18 = parseBoolean(processEnv.DOTENV_CONFIG_DEBUG || debug$18);
|
|
9431
9203
|
quiet = parseBoolean(processEnv.DOTENV_CONFIG_QUIET || quiet);
|
|
9432
|
-
if (debug$
|
|
9204
|
+
if (debug$18 || !quiet) {
|
|
9433
9205
|
const keysCount = Object.keys(populated).length;
|
|
9434
9206
|
const shortPaths = [];
|
|
9435
9207
|
for (const filePath of optionPaths) try {
|
|
9436
9208
|
const relative$3 = path$10.relative(process.cwd(), filePath);
|
|
9437
9209
|
shortPaths.push(relative$3);
|
|
9438
9210
|
} catch (e$1) {
|
|
9439
|
-
if (debug$
|
|
9211
|
+
if (debug$18) _debug(`Failed to load ${filePath} ${e$1.message}`);
|
|
9440
9212
|
lastError = e$1;
|
|
9441
9213
|
}
|
|
9442
9214
|
_log(`injecting env (${keysCount}) from ${shortPaths.join(",")} ${dim(`-- tip: ${_getRandomTip()}`)}`);
|
|
@@ -9482,7 +9254,7 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9482
9254
|
}
|
|
9483
9255
|
}
|
|
9484
9256
|
function populate(processEnv, parsed, options$1 = {}) {
|
|
9485
|
-
const debug$
|
|
9257
|
+
const debug$18 = Boolean(options$1 && options$1.debug);
|
|
9486
9258
|
const override = Boolean(options$1 && options$1.override);
|
|
9487
9259
|
const populated = {};
|
|
9488
9260
|
if (typeof parsed !== "object") {
|
|
@@ -9495,7 +9267,7 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9495
9267
|
processEnv[key] = parsed[key];
|
|
9496
9268
|
populated[key] = parsed[key];
|
|
9497
9269
|
}
|
|
9498
|
-
if (debug$
|
|
9270
|
+
if (debug$18) if (override === true) _debug(`"${key}" is already defined and WAS overwritten`);
|
|
9499
9271
|
else _debug(`"${key}" is already defined and was NOT overwritten`);
|
|
9500
9272
|
} else {
|
|
9501
9273
|
processEnv[key] = parsed[key];
|
|
@@ -9509,7 +9281,7 @@ var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dote
|
|
|
9509
9281
|
_parseVault,
|
|
9510
9282
|
config,
|
|
9511
9283
|
decrypt,
|
|
9512
|
-
parse: parse$
|
|
9284
|
+
parse: parse$12,
|
|
9513
9285
|
populate
|
|
9514
9286
|
};
|
|
9515
9287
|
module.exports.configDotenv = DotenvModule.configDotenv;
|
|
@@ -9579,8 +9351,8 @@ var require_main = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv
|
|
|
9579
9351
|
|
|
9580
9352
|
//#endregion
|
|
9581
9353
|
//#region src/node/env.ts
|
|
9582
|
-
var import_main =
|
|
9583
|
-
var import_main$1 =
|
|
9354
|
+
var import_main = require_main$1();
|
|
9355
|
+
var import_main$1 = require_main();
|
|
9584
9356
|
const debug$14 = createDebugger("vite:env");
|
|
9585
9357
|
function getEnvFilesForMode(mode, envDir) {
|
|
9586
9358
|
if (envDir !== false) return [
|
|
@@ -9757,280 +9529,253 @@ function errorMiddleware(server, allowNext = false) {
|
|
|
9757
9529
|
}
|
|
9758
9530
|
|
|
9759
9531
|
//#endregion
|
|
9760
|
-
//#region ../../node_modules/.pnpm/
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9770
|
-
|
|
9771
|
-
|
|
9772
|
-
|
|
9773
|
-
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
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
|
+
});
|
|
9789
9611
|
};
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
case "year":
|
|
9806
|
-
case "yrs":
|
|
9807
|
-
case "yr":
|
|
9808
|
-
case "y": return n$2 * y;
|
|
9809
|
-
case "days":
|
|
9810
|
-
case "day":
|
|
9811
|
-
case "d": return n$2 * d;
|
|
9812
|
-
case "hours":
|
|
9813
|
-
case "hour":
|
|
9814
|
-
case "hrs":
|
|
9815
|
-
case "hr":
|
|
9816
|
-
case "h": return n$2 * h;
|
|
9817
|
-
case "minutes":
|
|
9818
|
-
case "minute":
|
|
9819
|
-
case "mins":
|
|
9820
|
-
case "min":
|
|
9821
|
-
case "m": return n$2 * m;
|
|
9822
|
-
case "seconds":
|
|
9823
|
-
case "second":
|
|
9824
|
-
case "secs":
|
|
9825
|
-
case "sec":
|
|
9826
|
-
case "s": return n$2 * s;
|
|
9827
|
-
case "milliseconds":
|
|
9828
|
-
case "millisecond":
|
|
9829
|
-
case "msecs":
|
|
9830
|
-
case "msec":
|
|
9831
|
-
case "ms": return n$2;
|
|
9832
|
-
default: return;
|
|
9833
|
-
}
|
|
9834
|
-
}
|
|
9835
|
-
/**
|
|
9836
|
-
* Short format for `ms`.
|
|
9837
|
-
*
|
|
9838
|
-
* @param {Number} ms
|
|
9839
|
-
* @return {String}
|
|
9840
|
-
* @api private
|
|
9841
|
-
*/
|
|
9842
|
-
function fmtShort(ms) {
|
|
9843
|
-
if (ms >= d) return Math.round(ms / d) + "d";
|
|
9844
|
-
if (ms >= h) return Math.round(ms / h) + "h";
|
|
9845
|
-
if (ms >= m) return Math.round(ms / m) + "m";
|
|
9846
|
-
if (ms >= s) return Math.round(ms / s) + "s";
|
|
9847
|
-
return ms + "ms";
|
|
9848
|
-
}
|
|
9849
|
-
/**
|
|
9850
|
-
* Long format for `ms`.
|
|
9851
|
-
*
|
|
9852
|
-
* @param {Number} ms
|
|
9853
|
-
* @return {String}
|
|
9854
|
-
* @api private
|
|
9855
|
-
*/
|
|
9856
|
-
function fmtLong(ms) {
|
|
9857
|
-
return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
|
|
9858
|
-
}
|
|
9859
|
-
/**
|
|
9860
|
-
* Pluralization helper.
|
|
9861
|
-
*/
|
|
9862
|
-
function plural(ms, n$2, name) {
|
|
9863
|
-
if (ms < n$2) return;
|
|
9864
|
-
if (ms < n$2 * 1.5) return Math.floor(ms / n$2) + " " + name;
|
|
9865
|
-
return Math.ceil(ms / n$2) + " " + name + "s";
|
|
9866
|
-
}
|
|
9867
|
-
}) });
|
|
9868
|
-
|
|
9869
|
-
//#endregion
|
|
9870
|
-
//#region ../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/debug.js
|
|
9871
|
-
var require_debug$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@2.6.9/node_modules/debug/src/debug.js": ((exports, module) => {
|
|
9872
|
-
/**
|
|
9873
|
-
* This is the common logic for both the Node.js and web browser
|
|
9874
|
-
* implementations of `debug()`.
|
|
9875
|
-
*
|
|
9876
|
-
* Expose `debug()` as the module.
|
|
9877
|
-
*/
|
|
9878
|
-
exports = module.exports = createDebug.debug = createDebug["default"] = createDebug;
|
|
9879
|
-
exports.coerce = coerce;
|
|
9880
|
-
exports.disable = disable;
|
|
9881
|
-
exports.enable = enable;
|
|
9882
|
-
exports.enabled = enabled;
|
|
9883
|
-
exports.humanize = require_ms();
|
|
9884
|
-
/**
|
|
9885
|
-
* The currently active debug mode names, and names to skip.
|
|
9886
|
-
*/
|
|
9887
|
-
exports.names = [];
|
|
9888
|
-
exports.skips = [];
|
|
9889
|
-
/**
|
|
9890
|
-
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
9891
|
-
*
|
|
9892
|
-
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
9893
|
-
*/
|
|
9894
|
-
exports.formatters = {};
|
|
9895
|
-
/**
|
|
9896
|
-
* Previous log timestamp.
|
|
9897
|
-
*/
|
|
9898
|
-
var prevTime;
|
|
9899
|
-
/**
|
|
9900
|
-
* Select a color.
|
|
9901
|
-
* @param {String} namespace
|
|
9902
|
-
* @return {Number}
|
|
9903
|
-
* @api private
|
|
9904
|
-
*/
|
|
9905
|
-
function selectColor(namespace) {
|
|
9906
|
-
var hash$1 = 0, i$1;
|
|
9907
|
-
for (i$1 in namespace) {
|
|
9908
|
-
hash$1 = (hash$1 << 5) - hash$1 + namespace.charCodeAt(i$1);
|
|
9909
|
-
hash$1 |= 0;
|
|
9910
|
-
}
|
|
9911
|
-
return exports.colors[Math.abs(hash$1) % exports.colors.length];
|
|
9912
|
-
}
|
|
9913
|
-
/**
|
|
9914
|
-
* Create a debugger with the given `namespace`.
|
|
9915
|
-
*
|
|
9916
|
-
* @param {String} namespace
|
|
9917
|
-
* @return {Function}
|
|
9918
|
-
* @api public
|
|
9919
|
-
*/
|
|
9920
|
-
function createDebug(namespace) {
|
|
9921
|
-
function debug$19() {
|
|
9922
|
-
if (!debug$19.enabled) return;
|
|
9923
|
-
var self$1 = debug$19;
|
|
9924
|
-
var curr = +/* @__PURE__ */ new Date();
|
|
9925
|
-
self$1.diff = curr - (prevTime || curr);
|
|
9926
|
-
self$1.prev = prevTime;
|
|
9927
|
-
self$1.curr = curr;
|
|
9928
|
-
prevTime = curr;
|
|
9929
|
-
var args = new Array(arguments.length);
|
|
9930
|
-
for (var i$1 = 0; i$1 < args.length; i$1++) args[i$1] = arguments[i$1];
|
|
9931
|
-
args[0] = exports.coerce(args[0]);
|
|
9932
|
-
if ("string" !== typeof args[0]) args.unshift("%O");
|
|
9933
|
-
var index = 0;
|
|
9934
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format$3) {
|
|
9935
|
-
if (match === "%%") return match;
|
|
9936
|
-
index++;
|
|
9937
|
-
var formatter = exports.formatters[format$3];
|
|
9938
|
-
if ("function" === typeof formatter) {
|
|
9939
|
-
var val = args[index];
|
|
9940
|
-
match = formatter.call(self$1, val);
|
|
9941
|
-
args.splice(index, 1);
|
|
9942
|
-
index--;
|
|
9943
|
-
}
|
|
9944
|
-
return match;
|
|
9945
|
-
});
|
|
9946
|
-
exports.formatArgs.call(self$1, args);
|
|
9947
|
-
(debug$19.log || exports.log || console.log.bind(console)).apply(self$1, args);
|
|
9948
|
-
}
|
|
9949
|
-
debug$19.namespace = namespace;
|
|
9950
|
-
debug$19.enabled = exports.enabled(namespace);
|
|
9951
|
-
debug$19.useColors = exports.useColors();
|
|
9952
|
-
debug$19.color = selectColor(namespace);
|
|
9953
|
-
if ("function" === typeof exports.init) exports.init(debug$19);
|
|
9954
|
-
return debug$19;
|
|
9955
|
-
}
|
|
9956
|
-
/**
|
|
9957
|
-
* Enables a debug mode by namespaces. This can include modes
|
|
9958
|
-
* separated by a colon and wildcards.
|
|
9959
|
-
*
|
|
9960
|
-
* @param {String} namespaces
|
|
9961
|
-
* @api public
|
|
9962
|
-
*/
|
|
9963
|
-
function enable(namespaces) {
|
|
9964
|
-
exports.save(namespaces);
|
|
9965
|
-
exports.names = [];
|
|
9966
|
-
exports.skips = [];
|
|
9967
|
-
var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
|
|
9968
|
-
var len = split.length;
|
|
9969
|
-
for (var i$1 = 0; i$1 < len; i$1++) {
|
|
9970
|
-
if (!split[i$1]) continue;
|
|
9971
|
-
namespaces = split[i$1].replace(/\*/g, ".*?");
|
|
9972
|
-
if (namespaces[0] === "-") exports.skips.push(/* @__PURE__ */ new RegExp("^" + namespaces.substr(1) + "$"));
|
|
9973
|
-
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;
|
|
9974
9627
|
}
|
|
9975
|
-
}
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
* @return {Mixed}
|
|
10002
|
-
* @api private
|
|
10003
|
-
*/
|
|
10004
|
-
function coerce(val) {
|
|
10005
|
-
if (val instanceof Error) return val.stack || val.message;
|
|
10006
|
-
return val;
|
|
10007
|
-
}
|
|
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 = [];
|
|
10008
9654
|
}) });
|
|
10009
9655
|
|
|
10010
9656
|
//#endregion
|
|
10011
|
-
//#region ../../node_modules/.pnpm/
|
|
10012
|
-
var
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
10027
|
-
|
|
10028
|
-
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
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
|
+
] : [
|
|
10034
9779
|
6,
|
|
10035
9780
|
2,
|
|
10036
9781
|
3,
|
|
@@ -10038,146 +9783,34 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@
|
|
|
10038
9783
|
5,
|
|
10039
9784
|
1
|
|
10040
9785
|
];
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) {
|
|
10050
|
-
return k.toUpperCase();
|
|
10051
|
-
});
|
|
10052
|
-
var val = process.env[key];
|
|
10053
|
-
if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
|
|
10054
|
-
else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
|
|
10055
|
-
else if (val === "null") val = null;
|
|
10056
|
-
else val = Number(val);
|
|
10057
|
-
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;
|
|
10058
9794
|
return obj;
|
|
10059
9795
|
}, {});
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
|
|
10069
|
-
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
|
|
10073
|
-
|
|
10074
|
-
|
|
10075
|
-
|
|
10076
|
-
* Map %o to `util.inspect()`, all on a single line.
|
|
10077
|
-
*/
|
|
10078
|
-
exports.formatters.o = function(v) {
|
|
10079
|
-
this.inspectOpts.colors = this.useColors;
|
|
10080
|
-
return util$1.inspect(v, this.inspectOpts).split("\n").map(function(str) {
|
|
10081
|
-
return str.trim();
|
|
10082
|
-
}).join(" ");
|
|
10083
|
-
};
|
|
10084
|
-
/**
|
|
10085
|
-
* Map %o to `util.inspect()`, allowing multiple lines if needed.
|
|
10086
|
-
*/
|
|
10087
|
-
exports.formatters.O = function(v) {
|
|
10088
|
-
this.inspectOpts.colors = this.useColors;
|
|
10089
|
-
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
|
|
10090
9812
|
};
|
|
10091
|
-
|
|
10092
|
-
* Adds ANSI color escape codes if enabled.
|
|
10093
|
-
*
|
|
10094
|
-
* @api public
|
|
10095
|
-
*/
|
|
10096
|
-
function formatArgs(args) {
|
|
10097
|
-
var name = this.namespace;
|
|
10098
|
-
if (this.useColors) {
|
|
10099
|
-
var c = this.color;
|
|
10100
|
-
var prefix = " \x1B[3" + c + ";1m" + name + " \x1B[0m";
|
|
10101
|
-
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
10102
|
-
args.push("\x1B[3" + c + "m+" + exports.humanize(this.diff) + "\x1B[0m");
|
|
10103
|
-
} else args[0] = (/* @__PURE__ */ new Date()).toUTCString() + " " + name + " " + args[0];
|
|
10104
|
-
}
|
|
10105
|
-
/**
|
|
10106
|
-
* Invokes `util.format()` with the specified arguments and writes to `stream`.
|
|
10107
|
-
*/
|
|
10108
|
-
function log$2() {
|
|
10109
|
-
return stream$2.write(util$1.format.apply(util$1, arguments) + "\n");
|
|
10110
|
-
}
|
|
10111
|
-
/**
|
|
10112
|
-
* Save `namespaces`.
|
|
10113
|
-
*
|
|
10114
|
-
* @param {String} namespaces
|
|
10115
|
-
* @api private
|
|
10116
|
-
*/
|
|
10117
|
-
function save(namespaces) {
|
|
10118
|
-
if (null == namespaces) delete process.env.DEBUG;
|
|
10119
|
-
else process.env.DEBUG = namespaces;
|
|
10120
|
-
}
|
|
10121
|
-
/**
|
|
10122
|
-
* Load `namespaces`.
|
|
10123
|
-
*
|
|
10124
|
-
* @return {String} returns the previously persisted debug modes
|
|
10125
|
-
* @api private
|
|
10126
|
-
*/
|
|
10127
|
-
function load() {
|
|
10128
|
-
return process.env.DEBUG;
|
|
10129
|
-
}
|
|
10130
|
-
/**
|
|
10131
|
-
* Copied from `node/src/node.js`.
|
|
10132
|
-
*
|
|
10133
|
-
* XXX: It's lame that node doesn't expose this API out-of-the-box. It also
|
|
10134
|
-
* relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
|
|
10135
|
-
*/
|
|
10136
|
-
function createWritableStdioStream(fd$1) {
|
|
10137
|
-
var stream$3;
|
|
10138
|
-
switch (process.binding("tty_wrap").guessHandleType(fd$1)) {
|
|
10139
|
-
case "TTY":
|
|
10140
|
-
stream$3 = new tty.WriteStream(fd$1);
|
|
10141
|
-
stream$3._type = "tty";
|
|
10142
|
-
if (stream$3._handle && stream$3._handle.unref) stream$3._handle.unref();
|
|
10143
|
-
break;
|
|
10144
|
-
case "FILE":
|
|
10145
|
-
stream$3 = new (__require("fs")).SyncWriteStream(fd$1, { autoClose: false });
|
|
10146
|
-
stream$3._type = "fs";
|
|
10147
|
-
break;
|
|
10148
|
-
case "PIPE":
|
|
10149
|
-
case "TCP":
|
|
10150
|
-
stream$3 = new (__require("net")).Socket({
|
|
10151
|
-
fd: fd$1,
|
|
10152
|
-
readable: false,
|
|
10153
|
-
writable: true
|
|
10154
|
-
});
|
|
10155
|
-
stream$3.readable = false;
|
|
10156
|
-
stream$3.read = null;
|
|
10157
|
-
stream$3._type = "pipe";
|
|
10158
|
-
if (stream$3._handle && stream$3._handle.unref) stream$3._handle.unref();
|
|
10159
|
-
break;
|
|
10160
|
-
default: throw new Error("Implement me. Unknown stream file type!");
|
|
10161
|
-
}
|
|
10162
|
-
stream$3.fd = fd$1;
|
|
10163
|
-
stream$3._isStdio = true;
|
|
10164
|
-
return stream$3;
|
|
10165
|
-
}
|
|
10166
|
-
/**
|
|
10167
|
-
* Init logic for `debug` instances.
|
|
10168
|
-
*
|
|
10169
|
-
* Create a new `inspectOpts` object in case `useColors` is set
|
|
10170
|
-
* differently for a particular `debug` instance.
|
|
10171
|
-
*/
|
|
10172
|
-
function init$1(debug$19) {
|
|
10173
|
-
debug$19.inspectOpts = {};
|
|
10174
|
-
var keys = Object.keys(exports.inspectOpts);
|
|
10175
|
-
for (var i$1 = 0; i$1 < keys.length; i$1++) debug$19.inspectOpts[keys[i$1]] = exports.inspectOpts[keys[i$1]];
|
|
10176
|
-
}
|
|
10177
|
-
/**
|
|
10178
|
-
* Enable namespaces listed in `process.env.DEBUG` initially.
|
|
10179
|
-
*/
|
|
10180
|
-
exports.enable(load());
|
|
9813
|
+
enable(process.env.DEBUG || "");
|
|
10181
9814
|
}) });
|
|
10182
9815
|
|
|
10183
9816
|
//#endregion
|
|
@@ -10789,8 +10422,8 @@ var require_unpipe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/unpi
|
|
|
10789
10422
|
* Determine if there are Node.js pipe-like data listeners.
|
|
10790
10423
|
* @private
|
|
10791
10424
|
*/
|
|
10792
|
-
function hasPipeDataListeners(stream$
|
|
10793
|
-
var listeners = stream$
|
|
10425
|
+
function hasPipeDataListeners(stream$2) {
|
|
10426
|
+
var listeners = stream$2.listeners("data");
|
|
10794
10427
|
for (var i$1 = 0; i$1 < listeners.length; i$1++) if (listeners[i$1].name === "ondata") return true;
|
|
10795
10428
|
return false;
|
|
10796
10429
|
}
|
|
@@ -10800,19 +10433,19 @@ var require_unpipe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/unpi
|
|
|
10800
10433
|
* @param {object} stream
|
|
10801
10434
|
* @public
|
|
10802
10435
|
*/
|
|
10803
|
-
function unpipe$1(stream$
|
|
10804
|
-
if (!stream$
|
|
10805
|
-
if (typeof stream$
|
|
10806
|
-
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();
|
|
10807
10440
|
return;
|
|
10808
10441
|
}
|
|
10809
|
-
if (!hasPipeDataListeners(stream$
|
|
10442
|
+
if (!hasPipeDataListeners(stream$2)) return;
|
|
10810
10443
|
var listener$1;
|
|
10811
|
-
var listeners = stream$
|
|
10444
|
+
var listeners = stream$2.listeners("close");
|
|
10812
10445
|
for (var i$1 = 0; i$1 < listeners.length; i$1++) {
|
|
10813
10446
|
listener$1 = listeners[i$1];
|
|
10814
10447
|
if (listener$1.name !== "cleanup" && listener$1.name !== "onclose") continue;
|
|
10815
|
-
listener$1.call(stream$
|
|
10448
|
+
listener$1.call(stream$2);
|
|
10816
10449
|
}
|
|
10817
10450
|
}
|
|
10818
10451
|
}) });
|
|
@@ -10829,7 +10462,7 @@ var require_finalhandler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
10829
10462
|
* Module dependencies.
|
|
10830
10463
|
* @private
|
|
10831
10464
|
*/
|
|
10832
|
-
var debug$13 =
|
|
10465
|
+
var debug$13 = (init_node(), __toCommonJS(node_exports))("finalhandler");
|
|
10833
10466
|
var encodeUrl = require_encodeurl();
|
|
10834
10467
|
var escapeHtml$2 = require_escape_html();
|
|
10835
10468
|
var onFinished = require_on_finished();
|
|
@@ -11073,7 +10706,7 @@ var require_connect = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/con
|
|
|
11073
10706
|
* Module dependencies.
|
|
11074
10707
|
* @private
|
|
11075
10708
|
*/
|
|
11076
|
-
var debug$12 =
|
|
10709
|
+
var debug$12 = (init_node(), __toCommonJS(node_exports))("connect:dispatcher");
|
|
11077
10710
|
var EventEmitter$4 = __require("events").EventEmitter;
|
|
11078
10711
|
var finalhandler = require_finalhandler();
|
|
11079
10712
|
var http$6 = __require("http");
|
|
@@ -11310,8 +10943,8 @@ var require_object_assign = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
|
11310
10943
|
var from;
|
|
11311
10944
|
var to = toObject(target);
|
|
11312
10945
|
var symbols;
|
|
11313
|
-
for (var s
|
|
11314
|
-
from = Object(arguments[s
|
|
10946
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
10947
|
+
from = Object(arguments[s]);
|
|
11315
10948
|
for (var key in from) if (hasOwnProperty.call(from, key)) to[key] = from[key];
|
|
11316
10949
|
if (getOwnPropertySymbols) {
|
|
11317
10950
|
symbols = getOwnPropertySymbols(from);
|
|
@@ -11416,6 +11049,7 @@ var require_vary = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/vary@1
|
|
|
11416
11049
|
//#region ../../node_modules/.pnpm/cors@2.8.5/node_modules/cors/lib/index.js
|
|
11417
11050
|
var require_lib$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cors@2.8.5/node_modules/cors/lib/index.js": ((exports, module) => {
|
|
11418
11051
|
(function() {
|
|
11052
|
+
"use strict";
|
|
11419
11053
|
var assign = require_object_assign();
|
|
11420
11054
|
var vary$1 = require_vary();
|
|
11421
11055
|
var defaults = {
|
|
@@ -11424,8 +11058,8 @@ var require_lib$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cors@
|
|
|
11424
11058
|
preflightContinue: false,
|
|
11425
11059
|
optionsSuccessStatus: 204
|
|
11426
11060
|
};
|
|
11427
|
-
function isString$1(s
|
|
11428
|
-
return typeof s
|
|
11061
|
+
function isString$1(s) {
|
|
11062
|
+
return typeof s === "string" || s instanceof String;
|
|
11429
11063
|
}
|
|
11430
11064
|
function isOriginAllowed(origin, allowedOrigin) {
|
|
11431
11065
|
if (Array.isArray(allowedOrigin)) {
|
|
@@ -13829,13 +13463,13 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
13829
13463
|
}
|
|
13830
13464
|
const previous = this.fsw._getWatchedDir(wh.path);
|
|
13831
13465
|
const current = /* @__PURE__ */ new Set();
|
|
13832
|
-
let stream$
|
|
13466
|
+
let stream$2 = this.fsw._readdirp(directory, {
|
|
13833
13467
|
fileFilter: (entry) => wh.filterPath(entry),
|
|
13834
13468
|
directoryFilter: (entry) => wh.filterDir(entry),
|
|
13835
13469
|
depth: 0
|
|
13836
13470
|
}).on(STR_DATA$1, async (entry) => {
|
|
13837
13471
|
if (this.fsw.closed) {
|
|
13838
|
-
stream$
|
|
13472
|
+
stream$2 = void 0;
|
|
13839
13473
|
return;
|
|
13840
13474
|
}
|
|
13841
13475
|
const item = entry.path;
|
|
@@ -13843,7 +13477,7 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
13843
13477
|
current.add(item);
|
|
13844
13478
|
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path$13, item)) return;
|
|
13845
13479
|
if (this.fsw.closed) {
|
|
13846
|
-
stream$
|
|
13480
|
+
stream$2 = void 0;
|
|
13847
13481
|
return;
|
|
13848
13482
|
}
|
|
13849
13483
|
if (item === target || !target && !previous.has(item)) {
|
|
@@ -13852,9 +13486,9 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
13852
13486
|
this._addToNodeFs(path$13, initialAdd, wh, depth + 1);
|
|
13853
13487
|
}
|
|
13854
13488
|
}).on(EV_ERROR$2, this._boundHandleError);
|
|
13855
|
-
return new Promise((resolve$4) => stream$
|
|
13489
|
+
return new Promise((resolve$4) => stream$2.once(STR_END$2, () => {
|
|
13856
13490
|
if (this.fsw.closed) {
|
|
13857
|
-
stream$
|
|
13491
|
+
stream$2 = void 0;
|
|
13858
13492
|
return;
|
|
13859
13493
|
}
|
|
13860
13494
|
const wasThrottled = throttler ? throttler.clear() : false;
|
|
@@ -13864,7 +13498,7 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
|
13864
13498
|
}).forEach((item) => {
|
|
13865
13499
|
this.fsw._remove(directory, item);
|
|
13866
13500
|
});
|
|
13867
|
-
stream$
|
|
13501
|
+
stream$2 = void 0;
|
|
13868
13502
|
if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler);
|
|
13869
13503
|
}));
|
|
13870
13504
|
}
|
|
@@ -14638,7 +14272,7 @@ var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ch
|
|
|
14638
14272
|
const promise = closer();
|
|
14639
14273
|
if (promise instanceof Promise) closers.push(promise);
|
|
14640
14274
|
}));
|
|
14641
|
-
this._streams.forEach((stream$
|
|
14275
|
+
this._streams.forEach((stream$2) => stream$2.destroy());
|
|
14642
14276
|
this._userIgnored = void 0;
|
|
14643
14277
|
this._readyCount = 0;
|
|
14644
14278
|
this._readyEmitted = false;
|
|
@@ -14953,23 +14587,23 @@ var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ch
|
|
|
14953
14587
|
}
|
|
14954
14588
|
_readdirp(root, opts) {
|
|
14955
14589
|
if (this.closed) return;
|
|
14956
|
-
let stream$
|
|
14590
|
+
let stream$2 = readdirp(root, {
|
|
14957
14591
|
type: EV_ALL,
|
|
14958
14592
|
alwaysStat: true,
|
|
14959
14593
|
lstat: true,
|
|
14960
14594
|
...opts
|
|
14961
14595
|
});
|
|
14962
|
-
this._streams.add(stream$
|
|
14963
|
-
stream$
|
|
14964
|
-
stream$
|
|
14596
|
+
this._streams.add(stream$2);
|
|
14597
|
+
stream$2.once(STR_CLOSE, () => {
|
|
14598
|
+
stream$2 = void 0;
|
|
14965
14599
|
});
|
|
14966
|
-
stream$
|
|
14967
|
-
if (stream$
|
|
14968
|
-
this._streams.delete(stream$
|
|
14969
|
-
stream$
|
|
14600
|
+
stream$2.once(STR_END, () => {
|
|
14601
|
+
if (stream$2) {
|
|
14602
|
+
this._streams.delete(stream$2);
|
|
14603
|
+
stream$2 = void 0;
|
|
14970
14604
|
}
|
|
14971
14605
|
});
|
|
14972
|
-
return stream$
|
|
14606
|
+
return stream$2;
|
|
14973
14607
|
}
|
|
14974
14608
|
};
|
|
14975
14609
|
/**
|
|
@@ -14990,12 +14624,12 @@ var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ch
|
|
|
14990
14624
|
//#region ../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/quote.js
|
|
14991
14625
|
var require_quote = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/shell-quote@1.8.3/node_modules/shell-quote/quote.js": ((exports, module) => {
|
|
14992
14626
|
module.exports = function quote(xs) {
|
|
14993
|
-
return xs.map(function(s
|
|
14994
|
-
if (s
|
|
14995
|
-
if (s
|
|
14996
|
-
if (/["\s\\]/.test(s
|
|
14997
|
-
if (/["'\s]/.test(s
|
|
14998
|
-
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");
|
|
14999
14633
|
}).join(" ");
|
|
15000
14634
|
};
|
|
15001
14635
|
}) });
|
|
@@ -15027,11 +14661,11 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
15027
14661
|
var mult = 4294967296;
|
|
15028
14662
|
for (var i = 0; i < 4; i++) TOKEN += (mult * Math.random()).toString(16);
|
|
15029
14663
|
var startsWithToken = /* @__PURE__ */ new RegExp("^" + TOKEN);
|
|
15030
|
-
function matchAll(s
|
|
14664
|
+
function matchAll(s, r$1) {
|
|
15031
14665
|
var origIndex = r$1.lastIndex;
|
|
15032
14666
|
var matches$2 = [];
|
|
15033
14667
|
var matchObj;
|
|
15034
|
-
while (matchObj = r$1.exec(s
|
|
14668
|
+
while (matchObj = r$1.exec(s)) {
|
|
15035
14669
|
matches$2.push(matchObj);
|
|
15036
14670
|
if (r$1.lastIndex === matchObj.index) r$1.lastIndex += 1;
|
|
15037
14671
|
}
|
|
@@ -15054,9 +14688,9 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
15054
14688
|
if (!env$1) env$1 = {};
|
|
15055
14689
|
var commented = false;
|
|
15056
14690
|
return matches$2.map(function(match) {
|
|
15057
|
-
var s
|
|
15058
|
-
if (!s
|
|
15059
|
-
if (controlRE.test(s
|
|
14691
|
+
var s = match[0];
|
|
14692
|
+
if (!s || commented) return;
|
|
14693
|
+
if (controlRE.test(s)) return { op: s };
|
|
15060
14694
|
var quote = false;
|
|
15061
14695
|
var esc = false;
|
|
15062
14696
|
var out = "";
|
|
@@ -15066,23 +14700,23 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
15066
14700
|
i$1 += 1;
|
|
15067
14701
|
var varend;
|
|
15068
14702
|
var varname;
|
|
15069
|
-
var char = s
|
|
14703
|
+
var char = s.charAt(i$1);
|
|
15070
14704
|
if (char === "{") {
|
|
15071
14705
|
i$1 += 1;
|
|
15072
|
-
if (s
|
|
15073
|
-
varend = s
|
|
15074
|
-
if (varend < 0) throw new Error("Bad substitution: " + s
|
|
15075
|
-
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);
|
|
15076
14710
|
i$1 = varend;
|
|
15077
14711
|
} else if (/[*@#?$!_-]/.test(char)) {
|
|
15078
14712
|
varname = char;
|
|
15079
14713
|
i$1 += 1;
|
|
15080
14714
|
} else {
|
|
15081
|
-
var slicedFromI = s
|
|
14715
|
+
var slicedFromI = s.slice(i$1);
|
|
15082
14716
|
varend = slicedFromI.match(/[^\w\d_]/);
|
|
15083
14717
|
if (!varend) {
|
|
15084
14718
|
varname = slicedFromI;
|
|
15085
|
-
i$1 = s
|
|
14719
|
+
i$1 = s.length;
|
|
15086
14720
|
} else {
|
|
15087
14721
|
varname = slicedFromI.slice(0, varend.index);
|
|
15088
14722
|
i$1 += varend.index - 1;
|
|
@@ -15090,8 +14724,8 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
15090
14724
|
}
|
|
15091
14725
|
return getVar(env$1, "", varname);
|
|
15092
14726
|
}
|
|
15093
|
-
for (i$1 = 0; i$1 < s
|
|
15094
|
-
var c = s
|
|
14727
|
+
for (i$1 = 0; i$1 < s.length; i$1++) {
|
|
14728
|
+
var c = s.charAt(i$1);
|
|
15095
14729
|
isGlob$2 = isGlob$2 || !quote && (c === "*" || c === "?");
|
|
15096
14730
|
if (esc) {
|
|
15097
14731
|
out += c;
|
|
@@ -15100,13 +14734,13 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
15100
14734
|
else if (quote == SQ) out += c;
|
|
15101
14735
|
else if (c === BS) {
|
|
15102
14736
|
i$1 += 1;
|
|
15103
|
-
c = s
|
|
14737
|
+
c = s.charAt(i$1);
|
|
15104
14738
|
if (c === DQ || c === BS || c === DS) out += c;
|
|
15105
14739
|
else out += BS + c;
|
|
15106
14740
|
} else if (c === DS) out += parseEnvVar();
|
|
15107
14741
|
else out += c;
|
|
15108
14742
|
else if (c === DQ || c === SQ) quote = c;
|
|
15109
|
-
else if (controlRE.test(c)) return { op: s
|
|
14743
|
+
else if (controlRE.test(c)) return { op: s };
|
|
15110
14744
|
else if (hash.test(c)) {
|
|
15111
14745
|
commented = true;
|
|
15112
14746
|
var commentObj = { comment: string.slice(match.index + i$1 + 1) };
|
|
@@ -15125,12 +14759,12 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
|
15125
14759
|
return typeof arg === "undefined" ? prev : prev.concat(arg);
|
|
15126
14760
|
}, []);
|
|
15127
14761
|
}
|
|
15128
|
-
module.exports = function parse$
|
|
15129
|
-
var mapped = parseInternal(s
|
|
14762
|
+
module.exports = function parse$15(s, env$1, opts) {
|
|
14763
|
+
var mapped = parseInternal(s, env$1, opts);
|
|
15130
14764
|
if (typeof env$1 !== "function") return mapped;
|
|
15131
|
-
return mapped.reduce(function(acc, s$
|
|
15132
|
-
if (typeof s$
|
|
15133
|
-
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"));
|
|
15134
14768
|
if (xs.length === 1) return acc.concat(xs[0]);
|
|
15135
14769
|
return acc.concat(xs.filter(Boolean).map(function(x) {
|
|
15136
14770
|
if (startsWithToken.test(x)) return JSON.parse(x.split(TOKEN)[1]);
|
|
@@ -15148,8 +14782,8 @@ var require_shell_quote = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
15148
14782
|
}) });
|
|
15149
14783
|
|
|
15150
14784
|
//#endregion
|
|
15151
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
15152
|
-
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) => {
|
|
15153
14787
|
module.exports = {
|
|
15154
14788
|
"/Applications/Atom.app/Contents/MacOS/Atom": "atom",
|
|
15155
14789
|
"/Applications/Atom Beta.app/Contents/MacOS/Atom Beta": "/Applications/Atom Beta.app/Contents/MacOS/Atom Beta",
|
|
@@ -15181,8 +14815,8 @@ var require_macos = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launc
|
|
|
15181
14815
|
}) });
|
|
15182
14816
|
|
|
15183
14817
|
//#endregion
|
|
15184
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
15185
|
-
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) => {
|
|
15186
14820
|
module.exports = {
|
|
15187
14821
|
atom: "atom",
|
|
15188
14822
|
Brackets: "brackets",
|
|
@@ -15190,6 +14824,7 @@ var require_linux = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launc
|
|
|
15190
14824
|
code: "code",
|
|
15191
14825
|
vscodium: "vscodium",
|
|
15192
14826
|
codium: "codium",
|
|
14827
|
+
cursor: "cursor",
|
|
15193
14828
|
trae: "trae",
|
|
15194
14829
|
emacs: "emacs",
|
|
15195
14830
|
gvim: "gvim",
|
|
@@ -15214,8 +14849,8 @@ var require_linux = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launc
|
|
|
15214
14849
|
}) });
|
|
15215
14850
|
|
|
15216
14851
|
//#endregion
|
|
15217
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
15218
|
-
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) => {
|
|
15219
14854
|
module.exports = [
|
|
15220
14855
|
"Brackets.exe",
|
|
15221
14856
|
"Code.exe",
|
|
@@ -15246,8 +14881,8 @@ var require_windows$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/l
|
|
|
15246
14881
|
}) });
|
|
15247
14882
|
|
|
15248
14883
|
//#endregion
|
|
15249
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
15250
|
-
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) => {
|
|
15251
14886
|
const path$8 = __require("path");
|
|
15252
14887
|
const shellQuote = require_shell_quote();
|
|
15253
14888
|
const childProcess$2 = __require("child_process");
|
|
@@ -15308,8 +14943,8 @@ var require_guess = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launc
|
|
|
15308
14943
|
}) });
|
|
15309
14944
|
|
|
15310
14945
|
//#endregion
|
|
15311
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
15312
|
-
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) => {
|
|
15313
14948
|
const path$7 = __require("path");
|
|
15314
14949
|
module.exports = function getArgumentsForPosition$1(editor, fileName, lineNumber, columnNumber = 1) {
|
|
15315
14950
|
switch (path$7.basename(editor).replace(/\.(exe|cmd|bat)$/i, "")) {
|
|
@@ -15387,8 +15022,8 @@ var require_get_args = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/la
|
|
|
15387
15022
|
}) });
|
|
15388
15023
|
|
|
15389
15024
|
//#endregion
|
|
15390
|
-
//#region ../../node_modules/.pnpm/launch-editor@2.
|
|
15391
|
-
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) => {
|
|
15392
15027
|
/**
|
|
15393
15028
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
15394
15029
|
*
|
|
@@ -15487,8 +15122,8 @@ var require_launch_editor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
|
15487
15122
|
}) });
|
|
15488
15123
|
|
|
15489
15124
|
//#endregion
|
|
15490
|
-
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.
|
|
15491
|
-
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) => {
|
|
15492
15127
|
const path$5 = __require("path");
|
|
15493
15128
|
const launch = require_launch_editor();
|
|
15494
15129
|
module.exports = (specifiedEditor, srcRoot, onErrorCallback) => {
|
|
@@ -16004,7 +15639,7 @@ async function ssrTransformJSON(code, inMap) {
|
|
|
16004
15639
|
};
|
|
16005
15640
|
}
|
|
16006
15641
|
async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
16007
|
-
const s
|
|
15642
|
+
const s = new MagicString(code);
|
|
16008
15643
|
let ast;
|
|
16009
15644
|
try {
|
|
16010
15645
|
ast = await parseAstAsync(code);
|
|
@@ -16034,13 +15669,13 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16034
15669
|
const metadataArg = (metadata?.importedNames?.length ?? 0) > 0 ? `, ${JSON.stringify(metadata)}` : "";
|
|
16035
15670
|
const importId = `__vite_ssr_import_${uid++}__`;
|
|
16036
15671
|
const transformedImport = `const ${importId} = await ${ssrImportKey}(${JSON.stringify(source)}${metadataArg});\n`;
|
|
16037
|
-
s
|
|
15672
|
+
s.update(importNode.start, importNode.end, transformedImport);
|
|
16038
15673
|
if (importNode.start === index) hoistIndex = importNode.end;
|
|
16039
|
-
else s
|
|
15674
|
+
else s.move(importNode.start, importNode.end, index);
|
|
16040
15675
|
return importId;
|
|
16041
15676
|
}
|
|
16042
15677
|
function defineExport(name, local = name) {
|
|
16043
|
-
s
|
|
15678
|
+
s.appendLeft(fileStartIndex, `${ssrExportNameKey}(${JSON.stringify(name)}, () => { try { return ${local} } catch {} });\n`);
|
|
16044
15679
|
}
|
|
16045
15680
|
const imports = [];
|
|
16046
15681
|
const exports$1 = [];
|
|
@@ -16054,7 +15689,7 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16054
15689
|
for (const node of imports) {
|
|
16055
15690
|
if (node.type === "ExportNamedDeclaration") {
|
|
16056
15691
|
if (node.source) {
|
|
16057
|
-
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)) });
|
|
16058
15693
|
reExportImportIdMap.set(node, importId$1);
|
|
16059
15694
|
}
|
|
16060
15695
|
continue;
|
|
@@ -16066,9 +15701,9 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16066
15701
|
}
|
|
16067
15702
|
continue;
|
|
16068
15703
|
}
|
|
16069
|
-
const importId = defineImport(hoistIndex, node, { importedNames: node.specifiers.map((s$
|
|
16070
|
-
if (s$
|
|
16071
|
-
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";
|
|
16072
15707
|
}).filter(isDefined) });
|
|
16073
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}`);
|
|
16074
15709
|
else idToImportMap.set(spec.local.name, `${importId}[${JSON.stringify(spec.imported.value)}]`);
|
|
@@ -16079,10 +15714,10 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16079
15714
|
if (node.type === "ExportNamedDeclaration") if (node.declaration) {
|
|
16080
15715
|
if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") defineExport(node.declaration.id.name);
|
|
16081
15716
|
else for (const declaration of node.declaration.declarations) {
|
|
16082
|
-
const names = extract_names(declaration.id);
|
|
16083
|
-
for (const name of names) defineExport(name);
|
|
15717
|
+
const names$1 = extract_names(declaration.id);
|
|
15718
|
+
for (const name of names$1) defineExport(name);
|
|
16084
15719
|
}
|
|
16085
|
-
s
|
|
15720
|
+
s.remove(node.start, node.declaration.start);
|
|
16086
15721
|
} else if (node.source) {
|
|
16087
15722
|
const importId = reExportImportIdMap.get(node);
|
|
16088
15723
|
for (const spec of node.specifiers) {
|
|
@@ -16091,7 +15726,7 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16091
15726
|
else defineExport(exportedAs, `${importId}[${JSON.stringify(spec.local.value)}]`);
|
|
16092
15727
|
}
|
|
16093
15728
|
} else {
|
|
16094
|
-
s
|
|
15729
|
+
s.remove(node.start, node.end);
|
|
16095
15730
|
for (const spec of node.specifiers) {
|
|
16096
15731
|
const local = spec.local.name;
|
|
16097
15732
|
const binding = idToImportMap.get(local);
|
|
@@ -16100,24 +15735,24 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16100
15735
|
}
|
|
16101
15736
|
if (node.type === "ExportDefaultDeclaration") if ("id" in node.declaration && node.declaration.id && !["FunctionExpression", "ClassExpression"].includes(node.declaration.type)) {
|
|
16102
15737
|
const { name } = node.declaration.id;
|
|
16103
|
-
s
|
|
15738
|
+
s.remove(node.start, node.start + 15);
|
|
16104
15739
|
defineExport("default", name);
|
|
16105
15740
|
} else {
|
|
16106
15741
|
const name = `__vite_ssr_export_default__`;
|
|
16107
|
-
s
|
|
15742
|
+
s.update(node.start, node.start + 14, `const ${name} =`);
|
|
16108
15743
|
defineExport("default", name);
|
|
16109
15744
|
}
|
|
16110
15745
|
if (node.type === "ExportAllDeclaration") {
|
|
16111
15746
|
const importId = reExportImportIdMap.get(node);
|
|
16112
15747
|
if (node.exported) defineExport(getIdentifierNameOrLiteralValue$1(node.exported), `${importId}`);
|
|
16113
|
-
else s
|
|
15748
|
+
else s.appendLeft(node.end, `${ssrExportAllKey}(${importId});\n`);
|
|
16114
15749
|
}
|
|
16115
15750
|
}
|
|
16116
15751
|
walk$1(ast, {
|
|
16117
15752
|
onStatements(statements) {
|
|
16118
15753
|
for (let i$1 = 0; i$1 < statements.length - 1; i$1++) {
|
|
16119
15754
|
const stmt = statements[i$1];
|
|
16120
|
-
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, ";");
|
|
16121
15756
|
}
|
|
16122
15757
|
},
|
|
16123
15758
|
onIdentifier(id, parent, parentStack) {
|
|
@@ -16125,37 +15760,37 @@ async function ssrTransformScript(code, inMap, url$3, originalCode) {
|
|
|
16125
15760
|
const binding = idToImportMap.get(id.name);
|
|
16126
15761
|
if (!binding) return;
|
|
16127
15762
|
if (isStaticProperty(parent) && parent.shorthand) {
|
|
16128
|
-
if (!isNodeInPattern(parent) || isInDestructuringAssignment(parent, parentStack)) s
|
|
15763
|
+
if (!isNodeInPattern(parent) || isInDestructuringAssignment(parent, parentStack)) s.appendLeft(id.end, `: ${binding}`);
|
|
16129
15764
|
} else if (parent.type === "PropertyDefinition" && grandparent?.type === "ClassBody" || parent.type === "ClassDeclaration" && id === parent.superClass) {
|
|
16130
15765
|
if (!declaredConst.has(id.name)) {
|
|
16131
15766
|
declaredConst.add(id.name);
|
|
16132
15767
|
const topNode = parentStack[parentStack.length - 2];
|
|
16133
|
-
s
|
|
15768
|
+
s.prependRight(topNode.start, `const ${id.name} = ${binding};\n`);
|
|
16134
15769
|
}
|
|
16135
15770
|
} else if (parent.type === "CallExpression") {
|
|
16136
|
-
s
|
|
16137
|
-
s
|
|
16138
|
-
s
|
|
16139
|
-
} 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);
|
|
16140
15775
|
},
|
|
16141
15776
|
onImportMeta(node) {
|
|
16142
|
-
s
|
|
15777
|
+
s.update(node.start, node.end, ssrImportMetaKey);
|
|
16143
15778
|
},
|
|
16144
15779
|
onDynamicImport(node) {
|
|
16145
|
-
s
|
|
15780
|
+
s.update(node.start, node.start + 6, ssrDynamicImportKey);
|
|
16146
15781
|
if (node.type === "ImportExpression" && node.source.type === "Literal") dynamicDeps.add(node.source.value);
|
|
16147
15782
|
}
|
|
16148
15783
|
});
|
|
16149
15784
|
let map$1;
|
|
16150
15785
|
if (inMap?.mappings === "") map$1 = inMap;
|
|
16151
15786
|
else {
|
|
16152
|
-
map$1 = s
|
|
15787
|
+
map$1 = s.generateMap({ hires: "boundary" });
|
|
16153
15788
|
map$1.sources = [path.basename(url$3)];
|
|
16154
15789
|
map$1.sourcesContent = [originalCode];
|
|
16155
15790
|
if (inMap && inMap.mappings && "sources" in inMap && inMap.sources.length > 0) map$1 = combineSourcemaps(url$3, [map$1, inMap]);
|
|
16156
15791
|
}
|
|
16157
15792
|
return {
|
|
16158
|
-
code: s
|
|
15793
|
+
code: s.toString(),
|
|
16159
15794
|
map: map$1,
|
|
16160
15795
|
ssr: true,
|
|
16161
15796
|
deps: [...deps],
|
|
@@ -16983,11 +16618,11 @@ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
16983
16618
|
function readShebang$1(command) {
|
|
16984
16619
|
const size = 150;
|
|
16985
16620
|
const buffer = Buffer.alloc(size);
|
|
16986
|
-
let fd
|
|
16621
|
+
let fd;
|
|
16987
16622
|
try {
|
|
16988
|
-
fd
|
|
16989
|
-
fs$2.readSync(fd
|
|
16990
|
-
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);
|
|
16991
16626
|
} catch (e$1) {}
|
|
16992
16627
|
return shebangCommand(buffer.toString());
|
|
16993
16628
|
}
|
|
@@ -17202,12 +16837,17 @@ function execAsync(command, options$1) {
|
|
|
17202
16837
|
//#endregion
|
|
17203
16838
|
//#region src/node/shortcuts.ts
|
|
17204
16839
|
var import_picocolors$23 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
17205
|
-
function bindCLIShortcuts(server, opts) {
|
|
17206
|
-
if (!server.httpServer || !
|
|
16840
|
+
function bindCLIShortcuts(server, opts, enabled$1 = process.stdin.isTTY && !process.env.CI) {
|
|
16841
|
+
if (!server.httpServer || !enabled$1) return;
|
|
17207
16842
|
const isDev = isDevServer(server);
|
|
17208
|
-
|
|
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
|
+
};
|
|
17209
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"));
|
|
17210
|
-
const shortcuts =
|
|
16850
|
+
const shortcuts = customShortcuts.concat(isDev ? BASE_DEV_SHORTCUTS : BASE_PREVIEW_SHORTCUTS);
|
|
17211
16851
|
let actionRunning = false;
|
|
17212
16852
|
const onInput = async (input) => {
|
|
17213
16853
|
if (actionRunning) return;
|
|
@@ -17228,9 +16868,12 @@ function bindCLIShortcuts(server, opts) {
|
|
|
17228
16868
|
await shortcut.action(server);
|
|
17229
16869
|
actionRunning = false;
|
|
17230
16870
|
};
|
|
17231
|
-
|
|
17232
|
-
|
|
17233
|
-
|
|
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);
|
|
17234
16877
|
}
|
|
17235
16878
|
const BASE_DEV_SHORTCUTS = [
|
|
17236
16879
|
{
|
|
@@ -17311,7 +16954,7 @@ function resolveEmptyOutDir(emptyOutDir, root, outDirs, logger) {
|
|
|
17311
16954
|
return true;
|
|
17312
16955
|
}
|
|
17313
16956
|
function resolveChokidarOptions(options$1, resolvedOutDirs, emptyOutDir, cacheDir) {
|
|
17314
|
-
const { ignored: ignoredList
|
|
16957
|
+
const { ignored: ignoredList, ...otherOptions } = options$1 ?? {};
|
|
17315
16958
|
const ignored = [
|
|
17316
16959
|
"**/.git/**",
|
|
17317
16960
|
"**/node_modules/**",
|
|
@@ -20121,19 +19764,19 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/w
|
|
|
20121
19764
|
* @param {String} message The error message
|
|
20122
19765
|
* @private
|
|
20123
19766
|
*/
|
|
20124
|
-
function abortHandshake$1(websocket, stream$
|
|
19767
|
+
function abortHandshake$1(websocket, stream$2, message) {
|
|
20125
19768
|
websocket._readyState = WebSocket$2.CLOSING;
|
|
20126
19769
|
const err$2 = new Error(message);
|
|
20127
19770
|
Error.captureStackTrace(err$2, abortHandshake$1);
|
|
20128
|
-
if (stream$
|
|
20129
|
-
stream$
|
|
20130
|
-
stream$
|
|
20131
|
-
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();
|
|
20132
19775
|
process.nextTick(emitErrorAndClose, websocket, err$2);
|
|
20133
19776
|
} else {
|
|
20134
|
-
stream$
|
|
20135
|
-
stream$
|
|
20136
|
-
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));
|
|
20137
19780
|
}
|
|
20138
19781
|
}
|
|
20139
19782
|
/**
|
|
@@ -20245,8 +19888,8 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/w
|
|
|
20245
19888
|
* @param {Readable} stream The readable stream
|
|
20246
19889
|
* @private
|
|
20247
19890
|
*/
|
|
20248
|
-
function resume(stream$
|
|
20249
|
-
stream$
|
|
19891
|
+
function resume(stream$2) {
|
|
19892
|
+
stream$2.resume();
|
|
20250
19893
|
}
|
|
20251
19894
|
/**
|
|
20252
19895
|
* The `Sender` error event handler.
|
|
@@ -20345,8 +19988,8 @@ var require_stream = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8
|
|
|
20345
19988
|
* @param {Duplex} stream The stream.
|
|
20346
19989
|
* @private
|
|
20347
19990
|
*/
|
|
20348
|
-
function emitClose$1(stream$
|
|
20349
|
-
stream$
|
|
19991
|
+
function emitClose$1(stream$2) {
|
|
19992
|
+
stream$2.emit("close");
|
|
20350
19993
|
}
|
|
20351
19994
|
/**
|
|
20352
19995
|
* The listener of the `'end'` event.
|
|
@@ -20839,7 +20482,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
20839
20482
|
...headers
|
|
20840
20483
|
};
|
|
20841
20484
|
socket.once("finish", socket.destroy);
|
|
20842
|
-
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);
|
|
20843
20486
|
}
|
|
20844
20487
|
/**
|
|
20845
20488
|
* Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least
|
|
@@ -21350,19 +20993,19 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http
|
|
|
21350
20993
|
//#endregion
|
|
21351
20994
|
//#region ../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js
|
|
21352
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) => {
|
|
21353
|
-
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) {
|
|
21354
20997
|
if (k2 === void 0) k2 = k;
|
|
21355
|
-
var desc = Object.getOwnPropertyDescriptor(m
|
|
21356
|
-
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 = {
|
|
21357
21000
|
enumerable: true,
|
|
21358
21001
|
get: function() {
|
|
21359
|
-
return m
|
|
21002
|
+
return m[k];
|
|
21360
21003
|
}
|
|
21361
21004
|
};
|
|
21362
21005
|
Object.defineProperty(o$1, k2, desc);
|
|
21363
|
-
}) : (function(o$1, m
|
|
21006
|
+
}) : (function(o$1, m, k, k2) {
|
|
21364
21007
|
if (k2 === void 0) k2 = k;
|
|
21365
|
-
o$1[k2] = m
|
|
21008
|
+
o$1[k2] = m[k];
|
|
21366
21009
|
}));
|
|
21367
21010
|
var __setModuleDefault$3 = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
|
|
21368
21011
|
Object.defineProperty(o$1, "default", {
|
|
@@ -21460,13 +21103,13 @@ var require_web_outgoing = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
21460
21103
|
}) });
|
|
21461
21104
|
|
|
21462
21105
|
//#endregion
|
|
21463
|
-
//#region ../../node_modules/.pnpm/follow-redirects@1.15.
|
|
21464
|
-
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) => {
|
|
21465
21108
|
var debug$11;
|
|
21466
21109
|
module.exports = function() {
|
|
21467
21110
|
if (!debug$11) {
|
|
21468
21111
|
try {
|
|
21469
|
-
debug$11 =
|
|
21112
|
+
debug$11 = (init_node(), __toCommonJS(node_exports))("follow-redirects");
|
|
21470
21113
|
} catch (error$1) {}
|
|
21471
21114
|
if (typeof debug$11 !== "function") debug$11 = function() {};
|
|
21472
21115
|
}
|
|
@@ -21475,8 +21118,8 @@ var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follo
|
|
|
21475
21118
|
}) });
|
|
21476
21119
|
|
|
21477
21120
|
//#endregion
|
|
21478
|
-
//#region ../../node_modules/.pnpm/follow-redirects@1.15.
|
|
21479
|
-
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) => {
|
|
21480
21123
|
var url = __require("url");
|
|
21481
21124
|
var URL$2 = url.URL;
|
|
21482
21125
|
var http$3 = __require("http");
|
|
@@ -21908,19 +21551,19 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
|
21908
21551
|
//#endregion
|
|
21909
21552
|
//#region ../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js
|
|
21910
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) => {
|
|
21911
|
-
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) {
|
|
21912
21555
|
if (k2 === void 0) k2 = k;
|
|
21913
|
-
var desc = Object.getOwnPropertyDescriptor(m
|
|
21914
|
-
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 = {
|
|
21915
21558
|
enumerable: true,
|
|
21916
21559
|
get: function() {
|
|
21917
|
-
return m
|
|
21560
|
+
return m[k];
|
|
21918
21561
|
}
|
|
21919
21562
|
};
|
|
21920
21563
|
Object.defineProperty(o$1, k2, desc);
|
|
21921
|
-
}) : (function(o$1, m
|
|
21564
|
+
}) : (function(o$1, m, k, k2) {
|
|
21922
21565
|
if (k2 === void 0) k2 = k;
|
|
21923
|
-
o$1[k2] = m
|
|
21566
|
+
o$1[k2] = m[k];
|
|
21924
21567
|
}));
|
|
21925
21568
|
var __setModuleDefault$2 = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
|
|
21926
21569
|
Object.defineProperty(o$1, "default", {
|
|
@@ -22053,19 +21696,19 @@ var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
|
22053
21696
|
//#endregion
|
|
22054
21697
|
//#region ../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js
|
|
22055
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) => {
|
|
22056
|
-
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) {
|
|
22057
21700
|
if (k2 === void 0) k2 = k;
|
|
22058
|
-
var desc = Object.getOwnPropertyDescriptor(m
|
|
22059
|
-
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 = {
|
|
22060
21703
|
enumerable: true,
|
|
22061
21704
|
get: function() {
|
|
22062
|
-
return m
|
|
21705
|
+
return m[k];
|
|
22063
21706
|
}
|
|
22064
21707
|
};
|
|
22065
21708
|
Object.defineProperty(o$1, k2, desc);
|
|
22066
|
-
}) : (function(o$1, m
|
|
21709
|
+
}) : (function(o$1, m, k, k2) {
|
|
22067
21710
|
if (k2 === void 0) k2 = k;
|
|
22068
|
-
o$1[k2] = m
|
|
21711
|
+
o$1[k2] = m[k];
|
|
22069
21712
|
}));
|
|
22070
21713
|
var __setModuleDefault$1 = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
|
|
22071
21714
|
Object.defineProperty(o$1, "default", {
|
|
@@ -22107,7 +21750,7 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
22107
21750
|
const https = __importStar$1(__require("node:https"));
|
|
22108
21751
|
const common = __importStar$1(require_common());
|
|
22109
21752
|
const web_outgoing_1 = require_web_outgoing();
|
|
22110
|
-
const log$1 = (0, __importDefault$1(
|
|
21753
|
+
const log$1 = (0, __importDefault$1((init_node(), __toCommonJS(node_exports))).default)("http-proxy-3:ws-incoming");
|
|
22111
21754
|
const web_o = Object.values(web_outgoing_1.OUTGOING_PASSES);
|
|
22112
21755
|
function createSocketCounter(name) {
|
|
22113
21756
|
let sockets = /* @__PURE__ */ new Set();
|
|
@@ -22263,19 +21906,19 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
22263
21906
|
//#endregion
|
|
22264
21907
|
//#region ../../node_modules/.pnpm/http-proxy-3@1.22.0/node_modules/http-proxy-3/dist/lib/http-proxy/index.js
|
|
22265
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) => {
|
|
22266
|
-
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) {
|
|
22267
21910
|
if (k2 === void 0) k2 = k;
|
|
22268
|
-
var desc = Object.getOwnPropertyDescriptor(m
|
|
22269
|
-
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 = {
|
|
22270
21913
|
enumerable: true,
|
|
22271
21914
|
get: function() {
|
|
22272
|
-
return m
|
|
21915
|
+
return m[k];
|
|
22273
21916
|
}
|
|
22274
21917
|
};
|
|
22275
21918
|
Object.defineProperty(o$1, k2, desc);
|
|
22276
|
-
}) : (function(o$1, m
|
|
21919
|
+
}) : (function(o$1, m, k, k2) {
|
|
22277
21920
|
if (k2 === void 0) k2 = k;
|
|
22278
|
-
o$1[k2] = m
|
|
21921
|
+
o$1[k2] = m[k];
|
|
22279
21922
|
}));
|
|
22280
21923
|
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o$1, v) {
|
|
22281
21924
|
Object.defineProperty(o$1, "default", {
|
|
@@ -22314,7 +21957,7 @@ var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
|
22314
21957
|
const web_incoming_1 = require_web_incoming();
|
|
22315
21958
|
const ws_incoming_1$1 = require_ws_incoming();
|
|
22316
21959
|
const node_events_1 = __require("node:events");
|
|
22317
|
-
const debug_1 = __importDefault(
|
|
21960
|
+
const debug_1 = __importDefault((init_node(), __toCommonJS(node_exports)));
|
|
22318
21961
|
const common_1 = require_common();
|
|
22319
21962
|
const log = (0, debug_1.default)("http-proxy-3");
|
|
22320
21963
|
var ProxyServer = class ProxyServer extends node_events_1.EventEmitter {
|
|
@@ -22897,8 +22540,8 @@ function send$1(req$4, res, file, stats, headers) {
|
|
|
22897
22540
|
if (tmp = res.getHeader("content-type")) headers["Content-Type"] = tmp;
|
|
22898
22541
|
if (req$4.headers.range) {
|
|
22899
22542
|
code = 206;
|
|
22900
|
-
let [x, y
|
|
22901
|
-
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;
|
|
22902
22545
|
let start = opts.start = parseInt(x, 10) || 0;
|
|
22903
22546
|
if (end >= stats.size) end = stats.size - 1;
|
|
22904
22547
|
if (start >= stats.size) {
|
|
@@ -23340,7 +22983,7 @@ async function handleModuleSoftInvalidation(environment, mod, timestamp) {
|
|
|
23340
22983
|
else {
|
|
23341
22984
|
await init;
|
|
23342
22985
|
const source = transformResult.code;
|
|
23343
|
-
const s
|
|
22986
|
+
const s = new MagicString(source);
|
|
23344
22987
|
const [imports] = parse(source, mod.id || void 0);
|
|
23345
22988
|
for (const imp of imports) {
|
|
23346
22989
|
let rawUrl = source.slice(imp.s, imp.e);
|
|
@@ -23355,13 +22998,13 @@ async function handleModuleSoftInvalidation(environment, mod, timestamp) {
|
|
|
23355
22998
|
const replacedUrl = injectQuery(urlWithoutTimestamp, `t=${importedMod.lastHMRTimestamp}`);
|
|
23356
22999
|
const start = hasQuotes ? imp.s + 1 : imp.s;
|
|
23357
23000
|
const end = hasQuotes ? imp.e - 1 : imp.e;
|
|
23358
|
-
s
|
|
23001
|
+
s.overwrite(start, end, replacedUrl);
|
|
23359
23002
|
}
|
|
23360
23003
|
if (imp.d === -1 && environment.config.dev.preTransformRequests) environment.warmupRequest(hmrUrl);
|
|
23361
23004
|
break;
|
|
23362
23005
|
}
|
|
23363
23006
|
}
|
|
23364
|
-
const code = s
|
|
23007
|
+
const code = s.toString();
|
|
23365
23008
|
result = {
|
|
23366
23009
|
...transformResult,
|
|
23367
23010
|
code,
|
|
@@ -24027,23 +23670,23 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
24027
23670
|
continue;
|
|
24028
23671
|
}
|
|
24029
23672
|
if (match[3]) {
|
|
24030
|
-
let names$
|
|
24031
|
-
if (names$
|
|
23673
|
+
let names$2 = /\.([^.?]+)/.exec(match[4])?.[1] || "";
|
|
23674
|
+
if (names$2 === "default") names$2 = "default: __vite_default__";
|
|
24032
23675
|
dynamicImports[dynamicImportTreeshakenRE.lastIndex - match[4]?.length - 1] = {
|
|
24033
|
-
declaration: `const {${names$
|
|
24034
|
-
names: `{ ${names$
|
|
23676
|
+
declaration: `const {${names$2}}`,
|
|
23677
|
+
names: `{ ${names$2} }`
|
|
24035
23678
|
};
|
|
24036
23679
|
continue;
|
|
24037
23680
|
}
|
|
24038
|
-
const names = match[6]?.trim();
|
|
23681
|
+
const names$1 = match[6]?.trim();
|
|
24039
23682
|
dynamicImports[dynamicImportTreeshakenRE.lastIndex - match[5]?.length] = {
|
|
24040
|
-
declaration: `const {${names}}`,
|
|
24041
|
-
names: `{ ${names} }`
|
|
23683
|
+
declaration: `const {${names$1}}`,
|
|
23684
|
+
names: `{ ${names$1} }`
|
|
24042
23685
|
};
|
|
24043
23686
|
}
|
|
24044
23687
|
}
|
|
24045
|
-
let s
|
|
24046
|
-
const str = () => s
|
|
23688
|
+
let s;
|
|
23689
|
+
const str = () => s || (s = new MagicString(source));
|
|
24047
23690
|
let needPreloadHelper = false;
|
|
24048
23691
|
for (let index = 0; index < imports.length; index++) {
|
|
24049
23692
|
const { s: start, e: end, ss: expStart, se: expEnd, d: dynamicIndex, a: attributeIndex } = imports[index];
|
|
@@ -24051,18 +23694,18 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
24051
23694
|
if (!isDynamicImport && attributeIndex > -1) str().remove(end + 1, expEnd);
|
|
24052
23695
|
if (isDynamicImport && insertPreload && (source[start] === "\"" || source[start] === "'" || source[start] === "`")) {
|
|
24053
23696
|
needPreloadHelper = true;
|
|
24054
|
-
const { declaration, names } = dynamicImports[expEnd] || {};
|
|
24055
|
-
if (names) {
|
|
23697
|
+
const { declaration, names: names$1 } = dynamicImports[expEnd] || {};
|
|
23698
|
+
if (names$1) {
|
|
24056
23699
|
str().prependLeft(expStart, `${preloadMethod}(async () => { ${declaration} = await `);
|
|
24057
|
-
str().appendRight(expEnd, `;return ${names}}`);
|
|
23700
|
+
str().appendRight(expEnd, `;return ${names$1}}`);
|
|
24058
23701
|
} else str().prependLeft(expStart, `${preloadMethod}(() => `);
|
|
24059
23702
|
str().appendRight(expEnd, `,${isModernFlag}?${preloadMarker}:void 0${renderBuiltUrl || isRelativeBase ? ",import.meta.url" : ""})`);
|
|
24060
23703
|
}
|
|
24061
23704
|
}
|
|
24062
23705
|
if (needPreloadHelper && insertPreload && !source.includes(`const ${preloadMethod} =`)) str().prepend(`import { ${preloadMethod} } from "${preloadHelperId}";`);
|
|
24063
|
-
if (s
|
|
24064
|
-
code: s
|
|
24065
|
-
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
|
|
24066
23709
|
};
|
|
24067
23710
|
}
|
|
24068
23711
|
},
|
|
@@ -24143,7 +23786,7 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
24143
23786
|
frame: generateCodeFrame(code, loc)
|
|
24144
23787
|
});
|
|
24145
23788
|
}
|
|
24146
|
-
const s
|
|
23789
|
+
const s = new MagicString(code);
|
|
24147
23790
|
const rewroteMarkerStartPos = /* @__PURE__ */ new Set();
|
|
24148
23791
|
const fileDeps = [];
|
|
24149
23792
|
const addFileDep = (url$3, runtime = false) => {
|
|
@@ -24190,7 +23833,7 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
24190
23833
|
});
|
|
24191
23834
|
hasRemovedPureCssChunk = true;
|
|
24192
23835
|
}
|
|
24193
|
-
s
|
|
23836
|
+
s.update(expStart, expEnd, "Promise.resolve({})");
|
|
24194
23837
|
}
|
|
24195
23838
|
}
|
|
24196
23839
|
};
|
|
@@ -24199,7 +23842,7 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
24199
23842
|
let markerStartPos$1 = findPreloadMarker(code, end);
|
|
24200
23843
|
if (markerStartPos$1 === -1 && imports.length === 1) markerStartPos$1 = findPreloadMarker(code);
|
|
24201
23844
|
if (markerStartPos$1 > 0) {
|
|
24202
|
-
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] : [];
|
|
24203
23846
|
const resolveDependencies = modulePreload ? modulePreload.resolveDependencies : void 0;
|
|
24204
23847
|
if (resolveDependencies && normalizedFile) {
|
|
24205
23848
|
const cssDeps = [];
|
|
@@ -24216,25 +23859,25 @@ function buildImportAnalysisPlugin(config$2) {
|
|
|
24216
23859
|
if (typeof replacement === "string") return addFileDep(replacement);
|
|
24217
23860
|
return addFileDep(replacement.runtime, true);
|
|
24218
23861
|
});
|
|
24219
|
-
else renderedDeps = depsArray.map((d
|
|
24220
|
-
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(",")}])` : `[]`);
|
|
24221
23864
|
rewroteMarkerStartPos.add(markerStartPos$1);
|
|
24222
23865
|
}
|
|
24223
23866
|
}
|
|
24224
23867
|
if (fileDeps.length > 0) {
|
|
24225
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`;
|
|
24226
|
-
if (code.startsWith("#!")) s
|
|
24227
|
-
else s
|
|
23869
|
+
if (code.startsWith("#!")) s.prependLeft(code.indexOf("\n") + 1, mapDepsCode);
|
|
23870
|
+
else s.prepend(mapDepsCode);
|
|
24228
23871
|
}
|
|
24229
23872
|
let markerStartPos = findPreloadMarker(code);
|
|
24230
23873
|
while (markerStartPos >= 0) {
|
|
24231
|
-
if (!rewroteMarkerStartPos.has(markerStartPos)) s
|
|
23874
|
+
if (!rewroteMarkerStartPos.has(markerStartPos)) s.update(markerStartPos, markerStartPos + preloadMarker.length, "void 0");
|
|
24232
23875
|
markerStartPos = findPreloadMarker(code, markerStartPos + preloadMarker.length);
|
|
24233
23876
|
}
|
|
24234
|
-
if (s
|
|
24235
|
-
chunk.code = s
|
|
23877
|
+
if (s.hasChanged()) {
|
|
23878
|
+
chunk.code = s.toString();
|
|
24236
23879
|
if (buildSourcemap && chunk.map) {
|
|
24237
|
-
const nextMap = s
|
|
23880
|
+
const nextMap = s.generateMap({
|
|
24238
23881
|
source: chunk.fileName,
|
|
24239
23882
|
hires: "boundary"
|
|
24240
23883
|
});
|
|
@@ -24385,9 +24028,9 @@ function traverseNodes(node, visitor) {
|
|
|
24385
24028
|
if (nodeIsElement(node) || node.nodeName === "#document" || node.nodeName === "#document-fragment") node.childNodes.forEach((childNode) => traverseNodes(childNode, visitor));
|
|
24386
24029
|
}
|
|
24387
24030
|
async function traverseHtml(html, filePath, warn, visitor) {
|
|
24388
|
-
const { parse: parse$
|
|
24031
|
+
const { parse: parse$15 } = await import("./dist.js");
|
|
24389
24032
|
const warnings = {};
|
|
24390
|
-
traverseNodes(parse$
|
|
24033
|
+
traverseNodes(parse$15(html, {
|
|
24391
24034
|
scriptingEnabled: false,
|
|
24392
24035
|
sourceCodeLocationInfo: true,
|
|
24393
24036
|
onParseError: (e$1) => {
|
|
@@ -24422,19 +24065,19 @@ function getScriptInfo(node) {
|
|
|
24422
24065
|
};
|
|
24423
24066
|
}
|
|
24424
24067
|
const attrValueStartRE = /=\s*(.)/;
|
|
24425
|
-
function overwriteAttrValue(s
|
|
24426
|
-
const srcString = s
|
|
24068
|
+
function overwriteAttrValue(s, sourceCodeLocation, newValue) {
|
|
24069
|
+
const srcString = s.slice(sourceCodeLocation.startOffset, sourceCodeLocation.endOffset);
|
|
24427
24070
|
const valueStart = attrValueStartRE.exec(srcString);
|
|
24428
24071
|
if (!valueStart) throw new Error(`[vite:html] internal error, failed to overwrite attribute value`);
|
|
24429
24072
|
const wrapOffset = valueStart[1] === "\"" || valueStart[1] === "'" ? 1 : 0;
|
|
24430
24073
|
const valueOffset = valueStart.index + valueStart[0].length - 1;
|
|
24431
|
-
s
|
|
24432
|
-
return s
|
|
24074
|
+
s.update(sourceCodeLocation.startOffset + valueOffset + wrapOffset, sourceCodeLocation.endOffset - wrapOffset, newValue);
|
|
24075
|
+
return s;
|
|
24433
24076
|
}
|
|
24434
|
-
function removeViteIgnoreAttr(s
|
|
24077
|
+
function removeViteIgnoreAttr(s, sourceCodeLocation) {
|
|
24435
24078
|
const loc = sourceCodeLocation.attrs?.["vite-ignore"];
|
|
24436
|
-
if (loc) s
|
|
24437
|
-
return s
|
|
24079
|
+
if (loc) s.remove(loc.startOffset, loc.endOffset);
|
|
24080
|
+
return s;
|
|
24438
24081
|
}
|
|
24439
24082
|
/**
|
|
24440
24083
|
* Format parse5 @type {ParserError} to @type {RollupError}
|
|
@@ -24492,7 +24135,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24492
24135
|
const lineStartOffset = startOffset - node.sourceCodeLocation.startCol;
|
|
24493
24136
|
let isLineEmpty = false;
|
|
24494
24137
|
try {
|
|
24495
|
-
isLineEmpty = !s
|
|
24138
|
+
isLineEmpty = !s.slice(Math.max(0, lineStartOffset), startOffset).trim();
|
|
24496
24139
|
} catch {}
|
|
24497
24140
|
return isLineEmpty ? lineStartOffset : startOffset;
|
|
24498
24141
|
};
|
|
@@ -24501,7 +24144,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24501
24144
|
filename: id
|
|
24502
24145
|
});
|
|
24503
24146
|
let js = "";
|
|
24504
|
-
const s
|
|
24147
|
+
const s = new MagicString(html);
|
|
24505
24148
|
const scriptUrls = [];
|
|
24506
24149
|
const styleUrls = [];
|
|
24507
24150
|
let inlineModuleIndex = -1;
|
|
@@ -24524,11 +24167,11 @@ function buildHtmlPlugin(config$2) {
|
|
|
24524
24167
|
let shouldRemove = false;
|
|
24525
24168
|
if (node.nodeName === "script") {
|
|
24526
24169
|
const { src, srcSourceCodeLocation, isModule, isAsync, isIgnored } = getScriptInfo(node);
|
|
24527
|
-
if (isIgnored) removeViteIgnoreAttr(s
|
|
24170
|
+
if (isIgnored) removeViteIgnoreAttr(s, node.sourceCodeLocation);
|
|
24528
24171
|
else {
|
|
24529
24172
|
const url$3 = src && src.value;
|
|
24530
24173
|
const isPublicFile = !!(url$3 && checkPublicFile(url$3, config$2));
|
|
24531
|
-
if (isPublicFile) overwriteAttrValue(s
|
|
24174
|
+
if (isPublicFile) overwriteAttrValue(s, srcSourceCodeLocation, partialEncodeURIPath(toOutputPublicFilePath(url$3)));
|
|
24532
24175
|
if (isModule) {
|
|
24533
24176
|
inlineModuleIndex++;
|
|
24534
24177
|
if (url$3 && !isExcludedUrl(url$3) && !isPublicFile) {
|
|
@@ -24561,7 +24204,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24561
24204
|
}
|
|
24562
24205
|
const assetAttributes = getNodeAssetAttributes(node);
|
|
24563
24206
|
for (const attr of assetAttributes) if (attr.type === "remove") {
|
|
24564
|
-
s
|
|
24207
|
+
s.remove(attr.location.startOffset, attr.location.endOffset);
|
|
24565
24208
|
continue;
|
|
24566
24209
|
} else if (attr.type === "srcset") assetUrlsPromises.push((async () => {
|
|
24567
24210
|
const processedEncodedUrl = await processSrcSet(attr.value, async ({ url: url$3 }) => {
|
|
@@ -24572,11 +24215,11 @@ function buildHtmlPlugin(config$2) {
|
|
|
24572
24215
|
}
|
|
24573
24216
|
return url$3;
|
|
24574
24217
|
});
|
|
24575
|
-
if (processedEncodedUrl !== attr.value) overwriteAttrValue(s
|
|
24218
|
+
if (processedEncodedUrl !== attr.value) overwriteAttrValue(s, attr.location, processedEncodedUrl);
|
|
24576
24219
|
})());
|
|
24577
24220
|
else if (attr.type === "src") {
|
|
24578
24221
|
const url$3 = decodeURIIfPossible(attr.value);
|
|
24579
|
-
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)));
|
|
24580
24223
|
else if (!isExcludedUrl(url$3)) if (node.nodeName === "link" && isCSSRequest(url$3) && !("media" in attr.attributes || "disabled" in attr.attributes)) {
|
|
24581
24224
|
const importExpression = `\nimport ${JSON.stringify(url$3)}`;
|
|
24582
24225
|
styleUrls.push({
|
|
@@ -24589,7 +24232,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24589
24232
|
const shouldInline$1 = node.nodeName === "link" && attr.attributes.rel && parseRelAttr(attr.attributes.rel).some((v) => noInlineLinkRels.has(v)) ? false : void 0;
|
|
24590
24233
|
assetUrlsPromises.push((async () => {
|
|
24591
24234
|
const processedUrl = await processAssetUrl(url$3, shouldInline$1);
|
|
24592
|
-
if (processedUrl !== url$3) overwriteAttrValue(s
|
|
24235
|
+
if (processedUrl !== url$3) overwriteAttrValue(s, attr.location, partialEncodeURIPath(processedUrl));
|
|
24593
24236
|
})());
|
|
24594
24237
|
}
|
|
24595
24238
|
}
|
|
@@ -24600,7 +24243,7 @@ function buildHtmlPlugin(config$2) {
|
|
|
24600
24243
|
addToHTMLProxyCache(config$2, id.replace(normalizePath(config$2.root), ""), inlineModuleIndex, { code });
|
|
24601
24244
|
js += `\nimport "${id}?html-proxy&inline-css&style-attr&index=${inlineModuleIndex}.css"`;
|
|
24602
24245
|
const hash$1 = getHash(cleanUrl(id));
|
|
24603
|
-
overwriteAttrValue(s
|
|
24246
|
+
overwriteAttrValue(s, inlineStyle.location, `__VITE_INLINE_CSS__${hash$1}_${inlineModuleIndex}__`);
|
|
24604
24247
|
}
|
|
24605
24248
|
if (node.nodeName === "style" && node.childNodes.length) {
|
|
24606
24249
|
const styleNode = node.childNodes.pop();
|
|
@@ -24609,15 +24252,15 @@ function buildHtmlPlugin(config$2) {
|
|
|
24609
24252
|
addToHTMLProxyCache(config$2, filePath, inlineModuleIndex, { code: styleNode.value });
|
|
24610
24253
|
js += `\nimport "${id}?html-proxy&inline-css&index=${inlineModuleIndex}.css"`;
|
|
24611
24254
|
const hash$1 = getHash(cleanUrl(id));
|
|
24612
|
-
s
|
|
24255
|
+
s.update(styleNode.sourceCodeLocation.startOffset, styleNode.sourceCodeLocation.endOffset, `__VITE_INLINE_CSS__${hash$1}_${inlineModuleIndex}__`);
|
|
24613
24256
|
}
|
|
24614
|
-
if (shouldRemove) s
|
|
24257
|
+
if (shouldRemove) s.remove(nodeStartWithLeadingWhitespace(node), node.sourceCodeLocation.endOffset);
|
|
24615
24258
|
});
|
|
24616
24259
|
isAsyncScriptMap.get(config$2).set(id, everyScriptIsAsync);
|
|
24617
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.`);
|
|
24618
24261
|
await Promise.all(assetUrlsPromises);
|
|
24619
|
-
for (const { start, end, url: url$3 } of scriptUrls) if (checkPublicFile(url$3, config$2)) s
|
|
24620
|
-
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)));
|
|
24621
24264
|
const resolvedStyleUrls = await Promise.all(styleUrls.map(async (styleUrl) => ({
|
|
24622
24265
|
...styleUrl,
|
|
24623
24266
|
resolved: await this.resolve(styleUrl.url, id)
|
|
@@ -24626,8 +24269,8 @@ function buildHtmlPlugin(config$2) {
|
|
|
24626
24269
|
config$2.logger.warnOnce(`\n${url$3} doesn't exist at build time, it will remain unchanged to be resolved at runtime`);
|
|
24627
24270
|
const importExpression = `\nimport ${JSON.stringify(url$3)}`;
|
|
24628
24271
|
js = js.replace(importExpression, "");
|
|
24629
|
-
} else s
|
|
24630
|
-
processedHtml(this).set(id, s
|
|
24272
|
+
} else s.remove(start, end);
|
|
24273
|
+
processedHtml(this).set(id, s.toString());
|
|
24631
24274
|
const { modulePreload } = this.environment.config.build;
|
|
24632
24275
|
if (modulePreload !== false && modulePreload.polyfill && (someScriptsAreAsync || someScriptsAreDefer)) js = `import "${modulePreloadPolyfillId}";\n${js}`;
|
|
24633
24276
|
await Promise.all(setModuleSideEffectPromises);
|
|
@@ -24749,15 +24392,15 @@ function buildHtmlPlugin(config$2) {
|
|
|
24749
24392
|
}]);
|
|
24750
24393
|
}
|
|
24751
24394
|
let match;
|
|
24752
|
-
let s
|
|
24395
|
+
let s;
|
|
24753
24396
|
inlineCSSRE$1.lastIndex = 0;
|
|
24754
24397
|
while (match = inlineCSSRE$1.exec(result)) {
|
|
24755
|
-
s
|
|
24398
|
+
s ||= new MagicString(result);
|
|
24756
24399
|
const { 0: full, 1: scopedName } = match;
|
|
24757
24400
|
const cssTransformedCode = htmlProxyResult.get(scopedName);
|
|
24758
|
-
s
|
|
24401
|
+
s.update(match.index, match.index + full.length, cssTransformedCode);
|
|
24759
24402
|
}
|
|
24760
|
-
if (s
|
|
24403
|
+
if (s) result = s.toString();
|
|
24761
24404
|
result = await applyHtmlTransforms(result, [...normalHooks, ...postHooks], this, {
|
|
24762
24405
|
path: "/" + relativeUrlPath,
|
|
24763
24406
|
filename: normalizedId,
|
|
@@ -24894,7 +24537,7 @@ function injectNonceAttributeTagHook(config$2) {
|
|
|
24894
24537
|
return async (html, { filename }) => {
|
|
24895
24538
|
const nonce = config$2.html?.cspNonce;
|
|
24896
24539
|
if (!nonce) return;
|
|
24897
|
-
const s
|
|
24540
|
+
const s = new MagicString(html);
|
|
24898
24541
|
await traverseHtml(html, filename, config$2.logger.warn, (node) => {
|
|
24899
24542
|
if (!nodeIsElement(node)) return;
|
|
24900
24543
|
const { nodeName, attrs, sourceCodeLocation } = node;
|
|
@@ -24902,10 +24545,10 @@ function injectNonceAttributeTagHook(config$2) {
|
|
|
24902
24545
|
if (attrs.some(({ name }) => name === "nonce")) return;
|
|
24903
24546
|
const startTagEndOffset = sourceCodeLocation.startTag.endOffset;
|
|
24904
24547
|
const appendOffset = html[startTagEndOffset - 2] === "/" ? 2 : 1;
|
|
24905
|
-
s
|
|
24548
|
+
s.appendRight(startTagEndOffset - appendOffset, ` nonce="${nonce}"`);
|
|
24906
24549
|
}
|
|
24907
24550
|
});
|
|
24908
|
-
return s
|
|
24551
|
+
return s.toString();
|
|
24909
24552
|
};
|
|
24910
24553
|
}
|
|
24911
24554
|
function resolveHtmlTransforms(plugins$1) {
|
|
@@ -25313,7 +24956,7 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
|
25313
24956
|
proxyModuleUrl = wrapId(proxyModulePath);
|
|
25314
24957
|
}
|
|
25315
24958
|
proxyModuleUrl = joinUrlSegments(decodedBase, proxyModuleUrl);
|
|
25316
|
-
const s
|
|
24959
|
+
const s = new MagicString(html);
|
|
25317
24960
|
let inlineModuleIndex = -1;
|
|
25318
24961
|
const proxyCacheUrl = decodeURI(cleanUrl(proxyModulePath).replace(normalizePath(config$2.root), ""));
|
|
25319
24962
|
const styleUrl = [];
|
|
@@ -25335,23 +24978,23 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
|
25335
24978
|
});
|
|
25336
24979
|
const modulePath = `${proxyModuleUrl}?html-proxy&index=${inlineModuleIndex}.${ext}`;
|
|
25337
24980
|
inlineModulePaths.push(modulePath);
|
|
25338
|
-
s
|
|
24981
|
+
s.update(node.sourceCodeLocation.startOffset, node.sourceCodeLocation.endOffset, `<script type="module" src="${modulePath}"><\/script>`);
|
|
25339
24982
|
preTransformRequest(server, modulePath, decodedBase);
|
|
25340
24983
|
};
|
|
25341
24984
|
await traverseHtml(html, filename, config$2.logger.warn, (node) => {
|
|
25342
24985
|
if (!nodeIsElement(node)) return;
|
|
25343
24986
|
if (node.nodeName === "script") {
|
|
25344
24987
|
const { src, srcSourceCodeLocation, isModule, isIgnored } = getScriptInfo(node);
|
|
25345
|
-
if (isIgnored) removeViteIgnoreAttr(s
|
|
24988
|
+
if (isIgnored) removeViteIgnoreAttr(s, node.sourceCodeLocation);
|
|
25346
24989
|
else if (src) {
|
|
25347
24990
|
const processedUrl = processNodeUrl(src.value, false, config$2, htmlPath, originalUrl, server, !isModule);
|
|
25348
|
-
if (processedUrl !== src.value) overwriteAttrValue(s
|
|
24991
|
+
if (processedUrl !== src.value) overwriteAttrValue(s, srcSourceCodeLocation, processedUrl);
|
|
25349
24992
|
} else if (isModule && node.childNodes.length) addInlineModule(node, "js");
|
|
25350
24993
|
else if (node.childNodes.length) {
|
|
25351
24994
|
const scriptNode = node.childNodes[node.childNodes.length - 1];
|
|
25352
24995
|
for (const { url: url$3, start, end } of extractImportExpressionFromClassicScript(scriptNode)) {
|
|
25353
24996
|
const processedUrl = processNodeUrl(url$3, false, config$2, htmlPath, originalUrl);
|
|
25354
|
-
if (processedUrl !== url$3) s
|
|
24997
|
+
if (processedUrl !== url$3) s.update(start, end, processedUrl);
|
|
25355
24998
|
}
|
|
25356
24999
|
}
|
|
25357
25000
|
}
|
|
@@ -25373,10 +25016,10 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
|
25373
25016
|
});
|
|
25374
25017
|
}
|
|
25375
25018
|
const assetAttributes = getNodeAssetAttributes(node);
|
|
25376
|
-
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);
|
|
25377
25020
|
else {
|
|
25378
25021
|
const processedUrl = processNodeUrl(attr.value, attr.type === "srcset", config$2, htmlPath, originalUrl);
|
|
25379
|
-
if (processedUrl !== attr.value) overwriteAttrValue(s
|
|
25022
|
+
if (processedUrl !== attr.value) overwriteAttrValue(s, attr.location, processedUrl);
|
|
25380
25023
|
}
|
|
25381
25024
|
});
|
|
25382
25025
|
const clientModuelGraph = server?.environments.client.moduleGraph;
|
|
@@ -25394,16 +25037,16 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
|
25394
25037
|
if (result.map.mappings) await injectSourcesContent(result.map, proxyModulePath, config$2.logger);
|
|
25395
25038
|
content = getCodeWithSourcemap("css", result.code, result.map);
|
|
25396
25039
|
} else content = result.code;
|
|
25397
|
-
s
|
|
25040
|
+
s.overwrite(start, end, content);
|
|
25398
25041
|
}), ...inlineStyles.map(async ({ index, location: location$1, code }) => {
|
|
25399
25042
|
const url$3 = `${proxyModulePath}?html-proxy&inline-css&style-attr&index=${index}.css`;
|
|
25400
25043
|
const mod = await server.environments.client.moduleGraph.ensureEntryFromUrl(url$3, false);
|
|
25401
25044
|
ensureWatchedFile(watcher, mod.file, config$2.root);
|
|
25402
25045
|
await server?.environments.client.pluginContainer.transform(code, mod.id);
|
|
25403
25046
|
const hash$1 = getHash(cleanUrl(mod.id));
|
|
25404
|
-
overwriteAttrValue(s
|
|
25047
|
+
overwriteAttrValue(s, location$1, htmlProxyResult.get(`${hash$1}_${index}`) ?? "");
|
|
25405
25048
|
})]);
|
|
25406
|
-
html = s
|
|
25049
|
+
html = s.toString();
|
|
25407
25050
|
return {
|
|
25408
25051
|
html,
|
|
25409
25052
|
tags: [{
|
|
@@ -26043,8 +25686,8 @@ async function _createServer(inlineConfig = {}, options$1) {
|
|
|
26043
25686
|
warnFutureDeprecation(config$2, "removeServerHot");
|
|
26044
25687
|
return hot;
|
|
26045
25688
|
},
|
|
26046
|
-
set hot(h
|
|
26047
|
-
hot = h
|
|
25689
|
+
set hot(h) {
|
|
25690
|
+
hot = h;
|
|
26048
25691
|
},
|
|
26049
25692
|
environments,
|
|
26050
25693
|
get pluginContainer() {
|
|
@@ -26296,7 +25939,7 @@ function createServerCloseFn(server) {
|
|
|
26296
25939
|
hasListened = true;
|
|
26297
25940
|
});
|
|
26298
25941
|
return () => new Promise((resolve$4, reject) => {
|
|
26299
|
-
openSockets.forEach((s
|
|
25942
|
+
openSockets.forEach((s) => s.destroy());
|
|
26300
25943
|
if (hasListened) server.close((err$2) => {
|
|
26301
25944
|
if (err$2) reject(err$2);
|
|
26302
25945
|
else resolve$4();
|
|
@@ -26817,7 +26460,7 @@ function isNodeWithinCircularImports(node, nodeChain, currentChain = [node], tra
|
|
|
26817
26460
|
...[...currentChain].reverse(),
|
|
26818
26461
|
...nodeChain.slice(importerIndex, -1).reverse()
|
|
26819
26462
|
];
|
|
26820
|
-
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(" -> "));
|
|
26821
26464
|
}
|
|
26822
26465
|
return true;
|
|
26823
26466
|
}
|
|
@@ -26837,7 +26480,7 @@ function handlePrunedModules(mods, { hot }) {
|
|
|
26837
26480
|
});
|
|
26838
26481
|
hot.send({
|
|
26839
26482
|
type: "prune",
|
|
26840
|
-
paths: [...mods].map((m
|
|
26483
|
+
paths: [...mods].map((m) => m.url)
|
|
26841
26484
|
});
|
|
26842
26485
|
}
|
|
26843
26486
|
var LexerState = /* @__PURE__ */ function(LexerState$1) {
|
|
@@ -27129,7 +26772,7 @@ function definePlugin(config$2) {
|
|
|
27129
26772
|
}
|
|
27130
26773
|
const result = await replaceDefine(this.environment, code, id, define$1);
|
|
27131
26774
|
if (hasDefineImportMetaEnv) {
|
|
27132
|
-
result.code = result.code.replaceAll(getImportMetaEnvKeyRe(marker), (m
|
|
26775
|
+
result.code = result.code.replaceAll(getImportMetaEnvKeyRe(marker), (m) => "undefined".padEnd(m.length));
|
|
27133
26776
|
if (result.code.includes(marker)) {
|
|
27134
26777
|
result.code = `const ${marker} = ${importMetaEnvVal};\n` + result.code;
|
|
27135
26778
|
if (result.map) {
|
|
@@ -27452,29 +27095,29 @@ function webWorkerPlugin(config$2) {
|
|
|
27452
27095
|
injectEnv = ((environment.mode === "dev" ? environment.moduleGraph : void 0)?.getModuleById(ENV_ENTRY))?.transformResult?.code || "";
|
|
27453
27096
|
}
|
|
27454
27097
|
if (injectEnv) {
|
|
27455
|
-
const s
|
|
27456
|
-
s
|
|
27098
|
+
const s = new MagicString(raw);
|
|
27099
|
+
s.prepend(injectEnv + ";\n");
|
|
27457
27100
|
return {
|
|
27458
|
-
code: s
|
|
27459
|
-
map: s
|
|
27101
|
+
code: s.toString(),
|
|
27102
|
+
map: s.generateMap({ hires: "boundary" })
|
|
27460
27103
|
};
|
|
27461
27104
|
}
|
|
27462
27105
|
}
|
|
27463
27106
|
}
|
|
27464
27107
|
},
|
|
27465
27108
|
renderChunk(code, chunk, outputOptions) {
|
|
27466
|
-
let s
|
|
27109
|
+
let s;
|
|
27467
27110
|
const result = () => {
|
|
27468
|
-
return s
|
|
27469
|
-
code: s
|
|
27470
|
-
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
|
|
27471
27114
|
};
|
|
27472
27115
|
};
|
|
27473
27116
|
workerAssetUrlRE.lastIndex = 0;
|
|
27474
27117
|
if (workerAssetUrlRE.test(code)) {
|
|
27475
27118
|
const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(outputOptions.format, this.environment.config.isWorker);
|
|
27476
27119
|
let match;
|
|
27477
|
-
s
|
|
27120
|
+
s = new MagicString(code);
|
|
27478
27121
|
workerAssetUrlRE.lastIndex = 0;
|
|
27479
27122
|
const workerOutputCache = workerOutputCaches.get(config$2.mainConfig || config$2);
|
|
27480
27123
|
while (match = workerAssetUrlRE.exec(code)) {
|
|
@@ -27486,7 +27129,7 @@ function webWorkerPlugin(config$2) {
|
|
|
27486
27129
|
}
|
|
27487
27130
|
const replacement = toOutputFilePathInJS(this.environment, filename, "asset", chunk.fileName, "js", toRelativeRuntime);
|
|
27488
27131
|
const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`;
|
|
27489
|
-
s
|
|
27132
|
+
s.update(match.index, match.index + full.length, replacementString);
|
|
27490
27133
|
}
|
|
27491
27134
|
}
|
|
27492
27135
|
return result();
|
|
@@ -27712,8 +27355,8 @@ function importAnalysisPlugin(config$2) {
|
|
|
27712
27355
|
let isSelfAccepting = false;
|
|
27713
27356
|
let hasEnv = false;
|
|
27714
27357
|
let needQueryInjectHelper = false;
|
|
27715
|
-
let s
|
|
27716
|
-
const str = () => s
|
|
27358
|
+
let s;
|
|
27359
|
+
const str = () => s || (s = new MagicString(source));
|
|
27717
27360
|
let isPartiallySelfAccepting = false;
|
|
27718
27361
|
const importedBindings = enablePartialAccept ? /* @__PURE__ */ new Map() : null;
|
|
27719
27362
|
const toAbsoluteUrl = (url$3) => path.posix.resolve(path.posix.dirname(importerModule.url), url$3);
|
|
@@ -27814,9 +27457,9 @@ function importAnalysisPlugin(config$2) {
|
|
|
27814
27457
|
}
|
|
27815
27458
|
if (!rewriteDone) {
|
|
27816
27459
|
const rewrittenUrl = JSON.stringify(url$3);
|
|
27817
|
-
const s$
|
|
27460
|
+
const s$1 = isDynamicImport ? start : start - 1;
|
|
27818
27461
|
const e$1 = isDynamicImport ? end : end + 1;
|
|
27819
|
-
str().overwrite(s$
|
|
27462
|
+
str().overwrite(s$1, e$1, rewrittenUrl, { contentOnly: true });
|
|
27820
27463
|
}
|
|
27821
27464
|
}
|
|
27822
27465
|
const hmrUrl = unwrapId(stripBase(url$3, base));
|
|
@@ -27886,7 +27529,7 @@ function importAnalysisPlugin(config$2) {
|
|
|
27886
27529
|
if (prunedImports) handlePrunedModules(prunedImports, environment);
|
|
27887
27530
|
}
|
|
27888
27531
|
debug$5?.(`${timeFrom(msAtStart)} ${import_picocolors$13.default.dim(`[${importedUrls.size} imports rewritten] ${prettifyUrl(importer, root)}`)}`);
|
|
27889
|
-
if (s
|
|
27532
|
+
if (s) return transformStableResult(s, importer, config$2);
|
|
27890
27533
|
else return source;
|
|
27891
27534
|
}
|
|
27892
27535
|
};
|
|
@@ -27909,9 +27552,9 @@ function createParseErrorInfo(importer, source) {
|
|
|
27909
27552
|
showCodeFrame: !probablyBinary
|
|
27910
27553
|
};
|
|
27911
27554
|
}
|
|
27912
|
-
const interopHelper = (m
|
|
27913
|
-
...typeof m
|
|
27914
|
-
default: m
|
|
27555
|
+
const interopHelper = (m) => m?.__esModule ? m : {
|
|
27556
|
+
...typeof m === "object" && !Array.isArray(m) || typeof m === "function" ? m : {},
|
|
27557
|
+
default: m
|
|
27915
27558
|
};
|
|
27916
27559
|
const interopHelperStr = interopHelper.toString().replaceAll("\n", "");
|
|
27917
27560
|
function interopNamedImports(str, importSpecifier, rewrittenUrl, importIndex, importer, config$2) {
|
|
@@ -28226,7 +27869,7 @@ function workerImportMetaUrlPlugin(config$2) {
|
|
|
28226
27869
|
transform: {
|
|
28227
27870
|
filter: { code: workerImportMetaUrlRE },
|
|
28228
27871
|
async handler(code, id) {
|
|
28229
|
-
let s
|
|
27872
|
+
let s;
|
|
28230
27873
|
const cleanString = stripLiteral(code);
|
|
28231
27874
|
const workerImportMetaUrlRE$1 = /\bnew\s+(?:Worker|SharedWorker)\s*\(\s*(new\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*\))/dg;
|
|
28232
27875
|
let match;
|
|
@@ -28234,7 +27877,7 @@ function workerImportMetaUrlPlugin(config$2) {
|
|
|
28234
27877
|
const [[, endIndex], [expStart, expEnd], [urlStart, urlEnd]] = match.indices;
|
|
28235
27878
|
const rawUrl = code.slice(urlStart, urlEnd);
|
|
28236
27879
|
if (rawUrl[0] === "`" && rawUrl.includes("${")) this.error(`\`new URL(url, import.meta.url)\` is not supported in dynamic template string.`, expStart);
|
|
28237
|
-
s
|
|
27880
|
+
s ||= new MagicString(code);
|
|
28238
27881
|
const workerType = await getWorkerType(code, cleanString, endIndex);
|
|
28239
27882
|
const url$3 = rawUrl.slice(1, -1);
|
|
28240
27883
|
let file;
|
|
@@ -28250,7 +27893,7 @@ function workerImportMetaUrlPlugin(config$2) {
|
|
|
28250
27893
|
file = await workerResolver(this.environment, url$3, id);
|
|
28251
27894
|
file ??= url$3[0] === "/" ? slash(path.join(config$2.publicDir, url$3)) : slash(path.resolve(path.dirname(id), url$3));
|
|
28252
27895
|
}
|
|
28253
|
-
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");
|
|
28254
27897
|
else {
|
|
28255
27898
|
let builtUrl;
|
|
28256
27899
|
if (isBuild) {
|
|
@@ -28261,10 +27904,10 @@ function workerImportMetaUrlPlugin(config$2) {
|
|
|
28261
27904
|
builtUrl = await fileToUrl$1(this, cleanUrl(file));
|
|
28262
27905
|
builtUrl = injectQuery(builtUrl, `${WORKER_FILE_ID}&type=${workerType}`);
|
|
28263
27906
|
}
|
|
28264
|
-
s
|
|
27907
|
+
s.update(expStart, expEnd, `new URL(/* @vite-ignore */ ${JSON.stringify(builtUrl)}, import.meta.url)`);
|
|
28265
27908
|
}
|
|
28266
27909
|
}
|
|
28267
|
-
if (s
|
|
27910
|
+
if (s) return transformStableResult(s, id, config$2);
|
|
28268
27911
|
return null;
|
|
28269
27912
|
}
|
|
28270
27913
|
}
|
|
@@ -28305,7 +27948,7 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
|
28305
27948
|
code: /new\s+URL.+import\.meta\.url/s
|
|
28306
27949
|
},
|
|
28307
27950
|
async handler(code, id) {
|
|
28308
|
-
let s
|
|
27951
|
+
let s;
|
|
28309
27952
|
const assetImportMetaUrlRE = /\bnew\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*(?:,\s*)?\)/dg;
|
|
28310
27953
|
const cleanString = stripLiteral(code);
|
|
28311
27954
|
let match;
|
|
@@ -28313,7 +27956,7 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
|
28313
27956
|
const [[startIndex, endIndex], [urlStart, urlEnd]] = match.indices;
|
|
28314
27957
|
if (hasViteIgnoreRE.test(code.slice(startIndex, urlStart))) continue;
|
|
28315
27958
|
const rawUrl = code.slice(urlStart, urlEnd);
|
|
28316
|
-
if (!s
|
|
27959
|
+
if (!s) s = new MagicString(code);
|
|
28317
27960
|
if (rawUrl[0] === "`" && rawUrl.includes("${")) {
|
|
28318
27961
|
const queryDelimiterIndex = getQueryDelimiterIndex(rawUrl);
|
|
28319
27962
|
const hasQueryDelimiter = queryDelimiterIndex !== -1;
|
|
@@ -28328,7 +27971,7 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
|
28328
27971
|
import: "default",
|
|
28329
27972
|
query: injectQuery(queryString, "url")
|
|
28330
27973
|
};
|
|
28331
|
-
s
|
|
27974
|
+
s.update(startIndex, endIndex, `new URL((import.meta.glob(${JSON.stringify(pattern)}, ${JSON.stringify(globOptions)}))[${pureUrl}], import.meta.url)`);
|
|
28332
27975
|
continue;
|
|
28333
27976
|
}
|
|
28334
27977
|
}
|
|
@@ -28363,9 +28006,9 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
|
28363
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.`);
|
|
28364
28007
|
builtUrl = url$3;
|
|
28365
28008
|
}
|
|
28366
|
-
s
|
|
28009
|
+
s.update(startIndex, endIndex, `new URL(${JSON.stringify(builtUrl)}, import.meta.url)`);
|
|
28367
28010
|
}
|
|
28368
|
-
if (s
|
|
28011
|
+
if (s) return transformStableResult(s, id, config$2);
|
|
28369
28012
|
}
|
|
28370
28013
|
}
|
|
28371
28014
|
};
|
|
@@ -28567,13 +28210,13 @@ function dynamicImportVarsPlugin(config$2) {
|
|
|
28567
28210
|
return null;
|
|
28568
28211
|
}
|
|
28569
28212
|
if (!imports.length) return null;
|
|
28570
|
-
let s
|
|
28213
|
+
let s;
|
|
28571
28214
|
let needDynamicImportHelper = false;
|
|
28572
28215
|
for (let index = 0; index < imports.length; index++) {
|
|
28573
28216
|
const { s: start, e: end, ss: expStart, se: expEnd, d: dynamicIndex } = imports[index];
|
|
28574
28217
|
if (dynamicIndex === -1 || source[start] !== "`") continue;
|
|
28575
28218
|
if (hasViteIgnoreRE.test(source.slice(expStart, expEnd))) continue;
|
|
28576
|
-
s
|
|
28219
|
+
s ||= new MagicString(source);
|
|
28577
28220
|
let result;
|
|
28578
28221
|
try {
|
|
28579
28222
|
result = await transformDynamicImport(source.slice(start, end), importer, (id, importer$1) => resolve$4(environment, id, importer$1), config$2.root);
|
|
@@ -28584,11 +28227,11 @@ function dynamicImportVarsPlugin(config$2) {
|
|
|
28584
28227
|
if (!result) continue;
|
|
28585
28228
|
const { rawPattern, glob: glob$1 } = result;
|
|
28586
28229
|
needDynamicImportHelper = true;
|
|
28587
|
-
s
|
|
28230
|
+
s.overwrite(expStart, expEnd, `__variableDynamicImportRuntimeHelper(${glob$1}, \`${rawPattern}\`, ${rawPattern.split("/").length})`);
|
|
28588
28231
|
}
|
|
28589
|
-
if (s
|
|
28590
|
-
if (needDynamicImportHelper) s
|
|
28591
|
-
return transformStableResult(s
|
|
28232
|
+
if (s) {
|
|
28233
|
+
if (needDynamicImportHelper) s.prepend(`import __variableDynamicImportRuntimeHelper from "${dynamicImportHelperId}";`);
|
|
28234
|
+
return transformStableResult(s, importer, config$2);
|
|
28592
28235
|
}
|
|
28593
28236
|
}
|
|
28594
28237
|
}
|
|
@@ -28790,7 +28433,7 @@ async function transformGlobImport(code, id, root, resolveId, restoreQueryExtens
|
|
|
28790
28433
|
const matches$2 = await parseImportGlob(code, isVirtual ? void 0 : id, root, resolveId, logger);
|
|
28791
28434
|
const matchedFiles = /* @__PURE__ */ new Set();
|
|
28792
28435
|
if (!matches$2.length) return null;
|
|
28793
|
-
const s
|
|
28436
|
+
const s = new MagicString(code);
|
|
28794
28437
|
const staticImports = (await Promise.all(matches$2.map(async ({ globsResolved, isRelative: isRelative$1, options: options$1, index, start, end, onlyKeys, onlyValues }) => {
|
|
28795
28438
|
const files = (await glob(globsResolved, {
|
|
28796
28439
|
absolute: true,
|
|
@@ -28862,12 +28505,12 @@ async function transformGlobImport(code, id, root, resolveId, restoreQueryExtens
|
|
|
28862
28505
|
if (onlyKeys) replacement = `{${objectProps.join(",")}${lineBreaks}}`;
|
|
28863
28506
|
else if (onlyValues) replacement = `[${objectProps.join(",")}${lineBreaks}]`;
|
|
28864
28507
|
else replacement = `/* #__PURE__ */ Object.assign({${objectProps.join(",")}${lineBreaks}})`;
|
|
28865
|
-
s
|
|
28508
|
+
s.overwrite(start, end, replacement);
|
|
28866
28509
|
return staticImports$1;
|
|
28867
28510
|
}))).flat();
|
|
28868
|
-
if (staticImports.length) s
|
|
28511
|
+
if (staticImports.length) s.prepend(`${staticImports.join(";")};`);
|
|
28869
28512
|
return {
|
|
28870
|
-
s
|
|
28513
|
+
s,
|
|
28871
28514
|
matches: matches$2,
|
|
28872
28515
|
files: matchedFiles
|
|
28873
28516
|
};
|
|
@@ -29733,10 +29376,10 @@ var TransformPluginContext = class extends LoadPluginContext {
|
|
|
29733
29376
|
this.sourcemapChain.length = 0;
|
|
29734
29377
|
return combinedMap;
|
|
29735
29378
|
}
|
|
29736
|
-
for (let m
|
|
29737
|
-
if (typeof m
|
|
29738
|
-
if (!("version" in m
|
|
29739
|
-
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 === "") {
|
|
29740
29383
|
combinedMap = { mappings: "" };
|
|
29741
29384
|
break;
|
|
29742
29385
|
}
|
|
@@ -29744,14 +29387,14 @@ var TransformPluginContext = class extends LoadPluginContext {
|
|
|
29744
29387
|
break;
|
|
29745
29388
|
}
|
|
29746
29389
|
if (!combinedMap) {
|
|
29747
|
-
const sm = m
|
|
29390
|
+
const sm = m;
|
|
29748
29391
|
if (sm.sources.length === 1 && !sm.sources[0]) combinedMap = {
|
|
29749
29392
|
...sm,
|
|
29750
29393
|
sources: [this.filename],
|
|
29751
29394
|
sourcesContent: [this.originalCode]
|
|
29752
29395
|
};
|
|
29753
29396
|
else combinedMap = sm;
|
|
29754
|
-
} else combinedMap = combineSourcemaps(cleanUrl(this.filename), [m
|
|
29397
|
+
} else combinedMap = combineSourcemaps(cleanUrl(this.filename), [m, combinedMap]);
|
|
29755
29398
|
}
|
|
29756
29399
|
if (combinedMap !== this.combinedMap) {
|
|
29757
29400
|
this.combinedMap = combinedMap;
|
|
@@ -30368,7 +30011,7 @@ function cssPostPlugin(config$2) {
|
|
|
30368
30011
|
ext
|
|
30369
30012
|
}));
|
|
30370
30013
|
}
|
|
30371
|
-
let s
|
|
30014
|
+
let s;
|
|
30372
30015
|
const urlEmitTasks = [];
|
|
30373
30016
|
if (code.includes("__VITE_CSS_URL__")) {
|
|
30374
30017
|
let match;
|
|
@@ -30395,7 +30038,7 @@ function cssPostPlugin(config$2) {
|
|
|
30395
30038
|
})));
|
|
30396
30039
|
if (urlEmitTasks.length > 0) {
|
|
30397
30040
|
const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(opts.format, config$2.isWorker);
|
|
30398
|
-
s
|
|
30041
|
+
s ||= new MagicString(code);
|
|
30399
30042
|
for (const { cssAssetName, originalFileName, content, start, end } of urlEmitTasks) {
|
|
30400
30043
|
const referenceId = this.emitFile({
|
|
30401
30044
|
type: "asset",
|
|
@@ -30407,7 +30050,7 @@ function cssPostPlugin(config$2) {
|
|
|
30407
30050
|
chunk.viteMetadata.importedAssets.add(cleanUrl(filename));
|
|
30408
30051
|
const replacement = toOutputFilePathInJS(this.environment, filename, "asset", chunk.fileName, "js", toRelativeRuntime);
|
|
30409
30052
|
const replacementString = typeof replacement === "string" ? JSON.stringify(encodeURIPath(replacement)).slice(1, -1) : `"+${replacement.runtime}+"`;
|
|
30410
|
-
s
|
|
30053
|
+
s.update(start, end, replacementString);
|
|
30411
30054
|
}
|
|
30412
30055
|
}
|
|
30413
30056
|
if (chunkCSS !== void 0) {
|
|
@@ -30446,19 +30089,19 @@ function cssPostPlugin(config$2) {
|
|
|
30446
30089
|
} else if (code.includes(singleQuoteUseStrict)) injectionPoint = code.indexOf(singleQuoteUseStrict) + singleQuoteUseStrict.length;
|
|
30447
30090
|
else if (code.includes(doubleQuoteUseStrict)) injectionPoint = code.indexOf(doubleQuoteUseStrict) + doubleQuoteUseStrict.length;
|
|
30448
30091
|
else throw new Error("Injection point for inlined CSS not found");
|
|
30449
|
-
s
|
|
30450
|
-
s
|
|
30092
|
+
s ||= new MagicString(code);
|
|
30093
|
+
s.appendRight(injectionPoint, injectCode);
|
|
30451
30094
|
}
|
|
30452
30095
|
} else {
|
|
30453
30096
|
chunkCSS = resolveAssetUrlsInCss(chunkCSS, getCssBundleName());
|
|
30454
30097
|
chunkCSSMap.set(chunk.fileName, chunkCSS);
|
|
30455
30098
|
}
|
|
30456
30099
|
}
|
|
30457
|
-
if (s
|
|
30458
|
-
code: s
|
|
30459
|
-
map: s
|
|
30100
|
+
if (s) if (config$2.build.sourcemap) return {
|
|
30101
|
+
code: s.toString(),
|
|
30102
|
+
map: s.generateMap({ hires: "boundary" })
|
|
30460
30103
|
};
|
|
30461
|
-
else return { code: s
|
|
30104
|
+
else return { code: s.toString() };
|
|
30462
30105
|
return null;
|
|
30463
30106
|
},
|
|
30464
30107
|
augmentChunkHash(chunk) {
|
|
@@ -30564,10 +30207,10 @@ function isCssScopeToRendered(cssScopeTo, renderedModules) {
|
|
|
30564
30207
|
function getEmptyChunkReplacer(pureCssChunkNames, outputFormat) {
|
|
30565
30208
|
const emptyChunkFiles = pureCssChunkNames.map((file) => escapeRegex(path.basename(file))).join("|");
|
|
30566
30209
|
const emptyChunkRE = new RegExp(outputFormat === "es" ? `\\bimport\\s*["'][^"']*(?:${emptyChunkFiles})["'];` : `(\\b|,\\s*)require\\(\\s*["'][^"']*(?:${emptyChunkFiles})["']\\)(;|,)`, "g");
|
|
30567
|
-
return (code) => code.replace(emptyChunkRE, (m
|
|
30568
|
-
if (outputFormat === "es") return `/* empty css ${"".padEnd(m
|
|
30569
|
-
if (p2 === ";") return `${p2}/* empty css ${"".padEnd(m
|
|
30570
|
-
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)}*/`;
|
|
30571
30214
|
});
|
|
30572
30215
|
}
|
|
30573
30216
|
const fileURLWithWindowsDriveRE = /^file:\/\/\/[a-zA-Z]:\//;
|
|
@@ -31068,24 +30711,24 @@ function resolveMinifyCssEsbuildOptions(options$1) {
|
|
|
31068
30711
|
const atImportRE = /@import(?:\s*(?:url\([^)]*\)|"(?:[^"]|(?<=\\)")*"|'(?:[^']|(?<=\\)')*').*?|[^;]*);/g;
|
|
31069
30712
|
const atCharsetRE = /@charset(?:\s*(?:"(?:[^"]|(?<=\\)")*"|'(?:[^']|(?<=\\)')*').*?|[^;]*);/g;
|
|
31070
30713
|
async function hoistAtRules(css) {
|
|
31071
|
-
const s
|
|
30714
|
+
const s = new MagicString(css);
|
|
31072
30715
|
const cleanCss = emptyCssComments(css);
|
|
31073
30716
|
let match;
|
|
31074
30717
|
atImportRE.lastIndex = 0;
|
|
31075
30718
|
while (match = atImportRE.exec(cleanCss)) {
|
|
31076
|
-
s
|
|
31077
|
-
s
|
|
30719
|
+
s.remove(match.index, match.index + match[0].length);
|
|
30720
|
+
s.appendLeft(0, match[0]);
|
|
31078
30721
|
}
|
|
31079
30722
|
atCharsetRE.lastIndex = 0;
|
|
31080
30723
|
let foundCharset = false;
|
|
31081
30724
|
while (match = atCharsetRE.exec(cleanCss)) {
|
|
31082
|
-
s
|
|
30725
|
+
s.remove(match.index, match.index + match[0].length);
|
|
31083
30726
|
if (!foundCharset) {
|
|
31084
|
-
s
|
|
30727
|
+
s.prepend(match[0]);
|
|
31085
30728
|
foundCharset = true;
|
|
31086
30729
|
}
|
|
31087
30730
|
}
|
|
31088
|
-
return s
|
|
30731
|
+
return s.toString();
|
|
31089
30732
|
}
|
|
31090
30733
|
const loadedPreprocessorPath = {};
|
|
31091
30734
|
function loadPreprocessorPath(lang, root) {
|
|
@@ -31399,7 +31042,7 @@ const makeStylWorker = (maxWorkers) => {
|
|
|
31399
31042
|
};
|
|
31400
31043
|
}, {
|
|
31401
31044
|
shouldUseFake(_stylusPath, _content, _root, options$1) {
|
|
31402
|
-
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"));
|
|
31403
31046
|
},
|
|
31404
31047
|
max: maxWorkers
|
|
31405
31048
|
});
|
|
@@ -32058,7 +31701,7 @@ async function computeEntries(environment) {
|
|
|
32058
31701
|
}
|
|
32059
31702
|
async function prepareEsbuildScanner(environment, entries, deps, missing) {
|
|
32060
31703
|
const plugin = esbuildScanPlugin(environment, deps, missing, entries);
|
|
32061
|
-
const { plugins: plugins$1 = []
|
|
31704
|
+
const { plugins: plugins$1 = [], ...esbuildOptions } = environment.config.optimizeDeps.esbuildOptions ?? {};
|
|
32062
31705
|
let tsconfigRaw = esbuildOptions.tsconfigRaw;
|
|
32063
31706
|
if (!tsconfigRaw && !esbuildOptions.tsconfig) {
|
|
32064
31707
|
const { tsconfig } = await loadTsconfigJsonForFile(path.join(environment.config.root, "_dummy.js"));
|
|
@@ -32322,9 +31965,9 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
|
|
|
32322
31965
|
function extractImportPaths(code) {
|
|
32323
31966
|
code = code.replace(multilineCommentsRE, "/* */").replace(singlelineCommentsRE, "");
|
|
32324
31967
|
let js = "";
|
|
32325
|
-
let m
|
|
31968
|
+
let m;
|
|
32326
31969
|
importsRE.lastIndex = 0;
|
|
32327
|
-
while ((m
|
|
31970
|
+
while ((m = importsRE.exec(code)) != null) js += `\nimport ${m[1]}`;
|
|
32328
31971
|
return js;
|
|
32329
31972
|
}
|
|
32330
31973
|
function shouldExternalizeDep(resolvedId, rawId) {
|
|
@@ -32631,7 +32274,7 @@ function runOptimizeDeps(environment, depsInfo) {
|
|
|
32631
32274
|
const processingCacheDirOutputPath = path.relative(process.cwd(), processingCacheDir);
|
|
32632
32275
|
for (const id in depsInfo) {
|
|
32633
32276
|
const output = esbuildOutputFromId(meta.outputs, id, processingCacheDir);
|
|
32634
|
-
const { exportsData
|
|
32277
|
+
const { exportsData, ...info } = depsInfo[id];
|
|
32635
32278
|
addOptimizedDepInfo(metadata, "optimized", {
|
|
32636
32279
|
...info,
|
|
32637
32280
|
fileHash: getHash(metadata.hash + depsInfo[id].file + JSON.stringify(output.imports)),
|
|
@@ -32690,7 +32333,7 @@ async function prepareEsbuildOptimizerRun(environment, depsInfo, processingCache
|
|
|
32690
32333
|
const flatIdDeps = {};
|
|
32691
32334
|
const idToExports = {};
|
|
32692
32335
|
const { optimizeDeps: optimizeDeps$1 } = environment.config;
|
|
32693
|
-
const { plugins: pluginsFromConfig = []
|
|
32336
|
+
const { plugins: pluginsFromConfig = [], ...esbuildOptions } = optimizeDeps$1.esbuildOptions ?? {};
|
|
32694
32337
|
await Promise.all(Object.keys(depsInfo).map(async (id) => {
|
|
32695
32338
|
const src = depsInfo[id].src;
|
|
32696
32339
|
const exportsData = await (depsInfo[id].exportsData ?? extractExportsData(environment, src));
|
|
@@ -33593,7 +33236,7 @@ function loadTerserPath(root) {
|
|
|
33593
33236
|
throw new Error("terser not found. Since Vite v3, terser has become an optional dependency. You need to install it.");
|
|
33594
33237
|
}
|
|
33595
33238
|
function terserPlugin(config$2) {
|
|
33596
|
-
const { maxWorkers
|
|
33239
|
+
const { maxWorkers, ...terserOptions } = config$2.build.terserOptions;
|
|
33597
33240
|
const makeWorker = () => new WorkerWithFallback(() => async (terserPath$1, code, options$1) => {
|
|
33598
33241
|
const terser = await import(terserPath$1);
|
|
33599
33242
|
try {
|
|
@@ -33826,7 +33469,7 @@ function completeSystemWrapPlugin() {
|
|
|
33826
33469
|
name: "vite:force-systemjs-wrap-complete",
|
|
33827
33470
|
renderChunk(code, _chunk, opts) {
|
|
33828
33471
|
if (opts.format === "system") return {
|
|
33829
|
-
code: code.replace(SystemJSWrapRE, (s
|
|
33472
|
+
code: code.replace(SystemJSWrapRE, (s, s1) => s.replace(s1, "(exports, module)")),
|
|
33830
33473
|
map: null
|
|
33831
33474
|
};
|
|
33832
33475
|
}
|
|
@@ -33994,7 +33637,7 @@ const _buildEnvironmentOptionsDefaults = Object.freeze({
|
|
|
33994
33637
|
const buildEnvironmentOptionsDefaults = _buildEnvironmentOptionsDefaults;
|
|
33995
33638
|
function resolveBuildEnvironmentOptions(raw, logger, consumer) {
|
|
33996
33639
|
const deprecatedPolyfillModulePreload = raw.polyfillModulePreload;
|
|
33997
|
-
const { polyfillModulePreload
|
|
33640
|
+
const { polyfillModulePreload, ...rest } = raw;
|
|
33998
33641
|
raw = rest;
|
|
33999
33642
|
if (deprecatedPolyfillModulePreload !== void 0) logger.warn("polyfillModulePreload is deprecated. Use modulePreload.polyfill instead.");
|
|
34000
33643
|
if (deprecatedPolyfillModulePreload === false && raw.modulePreload === void 0) raw.modulePreload = { polyfill: false };
|
|
@@ -34300,14 +33943,14 @@ function isExternal(id, test) {
|
|
|
34300
33943
|
else return test.test(id);
|
|
34301
33944
|
}
|
|
34302
33945
|
function injectEnvironmentToHooks(environment, plugin) {
|
|
34303
|
-
const { resolveId, load: load$
|
|
33946
|
+
const { resolveId, load: load$2, transform: transform$2 } = plugin;
|
|
34304
33947
|
const clone$1 = { ...plugin };
|
|
34305
33948
|
for (const hook of Object.keys(clone$1)) switch (hook) {
|
|
34306
33949
|
case "resolveId":
|
|
34307
33950
|
clone$1[hook] = wrapEnvironmentResolveId(environment, resolveId, plugin.name);
|
|
34308
33951
|
break;
|
|
34309
33952
|
case "load":
|
|
34310
|
-
clone$1[hook] = wrapEnvironmentLoad(environment, load$
|
|
33953
|
+
clone$1[hook] = wrapEnvironmentLoad(environment, load$2, plugin.name);
|
|
34311
33954
|
break;
|
|
34312
33955
|
case "transform":
|
|
34313
33956
|
clone$1[hook] = wrapEnvironmentTransform(environment, transform$2, plugin.name);
|
|
@@ -34612,7 +34255,7 @@ async function fetchModule(environment, url$3, importer, options$1 = {}) {
|
|
|
34612
34255
|
let result = await environment.transformRequest(url$3);
|
|
34613
34256
|
if (!result) throw new Error(`[vite] transform failed for module '${url$3}'${importer ? ` imported from '${importer}'` : ""}.`);
|
|
34614
34257
|
if (options$1.inlineSourceMap !== false) result = inlineSourceMap(mod, result, options$1.startOffset);
|
|
34615
|
-
if (result.code[0] === "#") result.code = result.code.replace(/^#!.*/, (s
|
|
34258
|
+
if (result.code[0] === "#") result.code = result.code.replace(/^#!.*/, (s) => " ".repeat(s.length));
|
|
34616
34259
|
return {
|
|
34617
34260
|
code: result.code,
|
|
34618
34261
|
file: mod.file,
|
|
@@ -34651,7 +34294,7 @@ function createDepsOptimizer(environment) {
|
|
|
34651
34294
|
const { noDiscovery, holdUntilCrawlEnd } = options$1;
|
|
34652
34295
|
let metadata = initDepsOptimizerMetadata(environment, sessionTimestamp);
|
|
34653
34296
|
const depsOptimizer = {
|
|
34654
|
-
init: init$
|
|
34297
|
+
init: init$2,
|
|
34655
34298
|
metadata,
|
|
34656
34299
|
registerMissingImport,
|
|
34657
34300
|
run: () => debouncedProcessing(0),
|
|
@@ -34699,7 +34342,7 @@ function createDepsOptimizer(environment) {
|
|
|
34699
34342
|
]);
|
|
34700
34343
|
}
|
|
34701
34344
|
let inited = false;
|
|
34702
|
-
async function init$
|
|
34345
|
+
async function init$2() {
|
|
34703
34346
|
if (inited) return;
|
|
34704
34347
|
inited = true;
|
|
34705
34348
|
const cachedMetadata = await loadCachedDepOptimizationMetadata(environment);
|
|
@@ -34764,7 +34407,7 @@ function createDepsOptimizer(environment) {
|
|
|
34764
34407
|
const metadata$1 = depsOptimizer.metadata;
|
|
34765
34408
|
for (const dep of Object.keys(metadata$1.optimized)) knownDeps[dep] = { ...metadata$1.optimized[dep] };
|
|
34766
34409
|
for (const dep of Object.keys(metadata$1.discovered)) {
|
|
34767
|
-
const { processing
|
|
34410
|
+
const { processing, ...info } = metadata$1.discovered[dep];
|
|
34768
34411
|
knownDeps[dep] = info;
|
|
34769
34412
|
}
|
|
34770
34413
|
return knownDeps;
|
|
@@ -34974,13 +34617,13 @@ function createExplicitDepsOptimizer(environment) {
|
|
|
34974
34617
|
registerMissingImport: () => {
|
|
34975
34618
|
throw new Error(`Vite Internal Error: registerMissingImport is not supported in dev ${environment.name}`);
|
|
34976
34619
|
},
|
|
34977
|
-
init: init$
|
|
34620
|
+
init: init$2,
|
|
34978
34621
|
run: () => {},
|
|
34979
34622
|
close: async () => {},
|
|
34980
34623
|
options: environment.config.optimizeDeps
|
|
34981
34624
|
};
|
|
34982
34625
|
let inited = false;
|
|
34983
|
-
async function init$
|
|
34626
|
+
async function init$2() {
|
|
34984
34627
|
if (inited) return;
|
|
34985
34628
|
inited = true;
|
|
34986
34629
|
depsOptimizer.metadata = await optimizeExplicitEnvironmentDeps(environment);
|
|
@@ -35236,7 +34879,7 @@ var EnvironmentModuleGraph = class {
|
|
|
35236
34879
|
this.fileToModulesMap.set(file, fileMappedModules);
|
|
35237
34880
|
}
|
|
35238
34881
|
const url$3 = `${FS_PREFIX}${file}`;
|
|
35239
|
-
for (const m
|
|
34882
|
+
for (const m of fileMappedModules) if ((m.url === url$3 || m.id === file) && m.type === "asset") return m;
|
|
35240
34883
|
const mod = new EnvironmentModuleNode(url$3, this.environment);
|
|
35241
34884
|
mod.type = "asset";
|
|
35242
34885
|
mod.file = file;
|
|
@@ -35494,12 +35137,12 @@ var DevEnvironment = class extends BaseEnvironment {
|
|
|
35494
35137
|
this._crawlEndFinder.registerRequestProcessing(id, done);
|
|
35495
35138
|
}
|
|
35496
35139
|
};
|
|
35497
|
-
function invalidateModule(environment, m
|
|
35498
|
-
const mod = environment.moduleGraph.urlToModuleMap.get(m
|
|
35140
|
+
function invalidateModule(environment, m) {
|
|
35141
|
+
const mod = environment.moduleGraph.urlToModuleMap.get(m.path);
|
|
35499
35142
|
if (mod && mod.isSelfAccepting && mod.lastHMRTimestamp > 0 && !mod.lastHMRInvalidationReceived) {
|
|
35500
35143
|
mod.lastHMRInvalidationReceived = true;
|
|
35501
|
-
environment.logger.info(import_picocolors$1.default.yellow(`hmr invalidate `) + import_picocolors$1.default.dim(m
|
|
35502
|
-
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);
|
|
35503
35146
|
}
|
|
35504
35147
|
}
|
|
35505
35148
|
const callCrawlEndIfIdleAfterMs = 50;
|
|
@@ -35815,10 +35458,10 @@ async function runnerImport(moduleId, inlineConfig) {
|
|
|
35815
35458
|
const module$1 = await environment.runner.import(moduleId);
|
|
35816
35459
|
return {
|
|
35817
35460
|
module: module$1,
|
|
35818
|
-
dependencies: [...environment.runner.evaluatedModules.urlToIdModuleMap.values()].filter((m
|
|
35819
|
-
if (!m
|
|
35820
|
-
return m
|
|
35821
|
-
}).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)
|
|
35822
35465
|
};
|
|
35823
35466
|
} finally {
|
|
35824
35467
|
await environment.close();
|