vite 7.1.2 → 7.1.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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/bin/vite.js +3 -3
- package/dist/node/chunks/{dep-CTf3zVuV.js → dep-03SfmTdk.js} +3 -3
- package/dist/node/chunks/dep-6-jTB_1O.js +5 -0
- package/dist/node/chunks/{dep-CMEinpL-.js → dep-Bj7gA1-0.js} +336 -468
- package/dist/node/chunks/{dep-zLyvzoxR.js → dep-C9NktISv.js} +6 -7
- package/dist/node/chunks/{dep-f94b-k0u.js → dep-CA7ICgyJ.js} +1 -2
- package/dist/node/chunks/dep-CPnzVSwg.js +5 -0
- package/dist/node/chunks/{dep-BDCsDwBr.js → dep-CcFMbzqu.js} +0 -1
- package/dist/node/chunks/dep-D5MCzjWT.js +172 -0
- package/dist/node/chunks/dep-SeJl6gzM.js +5 -0
- package/dist/node/chunks/{dep-BDbL9e7d.js → dep-TDFDwW_9.js} +3 -3
- package/dist/node/chunks/{dep-V5uAjiuB.js → dep-UEPspf5j.js} +0 -1
- package/dist/node/chunks/{dep-Du_AlPMa.js → dep-XdVlHtXy.js} +12 -13
- package/dist/node/chunks/{dep-Drtntmtt.js → dep-lCKrEJQm.js} +2 -2
- package/dist/node/cli.js +16 -8
- package/dist/node/constants.js +1 -2
- package/dist/node/index.js +3 -3
- package/package.json +7 -7
- package/dist/node/chunks/dep-CtUaBn5f.js +0 -5
- package/dist/node/chunks/dep-DZ4iRZu_.js +0 -5
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_PREVIEW_PORT, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, defaultAllowedOrigins, loopbackHosts, wildcardHosts } from "./dep-
|
1
|
+
import { __commonJS, __require, __toDynamicImportESM, __toESM } from "./dep-lCKrEJQm.js";
|
2
|
+
import { LogLevels, createLogger, printServerUrls, require_picocolors } from "./dep-D5MCzjWT.js";
|
3
|
+
import { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_PREVIEW_PORT, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, defaultAllowedOrigins, loopbackHosts, wildcardHosts } from "./dep-CcFMbzqu.js";
|
4
4
|
import { builtinModules, createRequire } from "node:module";
|
5
5
|
import { parseAst, parseAstAsync } from "rollup/parseAst";
|
6
6
|
import * as fs$1 from "node:fs";
|
@@ -36,75 +36,6 @@ import { ESModulesEvaluator, ModuleRunner, createNodeImportMeta } from "vite/mod
|
|
36
36
|
import zlib from "zlib";
|
37
37
|
import * as qs from "node:querystring";
|
38
38
|
|
39
|
-
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
40
|
-
var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
|
41
|
-
let p = process || {}, argv = p.argv || [], env$1 = p.env || {};
|
42
|
-
let isColorSupported = !(!!env$1.NO_COLOR || argv.includes("--no-color")) && (!!env$1.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env$1.TERM !== "dumb" || !!env$1.CI);
|
43
|
-
let formatter = (open$2, close$1, replace = open$2) => (input) => {
|
44
|
-
let string = "" + input, index = string.indexOf(close$1, open$2.length);
|
45
|
-
return ~index ? open$2 + replaceClose(string, close$1, replace, index) + close$1 : open$2 + string + close$1;
|
46
|
-
};
|
47
|
-
let replaceClose = (string, close$1, replace, index) => {
|
48
|
-
let result = "", cursor = 0;
|
49
|
-
do {
|
50
|
-
result += string.substring(cursor, index) + replace;
|
51
|
-
cursor = index + close$1.length;
|
52
|
-
index = string.indexOf(close$1, cursor);
|
53
|
-
} while (~index);
|
54
|
-
return result + string.substring(cursor);
|
55
|
-
};
|
56
|
-
let createColors = (enabled$1 = isColorSupported) => {
|
57
|
-
let f$1 = enabled$1 ? formatter : () => String;
|
58
|
-
return {
|
59
|
-
isColorSupported: enabled$1,
|
60
|
-
reset: f$1("\x1B[0m", "\x1B[0m"),
|
61
|
-
bold: f$1("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
62
|
-
dim: f$1("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
63
|
-
italic: f$1("\x1B[3m", "\x1B[23m"),
|
64
|
-
underline: f$1("\x1B[4m", "\x1B[24m"),
|
65
|
-
inverse: f$1("\x1B[7m", "\x1B[27m"),
|
66
|
-
hidden: f$1("\x1B[8m", "\x1B[28m"),
|
67
|
-
strikethrough: f$1("\x1B[9m", "\x1B[29m"),
|
68
|
-
black: f$1("\x1B[30m", "\x1B[39m"),
|
69
|
-
red: f$1("\x1B[31m", "\x1B[39m"),
|
70
|
-
green: f$1("\x1B[32m", "\x1B[39m"),
|
71
|
-
yellow: f$1("\x1B[33m", "\x1B[39m"),
|
72
|
-
blue: f$1("\x1B[34m", "\x1B[39m"),
|
73
|
-
magenta: f$1("\x1B[35m", "\x1B[39m"),
|
74
|
-
cyan: f$1("\x1B[36m", "\x1B[39m"),
|
75
|
-
white: f$1("\x1B[37m", "\x1B[39m"),
|
76
|
-
gray: f$1("\x1B[90m", "\x1B[39m"),
|
77
|
-
bgBlack: f$1("\x1B[40m", "\x1B[49m"),
|
78
|
-
bgRed: f$1("\x1B[41m", "\x1B[49m"),
|
79
|
-
bgGreen: f$1("\x1B[42m", "\x1B[49m"),
|
80
|
-
bgYellow: f$1("\x1B[43m", "\x1B[49m"),
|
81
|
-
bgBlue: f$1("\x1B[44m", "\x1B[49m"),
|
82
|
-
bgMagenta: f$1("\x1B[45m", "\x1B[49m"),
|
83
|
-
bgCyan: f$1("\x1B[46m", "\x1B[49m"),
|
84
|
-
bgWhite: f$1("\x1B[47m", "\x1B[49m"),
|
85
|
-
blackBright: f$1("\x1B[90m", "\x1B[39m"),
|
86
|
-
redBright: f$1("\x1B[91m", "\x1B[39m"),
|
87
|
-
greenBright: f$1("\x1B[92m", "\x1B[39m"),
|
88
|
-
yellowBright: f$1("\x1B[93m", "\x1B[39m"),
|
89
|
-
blueBright: f$1("\x1B[94m", "\x1B[39m"),
|
90
|
-
magentaBright: f$1("\x1B[95m", "\x1B[39m"),
|
91
|
-
cyanBright: f$1("\x1B[96m", "\x1B[39m"),
|
92
|
-
whiteBright: f$1("\x1B[97m", "\x1B[39m"),
|
93
|
-
bgBlackBright: f$1("\x1B[100m", "\x1B[49m"),
|
94
|
-
bgRedBright: f$1("\x1B[101m", "\x1B[49m"),
|
95
|
-
bgGreenBright: f$1("\x1B[102m", "\x1B[49m"),
|
96
|
-
bgYellowBright: f$1("\x1B[103m", "\x1B[49m"),
|
97
|
-
bgBlueBright: f$1("\x1B[104m", "\x1B[49m"),
|
98
|
-
bgMagentaBright: f$1("\x1B[105m", "\x1B[49m"),
|
99
|
-
bgCyanBright: f$1("\x1B[106m", "\x1B[49m"),
|
100
|
-
bgWhiteBright: f$1("\x1B[107m", "\x1B[49m")
|
101
|
-
};
|
102
|
-
};
|
103
|
-
module.exports = createColors();
|
104
|
-
module.exports.createColors = createColors;
|
105
|
-
}) });
|
106
|
-
|
107
|
-
//#endregion
|
108
39
|
//#region src/shared/constants.ts
|
109
40
|
/**
|
110
41
|
* Prefix for resolved Ids that are not valid browser import specifiers
|
@@ -145,8 +76,8 @@ function unwrapId(id) {
|
|
145
76
|
return id.startsWith(VALID_ID_PREFIX) ? id.slice(VALID_ID_PREFIX.length).replace(NULL_BYTE_PLACEHOLDER, "\0") : id;
|
146
77
|
}
|
147
78
|
const windowsSlashRE = /\\/g;
|
148
|
-
function slash(p
|
149
|
-
return p
|
79
|
+
function slash(p) {
|
80
|
+
return p.replace(windowsSlashRE, "/");
|
150
81
|
}
|
151
82
|
const postfixRE = /[?#].*$/;
|
152
83
|
function cleanUrl(url$3) {
|
@@ -512,7 +443,7 @@ function resolve$3(input, base) {
|
|
512
443
|
}
|
513
444
|
|
514
445
|
//#endregion
|
515
|
-
//#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.
|
446
|
+
//#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.30/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
|
516
447
|
function stripFilename(path$13) {
|
517
448
|
if (!path$13) return "";
|
518
449
|
const index = path$13.lastIndexOf("/");
|
@@ -848,7 +779,7 @@ function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIn
|
|
848
779
|
}
|
849
780
|
|
850
781
|
//#endregion
|
851
|
-
//#region ../../node_modules/.pnpm/@jridgewell+remapping@2.3.
|
782
|
+
//#region ../../node_modules/.pnpm/@jridgewell+remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.mjs
|
852
783
|
var SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false);
|
853
784
|
var EMPTY_SOURCES = [];
|
854
785
|
function SegmentObject(source, line, column, name, content, ignore) {
|
@@ -1092,7 +1023,7 @@ var require_common$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/de
|
|
1092
1023
|
* This is the common logic for both the Node.js and web browser
|
1093
1024
|
* implementations of `debug()`.
|
1094
1025
|
*/
|
1095
|
-
function setup(env$
|
1026
|
+
function setup(env$1) {
|
1096
1027
|
createDebug$1.debug = createDebug$1;
|
1097
1028
|
createDebug$1.default = createDebug$1;
|
1098
1029
|
createDebug$1.coerce = coerce$1;
|
@@ -1101,8 +1032,8 @@ var require_common$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/de
|
|
1101
1032
|
createDebug$1.enabled = enabled$1;
|
1102
1033
|
createDebug$1.humanize = require_ms$1();
|
1103
1034
|
createDebug$1.destroy = destroy$1;
|
1104
|
-
Object.keys(env$
|
1105
|
-
createDebug$1[key] = env$
|
1035
|
+
Object.keys(env$1).forEach((key) => {
|
1036
|
+
createDebug$1[key] = env$1[key];
|
1106
1037
|
});
|
1107
1038
|
/**
|
1108
1039
|
* The currently active debug mode names, and names to skip.
|
@@ -1157,10 +1088,10 @@ var require_common$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/de
|
|
1157
1088
|
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format$3) => {
|
1158
1089
|
if (match === "%%") return "%";
|
1159
1090
|
index++;
|
1160
|
-
const formatter
|
1161
|
-
if (typeof formatter
|
1091
|
+
const formatter = createDebug$1.formatters[format$3];
|
1092
|
+
if (typeof formatter === "function") {
|
1162
1093
|
const val = args[index];
|
1163
|
-
match = formatter
|
1094
|
+
match = formatter.call(self$1, val);
|
1164
1095
|
args.splice(index, 1);
|
1165
1096
|
index--;
|
1166
1097
|
}
|
@@ -1296,8 +1227,8 @@ var require_node$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debu
|
|
1296
1227
|
/**
|
1297
1228
|
* Module dependencies.
|
1298
1229
|
*/
|
1299
|
-
const tty$1 =
|
1300
|
-
const util$2 =
|
1230
|
+
const tty$1 = __require("tty");
|
1231
|
+
const util$2 = __require("util");
|
1301
1232
|
/**
|
1302
1233
|
* This is the Node.js implementation of `debug()`.
|
1303
1234
|
*/
|
@@ -1320,7 +1251,7 @@ var require_node$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debu
|
|
1320
1251
|
1
|
1321
1252
|
];
|
1322
1253
|
try {
|
1323
|
-
const supportsColor =
|
1254
|
+
const supportsColor = __require("supports-color");
|
1324
1255
|
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) exports.colors = [
|
1325
1256
|
20,
|
1326
1257
|
21,
|
@@ -2100,7 +2031,7 @@ function traverseBetweenDirs(longerDir, shorterDir, cb) {
|
|
2100
2031
|
|
2101
2032
|
//#endregion
|
2102
2033
|
//#region src/node/utils.ts
|
2103
|
-
var import_picocolors$
|
2034
|
+
var import_picocolors$33 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
2104
2035
|
var import_node = /* @__PURE__ */ __toESM(require_node$1(), 1);
|
2105
2036
|
const createFilter = createFilter$2;
|
2106
2037
|
const replaceSlashOrColonRE = /[/:]/g;
|
@@ -2286,9 +2217,9 @@ async function asyncReplace(input, re, replacer) {
|
|
2286
2217
|
function timeFrom(start, subtract = 0) {
|
2287
2218
|
const time = performance$1.now() - start - subtract;
|
2288
2219
|
const timeString = (time.toFixed(2) + `ms`).padEnd(5, " ");
|
2289
|
-
if (time < 10) return import_picocolors$
|
2290
|
-
else if (time < 50) return import_picocolors$
|
2291
|
-
else return import_picocolors$
|
2220
|
+
if (time < 10) return import_picocolors$33.default.green(timeString);
|
2221
|
+
else if (time < 50) return import_picocolors$33.default.yellow(timeString);
|
2222
|
+
else return import_picocolors$33.default.red(timeString);
|
2292
2223
|
}
|
2293
2224
|
/**
|
2294
2225
|
* pretty url for logging.
|
@@ -2298,8 +2229,8 @@ function prettifyUrl(url$3, root) {
|
|
2298
2229
|
const isAbsoluteFile = url$3.startsWith(root);
|
2299
2230
|
if (isAbsoluteFile || url$3.startsWith(FS_PREFIX)) {
|
2300
2231
|
const file = path.posix.relative(root, isAbsoluteFile ? url$3 : fsPathFromId(url$3));
|
2301
|
-
return import_picocolors$
|
2302
|
-
} else return import_picocolors$
|
2232
|
+
return import_picocolors$33.default.dim(file);
|
2233
|
+
} else return import_picocolors$33.default.dim(url$3);
|
2303
2234
|
}
|
2304
2235
|
function isObject(value$1) {
|
2305
2236
|
return Object.prototype.toString.call(value$1) === "[object Object]";
|
@@ -2356,6 +2287,8 @@ function numberToPos(source, offset$1) {
|
|
2356
2287
|
column: lines[lines.length - 1].length
|
2357
2288
|
};
|
2358
2289
|
}
|
2290
|
+
const MAX_DISPLAY_LEN = 120;
|
2291
|
+
const ELLIPSIS = "...";
|
2359
2292
|
function generateCodeFrame(source, start = 0, end) {
|
2360
2293
|
start = Math.max(posToNumber(source, start), 0);
|
2361
2294
|
end = Math.min(end !== void 0 ? posToNumber(source, end) : start, source.length);
|
@@ -2370,16 +2303,35 @@ function generateCodeFrame(source, start = 0, end) {
|
|
2370
2303
|
for (let j = i$1 - range; j <= i$1 + range || end > count; j++) {
|
2371
2304
|
if (j < 0 || j >= lines.length) continue;
|
2372
2305
|
const line = j + 1;
|
2373
|
-
res.push(`${line}${" ".repeat(lineNumberWidth - String(line).length)}| ${lines[j]}`);
|
2374
2306
|
const lineLength = lines[j].length;
|
2307
|
+
const pad$2 = Math.max(start - (count - lineLength), 0);
|
2308
|
+
const underlineLength = Math.max(1, end > count ? lineLength - pad$2 : end - start);
|
2309
|
+
let displayLine = lines[j];
|
2310
|
+
let underlinePad = pad$2;
|
2311
|
+
if (lineLength > MAX_DISPLAY_LEN) {
|
2312
|
+
let startIdx = 0;
|
2313
|
+
if (j === i$1) {
|
2314
|
+
if (underlineLength > MAX_DISPLAY_LEN) startIdx = pad$2;
|
2315
|
+
else {
|
2316
|
+
const center = pad$2 + Math.floor(underlineLength / 2);
|
2317
|
+
startIdx = Math.max(0, center - Math.floor(MAX_DISPLAY_LEN / 2));
|
2318
|
+
}
|
2319
|
+
underlinePad = Math.max(0, pad$2 - startIdx) + (startIdx > 0 ? 3 : 0);
|
2320
|
+
}
|
2321
|
+
const prefix = startIdx > 0 ? ELLIPSIS : "";
|
2322
|
+
const suffix = lineLength - startIdx > MAX_DISPLAY_LEN ? ELLIPSIS : "";
|
2323
|
+
const sliceLen = MAX_DISPLAY_LEN - prefix.length - suffix.length;
|
2324
|
+
displayLine = prefix + displayLine.slice(startIdx, startIdx + sliceLen) + suffix;
|
2325
|
+
}
|
2326
|
+
res.push(`${line}${" ".repeat(lineNumberWidth - String(line).length)}| ${displayLine}`);
|
2375
2327
|
if (j === i$1) {
|
2376
|
-
const
|
2377
|
-
|
2378
|
-
res.push(`${" ".repeat(lineNumberWidth)}| ` + " ".repeat(pad$2) + "^".repeat(length));
|
2328
|
+
const underline = "^".repeat(Math.min(underlineLength, MAX_DISPLAY_LEN));
|
2329
|
+
res.push(`${" ".repeat(lineNumberWidth)}| ` + " ".repeat(underlinePad) + underline);
|
2379
2330
|
} else if (j > i$1) {
|
2380
2331
|
if (end > count) {
|
2381
2332
|
const length = Math.max(Math.min(end - count, lineLength), 1);
|
2382
|
-
|
2333
|
+
const underline = "^".repeat(Math.min(length, MAX_DISPLAY_LEN));
|
2334
|
+
res.push(`${" ".repeat(lineNumberWidth)}| ` + underline);
|
2383
2335
|
}
|
2384
2336
|
count += lineLength + 1;
|
2385
2337
|
}
|
@@ -2847,9 +2799,9 @@ const windowsDrivePathPrefixRE = /^[A-Za-z]:[/\\]/;
|
|
2847
2799
|
* path.isAbsolute also returns true for drive relative paths on windows (e.g. /something)
|
2848
2800
|
* this function returns false for them but true for absolute paths (e.g. C:/something)
|
2849
2801
|
*/
|
2850
|
-
const isNonDriveRelativeAbsolutePath = (p
|
2851
|
-
if (!isWindows) return p
|
2852
|
-
return windowsDrivePathPrefixRE.test(p
|
2802
|
+
const isNonDriveRelativeAbsolutePath = (p) => {
|
2803
|
+
if (!isWindows) return p[0] === "/";
|
2804
|
+
return windowsDrivePathPrefixRE.test(p);
|
2853
2805
|
};
|
2854
2806
|
/**
|
2855
2807
|
* Determine if a file is being requested with the correct case, to ensure
|
@@ -3040,7 +2992,7 @@ function perEnvironmentPlugin(name, applyToEnvironment) {
|
|
3040
2992
|
//#endregion
|
3041
2993
|
//#region ../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js
|
3042
2994
|
var require_commondir = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js": ((exports, module) => {
|
3043
|
-
var path$12 =
|
2995
|
+
var path$12 = __require("path");
|
3044
2996
|
module.exports = function(basedir, relfiles) {
|
3045
2997
|
if (relfiles) var files = relfiles.map(function(r$2) {
|
3046
2998
|
return path$12.resolve(basedir, r$2);
|
@@ -4625,7 +4577,7 @@ function getDefinePropertyCallName(node, targetName) {
|
|
4625
4577
|
if (target.type !== "MemberExpression" || target.object.name !== targetNames[0] || target.property.name !== targetNames[1]) return;
|
4626
4578
|
}
|
4627
4579
|
if (value$1.type !== "ObjectExpression" || !value$1.properties) return;
|
4628
|
-
const valueProperty = value$1.properties.find((p
|
4580
|
+
const valueProperty = value$1.properties.find((p) => p.key && p.key.name === "value");
|
4629
4581
|
if (!valueProperty || !valueProperty.value) return;
|
4630
4582
|
return {
|
4631
4583
|
key: key.value,
|
@@ -5275,105 +5227,6 @@ function perEnvironmentState(initial) {
|
|
5275
5227
|
};
|
5276
5228
|
}
|
5277
5229
|
|
5278
|
-
//#endregion
|
5279
|
-
//#region src/node/logger.ts
|
5280
|
-
var import_picocolors$33 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
5281
|
-
const LogLevels = {
|
5282
|
-
silent: 0,
|
5283
|
-
error: 1,
|
5284
|
-
warn: 2,
|
5285
|
-
info: 3
|
5286
|
-
};
|
5287
|
-
let lastType;
|
5288
|
-
let lastMsg;
|
5289
|
-
let sameCount = 0;
|
5290
|
-
function clearScreen() {
|
5291
|
-
const repeatCount = process.stdout.rows - 2;
|
5292
|
-
const blank = repeatCount > 0 ? "\n".repeat(repeatCount) : "";
|
5293
|
-
console.log(blank);
|
5294
|
-
readline.cursorTo(process.stdout, 0, 0);
|
5295
|
-
readline.clearScreenDown(process.stdout);
|
5296
|
-
}
|
5297
|
-
let timeFormatter;
|
5298
|
-
function getTimeFormatter() {
|
5299
|
-
timeFormatter ??= new Intl.DateTimeFormat(void 0, {
|
5300
|
-
hour: "numeric",
|
5301
|
-
minute: "numeric",
|
5302
|
-
second: "numeric"
|
5303
|
-
});
|
5304
|
-
return timeFormatter;
|
5305
|
-
}
|
5306
|
-
function createLogger(level = "info", options$1 = {}) {
|
5307
|
-
if (options$1.customLogger) return options$1.customLogger;
|
5308
|
-
const loggedErrors = /* @__PURE__ */ new WeakSet();
|
5309
|
-
const { prefix = "[vite]", allowClearScreen = true, console: console$1 = globalThis.console } = options$1;
|
5310
|
-
const thresh = LogLevels[level];
|
5311
|
-
const canClearScreen = allowClearScreen && process.stdout.isTTY && !process.env.CI;
|
5312
|
-
const clear = canClearScreen ? clearScreen : () => {};
|
5313
|
-
function format$3(type, msg, options$2 = {}) {
|
5314
|
-
if (options$2.timestamp) {
|
5315
|
-
let tag = "";
|
5316
|
-
if (type === "info") tag = import_picocolors$33.default.cyan(import_picocolors$33.default.bold(prefix));
|
5317
|
-
else if (type === "warn") tag = import_picocolors$33.default.yellow(import_picocolors$33.default.bold(prefix));
|
5318
|
-
else tag = import_picocolors$33.default.red(import_picocolors$33.default.bold(prefix));
|
5319
|
-
const environment = options$2.environment ? options$2.environment + " " : "";
|
5320
|
-
return `${import_picocolors$33.default.dim(getTimeFormatter().format(/* @__PURE__ */ new Date()))} ${tag} ${environment}${msg}`;
|
5321
|
-
} else return msg;
|
5322
|
-
}
|
5323
|
-
function output(type, msg, options$2 = {}) {
|
5324
|
-
if (thresh >= LogLevels[type]) {
|
5325
|
-
const method = type === "info" ? "log" : type;
|
5326
|
-
if (options$2.error) loggedErrors.add(options$2.error);
|
5327
|
-
if (canClearScreen) if (type === lastType && msg === lastMsg) {
|
5328
|
-
sameCount++;
|
5329
|
-
clear();
|
5330
|
-
console$1[method](format$3(type, msg, options$2), import_picocolors$33.default.yellow(`(x${sameCount + 1})`));
|
5331
|
-
} else {
|
5332
|
-
sameCount = 0;
|
5333
|
-
lastMsg = msg;
|
5334
|
-
lastType = type;
|
5335
|
-
if (options$2.clear) clear();
|
5336
|
-
console$1[method](format$3(type, msg, options$2));
|
5337
|
-
}
|
5338
|
-
else console$1[method](format$3(type, msg, options$2));
|
5339
|
-
}
|
5340
|
-
}
|
5341
|
-
const warnedMessages = /* @__PURE__ */ new Set();
|
5342
|
-
const logger = {
|
5343
|
-
hasWarned: false,
|
5344
|
-
info(msg, opts) {
|
5345
|
-
output("info", msg, opts);
|
5346
|
-
},
|
5347
|
-
warn(msg, opts) {
|
5348
|
-
logger.hasWarned = true;
|
5349
|
-
output("warn", msg, opts);
|
5350
|
-
},
|
5351
|
-
warnOnce(msg, opts) {
|
5352
|
-
if (warnedMessages.has(msg)) return;
|
5353
|
-
logger.hasWarned = true;
|
5354
|
-
output("warn", msg, opts);
|
5355
|
-
warnedMessages.add(msg);
|
5356
|
-
},
|
5357
|
-
error(msg, opts) {
|
5358
|
-
logger.hasWarned = true;
|
5359
|
-
output("error", msg, opts);
|
5360
|
-
},
|
5361
|
-
clearScreen(type) {
|
5362
|
-
if (thresh >= LogLevels[type]) clear();
|
5363
|
-
},
|
5364
|
-
hasErrorLogged(error$1) {
|
5365
|
-
return loggedErrors.has(error$1);
|
5366
|
-
}
|
5367
|
-
};
|
5368
|
-
return logger;
|
5369
|
-
}
|
5370
|
-
function printServerUrls(urls, optionsHost, info) {
|
5371
|
-
const colorUrl = (url$3) => import_picocolors$33.default.cyan(url$3.replace(/:(\d+)\//, (_, port) => `:${import_picocolors$33.default.bold(port)}/`));
|
5372
|
-
for (const url$3 of urls.local) info(` ${import_picocolors$33.default.green("➜")} ${import_picocolors$33.default.bold("Local")}: ${colorUrl(url$3)}`);
|
5373
|
-
for (const url$3 of urls.network) info(` ${import_picocolors$33.default.green("➜")} ${import_picocolors$33.default.bold("Network")}: ${colorUrl(url$3)}`);
|
5374
|
-
if (urls.network.length === 0 && optionsHost === void 0) info(import_picocolors$33.default.dim(` ${import_picocolors$33.default.green("➜")} ${import_picocolors$33.default.bold("Network")}: use `) + import_picocolors$33.default.bold("--host") + import_picocolors$33.default.dim(" to expose"));
|
5375
|
-
}
|
5376
|
-
|
5377
5230
|
//#endregion
|
5378
5231
|
//#region src/node/plugins/reporter.ts
|
5379
5232
|
var import_picocolors$32 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
@@ -7025,8 +6878,15 @@ const loadTerserPath = (root) => {
|
|
7025
6878
|
function terserPlugin(config$2) {
|
7026
6879
|
const { maxWorkers,...terserOptions } = config$2.build.terserOptions;
|
7027
6880
|
const makeWorker = () => new WorkerWithFallback(() => async (terserPath$1, code, options$1) => {
|
7028
|
-
const terser =
|
7029
|
-
|
6881
|
+
const terser = (await import(terserPath$1)).default;
|
6882
|
+
try {
|
6883
|
+
return await terser.minify(code, options$1);
|
6884
|
+
} catch (e$1) {
|
6885
|
+
throw {
|
6886
|
+
stack: e$1.stack,
|
6887
|
+
...e$1
|
6888
|
+
};
|
6889
|
+
}
|
7030
6890
|
}, {
|
7031
6891
|
shouldUseFake(_terserPath, _code, options$1) {
|
7032
6892
|
return !!(typeof options$1.mangle === "object" && (options$1.mangle.nth_identifier?.get || typeof options$1.mangle.properties === "object" && options$1.mangle.properties.nth_identifier?.get) || typeof options$1.format?.comments === "function" || typeof options$1.output?.comments === "function");
|
@@ -7039,22 +6899,32 @@ function terserPlugin(config$2) {
|
|
7039
6899
|
applyToEnvironment(environment) {
|
7040
6900
|
return !!environment.config.build.minify;
|
7041
6901
|
},
|
7042
|
-
async renderChunk(code,
|
6902
|
+
async renderChunk(code, chunk, outputOptions) {
|
7043
6903
|
if (config$2.build.minify !== "terser" && !outputOptions.__vite_force_terser__) return null;
|
7044
6904
|
if (config$2.build.lib && outputOptions.format === "es") return null;
|
7045
6905
|
worker ||= makeWorker();
|
7046
|
-
const terserPath$1 = loadTerserPath(config$2.root);
|
7047
|
-
|
7048
|
-
|
7049
|
-
|
7050
|
-
|
7051
|
-
|
7052
|
-
|
7053
|
-
|
7054
|
-
|
7055
|
-
|
7056
|
-
|
7057
|
-
|
6906
|
+
const terserPath$1 = pathToFileURL(loadTerserPath(config$2.root)).href;
|
6907
|
+
try {
|
6908
|
+
const res = await worker.run(terserPath$1, code, {
|
6909
|
+
safari10: true,
|
6910
|
+
...terserOptions,
|
6911
|
+
sourceMap: !!outputOptions.sourcemap,
|
6912
|
+
module: outputOptions.format.startsWith("es"),
|
6913
|
+
toplevel: outputOptions.format === "cjs"
|
6914
|
+
});
|
6915
|
+
return {
|
6916
|
+
code: res.code,
|
6917
|
+
map: res.map
|
6918
|
+
};
|
6919
|
+
} catch (e$1) {
|
6920
|
+
if (e$1.line !== void 0 && e$1.col !== void 0) e$1.loc = {
|
6921
|
+
file: chunk.fileName,
|
6922
|
+
line: e$1.line,
|
6923
|
+
column: e$1.col
|
6924
|
+
};
|
6925
|
+
if (e$1.pos !== void 0) e$1.frame = generateCodeFrame(code, e$1.pos);
|
6926
|
+
throw e$1;
|
6927
|
+
}
|
7058
6928
|
},
|
7059
6929
|
closeBundle() {
|
7060
6930
|
worker?.stop();
|
@@ -8275,10 +8145,10 @@ function createConvertSourceMapReadMap(originalFileName) {
|
|
8275
8145
|
//#endregion
|
8276
8146
|
//#region ../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js
|
8277
8147
|
var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js": ((exports, module) => {
|
8278
|
-
const path$11 =
|
8279
|
-
const fs$11 =
|
8280
|
-
const os$4 =
|
8281
|
-
const url$2 =
|
8148
|
+
const path$11 = __require("path");
|
8149
|
+
const fs$11 = __require("fs");
|
8150
|
+
const os$4 = __require("os");
|
8151
|
+
const url$2 = __require("url");
|
8282
8152
|
const fsReadFileAsync = fs$11.promises.readFile;
|
8283
8153
|
/** @type {(name: string, sync: boolean) => string[]} */
|
8284
8154
|
function getDefaultSearchPlaces(name, sync$3) {
|
@@ -8307,12 +8177,12 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
|
|
8307
8177
|
* but it should be '/' actually.
|
8308
8178
|
* And on Windows, this will never happen. ('C:\build' -> 'C:')
|
8309
8179
|
*/
|
8310
|
-
function parentDir(p
|
8311
|
-
return path$11.dirname(p
|
8180
|
+
function parentDir(p) {
|
8181
|
+
return path$11.dirname(p) || path$11.sep;
|
8312
8182
|
}
|
8313
8183
|
/** @type {import('./index').LoaderSync} */
|
8314
8184
|
const jsonLoader = (_, content) => JSON.parse(content);
|
8315
|
-
const requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ :
|
8185
|
+
const requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
8316
8186
|
/** @type {import('./index').LoadersSync} */
|
8317
8187
|
const defaultLoadersSync = Object.freeze({
|
8318
8188
|
".js": requireFunc,
|
@@ -8416,7 +8286,7 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
|
|
8416
8286
|
if (cache$1) {
|
8417
8287
|
const r$2 = searchCache.get(dir);
|
8418
8288
|
if (r$2 !== void 0) {
|
8419
|
-
for (const p
|
8289
|
+
for (const p of visited) searchCache.set(p, r$2);
|
8420
8290
|
return r$2;
|
8421
8291
|
}
|
8422
8292
|
visited.add(dir);
|
@@ -8457,7 +8327,7 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
|
|
8457
8327
|
dir = parentDir(dir);
|
8458
8328
|
}
|
8459
8329
|
const transformed = result.filepath === "" && result.config === null ? transform$2(null) : transform$2(result);
|
8460
|
-
if (cache$1) for (const p
|
8330
|
+
if (cache$1) for (const p of visited) searchCache.set(p, transformed);
|
8461
8331
|
return transformed;
|
8462
8332
|
},
|
8463
8333
|
async load(filepath) {
|
@@ -8528,7 +8398,7 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
|
|
8528
8398
|
if (cache$1) {
|
8529
8399
|
const r$2 = searchCache.get(dir);
|
8530
8400
|
if (r$2 !== void 0) {
|
8531
|
-
for (const p
|
8401
|
+
for (const p of visited) searchCache.set(p, r$2);
|
8532
8402
|
return r$2;
|
8533
8403
|
}
|
8534
8404
|
visited.add(dir);
|
@@ -8569,7 +8439,7 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
|
|
8569
8439
|
dir = parentDir(dir);
|
8570
8440
|
}
|
8571
8441
|
const transformed = result.filepath === "" && result.config === null ? transform$2(null) : transform$2(result);
|
8572
|
-
if (cache$1) for (const p
|
8442
|
+
if (cache$1) for (const p of visited) searchCache.set(p, transformed);
|
8573
8443
|
return transformed;
|
8574
8444
|
},
|
8575
8445
|
load(filepath) {
|
@@ -8622,10 +8492,10 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
|
|
8622
8492
|
}) });
|
8623
8493
|
|
8624
8494
|
//#endregion
|
8625
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.
|
8626
|
-
var require_req = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.
|
8627
|
-
const { createRequire: createRequire$2 } =
|
8628
|
-
const { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1 } =
|
8495
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/req.js
|
8496
|
+
var require_req = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/req.js": ((exports, module) => {
|
8497
|
+
const { createRequire: createRequire$2 } = __require("node:module");
|
8498
|
+
const { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1 } = __require("node:url");
|
8629
8499
|
const TS_EXT_RE = /\.[mc]?ts$/;
|
8630
8500
|
let tsx;
|
8631
8501
|
let jiti;
|
@@ -8665,8 +8535,8 @@ var require_req = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss
|
|
8665
8535
|
}) });
|
8666
8536
|
|
8667
8537
|
//#endregion
|
8668
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.
|
8669
|
-
var require_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.
|
8538
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/options.js
|
8539
|
+
var require_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/options.js": ((exports, module) => {
|
8670
8540
|
const req$2 = require_req();
|
8671
8541
|
/**
|
8672
8542
|
* Load Options
|
@@ -8700,8 +8570,8 @@ var require_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
|
|
8700
8570
|
}) });
|
8701
8571
|
|
8702
8572
|
//#endregion
|
8703
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.
|
8704
|
-
var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.
|
8573
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/plugins.js
|
8574
|
+
var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/plugins.js": ((exports, module) => {
|
8705
8575
|
const req$1 = require_req();
|
8706
8576
|
/**
|
8707
8577
|
* Plugin Loader
|
@@ -8755,9 +8625,9 @@ var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
|
|
8755
8625
|
}) });
|
8756
8626
|
|
8757
8627
|
//#endregion
|
8758
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.
|
8759
|
-
var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.
|
8760
|
-
const { resolve: resolve$2 } =
|
8628
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/index.js
|
8629
|
+
var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.4_yaml@2.8.1/node_modules/postcss-load-config/src/index.js": ((exports, module) => {
|
8630
|
+
const { resolve: resolve$2 } = __require("node:path");
|
8761
8631
|
const config$1 = require_src$1();
|
8762
8632
|
const loadOptions = require_options();
|
8763
8633
|
const loadPlugins = require_plugins();
|
@@ -10529,7 +10399,7 @@ async function toAbsoluteGlob(glob$1, root, importer, resolveId, base) {
|
|
10529
10399
|
}
|
10530
10400
|
root = globSafePath(root);
|
10531
10401
|
let dir;
|
10532
|
-
if (base) if (base
|
10402
|
+
if (base) if (base[0] === "/") dir = posix.join(root, base);
|
10533
10403
|
else dir = posix.resolve(importer ? globSafePath(dirname$2(importer)) : root, base);
|
10534
10404
|
else dir = importer ? globSafePath(dirname$2(importer)) : root;
|
10535
10405
|
if (glob$1[0] === "/") return pre + posix.join(root, glob$1.slice(1));
|
@@ -10680,12 +10550,12 @@ async function computeEntries(environment) {
|
|
10680
10550
|
const buildInput = environment.config.build.rollupOptions.input;
|
10681
10551
|
if (explicitEntryPatterns) entries = await globEntries(explicitEntryPatterns, environment);
|
10682
10552
|
else if (buildInput) {
|
10683
|
-
const resolvePath = async (p
|
10684
|
-
const id = (await environment.pluginContainer.resolveId(p
|
10553
|
+
const resolvePath = async (p) => {
|
10554
|
+
const id = (await environment.pluginContainer.resolveId(p, path.join(process.cwd(), "*"), {
|
10685
10555
|
isEntry: true,
|
10686
10556
|
scan: true
|
10687
10557
|
}))?.id;
|
10688
|
-
if (id === void 0) throw new Error(`failed to resolve rollupOptions.input value: ${JSON.stringify(p
|
10558
|
+
if (id === void 0) throw new Error(`failed to resolve rollupOptions.input value: ${JSON.stringify(p)}.`);
|
10689
10559
|
return id;
|
10690
10560
|
};
|
10691
10561
|
if (typeof buildInput === "string") entries = [await resolvePath(buildInput)];
|
@@ -10819,10 +10689,10 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
|
|
10819
10689
|
namespace: "html"
|
10820
10690
|
};
|
10821
10691
|
});
|
10822
|
-
const htmlTypeOnLoadCallback = async ({ path: p
|
10823
|
-
let raw = await fsp.readFile(p
|
10692
|
+
const htmlTypeOnLoadCallback = async ({ path: p }) => {
|
10693
|
+
let raw = await fsp.readFile(p, "utf-8");
|
10824
10694
|
raw = raw.replace(commentRE$1, "<!---->");
|
10825
|
-
const isHtml = p
|
10695
|
+
const isHtml = p.endsWith(".html");
|
10826
10696
|
let js = "";
|
10827
10697
|
let scriptId = 0;
|
10828
10698
|
const matches$2 = raw.matchAll(scriptRE);
|
@@ -10835,29 +10705,29 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
|
|
10835
10705
|
if (type && !(type.includes("javascript") || type.includes("ecmascript") || type === "module")) continue;
|
10836
10706
|
let loader$1 = "js";
|
10837
10707
|
if (lang === "ts" || lang === "tsx" || lang === "jsx") loader$1 = lang;
|
10838
|
-
else if (p
|
10708
|
+
else if (p.endsWith(".astro")) loader$1 = "ts";
|
10839
10709
|
const srcMatch = srcRE.exec(openTag);
|
10840
10710
|
if (srcMatch) {
|
10841
10711
|
const src = srcMatch[1] || srcMatch[2] || srcMatch[3];
|
10842
10712
|
js += `import ${JSON.stringify(src)}\n`;
|
10843
10713
|
} else if (content.trim()) {
|
10844
10714
|
const contents = content + (loader$1.startsWith("ts") ? extractImportPaths(content) : "");
|
10845
|
-
const key = `${p
|
10715
|
+
const key = `${p}?id=${scriptId++}`;
|
10846
10716
|
if (contents.includes("import.meta.glob")) scripts[key] = {
|
10847
10717
|
loader: "js",
|
10848
|
-
contents: await doTransformGlobImport(contents, p
|
10849
|
-
resolveDir: normalizePath(path.dirname(p
|
10718
|
+
contents: await doTransformGlobImport(contents, p, loader$1),
|
10719
|
+
resolveDir: normalizePath(path.dirname(p)),
|
10850
10720
|
pluginData: { htmlType: { loader: loader$1 } }
|
10851
10721
|
};
|
10852
10722
|
else scripts[key] = {
|
10853
10723
|
loader: loader$1,
|
10854
10724
|
contents,
|
10855
|
-
resolveDir: normalizePath(path.dirname(p
|
10725
|
+
resolveDir: normalizePath(path.dirname(p)),
|
10856
10726
|
pluginData: { htmlType: { loader: loader$1 } }
|
10857
10727
|
};
|
10858
10728
|
const virtualModulePath = JSON.stringify(virtualModulePrefix + key);
|
10859
10729
|
let addedImport = false;
|
10860
|
-
if (p
|
10730
|
+
if (p.endsWith(".svelte")) {
|
10861
10731
|
let isModule = svelteModuleRE.test(openTag);
|
10862
10732
|
if (!isModule) {
|
10863
10733
|
const contextMatch = svelteScriptModuleRE.exec(openTag);
|
@@ -10872,7 +10742,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
|
|
10872
10742
|
if (!addedImport) js += `export * from ${virtualModulePath}\n`;
|
10873
10743
|
}
|
10874
10744
|
}
|
10875
|
-
if (!p
|
10745
|
+
if (!p.endsWith(".vue") || !js.includes("export default")) js += "\nexport default {}";
|
10876
10746
|
return {
|
10877
10747
|
loader: "js",
|
10878
10748
|
contents: js
|
@@ -11037,7 +10907,7 @@ function expandGlobIds(id, config$2) {
|
|
11037
10907
|
}).filter(Boolean));
|
11038
10908
|
} else possibleExportPaths.push(key.slice(2));
|
11039
10909
|
const isMatch$1 = picomatch(pattern);
|
11040
|
-
const matched = possibleExportPaths.filter((p
|
10910
|
+
const matched = possibleExportPaths.filter((p) => isMatch$1(p)).map((match) => path.posix.join(pkgName, match));
|
11041
10911
|
matched.unshift(pkgName);
|
11042
10912
|
return matched;
|
11043
10913
|
} else {
|
@@ -11622,13 +11492,13 @@ function getConfigHash(environment) {
|
|
11622
11492
|
root: config$2.root,
|
11623
11493
|
resolve: config$2.resolve,
|
11624
11494
|
assetsInclude: config$2.assetsInclude,
|
11625
|
-
plugins: config$2.plugins.map((p
|
11495
|
+
plugins: config$2.plugins.map((p) => p.name),
|
11626
11496
|
optimizeDeps: {
|
11627
11497
|
include: optimizeDeps$1.include ? unique(optimizeDeps$1.include).sort() : void 0,
|
11628
11498
|
exclude: optimizeDeps$1.exclude ? unique(optimizeDeps$1.exclude).sort() : void 0,
|
11629
11499
|
esbuildOptions: {
|
11630
11500
|
...optimizeDeps$1.esbuildOptions,
|
11631
|
-
plugins: optimizeDeps$1.esbuildOptions?.plugins?.map((p
|
11501
|
+
plugins: optimizeDeps$1.esbuildOptions?.plugins?.map((p) => p.name)
|
11632
11502
|
}
|
11633
11503
|
}
|
11634
11504
|
}, (_, value$1) => {
|
@@ -12310,7 +12180,7 @@ function optimizedDepsPlugin() {
|
|
12310
12180
|
if (depsOptimizer?.isOptimizedDepFile(id)) {
|
12311
12181
|
const metadata = depsOptimizer.metadata;
|
12312
12182
|
const file = cleanUrl(id);
|
12313
|
-
const versionMatch = DEP_VERSION_RE.exec(
|
12183
|
+
const versionMatch = DEP_VERSION_RE.exec(id);
|
12314
12184
|
const browserHash = versionMatch ? versionMatch[1].split("=")[1] : void 0;
|
12315
12185
|
const info = optimizedDepInfoFromFile(metadata, file);
|
12316
12186
|
if (info) {
|
@@ -12330,8 +12200,7 @@ function optimizedDepsPlugin() {
|
|
12330
12200
|
try {
|
12331
12201
|
return await fsp.readFile(file, "utf-8");
|
12332
12202
|
} catch {
|
12333
|
-
|
12334
|
-
if (optimizedDepInfoFromFile(newMetadata, file)) throwOutdatedRequest(id);
|
12203
|
+
if (browserHash) throwOutdatedRequest(id);
|
12335
12204
|
throwFileNotFoundInOptimizedDep(id);
|
12336
12205
|
}
|
12337
12206
|
}
|
@@ -12420,10 +12289,10 @@ var require_package = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dot
|
|
12420
12289
|
//#endregion
|
12421
12290
|
//#region ../../node_modules/.pnpm/dotenv@17.2.1/node_modules/dotenv/lib/main.js
|
12422
12291
|
var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv@17.2.1/node_modules/dotenv/lib/main.js": ((exports, module) => {
|
12423
|
-
const fs$10 =
|
12424
|
-
const path$10 =
|
12425
|
-
const os$3 =
|
12426
|
-
const crypto$2 =
|
12292
|
+
const fs$10 = __require("fs");
|
12293
|
+
const path$10 = __require("path");
|
12294
|
+
const os$3 = __require("os");
|
12295
|
+
const crypto$2 = __require("crypto");
|
12427
12296
|
const packageJson = require_package();
|
12428
12297
|
const version = packageJson.version;
|
12429
12298
|
const TIPS = [
|
@@ -12702,7 +12571,7 @@ var require_main = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv
|
|
12702
12571
|
return value$1.replace(/\\\$/g, "$");
|
12703
12572
|
}
|
12704
12573
|
function expandValue(value$1, processEnv, runningParsed) {
|
12705
|
-
const env$
|
12574
|
+
const env$1 = {
|
12706
12575
|
...runningParsed,
|
12707
12576
|
...processEnv
|
12708
12577
|
};
|
@@ -12722,11 +12591,11 @@ var require_main = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv
|
|
12722
12591
|
let value$2;
|
12723
12592
|
const key = r$2.shift();
|
12724
12593
|
if ([":+", "+"].includes(splitter)) {
|
12725
|
-
defaultValue = env$
|
12594
|
+
defaultValue = env$1[key] ? r$2.join(splitter) : "";
|
12726
12595
|
value$2 = null;
|
12727
12596
|
} else {
|
12728
12597
|
defaultValue = r$2.join(splitter);
|
12729
|
-
value$2 = env$
|
12598
|
+
value$2 = env$1[key];
|
12730
12599
|
}
|
12731
12600
|
if (value$2) if (seen$1.has(value$2)) result = result.replace(template, defaultValue);
|
12732
12601
|
else result = result.replace(template, value$2);
|
@@ -12770,7 +12639,7 @@ function loadEnv(mode, envDir, prefixes = "VITE_") {
|
|
12770
12639
|
const getTime = () => `${(performance.now() - start).toFixed(2)}ms`;
|
12771
12640
|
if (mode === "local") throw new Error("\"local\" cannot be used as a mode name because it conflicts with the .local postfix for .env files.");
|
12772
12641
|
prefixes = arraify(prefixes);
|
12773
|
-
const env$
|
12642
|
+
const env$1 = {};
|
12774
12643
|
const envFiles = getEnvFilesForMode(mode, envDir);
|
12775
12644
|
debug$10?.(`loading env files: %O`, envFiles);
|
12776
12645
|
const parsed = Object.fromEntries(envFiles.flatMap((filePath) => {
|
@@ -12786,10 +12655,10 @@ function loadEnv(mode, envDir, prefixes = "VITE_") {
|
|
12786
12655
|
parsed,
|
12787
12656
|
processEnv
|
12788
12657
|
});
|
12789
|
-
for (const [key, value$1] of Object.entries(parsed)) if (prefixes.some((prefix) => key.startsWith(prefix))) env$
|
12790
|
-
for (const key in process.env) if (prefixes.some((prefix) => key.startsWith(prefix))) env$
|
12791
|
-
debug$10?.(`using resolved env: %O`, env$
|
12792
|
-
return env$
|
12658
|
+
for (const [key, value$1] of Object.entries(parsed)) if (prefixes.some((prefix) => key.startsWith(prefix))) env$1[key] = value$1;
|
12659
|
+
for (const key in process.env) if (prefixes.some((prefix) => key.startsWith(prefix))) env$1[key] = process.env[key];
|
12660
|
+
debug$10?.(`using resolved env: %O`, env$1);
|
12661
|
+
return env$1;
|
12793
12662
|
}
|
12794
12663
|
function resolveEnvPrefix({ envPrefix = "VITE_" }) {
|
12795
12664
|
envPrefix = arraify(envPrefix);
|
@@ -13111,10 +12980,10 @@ var require_debug$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/deb
|
|
13111
12980
|
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format$3) {
|
13112
12981
|
if (match === "%%") return match;
|
13113
12982
|
index++;
|
13114
|
-
var formatter
|
13115
|
-
if ("function" === typeof formatter
|
12983
|
+
var formatter = exports.formatters[format$3];
|
12984
|
+
if ("function" === typeof formatter) {
|
13116
12985
|
var val = args[index];
|
13117
|
-
match = formatter
|
12986
|
+
match = formatter.call(self$1, val);
|
13118
12987
|
args.splice(index, 1);
|
13119
12988
|
index--;
|
13120
12989
|
}
|
@@ -13191,8 +13060,8 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@
|
|
13191
13060
|
/**
|
13192
13061
|
* Module dependencies.
|
13193
13062
|
*/
|
13194
|
-
var tty =
|
13195
|
-
var util$1 =
|
13063
|
+
var tty = __require("tty");
|
13064
|
+
var util$1 = __require("util");
|
13196
13065
|
/**
|
13197
13066
|
* This is the Node.js implementation of `debug()`.
|
13198
13067
|
*
|
@@ -13322,13 +13191,13 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@
|
|
13322
13191
|
if (stream$3._handle && stream$3._handle.unref) stream$3._handle.unref();
|
13323
13192
|
break;
|
13324
13193
|
case "FILE":
|
13325
|
-
var fs$12 =
|
13194
|
+
var fs$12 = __require("fs");
|
13326
13195
|
stream$3 = new fs$12.SyncWriteStream(fd$1, { autoClose: false });
|
13327
13196
|
stream$3._type = "fs";
|
13328
13197
|
break;
|
13329
13198
|
case "PIPE":
|
13330
13199
|
case "TCP":
|
13331
|
-
var net$2 =
|
13200
|
+
var net$2 = __require("net");
|
13332
13201
|
stream$3 = new net$2.Socket({
|
13333
13202
|
fd: fd$1,
|
13334
13203
|
readable: false,
|
@@ -13676,7 +13545,7 @@ var require_parseurl = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pa
|
|
13676
13545
|
* Module dependencies.
|
13677
13546
|
* @private
|
13678
13547
|
*/
|
13679
|
-
var url$1 =
|
13548
|
+
var url$1 = __require("url");
|
13680
13549
|
var parse$10 = url$1.parse;
|
13681
13550
|
var Url = url$1.Url;
|
13682
13551
|
/**
|
@@ -14011,7 +13880,7 @@ var require_finalhandler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
14011
13880
|
*/
|
14012
13881
|
function finalhandler$1(req$4, res, options$1) {
|
14013
13882
|
var opts = options$1 || {};
|
14014
|
-
var env$
|
13883
|
+
var env$1 = opts.env || process.env.NODE_ENV || "development";
|
14015
13884
|
var onerror = opts.onerror;
|
14016
13885
|
return function(err$2) {
|
14017
13886
|
var headers;
|
@@ -14025,7 +13894,7 @@ var require_finalhandler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
14025
13894
|
status$1 = getErrorStatusCode(err$2);
|
14026
13895
|
if (status$1 === void 0) status$1 = getResponseStatusCode(res);
|
14027
13896
|
else headers = getErrorHeaders(err$2);
|
14028
|
-
msg = getErrorMessage(err$2, status$1, env$
|
13897
|
+
msg = getErrorMessage(err$2, status$1, env$1);
|
14029
13898
|
} else {
|
14030
13899
|
status$1 = 404;
|
14031
13900
|
msg = "Cannot " + req$4.method + " " + encodeUrl(getResourceName(req$4));
|
@@ -14066,9 +13935,9 @@ var require_finalhandler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
14066
13935
|
* @return {string}
|
14067
13936
|
* @private
|
14068
13937
|
*/
|
14069
|
-
function getErrorMessage(err$2, status$1, env$
|
13938
|
+
function getErrorMessage(err$2, status$1, env$1) {
|
14070
13939
|
var msg;
|
14071
|
-
if (env$
|
13940
|
+
if (env$1 !== "production") {
|
14072
13941
|
msg = err$2.stack;
|
14073
13942
|
if (!msg && typeof err$2.toString === "function") msg = err$2.toString();
|
14074
13943
|
}
|
@@ -14207,9 +14076,9 @@ var require_connect = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/con
|
|
14207
14076
|
* @private
|
14208
14077
|
*/
|
14209
14078
|
var debug$8 = require_node()("connect:dispatcher");
|
14210
|
-
var EventEmitter$4 =
|
14079
|
+
var EventEmitter$4 = __require("events").EventEmitter;
|
14211
14080
|
var finalhandler = require_finalhandler();
|
14212
|
-
var http$6 =
|
14081
|
+
var http$6 = __require("http");
|
14213
14082
|
var merge = require_utils_merge();
|
14214
14083
|
var parseUrl$1 = require_parseurl();
|
14215
14084
|
/**
|
@@ -14706,11 +14575,11 @@ var require_lib$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cors@
|
|
14706
14575
|
//#endregion
|
14707
14576
|
//#region ../../node_modules/.pnpm/readdirp@3.6.0/node_modules/readdirp/index.js
|
14708
14577
|
var require_readdirp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/readdirp@3.6.0/node_modules/readdirp/index.js": ((exports, module) => {
|
14709
|
-
const fs$9 =
|
14710
|
-
const { Readable: Readable$1 } =
|
14711
|
-
const sysPath$3 =
|
14712
|
-
const { promisify: promisify$4 } =
|
14713
|
-
const picomatch$2 =
|
14578
|
+
const fs$9 = __require("fs");
|
14579
|
+
const { Readable: Readable$1 } = __require("stream");
|
14580
|
+
const sysPath$3 = __require("path");
|
14581
|
+
const { promisify: promisify$4 } = __require("util");
|
14582
|
+
const picomatch$2 = __require("picomatch");
|
14714
14583
|
const readdir$1 = promisify$4(fs$9.readdir);
|
14715
14584
|
const stat$3 = promisify$4(fs$9.stat);
|
14716
14585
|
const lstat$2 = promisify$4(fs$9.lstat);
|
@@ -14990,7 +14859,7 @@ var require_normalize_path = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
14990
14859
|
//#region ../../node_modules/.pnpm/anymatch@3.1.3/node_modules/anymatch/index.js
|
14991
14860
|
var require_anymatch = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/anymatch@3.1.3/node_modules/anymatch/index.js": ((exports, module) => {
|
14992
14861
|
Object.defineProperty(exports, "__esModule", { value: true });
|
14993
|
-
const picomatch$1 =
|
14862
|
+
const picomatch$1 = __require("picomatch");
|
14994
14863
|
const normalizePath$2 = require_normalize_path();
|
14995
14864
|
/**
|
14996
14865
|
* @typedef {(testString: string) => boolean} AnymatchFn
|
@@ -15182,8 +15051,8 @@ var require_is_glob = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/is-
|
|
15182
15051
|
//#region ../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js
|
15183
15052
|
var require_glob_parent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js": ((exports, module) => {
|
15184
15053
|
var isGlob$1 = require_is_glob();
|
15185
|
-
var pathPosixDirname =
|
15186
|
-
var isWin32 =
|
15054
|
+
var pathPosixDirname = __require("path").posix.dirname;
|
15055
|
+
var isWin32 = __require("os").platform() === "win32";
|
15187
15056
|
var slash$1 = "/";
|
15188
15057
|
var backslash = /\\/g;
|
15189
15058
|
var enclosure = /[\{\[].*[\}\]]$/;
|
@@ -15533,7 +15402,7 @@ var require_to_regex_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
15533
15402
|
//#endregion
|
15534
15403
|
//#region ../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js
|
15535
15404
|
var require_fill_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js": ((exports, module) => {
|
15536
|
-
const util =
|
15405
|
+
const util = __require("util");
|
15537
15406
|
const toRegexRange = require_to_regex_range();
|
15538
15407
|
const isObject$1 = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
15539
15408
|
const transform$1 = (toNumber) => {
|
@@ -15756,11 +15625,11 @@ var require_expand = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/brac
|
|
15756
15625
|
const rangeLimit = options$1.rangeLimit === void 0 ? 1e3 : options$1.rangeLimit;
|
15757
15626
|
const walk$3 = (node, parent = {}) => {
|
15758
15627
|
node.queue = [];
|
15759
|
-
let p
|
15628
|
+
let p = parent;
|
15760
15629
|
let q = parent.queue;
|
15761
|
-
while (p
|
15762
|
-
p
|
15763
|
-
q = p
|
15630
|
+
while (p.type !== "brace" && p.type !== "root" && p.parent) {
|
15631
|
+
p = p.parent;
|
15632
|
+
q = p.queue;
|
15764
15633
|
}
|
15765
15634
|
if (node.invalid || node.dollar) {
|
15766
15635
|
q.push(append(q.pop(), stringify$2(node, options$1)));
|
@@ -16557,7 +16426,7 @@ var require_binary_extensions = /* @__PURE__ */ __commonJS({ "../../node_modules
|
|
16557
16426
|
//#endregion
|
16558
16427
|
//#region ../../node_modules/.pnpm/is-binary-path@2.1.0/node_modules/is-binary-path/index.js
|
16559
16428
|
var require_is_binary_path = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/is-binary-path@2.1.0/node_modules/is-binary-path/index.js": ((exports, module) => {
|
16560
|
-
const path$9 =
|
16429
|
+
const path$9 = __require("path");
|
16561
16430
|
const binaryExtensions = require_binary_extensions();
|
16562
16431
|
const extensions = new Set(binaryExtensions);
|
16563
16432
|
module.exports = (filePath) => extensions.has(path$9.extname(filePath).slice(1).toLowerCase());
|
@@ -16566,9 +16435,9 @@ var require_is_binary_path = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
16566
16435
|
//#endregion
|
16567
16436
|
//#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/constants.js
|
16568
16437
|
var require_constants$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/constants.js": ((exports) => {
|
16569
|
-
const { sep: sep$1 } =
|
16438
|
+
const { sep: sep$1 } = __require("path");
|
16570
16439
|
const { platform: platform$1 } = process;
|
16571
|
-
const os$2 =
|
16440
|
+
const os$2 = __require("os");
|
16572
16441
|
exports.EV_ALL = "all";
|
16573
16442
|
exports.EV_READY = "ready";
|
16574
16443
|
exports.EV_ADD = "add";
|
@@ -16631,9 +16500,9 @@ var require_constants$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
16631
16500
|
//#endregion
|
16632
16501
|
//#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/nodefs-handler.js
|
16633
16502
|
var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/nodefs-handler.js": ((exports, module) => {
|
16634
|
-
const fs$8 =
|
16635
|
-
const sysPath$2 =
|
16636
|
-
const { promisify: promisify$3 } =
|
16503
|
+
const fs$8 = __require("fs");
|
16504
|
+
const sysPath$2 = __require("path");
|
16505
|
+
const { promisify: promisify$3 } = __require("util");
|
16637
16506
|
const isBinaryPath = require_is_binary_path();
|
16638
16507
|
const { isWindows: isWindows$3, isLinux, EMPTY_FN: EMPTY_FN$2, EMPTY_STR: EMPTY_STR$1, KEY_LISTENERS, KEY_ERR, KEY_RAW, HANDLER_KEYS, EV_CHANGE: EV_CHANGE$2, EV_ADD: EV_ADD$2, EV_ADD_DIR: EV_ADD_DIR$2, EV_ERROR: EV_ERROR$2, STR_DATA: STR_DATA$1, STR_END: STR_END$2, BRACE_START: BRACE_START$1, STAR } = require_constants$2();
|
16639
16508
|
const THROTTLE_MODE_WATCH = "watch";
|
@@ -17095,12 +16964,12 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
17095
16964
|
//#endregion
|
17096
16965
|
//#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/fsevents-handler.js
|
17097
16966
|
var require_fsevents_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/fsevents-handler.js": ((exports, module) => {
|
17098
|
-
const fs$7 =
|
17099
|
-
const sysPath$1 =
|
17100
|
-
const { promisify: promisify$2 } =
|
16967
|
+
const fs$7 = __require("fs");
|
16968
|
+
const sysPath$1 = __require("path");
|
16969
|
+
const { promisify: promisify$2 } = __require("util");
|
17101
16970
|
let fsevents;
|
17102
16971
|
try {
|
17103
|
-
fsevents =
|
16972
|
+
fsevents = __require("fsevents");
|
17104
16973
|
} catch (error$1) {
|
17105
16974
|
if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error$1);
|
17106
16975
|
}
|
@@ -17434,10 +17303,10 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/
|
|
17434
17303
|
//#endregion
|
17435
17304
|
//#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/index.js
|
17436
17305
|
var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/index.js": ((exports) => {
|
17437
|
-
const { EventEmitter: EventEmitter$3 } =
|
17438
|
-
const fs$6 =
|
17439
|
-
const sysPath =
|
17440
|
-
const { promisify: promisify$1 } =
|
17306
|
+
const { EventEmitter: EventEmitter$3 } = __require("events");
|
17307
|
+
const fs$6 = __require("fs");
|
17308
|
+
const sysPath = __require("path");
|
17309
|
+
const { promisify: promisify$1 } = __require("util");
|
17441
17310
|
const readdirp = require_readdirp();
|
17442
17311
|
const anymatch = require_anymatch().default;
|
17443
17312
|
const globParent = require_glob_parent();
|
@@ -17480,7 +17349,7 @@ var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ch
|
|
17480
17349
|
* @type {Array<String>}
|
17481
17350
|
*/
|
17482
17351
|
const paths = flatten(arrify(paths_));
|
17483
|
-
if (!paths.every((p
|
17352
|
+
if (!paths.every((p) => typeof p === STRING_TYPE)) throw new TypeError(`Non-string provided as watch path: ${paths}`);
|
17484
17353
|
return paths.map(normalizePathToUnix);
|
17485
17354
|
};
|
17486
17355
|
const toUnix = (string) => {
|
@@ -18181,21 +18050,21 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
18181
18050
|
r$2.lastIndex = origIndex;
|
18182
18051
|
return matches$2;
|
18183
18052
|
}
|
18184
|
-
function getVar(env$
|
18185
|
-
var r$2 = typeof env$
|
18053
|
+
function getVar(env$1, pre, key) {
|
18054
|
+
var r$2 = typeof env$1 === "function" ? env$1(key) : env$1[key];
|
18186
18055
|
if (typeof r$2 === "undefined" && key != "") r$2 = "";
|
18187
18056
|
else if (typeof r$2 === "undefined") r$2 = "$";
|
18188
18057
|
if (typeof r$2 === "object") return pre + TOKEN + JSON.stringify(r$2) + TOKEN;
|
18189
18058
|
return pre + r$2;
|
18190
18059
|
}
|
18191
|
-
function parseInternal(string, env$
|
18060
|
+
function parseInternal(string, env$1, opts) {
|
18192
18061
|
if (!opts) opts = {};
|
18193
18062
|
var BS = opts.escape || "\\";
|
18194
18063
|
var BAREWORD = "(\\" + BS + "['\"" + META + "]|[^\\s'\"" + META + "])+";
|
18195
18064
|
var chunker = new RegExp(["(" + CONTROL + ")", "(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")+"].join("|"), "g");
|
18196
18065
|
var matches$2 = matchAll(string, chunker);
|
18197
18066
|
if (matches$2.length === 0) return [];
|
18198
|
-
if (!env$
|
18067
|
+
if (!env$1) env$1 = {};
|
18199
18068
|
var commented = false;
|
18200
18069
|
return matches$2.map(function(match) {
|
18201
18070
|
var s$2 = match[0];
|
@@ -18232,7 +18101,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
18232
18101
|
i$1 += varend.index - 1;
|
18233
18102
|
}
|
18234
18103
|
}
|
18235
|
-
return getVar(env$
|
18104
|
+
return getVar(env$1, "", varname);
|
18236
18105
|
}
|
18237
18106
|
for (i$1 = 0; i$1 < s$2.length; i$1++) {
|
18238
18107
|
var c = s$2.charAt(i$1);
|
@@ -18269,9 +18138,9 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
|
|
18269
18138
|
return typeof arg === "undefined" ? prev : prev.concat(arg);
|
18270
18139
|
}, []);
|
18271
18140
|
}
|
18272
|
-
module.exports = function parse$17(s$2, env$
|
18273
|
-
var mapped = parseInternal(s$2, env$
|
18274
|
-
if (typeof env$
|
18141
|
+
module.exports = function parse$17(s$2, env$1, opts) {
|
18142
|
+
var mapped = parseInternal(s$2, env$1, opts);
|
18143
|
+
if (typeof env$1 !== "function") return mapped;
|
18275
18144
|
return mapped.reduce(function(acc, s$3) {
|
18276
18145
|
if (typeof s$3 === "object") return acc.concat(s$3);
|
18277
18146
|
var xs = s$3.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
|
@@ -18392,9 +18261,9 @@ var require_windows$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/l
|
|
18392
18261
|
//#endregion
|
18393
18262
|
//#region ../../node_modules/.pnpm/launch-editor@2.11.1/node_modules/launch-editor/guess.js
|
18394
18263
|
var require_guess = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.11.1/node_modules/launch-editor/guess.js": ((exports, module) => {
|
18395
|
-
const path$8 =
|
18264
|
+
const path$8 = __require("path");
|
18396
18265
|
const shellQuote = require_shell_quote();
|
18397
|
-
const childProcess$2 =
|
18266
|
+
const childProcess$2 = __require("child_process");
|
18398
18267
|
const COMMON_EDITORS_MACOS = require_macos();
|
18399
18268
|
const COMMON_EDITORS_LINUX = require_linux();
|
18400
18269
|
const COMMON_EDITORS_WIN = require_windows$1();
|
@@ -18455,7 +18324,7 @@ var require_guess = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launc
|
|
18455
18324
|
//#endregion
|
18456
18325
|
//#region ../../node_modules/.pnpm/launch-editor@2.11.1/node_modules/launch-editor/get-args.js
|
18457
18326
|
var require_get_args = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.11.1/node_modules/launch-editor/get-args.js": ((exports, module) => {
|
18458
|
-
const path$7 =
|
18327
|
+
const path$7 = __require("path");
|
18459
18328
|
module.exports = function getArgumentsForPosition$1(editor, fileName, lineNumber, columnNumber = 1) {
|
18460
18329
|
const editorBasename = path$7.basename(editor).replace(/\.(exe|cmd|bat)$/i, "");
|
18461
18330
|
switch (editorBasename) {
|
@@ -18544,11 +18413,11 @@ var require_launch_editor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
18544
18413
|
*
|
18545
18414
|
* Modified by Yuxi Evan You
|
18546
18415
|
*/
|
18547
|
-
const fs$5 =
|
18548
|
-
const os$1 =
|
18549
|
-
const path$6 =
|
18416
|
+
const fs$5 = __require("fs");
|
18417
|
+
const os$1 = __require("os");
|
18418
|
+
const path$6 = __require("path");
|
18550
18419
|
const colors$22 = require_picocolors();
|
18551
|
-
const childProcess$1 =
|
18420
|
+
const childProcess$1 = __require("child_process");
|
18552
18421
|
const guessEditor = require_guess();
|
18553
18422
|
const getArgumentsForPosition = require_get_args();
|
18554
18423
|
function wrapErrorCallback(cb) {
|
@@ -18573,7 +18442,7 @@ var require_launch_editor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
18573
18442
|
}
|
18574
18443
|
const positionRE = /:(\d+)(:(\d+))?$/;
|
18575
18444
|
function parseFile(file) {
|
18576
|
-
if (file.startsWith("file://")) file =
|
18445
|
+
if (file.startsWith("file://")) file = __require("url").fileURLToPath(file);
|
18577
18446
|
const fileName = file.replace(positionRE, "");
|
18578
18447
|
const match = file.match(positionRE);
|
18579
18448
|
const lineNumber = match && match[1];
|
@@ -18637,7 +18506,7 @@ var require_launch_editor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
|
|
18637
18506
|
//#endregion
|
18638
18507
|
//#region ../../node_modules/.pnpm/launch-editor-middleware@2.11.1/node_modules/launch-editor-middleware/index.js
|
18639
18508
|
var require_launch_editor_middleware = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor-middleware@2.11.1/node_modules/launch-editor-middleware/index.js": ((exports, module) => {
|
18640
|
-
const path$5 =
|
18509
|
+
const path$5 = __require("path");
|
18641
18510
|
const launch = require_launch_editor();
|
18642
18511
|
module.exports = (specifiedEditor, srcRoot, onErrorCallback) => {
|
18643
18512
|
if (typeof specifiedEditor === "function") {
|
@@ -19350,18 +19219,18 @@ function walk$1(root, { onIdentifier, onImportMeta, onDynamicImport, onStatement
|
|
19350
19219
|
function isInScope(name, parents) {
|
19351
19220
|
return parents.some((node) => scopeMap.get(node)?.has(name));
|
19352
19221
|
}
|
19353
|
-
function handlePattern(p
|
19354
|
-
if (p
|
19355
|
-
else if (p
|
19356
|
-
else if (p
|
19222
|
+
function handlePattern(p, parentScope) {
|
19223
|
+
if (p.type === "Identifier") setScope(parentScope, p.name);
|
19224
|
+
else if (p.type === "RestElement") handlePattern(p.argument, parentScope);
|
19225
|
+
else if (p.type === "ObjectPattern") p.properties.forEach((property) => {
|
19357
19226
|
if (property.type === "RestElement") setScope(parentScope, property.argument.name);
|
19358
19227
|
else handlePattern(property.value, parentScope);
|
19359
19228
|
});
|
19360
|
-
else if (p
|
19229
|
+
else if (p.type === "ArrayPattern") p.elements.forEach((element) => {
|
19361
19230
|
if (element) handlePattern(element, parentScope);
|
19362
19231
|
});
|
19363
|
-
else if (p
|
19364
|
-
else setScope(parentScope, p
|
19232
|
+
else if (p.type === "AssignmentPattern") handlePattern(p.left, parentScope);
|
19233
|
+
else setScope(parentScope, p.name);
|
19365
19234
|
}
|
19366
19235
|
walk(root, {
|
19367
19236
|
enter(node, parent) {
|
@@ -19380,12 +19249,12 @@ function walk$1(root, { onIdentifier, onImportMeta, onDynamicImport, onStatement
|
|
19380
19249
|
if (parentScope) setScope(parentScope, node.id.name);
|
19381
19250
|
}
|
19382
19251
|
if (node.type === "FunctionExpression" && node.id) setScope(node, node.id.name);
|
19383
|
-
node.params.forEach((p
|
19384
|
-
if (p
|
19385
|
-
handlePattern(p
|
19252
|
+
node.params.forEach((p) => {
|
19253
|
+
if (p.type === "ObjectPattern" || p.type === "ArrayPattern") {
|
19254
|
+
handlePattern(p, node);
|
19386
19255
|
return;
|
19387
19256
|
}
|
19388
|
-
walk(p
|
19257
|
+
walk(p.type === "AssignmentPattern" ? p.left : p, { enter(child, parent$1) {
|
19389
19258
|
if (parent$1?.type === "AssignmentPattern" && parent$1.right === child) return this.skip();
|
19390
19259
|
if (child.type !== "Identifier") return;
|
19391
19260
|
if (isStaticPropertyKey(child, parent$1)) return;
|
@@ -19885,15 +19754,15 @@ var open_default = open;
|
|
19885
19754
|
var require_windows = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js": ((exports, module) => {
|
19886
19755
|
module.exports = isexe$3;
|
19887
19756
|
isexe$3.sync = sync$2;
|
19888
|
-
var fs$4 =
|
19757
|
+
var fs$4 = __require("fs");
|
19889
19758
|
function checkPathExt(path$13, options$1) {
|
19890
19759
|
var pathext = options$1.pathExt !== void 0 ? options$1.pathExt : process.env.PATHEXT;
|
19891
19760
|
if (!pathext) return true;
|
19892
19761
|
pathext = pathext.split(";");
|
19893
19762
|
if (pathext.indexOf("") !== -1) return true;
|
19894
19763
|
for (var i$1 = 0; i$1 < pathext.length; i$1++) {
|
19895
|
-
var p
|
19896
|
-
if (p
|
19764
|
+
var p = pathext[i$1].toLowerCase();
|
19765
|
+
if (p && path$13.substr(-p.length).toLowerCase() === p) return true;
|
19897
19766
|
}
|
19898
19767
|
return false;
|
19899
19768
|
}
|
@@ -19916,7 +19785,7 @@ var require_windows = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ise
|
|
19916
19785
|
var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js": ((exports, module) => {
|
19917
19786
|
module.exports = isexe$2;
|
19918
19787
|
isexe$2.sync = sync$1;
|
19919
|
-
var fs$3 =
|
19788
|
+
var fs$3 = __require("fs");
|
19920
19789
|
function isexe$2(path$13, options$1, cb) {
|
19921
19790
|
fs$3.stat(path$13, function(er, stat$4) {
|
19922
19791
|
cb(er, er ? false : checkStat(stat$4, options$1));
|
@@ -19946,7 +19815,7 @@ var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@
|
|
19946
19815
|
//#endregion
|
19947
19816
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
19948
19817
|
var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js": ((exports, module) => {
|
19949
|
-
|
19818
|
+
__require("fs");
|
19950
19819
|
var core;
|
19951
19820
|
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
19952
19821
|
else core = require_mode();
|
@@ -19990,7 +19859,7 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
|
|
19990
19859
|
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
19991
19860
|
var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js": ((exports, module) => {
|
19992
19861
|
const isWindows$1 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
19993
|
-
const path$4 =
|
19862
|
+
const path$4 = __require("path");
|
19994
19863
|
const COLON = isWindows$1 ? ";" : ":";
|
19995
19864
|
const isexe = require_isexe();
|
19996
19865
|
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
@@ -20021,16 +19890,16 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
20021
19890
|
const ppRaw = pathEnv[i$1];
|
20022
19891
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
20023
19892
|
const pCmd = path$4.join(pathPart, cmd);
|
20024
|
-
const p
|
20025
|
-
resolve$4(subStep(p
|
19893
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
19894
|
+
resolve$4(subStep(p, i$1, 0));
|
20026
19895
|
});
|
20027
|
-
const subStep = (p
|
19896
|
+
const subStep = (p, i$1, ii) => new Promise((resolve$4, reject) => {
|
20028
19897
|
if (ii === pathExt.length) return resolve$4(step(i$1 + 1));
|
20029
19898
|
const ext = pathExt[ii];
|
20030
|
-
isexe(p
|
20031
|
-
if (!er && is) if (opt.all) found$1.push(p
|
20032
|
-
else return resolve$4(p
|
20033
|
-
return resolve$4(subStep(p
|
19899
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
19900
|
+
if (!er && is) if (opt.all) found$1.push(p + ext);
|
19901
|
+
else return resolve$4(p + ext);
|
19902
|
+
return resolve$4(subStep(p, i$1, ii + 1));
|
20034
19903
|
});
|
20035
19904
|
});
|
20036
19905
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
@@ -20043,9 +19912,9 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
|
|
20043
19912
|
const ppRaw = pathEnv[i$1];
|
20044
19913
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
20045
19914
|
const pCmd = path$4.join(pathPart, cmd);
|
20046
|
-
const p
|
19915
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
20047
19916
|
for (let j = 0; j < pathExt.length; j++) {
|
20048
|
-
const cur = p
|
19917
|
+
const cur = p + pathExt[j];
|
20049
19918
|
try {
|
20050
19919
|
const is = isexe.sync(cur, { pathExt: pathExtExe });
|
20051
19920
|
if (is) if (opt.all) found$1.push(cur);
|
@@ -20077,11 +19946,11 @@ var require_path_key = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pa
|
|
20077
19946
|
//#endregion
|
20078
19947
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
20079
19948
|
var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js": ((exports, module) => {
|
20080
|
-
const path$3 =
|
19949
|
+
const path$3 = __require("path");
|
20081
19950
|
const which = require_which();
|
20082
19951
|
const getPathKey = require_path_key();
|
20083
19952
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
20084
|
-
const env$
|
19953
|
+
const env$1 = parsed.options.env || process.env;
|
20085
19954
|
const cwd = process.cwd();
|
20086
19955
|
const hasCustomCwd = parsed.options.cwd != null;
|
20087
19956
|
const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
@@ -20091,7 +19960,7 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
|
|
20091
19960
|
let resolved;
|
20092
19961
|
try {
|
20093
19962
|
resolved = which.sync(parsed.command, {
|
20094
|
-
path: env$
|
19963
|
+
path: env$1[getPathKey({ env: env$1 })],
|
20095
19964
|
pathExt: withoutPathExt ? path$3.delimiter : void 0
|
20096
19965
|
});
|
20097
19966
|
} catch (e$1) {} finally {
|
@@ -20150,7 +20019,7 @@ var require_shebang_command = /* @__PURE__ */ __commonJS({ "../../node_modules/.
|
|
20150
20019
|
//#endregion
|
20151
20020
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
20152
20021
|
var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js": ((exports, module) => {
|
20153
|
-
const fs$2 =
|
20022
|
+
const fs$2 = __require("fs");
|
20154
20023
|
const shebangCommand = require_shebang_command();
|
20155
20024
|
function readShebang$1(command) {
|
20156
20025
|
const size = 150;
|
@@ -20169,7 +20038,7 @@ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
20169
20038
|
//#endregion
|
20170
20039
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
20171
20040
|
var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js": ((exports, module) => {
|
20172
|
-
const path$2 =
|
20041
|
+
const path$2 = __require("path");
|
20173
20042
|
const resolveCommand = require_resolveCommand();
|
20174
20043
|
const escape$1 = require_escape();
|
20175
20044
|
const readShebang = require_readShebang();
|
@@ -20272,7 +20141,7 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
|
|
20272
20141
|
//#endregion
|
20273
20142
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
|
20274
20143
|
var require_cross_spawn = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js": ((exports, module) => {
|
20275
|
-
const cp =
|
20144
|
+
const cp = __require("child_process");
|
20276
20145
|
const parse$5 = require_parse();
|
20277
20146
|
const enoent = require_enoent();
|
20278
20147
|
function spawn$1(command, args, options$1) {
|
@@ -20635,7 +20504,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
20635
20504
|
};
|
20636
20505
|
/* istanbul ignore else */
|
20637
20506
|
if (!process.env.WS_NO_BUFFER_UTIL) try {
|
20638
|
-
const bufferUtil$1 =
|
20507
|
+
const bufferUtil$1 = __require("bufferutil");
|
20639
20508
|
module.exports.mask = function(source, mask, output, offset$1, length) {
|
20640
20509
|
if (length < 48) _mask(source, mask, output, offset$1, length);
|
20641
20510
|
else bufferUtil$1.mask(source, mask, output, offset$1, length);
|
@@ -20702,7 +20571,7 @@ var require_limiter = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@
|
|
20702
20571
|
//#endregion
|
20703
20572
|
//#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/permessage-deflate.js
|
20704
20573
|
var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/permessage-deflate.js": ((exports, module) => {
|
20705
|
-
const zlib$1 =
|
20574
|
+
const zlib$1 = __require("zlib");
|
20706
20575
|
const bufferUtil = require_buffer_util();
|
20707
20576
|
const Limiter = require_limiter();
|
20708
20577
|
const { kStatusCode: kStatusCode$2 } = require_constants$1();
|
@@ -21039,7 +20908,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
|
|
21039
20908
|
//#endregion
|
21040
20909
|
//#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/validation.js
|
21041
20910
|
var require_validation = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/validation.js": ((exports, module) => {
|
21042
|
-
const { isUtf8 } =
|
20911
|
+
const { isUtf8 } = __require("buffer");
|
21043
20912
|
const { hasBlob } = require_constants$1();
|
21044
20913
|
const tokenChars$2 = [
|
21045
20914
|
0,
|
@@ -21226,7 +21095,7 @@ var require_validation = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
21226
21095
|
return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
|
21227
21096
|
};
|
21228
21097
|
else if (!process.env.WS_NO_UTF_8_VALIDATE) try {
|
21229
|
-
const isValidUTF8$1 =
|
21098
|
+
const isValidUTF8$1 = __require("utf-8-validate");
|
21230
21099
|
module.exports.isValidUTF8 = function(buf) {
|
21231
21100
|
return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8$1(buf);
|
21232
21101
|
};
|
@@ -21236,7 +21105,7 @@ var require_validation = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
21236
21105
|
//#endregion
|
21237
21106
|
//#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/receiver.js
|
21238
21107
|
var require_receiver = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/receiver.js": ((exports, module) => {
|
21239
|
-
const { Writable: Writable$1 } =
|
21108
|
+
const { Writable: Writable$1 } = __require("stream");
|
21240
21109
|
const PerMessageDeflate$3 = require_permessage_deflate();
|
21241
21110
|
const { BINARY_TYPES: BINARY_TYPES$1, EMPTY_BUFFER: EMPTY_BUFFER$2, kStatusCode: kStatusCode$1, kWebSocket: kWebSocket$3 } = require_constants$1();
|
21242
21111
|
const { concat, toArrayBuffer, unmask } = require_buffer_util();
|
@@ -21702,8 +21571,8 @@ var require_receiver = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws
|
|
21702
21571
|
//#endregion
|
21703
21572
|
//#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/sender.js
|
21704
21573
|
var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/sender.js": ((exports, module) => {
|
21705
|
-
const { Duplex: Duplex$3 } =
|
21706
|
-
const { randomFillSync } =
|
21574
|
+
const { Duplex: Duplex$3 } = __require("stream");
|
21575
|
+
const { randomFillSync } = __require("crypto");
|
21707
21576
|
const PerMessageDeflate$2 = require_permessage_deflate();
|
21708
21577
|
const { EMPTY_BUFFER: EMPTY_BUFFER$1, kWebSocket: kWebSocket$2, NOOP: NOOP$2 } = require_constants$1();
|
21709
21578
|
const { isBlob: isBlob$1, isValidStatusCode } = require_validation();
|
@@ -22563,14 +22432,14 @@ var require_extension = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/w
|
|
22563
22432
|
//#endregion
|
22564
22433
|
//#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket.js
|
22565
22434
|
var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket.js": ((exports, module) => {
|
22566
|
-
const EventEmitter$2 =
|
22567
|
-
const https$4 =
|
22568
|
-
const http$5 =
|
22569
|
-
const net$1 =
|
22570
|
-
const tls =
|
22571
|
-
const { randomBytes, createHash: createHash$1 } =
|
22572
|
-
const { Duplex: Duplex$2, Readable } =
|
22573
|
-
const { URL: URL$3 } =
|
22435
|
+
const EventEmitter$2 = __require("events");
|
22436
|
+
const https$4 = __require("https");
|
22437
|
+
const http$5 = __require("http");
|
22438
|
+
const net$1 = __require("net");
|
22439
|
+
const tls = __require("tls");
|
22440
|
+
const { randomBytes, createHash: createHash$1 } = __require("crypto");
|
22441
|
+
const { Duplex: Duplex$2, Readable } = __require("stream");
|
22442
|
+
const { URL: URL$3 } = __require("url");
|
22574
22443
|
const PerMessageDeflate$1 = require_permessage_deflate();
|
22575
22444
|
const Receiver$1 = require_receiver();
|
22576
22445
|
const Sender$1 = require_sender();
|
@@ -23537,7 +23406,7 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/w
|
|
23537
23406
|
//#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/stream.js
|
23538
23407
|
var require_stream = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/stream.js": ((exports, module) => {
|
23539
23408
|
require_websocket();
|
23540
|
-
const { Duplex: Duplex$1 } =
|
23409
|
+
const { Duplex: Duplex$1 } = __require("stream");
|
23541
23410
|
/**
|
23542
23411
|
* Emits the `'close'` event on a stream.
|
23543
23412
|
*
|
@@ -23693,10 +23562,10 @@ var require_subprotocol = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
23693
23562
|
//#endregion
|
23694
23563
|
//#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket-server.js
|
23695
23564
|
var require_websocket_server = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket-server.js": ((exports, module) => {
|
23696
|
-
const EventEmitter$1 =
|
23697
|
-
const http$4 =
|
23698
|
-
const { Duplex } =
|
23699
|
-
const { createHash } =
|
23565
|
+
const EventEmitter$1 = __require("events");
|
23566
|
+
const http$4 = __require("http");
|
23567
|
+
const { Duplex } = __require("stream");
|
23568
|
+
const { createHash } = __require("crypto");
|
23700
23569
|
const extension = require_extension();
|
23701
23570
|
const PerMessageDeflate = require_permessage_deflate();
|
23702
23571
|
const subprotocol = require_subprotocol();
|
@@ -24420,7 +24289,7 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http
|
|
24420
24289
|
exports.urlJoin = urlJoin;
|
24421
24290
|
exports.rewriteCookieProperty = rewriteCookieProperty;
|
24422
24291
|
exports.toURL = toURL;
|
24423
|
-
const tls_1 =
|
24292
|
+
const tls_1 = __require("tls");
|
24424
24293
|
const upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i;
|
24425
24294
|
exports.isSSL = /^https|wss/;
|
24426
24295
|
const HEADER_BLACKLIST = "trailer";
|
@@ -24673,12 +24542,12 @@ var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follo
|
|
24673
24542
|
//#endregion
|
24674
24543
|
//#region ../../node_modules/.pnpm/follow-redirects@1.15.9_debug@4.4.1/node_modules/follow-redirects/index.js
|
24675
24544
|
var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.9_debug@4.4.1/node_modules/follow-redirects/index.js": ((exports, module) => {
|
24676
|
-
var url =
|
24545
|
+
var url = __require("url");
|
24677
24546
|
var URL$2 = url.URL;
|
24678
|
-
var http$3 =
|
24679
|
-
var https$3 =
|
24680
|
-
var Writable =
|
24681
|
-
var assert$1 =
|
24547
|
+
var http$3 = __require("http");
|
24548
|
+
var https$3 = __require("https");
|
24549
|
+
var Writable = __require("stream").Writable;
|
24550
|
+
var assert$1 = __require("assert");
|
24682
24551
|
var debug$6 = require_debug();
|
24683
24552
|
// istanbul ignore next
|
24684
24553
|
(function detectUnsupportedEnvironment() {
|
@@ -25153,8 +25022,8 @@ var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
|
|
25153
25022
|
exports.timeout = timeout;
|
25154
25023
|
exports.XHeaders = XHeaders$1;
|
25155
25024
|
exports.stream = stream$1;
|
25156
|
-
const http$2 = __importStar$2(
|
25157
|
-
const https$2 = __importStar$2(
|
25025
|
+
const http$2 = __importStar$2(__require("http"));
|
25026
|
+
const https$2 = __importStar$2(__require("https"));
|
25158
25027
|
const web_outgoing_1 = require_web_outgoing();
|
25159
25028
|
const common$1 = __importStar$2(require_common());
|
25160
25029
|
const followRedirects = __importStar$2(require_follow_redirects());
|
@@ -25302,8 +25171,8 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
25302
25171
|
exports.checkMethodAndHeader = checkMethodAndHeader;
|
25303
25172
|
exports.XHeaders = XHeaders;
|
25304
25173
|
exports.stream = stream;
|
25305
|
-
const http$1 = __importStar$1(
|
25306
|
-
const https$1 = __importStar$1(
|
25174
|
+
const http$1 = __importStar$1(__require("http"));
|
25175
|
+
const https$1 = __importStar$1(__require("https"));
|
25307
25176
|
const common = __importStar$1(require_common());
|
25308
25177
|
const debug_1$1 = __importDefault$1(require_node$1());
|
25309
25178
|
const log$1 = (0, debug_1$1.default)("http-proxy-3:ws-incoming");
|
@@ -25357,7 +25226,7 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
25357
25226
|
const proxySockets = [];
|
25358
25227
|
socketCounter({ add: socket });
|
25359
25228
|
const cleanUpProxySockets = () => {
|
25360
|
-
for (const p
|
25229
|
+
for (const p of proxySockets) p.end();
|
25361
25230
|
};
|
25362
25231
|
socket.on("close", () => {
|
25363
25232
|
socketCounter({ rm: socket });
|
@@ -25465,11 +25334,11 @@ var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
|
|
25465
25334
|
};
|
25466
25335
|
Object.defineProperty(exports, "__esModule", { value: true });
|
25467
25336
|
exports.ProxyServer = void 0;
|
25468
|
-
const http = __importStar(
|
25469
|
-
const https = __importStar(
|
25337
|
+
const http = __importStar(__require("http"));
|
25338
|
+
const https = __importStar(__require("https"));
|
25470
25339
|
const web_incoming_1 = require_web_incoming();
|
25471
25340
|
const ws_incoming_1$1 = require_ws_incoming();
|
25472
|
-
const events_1 =
|
25341
|
+
const events_1 = __require("events");
|
25473
25342
|
const debug_1 = __importDefault(require_node$1());
|
25474
25343
|
const common_1 = require_common();
|
25475
25344
|
const log = (0, debug_1.default)("http-proxy-3");
|
@@ -25838,8 +25707,8 @@ var require_etag = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/etag@1
|
|
25838
25707
|
* Module dependencies.
|
25839
25708
|
* @private
|
25840
25709
|
*/
|
25841
|
-
var crypto$1 =
|
25842
|
-
var Stats =
|
25710
|
+
var crypto$1 = __require("crypto");
|
25711
|
+
var Stats = __require("fs").Stats;
|
25843
25712
|
/**
|
25844
25713
|
* Module variables.
|
25845
25714
|
* @private
|
@@ -26742,7 +26611,7 @@ function traverseNodes(node, visitor) {
|
|
26742
26611
|
if (nodeIsElement(node) || node.nodeName === "#document" || node.nodeName === "#document-fragment") node.childNodes.forEach((childNode) => traverseNodes(childNode, visitor));
|
26743
26612
|
}
|
26744
26613
|
async function traverseHtml(html, filePath, warn, visitor) {
|
26745
|
-
const { parse: parse$17 } = await import("./dep-
|
26614
|
+
const { parse: parse$17 } = await import("./dep-UEPspf5j.js");
|
26746
26615
|
const warnings = {};
|
26747
26616
|
const ast = parse$17(html, {
|
26748
26617
|
scriptingEnabled: false,
|
@@ -26760,16 +26629,16 @@ function getScriptInfo(node) {
|
|
26760
26629
|
let isModule = false;
|
26761
26630
|
let isAsync = false;
|
26762
26631
|
let isIgnored = false;
|
26763
|
-
for (const p
|
26764
|
-
if (p
|
26765
|
-
if (p
|
26632
|
+
for (const p of node.attrs) {
|
26633
|
+
if (p.prefix !== void 0) continue;
|
26634
|
+
if (p.name === "src") {
|
26766
26635
|
if (!src) {
|
26767
|
-
src = p
|
26636
|
+
src = p;
|
26768
26637
|
srcSourceCodeLocation = node.sourceCodeLocation?.attrs["src"];
|
26769
26638
|
}
|
26770
|
-
} else if (p
|
26771
|
-
else if (p
|
26772
|
-
else if (p
|
26639
|
+
} else if (p.name === "type" && p.value === "module") isModule = true;
|
26640
|
+
else if (p.name === "async") isAsync = true;
|
26641
|
+
else if (p.name === "vite-ignore") isIgnored = true;
|
26773
26642
|
}
|
26774
26643
|
return {
|
26775
26644
|
src,
|
@@ -26819,7 +26688,7 @@ function handleParseError(parserError, html, filePath, warnings) {
|
|
26819
26688
|
case "unexpected-question-mark-instead-of-tag-name": return;
|
26820
26689
|
}
|
26821
26690
|
const parseError = formatParseError(parserError, filePath, html);
|
26822
|
-
warnings[parseError.code] ??= `Unable to parse HTML; ${parseError.message}\n at ${parseError.loc.file}:${parseError.loc.line}:${parseError.loc.column}\n
|
26691
|
+
warnings[parseError.code] ??= `Unable to parse HTML; ${parseError.message}\n at ${parseError.loc.file}:${parseError.loc.line}:${parseError.loc.column}\n` + parseError.frame;
|
26823
26692
|
}
|
26824
26693
|
/**
|
26825
26694
|
* Compiles index.html into an entry js module
|
@@ -27227,20 +27096,20 @@ function injectCspNonceMetaTagHook(config$2) {
|
|
27227
27096
|
function htmlEnvHook(config$2) {
|
27228
27097
|
const pattern = /%(\S+?)%/g;
|
27229
27098
|
const envPrefix = resolveEnvPrefix({ envPrefix: config$2.envPrefix });
|
27230
|
-
const env$
|
27099
|
+
const env$1 = { ...config$2.env };
|
27231
27100
|
for (const key in config$2.define) if (key.startsWith(`import.meta.env.`)) {
|
27232
27101
|
const val = config$2.define[key];
|
27233
27102
|
if (typeof val === "string") try {
|
27234
27103
|
const parsed = JSON.parse(val);
|
27235
|
-
env$
|
27104
|
+
env$1[key.slice(16)] = typeof parsed === "string" ? parsed : val;
|
27236
27105
|
} catch {
|
27237
|
-
env$
|
27106
|
+
env$1[key.slice(16)] = val;
|
27238
27107
|
}
|
27239
|
-
else env$
|
27108
|
+
else env$1[key.slice(16)] = JSON.stringify(val);
|
27240
27109
|
}
|
27241
27110
|
return (html, ctx) => {
|
27242
27111
|
return html.replace(pattern, (text, key) => {
|
27243
|
-
if (key in env$
|
27112
|
+
if (key in env$1) return env$1[key];
|
27244
27113
|
else {
|
27245
27114
|
if (envPrefix.some((prefix) => key.startsWith(prefix))) {
|
27246
27115
|
const relativeHtml = normalizePath(path.relative(config$2.root, ctx.filename));
|
@@ -27521,7 +27390,7 @@ function transformMiddleware(server) {
|
|
27521
27390
|
}
|
27522
27391
|
}
|
27523
27392
|
const result = await environment.transformRequest(url$3, { allowId(id) {
|
27524
|
-
return id
|
27393
|
+
return id[0] === "\0" || !isServerAccessDeniedForTransform(server.config, id);
|
27525
27394
|
} });
|
27526
27395
|
if (result) {
|
27527
27396
|
const depsOptimizer = environment.depsOptimizer;
|
@@ -28416,8 +28285,8 @@ async function _createServer(inlineConfig = {}, options$1) {
|
|
28416
28285
|
warnFutureDeprecation(config$2, "removeServerPluginContainer");
|
28417
28286
|
return pluginContainer;
|
28418
28287
|
},
|
28419
|
-
set pluginContainer(p
|
28420
|
-
pluginContainer = p
|
28288
|
+
set pluginContainer(p) {
|
28289
|
+
pluginContainer = p;
|
28421
28290
|
},
|
28422
28291
|
get moduleGraph() {
|
28423
28292
|
warnFutureDeprecation(config$2, "removeServerModuleGraph");
|
@@ -29547,7 +29416,7 @@ async function bundleWorkerEntry(config$2, id) {
|
|
29547
29416
|
const bundle = await rollup({
|
29548
29417
|
...rollupOptions,
|
29549
29418
|
input,
|
29550
|
-
plugins: workerEnvironment.plugins.map((p
|
29419
|
+
plugins: workerEnvironment.plugins.map((p) => injectEnvironmentToHooks(workerEnvironment, p)),
|
29551
29420
|
onLog(level, log$4) {
|
29552
29421
|
onRollupLog(level, log$4, workerEnvironment);
|
29553
29422
|
},
|
@@ -29952,13 +29821,13 @@ function importAnalysisPlugin(config$2) {
|
|
29952
29821
|
const userDefineEnv = {};
|
29953
29822
|
for (const key in config$2.env) importMetaEnvKeys[key] = JSON.stringify(config$2.env[key]);
|
29954
29823
|
for (const key in config$2.define) if (key.startsWith("import.meta.env.")) userDefineEnv[key.slice(16)] = config$2.define[key];
|
29955
|
-
const env$
|
29824
|
+
const env$1 = `import.meta.env = ${serializeDefine({
|
29956
29825
|
...importMetaEnvKeys,
|
29957
29826
|
SSR: "__vite_ssr__",
|
29958
29827
|
...userDefineEnv
|
29959
29828
|
})};`;
|
29960
|
-
_ssrEnv = env$
|
29961
|
-
_env = env$
|
29829
|
+
_ssrEnv = env$1.replace("__vite_ssr__", "true");
|
29830
|
+
_env = env$1.replace("__vite_ssr__", "false");
|
29962
29831
|
}
|
29963
29832
|
return ssr ? _ssrEnv : _env;
|
29964
29833
|
}
|
@@ -30022,16 +29891,7 @@ function importAnalysisPlugin(config$2) {
|
|
30022
29891
|
return this.error(`Failed to resolve import "${url$3}" from "${normalizePath(path.relative(process.cwd(), importerFile))}". Does the file exist?`, pos);
|
30023
29892
|
}
|
30024
29893
|
if (isExternalUrl(resolved.id)) return [resolved.id, resolved.id];
|
30025
|
-
const isRelative$1 = url$3[0] === ".";
|
30026
|
-
const isSelfImport = !isRelative$1 && cleanUrl(url$3) === cleanUrl(importer);
|
30027
29894
|
url$3 = normalizeResolvedIdToUrl(environment, url$3, resolved);
|
30028
|
-
if (environment.config.consumer === "client") {
|
30029
|
-
if (isExplicitImportRequired(url$3)) url$3 = injectQuery(url$3, "import");
|
30030
|
-
else if ((isRelative$1 || isSelfImport) && !DEP_VERSION_RE.test(url$3)) {
|
30031
|
-
const versionMatch = DEP_VERSION_RE.exec(importer);
|
30032
|
-
if (versionMatch) url$3 = injectQuery(url$3, versionMatch[1]);
|
30033
|
-
}
|
30034
|
-
}
|
30035
29895
|
try {
|
30036
29896
|
const depModule = await moduleGraph._ensureEntryFromUrl(unwrapId(url$3), canSkipImportAnalysis(url$3) || forceSkipImportAnalysis, resolved);
|
30037
29897
|
if (environment.config.consumer === "client" && depModule.lastHMRTimestamp > 0) url$3 = injectQuery(url$3, `t=${depModule.lastHMRTimestamp}`);
|
@@ -30039,6 +29899,15 @@ function importAnalysisPlugin(config$2) {
|
|
30039
29899
|
e$1.pos = pos;
|
30040
29900
|
throw e$1;
|
30041
29901
|
}
|
29902
|
+
if (environment.config.consumer === "client") {
|
29903
|
+
const isRelative$1 = url$3[0] === ".";
|
29904
|
+
const isSelfImport = !isRelative$1 && cleanUrl(url$3) === cleanUrl(importer);
|
29905
|
+
if (isExplicitImportRequired(url$3)) url$3 = injectQuery(url$3, "import");
|
29906
|
+
else if ((isRelative$1 || isSelfImport) && !DEP_VERSION_RE.test(url$3)) {
|
29907
|
+
const versionMatch = DEP_VERSION_RE.exec(importer);
|
29908
|
+
if (versionMatch) url$3 = injectQuery(url$3, versionMatch[1]);
|
29909
|
+
}
|
29910
|
+
}
|
30042
29911
|
if (!ssr) url$3 = joinUrlSegments(base, url$3);
|
30043
29912
|
return [url$3, resolved.id];
|
30044
29913
|
};
|
@@ -30592,7 +30461,7 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
30592
30461
|
transform: {
|
30593
30462
|
filter: {
|
30594
30463
|
id: { exclude: [exactRegex(preloadHelperId), exactRegex(CLIENT_ENTRY)] },
|
30595
|
-
code: /new\s+URL.+import\.meta\.url/
|
30464
|
+
code: /new\s+URL.+import\.meta\.url/s
|
30596
30465
|
},
|
30597
30466
|
async handler(code, id) {
|
30598
30467
|
let s$2;
|
@@ -30613,7 +30482,7 @@ function assetImportMetaUrlPlugin(config$2) {
|
|
30613
30482
|
const templateLiteral = ast.body[0].expression;
|
30614
30483
|
if (templateLiteral.expressions.length) {
|
30615
30484
|
const pattern = buildGlobPattern(templateLiteral);
|
30616
|
-
if (pattern
|
30485
|
+
if (pattern[0] === "*") continue;
|
30617
30486
|
const globOptions = {
|
30618
30487
|
eager: true,
|
30619
30488
|
import: "default",
|
@@ -30935,8 +30804,8 @@ function normalizeFilter(filter$1) {
|
|
30935
30804
|
function createIdFilter(filter$1, cwd = process.cwd()) {
|
30936
30805
|
if (!filter$1) return;
|
30937
30806
|
const { exclude, include } = normalizeFilter(filter$1);
|
30938
|
-
const excludeFilter = exclude?.map((p
|
30939
|
-
const includeFilter = include?.map((p
|
30807
|
+
const excludeFilter = exclude?.map((p) => patternToIdFilter(p, cwd));
|
30808
|
+
const includeFilter = include?.map((p) => patternToIdFilter(p, cwd));
|
30940
30809
|
return createFilter$1(excludeFilter, includeFilter);
|
30941
30810
|
}
|
30942
30811
|
function createCodeFilter(filter$1) {
|
@@ -30964,7 +30833,7 @@ function createFilterForTransform(idFilter, codeFilter, cwd) {
|
|
30964
30833
|
async function resolvePlugins(config$2, prePlugins, normalPlugins, postPlugins) {
|
30965
30834
|
const isBuild = config$2.command === "build";
|
30966
30835
|
const isWorker = config$2.isWorker;
|
30967
|
-
const buildPlugins = isBuild ? await (await import("./dep-
|
30836
|
+
const buildPlugins = isBuild ? await (await import("./dep-TDFDwW_9.js")).resolveBuildPlugins(config$2) : {
|
30968
30837
|
pre: [],
|
30969
30838
|
post: []
|
30970
30839
|
};
|
@@ -31025,7 +30894,7 @@ function createPluginHookUtils(plugins$1) {
|
|
31025
30894
|
}
|
31026
30895
|
function getSortedPluginHooks(hookName) {
|
31027
30896
|
const plugins$2 = getSortedPlugins(hookName);
|
31028
|
-
return plugins$2.map((p
|
30897
|
+
return plugins$2.map((p) => getHookHandler(p[hookName])).filter(Boolean);
|
31029
30898
|
}
|
31030
30899
|
return {
|
31031
30900
|
getSortedPlugins,
|
@@ -32063,10 +31932,10 @@ function cssPostPlugin(config$2) {
|
|
32063
31932
|
},
|
32064
31933
|
async renderChunk(code, chunk, opts, meta) {
|
32065
31934
|
let chunkCSS;
|
32066
|
-
const renderedModules = new Proxy({}, { get(_target, p
|
31935
|
+
const renderedModules = new Proxy({}, { get(_target, p) {
|
32067
31936
|
for (const name in meta.chunks) {
|
32068
31937
|
const modules = meta.chunks[name].modules;
|
32069
|
-
const module$1 = modules[p
|
31938
|
+
const module$1 = modules[p];
|
32070
31939
|
if (module$1) return module$1;
|
32071
31940
|
}
|
32072
31941
|
} });
|
@@ -32569,8 +32438,8 @@ function createCachedImport(imp) {
|
|
32569
32438
|
return cached;
|
32570
32439
|
};
|
32571
32440
|
}
|
32572
|
-
const importPostcssImport = createCachedImport(() => import("./dep-
|
32573
|
-
const importPostcssModules = createCachedImport(() => import("./dep-
|
32441
|
+
const importPostcssImport = createCachedImport(() => import("./dep-C9NktISv.js").then(__toDynamicImportESM(1)));
|
32442
|
+
const importPostcssModules = createCachedImport(() => import("./dep-XdVlHtXy.js").then(__toDynamicImportESM(1)));
|
32574
32443
|
const importPostcss = createCachedImport(() => import("postcss"));
|
32575
32444
|
const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
|
32576
32445
|
let alwaysFakeWorkerWorkerControllerCache;
|
@@ -33035,9 +32904,8 @@ const makeLessWorker = (environment, resolvers, maxWorkers) => {
|
|
33035
32904
|
contents: "contents" in result ? result.contents : void 0
|
33036
32905
|
};
|
33037
32906
|
};
|
33038
|
-
const worker = new WorkerWithFallback(() => {
|
33039
|
-
const fsp$1 =
|
33040
|
-
const path$13 = require("node:path");
|
32907
|
+
const worker = new WorkerWithFallback(async () => {
|
32908
|
+
const [fsp$1, path$13] = await Promise.all([import("node:fs/promises"), import("node:path")]);
|
33041
32909
|
let ViteLessManager;
|
33042
32910
|
const createViteLessPlugin = (less, rootFile) => {
|
33043
32911
|
const { FileManager } = less;
|
@@ -33053,13 +32921,13 @@ const makeLessWorker = (environment, resolvers, maxWorkers) => {
|
|
33053
32921
|
supportsSync() {
|
33054
32922
|
return false;
|
33055
32923
|
}
|
33056
|
-
async loadFile(filename, dir, opts, env$
|
32924
|
+
async loadFile(filename, dir, opts, env$1) {
|
33057
32925
|
const result = await viteLessResolve(filename, dir, this.rootFile, opts.mime);
|
33058
32926
|
if (result) return {
|
33059
32927
|
filename: path$13.resolve(result.resolved),
|
33060
32928
|
contents: result.contents ?? await fsp$1.readFile(result.resolved, "utf-8")
|
33061
32929
|
};
|
33062
|
-
else return super.loadFile(filename, dir, opts, env$
|
32930
|
+
else return super.loadFile(filename, dir, opts, env$1);
|
33063
32931
|
}
|
33064
32932
|
};
|
33065
32933
|
return {
|
@@ -33074,7 +32942,7 @@ const makeLessWorker = (environment, resolvers, maxWorkers) => {
|
|
33074
32942
|
};
|
33075
32943
|
};
|
33076
32944
|
return async (lessPath, content, options$1) => {
|
33077
|
-
const nodeLess =
|
32945
|
+
const nodeLess = (await import(lessPath)).default;
|
33078
32946
|
const viteResolverPlugin = createViteLessPlugin(nodeLess, options$1.filename);
|
33079
32947
|
const result = await nodeLess.render(content, {
|
33080
32948
|
paths: ["node_modules"],
|
@@ -33103,7 +32971,7 @@ const lessProcessor = (maxWorkers) => {
|
|
33103
32971
|
worker?.stop();
|
33104
32972
|
},
|
33105
32973
|
async process(environment, source, root, options$1, resolvers) {
|
33106
|
-
const lessPath = loadPreprocessorPath(PreprocessLang.less, root);
|
32974
|
+
const lessPath = pathToFileURL(loadPreprocessorPath(PreprocessLang.less, root)).href;
|
33107
32975
|
worker ??= makeLessWorker(environment, resolvers, maxWorkers);
|
33108
32976
|
const { content, map: additionalMap } = await getSource(source, options$1.filename, options$1.additionalData, options$1.enableSourcemap);
|
33109
32977
|
let result;
|
@@ -33141,7 +33009,7 @@ const lessProcessor = (maxWorkers) => {
|
|
33141
33009
|
const makeStylWorker = (maxWorkers) => {
|
33142
33010
|
const worker = new WorkerWithFallback(() => {
|
33143
33011
|
return async (stylusPath, content, root, options$1) => {
|
33144
|
-
const nodeStylus =
|
33012
|
+
const nodeStylus = (await import(stylusPath)).default;
|
33145
33013
|
const ref = nodeStylus(content, {
|
33146
33014
|
paths: ["node_modules"],
|
33147
33015
|
...options$1
|
@@ -33173,7 +33041,7 @@ const stylProcessor = (maxWorkers) => {
|
|
33173
33041
|
worker?.stop();
|
33174
33042
|
},
|
33175
33043
|
async process(_environment, source, root, options$1, _resolvers) {
|
33176
|
-
const stylusPath = loadPreprocessorPath(PreprocessLang.stylus, root);
|
33044
|
+
const stylusPath = pathToFileURL(loadPreprocessorPath(PreprocessLang.stylus, root)).href;
|
33177
33045
|
worker ??= makeStylWorker(maxWorkers);
|
33178
33046
|
const { content, map: additionalMap } = await getSource(source, options$1.filename, options$1.additionalData, options$1.enableSourcemap, "\n");
|
33179
33047
|
const importsDeps = (options$1.imports ?? []).map((dep) => path.resolve(dep));
|
@@ -33205,7 +33073,7 @@ const stylProcessor = (maxWorkers) => {
|
|
33205
33073
|
function formatStylusSourceMap(mapBefore, root) {
|
33206
33074
|
if (!mapBefore) return void 0;
|
33207
33075
|
const map$1 = { ...mapBefore };
|
33208
|
-
const resolveFromRoot = (p
|
33076
|
+
const resolveFromRoot = (p) => normalizePath(path.resolve(root, p));
|
33209
33077
|
if (map$1.file) map$1.file = resolveFromRoot(map$1.file);
|
33210
33078
|
map$1.sources = map$1.sources.map(resolveFromRoot);
|
33211
33079
|
return map$1;
|
@@ -33553,7 +33421,7 @@ function preload(baseModule, deps, importerUrl) {
|
|
33553
33421
|
const cspNonceMeta = document.querySelector("meta[property=csp-nonce]");
|
33554
33422
|
const cspNonce = cspNonceMeta?.nonce || cspNonceMeta?.getAttribute("nonce");
|
33555
33423
|
function allSettled(promises$2) {
|
33556
|
-
return Promise.all(promises$2.map((p
|
33424
|
+
return Promise.all(promises$2.map((p) => Promise.resolve(p).then((value$1) => ({
|
33557
33425
|
status: "fulfilled",
|
33558
33426
|
value: value$1
|
33559
33427
|
}), (reason) => ({
|
@@ -34174,7 +34042,7 @@ function resolveRollupOptions(environment) {
|
|
34174
34042
|
const libOptions = options$1.lib;
|
34175
34043
|
const { logger } = environment;
|
34176
34044
|
const ssr = environment.config.consumer === "server";
|
34177
|
-
const resolve$4 = (p
|
34045
|
+
const resolve$4 = (p) => path.resolve(root, p);
|
34178
34046
|
const input = libOptions ? options$1.rollupOptions.input || (typeof libOptions.entry === "string" ? resolve$4(libOptions.entry) : Array.isArray(libOptions.entry) ? libOptions.entry.map(resolve$4) : Object.fromEntries(Object.entries(libOptions.entry).map(([alias$2, file]) => [alias$2, resolve$4(file)]))) : typeof options$1.ssr === "string" ? resolve$4(options$1.ssr) : options$1.rollupOptions.input || resolve$4("index.html");
|
34179
34047
|
if (ssr && typeof input === "string" && input.endsWith(".html")) throw new Error("rollupOptions.input should not be an html file when building for SSR. Please specify a dedicated SSR entry.");
|
34180
34048
|
if (options$1.cssCodeSplit === false) {
|
@@ -34182,7 +34050,7 @@ function resolveRollupOptions(environment) {
|
|
34182
34050
|
if (inputs.some((input$1) => input$1.endsWith(".css"))) throw new Error(`When "build.cssCodeSplit: false" is set, "rollupOptions.input" should not include CSS files.`);
|
34183
34051
|
}
|
34184
34052
|
const outDir = resolve$4(options$1.outDir);
|
34185
|
-
const plugins$1 = environment.plugins.map((p
|
34053
|
+
const plugins$1 = environment.plugins.map((p) => injectEnvironmentToHooks(environment, p));
|
34186
34054
|
const rollupOptions = {
|
34187
34055
|
preserveEntrySignatures: ssr ? "allow-extension" : libOptions ? "strict" : false,
|
34188
34056
|
cache: options$1.watch ? void 0 : false,
|
@@ -34620,8 +34488,8 @@ async function createBuilder(inlineConfig = {}, useLegacyBuilder = false) {
|
|
34620
34488
|
watchMode: false
|
34621
34489
|
}, config$2.logger);
|
34622
34490
|
let configBuilderBuildAppCalled = false;
|
34623
|
-
for (const p
|
34624
|
-
const hook = p
|
34491
|
+
for (const p of config$2.getSortedPlugins("buildApp")) {
|
34492
|
+
const hook = p.buildApp;
|
34625
34493
|
if (!configBuilderBuildAppCalled && typeof hook === "object" && hook.order === "post") {
|
34626
34494
|
configBuilderBuildAppCalled = true;
|
34627
34495
|
await configBuilder.buildApp(builder);
|
@@ -35732,10 +35600,10 @@ function build_default$1({ threshold = 1024, level = -1, brotli = false, gzip: g
|
|
35732
35600
|
compress.on("data", (chunk) => write.call(res, chunk) || compress.pause());
|
35733
35601
|
on.call(res, "drain", () => compress.resume());
|
35734
35602
|
compress.on("end", () => end.call(res));
|
35735
|
-
listeners.forEach((p
|
35603
|
+
listeners.forEach((p) => compress.on.apply(compress, p));
|
35736
35604
|
} else {
|
35737
35605
|
pendingListeners = null;
|
35738
|
-
listeners.forEach((p
|
35606
|
+
listeners.forEach((p) => on.apply(res, p));
|
35739
35607
|
}
|
35740
35608
|
writeHead.call(res, pendingStatus || res.statusCode);
|
35741
35609
|
}
|
@@ -36160,14 +36028,14 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
36160
36028
|
}
|
36161
36029
|
mode = inlineConfig.mode || config$2.mode || mode;
|
36162
36030
|
configEnv.mode = mode;
|
36163
|
-
const filterPlugin = (p
|
36164
|
-
if (!p
|
36165
|
-
else if (!p
|
36166
|
-
else if (typeof p
|
36031
|
+
const filterPlugin = (p) => {
|
36032
|
+
if (!p) return false;
|
36033
|
+
else if (!p.apply) return true;
|
36034
|
+
else if (typeof p.apply === "function") return p.apply({
|
36167
36035
|
...config$2,
|
36168
36036
|
mode
|
36169
36037
|
}, configEnv);
|
36170
|
-
else return p
|
36038
|
+
else return p.apply === command;
|
36171
36039
|
};
|
36172
36040
|
const rawPlugins = (await asyncFlatten(config$2.plugins || [])).filter(filterPlugin);
|
36173
36041
|
const [prePlugins, normalPlugins, postPlugins] = sortUserPlugins(rawPlugins);
|
@@ -36421,7 +36289,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
36421
36289
|
if (resolved.environments.ssr) resolved.environments.ssr.build.emitAssets = resolved.build.ssrEmitAssets || resolved.build.emitAssets;
|
36422
36290
|
debug?.(`using resolved config: %O`, {
|
36423
36291
|
...resolved,
|
36424
|
-
plugins: resolved.plugins.map((p
|
36292
|
+
plugins: resolved.plugins.map((p) => p.name),
|
36425
36293
|
worker: {
|
36426
36294
|
...resolved.worker,
|
36427
36295
|
plugins: `() => plugins`
|
@@ -36476,10 +36344,10 @@ function sortUserPlugins(plugins$1) {
|
|
36476
36344
|
const prePlugins = [];
|
36477
36345
|
const postPlugins = [];
|
36478
36346
|
const normalPlugins = [];
|
36479
|
-
if (plugins$1) plugins$1.flat().forEach((p
|
36480
|
-
if (p
|
36481
|
-
else if (p
|
36482
|
-
else normalPlugins.push(p
|
36347
|
+
if (plugins$1) plugins$1.flat().forEach((p) => {
|
36348
|
+
if (p.enforce === "pre") prePlugins.push(p);
|
36349
|
+
else if (p.enforce === "post") postPlugins.push(p);
|
36350
|
+
else normalPlugins.push(p);
|
36483
36351
|
});
|
36484
36352
|
return [
|
36485
36353
|
prePlugins,
|
@@ -36680,8 +36548,8 @@ async function runConfigHook(config$2, plugins$1, configEnv) {
|
|
36680
36548
|
customLogger: config$2.customLogger
|
36681
36549
|
});
|
36682
36550
|
const context = new BasicMinimalPluginContext(basePluginContextMeta, tempLogger);
|
36683
|
-
for (const p
|
36684
|
-
const hook = p
|
36551
|
+
for (const p of getSortedPluginsByHook("config", plugins$1)) {
|
36552
|
+
const hook = p.config;
|
36685
36553
|
const handler = getHookHandler(hook);
|
36686
36554
|
const res = await handler.call(context, conf, configEnv);
|
36687
36555
|
if (res && res !== conf) conf = mergeConfig(conf, res);
|
@@ -36691,8 +36559,8 @@ async function runConfigHook(config$2, plugins$1, configEnv) {
|
|
36691
36559
|
async function runConfigEnvironmentHook(environments, plugins$1, logger, configEnv, isSsrTargetWebworkerSet) {
|
36692
36560
|
const context = new BasicMinimalPluginContext(basePluginContextMeta, logger);
|
36693
36561
|
const environmentNames = Object.keys(environments);
|
36694
|
-
for (const p
|
36695
|
-
const hook = p
|
36562
|
+
for (const p of getSortedPluginsByHook("configEnvironment", plugins$1)) {
|
36563
|
+
const hook = p.configEnvironment;
|
36696
36564
|
const handler = getHookHandler(hook);
|
36697
36565
|
for (const name of environmentNames) {
|
36698
36566
|
const res = await handler.call(context, name, environments[name], {
|
@@ -36725,4 +36593,4 @@ function optimizeDepsDisabledBackwardCompatibility(resolved, optimizeDeps$1, opt
|
|
36725
36593
|
}
|
36726
36594
|
|
36727
36595
|
//#endregion
|
36728
|
-
export { BuildEnvironment, DevEnvironment, _createServer, addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, build$1 as build, buildEnvironmentOptionsDefaults, buildErrorMessage, builderOptionsDefaults, cleanupDepsCacheStaleDirs, createBuilder, createFilter, createIdResolver, createIsOptimizedDepFile, createIsOptimizedDepUrl,
|
36596
|
+
export { BuildEnvironment, DevEnvironment, _createServer, addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, build$1 as build, buildEnvironmentOptionsDefaults, buildErrorMessage, builderOptionsDefaults, cleanupDepsCacheStaleDirs, configDefaults, createBuilder, createFilter, createIdResolver, createIsOptimizedDepFile, createIsOptimizedDepUrl, createRunnableDevEnvironment, createServer$2 as createServer, createServerCloseFn, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, createToImportMetaURLBasedRelativeRuntime, defineConfig, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, fetchModule, formatPostcssSourceMap, getDefaultEnvironmentOptions, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, injectEnvironmentToHooks, isCSSRequest, isDepOptimizationDisabled, isFileLoadingAllowed, isFileServingAllowed, isResolvedConfig, isRunnableDevEnvironment, loadCachedDepOptimizationMetadata, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, onRollupLog, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveBaseUrl, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveConfig, resolveDevEnvironmentOptions, resolveEnvPrefix, resolveLibFilename, resolvePreviewOptions, resolveServerOptions, resolveUserExternal, restartServerWithUrls, rollupVersion, runOptimizeDeps, runnerImport, searchForWorkspaceRoot, send, serverConfigDefaults, sortUserPlugins, ssrTransform, toDiscoveredDependencies, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime, transformWithEsbuild };
|