vite 8.1.4 → 8.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +35 -0
- package/dist/client/bundledDevClient.mjs +1455 -0
- package/dist/client/client.mjs +52 -83
- package/dist/node/chunks/build.js +64 -27
- package/dist/node/chunks/moduleRunnerTransport.d.ts +25 -26
- package/dist/node/chunks/node.js +1145 -337
- package/dist/node/chunks/postcss-import.js +10 -10
- package/dist/node/index.d.ts +1334 -1294
- package/dist/node/module-runner.d.ts +76 -77
- package/dist/node/module-runner.js +18 -14
- package/package.json +14 -14
- package/types/customEvent.d.ts +1 -1
- package/types/hmrPayload.d.ts +20 -6
package/dist/node/chunks/node.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Module, builtinModules, createRequire } from "node:module";
|
|
2
2
|
import { parseAst, parseAstAsync } from "rolldown/parseAst";
|
|
3
3
|
import { esmExternalRequirePlugin, esmExternalRequirePlugin as esmExternalRequirePlugin$1 } from "rolldown/plugins";
|
|
4
|
-
import { TsconfigCache, Visitor, minify, minifySync, parse, parseSync, transformSync } from "rolldown/utils";
|
|
4
|
+
import { TsconfigCache, Visitor, minify, minifySync, parse, parseSync, parseSync as parseSync$1, transformSync } from "rolldown/utils";
|
|
5
5
|
import * as fs$2 from "node:fs";
|
|
6
6
|
import fs, { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
import path, { basename, dirname, extname, isAbsolute, join, normalize, posix, relative, resolve, sep } from "node:path";
|
|
@@ -13,6 +13,7 @@ import crypto from "node:crypto";
|
|
|
13
13
|
import pm from "picomatch";
|
|
14
14
|
import { MessageChannel, Worker } from "node:worker_threads";
|
|
15
15
|
import { VERSION as rolldownVersion, rolldown } from "rolldown";
|
|
16
|
+
import { escapePath, glob, globSync, isDynamicPattern } from "tinyglobby";
|
|
16
17
|
import os from "node:os";
|
|
17
18
|
import net from "node:net";
|
|
18
19
|
import childProcess, { exec, execFile, execSync } from "node:child_process";
|
|
@@ -23,7 +24,6 @@ import { exactRegex, makeIdFiltersToMatchWithQuery, prefixRegex, withFilter } fr
|
|
|
23
24
|
import { dev, oxcRuntimePlugin, resolveTsconfig, scan, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteDynamicImportVarsPlugin, viteImportGlobPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWebWorkerPostPlugin } from "rolldown/experimental";
|
|
24
25
|
import readline from "node:readline";
|
|
25
26
|
import isModuleSyncConditionEnabled from "#module-sync-enabled";
|
|
26
|
-
import { escapePath, glob, globSync, isDynamicPattern } from "tinyglobby";
|
|
27
27
|
import assert from "node:assert";
|
|
28
28
|
import process$1 from "node:process";
|
|
29
29
|
import v8 from "node:v8";
|
|
@@ -188,7 +188,9 @@ function getEnvs(query, options) {
|
|
|
188
188
|
//#endregion
|
|
189
189
|
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
190
190
|
var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
191
|
-
let p = process || {}
|
|
191
|
+
let p = process || {};
|
|
192
|
+
let argv = p.argv || [];
|
|
193
|
+
let env = p.env || {};
|
|
192
194
|
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
193
195
|
let formatter = (open, close, replace = open) => (input) => {
|
|
194
196
|
let string = "" + input, index = string.indexOf(close, open.length);
|
|
@@ -632,6 +634,7 @@ const CLIENT_PUBLIC_PATH = `/@vite/client`;
|
|
|
632
634
|
const ENV_PUBLIC_PATH = `/@vite/env`;
|
|
633
635
|
const VITE_PACKAGE_DIR = resolve(fileURLToPath(new URL("../../../src/node/constants.ts", import.meta.url)), "../../..");
|
|
634
636
|
const CLIENT_ENTRY = resolve(VITE_PACKAGE_DIR, "dist/client/client.mjs");
|
|
637
|
+
const BUNDLED_DEV_CLIENT_ENTRY = resolve(VITE_PACKAGE_DIR, "dist/client/bundledDevClient.mjs");
|
|
635
638
|
const ENV_ENTRY = resolve(VITE_PACKAGE_DIR, "dist/client/env.mjs");
|
|
636
639
|
const CLIENT_DIR = path.dirname(CLIENT_ENTRY);
|
|
637
640
|
const KNOWN_ASSET_TYPES = [
|
|
@@ -1601,11 +1604,11 @@ function getDate() {
|
|
|
1601
1604
|
function init$1(debug) {
|
|
1602
1605
|
debug.inspectOpts = Object.assign({}, inspectOpts);
|
|
1603
1606
|
}
|
|
1604
|
-
var require$1, colors$
|
|
1607
|
+
var require$1, colors$40, inspectOpts, humanize$1, createDebug, node_default;
|
|
1605
1608
|
var init_node = __esmMin((() => {
|
|
1606
1609
|
init_core();
|
|
1607
1610
|
require$1 = createRequire(import.meta.url);
|
|
1608
|
-
colors$
|
|
1611
|
+
colors$40 = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2 ? [
|
|
1609
1612
|
20,
|
|
1610
1613
|
21,
|
|
1611
1614
|
26,
|
|
@@ -1707,7 +1710,7 @@ var init_node = __esmMin((() => {
|
|
|
1707
1710
|
} catch (_unused) {
|
|
1708
1711
|
humanize$1 = humanize;
|
|
1709
1712
|
}
|
|
1710
|
-
createDebug = setup(useColors(), colors$
|
|
1713
|
+
createDebug = setup(useColors(), colors$40, log, load, save, formatArgs, init$1);
|
|
1711
1714
|
createDebug.inspectOpts = inspectOpts;
|
|
1712
1715
|
createDebug.formatters.o = function(v) {
|
|
1713
1716
|
this.inspectOpts.colors = this.useColors;
|
|
@@ -2285,12 +2288,30 @@ function lookupFile(dir, fileNames) {
|
|
|
2285
2288
|
function isFilePathESM(filePath, packageCache) {
|
|
2286
2289
|
if (/\.m[jt]s$/.test(filePath)) return true;
|
|
2287
2290
|
else if (/\.c[jt]s$/.test(filePath)) return false;
|
|
2291
|
+
else if (filePath.startsWith("\0")) return true;
|
|
2292
|
+
else if (!path.isAbsolute(filePath)) return false;
|
|
2288
2293
|
else try {
|
|
2289
2294
|
return findNearestPackageData(path.dirname(filePath), packageCache)?.data.type === "module";
|
|
2290
2295
|
} catch {
|
|
2291
2296
|
return false;
|
|
2292
2297
|
}
|
|
2293
2298
|
}
|
|
2299
|
+
/**
|
|
2300
|
+
* Whether the file's module format is explicitly determined as ESM or CJS by
|
|
2301
|
+
* its extension or the nearest `package.json` `"type"` field, as opposed to
|
|
2302
|
+
* being ambiguous.
|
|
2303
|
+
*/
|
|
2304
|
+
function isFilePathFormatExplicit(filePath, packageCache) {
|
|
2305
|
+
if (/\.[mc][jt]s$/.test(filePath)) return true;
|
|
2306
|
+
if (filePath.startsWith("\0")) return true;
|
|
2307
|
+
if (!path.isAbsolute(filePath)) return false;
|
|
2308
|
+
try {
|
|
2309
|
+
const pkg = findNearestPackageData(path.dirname(filePath), packageCache);
|
|
2310
|
+
return pkg?.data.type === "module" || pkg?.data.type === "commonjs";
|
|
2311
|
+
} catch {
|
|
2312
|
+
return false;
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2294
2315
|
const splitRE = /\r?\n/g;
|
|
2295
2316
|
const range = 2;
|
|
2296
2317
|
function pad(source, n = 2) {
|
|
@@ -2616,10 +2637,12 @@ function resolveServerUrls(server, options, hostname, httpsOptions, config) {
|
|
|
2616
2637
|
const isAddressInfo = (x) => x?.address;
|
|
2617
2638
|
if (!isAddressInfo(address)) return {
|
|
2618
2639
|
local: [],
|
|
2619
|
-
network: []
|
|
2640
|
+
network: [],
|
|
2641
|
+
networkInterfaceNames: []
|
|
2620
2642
|
};
|
|
2621
2643
|
const local = [];
|
|
2622
2644
|
const network = [];
|
|
2645
|
+
const networkInterfaceNames = [];
|
|
2623
2646
|
const protocol = options.https ? "https" : "http";
|
|
2624
2647
|
const port = address.port;
|
|
2625
2648
|
const base = config.rawBase === "./" || config.rawBase === "" ? "/" : config.rawBase;
|
|
@@ -2628,13 +2651,21 @@ function resolveServerUrls(server, options, hostname, httpsOptions, config) {
|
|
|
2628
2651
|
if (hostnameName.includes(":")) hostnameName = `[${hostnameName}]`;
|
|
2629
2652
|
const address = `${protocol}://${hostnameName}:${port}${base}`;
|
|
2630
2653
|
if (loopbackHosts.has(hostname.host)) local.push(address);
|
|
2631
|
-
else
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2654
|
+
else {
|
|
2655
|
+
network.push(address);
|
|
2656
|
+
networkInterfaceNames.push(void 0);
|
|
2657
|
+
}
|
|
2658
|
+
} else Object.entries(os.networkInterfaces()).forEach(([name, nInterface]) => {
|
|
2659
|
+
(nInterface ?? []).filter((detail) => detail.address && detail.family === "IPv4").forEach((detail) => {
|
|
2660
|
+
let host = detail.address.replace("127.0.0.1", hostname.name);
|
|
2661
|
+
if (host.includes(":")) host = `[${host}]`;
|
|
2662
|
+
const url = `${protocol}://${host}:${port}${base}`;
|
|
2663
|
+
if (detail.address.includes("127.0.0.1")) local.push(url);
|
|
2664
|
+
else {
|
|
2665
|
+
network.push(url);
|
|
2666
|
+
networkInterfaceNames.push(name);
|
|
2667
|
+
}
|
|
2668
|
+
});
|
|
2638
2669
|
});
|
|
2639
2670
|
const hostnamesFromCert = extractHostnamesFromCerts(httpsOptions?.cert);
|
|
2640
2671
|
if (hostnamesFromCert.length > 0) {
|
|
@@ -2643,7 +2674,8 @@ function resolveServerUrls(server, options, hostname, httpsOptions, config) {
|
|
|
2643
2674
|
}
|
|
2644
2675
|
return {
|
|
2645
2676
|
local,
|
|
2646
|
-
network
|
|
2677
|
+
network,
|
|
2678
|
+
networkInterfaceNames
|
|
2647
2679
|
};
|
|
2648
2680
|
}
|
|
2649
2681
|
function extractHostnamesFromSubjectAltName(subjectAltName) {
|
|
@@ -2835,7 +2867,10 @@ function mergeConfigRecursively(defaults, overrides, rootPath) {
|
|
|
2835
2867
|
else merged[key] = value;
|
|
2836
2868
|
continue;
|
|
2837
2869
|
}
|
|
2838
|
-
if (key === "
|
|
2870
|
+
if (key === "input" && rootPath === "") {
|
|
2871
|
+
merged[key] = mergeInput(existing, value);
|
|
2872
|
+
continue;
|
|
2873
|
+
} else if (key === "alias" && (rootPath === "resolve" || rootPath === "")) {
|
|
2839
2874
|
merged[key] = mergeAlias(existing, value);
|
|
2840
2875
|
continue;
|
|
2841
2876
|
} else if (key === "assetsInclude" && rootPath === "") {
|
|
@@ -2867,6 +2902,26 @@ function mergeConfig(defaults, overrides, isRoot = true) {
|
|
|
2867
2902
|
if (typeof defaults === "function" || typeof overrides === "function") throw new Error(`Cannot merge config in form of callback`);
|
|
2868
2903
|
return mergeConfigRecursively(defaults, overrides, isRoot ? "" : ".");
|
|
2869
2904
|
}
|
|
2905
|
+
function mergeInput(a, b) {
|
|
2906
|
+
if (!a) return b;
|
|
2907
|
+
if (!b) return a;
|
|
2908
|
+
if (typeof a === "string" && typeof b === "string") return [a, b];
|
|
2909
|
+
if (Array.isArray(a) && (typeof b === "string" || Array.isArray(b))) return [...a, ...Array.isArray(b) ? b : [b]];
|
|
2910
|
+
if (Array.isArray(b) && (typeof a === "string" || Array.isArray(a))) return [...Array.isArray(a) ? a : [a], ...b];
|
|
2911
|
+
if (typeof a !== "string" && !Array.isArray(a)) return {
|
|
2912
|
+
...a,
|
|
2913
|
+
...normalizeToInputObject(b)
|
|
2914
|
+
};
|
|
2915
|
+
return {
|
|
2916
|
+
...normalizeToInputObject(a),
|
|
2917
|
+
...b
|
|
2918
|
+
};
|
|
2919
|
+
}
|
|
2920
|
+
function normalizeToInputObject(input) {
|
|
2921
|
+
if (typeof input === "string") return { [path.basename(input, path.extname(input))]: input };
|
|
2922
|
+
if (Array.isArray(input)) return Object.fromEntries(input.map((i) => [path.basename(i, path.extname(i)), i]));
|
|
2923
|
+
return input;
|
|
2924
|
+
}
|
|
2870
2925
|
function mergeAlias(a, b) {
|
|
2871
2926
|
if (!a) return b;
|
|
2872
2927
|
if (!b) return a;
|
|
@@ -3221,10 +3276,20 @@ function createLogger(level = "info", options = {}) {
|
|
|
3221
3276
|
};
|
|
3222
3277
|
return logger;
|
|
3223
3278
|
}
|
|
3279
|
+
const maxNetworkInterfaceNameLength = 20;
|
|
3224
3280
|
function printServerUrls(urls, optionsHost, info) {
|
|
3225
3281
|
const colorUrl = (url) => import_picocolors.default.cyan(url.replace(/:(\d+)\//, (_, port) => `:${import_picocolors.default.bold(port)}/`));
|
|
3226
3282
|
for (const url of urls.local) info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Local")}: ${colorUrl(url)}`);
|
|
3227
|
-
|
|
3283
|
+
const networkUrlMaxLength = Math.max(...urls.network.map((url) => url.length), 0);
|
|
3284
|
+
urls.network.forEach((url, index) => {
|
|
3285
|
+
const interfaceName = urls.networkInterfaceNames?.[index];
|
|
3286
|
+
let suffix = "";
|
|
3287
|
+
if (interfaceName) {
|
|
3288
|
+
const label = interfaceName.length > maxNetworkInterfaceNameLength ? `${interfaceName.slice(0, maxNetworkInterfaceNameLength - 1)}…` : interfaceName;
|
|
3289
|
+
suffix = " ".repeat(networkUrlMaxLength - url.length + 2) + import_picocolors.default.dim(label);
|
|
3290
|
+
}
|
|
3291
|
+
info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Network")}: ${colorUrl(url)}${suffix}`);
|
|
3292
|
+
});
|
|
3228
3293
|
if (urls.network.length === 0 && optionsHost === void 0) info(import_picocolors.default.dim(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Network")}: use `) + import_picocolors.default.bold("--host") + import_picocolors.default.dim(" to expose"));
|
|
3229
3294
|
}
|
|
3230
3295
|
//#endregion
|
|
@@ -3867,41 +3932,41 @@ function f(e, r, t) {
|
|
|
3867
3932
|
return A[A.Static = 1] = "Static", A[A.Dynamic = 2] = "Dynamic", A[A.ImportMeta = 3] = "ImportMeta", A[A.StaticSourcePhase = 4] = "StaticSourcePhase", A[A.DynamicSourcePhase = 5] = "DynamicSourcePhase", A[A.StaticDeferPhase = 6] = "StaticDeferPhase", A[A.DynamicDeferPhase = 7] = "DynamicDeferPhase", A;
|
|
3868
3933
|
})({});
|
|
3869
3934
|
const A = 1 === new Uint8Array(new Uint16Array([1]).buffer)[0];
|
|
3870
|
-
function parse$2(
|
|
3871
|
-
if (!E) return init.then(() => parse$2(
|
|
3872
|
-
const I =
|
|
3935
|
+
function parse$2(C, g = "@") {
|
|
3936
|
+
if (!E) return init.then(() => parse$2(C));
|
|
3937
|
+
const I = C.length + 1, w = (E.__heap_base.value || E.__heap_base) + 4 * I - E.memory.buffer.byteLength;
|
|
3873
3938
|
w > 0 && E.memory.grow(Math.ceil(w / 65536));
|
|
3874
|
-
const
|
|
3875
|
-
if ((A ? B : Q)(
|
|
3876
|
-
const
|
|
3939
|
+
const o = E.sa(I - 1);
|
|
3940
|
+
if ("undefined" != typeof Buffer ? Buffer.from(E.memory.buffer, o, 2 * (I - 1)).write(C, "utf16le") : (A ? B : Q)(C, new Uint16Array(E.memory.buffer, o, I)), !E.parse()) throw Object.assign(/* @__PURE__ */ new Error(`Parse error ${g}:${C.slice(0, E.e()).split("\n").length}:${E.e() - C.lastIndexOf("\n", E.e() - 1)}`), { idx: E.e() });
|
|
3941
|
+
const D = [], i = [];
|
|
3877
3942
|
for (; E.ri();) {
|
|
3878
|
-
const A = E.is(), Q = E.ie(), B = E.it(),
|
|
3943
|
+
const A = E.is(), Q = E.ie(), B = E.it(), g = E.ai(), I = E.id(), w = E.ss(), o = E.se();
|
|
3879
3944
|
let i;
|
|
3880
|
-
E.ip() && (i = G(
|
|
3881
|
-
let
|
|
3882
|
-
for (
|
|
3883
|
-
const A = E.aks(), Q = E.ake(), B = E.avs(),
|
|
3884
|
-
|
|
3945
|
+
E.ip() && (i = G(C.slice(-1 === I ? A - 1 : A, -1 === I ? Q + 1 : Q)));
|
|
3946
|
+
let s = null;
|
|
3947
|
+
for (s = [], E.rsa(); E.ra();) {
|
|
3948
|
+
const A = E.aks(), Q = E.ake(), B = E.avs(), g = E.ave();
|
|
3949
|
+
s.push([J(C.slice(A, Q)), J(C.slice(B, g))]);
|
|
3885
3950
|
}
|
|
3886
|
-
0 ===
|
|
3951
|
+
0 === s.length && (s = null), D.push({
|
|
3887
3952
|
n: i,
|
|
3888
3953
|
t: B,
|
|
3889
3954
|
s: A,
|
|
3890
3955
|
e: Q,
|
|
3891
3956
|
ss: w,
|
|
3892
|
-
se:
|
|
3957
|
+
se: o,
|
|
3893
3958
|
d: I,
|
|
3894
|
-
a:
|
|
3895
|
-
at:
|
|
3959
|
+
a: g,
|
|
3960
|
+
at: s
|
|
3896
3961
|
});
|
|
3897
3962
|
}
|
|
3898
3963
|
for (; E.re();) {
|
|
3899
|
-
const A = E.es(), Q = E.ee(), B = E.els(),
|
|
3964
|
+
const A = E.es(), Q = E.ee(), B = E.els(), g = E.ele(), I = B < 0 ? void 0 : J(C.slice(B, g)), w = J(C.slice(A, Q));
|
|
3900
3965
|
i.push({
|
|
3901
3966
|
s: A,
|
|
3902
3967
|
e: Q,
|
|
3903
3968
|
ls: B,
|
|
3904
|
-
le:
|
|
3969
|
+
le: g,
|
|
3905
3970
|
ss: E.ess(),
|
|
3906
3971
|
n: w,
|
|
3907
3972
|
ln: I
|
|
@@ -3918,7 +3983,7 @@ function parse$2(g, C = "@") {
|
|
|
3918
3983
|
return ("\"" === Q || "'" === Q) && G(A) || A;
|
|
3919
3984
|
}
|
|
3920
3985
|
return [
|
|
3921
|
-
|
|
3986
|
+
D,
|
|
3922
3987
|
i,
|
|
3923
3988
|
!!E.f(),
|
|
3924
3989
|
!!E.ms()
|
|
@@ -3938,11 +4003,11 @@ function B(A, Q) {
|
|
|
3938
4003
|
for (; E < B;) Q[E] = A.charCodeAt(E++);
|
|
3939
4004
|
}
|
|
3940
4005
|
let E;
|
|
3941
|
-
const
|
|
3942
|
-
return A = "AGFzbQEAAAABKwhgAAF/YAF/AX9gAABgAn9/AX9gBH9/f38AYAN/f38Bf2ABfwB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mo2AgBBARAlIgNBIkYgA0EnRnJFBEAMAgtBmAooAgAhCCADECZB7AkgAUEUaiIDNgIAQZgKKAIAIQkgAUEANgIQIAEgCDYCCCABIAA2AgQgASAHNgIAIAEgCUECaiIANgIMAkAgAkUEQCAFIAE2AiAMAQsgAiABNgIQC0GYCiAANgIAAkBBARAlIgBBLEcEQCAAQf0ARg0BDAMLQZgKQZgKKAIAQQJqIgA2AgAgASECDAELCyAFIAY2AhAgBUGYCigCAEECajYCDA8LQZgKIAQ2AgALLQEBfwJAIAAvAQBBLkcNACAAQQJrLwEAQS5HDQAgAEEEay8BAEEuRiEBCyABCzUBAX8CQCAAQaCLBEkNACAALwEAIAFHDQAgAEGgiwRGBEBBAQ8LIABBAmsvAQAQLSECCyACCykBAX8gAEGgAUYgAEEJayICQRdNQQBBASACdCABcRtyRQRAQQAPC0EBCwvJAQEAQYIIC8EBeABwAG8AcgB0AG0AcABvAHIAdABlAHQAYQBvAHUAcgBjAGUAcgBvAG0AdQBuAGMAdABpAG8AbgB2AG8AeQBpAGUAZABlAGwAZQBjAG8AbgB0AGkAbgBpAG4AcwB0AGEAbgB0AHkAYgByAGUAYQByAGUAdAB1AHIAZABlAGIAdQBnAGcAZQBhAHcAYQBpAHQAaAByAHcAaABpAGwAZQBmAG8AcgBpAGYAYwBhAHQAYwBmAGkAbgBhAGwAbABlAGwAcw==", "undefined" != typeof Buffer ? Buffer.from(A, "base64") : Uint8Array.from(atob(A), (A) => A.charCodeAt(0));
|
|
4006
|
+
const C = () => {
|
|
4007
|
+
return A = "AGFzbQEAAAABKwhgAAF/YAF/AX9gAABgAn9/AX9gBH9/f38AYAN/f38Bf2ABfwBgA39/fwADPj0CAgEEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgABBQICAgYBAQYBAQEFAQEBAQECAgIBAQEDAQEHAQMDBAUBcAECAgUHAQGCAoCAAgYPAn8BQaCLBAt/AEGgiwQLB80BHgZtZW1vcnkCAAJzYQACAWUABQJpcwAGAmll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gADYCBCABIAc2AgAgASAJQQJqIgA2AgwCQCACRQRAIAUgATYCIAwBCyACIAE2AhALQZgKIAA2AgACQEEBECUiAEEsRwRAIABB/QBGDQEMAwtBmApBmAooAgBBAmoiADYCACABIQIMAQsLIAUgBjYCECAFQZgKKAIAQQJqNgIMDwtBmAogBDYCAAstAQF/AkAgAC8BAEEuRw0AIABBAmsvAQBBLkcNACAAQQRrLwEAQS5GIQELIAELNQEBfwJAIABBoIsESQ0AIAAvAQAgAUcNACAAQaCLBEYEQEEBDwsgAEECay8BABAtIQILIAILKQEBfyAAQaABRiAAQQlrIgJBF01BAEEBIAJ0IAFxG3JFBEBBAA8LQQELC8cBAQBBgggLvwF4AHAAbwByAHQAZQB0AGEAbwB1AHIAYwBlAHIAbwBtAHUAbgBjAHQAaQBvAG4AbABhAHMAcwB2AG8AeQBpAGUAZABlAGwAZQBjAG8AbgB0AGkAbgBpAG4AcwB0AGEAbgB0AHkAYgByAGUAYQByAGUAdAB1AHIAZABlAGIAdQBnAGcAZQBhAHcAYQBpAHQAaAByAHcAaABpAGwAZQBmAG8AcgBpAGYAYwBhAHQAYwBmAGkAbgBhAGwAbABlAGwAcw==", "undefined" != typeof Buffer ? Buffer.from(A, "base64") : Uint8Array.from(atob(A), (A) => A.charCodeAt(0));
|
|
3943
4008
|
var A;
|
|
3944
4009
|
};
|
|
3945
|
-
const init = WebAssembly.compile(
|
|
4010
|
+
const init = WebAssembly.compile(C()).then(WebAssembly.instantiate).then(({ exports: A }) => {
|
|
3946
4011
|
E = A;
|
|
3947
4012
|
});
|
|
3948
4013
|
//#endregion
|
|
@@ -4132,7 +4197,7 @@ function warnDeprecatedShouldBeConvertedToPluginOptions(logger, name) {
|
|
|
4132
4197
|
logger.warn(import_picocolors.default.yellow(`\`esbuild.${name}\` option was specified. But this option is deprecated and will be removed in future versions. This option can be achieved by using a plugin with transform hook, please use that instead.`));
|
|
4133
4198
|
}
|
|
4134
4199
|
//#endregion
|
|
4135
|
-
//#region ../../node_modules/.pnpm/magic-string@0.
|
|
4200
|
+
//#region ../../node_modules/.pnpm/magic-string@1.0.0/node_modules/magic-string/dist/index.mjs
|
|
4136
4201
|
var BitSet = class BitSet {
|
|
4137
4202
|
constructor(arg) {
|
|
4138
4203
|
this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
|
|
@@ -4176,14 +4241,16 @@ var Chunk = class Chunk {
|
|
|
4176
4241
|
return this.start < index && index < this.end;
|
|
4177
4242
|
}
|
|
4178
4243
|
eachNext(fn) {
|
|
4179
|
-
|
|
4244
|
+
fn(this);
|
|
4245
|
+
let chunk = this.next;
|
|
4180
4246
|
while (chunk) {
|
|
4181
4247
|
fn(chunk);
|
|
4182
4248
|
chunk = chunk.next;
|
|
4183
4249
|
}
|
|
4184
4250
|
}
|
|
4185
4251
|
eachPrevious(fn) {
|
|
4186
|
-
|
|
4252
|
+
fn(this);
|
|
4253
|
+
let chunk = this.previous;
|
|
4187
4254
|
while (chunk) {
|
|
4188
4255
|
fn(chunk);
|
|
4189
4256
|
chunk = chunk.previous;
|
|
@@ -4272,12 +4339,13 @@ var Chunk = class Chunk {
|
|
|
4272
4339
|
};
|
|
4273
4340
|
function getBtoa() {
|
|
4274
4341
|
if (typeof globalThis !== "undefined" && typeof globalThis.btoa === "function") return (str) => globalThis.btoa(unescape(encodeURIComponent(str)));
|
|
4275
|
-
|
|
4276
|
-
|
|
4342
|
+
const buffer = globalThis["Buffer"];
|
|
4343
|
+
if (buffer) return (str) => buffer.from(str, "utf-8").toString("base64");
|
|
4344
|
+
return () => {
|
|
4277
4345
|
throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
|
|
4278
4346
|
};
|
|
4279
4347
|
}
|
|
4280
|
-
const btoa$1 =
|
|
4348
|
+
const btoa$1 = /* #__PURE__ */ getBtoa();
|
|
4281
4349
|
var SourceMap = class {
|
|
4282
4350
|
constructor(properties) {
|
|
4283
4351
|
this.version = 3;
|
|
@@ -4289,43 +4357,20 @@ var SourceMap = class {
|
|
|
4289
4357
|
if (typeof properties.x_google_ignoreList !== "undefined") this.x_google_ignoreList = properties.x_google_ignoreList;
|
|
4290
4358
|
if (typeof properties.debugId !== "undefined") this.debugId = properties.debugId;
|
|
4291
4359
|
}
|
|
4360
|
+
/**
|
|
4361
|
+
* Returns the equivalent of `JSON.stringify(map)`
|
|
4362
|
+
*/
|
|
4292
4363
|
toString() {
|
|
4293
4364
|
return JSON.stringify(this);
|
|
4294
4365
|
}
|
|
4366
|
+
/**
|
|
4367
|
+
* Returns a DataURI containing the sourcemap. Useful for doing this sort of thing:
|
|
4368
|
+
* `generateMap(options?: SourceMapOptions): SourceMap;`
|
|
4369
|
+
*/
|
|
4295
4370
|
toUrl() {
|
|
4296
|
-
return
|
|
4371
|
+
return `data:application/json;charset=utf-8;base64,${btoa$1(this.toString())}`;
|
|
4297
4372
|
}
|
|
4298
4373
|
};
|
|
4299
|
-
function guessIndent(code) {
|
|
4300
|
-
const lines = code.split("\n");
|
|
4301
|
-
const tabbed = lines.filter((line) => /^\t+/.test(line));
|
|
4302
|
-
const spaced = lines.filter((line) => /^ {2,}/.test(line));
|
|
4303
|
-
if (tabbed.length === 0 && spaced.length === 0) return null;
|
|
4304
|
-
if (tabbed.length >= spaced.length) return " ";
|
|
4305
|
-
const min = spaced.reduce((previous, current) => {
|
|
4306
|
-
const numSpaces = /^ +/.exec(current)[0].length;
|
|
4307
|
-
return Math.min(numSpaces, previous);
|
|
4308
|
-
}, Infinity);
|
|
4309
|
-
return new Array(min + 1).join(" ");
|
|
4310
|
-
}
|
|
4311
|
-
function getRelativePath(from, to) {
|
|
4312
|
-
const fromParts = from.split(/[/\\]/);
|
|
4313
|
-
const toParts = to.split(/[/\\]/);
|
|
4314
|
-
fromParts.pop();
|
|
4315
|
-
while (fromParts[0] === toParts[0]) {
|
|
4316
|
-
fromParts.shift();
|
|
4317
|
-
toParts.shift();
|
|
4318
|
-
}
|
|
4319
|
-
if (fromParts.length) {
|
|
4320
|
-
let i = fromParts.length;
|
|
4321
|
-
while (i--) fromParts[i] = "..";
|
|
4322
|
-
}
|
|
4323
|
-
return fromParts.concat(toParts).join("/");
|
|
4324
|
-
}
|
|
4325
|
-
const toString = Object.prototype.toString;
|
|
4326
|
-
function isObject(thing) {
|
|
4327
|
-
return toString.call(thing) === "[object Object]";
|
|
4328
|
-
}
|
|
4329
4374
|
function getLocator(source) {
|
|
4330
4375
|
const originalLines = source.split("\n");
|
|
4331
4376
|
const lineOffsets = [];
|
|
@@ -4348,6 +4393,36 @@ function getLocator(source) {
|
|
|
4348
4393
|
};
|
|
4349
4394
|
};
|
|
4350
4395
|
}
|
|
4396
|
+
function getRelativePath(from, to) {
|
|
4397
|
+
const fromParts = from.split(/[/\\]/);
|
|
4398
|
+
const toParts = to.split(/[/\\]/);
|
|
4399
|
+
fromParts.pop();
|
|
4400
|
+
while (fromParts[0] === toParts[0]) {
|
|
4401
|
+
fromParts.shift();
|
|
4402
|
+
toParts.shift();
|
|
4403
|
+
}
|
|
4404
|
+
if (fromParts.length) {
|
|
4405
|
+
let i = fromParts.length;
|
|
4406
|
+
while (i--) fromParts[i] = "..";
|
|
4407
|
+
}
|
|
4408
|
+
return fromParts.concat(toParts).join("/");
|
|
4409
|
+
}
|
|
4410
|
+
function guessIndent(code) {
|
|
4411
|
+
const lines = code.split("\n");
|
|
4412
|
+
const tabbed = lines.filter((line) => /^\t+/.test(line));
|
|
4413
|
+
const spaced = lines.filter((line) => /^ {2,}/.test(line));
|
|
4414
|
+
if (tabbed.length === 0 && spaced.length === 0) return null;
|
|
4415
|
+
if (tabbed.length >= spaced.length) return " ";
|
|
4416
|
+
const min = spaced.reduce((previous, current) => {
|
|
4417
|
+
const numSpaces = /^ +/.exec(current)[0].length;
|
|
4418
|
+
return Math.min(numSpaces, previous);
|
|
4419
|
+
}, Infinity);
|
|
4420
|
+
return " ".repeat(min);
|
|
4421
|
+
}
|
|
4422
|
+
const toString = Object.prototype.toString;
|
|
4423
|
+
function isObject(thing) {
|
|
4424
|
+
return toString.call(thing) === "[object Object]";
|
|
4425
|
+
}
|
|
4351
4426
|
const wordRegex = /\w/;
|
|
4352
4427
|
var Mappings = class {
|
|
4353
4428
|
constructor(hires) {
|
|
@@ -4447,6 +4522,8 @@ var Mappings = class {
|
|
|
4447
4522
|
}
|
|
4448
4523
|
};
|
|
4449
4524
|
const n = "\n";
|
|
4525
|
+
const NEWLINE_CHAR = "\n".charCodeAt(0);
|
|
4526
|
+
const CR_CHAR = "\r".charCodeAt(0);
|
|
4450
4527
|
const warned = {
|
|
4451
4528
|
insertLeft: false,
|
|
4452
4529
|
insertRight: false,
|
|
@@ -4520,14 +4597,25 @@ var MagicString = class MagicString {
|
|
|
4520
4597
|
this.byStart[0] = chunk;
|
|
4521
4598
|
this.byEnd[string.length] = chunk;
|
|
4522
4599
|
}
|
|
4600
|
+
/**
|
|
4601
|
+
* Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
|
|
4602
|
+
*/
|
|
4523
4603
|
addSourcemapLocation(char) {
|
|
4524
4604
|
this.sourcemapLocations.add(char);
|
|
4525
4605
|
}
|
|
4606
|
+
/**
|
|
4607
|
+
* Appends the specified content to the end of the string.
|
|
4608
|
+
*/
|
|
4526
4609
|
append(content) {
|
|
4527
4610
|
if (typeof content !== "string") throw new TypeError("outro content must be a string");
|
|
4528
4611
|
this.outro += content;
|
|
4529
4612
|
return this;
|
|
4530
4613
|
}
|
|
4614
|
+
/**
|
|
4615
|
+
* Appends the specified content at the index in the original string.
|
|
4616
|
+
* If a range *ending* with index is subsequently moved, the insert will be moved with it.
|
|
4617
|
+
* See also `s.prependLeft(...)`.
|
|
4618
|
+
*/
|
|
4531
4619
|
appendLeft(index, content) {
|
|
4532
4620
|
index = index + this.offset;
|
|
4533
4621
|
if (typeof content !== "string") throw new TypeError("inserted content must be a string");
|
|
@@ -4537,6 +4625,11 @@ var MagicString = class MagicString {
|
|
|
4537
4625
|
else this.intro += content;
|
|
4538
4626
|
return this;
|
|
4539
4627
|
}
|
|
4628
|
+
/**
|
|
4629
|
+
* Appends the specified content at the index in the original string.
|
|
4630
|
+
* If a range *starting* with index is subsequently moved, the insert will be moved with it.
|
|
4631
|
+
* See also `s.prependRight(...)`.
|
|
4632
|
+
*/
|
|
4540
4633
|
appendRight(index, content) {
|
|
4541
4634
|
index = index + this.offset;
|
|
4542
4635
|
if (typeof content !== "string") throw new TypeError("inserted content must be a string");
|
|
@@ -4546,6 +4639,9 @@ var MagicString = class MagicString {
|
|
|
4546
4639
|
else this.outro += content;
|
|
4547
4640
|
return this;
|
|
4548
4641
|
}
|
|
4642
|
+
/**
|
|
4643
|
+
* Does what you'd expect.
|
|
4644
|
+
*/
|
|
4549
4645
|
clone() {
|
|
4550
4646
|
const cloned = new MagicString(this.original, {
|
|
4551
4647
|
filename: this.filename,
|
|
@@ -4572,6 +4668,10 @@ var MagicString = class MagicString {
|
|
|
4572
4668
|
cloned.outro = this.outro;
|
|
4573
4669
|
return cloned;
|
|
4574
4670
|
}
|
|
4671
|
+
/**
|
|
4672
|
+
* Generates a sourcemap object with raw mappings in array form, rather than encoded as a string.
|
|
4673
|
+
* Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
|
|
4674
|
+
*/
|
|
4575
4675
|
generateDecodedMap(options) {
|
|
4576
4676
|
options = options || {};
|
|
4577
4677
|
const sourceIndex = 0;
|
|
@@ -4596,12 +4696,17 @@ var MagicString = class MagicString {
|
|
|
4596
4696
|
x_google_ignoreList: this.ignoreList ? [sourceIndex] : void 0
|
|
4597
4697
|
};
|
|
4598
4698
|
}
|
|
4699
|
+
/**
|
|
4700
|
+
* Generates a version 3 sourcemap.
|
|
4701
|
+
*/
|
|
4599
4702
|
generateMap(options) {
|
|
4600
4703
|
return new SourceMap(this.generateDecodedMap(options));
|
|
4601
4704
|
}
|
|
4705
|
+
/** @internal */
|
|
4602
4706
|
_ensureindentStr() {
|
|
4603
4707
|
if (this.indentStr === void 0) this.indentStr = guessIndent(this.original);
|
|
4604
4708
|
}
|
|
4709
|
+
/** @internal */
|
|
4605
4710
|
_getRawIndentString() {
|
|
4606
4711
|
this._ensureindentStr();
|
|
4607
4712
|
return this.indentStr;
|
|
@@ -4621,6 +4726,7 @@ var MagicString = class MagicString {
|
|
|
4621
4726
|
indentStr = this.indentStr || " ";
|
|
4622
4727
|
}
|
|
4623
4728
|
if (indentStr === "") return this;
|
|
4729
|
+
const resolvedIndentStr = indentStr;
|
|
4624
4730
|
options = options || {};
|
|
4625
4731
|
const isExcluded = {};
|
|
4626
4732
|
if (options.exclude) (typeof options.exclude[0] === "number" ? [options.exclude] : options.exclude).forEach((exclusion) => {
|
|
@@ -4628,13 +4734,22 @@ var MagicString = class MagicString {
|
|
|
4628
4734
|
});
|
|
4629
4735
|
let shouldIndentNextCharacter = options.indentStart !== false;
|
|
4630
4736
|
const replacer = (match) => {
|
|
4631
|
-
if (shouldIndentNextCharacter) return `${
|
|
4737
|
+
if (shouldIndentNextCharacter) return `${resolvedIndentStr}${match}`;
|
|
4632
4738
|
shouldIndentNextCharacter = true;
|
|
4633
4739
|
return match;
|
|
4634
4740
|
};
|
|
4635
4741
|
this.intro = this.intro.replace(pattern, replacer);
|
|
4636
4742
|
let charIndex = 0;
|
|
4637
4743
|
let chunk = this.firstChunk;
|
|
4744
|
+
const indentAt = (index) => {
|
|
4745
|
+
shouldIndentNextCharacter = false;
|
|
4746
|
+
if (index === chunk.start) chunk.prependRight(resolvedIndentStr);
|
|
4747
|
+
else {
|
|
4748
|
+
this._splitChunk(chunk, index);
|
|
4749
|
+
chunk = chunk.next;
|
|
4750
|
+
chunk.prependRight(resolvedIndentStr);
|
|
4751
|
+
}
|
|
4752
|
+
};
|
|
4638
4753
|
while (chunk) {
|
|
4639
4754
|
const end = chunk.end;
|
|
4640
4755
|
if (chunk.edited) {
|
|
@@ -4642,22 +4757,32 @@ var MagicString = class MagicString {
|
|
|
4642
4757
|
chunk.content = chunk.content.replace(pattern, replacer);
|
|
4643
4758
|
if (chunk.content.length) shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === "\n";
|
|
4644
4759
|
}
|
|
4645
|
-
} else {
|
|
4760
|
+
} else if (options.exclude) {
|
|
4646
4761
|
charIndex = chunk.start;
|
|
4647
4762
|
while (charIndex < end) {
|
|
4648
4763
|
if (!isExcluded[charIndex]) {
|
|
4649
|
-
const char = this.original
|
|
4650
|
-
if (char ===
|
|
4651
|
-
else if (char !==
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4764
|
+
const char = this.original.charCodeAt(charIndex);
|
|
4765
|
+
if (char === NEWLINE_CHAR) shouldIndentNextCharacter = true;
|
|
4766
|
+
else if (char !== CR_CHAR && shouldIndentNextCharacter) indentAt(charIndex);
|
|
4767
|
+
}
|
|
4768
|
+
charIndex += 1;
|
|
4769
|
+
}
|
|
4770
|
+
} else {
|
|
4771
|
+
charIndex = chunk.start;
|
|
4772
|
+
while (charIndex < end) {
|
|
4773
|
+
if (!shouldIndentNextCharacter) {
|
|
4774
|
+
const nextLine = this.original.indexOf(n, charIndex);
|
|
4775
|
+
if (nextLine === -1 || nextLine >= end) break;
|
|
4776
|
+
shouldIndentNextCharacter = true;
|
|
4777
|
+
charIndex = nextLine + 1;
|
|
4778
|
+
continue;
|
|
4779
|
+
}
|
|
4780
|
+
const char = this.original.charCodeAt(charIndex);
|
|
4781
|
+
if (char === NEWLINE_CHAR || char === CR_CHAR) {
|
|
4782
|
+
charIndex += 1;
|
|
4783
|
+
continue;
|
|
4660
4784
|
}
|
|
4785
|
+
indentAt(charIndex);
|
|
4661
4786
|
charIndex += 1;
|
|
4662
4787
|
}
|
|
4663
4788
|
}
|
|
@@ -4667,9 +4792,11 @@ var MagicString = class MagicString {
|
|
|
4667
4792
|
this.outro = this.outro.replace(pattern, replacer);
|
|
4668
4793
|
return this;
|
|
4669
4794
|
}
|
|
4795
|
+
/** @internal */
|
|
4670
4796
|
insert() {
|
|
4671
4797
|
throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)");
|
|
4672
4798
|
}
|
|
4799
|
+
/** @internal */
|
|
4673
4800
|
insertLeft(index, content) {
|
|
4674
4801
|
if (!warned.insertLeft) {
|
|
4675
4802
|
console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead");
|
|
@@ -4677,6 +4804,7 @@ var MagicString = class MagicString {
|
|
|
4677
4804
|
}
|
|
4678
4805
|
return this.appendLeft(index, content);
|
|
4679
4806
|
}
|
|
4807
|
+
/** @internal */
|
|
4680
4808
|
insertRight(index, content) {
|
|
4681
4809
|
if (!warned.insertRight) {
|
|
4682
4810
|
console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead");
|
|
@@ -4684,10 +4812,14 @@ var MagicString = class MagicString {
|
|
|
4684
4812
|
}
|
|
4685
4813
|
return this.prependRight(index, content);
|
|
4686
4814
|
}
|
|
4815
|
+
/**
|
|
4816
|
+
* Moves the characters from `start` and `end` to `index`.
|
|
4817
|
+
*/
|
|
4687
4818
|
move(start, end, index) {
|
|
4688
4819
|
start = start + this.offset;
|
|
4689
4820
|
end = end + this.offset;
|
|
4690
4821
|
index = index + this.offset;
|
|
4822
|
+
if (start === end) return this;
|
|
4691
4823
|
if (index >= start && index <= end) throw new Error("Cannot move a selection inside itself");
|
|
4692
4824
|
this._split(start);
|
|
4693
4825
|
this._split(end);
|
|
@@ -4714,13 +4846,30 @@ var MagicString = class MagicString {
|
|
|
4714
4846
|
if (!newRight) this.lastChunk = last;
|
|
4715
4847
|
return this;
|
|
4716
4848
|
}
|
|
4849
|
+
/**
|
|
4850
|
+
* Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in
|
|
4851
|
+
* that range. The same restrictions as `s.remove()` apply.
|
|
4852
|
+
*
|
|
4853
|
+
* The fourth argument is optional. It can have a storeName property - if true, the original name will be stored
|
|
4854
|
+
* for later inclusion in a sourcemap's names array - and a contentOnly property which determines whether only
|
|
4855
|
+
* the content is overwritten, or anything that was appended/prepended to the range as well.
|
|
4856
|
+
*
|
|
4857
|
+
* It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content.
|
|
4858
|
+
*/
|
|
4717
4859
|
overwrite(start, end, content, options) {
|
|
4718
|
-
|
|
4860
|
+
const optionObject = typeof options === "object" && options ? options : {};
|
|
4719
4861
|
return this.update(start, end, content, {
|
|
4720
|
-
...
|
|
4721
|
-
overwrite: !
|
|
4862
|
+
...optionObject,
|
|
4863
|
+
overwrite: !optionObject.contentOnly
|
|
4722
4864
|
});
|
|
4723
4865
|
}
|
|
4866
|
+
/**
|
|
4867
|
+
* Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply.
|
|
4868
|
+
*
|
|
4869
|
+
* The fourth argument is optional. It can have a storeName property - if true, the original name will be stored
|
|
4870
|
+
* for later inclusion in a sourcemap's names array - and an overwrite property which determines whether only
|
|
4871
|
+
* the content is overwritten, or anything that was appended/prepended to the range as well.
|
|
4872
|
+
*/
|
|
4724
4873
|
update(start, end, content, options) {
|
|
4725
4874
|
start = start + this.offset;
|
|
4726
4875
|
end = end + this.offset;
|
|
@@ -4740,8 +4889,9 @@ var MagicString = class MagicString {
|
|
|
4740
4889
|
}
|
|
4741
4890
|
options = { storeName: true };
|
|
4742
4891
|
}
|
|
4743
|
-
const
|
|
4744
|
-
const
|
|
4892
|
+
const optionObject = typeof options === "object" && options ? options : {};
|
|
4893
|
+
const storeName = optionObject.storeName || false;
|
|
4894
|
+
const overwrite = optionObject.overwrite || false;
|
|
4745
4895
|
if (storeName) {
|
|
4746
4896
|
const original = this.original.slice(start, end);
|
|
4747
4897
|
Object.defineProperty(this.storedNames, original, {
|
|
@@ -4767,11 +4917,17 @@ var MagicString = class MagicString {
|
|
|
4767
4917
|
}
|
|
4768
4918
|
return this;
|
|
4769
4919
|
}
|
|
4920
|
+
/**
|
|
4921
|
+
* Prepends the string with the specified content.
|
|
4922
|
+
*/
|
|
4770
4923
|
prepend(content) {
|
|
4771
4924
|
if (typeof content !== "string") throw new TypeError("outro content must be a string");
|
|
4772
4925
|
this.intro = content + this.intro;
|
|
4773
4926
|
return this;
|
|
4774
4927
|
}
|
|
4928
|
+
/**
|
|
4929
|
+
* Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index
|
|
4930
|
+
*/
|
|
4775
4931
|
prependLeft(index, content) {
|
|
4776
4932
|
index = index + this.offset;
|
|
4777
4933
|
if (typeof content !== "string") throw new TypeError("inserted content must be a string");
|
|
@@ -4781,6 +4937,9 @@ var MagicString = class MagicString {
|
|
|
4781
4937
|
else this.intro = content + this.intro;
|
|
4782
4938
|
return this;
|
|
4783
4939
|
}
|
|
4940
|
+
/**
|
|
4941
|
+
* Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
|
|
4942
|
+
*/
|
|
4784
4943
|
prependRight(index, content) {
|
|
4785
4944
|
index = index + this.offset;
|
|
4786
4945
|
if (typeof content !== "string") throw new TypeError("inserted content must be a string");
|
|
@@ -4790,6 +4949,10 @@ var MagicString = class MagicString {
|
|
|
4790
4949
|
else this.outro = content + this.outro;
|
|
4791
4950
|
return this;
|
|
4792
4951
|
}
|
|
4952
|
+
/**
|
|
4953
|
+
* Removes the characters from `start` to `end` (of the original string, **not** the generated string).
|
|
4954
|
+
* Removing the same content twice, or making removals that partially overlap, will cause an error.
|
|
4955
|
+
*/
|
|
4793
4956
|
remove(start, end) {
|
|
4794
4957
|
start = start + this.offset;
|
|
4795
4958
|
end = end + this.offset;
|
|
@@ -4811,6 +4974,9 @@ var MagicString = class MagicString {
|
|
|
4811
4974
|
}
|
|
4812
4975
|
return this;
|
|
4813
4976
|
}
|
|
4977
|
+
/**
|
|
4978
|
+
* Reset the modified characters from `start` to `end` (of the original string, **not** the generated string).
|
|
4979
|
+
*/
|
|
4814
4980
|
reset(start, end) {
|
|
4815
4981
|
start = start + this.offset;
|
|
4816
4982
|
end = end + this.offset;
|
|
@@ -4833,11 +4999,12 @@ var MagicString = class MagicString {
|
|
|
4833
4999
|
lastChar() {
|
|
4834
5000
|
if (this.outro.length) return this.outro[this.outro.length - 1];
|
|
4835
5001
|
let chunk = this.lastChunk;
|
|
4836
|
-
|
|
5002
|
+
while (chunk) {
|
|
4837
5003
|
if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];
|
|
4838
5004
|
if (chunk.content.length) return chunk.content[chunk.content.length - 1];
|
|
4839
5005
|
if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];
|
|
4840
|
-
|
|
5006
|
+
chunk = chunk.previous;
|
|
5007
|
+
}
|
|
4841
5008
|
if (this.intro.length) return this.intro[this.intro.length - 1];
|
|
4842
5009
|
return "";
|
|
4843
5010
|
}
|
|
@@ -4846,7 +5013,7 @@ var MagicString = class MagicString {
|
|
|
4846
5013
|
if (lineIndex !== -1) return this.outro.substr(lineIndex + 1);
|
|
4847
5014
|
let lineStr = this.outro;
|
|
4848
5015
|
let chunk = this.lastChunk;
|
|
4849
|
-
|
|
5016
|
+
while (chunk) {
|
|
4850
5017
|
if (chunk.outro.length > 0) {
|
|
4851
5018
|
lineIndex = chunk.outro.lastIndexOf(n);
|
|
4852
5019
|
if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;
|
|
@@ -4862,11 +5029,16 @@ var MagicString = class MagicString {
|
|
|
4862
5029
|
if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;
|
|
4863
5030
|
lineStr = chunk.intro + lineStr;
|
|
4864
5031
|
}
|
|
4865
|
-
|
|
5032
|
+
chunk = chunk.previous;
|
|
5033
|
+
}
|
|
4866
5034
|
lineIndex = this.intro.lastIndexOf(n);
|
|
4867
5035
|
if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;
|
|
4868
5036
|
return this.intro + lineStr;
|
|
4869
5037
|
}
|
|
5038
|
+
/**
|
|
5039
|
+
* Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string.
|
|
5040
|
+
* Throws error if the indices are for characters that were already removed.
|
|
5041
|
+
*/
|
|
4870
5042
|
slice(start = 0, end = this.original.length - this.offset) {
|
|
4871
5043
|
start = start + this.offset;
|
|
4872
5044
|
end = end + this.offset;
|
|
@@ -4895,12 +5067,16 @@ var MagicString = class MagicString {
|
|
|
4895
5067
|
}
|
|
4896
5068
|
return result;
|
|
4897
5069
|
}
|
|
5070
|
+
/**
|
|
5071
|
+
* Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed.
|
|
5072
|
+
*/
|
|
4898
5073
|
snip(start, end) {
|
|
4899
5074
|
const clone = this.clone();
|
|
4900
5075
|
clone.remove(0, start);
|
|
4901
5076
|
clone.remove(end, clone.original.length);
|
|
4902
5077
|
return clone;
|
|
4903
5078
|
}
|
|
5079
|
+
/** @internal */
|
|
4904
5080
|
_split(index) {
|
|
4905
5081
|
if (this.byStart[index] || this.byEnd[index]) return;
|
|
4906
5082
|
let chunk = this.lastSearchedChunk;
|
|
@@ -4913,6 +5089,7 @@ var MagicString = class MagicString {
|
|
|
4913
5089
|
previousChunk = chunk;
|
|
4914
5090
|
}
|
|
4915
5091
|
}
|
|
5092
|
+
/** @internal */
|
|
4916
5093
|
_splitChunk(chunk, index) {
|
|
4917
5094
|
if (chunk.edited && chunk.content.length) {
|
|
4918
5095
|
const loc = getLocator(this.original)(index);
|
|
@@ -4926,6 +5103,9 @@ var MagicString = class MagicString {
|
|
|
4926
5103
|
this.lastSearchedChunk = chunk;
|
|
4927
5104
|
return true;
|
|
4928
5105
|
}
|
|
5106
|
+
/**
|
|
5107
|
+
* Returns the generated string.
|
|
5108
|
+
*/
|
|
4929
5109
|
toString() {
|
|
4930
5110
|
let str = this.intro;
|
|
4931
5111
|
let chunk = this.firstChunk;
|
|
@@ -4935,29 +5115,41 @@ var MagicString = class MagicString {
|
|
|
4935
5115
|
}
|
|
4936
5116
|
return str + this.outro;
|
|
4937
5117
|
}
|
|
5118
|
+
/**
|
|
5119
|
+
* Returns true if the resulting source is empty (disregarding white space).
|
|
5120
|
+
*/
|
|
4938
5121
|
isEmpty() {
|
|
4939
5122
|
let chunk = this.firstChunk;
|
|
4940
|
-
|
|
5123
|
+
while (chunk) {
|
|
4941
5124
|
if (chunk.intro.length && chunk.intro.trim() || chunk.content.length && chunk.content.trim() || chunk.outro.length && chunk.outro.trim()) return false;
|
|
4942
|
-
|
|
5125
|
+
chunk = chunk.next;
|
|
5126
|
+
}
|
|
4943
5127
|
return true;
|
|
4944
5128
|
}
|
|
4945
5129
|
length() {
|
|
4946
5130
|
let chunk = this.firstChunk;
|
|
4947
5131
|
let length = 0;
|
|
4948
|
-
|
|
5132
|
+
while (chunk) {
|
|
4949
5133
|
length += chunk.intro.length + chunk.content.length + chunk.outro.length;
|
|
4950
|
-
|
|
5134
|
+
chunk = chunk.next;
|
|
5135
|
+
}
|
|
4951
5136
|
return length;
|
|
4952
5137
|
}
|
|
5138
|
+
/**
|
|
5139
|
+
* Removes empty lines from the start and end.
|
|
5140
|
+
*/
|
|
4953
5141
|
trimLines() {
|
|
4954
5142
|
return this.trim("[\\r\\n]");
|
|
4955
5143
|
}
|
|
5144
|
+
/**
|
|
5145
|
+
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
|
|
5146
|
+
*/
|
|
4956
5147
|
trim(charType) {
|
|
4957
5148
|
return this.trimStart(charType).trimEnd(charType);
|
|
4958
5149
|
}
|
|
5150
|
+
/** @internal */
|
|
4959
5151
|
trimEndAborted(charType) {
|
|
4960
|
-
const rx = new RegExp(
|
|
5152
|
+
const rx = new RegExp(`${charType || "\\s"}+$`);
|
|
4961
5153
|
this.outro = this.outro.replace(rx, "");
|
|
4962
5154
|
if (this.outro.length) return true;
|
|
4963
5155
|
let chunk = this.lastChunk;
|
|
@@ -4975,12 +5167,16 @@ var MagicString = class MagicString {
|
|
|
4975
5167
|
} while (chunk);
|
|
4976
5168
|
return false;
|
|
4977
5169
|
}
|
|
5170
|
+
/**
|
|
5171
|
+
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end.
|
|
5172
|
+
*/
|
|
4978
5173
|
trimEnd(charType) {
|
|
4979
5174
|
this.trimEndAborted(charType);
|
|
4980
5175
|
return this;
|
|
4981
5176
|
}
|
|
5177
|
+
/** @internal */
|
|
4982
5178
|
trimStartAborted(charType) {
|
|
4983
|
-
const rx = new RegExp(
|
|
5179
|
+
const rx = new RegExp(`^${charType || "\\s"}+`);
|
|
4984
5180
|
this.intro = this.intro.replace(rx, "");
|
|
4985
5181
|
if (this.intro.length) return true;
|
|
4986
5182
|
let chunk = this.firstChunk;
|
|
@@ -4998,13 +5194,20 @@ var MagicString = class MagicString {
|
|
|
4998
5194
|
} while (chunk);
|
|
4999
5195
|
return false;
|
|
5000
5196
|
}
|
|
5197
|
+
/**
|
|
5198
|
+
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start.
|
|
5199
|
+
*/
|
|
5001
5200
|
trimStart(charType) {
|
|
5002
5201
|
this.trimStartAborted(charType);
|
|
5003
5202
|
return this;
|
|
5004
5203
|
}
|
|
5204
|
+
/**
|
|
5205
|
+
* Indicates if the string has been changed.
|
|
5206
|
+
*/
|
|
5005
5207
|
hasChanged() {
|
|
5006
5208
|
return this.original !== this.toString();
|
|
5007
5209
|
}
|
|
5210
|
+
/** @internal */
|
|
5008
5211
|
_replaceRegexp(searchValue, replacement) {
|
|
5009
5212
|
function getReplacement(match, str) {
|
|
5010
5213
|
if (typeof replacement === "string") return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => {
|
|
@@ -5013,12 +5216,15 @@ var MagicString = class MagicString {
|
|
|
5013
5216
|
if (+i < match.length) return match[+i];
|
|
5014
5217
|
return `$${i}`;
|
|
5015
5218
|
});
|
|
5016
|
-
else return replacement(...match, match.index, str, match.groups);
|
|
5219
|
+
else return replacement(match[0], ...match.slice(1), match.index, str, match.groups);
|
|
5017
5220
|
}
|
|
5018
5221
|
function matchAll(re, str) {
|
|
5019
|
-
let match;
|
|
5020
5222
|
const matches = [];
|
|
5021
|
-
while (
|
|
5223
|
+
while (true) {
|
|
5224
|
+
const match = re.exec(str);
|
|
5225
|
+
if (!match) break;
|
|
5226
|
+
matches.push(match);
|
|
5227
|
+
}
|
|
5022
5228
|
return matches;
|
|
5023
5229
|
}
|
|
5024
5230
|
if (searchValue.global) matchAll(searchValue, this.original).forEach((match) => {
|
|
@@ -5036,6 +5242,7 @@ var MagicString = class MagicString {
|
|
|
5036
5242
|
}
|
|
5037
5243
|
return this;
|
|
5038
5244
|
}
|
|
5245
|
+
/** @internal */
|
|
5039
5246
|
_replaceString(string, replacement) {
|
|
5040
5247
|
const { original } = this;
|
|
5041
5248
|
const index = original.indexOf(string);
|
|
@@ -5045,21 +5252,27 @@ var MagicString = class MagicString {
|
|
|
5045
5252
|
}
|
|
5046
5253
|
return this;
|
|
5047
5254
|
}
|
|
5255
|
+
/**
|
|
5256
|
+
* String replacement with RegExp or string.
|
|
5257
|
+
*/
|
|
5048
5258
|
replace(searchValue, replacement) {
|
|
5049
5259
|
if (typeof searchValue === "string") return this._replaceString(searchValue, replacement);
|
|
5050
5260
|
return this._replaceRegexp(searchValue, replacement);
|
|
5051
5261
|
}
|
|
5262
|
+
/** @internal */
|
|
5052
5263
|
_replaceAllString(string, replacement) {
|
|
5053
5264
|
const { original } = this;
|
|
5054
5265
|
const stringLength = string.length;
|
|
5055
5266
|
for (let index = original.indexOf(string); index !== -1; index = original.indexOf(string, index + stringLength)) {
|
|
5056
5267
|
const previous = original.slice(index, index + stringLength);
|
|
5057
|
-
|
|
5058
|
-
if (typeof replacement === "function") _replacement = replacement(previous, index, original);
|
|
5268
|
+
const _replacement = typeof replacement === "function" ? replacement(previous, index, original) : replacement;
|
|
5059
5269
|
if (previous !== _replacement) this.overwrite(index, index + stringLength, _replacement);
|
|
5060
5270
|
}
|
|
5061
5271
|
return this;
|
|
5062
5272
|
}
|
|
5273
|
+
/**
|
|
5274
|
+
* Same as `s.replace`, but replace all matched strings instead of just one.
|
|
5275
|
+
*/
|
|
5063
5276
|
replaceAll(searchValue, replacement) {
|
|
5064
5277
|
if (typeof searchValue === "string") return this._replaceAllString(searchValue, replacement);
|
|
5065
5278
|
if (!searchValue.global) throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");
|
|
@@ -11612,7 +11825,276 @@ var SSRCompatModuleRunner = class extends ModuleRunner {
|
|
|
11612
11825
|
}
|
|
11613
11826
|
};
|
|
11614
11827
|
//#endregion
|
|
11828
|
+
//#region ../../node_modules/.pnpm/zimmerframe@1.1.4/node_modules/zimmerframe/src/walk.js
|
|
11829
|
+
/** @import { Context, Visitor, Visitors } from './types.js' */
|
|
11830
|
+
/**
|
|
11831
|
+
* @template {{ type: string }} T
|
|
11832
|
+
* @template {Record<string, any> | null} U
|
|
11833
|
+
* @param {T} node
|
|
11834
|
+
* @param {U} state
|
|
11835
|
+
* @param {Visitors<T, U>} visitors
|
|
11836
|
+
*/
|
|
11837
|
+
function walk$2(node, state, visitors) {
|
|
11838
|
+
const universal = visitors._;
|
|
11839
|
+
let stopped = false;
|
|
11840
|
+
/** @type {Visitor<T, U, T>} _ */
|
|
11841
|
+
function default_visitor(_, { next, state }) {
|
|
11842
|
+
next(state);
|
|
11843
|
+
}
|
|
11844
|
+
/**
|
|
11845
|
+
* @param {T} node
|
|
11846
|
+
* @param {T[]} path
|
|
11847
|
+
* @param {U} state
|
|
11848
|
+
* @returns {T | undefined}
|
|
11849
|
+
*/
|
|
11850
|
+
function visit(node, path, state) {
|
|
11851
|
+
if (stopped) return;
|
|
11852
|
+
if (!node.type) return;
|
|
11853
|
+
/** @type {T | void} */
|
|
11854
|
+
let result;
|
|
11855
|
+
/** @type {Record<string, any>} */
|
|
11856
|
+
const mutations = {};
|
|
11857
|
+
/** @type {Context<T, U>} */
|
|
11858
|
+
const context = {
|
|
11859
|
+
path,
|
|
11860
|
+
state,
|
|
11861
|
+
next: (next_state = state) => {
|
|
11862
|
+
path.push(node);
|
|
11863
|
+
for (const key in node) {
|
|
11864
|
+
if (key === "type") continue;
|
|
11865
|
+
const child_node = node[key];
|
|
11866
|
+
if (child_node && typeof child_node === "object") if (Array.isArray(child_node)) {
|
|
11867
|
+
/** @type {Record<number, T>} */
|
|
11868
|
+
const array_mutations = {};
|
|
11869
|
+
const len = child_node.length;
|
|
11870
|
+
let mutated = false;
|
|
11871
|
+
for (let i = 0; i < len; i++) {
|
|
11872
|
+
const node = child_node[i];
|
|
11873
|
+
if (node && typeof node === "object") {
|
|
11874
|
+
const result = visit(node, path, next_state);
|
|
11875
|
+
if (result) {
|
|
11876
|
+
array_mutations[i] = result;
|
|
11877
|
+
mutated = true;
|
|
11878
|
+
}
|
|
11879
|
+
}
|
|
11880
|
+
}
|
|
11881
|
+
if (mutated) mutations[key] = child_node.map((node, i) => array_mutations[i] ?? node);
|
|
11882
|
+
} else {
|
|
11883
|
+
const result = visit(child_node, path, next_state);
|
|
11884
|
+
if (result) mutations[key] = result;
|
|
11885
|
+
}
|
|
11886
|
+
}
|
|
11887
|
+
path.pop();
|
|
11888
|
+
if (Object.keys(mutations).length > 0) return apply_mutations(node, mutations);
|
|
11889
|
+
},
|
|
11890
|
+
stop: () => {
|
|
11891
|
+
stopped = true;
|
|
11892
|
+
},
|
|
11893
|
+
visit: (next_node, next_state = state) => {
|
|
11894
|
+
path.push(node);
|
|
11895
|
+
const result = visit(next_node, path, next_state) ?? next_node;
|
|
11896
|
+
path.pop();
|
|
11897
|
+
return result;
|
|
11898
|
+
}
|
|
11899
|
+
};
|
|
11900
|
+
let visitor = visitors[node.type] ?? default_visitor;
|
|
11901
|
+
if (universal) {
|
|
11902
|
+
/** @type {T | void} */
|
|
11903
|
+
let inner_result;
|
|
11904
|
+
result = universal(node, {
|
|
11905
|
+
...context,
|
|
11906
|
+
/** @param {U} next_state */
|
|
11907
|
+
next: (next_state = state) => {
|
|
11908
|
+
state = next_state;
|
|
11909
|
+
inner_result = visitor(node, {
|
|
11910
|
+
...context,
|
|
11911
|
+
state: next_state
|
|
11912
|
+
});
|
|
11913
|
+
return inner_result;
|
|
11914
|
+
}
|
|
11915
|
+
});
|
|
11916
|
+
if (!result && inner_result) result = inner_result;
|
|
11917
|
+
} else result = visitor(node, context);
|
|
11918
|
+
if (!result) {
|
|
11919
|
+
if (Object.keys(mutations).length > 0) result = apply_mutations(node, mutations);
|
|
11920
|
+
}
|
|
11921
|
+
if (result) return result;
|
|
11922
|
+
}
|
|
11923
|
+
return visit(node, [], state) ?? node;
|
|
11924
|
+
}
|
|
11925
|
+
/**
|
|
11926
|
+
* @template {Record<string, any>} T
|
|
11927
|
+
* @param {T} node
|
|
11928
|
+
* @param {Record<string, any>} mutations
|
|
11929
|
+
* @returns {T}
|
|
11930
|
+
*/
|
|
11931
|
+
function apply_mutations(node, mutations) {
|
|
11932
|
+
/** @type {Record<string, any>} */
|
|
11933
|
+
const obj = {};
|
|
11934
|
+
const descriptors = Object.getOwnPropertyDescriptors(node);
|
|
11935
|
+
for (const key in descriptors) Object.defineProperty(obj, key, descriptors[key]);
|
|
11936
|
+
for (const key in mutations) obj[key] = mutations[key];
|
|
11937
|
+
return obj;
|
|
11938
|
+
}
|
|
11939
|
+
//#endregion
|
|
11940
|
+
//#region ../../node_modules/.pnpm/is-reference@3.0.3/node_modules/is-reference/src/index.js
|
|
11941
|
+
/** @import { Node } from 'estree' */
|
|
11942
|
+
/**
|
|
11943
|
+
* @param {Node} node
|
|
11944
|
+
* @param {Node} parent
|
|
11945
|
+
* @returns {boolean}
|
|
11946
|
+
*/
|
|
11947
|
+
function is_reference(node, parent) {
|
|
11948
|
+
if (node.type === "MemberExpression") return !node.computed && is_reference(node.object, node);
|
|
11949
|
+
if (node.type !== "Identifier") return false;
|
|
11950
|
+
switch (parent?.type) {
|
|
11951
|
+
case "MemberExpression": return parent.computed || node === parent.object;
|
|
11952
|
+
case "MethodDefinition": return parent.computed;
|
|
11953
|
+
case "MetaProperty": return parent.meta === node;
|
|
11954
|
+
case "PropertyDefinition": return parent.computed || node === parent.value;
|
|
11955
|
+
case "Property": return parent.computed || node === parent.value;
|
|
11956
|
+
case "ExportSpecifier":
|
|
11957
|
+
case "ImportSpecifier": return node === parent.local;
|
|
11958
|
+
case "LabeledStatement":
|
|
11959
|
+
case "BreakStatement":
|
|
11960
|
+
case "ContinueStatement": return false;
|
|
11961
|
+
default: return true;
|
|
11962
|
+
}
|
|
11963
|
+
}
|
|
11964
|
+
//#endregion
|
|
11615
11965
|
//#region ../../node_modules/.pnpm/periscopic@4.0.3/node_modules/periscopic/src/index.js
|
|
11966
|
+
/** @param {import('estree').Node} expression */
|
|
11967
|
+
function analyze(expression) {
|
|
11968
|
+
/** @typedef {import('estree').Node} Node */
|
|
11969
|
+
/** @type {WeakMap<Node, Scope>} */
|
|
11970
|
+
const map = /* @__PURE__ */ new WeakMap();
|
|
11971
|
+
/** @type {Map<string, Node>} */
|
|
11972
|
+
const globals = /* @__PURE__ */ new Map();
|
|
11973
|
+
const scope = new Scope(null, false);
|
|
11974
|
+
/** @type {[Scope, import('estree').Identifier][]} */
|
|
11975
|
+
const references = [];
|
|
11976
|
+
/** @type {Scope} */
|
|
11977
|
+
let current_scope = scope;
|
|
11978
|
+
/**
|
|
11979
|
+
* @param {import('estree').Node} node
|
|
11980
|
+
* @param {boolean} block
|
|
11981
|
+
*/
|
|
11982
|
+
function push(node, block) {
|
|
11983
|
+
map.set(node, current_scope = new Scope(current_scope, block));
|
|
11984
|
+
}
|
|
11985
|
+
walk$2(expression, null, { _(node, context) {
|
|
11986
|
+
switch (node.type) {
|
|
11987
|
+
case "Identifier":
|
|
11988
|
+
const parent = context.path.at(-1);
|
|
11989
|
+
if (parent && is_reference(node, parent)) references.push([current_scope, node]);
|
|
11990
|
+
return;
|
|
11991
|
+
case "ImportDefaultSpecifier":
|
|
11992
|
+
case "ImportSpecifier":
|
|
11993
|
+
current_scope.declarations.set(node.local.name, node);
|
|
11994
|
+
return;
|
|
11995
|
+
case "ExportNamedDeclaration":
|
|
11996
|
+
if (node.source) {
|
|
11997
|
+
map.set(node, current_scope = new Scope(current_scope, true));
|
|
11998
|
+
for (const specifier of node.specifiers) current_scope.declarations.set(specifier.local.name, specifier);
|
|
11999
|
+
return;
|
|
12000
|
+
}
|
|
12001
|
+
break;
|
|
12002
|
+
case "FunctionExpression":
|
|
12003
|
+
case "FunctionDeclaration":
|
|
12004
|
+
case "ArrowFunctionExpression":
|
|
12005
|
+
if (node.type === "FunctionDeclaration") {
|
|
12006
|
+
if (node.id) current_scope.declarations.set(node.id.name, node);
|
|
12007
|
+
push(node, false);
|
|
12008
|
+
} else {
|
|
12009
|
+
push(node, false);
|
|
12010
|
+
if (node.type === "FunctionExpression" && node.id) current_scope.declarations.set(node.id.name, node);
|
|
12011
|
+
}
|
|
12012
|
+
for (const param of node.params) for (const name of extract_names(param)) current_scope.declarations.set(name, node);
|
|
12013
|
+
break;
|
|
12014
|
+
case "ForStatement":
|
|
12015
|
+
case "ForInStatement":
|
|
12016
|
+
case "ForOfStatement":
|
|
12017
|
+
case "BlockStatement":
|
|
12018
|
+
case "SwitchStatement":
|
|
12019
|
+
push(node, true);
|
|
12020
|
+
break;
|
|
12021
|
+
case "ClassDeclaration":
|
|
12022
|
+
case "VariableDeclaration":
|
|
12023
|
+
current_scope.add_declaration(node);
|
|
12024
|
+
break;
|
|
12025
|
+
case "CatchClause":
|
|
12026
|
+
push(node, true);
|
|
12027
|
+
if (node.param) {
|
|
12028
|
+
for (const name of extract_names(node.param)) if (node.param) current_scope.declarations.set(name, node.param);
|
|
12029
|
+
}
|
|
12030
|
+
break;
|
|
12031
|
+
}
|
|
12032
|
+
context.next();
|
|
12033
|
+
if (map.has(node) && current_scope !== null && current_scope.parent) current_scope = current_scope.parent;
|
|
12034
|
+
} });
|
|
12035
|
+
for (let i = references.length - 1; i >= 0; --i) {
|
|
12036
|
+
const [scope, reference] = references[i];
|
|
12037
|
+
if (!scope.references.has(reference.name)) add_reference(scope, reference.name);
|
|
12038
|
+
if (!scope.find_owner(reference.name)) globals.set(reference.name, reference);
|
|
12039
|
+
}
|
|
12040
|
+
return {
|
|
12041
|
+
map,
|
|
12042
|
+
scope,
|
|
12043
|
+
globals
|
|
12044
|
+
};
|
|
12045
|
+
}
|
|
12046
|
+
/**
|
|
12047
|
+
* @param {Scope} scope
|
|
12048
|
+
* @param {string} name
|
|
12049
|
+
*/
|
|
12050
|
+
function add_reference(scope, name) {
|
|
12051
|
+
scope.references.add(name);
|
|
12052
|
+
if (scope.parent) add_reference(scope.parent, name);
|
|
12053
|
+
}
|
|
12054
|
+
var Scope = class {
|
|
12055
|
+
/**
|
|
12056
|
+
* @param {Scope | null} parent
|
|
12057
|
+
* @param {boolean} block
|
|
12058
|
+
*/
|
|
12059
|
+
constructor(parent, block) {
|
|
12060
|
+
/** @type {Scope | null} */
|
|
12061
|
+
this.parent = parent;
|
|
12062
|
+
/** @type {boolean} */
|
|
12063
|
+
this.block = block;
|
|
12064
|
+
/** @type {Map<string, import('estree').Node>} */
|
|
12065
|
+
this.declarations = /* @__PURE__ */ new Map();
|
|
12066
|
+
/** @type {Set<string>} */
|
|
12067
|
+
this.initialised_declarations = /* @__PURE__ */ new Set();
|
|
12068
|
+
/** @type {Set<string>} */
|
|
12069
|
+
this.references = /* @__PURE__ */ new Set();
|
|
12070
|
+
}
|
|
12071
|
+
/**
|
|
12072
|
+
* @param {import('estree').VariableDeclaration | import('estree').ClassDeclaration} node
|
|
12073
|
+
*/
|
|
12074
|
+
add_declaration(node) {
|
|
12075
|
+
if (node.type === "VariableDeclaration") if (node.kind === "var" && this.block && this.parent) this.parent.add_declaration(node);
|
|
12076
|
+
else for (const declarator of node.declarations) for (const name of extract_names(declarator.id)) {
|
|
12077
|
+
this.declarations.set(name, node);
|
|
12078
|
+
if (declarator.init) this.initialised_declarations.add(name);
|
|
12079
|
+
}
|
|
12080
|
+
else if (node.id) this.declarations.set(node.id.name, node);
|
|
12081
|
+
}
|
|
12082
|
+
/**
|
|
12083
|
+
* @param {string} name
|
|
12084
|
+
* @returns {Scope | null}
|
|
12085
|
+
*/
|
|
12086
|
+
find_owner(name) {
|
|
12087
|
+
if (this.declarations.has(name)) return this;
|
|
12088
|
+
return this.parent && this.parent.find_owner(name);
|
|
12089
|
+
}
|
|
12090
|
+
/**
|
|
12091
|
+
* @param {string} name
|
|
12092
|
+
* @returns {boolean}
|
|
12093
|
+
*/
|
|
12094
|
+
has(name) {
|
|
12095
|
+
return this.declarations.has(name) || !!this.parent && this.parent.has(name);
|
|
12096
|
+
}
|
|
12097
|
+
};
|
|
11616
12098
|
/**
|
|
11617
12099
|
* @param {import('estree').Node} param
|
|
11618
12100
|
* @returns {string[]}
|
|
@@ -12069,7 +12551,7 @@ function walk(root, { onIdentifier, onImportMeta, onDynamicImport, onStatements
|
|
|
12069
12551
|
if (node.type === "ImportDeclaration") return this.skip();
|
|
12070
12552
|
if (node.type === "Program" || node.type === "BlockStatement" || node.type === "StaticBlock") onStatements(node.body);
|
|
12071
12553
|
else if (node.type === "SwitchCase") onStatements(node.consequent);
|
|
12072
|
-
if (parent && !(
|
|
12554
|
+
if (parent && !isSkippedParent(node, parent)) parentStack.unshift(parent);
|
|
12073
12555
|
if (node.type === "VariableDeclaration") varKindStack.unshift(node.kind);
|
|
12074
12556
|
if (node.type === "MetaProperty" && node.meta.name === "import") onImportMeta(node);
|
|
12075
12557
|
else if (node.type === "ImportExpression") onDynamicImport(node);
|
|
@@ -12105,7 +12587,7 @@ function walk(root, { onIdentifier, onImportMeta, onDynamicImport, onStatements
|
|
|
12105
12587
|
} else if (node.type === "CatchClause" && node.param) handlePattern(node.param, node);
|
|
12106
12588
|
},
|
|
12107
12589
|
leave(node, parent) {
|
|
12108
|
-
if (parent && !(
|
|
12590
|
+
if (parent && !isSkippedParent(node, parent)) parentStack.shift();
|
|
12109
12591
|
if (node.type === "VariableDeclaration") varKindStack.shift();
|
|
12110
12592
|
}
|
|
12111
12593
|
});
|
|
@@ -12134,10 +12616,20 @@ function isRefIdentifier(id, parent, parentStack) {
|
|
|
12134
12616
|
const isStaticProperty = (node) => node.type === "Property" && !node.computed;
|
|
12135
12617
|
const isStaticPropertyKey = (node, parent) => parent && isStaticProperty(parent) && parent.key === node;
|
|
12136
12618
|
const functionNodeTypeRE = /Function(?:Expression|Declaration)$|Method$/;
|
|
12619
|
+
/**
|
|
12620
|
+
* Children that must not see `parent` as an enclosing scope:
|
|
12621
|
+
* - "else-if"/"else" branches, as acorn nests the ast within "if" nodes
|
|
12622
|
+
* instead of flattening them.
|
|
12623
|
+
* - a `switch` discriminant, which is evaluated outside the case block:
|
|
12624
|
+
* in `switch (x) { case 1: let x }`, `x` is the outer binding.
|
|
12625
|
+
*/
|
|
12626
|
+
function isSkippedParent(node, parent) {
|
|
12627
|
+
return parent.type === "IfStatement" && node === parent.alternate || parent.type === "SwitchStatement" && node === parent.discriminant;
|
|
12628
|
+
}
|
|
12137
12629
|
function isFunction(node) {
|
|
12138
12630
|
return functionNodeTypeRE.test(node.type);
|
|
12139
12631
|
}
|
|
12140
|
-
const blockNodeTypeRE = /^BlockStatement$|^For(?:In|Of)?Statement$/;
|
|
12632
|
+
const blockNodeTypeRE = /^BlockStatement$|^SwitchStatement$|^For(?:In|Of)?Statement$/;
|
|
12141
12633
|
function isBlock(node) {
|
|
12142
12634
|
return blockNodeTypeRE.test(node.type);
|
|
12143
12635
|
}
|
|
@@ -13279,7 +13771,7 @@ function checkPublicFile(url, config) {
|
|
|
13279
13771
|
return tryStatSync(publicFile)?.isFile() ? publicFile : void 0;
|
|
13280
13772
|
}
|
|
13281
13773
|
//#endregion
|
|
13282
|
-
//#region ../../node_modules/.pnpm/ws@8.21.
|
|
13774
|
+
//#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js
|
|
13283
13775
|
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
13284
13776
|
const BINARY_TYPES = [
|
|
13285
13777
|
"nodebuffer",
|
|
@@ -13302,7 +13794,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
13302
13794
|
};
|
|
13303
13795
|
}));
|
|
13304
13796
|
//#endregion
|
|
13305
|
-
//#region ../../node_modules/.pnpm/ws@8.21.
|
|
13797
|
+
//#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/buffer-util.js
|
|
13306
13798
|
var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
13307
13799
|
const { EMPTY_BUFFER } = require_constants();
|
|
13308
13800
|
const FastBuffer = Buffer[Symbol.species];
|
|
@@ -13402,7 +13894,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
13402
13894
|
} catch (e) {}
|
|
13403
13895
|
}));
|
|
13404
13896
|
//#endregion
|
|
13405
|
-
//#region ../../node_modules/.pnpm/ws@8.21.
|
|
13897
|
+
//#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/limiter.js
|
|
13406
13898
|
var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
13407
13899
|
const kDone = Symbol("kDone");
|
|
13408
13900
|
const kRun = Symbol("kRun");
|
|
@@ -13453,7 +13945,7 @@ var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
13453
13945
|
module.exports = Limiter;
|
|
13454
13946
|
}));
|
|
13455
13947
|
//#endregion
|
|
13456
|
-
//#region ../../node_modules/.pnpm/ws@8.21.
|
|
13948
|
+
//#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/permessage-deflate.js
|
|
13457
13949
|
var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
13458
13950
|
const zlib$1 = __require("zlib");
|
|
13459
13951
|
const bufferUtil = require_buffer_util();
|
|
@@ -13789,7 +14281,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
13789
14281
|
}
|
|
13790
14282
|
}));
|
|
13791
14283
|
//#endregion
|
|
13792
|
-
//#region ../../node_modules/.pnpm/ws@8.21.
|
|
14284
|
+
//#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/validation.js
|
|
13793
14285
|
var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
13794
14286
|
const { isUtf8 } = __require("buffer");
|
|
13795
14287
|
const { hasBlob } = require_constants();
|
|
@@ -13985,7 +14477,7 @@ var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
13985
14477
|
} catch (e) {}
|
|
13986
14478
|
}));
|
|
13987
14479
|
//#endregion
|
|
13988
|
-
//#region ../../node_modules/.pnpm/ws@8.21.
|
|
14480
|
+
//#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/receiver.js
|
|
13989
14481
|
var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
13990
14482
|
const { Writable: Writable$1 } = __require("stream");
|
|
13991
14483
|
const PerMessageDeflate = require_permessage_deflate();
|
|
@@ -14048,6 +14540,7 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14048
14540
|
this._opcode = 0;
|
|
14049
14541
|
this._totalPayloadLength = 0;
|
|
14050
14542
|
this._messageLength = 0;
|
|
14543
|
+
this._numFragments = 0;
|
|
14051
14544
|
this._fragments = [];
|
|
14052
14545
|
this._errored = false;
|
|
14053
14546
|
this._loop = false;
|
|
@@ -14288,16 +14781,16 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14288
14781
|
this.controlMessage(data, cb);
|
|
14289
14782
|
return;
|
|
14290
14783
|
}
|
|
14784
|
+
if (this._maxFragments > 0 && ++this._numFragments > this._maxFragments) {
|
|
14785
|
+
cb(this.createError(RangeError, "Too many message fragments", false, 1008, "WS_ERR_TOO_MANY_BUFFERED_PARTS"));
|
|
14786
|
+
return;
|
|
14787
|
+
}
|
|
14291
14788
|
if (this._compressed) {
|
|
14292
14789
|
this._state = INFLATING;
|
|
14293
14790
|
this.decompress(data, cb);
|
|
14294
14791
|
return;
|
|
14295
14792
|
}
|
|
14296
14793
|
if (data.length) {
|
|
14297
|
-
if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
|
|
14298
|
-
cb(this.createError(RangeError, "Too many message fragments", false, 1008, "WS_ERR_TOO_MANY_BUFFERED_PARTS"));
|
|
14299
|
-
return;
|
|
14300
|
-
}
|
|
14301
14794
|
this._messageLength = this._totalPayloadLength;
|
|
14302
14795
|
this._fragments.push(data);
|
|
14303
14796
|
}
|
|
@@ -14319,10 +14812,6 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14319
14812
|
cb(this.createError(RangeError, "Max payload size exceeded", false, 1009, "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));
|
|
14320
14813
|
return;
|
|
14321
14814
|
}
|
|
14322
|
-
if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
|
|
14323
|
-
cb(this.createError(RangeError, "Too many message fragments", false, 1008, "WS_ERR_TOO_MANY_BUFFERED_PARTS"));
|
|
14324
|
-
return;
|
|
14325
|
-
}
|
|
14326
14815
|
this._fragments.push(buf);
|
|
14327
14816
|
}
|
|
14328
14817
|
this.dataMessage(cb);
|
|
@@ -14345,6 +14834,7 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14345
14834
|
this._totalPayloadLength = 0;
|
|
14346
14835
|
this._messageLength = 0;
|
|
14347
14836
|
this._fragmented = 0;
|
|
14837
|
+
this._numFragments = 0;
|
|
14348
14838
|
this._fragments = [];
|
|
14349
14839
|
if (this._opcode === 2) {
|
|
14350
14840
|
let data;
|
|
@@ -14450,7 +14940,7 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14450
14940
|
module.exports = Receiver;
|
|
14451
14941
|
}));
|
|
14452
14942
|
//#endregion
|
|
14453
|
-
//#region ../../node_modules/.pnpm/ws@8.21.
|
|
14943
|
+
//#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/sender.js
|
|
14454
14944
|
var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14455
14945
|
const { Duplex: Duplex$3 } = __require("stream");
|
|
14456
14946
|
const { randomFillSync } = __require("crypto");
|
|
@@ -14944,7 +15434,7 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14944
15434
|
}
|
|
14945
15435
|
}));
|
|
14946
15436
|
//#endregion
|
|
14947
|
-
//#region ../../node_modules/.pnpm/ws@8.21.
|
|
15437
|
+
//#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/event-target.js
|
|
14948
15438
|
var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14949
15439
|
const { kForOnEventAttribute, kListener } = require_constants();
|
|
14950
15440
|
const kCode = Symbol("kCode");
|
|
@@ -15175,7 +15665,7 @@ var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15175
15665
|
}
|
|
15176
15666
|
}));
|
|
15177
15667
|
//#endregion
|
|
15178
|
-
//#region ../../node_modules/.pnpm/ws@8.21.
|
|
15668
|
+
//#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/extension.js
|
|
15179
15669
|
var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15180
15670
|
const { tokenChars } = require_validation();
|
|
15181
15671
|
/**
|
|
@@ -15318,7 +15808,7 @@ var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15318
15808
|
};
|
|
15319
15809
|
}));
|
|
15320
15810
|
//#endregion
|
|
15321
|
-
//#region ../../node_modules/.pnpm/ws@8.21.
|
|
15811
|
+
//#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket.js
|
|
15322
15812
|
var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15323
15813
|
const EventEmitter$2 = __require("events");
|
|
15324
15814
|
const https$3 = __require("https");
|
|
@@ -15823,9 +16313,9 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15823
16313
|
* masking key
|
|
15824
16314
|
* @param {Number} [options.handshakeTimeout] Timeout in milliseconds for the
|
|
15825
16315
|
* handshake request
|
|
15826
|
-
* @param {Number} [options.maxBufferedChunks=
|
|
16316
|
+
* @param {Number} [options.maxBufferedChunks=262144] The maximum number of
|
|
15827
16317
|
* buffered data chunks
|
|
15828
|
-
* @param {Number} [options.maxFragments=
|
|
16318
|
+
* @param {Number} [options.maxFragments=16384] The maximum number of message
|
|
15829
16319
|
* fragments
|
|
15830
16320
|
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
15831
16321
|
* size
|
|
@@ -15847,8 +16337,8 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15847
16337
|
autoPong: true,
|
|
15848
16338
|
closeTimeout: CLOSE_TIMEOUT,
|
|
15849
16339
|
protocolVersion: protocolVersions[1],
|
|
15850
|
-
maxBufferedChunks:
|
|
15851
|
-
maxFragments:
|
|
16340
|
+
maxBufferedChunks: 256 * 1024,
|
|
16341
|
+
maxFragments: 16 * 1024,
|
|
15852
16342
|
maxPayload: 100 * 1024 * 1024,
|
|
15853
16343
|
skipUTF8Validation: false,
|
|
15854
16344
|
perMessageDeflate: true,
|
|
@@ -16307,7 +16797,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16307
16797
|
}
|
|
16308
16798
|
}));
|
|
16309
16799
|
//#endregion
|
|
16310
|
-
//#region ../../node_modules/.pnpm/ws@8.21.
|
|
16800
|
+
//#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/stream.js
|
|
16311
16801
|
var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16312
16802
|
require_websocket();
|
|
16313
16803
|
const { Duplex: Duplex$1 } = __require("stream");
|
|
@@ -16423,7 +16913,7 @@ var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16423
16913
|
module.exports = createWebSocketStream;
|
|
16424
16914
|
}));
|
|
16425
16915
|
//#endregion
|
|
16426
|
-
//#region ../../node_modules/.pnpm/ws@8.21.
|
|
16916
|
+
//#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/subprotocol.js
|
|
16427
16917
|
var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16428
16918
|
const { tokenChars } = require_validation();
|
|
16429
16919
|
/**
|
|
@@ -16462,7 +16952,7 @@ var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16462
16952
|
module.exports = { parse };
|
|
16463
16953
|
}));
|
|
16464
16954
|
//#endregion
|
|
16465
|
-
//#region ../../node_modules/.pnpm/ws@8.21.
|
|
16955
|
+
//#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket-server.js
|
|
16466
16956
|
var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16467
16957
|
const EventEmitter$1 = __require("events");
|
|
16468
16958
|
const http$4 = __require("http");
|
|
@@ -16501,9 +16991,9 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
16501
16991
|
* called
|
|
16502
16992
|
* @param {Function} [options.handleProtocols] A hook to handle protocols
|
|
16503
16993
|
* @param {String} [options.host] The hostname where to bind the server
|
|
16504
|
-
* @param {Number} [options.maxBufferedChunks=
|
|
16994
|
+
* @param {Number} [options.maxBufferedChunks=262144] The maximum number of
|
|
16505
16995
|
* buffered data chunks
|
|
16506
|
-
* @param {Number} [options.maxFragments=
|
|
16996
|
+
* @param {Number} [options.maxFragments=16384] The maximum number of message
|
|
16507
16997
|
* fragments
|
|
16508
16998
|
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
16509
16999
|
* size
|
|
@@ -16526,8 +17016,8 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
16526
17016
|
options = {
|
|
16527
17017
|
allowSynchronousEvents: true,
|
|
16528
17018
|
autoPong: true,
|
|
16529
|
-
maxBufferedChunks:
|
|
16530
|
-
maxFragments:
|
|
17019
|
+
maxBufferedChunks: 256 * 1024,
|
|
17020
|
+
maxFragments: 16 * 1024,
|
|
16531
17021
|
maxPayload: 100 * 1024 * 1024,
|
|
16532
17022
|
skipUTF8Validation: false,
|
|
16533
17023
|
perMessageDeflate: false,
|
|
@@ -20209,7 +20699,26 @@ function getModuleTypeFromId(id) {
|
|
|
20209
20699
|
//#endregion
|
|
20210
20700
|
//#region ../../node_modules/.pnpm/strip-literal@3.1.0/node_modules/strip-literal/dist/index.mjs
|
|
20211
20701
|
var import_js_tokens = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
20212
|
-
var HashbangComment
|
|
20702
|
+
var HashbangComment;
|
|
20703
|
+
var Identifier;
|
|
20704
|
+
var JSXIdentifier;
|
|
20705
|
+
var JSXPunctuator;
|
|
20706
|
+
var JSXString;
|
|
20707
|
+
var JSXText;
|
|
20708
|
+
var KeywordsWithExpressionAfter;
|
|
20709
|
+
var KeywordsWithNoLineTerminatorAfter;
|
|
20710
|
+
var LineTerminatorSequence;
|
|
20711
|
+
var MultiLineComment;
|
|
20712
|
+
var Newline;
|
|
20713
|
+
var NumericLiteral;
|
|
20714
|
+
var Punctuator;
|
|
20715
|
+
var RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy;
|
|
20716
|
+
var SingleLineComment;
|
|
20717
|
+
var StringLiteral;
|
|
20718
|
+
var Template;
|
|
20719
|
+
var TokensNotPrecedingObjectLiteral;
|
|
20720
|
+
var TokensPrecedingExpression;
|
|
20721
|
+
var WhiteSpace;
|
|
20213
20722
|
Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;
|
|
20214
20723
|
Identifier = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy;
|
|
20215
20724
|
StringLiteral = /(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y;
|
|
@@ -21343,7 +21852,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21343
21852
|
};
|
|
21344
21853
|
}));
|
|
21345
21854
|
//#endregion
|
|
21346
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
21855
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.20_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/req.js
|
|
21347
21856
|
var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
21348
21857
|
const { createRequire: createRequire$1 } = __require("node:module");
|
|
21349
21858
|
const { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1 } = __require("node:url");
|
|
@@ -21385,7 +21894,7 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21385
21894
|
module.exports = req;
|
|
21386
21895
|
}));
|
|
21387
21896
|
//#endregion
|
|
21388
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
21897
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.20_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/options.js
|
|
21389
21898
|
var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
21390
21899
|
const req = require_req();
|
|
21391
21900
|
/**
|
|
@@ -21419,7 +21928,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21419
21928
|
module.exports = options;
|
|
21420
21929
|
}));
|
|
21421
21930
|
//#endregion
|
|
21422
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
21931
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.20_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/plugins.js
|
|
21423
21932
|
var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
21424
21933
|
const req = require_req();
|
|
21425
21934
|
/**
|
|
@@ -21473,7 +21982,7 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21473
21982
|
module.exports = plugins;
|
|
21474
21983
|
}));
|
|
21475
21984
|
//#endregion
|
|
21476
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
21985
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.20_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/index.js
|
|
21477
21986
|
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
21478
21987
|
const { resolve: resolve$3 } = __require("node:path");
|
|
21479
21988
|
const config = require_src$1();
|
|
@@ -22026,6 +22535,7 @@ function cssPostPlugin(config) {
|
|
|
22026
22535
|
let codeSplitEmitQueue = createSerialPromiseQueue();
|
|
22027
22536
|
const urlEmitQueue = createSerialPromiseQueue();
|
|
22028
22537
|
let pureCssChunks;
|
|
22538
|
+
let chunkCssReferences;
|
|
22029
22539
|
let hasEmitted = false;
|
|
22030
22540
|
let chunkCSSMap;
|
|
22031
22541
|
const rolldownOptionsOutput = config.build.rolldownOptions.output;
|
|
@@ -22054,6 +22564,7 @@ function cssPostPlugin(config) {
|
|
|
22054
22564
|
name: "vite:css-post",
|
|
22055
22565
|
renderStart() {
|
|
22056
22566
|
pureCssChunks = /* @__PURE__ */ new Set();
|
|
22567
|
+
chunkCssReferences = /* @__PURE__ */ new Map();
|
|
22057
22568
|
hasEmitted = false;
|
|
22058
22569
|
chunkCSSMap = /* @__PURE__ */ new Map();
|
|
22059
22570
|
codeSplitEmitQueue = createSerialPromiseQueue();
|
|
@@ -22233,6 +22744,7 @@ function cssPostPlugin(config) {
|
|
|
22233
22744
|
originalFileName,
|
|
22234
22745
|
source: chunkCSS
|
|
22235
22746
|
});
|
|
22747
|
+
chunkCssReferences.set(chunk.fileName, referenceId);
|
|
22236
22748
|
if (isEntry) cssEntriesMap.get(this.environment).set(chunk.fileName, {
|
|
22237
22749
|
referenceId,
|
|
22238
22750
|
name: chunk.name
|
|
@@ -22293,6 +22805,20 @@ function cssPostPlugin(config) {
|
|
|
22293
22805
|
});
|
|
22294
22806
|
}
|
|
22295
22807
|
}
|
|
22808
|
+
if (config.build.chunkImportMap && chunkCssReferences.size) {
|
|
22809
|
+
const importMap = getImportMap(bundle, config);
|
|
22810
|
+
const importMapReverseMapping = Object.fromEntries(Object.entries(importMap.mapping).map(([k, v]) => [v, k]));
|
|
22811
|
+
const chunksByPreliminaryFileName = new Map(Object.values(bundle).filter((output) => output.type === "chunk").map((chunk) => [chunk.preliminaryFileName, chunk]));
|
|
22812
|
+
for (const [chunkFileName, referenceId] of chunkCssReferences) {
|
|
22813
|
+
const chunk = chunksByPreliminaryFileName.get(chunkFileName);
|
|
22814
|
+
if (!chunk) continue;
|
|
22815
|
+
const stableChunkFileName = importMapReverseMapping[chunk.fileName] ?? chunk.fileName;
|
|
22816
|
+
const extension = path.posix.extname(stableChunkFileName);
|
|
22817
|
+
const stableCssFileName = `${stableChunkFileName.slice(0, extension ? -extension.length : void 0)}.css`;
|
|
22818
|
+
importMap.content.imports[config.base + stableCssFileName] = config.base + this.getFileName(referenceId);
|
|
22819
|
+
}
|
|
22820
|
+
importMap.asset.source = JSON.stringify(importMap.content);
|
|
22821
|
+
}
|
|
22296
22822
|
if (pureCssChunks.size) {
|
|
22297
22823
|
const prelimaryNameToChunkMap = Object.fromEntries(Object.values(bundle).filter((chunk) => chunk.type === "chunk").map((chunk) => [chunk.preliminaryFileName, chunk.fileName]));
|
|
22298
22824
|
const pureCssChunkNames = [...pureCssChunks].map((pureCssChunk) => prelimaryNameToChunkMap[pureCssChunk.fileName]).filter(Boolean);
|
|
@@ -22741,7 +23267,7 @@ const UrlRewritePostcssPlugin = (opts) => {
|
|
|
22741
23267
|
if (!opts) throw new Error("base or replace is required");
|
|
22742
23268
|
return {
|
|
22743
23269
|
postcssPlugin: "vite-url-rewrite",
|
|
22744
|
-
|
|
23270
|
+
OnceExit(root) {
|
|
22745
23271
|
const promises = [];
|
|
22746
23272
|
root.walkDecls((declaration) => {
|
|
22747
23273
|
const importer = declaration.source?.input.file;
|
|
@@ -24445,6 +24971,7 @@ function getImportMap(bundle, config) {
|
|
|
24445
24971
|
const content = JSON.parse(typeof asset.source === "string" ? asset.source : new TextDecoder().decode(asset.source));
|
|
24446
24972
|
return {
|
|
24447
24973
|
asset,
|
|
24974
|
+
content,
|
|
24448
24975
|
mapping: Object.fromEntries(Object.entries(content.imports).map(([k, v]) => [k.slice(config.base.length), v.slice(config.base.length)]))
|
|
24449
24976
|
};
|
|
24450
24977
|
}
|
|
@@ -24773,6 +25300,7 @@ function handleDefineValue(value) {
|
|
|
24773
25300
|
//#endregion
|
|
24774
25301
|
//#region src/node/plugins/clientInjections.ts
|
|
24775
25302
|
const normalizedClientEntry$1 = normalizePath(CLIENT_ENTRY);
|
|
25303
|
+
const normalizedBundledDevClientEntry = normalizePath(BUNDLED_DEV_CLIENT_ENTRY);
|
|
24776
25304
|
const normalizedEnvEntry$1 = normalizePath(ENV_ENTRY);
|
|
24777
25305
|
/**
|
|
24778
25306
|
* some values used by the client needs to be dynamically injected by the server
|
|
@@ -24846,11 +25374,10 @@ async function createClientConfigValueReplacer(config) {
|
|
|
24846
25374
|
const hmrConfigNameReplacement = escapeReplacement(hmrConfigName);
|
|
24847
25375
|
const wsTokenReplacement = escapeReplacement(config.webSocketToken);
|
|
24848
25376
|
const serverForwardConsoleReplacement = escapeReplacement(config.server.forwardConsole);
|
|
24849
|
-
|
|
24850
|
-
return (code) => code.replace(`__MODE__`, modeReplacement).replace(/__BASE__/g, baseReplacement).replace(`__SERVER_HOST__`, serverHostReplacement).replace(`__HMR_PROTOCOL__`, hmrProtocolReplacement).replace(`__HMR_HOSTNAME__`, hmrHostnameReplacement).replace(`__HMR_PORT__`, hmrPortReplacement).replace(`__HMR_DIRECT_TARGET__`, hmrDirectTargetReplacement).replace(`__HMR_BASE__`, hmrBaseReplacement).replace(`__HMR_TIMEOUT__`, hmrTimeoutReplacement).replace(`__HMR_ENABLE_OVERLAY__`, hmrEnableOverlayReplacement).replace(`__HMR_CONFIG_NAME__`, hmrConfigNameReplacement).replace(`__WS_TOKEN__`, wsTokenReplacement).replace(`__SERVER_FORWARD_CONSOLE__`, serverForwardConsoleReplacement).replaceAll(`__BUNDLED_DEV__`, bundleDevReplacement);
|
|
25377
|
+
return (code) => code.replace(`__MODE__`, modeReplacement).replace(/__BASE__/g, baseReplacement).replace(`__SERVER_HOST__`, serverHostReplacement).replace(`__HMR_PROTOCOL__`, hmrProtocolReplacement).replace(`__HMR_HOSTNAME__`, hmrHostnameReplacement).replace(`__HMR_PORT__`, hmrPortReplacement).replace(`__HMR_DIRECT_TARGET__`, hmrDirectTargetReplacement).replace(`__HMR_BASE__`, hmrBaseReplacement).replace(`__HMR_TIMEOUT__`, hmrTimeoutReplacement).replace(`__HMR_ENABLE_OVERLAY__`, hmrEnableOverlayReplacement).replace(`__HMR_CONFIG_NAME__`, hmrConfigNameReplacement).replace(`__WS_TOKEN__`, wsTokenReplacement).replace(`__SERVER_FORWARD_CONSOLE__`, serverForwardConsoleReplacement);
|
|
24851
25378
|
}
|
|
24852
25379
|
async function getHmrImplementation(config) {
|
|
24853
|
-
const content = fs.readFileSync(
|
|
25380
|
+
const content = fs.readFileSync(normalizedBundledDevClientEntry, "utf-8");
|
|
24854
25381
|
return (await createClientConfigValueReplacer(config))(content).replace(/import\s*['"]@vite\/env['"]/, "");
|
|
24855
25382
|
}
|
|
24856
25383
|
//#endregion
|
|
@@ -25103,6 +25630,7 @@ async function generateFallbackHtml(server) {
|
|
|
25103
25630
|
<!DOCTYPE html>
|
|
25104
25631
|
<html lang="en">
|
|
25105
25632
|
<head>
|
|
25633
|
+
<script>globalThis.__vite_is_fallback_page__ = true<\/script>
|
|
25106
25634
|
<script type="module">
|
|
25107
25635
|
${(await getHmrImplementation(server.config)).replaceAll("<\/script>", "<\\/script>")}
|
|
25108
25636
|
<\/script>
|
|
@@ -25635,8 +26163,9 @@ function rejectInvalidRequestMiddleware() {
|
|
|
25635
26163
|
//#endregion
|
|
25636
26164
|
//#region src/node/server/middlewares/memoryFiles.ts
|
|
25637
26165
|
function memoryFilesMiddleware(server) {
|
|
25638
|
-
const
|
|
25639
|
-
|
|
26166
|
+
const bundledDev = server.environments.client.bundledDev;
|
|
26167
|
+
const memoryFiles = bundledDev?.memoryFiles;
|
|
26168
|
+
if (!bundledDev || !memoryFiles) throw new Error("memoryFilesMiddleware can only be used for fullBundleMode");
|
|
25640
26169
|
const headers = server.config.server.headers;
|
|
25641
26170
|
return function viteMemoryFilesMiddleware(req, res, next) {
|
|
25642
26171
|
const cleanedUrl = cleanUrl(req.url);
|
|
@@ -25661,6 +26190,7 @@ function memoryFilesMiddleware(server) {
|
|
|
25661
26190
|
const mime = lookup(filePath);
|
|
25662
26191
|
if (mime) res.setHeader("Content-Type", mime);
|
|
25663
26192
|
for (const name in headers) res.setHeader(name, headers[name]);
|
|
26193
|
+
res.on("finish", () => bundledDev.markPayloadDelivered(filePath));
|
|
25664
26194
|
return res.end(file.source);
|
|
25665
26195
|
}
|
|
25666
26196
|
next();
|
|
@@ -25681,10 +26211,11 @@ function triggerLazyBundlingMiddleware(server) {
|
|
|
25681
26211
|
}
|
|
25682
26212
|
const moduleId = params.get("id");
|
|
25683
26213
|
const clientId = params.get("clientId");
|
|
25684
|
-
const
|
|
25685
|
-
if (
|
|
26214
|
+
const result = await bundledDev.triggerLazyBundling(moduleId, clientId);
|
|
26215
|
+
if (result == null) return next();
|
|
25686
26216
|
res.setHeader("Content-Type", "application/javascript");
|
|
25687
|
-
|
|
26217
|
+
res.on("finish", () => bundledDev.markPayloadDelivered(result.filename));
|
|
26218
|
+
return res.end(result.code);
|
|
25688
26219
|
};
|
|
25689
26220
|
}
|
|
25690
26221
|
//#endregion
|
|
@@ -27421,6 +27952,11 @@ function importAnalysisPlugin(config) {
|
|
|
27421
27952
|
_isNodeModeResult ??= isFilePathESM(importer, config.packageCache);
|
|
27422
27953
|
return _isNodeModeResult;
|
|
27423
27954
|
};
|
|
27955
|
+
let _isNodeModeForDynamicImportResult = config.legacy?.inconsistentCjsInterop ? false : void 0;
|
|
27956
|
+
const isNodeModeForDynamicImport = () => {
|
|
27957
|
+
_isNodeModeForDynamicImportResult ??= isFilePathFormatExplicit(importer, config.packageCache);
|
|
27958
|
+
return _isNodeModeForDynamicImportResult;
|
|
27959
|
+
};
|
|
27424
27960
|
await Promise.all(imports.map(async (importSpecifier, index) => {
|
|
27425
27961
|
const { s: start, e: end, ss: expStart, se: expEnd, d: dynamicIndex, a: attributeIndex } = importSpecifier;
|
|
27426
27962
|
let specifier = importSpecifier.n;
|
|
@@ -27466,7 +28002,7 @@ function importAnalysisPlugin(config) {
|
|
|
27466
28002
|
if (depInfo?.isDynamicEntry) config.logger.error(import_picocolors.default.red(`Vite Error, ${url} optimized info should be defined`));
|
|
27467
28003
|
} else if (needsInterop) {
|
|
27468
28004
|
debug$6?.(`${url} needs interop`);
|
|
27469
|
-
interopNamedImports(str(), importSpecifier, url, index, importer, isNodeMode(), config);
|
|
28005
|
+
interopNamedImports(str(), importSpecifier, url, index, importer, isDynamicImport ? isNodeModeForDynamicImport() : isNodeMode(), config);
|
|
27470
28006
|
rewriteDone = true;
|
|
27471
28007
|
}
|
|
27472
28008
|
} else if (url.startsWith(wrapId("__vite-browser-external")) && source.slice(expStart, start).includes("{")) {
|
|
@@ -27572,7 +28108,7 @@ function interopNamedImports(str, importSpecifier, rewrittenUrl, importIndex, im
|
|
|
27572
28108
|
const source = str.original;
|
|
27573
28109
|
const { s: start, e: end, ss: expStart, se: expEnd, d: dynamicIndex } = importSpecifier;
|
|
27574
28110
|
const exp = source.slice(expStart, expEnd);
|
|
27575
|
-
if (dynamicIndex > -1) str.overwrite(expStart, expEnd, `import('${rewrittenUrl}').then(m => (${interopHelperStr})(m.default, ${
|
|
28111
|
+
if (dynamicIndex > -1) str.overwrite(expStart, expEnd, `import('${rewrittenUrl}').then(m => (${interopHelperStr})(m.default, ${+isNodeMode}))` + getLineBreaks(exp), { contentOnly: true });
|
|
27576
28112
|
else {
|
|
27577
28113
|
const rewritten = transformCjsImport(exp, rewrittenUrl, source.slice(start, end), importIndex, importer, isNodeMode, config);
|
|
27578
28114
|
if (rewritten) {
|
|
@@ -27668,7 +28204,14 @@ function __vite__injectQuery(url, queryToInject) {
|
|
|
27668
28204
|
const wasmHelperId = "\0vite/wasm-helper.js";
|
|
27669
28205
|
const wasmInitRE = /(?<![?#].*)\.wasm\?init/;
|
|
27670
28206
|
const wasmDirectRE = /(?<![?#].*)\.wasm$/;
|
|
28207
|
+
const wasmInstanceSuffix = "?vite-wasm-instance";
|
|
28208
|
+
const wasmInstanceRE = /[?&]vite-wasm-instance(?:&|$)/;
|
|
27671
28209
|
const wasmInitUrlRE = /__VITE_WASM_INIT__([\w$]+)__/g;
|
|
28210
|
+
const wasmCompileOptions = {
|
|
28211
|
+
builtins: ["js-string"],
|
|
28212
|
+
importedStringConstants: "wasm:js/string-constants"
|
|
28213
|
+
};
|
|
28214
|
+
const wasmReservedModules = /* @__PURE__ */ new Set([...wasmCompileOptions.builtins.map((name) => `wasm:${name}`), wasmCompileOptions.importedStringConstants]);
|
|
27672
28215
|
const wasmHelper = async (opts = {}, url) => {
|
|
27673
28216
|
let result;
|
|
27674
28217
|
if (url.startsWith("data:")) {
|
|
@@ -27680,7 +28223,7 @@ const wasmHelper = async (opts = {}, url) => {
|
|
|
27680
28223
|
bytes = new Uint8Array(binaryString.length);
|
|
27681
28224
|
for (let i = 0; i < binaryString.length; i++) bytes[i] = binaryString.charCodeAt(i);
|
|
27682
28225
|
} else throw new Error("Failed to decode base64-encoded data URL, Buffer and atob are not supported");
|
|
27683
|
-
result = await WebAssembly.instantiate(bytes, opts);
|
|
28226
|
+
result = await WebAssembly.instantiate(bytes, opts, wasmCompileOptions);
|
|
27684
28227
|
} else result = await instantiateFromUrl(url, opts);
|
|
27685
28228
|
return result.instance;
|
|
27686
28229
|
};
|
|
@@ -27688,10 +28231,10 @@ const wasmHelperCode = wasmHelper.toString();
|
|
|
27688
28231
|
const instantiateFromUrl = async (url, opts) => {
|
|
27689
28232
|
const response = await fetch(url);
|
|
27690
28233
|
const contentType = response.headers.get("Content-Type") || "";
|
|
27691
|
-
if ("instantiateStreaming" in WebAssembly && contentType.startsWith("application/wasm")) return WebAssembly.instantiateStreaming(response, opts);
|
|
28234
|
+
if ("instantiateStreaming" in WebAssembly && contentType.startsWith("application/wasm")) return WebAssembly.instantiateStreaming(response, opts, wasmCompileOptions);
|
|
27692
28235
|
else {
|
|
27693
28236
|
const buffer = await response.arrayBuffer();
|
|
27694
|
-
return WebAssembly.instantiate(buffer, opts);
|
|
28237
|
+
return WebAssembly.instantiate(buffer, opts, wasmCompileOptions);
|
|
27695
28238
|
}
|
|
27696
28239
|
};
|
|
27697
28240
|
const instantiateFromUrlCode = instantiateFromUrl.toString();
|
|
@@ -27702,7 +28245,7 @@ const instantiateFromFile = async (fileUrlString, opts) => {
|
|
|
27702
28245
|
/** #__KEEP__ */
|
|
27703
28246
|
import.meta.url
|
|
27704
28247
|
));
|
|
27705
|
-
return WebAssembly.instantiate(buffer, opts);
|
|
28248
|
+
return WebAssembly.instantiate(buffer, opts, wasmCompileOptions);
|
|
27706
28249
|
};
|
|
27707
28250
|
const instantiateFromFileCode = instantiateFromFile.toString();
|
|
27708
28251
|
const wasmHelperPlugin = () => {
|
|
@@ -27719,16 +28262,24 @@ const wasmHelperPlugin = () => {
|
|
|
27719
28262
|
filter: { id: [
|
|
27720
28263
|
exactRegex(wasmHelperId),
|
|
27721
28264
|
wasmInitRE,
|
|
27722
|
-
wasmDirectRE
|
|
28265
|
+
wasmDirectRE,
|
|
28266
|
+
wasmInstanceRE
|
|
27723
28267
|
] },
|
|
27724
28268
|
async handler(id) {
|
|
27725
28269
|
const ssr = this.environment.config.consumer === "server";
|
|
27726
28270
|
if (id === wasmHelperId) return `
|
|
28271
|
+
const wasmCompileOptions = ${JSON.stringify(wasmCompileOptions)}
|
|
27727
28272
|
const instantiateFromUrl = ${ssr ? instantiateFromFileCode : instantiateFromUrlCode}
|
|
27728
28273
|
export default ${wasmHelperCode}
|
|
27729
28274
|
`;
|
|
27730
28275
|
const isInit = wasmInitRE.test(id);
|
|
27731
|
-
const
|
|
28276
|
+
const isInstance = wasmInstanceRE.test(id);
|
|
28277
|
+
const cleanedId = isInstance ? cleanUrl(id) : id.split("?")[0];
|
|
28278
|
+
let wasmInfo;
|
|
28279
|
+
if (!isInit) {
|
|
28280
|
+
wasmInfo = await parseWasm(cleanedId);
|
|
28281
|
+
if (!isInstance && wasmInfo.hasGlobalExport) return generateWrapperGlue(wasmInfo, cleanedId + wasmInstanceSuffix);
|
|
28282
|
+
}
|
|
27732
28283
|
let url = await fileToUrl$1(this, cleanedId, ssr);
|
|
27733
28284
|
assetUrlRE.lastIndex = 0;
|
|
27734
28285
|
if (ssr && assetUrlRE.test(url)) url = url.replace("__VITE_ASSET__", "__VITE_WASM_INIT__");
|
|
@@ -27736,7 +28287,7 @@ export default ${wasmHelperCode}
|
|
|
27736
28287
|
import initWasm from "${wasmHelperId}"
|
|
27737
28288
|
export default opts => initWasm(opts, ${JSON.stringify(url)})
|
|
27738
28289
|
`;
|
|
27739
|
-
const glueCode =
|
|
28290
|
+
const glueCode = generateInstanceGlue(wasmInfo, {
|
|
27740
28291
|
initWasm: "__vite__initWasm",
|
|
27741
28292
|
wasmUrl: "__vite__wasmUrl"
|
|
27742
28293
|
});
|
|
@@ -27775,43 +28326,70 @@ ${glueCode}
|
|
|
27775
28326
|
async function parseWasm(wasmFilePath) {
|
|
27776
28327
|
try {
|
|
27777
28328
|
const wasmBinary = await fsp.readFile(wasmFilePath);
|
|
27778
|
-
const wasmModule = await WebAssembly.compile(wasmBinary);
|
|
27779
|
-
const importMap =
|
|
28329
|
+
const wasmModule = await WebAssembly.compile(wasmBinary, wasmCompileOptions);
|
|
28330
|
+
const importMap = /* @__PURE__ */ new Map();
|
|
27780
28331
|
for (const item of WebAssembly.Module.imports(wasmModule)) {
|
|
27781
|
-
|
|
27782
|
-
importMap
|
|
28332
|
+
if (wasmReservedModules.has(item.module)) continue;
|
|
28333
|
+
let names = importMap.get(item.module);
|
|
28334
|
+
if (!names) importMap.set(item.module, names = []);
|
|
28335
|
+
names.push({
|
|
28336
|
+
name: item.name,
|
|
28337
|
+
isGlobal: item.kind === "global"
|
|
28338
|
+
});
|
|
27783
28339
|
}
|
|
28340
|
+
const imports = [...importMap].map(([from, names]) => ({
|
|
28341
|
+
from,
|
|
28342
|
+
names
|
|
28343
|
+
}));
|
|
28344
|
+
let hasGlobalExport = false;
|
|
27784
28345
|
return {
|
|
27785
|
-
imports
|
|
27786
|
-
|
|
27787
|
-
|
|
27788
|
-
|
|
27789
|
-
|
|
28346
|
+
imports,
|
|
28347
|
+
exports: WebAssembly.Module.exports(wasmModule).map((item) => {
|
|
28348
|
+
const isGlobal = item.kind === "global";
|
|
28349
|
+
if (isGlobal) hasGlobalExport = true;
|
|
28350
|
+
return {
|
|
28351
|
+
name: item.name,
|
|
28352
|
+
isGlobal
|
|
28353
|
+
};
|
|
28354
|
+
}),
|
|
28355
|
+
hasGlobalExport
|
|
27790
28356
|
};
|
|
27791
28357
|
} catch (e) {
|
|
27792
28358
|
throw new Error(`Failed to parse WASM file "${wasmFilePath}": ${e.message}`, { cause: e });
|
|
27793
28359
|
}
|
|
27794
28360
|
}
|
|
27795
|
-
function
|
|
27796
|
-
const importStatements =
|
|
27797
|
-
return `import * as __vite__wasmImport_${i} from ${JSON.stringify(from)};`;
|
|
27798
|
-
});
|
|
28361
|
+
function generateInstanceGlue(wasmInfo, names) {
|
|
28362
|
+
const importStatements = [];
|
|
27799
28363
|
const importObject = wasmInfo.imports.map(({ from, names: importNames }, i) => {
|
|
28364
|
+
const value = [];
|
|
28365
|
+
const globals = importNames.filter((n) => n.isGlobal);
|
|
28366
|
+
const others = importNames.filter((n) => !n.isGlobal);
|
|
28367
|
+
if (others.length > 0) {
|
|
28368
|
+
const ns = `__vite__wasmImport_${i}`;
|
|
28369
|
+
importStatements.push(`import * as ${ns} from ${JSON.stringify(from)};`);
|
|
28370
|
+
for (const { name } of others) value.push({
|
|
28371
|
+
key: JSON.stringify(name),
|
|
28372
|
+
value: `${ns}[${JSON.stringify(name)}]`
|
|
28373
|
+
});
|
|
28374
|
+
}
|
|
28375
|
+
if (globals.length > 0) {
|
|
28376
|
+
const ns = `__vite__wasmImportInstance_${i}`;
|
|
28377
|
+
importStatements.push(`import * as ${ns} from ${JSON.stringify(from + wasmInstanceSuffix)};`);
|
|
28378
|
+
for (const { name } of globals) value.push({
|
|
28379
|
+
key: JSON.stringify(name),
|
|
28380
|
+
value: `${ns}[${JSON.stringify(name)}]`
|
|
28381
|
+
});
|
|
28382
|
+
}
|
|
27800
28383
|
return {
|
|
27801
28384
|
key: JSON.stringify(from),
|
|
27802
|
-
value
|
|
27803
|
-
return {
|
|
27804
|
-
key: JSON.stringify(name),
|
|
27805
|
-
value: `__vite__wasmImport_${i}[${JSON.stringify(name)}]`
|
|
27806
|
-
};
|
|
27807
|
-
})
|
|
28385
|
+
value
|
|
27808
28386
|
};
|
|
27809
28387
|
});
|
|
27810
28388
|
const initCode = `const __vite__wasmModule = (await ${names.initWasm}(${codegenSimpleObject(importObject)}, ${names.wasmUrl})).exports;`;
|
|
27811
28389
|
if (wasmInfo.exports.length === 0) return [...importStatements, initCode].join("\n");
|
|
27812
28390
|
const exportStatements = [];
|
|
27813
28391
|
const nameMap = /* @__PURE__ */ new Map();
|
|
27814
|
-
for (const [index, name] of wasmInfo.exports.entries()) if (isValidJsDeclareName(name)) exportStatements.push(` ${name},`);
|
|
28392
|
+
for (const [index, { name }] of wasmInfo.exports.entries()) if (isValidJsDeclareName(name)) exportStatements.push(` ${name},`);
|
|
27815
28393
|
else {
|
|
27816
28394
|
const placeholderName = `__vite__wasmExport_${index}`;
|
|
27817
28395
|
exportStatements.push(` ${JSON.stringify(name)}: ${placeholderName},`);
|
|
@@ -27821,7 +28399,7 @@ function generateGlueCode(wasmInfo, names) {
|
|
|
27821
28399
|
exportStatements.unshift(`const {`);
|
|
27822
28400
|
exportStatements.push(`} = __vite__wasmModule;`);
|
|
27823
28401
|
exportStatements.push(`export {`);
|
|
27824
|
-
for (const name of wasmInfo.exports) {
|
|
28402
|
+
for (const { name } of wasmInfo.exports) {
|
|
27825
28403
|
const localName = nameMap.get(name);
|
|
27826
28404
|
if (localName) exportStatements.push(` ${localName} as ${JSON.stringify(name)},`);
|
|
27827
28405
|
else exportStatements.push(` ${name},`);
|
|
@@ -27837,6 +28415,34 @@ function generateGlueCode(wasmInfo, names) {
|
|
|
27837
28415
|
...exportStatements
|
|
27838
28416
|
].join("\n");
|
|
27839
28417
|
}
|
|
28418
|
+
function generateWrapperGlue(wasmInfo, instanceId) {
|
|
28419
|
+
const instanceIdLiteral = JSON.stringify(instanceId);
|
|
28420
|
+
const lines = [`export * from ${instanceIdLiteral};`];
|
|
28421
|
+
if (wasmInfo.exports.some((e) => e.name === "default")) lines.push(`export { default } from ${instanceIdLiteral};`);
|
|
28422
|
+
const imports = [];
|
|
28423
|
+
const bindings = [];
|
|
28424
|
+
const unwraps = [];
|
|
28425
|
+
const reExports = [];
|
|
28426
|
+
for (const [index, { name, isGlobal }] of wasmInfo.exports.entries()) {
|
|
28427
|
+
if (!isGlobal || name === "default") continue;
|
|
28428
|
+
const alias = `__vite__wasmGlobal_${index}`;
|
|
28429
|
+
imports.push(`${codegenModuleExportName(name)} as ${alias}`);
|
|
28430
|
+
const binding = isValidJsDeclareName(name) ? name : `__vite__wasmGlobalValue_${index}`;
|
|
28431
|
+
bindings.push(binding);
|
|
28432
|
+
unwraps.push(`try { ${binding} = ${alias}.value; } catch {}`);
|
|
28433
|
+
reExports.push(binding === name ? name : `${binding} as ${JSON.stringify(name)}`);
|
|
28434
|
+
}
|
|
28435
|
+
if (bindings.length > 0) {
|
|
28436
|
+
lines.push(`import { ${imports.join(", ")} } from ${instanceIdLiteral};`);
|
|
28437
|
+
lines.push(`let ${bindings.join(", ")};`);
|
|
28438
|
+
lines.push(...unwraps);
|
|
28439
|
+
lines.push(`export { ${reExports.join(", ")} };`);
|
|
28440
|
+
}
|
|
28441
|
+
return lines.join("\n");
|
|
28442
|
+
}
|
|
28443
|
+
function codegenModuleExportName(name) {
|
|
28444
|
+
return isValidJsDeclareName(name) ? name : JSON.stringify(name);
|
|
28445
|
+
}
|
|
27840
28446
|
function codegenSimpleObject(obj) {
|
|
27841
28447
|
if (obj.length === 0) return "{}";
|
|
27842
28448
|
return `{ ${obj.map(({ key, value }) => {
|
|
@@ -29137,7 +29743,7 @@ function createFilterForTransform(idFilter, codeFilter, moduleTypeFilter, cwd) {
|
|
|
29137
29743
|
};
|
|
29138
29744
|
}
|
|
29139
29745
|
//#endregion
|
|
29140
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.
|
|
29746
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.10/node_modules/@vitest/utils/dist/helpers.js
|
|
29141
29747
|
function notNullish(v) {
|
|
29142
29748
|
return v != null;
|
|
29143
29749
|
}
|
|
@@ -29145,7 +29751,7 @@ function isPrimitive(value) {
|
|
|
29145
29751
|
return value === null || typeof value !== "function" && typeof value !== "object";
|
|
29146
29752
|
}
|
|
29147
29753
|
//#endregion
|
|
29148
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.
|
|
29754
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.10/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js
|
|
29149
29755
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
29150
29756
|
function normalizeWindowsPath(input = "") {
|
|
29151
29757
|
if (!input) return input;
|
|
@@ -29224,7 +29830,7 @@ const isAbsolute$2 = function(p) {
|
|
|
29224
29830
|
return _IS_ABSOLUTE_RE.test(p);
|
|
29225
29831
|
};
|
|
29226
29832
|
//#endregion
|
|
29227
|
-
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.
|
|
29833
|
+
//#region ../../node_modules/.pnpm/@vitest+utils@4.1.10/node_modules/@vitest/utils/dist/source-map.js
|
|
29228
29834
|
var comma = ",".charCodeAt(0);
|
|
29229
29835
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
29230
29836
|
var intToChar = /* @__PURE__ */ new Uint8Array(64);
|
|
@@ -30638,7 +31244,7 @@ function scanImports(environment) {
|
|
|
30638
31244
|
async function scan() {
|
|
30639
31245
|
const entries = await computeEntries(environment);
|
|
30640
31246
|
if (!entries.length) {
|
|
30641
|
-
if (!config.optimizeDeps.entries && !config.optimizeDeps.include) environment.logger.warn(import_picocolors.default.yellow("(!) Could not auto-determine entry point from rolldownOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling."));
|
|
31247
|
+
if (!config.optimizeDeps.entries && !config.optimizeDeps.include && !config.input) environment.logger.warn(import_picocolors.default.yellow("(!) Could not auto-determine entry point from rolldownOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling."));
|
|
30642
31248
|
return;
|
|
30643
31249
|
}
|
|
30644
31250
|
if (scanContext.cancelled) return;
|
|
@@ -30680,10 +31286,11 @@ function scanImports(environment) {
|
|
|
30680
31286
|
async function computeEntries(environment) {
|
|
30681
31287
|
let entries = [];
|
|
30682
31288
|
const explicitEntryPatterns = environment.config.optimizeDeps.entries;
|
|
30683
|
-
const buildInput = environment.config.build.rolldownOptions.input;
|
|
31289
|
+
const buildInput = environment.config.input ?? environment.config.build.rolldownOptions.input;
|
|
30684
31290
|
if (explicitEntryPatterns) entries = await globEntries(explicitEntryPatterns, environment);
|
|
30685
31291
|
else if (buildInput) {
|
|
30686
31292
|
const resolvePath = async (p) => {
|
|
31293
|
+
if (environment.config.input) return p;
|
|
30687
31294
|
const id = (await environment.pluginContainer.resolveId(p, void 0, {
|
|
30688
31295
|
isEntry: true,
|
|
30689
31296
|
scan: true
|
|
@@ -31831,6 +32438,11 @@ function isSingleDefaultExport(exports) {
|
|
|
31831
32438
|
return exports.length === 1 && exports[0] === "default";
|
|
31832
32439
|
}
|
|
31833
32440
|
const lockfileFormats = [
|
|
32441
|
+
{
|
|
32442
|
+
path: "node_modules/.pnpm/lock.yaml",
|
|
32443
|
+
checkPatchesDir: false,
|
|
32444
|
+
manager: "pnpm"
|
|
32445
|
+
},
|
|
31834
32446
|
{
|
|
31835
32447
|
path: "node_modules/.package-lock.json",
|
|
31836
32448
|
checkPatchesDir: "patches",
|
|
@@ -31841,6 +32453,26 @@ const lockfileFormats = [
|
|
|
31841
32453
|
checkPatchesDir: false,
|
|
31842
32454
|
manager: "yarn"
|
|
31843
32455
|
},
|
|
32456
|
+
{
|
|
32457
|
+
path: "bun.lock",
|
|
32458
|
+
checkPatchesDir: "patches",
|
|
32459
|
+
manager: "bun"
|
|
32460
|
+
},
|
|
32461
|
+
{
|
|
32462
|
+
path: ".rush/temp/shrinkwrap-deps.json",
|
|
32463
|
+
checkPatchesDir: false,
|
|
32464
|
+
manager: "pnpm"
|
|
32465
|
+
},
|
|
32466
|
+
{
|
|
32467
|
+
path: "aube-lock.yaml",
|
|
32468
|
+
checkPatchesDir: false,
|
|
32469
|
+
manager: "aube"
|
|
32470
|
+
},
|
|
32471
|
+
{
|
|
32472
|
+
path: "nub.lock",
|
|
32473
|
+
checkPatchesDir: "patches",
|
|
32474
|
+
manager: "nub"
|
|
32475
|
+
},
|
|
31844
32476
|
{
|
|
31845
32477
|
path: ".pnp.cjs",
|
|
31846
32478
|
checkPatchesDir: ".yarn/patches",
|
|
@@ -31856,21 +32488,6 @@ const lockfileFormats = [
|
|
|
31856
32488
|
checkPatchesDir: "patches",
|
|
31857
32489
|
manager: "yarn"
|
|
31858
32490
|
},
|
|
31859
|
-
{
|
|
31860
|
-
path: "node_modules/.pnpm/lock.yaml",
|
|
31861
|
-
checkPatchesDir: false,
|
|
31862
|
-
manager: "pnpm"
|
|
31863
|
-
},
|
|
31864
|
-
{
|
|
31865
|
-
path: ".rush/temp/shrinkwrap-deps.json",
|
|
31866
|
-
checkPatchesDir: false,
|
|
31867
|
-
manager: "pnpm"
|
|
31868
|
-
},
|
|
31869
|
-
{
|
|
31870
|
-
path: "bun.lock",
|
|
31871
|
-
checkPatchesDir: "patches",
|
|
31872
|
-
manager: "bun"
|
|
31873
|
-
},
|
|
31874
32491
|
{
|
|
31875
32492
|
path: "bun.lockb",
|
|
31876
32493
|
checkPatchesDir: "patches",
|
|
@@ -32803,7 +33420,7 @@ const _buildEnvironmentOptionsDefaults = Object.freeze({
|
|
|
32803
33420
|
watch: null
|
|
32804
33421
|
});
|
|
32805
33422
|
const buildEnvironmentOptionsDefaults = _buildEnvironmentOptionsDefaults;
|
|
32806
|
-
function resolveBuildEnvironmentOptions(raw, logger, consumer, isBundledDev, isSsrTargetWebworkerEnvironment) {
|
|
33423
|
+
function resolveBuildEnvironmentOptions(raw, logger, consumer, isBundledDev, input, isSsrTargetWebworkerEnvironment) {
|
|
32807
33424
|
const deprecatedPolyfillModulePreload = raw.polyfillModulePreload;
|
|
32808
33425
|
const { polyfillModulePreload, ...rest } = raw;
|
|
32809
33426
|
raw = rest;
|
|
@@ -32824,6 +33441,7 @@ function resolveBuildEnvironmentOptions(raw, logger, consumer, isBundledDev, isS
|
|
|
32824
33441
|
platform: consumer === "client" || isSsrTargetWebworkerEnvironment ? "browser" : "node",
|
|
32825
33442
|
...merged.rolldownOptions
|
|
32826
33443
|
};
|
|
33444
|
+
if (merged.lib && merged.lib.entry == null && input != null) merged.lib.entry = input;
|
|
32827
33445
|
if (merged.target === "baseline-widely-available") merged.target = ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET;
|
|
32828
33446
|
if (Array.isArray(merged.target)) merged.target = unique(merged.target);
|
|
32829
33447
|
if (merged.minify === "false") merged.minify = false;
|
|
@@ -32885,7 +33503,9 @@ function resolveRolldownOptions(environment, chunkMetadataMap) {
|
|
|
32885
33503
|
const { logger } = environment;
|
|
32886
33504
|
const ssr = environment.config.consumer === "server";
|
|
32887
33505
|
const resolve = (p) => path.resolve(root, p);
|
|
32888
|
-
const
|
|
33506
|
+
const topLevelInput = environment.config.input;
|
|
33507
|
+
if (libOptions && libOptions.entry == null) throw new Error(`Either "build.lib.entry" or the top-level "input" option is required when "build.lib" is set.`);
|
|
33508
|
+
const input = libOptions ? options.rolldownOptions.input || (typeof libOptions.entry === "string" ? resolve(libOptions.entry) : Array.isArray(libOptions.entry) ? libOptions.entry.map(resolve) : Object.fromEntries(Object.entries(libOptions.entry).map(([alias, file]) => [alias, resolve(file)]))) : typeof options.ssr === "string" ? resolve(options.ssr) : options.rolldownOptions.input || (topLevelInput != null ? topLevelInput : resolve("index.html"));
|
|
32889
33509
|
if (ssr && typeof input === "string" && input.endsWith(".html")) throw new Error("rolldownOptions.input should not be an html file when building for SSR. Please specify a dedicated SSR entry.");
|
|
32890
33510
|
if (options.cssCodeSplit === false) {
|
|
32891
33511
|
if ((typeof input === "string" ? [input] : Array.isArray(input) ? input : Object.values(input)).some((input) => input.endsWith(".css"))) throw new Error(`When "build.cssCodeSplit: false" is set, "rolldownOptions.input" should not include CSS files.`);
|
|
@@ -33067,7 +33687,7 @@ function resolveLibFilename(libOptions, format, entryName, root, extension, pack
|
|
|
33067
33687
|
}
|
|
33068
33688
|
function resolveBuildOutputs(outputs, libOptions, logger) {
|
|
33069
33689
|
if (libOptions) {
|
|
33070
|
-
const libHasMultipleEntries = typeof libOptions.entry !== "string" && Object.values(libOptions.entry).length > 1;
|
|
33690
|
+
const libHasMultipleEntries = typeof libOptions.entry !== "string" && libOptions.entry && Object.values(libOptions.entry).length > 1;
|
|
33071
33691
|
const libFormats = libOptions.formats || (libHasMultipleEntries ? ["es", "cjs"] : ["es", "umd"]);
|
|
33072
33692
|
if (!Array.isArray(outputs)) {
|
|
33073
33693
|
if (libFormats.includes("umd") || libFormats.includes("iife")) {
|
|
@@ -34301,8 +34921,8 @@ var BundledDev = class {
|
|
|
34301
34921
|
environment;
|
|
34302
34922
|
_devEngine;
|
|
34303
34923
|
initialBuildCompleted = false;
|
|
34924
|
+
_closed = false;
|
|
34304
34925
|
clients = new Clients();
|
|
34305
|
-
invalidateCalledModules = /* @__PURE__ */ new Map();
|
|
34306
34926
|
debouncedFullReload = debounce(20, () => {
|
|
34307
34927
|
this.environment.hot.send({
|
|
34308
34928
|
type: "full-reload",
|
|
@@ -34321,14 +34941,16 @@ var BundledDev = class {
|
|
|
34321
34941
|
if (!this._devEngine) throw new Error(`dev engine was not yet initialized`);
|
|
34322
34942
|
return this._devEngine;
|
|
34323
34943
|
}
|
|
34944
|
+
pendingPayloadFilenames = /* @__PURE__ */ new Set();
|
|
34324
34945
|
async listen() {
|
|
34946
|
+
this._closed = false;
|
|
34325
34947
|
debug$1?.("INITIAL: setup bundle options");
|
|
34326
34948
|
const rolldownOptions = await this.getRolldownOptions();
|
|
34327
34949
|
if (Array.isArray(rolldownOptions.output) && rolldownOptions.output.length > 1) throw new Error("multiple output options are not supported in dev mode");
|
|
34328
34950
|
const outputOptions = Array.isArray(rolldownOptions.output) ? rolldownOptions.output[0] : rolldownOptions.output;
|
|
34329
|
-
this.environment.hot.on("vite:
|
|
34951
|
+
this.environment.hot.on("vite:client-connected", async (payload, client) => {
|
|
34330
34952
|
this.clients.setupIfNeeded(client, payload.clientId);
|
|
34331
|
-
this.devEngine.
|
|
34953
|
+
this.devEngine.registerClient(payload.clientId);
|
|
34332
34954
|
});
|
|
34333
34955
|
this.environment.hot.on("vite:client:connect", (_payload, client) => {
|
|
34334
34956
|
if (this.lastBuildError) {
|
|
@@ -34360,10 +34982,7 @@ var BundledDev = class {
|
|
|
34360
34982
|
}
|
|
34361
34983
|
for (const { clientId, update } of updates) {
|
|
34362
34984
|
const client = this.clients.get(clientId);
|
|
34363
|
-
if (client)
|
|
34364
|
-
this.invalidateCalledModules.get(client)?.clear();
|
|
34365
|
-
this.handleHmrOutput(client, changedFiles, update);
|
|
34366
|
-
}
|
|
34985
|
+
if (client) this.handleHmrOutput(client, changedFiles, update);
|
|
34367
34986
|
}
|
|
34368
34987
|
},
|
|
34369
34988
|
onOutput: (result) => {
|
|
@@ -34396,46 +35015,29 @@ var BundledDev = class {
|
|
|
34396
35015
|
debug$1?.("INITIAL: run error", e);
|
|
34397
35016
|
});
|
|
34398
35017
|
this.waitForInitialBuildFinish().then(() => {
|
|
35018
|
+
if (this._closed) return;
|
|
34399
35019
|
debug$1?.("INITIAL: build done");
|
|
34400
|
-
this.
|
|
35020
|
+
this.initialBuildCompleted = true;
|
|
35021
|
+
if (!this.lastBuildError) this.environment.hot.send({
|
|
34401
35022
|
type: "full-reload",
|
|
34402
|
-
path: "*"
|
|
35023
|
+
path: "*",
|
|
35024
|
+
ifFallback: true
|
|
34403
35025
|
});
|
|
34404
|
-
this.initialBuildCompleted = true;
|
|
34405
35026
|
});
|
|
34406
35027
|
}
|
|
34407
35028
|
async waitForInitialBuildFinish() {
|
|
35029
|
+
if (this._closed) return;
|
|
34408
35030
|
await this.devEngine.ensureCurrentBuildFinish();
|
|
35031
|
+
if (this._closed) return;
|
|
34409
35032
|
let state = await this.devEngine.getBundleState();
|
|
34410
35033
|
while (this.memoryFiles.size === 0 && !state.lastBuildErrored) {
|
|
34411
35034
|
await setTimeout$1(10);
|
|
35035
|
+
if (this._closed) return;
|
|
34412
35036
|
await this.devEngine.ensureCurrentBuildFinish();
|
|
35037
|
+
if (this._closed) return;
|
|
34413
35038
|
state = await this.devEngine.getBundleState();
|
|
34414
35039
|
}
|
|
34415
35040
|
}
|
|
34416
|
-
async invalidateModule(m, client) {
|
|
34417
|
-
const invalidateCalledModules = this.invalidateCalledModules.get(client);
|
|
34418
|
-
if (invalidateCalledModules?.has(m.path)) {
|
|
34419
|
-
debug$1?.(`INVALIDATE: invalidate received from ${m.path}, but ignored because it was already invalidated`);
|
|
34420
|
-
return;
|
|
34421
|
-
}
|
|
34422
|
-
debug$1?.(`INVALIDATE: invalidate received from ${m.path}, re-triggering HMR`);
|
|
34423
|
-
if (!invalidateCalledModules) this.invalidateCalledModules.set(client, /* @__PURE__ */ new Set([]));
|
|
34424
|
-
this.invalidateCalledModules.get(client).add(m.path);
|
|
34425
|
-
let update;
|
|
34426
|
-
try {
|
|
34427
|
-
update = (await this.devEngine.invalidate(m.path, m.firstInvalidatedBy)).find((u) => this.clients.get(u.clientId) === client)?.update;
|
|
34428
|
-
} catch (e) {
|
|
34429
|
-
client.send({
|
|
34430
|
-
type: "error",
|
|
34431
|
-
err: prepareError(e)
|
|
34432
|
-
});
|
|
34433
|
-
return;
|
|
34434
|
-
}
|
|
34435
|
-
if (!update) return;
|
|
34436
|
-
if (update.type === "Patch") this.environment.logger.info(import_picocolors.default.yellow(`hmr invalidate `) + import_picocolors.default.dim(m.path) + (m.message ? ` ${m.message}` : ""), { timestamp: true });
|
|
34437
|
-
this.handleHmrOutput(client, [m.path], update, { firstInvalidatedBy: m.firstInvalidatedBy });
|
|
34438
|
-
}
|
|
34439
35041
|
async triggerBundleRegenerationIfStale() {
|
|
34440
35042
|
const bundleState = await this.devEngine.getBundleState();
|
|
34441
35043
|
if (this.initialBuildCompleted && bundleState.lastBuildErrored && bundleState.lastErrorStage === "Hmr") {
|
|
@@ -34458,9 +35060,22 @@ var BundledDev = class {
|
|
|
34458
35060
|
async triggerLazyBundling(moduleId, clientId) {
|
|
34459
35061
|
if (!moduleId || !clientId) return;
|
|
34460
35062
|
debug$1?.(`TRIGGER-LAZY: trigger lazy bundling for module ${moduleId} for client ${clientId}`);
|
|
34461
|
-
|
|
35063
|
+
const result = await this.devEngine.compileEntry(moduleId, clientId);
|
|
35064
|
+
this.pendingPayloadFilenames.add(result.filename);
|
|
35065
|
+
return result;
|
|
35066
|
+
}
|
|
35067
|
+
/**
|
|
35068
|
+
* Called by the serving middlewares when the response for a payload completed.
|
|
35069
|
+
* Only delivered payloads are recorded on the server's per-client ship map, so
|
|
35070
|
+
* later chunks may omit a module only if the payload carrying it was delivered.
|
|
35071
|
+
*
|
|
35072
|
+
* Note: the payload filename is unique across all clients.
|
|
35073
|
+
*/
|
|
35074
|
+
markPayloadDelivered(filename) {
|
|
35075
|
+
if (this.pendingPayloadFilenames.delete(filename)) this.devEngine.notifyPayloadDelivered(filename);
|
|
34462
35076
|
}
|
|
34463
35077
|
async close() {
|
|
35078
|
+
this._closed = true;
|
|
34464
35079
|
this.memoryFiles.clear();
|
|
34465
35080
|
await this._devEngine?.close();
|
|
34466
35081
|
this.initialBuildCompleted = false;
|
|
@@ -34515,46 +35130,35 @@ var BundledDev = class {
|
|
|
34515
35130
|
}
|
|
34516
35131
|
return rolldownOptions;
|
|
34517
35132
|
}
|
|
34518
|
-
handleHmrOutput(client, files, hmrOutput
|
|
35133
|
+
handleHmrOutput(client, files, hmrOutput) {
|
|
34519
35134
|
if (hmrOutput.type === "Noop") return;
|
|
34520
35135
|
const shortFile = files.map((file) => getShortName(file, this.environment.config.root)).join(", ");
|
|
34521
35136
|
if (hmrOutput.type === "FullReload") {
|
|
34522
35137
|
const reason = hmrOutput.reason ? import_picocolors.default.dim(` (${hmrOutput.reason})`) : "";
|
|
34523
35138
|
this.environment.logger.info(import_picocolors.default.green(`trigger page reload `) + import_picocolors.default.dim(shortFile) + reason, {
|
|
34524
|
-
clear:
|
|
35139
|
+
clear: true,
|
|
34525
35140
|
timestamp: true
|
|
34526
35141
|
});
|
|
34527
|
-
|
|
34528
|
-
this.debouncedFullReload();
|
|
34529
|
-
});
|
|
34530
|
-
else this.fullReloadPending = true;
|
|
35142
|
+
this.fullReloadPending = true;
|
|
34531
35143
|
return;
|
|
34532
35144
|
}
|
|
34533
35145
|
debug$1?.(`handle hmr output for ${shortFile}`, {
|
|
34534
35146
|
...hmrOutput,
|
|
34535
35147
|
code: typeof hmrOutput.code === "string" ? "[code]" : hmrOutput.code
|
|
34536
35148
|
});
|
|
35149
|
+
this.pendingPayloadFilenames.add(hmrOutput.filename);
|
|
34537
35150
|
this.memoryFiles.set(hmrOutput.filename, { source: hmrOutput.code + "\n; export {}" });
|
|
34538
35151
|
if (hmrOutput.sourcemapFilename && hmrOutput.sourcemap) this.memoryFiles.set(hmrOutput.sourcemapFilename, { source: hmrOutput.sourcemap });
|
|
34539
|
-
const updates = hmrOutput.hmrBoundaries.map((boundary) => {
|
|
34540
|
-
return {
|
|
34541
|
-
type: "js-update",
|
|
34542
|
-
url: hmrOutput.filename,
|
|
34543
|
-
path: boundary.boundary,
|
|
34544
|
-
acceptedPath: boundary.acceptedVia,
|
|
34545
|
-
firstInvalidatedBy: invalidateInformation?.firstInvalidatedBy,
|
|
34546
|
-
timestamp: Date.now()
|
|
34547
|
-
};
|
|
34548
|
-
});
|
|
34549
35152
|
client.send({
|
|
34550
|
-
type: "update",
|
|
34551
|
-
|
|
35153
|
+
type: "bundled-dev-update",
|
|
35154
|
+
changedIds: hmrOutput.changedIds,
|
|
35155
|
+
url: hmrOutput.filename,
|
|
35156
|
+
seq: hmrOutput.seq
|
|
34552
35157
|
});
|
|
34553
|
-
const
|
|
34554
|
-
|
|
34555
|
-
if (truncated) debugHmr?.(`hmr update ${filePaths.join(", ")}`);
|
|
35158
|
+
const { formatted, truncated } = formatAndTruncateFileList(hmrOutput.changedIds);
|
|
35159
|
+
if (truncated) debugHmr?.(`hmr update ${hmrOutput.changedIds.join(", ")}`);
|
|
34556
35160
|
this.environment.logger.info(import_picocolors.default.green(`hmr update `) + import_picocolors.default.dim(formatted), {
|
|
34557
|
-
clear:
|
|
35161
|
+
clear: true,
|
|
34558
35162
|
timestamp: true
|
|
34559
35163
|
});
|
|
34560
35164
|
}
|
|
@@ -34728,10 +35332,7 @@ var DevEnvironment = class extends BaseEnvironment {
|
|
|
34728
35332
|
}
|
|
34729
35333
|
}
|
|
34730
35334
|
invalidateModule(m, _client) {
|
|
34731
|
-
if (this.bundledDev)
|
|
34732
|
-
this.bundledDev.invalidateModule(m, _client);
|
|
34733
|
-
return;
|
|
34734
|
-
}
|
|
35335
|
+
if (this.bundledDev) return;
|
|
34735
35336
|
const mod = this.moduleGraph.urlToModuleMap.get(m.path);
|
|
34736
35337
|
if (mod && mod.isSelfAccepting && mod.lastHMRTimestamp > 0 && !mod.lastHMRInvalidationReceived) {
|
|
34737
35338
|
mod.lastHMRInvalidationReceived = true;
|
|
@@ -34744,8 +35345,7 @@ var DevEnvironment = class extends BaseEnvironment {
|
|
|
34744
35345
|
this._closing = true;
|
|
34745
35346
|
this._crawlEndFinder.cancel();
|
|
34746
35347
|
await Promise.allSettled([
|
|
34747
|
-
this.pluginContainer.close(),
|
|
34748
|
-
this.bundledDev?.close(),
|
|
35348
|
+
this.bundledDev ? this.bundledDev.close() : this.pluginContainer.close(),
|
|
34749
35349
|
this.depsOptimizer?.close(),
|
|
34750
35350
|
isWebSocketServer in this.hot ? Promise.resolve() : this.hot.close(),
|
|
34751
35351
|
(async () => {
|
|
@@ -35044,6 +35644,177 @@ async function preview(inlineConfig = {}) {
|
|
|
35044
35644
|
return server;
|
|
35045
35645
|
}
|
|
35046
35646
|
//#endregion
|
|
35647
|
+
//#region src/node/nativeConfigCompat.ts
|
|
35648
|
+
const jsTsExtRE = /\.[cm]?[jt]sx?$/;
|
|
35649
|
+
const indexFileRE = /^index\.[cm]?[jt]sx?$/;
|
|
35650
|
+
const lastSegmentOf = (specifier) => specifier.slice(specifier.lastIndexOf("/") + 1);
|
|
35651
|
+
/**
|
|
35652
|
+
* A specifier that already carries a JS/TS extension resolves as-is under the
|
|
35653
|
+
* native loader, so it can never be extension-less or a directory index and
|
|
35654
|
+
* needs no resolution to classify.
|
|
35655
|
+
*/
|
|
35656
|
+
const specifierHasJsExtension = (specifier) => jsTsExtRE.test(lastSegmentOf(specifier));
|
|
35657
|
+
function classifyImportRef(ref, resolvedId, file) {
|
|
35658
|
+
const { specifier, line, column } = ref;
|
|
35659
|
+
const base = {
|
|
35660
|
+
file,
|
|
35661
|
+
line,
|
|
35662
|
+
column,
|
|
35663
|
+
specifier
|
|
35664
|
+
};
|
|
35665
|
+
if (specifier.endsWith(".json")) {
|
|
35666
|
+
if (ref.hasTypeJsonAttribute) return void 0;
|
|
35667
|
+
return {
|
|
35668
|
+
type: "json-without-attributes",
|
|
35669
|
+
...base
|
|
35670
|
+
};
|
|
35671
|
+
}
|
|
35672
|
+
if (!resolvedId) return void 0;
|
|
35673
|
+
if (resolvedId.endsWith(".json") && !ref.hasTypeJsonAttribute) return {
|
|
35674
|
+
type: "json-without-attributes",
|
|
35675
|
+
...base
|
|
35676
|
+
};
|
|
35677
|
+
const lastSegment = lastSegmentOf(specifier);
|
|
35678
|
+
const specifierNamesIndex = lastSegment === "index" || indexFileRE.test(lastSegment);
|
|
35679
|
+
if (indexFileRE.test(path.basename(resolvedId)) && !specifierNamesIndex) return {
|
|
35680
|
+
type: "directory-index-import",
|
|
35681
|
+
...base
|
|
35682
|
+
};
|
|
35683
|
+
if (!jsTsExtRE.test(lastSegment)) return {
|
|
35684
|
+
type: "extensionless-import",
|
|
35685
|
+
...base
|
|
35686
|
+
};
|
|
35687
|
+
}
|
|
35688
|
+
const isPathSpecifier = (s) => s.startsWith(".") || path.isAbsolute(s);
|
|
35689
|
+
const hasTypeJson = (attributes) => !!attributes?.some((attr) => {
|
|
35690
|
+
return (attr.key.type === "Identifier" ? attr.key.name : attr.key.value) === "type" && attr.value?.value === "json";
|
|
35691
|
+
});
|
|
35692
|
+
const DIRNAME_FILENAME = {
|
|
35693
|
+
__dirname: "dirname",
|
|
35694
|
+
__filename: "filename"
|
|
35695
|
+
};
|
|
35696
|
+
function analyzeConfigModuleReferences(code, ast, file) {
|
|
35697
|
+
const imports = [];
|
|
35698
|
+
const addImportRef = (source, hasTypeJsonAttribute) => {
|
|
35699
|
+
if (!isPathSpecifier(source.value)) return;
|
|
35700
|
+
const { line, column } = numberToPos(code, source.start);
|
|
35701
|
+
imports.push({
|
|
35702
|
+
specifier: source.value,
|
|
35703
|
+
line,
|
|
35704
|
+
column,
|
|
35705
|
+
hasTypeJsonAttribute
|
|
35706
|
+
});
|
|
35707
|
+
};
|
|
35708
|
+
walk$1(ast, { enter(_node) {
|
|
35709
|
+
const node = _node;
|
|
35710
|
+
switch (node.type) {
|
|
35711
|
+
case "ImportDeclaration":
|
|
35712
|
+
addImportRef(node.source, hasTypeJson(node.attributes));
|
|
35713
|
+
break;
|
|
35714
|
+
case "ExportNamedDeclaration":
|
|
35715
|
+
case "ExportAllDeclaration":
|
|
35716
|
+
if (node.source) addImportRef(node.source, hasTypeJson(node.attributes));
|
|
35717
|
+
break;
|
|
35718
|
+
case "ImportExpression":
|
|
35719
|
+
if (node.source.type === "Literal" && typeof node.source.value === "string") addImportRef(node.source, node.options != null);
|
|
35720
|
+
break;
|
|
35721
|
+
}
|
|
35722
|
+
} });
|
|
35723
|
+
const globals = [];
|
|
35724
|
+
if (code.includes("__dirname") || code.includes("__filename")) {
|
|
35725
|
+
const { globals: freeReferences } = analyze(ast);
|
|
35726
|
+
for (const [name, type] of Object.entries(DIRNAME_FILENAME)) {
|
|
35727
|
+
const node = freeReferences.get(name);
|
|
35728
|
+
if (!node) continue;
|
|
35729
|
+
const { line, column } = numberToPos(code, node.start);
|
|
35730
|
+
globals.push({
|
|
35731
|
+
type,
|
|
35732
|
+
file,
|
|
35733
|
+
line,
|
|
35734
|
+
column
|
|
35735
|
+
});
|
|
35736
|
+
}
|
|
35737
|
+
}
|
|
35738
|
+
return {
|
|
35739
|
+
globals,
|
|
35740
|
+
imports
|
|
35741
|
+
};
|
|
35742
|
+
}
|
|
35743
|
+
const esmStatementTypes = /* @__PURE__ */ new Set([
|
|
35744
|
+
"ImportDeclaration",
|
|
35745
|
+
"ExportNamedDeclaration",
|
|
35746
|
+
"ExportDefaultDeclaration",
|
|
35747
|
+
"ExportAllDeclaration"
|
|
35748
|
+
]);
|
|
35749
|
+
function findEsmSyntaxInCjs(code, ast, file) {
|
|
35750
|
+
for (const node of ast.body) if (esmStatementTypes.has(node.type)) {
|
|
35751
|
+
const { line, column } = numberToPos(code, node.start);
|
|
35752
|
+
return {
|
|
35753
|
+
type: "esm-syntax-in-cjs",
|
|
35754
|
+
file,
|
|
35755
|
+
line,
|
|
35756
|
+
column
|
|
35757
|
+
};
|
|
35758
|
+
}
|
|
35759
|
+
}
|
|
35760
|
+
function describeIncompatibility(item, root) {
|
|
35761
|
+
const loc = `${normalizePath(path.relative(root, item.file))}:${item.line}`;
|
|
35762
|
+
switch (item.type) {
|
|
35763
|
+
case "dirname": return `\`__dirname\` (${loc}). Use \`import.meta.dirname\` instead`;
|
|
35764
|
+
case "filename": return `\`__filename\` (${loc}). Use \`import.meta.filename\` instead`;
|
|
35765
|
+
case "extensionless-import": return `import "${item.specifier}" without a file extension (${loc}). Add the file extension`;
|
|
35766
|
+
case "directory-index-import": return `import "${item.specifier}" resolves to a directory index (${loc}). Import the index file directly`;
|
|
35767
|
+
case "json-without-attributes": return item.specifier?.endsWith(".json") ? `JSON import "${item.specifier}" without import attributes (${loc}). Add \`with { type: 'json' }\`` : `import "${item.specifier}" resolves to a JSON file (${loc}). Import it with a \`.json\` extension and \`with { type: 'json' }\``;
|
|
35768
|
+
case "esm-syntax-in-cjs": return `ESM syntax in a file loaded as CommonJS (${loc}). Use a \`.mjs\` extension or set \`"type": "module"\` in the closest package.json`;
|
|
35769
|
+
}
|
|
35770
|
+
}
|
|
35771
|
+
function formatNativeConfigIncompatWarning(items, root) {
|
|
35772
|
+
const header = "Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:";
|
|
35773
|
+
const lines = items.map((it) => ` - ${describeIncompatibility(it, root)}`);
|
|
35774
|
+
const footer = `Set \`VITE_CONFIG_NATIVE_IGNORE_WARNING=true\` to suppress this warning.`;
|
|
35775
|
+
return import_picocolors.default.yellow([
|
|
35776
|
+
`(!) ${header}`,
|
|
35777
|
+
...lines,
|
|
35778
|
+
footer
|
|
35779
|
+
].join("\n"));
|
|
35780
|
+
}
|
|
35781
|
+
function createNativeConfigCompatPlugin(collector) {
|
|
35782
|
+
return {
|
|
35783
|
+
name: "vite:native-config-compat-check",
|
|
35784
|
+
transform: {
|
|
35785
|
+
filter: { id: {
|
|
35786
|
+
include: /\.[cm]?[jt]sx?$/,
|
|
35787
|
+
exclude: /^\0/
|
|
35788
|
+
} },
|
|
35789
|
+
async handler(code, id) {
|
|
35790
|
+
const isESM = typeof process.versions.deno === "string" || isFilePathESM(id);
|
|
35791
|
+
let program;
|
|
35792
|
+
try {
|
|
35793
|
+
const result = parseSync(id, code);
|
|
35794
|
+
if (result.errors.length > 0) return null;
|
|
35795
|
+
program = result.program;
|
|
35796
|
+
} catch {
|
|
35797
|
+
return null;
|
|
35798
|
+
}
|
|
35799
|
+
if (!isESM) {
|
|
35800
|
+
const finding = findEsmSyntaxInCjs(code, program, id);
|
|
35801
|
+
if (finding) collector.push(finding);
|
|
35802
|
+
return null;
|
|
35803
|
+
}
|
|
35804
|
+
const { globals, imports } = analyzeConfigModuleReferences(code, program, id);
|
|
35805
|
+
for (const g of globals) collector.push(g);
|
|
35806
|
+
for (const ref of imports) {
|
|
35807
|
+
let resolvedId = null;
|
|
35808
|
+
if (!ref.specifier.endsWith(".json") && !specifierHasJsExtension(ref.specifier)) resolvedId = (await this.resolve(ref.specifier, id))?.id ?? null;
|
|
35809
|
+
const finding = classifyImportRef(ref, resolvedId, id);
|
|
35810
|
+
if (finding) collector.push(finding);
|
|
35811
|
+
}
|
|
35812
|
+
return null;
|
|
35813
|
+
}
|
|
35814
|
+
}
|
|
35815
|
+
};
|
|
35816
|
+
}
|
|
35817
|
+
//#endregion
|
|
35047
35818
|
//#region src/node/ssr/index.ts
|
|
35048
35819
|
const _ssrConfigDefaults = Object.freeze({
|
|
35049
35820
|
target: "node",
|
|
@@ -35373,6 +36144,28 @@ const configDefaults = Object.freeze({
|
|
|
35373
36144
|
environments: {},
|
|
35374
36145
|
appType: "spa"
|
|
35375
36146
|
});
|
|
36147
|
+
function resolveInput(input, root) {
|
|
36148
|
+
if (input === void 0) return;
|
|
36149
|
+
if (typeof input === "string") {
|
|
36150
|
+
const unescapedInput = unescapeGlobCharacters(input);
|
|
36151
|
+
return normalizePath(path.resolve(root, unescapedInput));
|
|
36152
|
+
}
|
|
36153
|
+
if (Array.isArray(input)) return input.map((inp) => {
|
|
36154
|
+
const unescapedInput = unescapeGlobCharacters(inp);
|
|
36155
|
+
return normalizePath(path.resolve(root, unescapedInput));
|
|
36156
|
+
});
|
|
36157
|
+
const resolved = {};
|
|
36158
|
+
for (const key in input) {
|
|
36159
|
+
const unescapedInput = unescapeGlobCharacters(input[key]);
|
|
36160
|
+
resolved[key] = normalizePath(path.resolve(root, unescapedInput));
|
|
36161
|
+
}
|
|
36162
|
+
return resolved;
|
|
36163
|
+
}
|
|
36164
|
+
const escapedGlobCharactersRE = /\\([*?[\]{}()!+@|])/g;
|
|
36165
|
+
function unescapeGlobCharacters(value) {
|
|
36166
|
+
if (isDynamicPattern(value)) throw new Error(`\`input\` cannot contain glob characters. They are reserved, so the ${JSON.stringify(value)} is not allowed. Please escape them with a backslash (\\)`);
|
|
36167
|
+
return value.replace(escapedGlobCharactersRE, "$1");
|
|
36168
|
+
}
|
|
35376
36169
|
function resolveDevEnvironmentOptions(dev, environmentName, consumer, preTransformRequest) {
|
|
35377
36170
|
const resolved = mergeWithDefaults({
|
|
35378
36171
|
...configDefaults.dev,
|
|
@@ -35387,7 +36180,7 @@ function resolveDevEnvironmentOptions(dev, environmentName, consumer, preTransfo
|
|
|
35387
36180
|
sourcemapIgnoreList: resolved.sourcemapIgnoreList === false ? () => false : resolved.sourcemapIgnoreList
|
|
35388
36181
|
};
|
|
35389
36182
|
}
|
|
35390
|
-
function resolveEnvironmentOptions(options, alias, preserveSymlinks, forceOptimizeDeps, logger, environmentName, isBuild, isBundledDev, isSsrTargetWebworkerSet, preTransformRequests) {
|
|
36183
|
+
function resolveEnvironmentOptions(options, alias, preserveSymlinks, root, forceOptimizeDeps, logger, environmentName, isBuild, isBundledDev, isSsrTargetWebworkerSet, preTransformRequests) {
|
|
35391
36184
|
const isClientEnvironment = environmentName === "client";
|
|
35392
36185
|
const consumer = options.consumer ?? (isClientEnvironment ? "client" : "server");
|
|
35393
36186
|
const isSsrTargetWebworkerEnvironment = isSsrTargetWebworkerSet && environmentName === "ssr";
|
|
@@ -35401,13 +36194,14 @@ function resolveEnvironmentOptions(options, alias, preserveSymlinks, forceOptimi
|
|
|
35401
36194
|
}
|
|
35402
36195
|
const resolve = resolveEnvironmentResolveOptions(options.resolve, alias, preserveSymlinks, logger, consumer, isSsrTargetWebworkerEnvironment);
|
|
35403
36196
|
return {
|
|
36197
|
+
input: resolveInput(options.input, root),
|
|
35404
36198
|
define: options.define,
|
|
35405
36199
|
resolve,
|
|
35406
36200
|
keepProcessEnv: options.keepProcessEnv ?? (isSsrTargetWebworkerEnvironment ? false : consumer === "server"),
|
|
35407
36201
|
consumer,
|
|
35408
36202
|
optimizeDeps: resolveDepOptimizationOptions(options.optimizeDeps, resolve.preserveSymlinks, forceOptimizeDeps, consumer, logger),
|
|
35409
36203
|
dev: resolveDevEnvironmentOptions(options.dev, environmentName, consumer, preTransformRequests),
|
|
35410
|
-
build: resolveBuildEnvironmentOptions(options.build ?? {}, logger, consumer, isBundled && !isBuild, isSsrTargetWebworkerEnvironment),
|
|
36204
|
+
build: resolveBuildEnvironmentOptions(options.build ?? {}, logger, consumer, isBundled && !isBuild, options.input, isSsrTargetWebworkerEnvironment),
|
|
35411
36205
|
isBundled,
|
|
35412
36206
|
plugins: void 0,
|
|
35413
36207
|
optimizeDepsPluginNames: void 0
|
|
@@ -35599,7 +36393,11 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
|
35599
36393
|
const tsconfigPathsPlugin = userPlugins.find((p) => p.name === "vite-tsconfig-paths" || p.name === "vite-plugin-tsconfig-paths");
|
|
35600
36394
|
if (tsconfigPathsPlugin) logger.warnOnce(import_picocolors.default.yellow(`The plugin ${JSON.stringify(tsconfigPathsPlugin.name)} is detected. Vite now supports tsconfig paths resolution natively via the ${import_picocolors.default.bold("resolve.tsconfigPaths")} option. You can remove the plugin and set ${import_picocolors.default.bold("resolve.tsconfigPaths: true")} in your Vite config instead.`));
|
|
35601
36395
|
if (process.versions.pnp) logger.warnOnce(import_picocolors.default.yellow(`Using Yarn PnP with Vite is discouraged and PnP-specific bugs will no longer be actively worked on. Please switch to a different ${import_picocolors.default.bold("nodeLinker")} mode or to a different package manager.`));
|
|
35602
|
-
|
|
36396
|
+
let nonNormalizedResolvedRoot = config.root ? path.resolve(config.root) : process.cwd();
|
|
36397
|
+
try {
|
|
36398
|
+
nonNormalizedResolvedRoot = safeRealpathSync(nonNormalizedResolvedRoot);
|
|
36399
|
+
} catch {}
|
|
36400
|
+
const resolvedRoot = normalizePath(nonNormalizedResolvedRoot);
|
|
35603
36401
|
checkBadCharactersInPath("The project root", "directory", resolvedRoot, logger);
|
|
35604
36402
|
const configEnvironmentsClient = config.environments.client;
|
|
35605
36403
|
configEnvironmentsClient.dev ??= {};
|
|
@@ -35631,6 +36429,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
|
35631
36429
|
const defaultEnvironmentOptions = getDefaultEnvironmentOptions(config);
|
|
35632
36430
|
const defaultClientEnvironmentOptions = {
|
|
35633
36431
|
...defaultEnvironmentOptions,
|
|
36432
|
+
input: config.input,
|
|
35634
36433
|
resolve: config.resolve,
|
|
35635
36434
|
optimizeDeps: config.optimizeDeps
|
|
35636
36435
|
};
|
|
@@ -35654,10 +36453,10 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
|
35654
36453
|
config.resolve.mainFields = config.environments.client.resolve?.mainFields;
|
|
35655
36454
|
const resolvedDefaultResolve = resolveResolveOptions(config.resolve, logger);
|
|
35656
36455
|
const resolvedEnvironments = {};
|
|
35657
|
-
for (const environmentName of Object.keys(config.environments)) resolvedEnvironments[environmentName] = resolveEnvironmentOptions(config.environments[environmentName], resolvedDefaultResolve.alias, resolvedDefaultResolve.preserveSymlinks, inlineConfig.forceOptimizeDeps, logger, environmentName, isBuild, isBundledDev, config.ssr?.target === "webworker", config.server?.preTransformRequests);
|
|
36456
|
+
for (const environmentName of Object.keys(config.environments)) resolvedEnvironments[environmentName] = resolveEnvironmentOptions(config.environments[environmentName], resolvedDefaultResolve.alias, resolvedDefaultResolve.preserveSymlinks, resolvedRoot, inlineConfig.forceOptimizeDeps, logger, environmentName, isBuild, isBundledDev, config.ssr?.target === "webworker", config.server?.preTransformRequests);
|
|
35658
36457
|
const backwardCompatibleOptimizeDeps = resolvedEnvironments.client.optimizeDeps;
|
|
35659
36458
|
const resolvedDevEnvironmentOptions = resolveDevEnvironmentOptions(config.dev, void 0, void 0);
|
|
35660
|
-
const resolvedBuildOptions = resolveBuildEnvironmentOptions(config.build ?? {}, logger, void 0, isBundledDev);
|
|
36459
|
+
const resolvedBuildOptions = resolveBuildEnvironmentOptions(config.build ?? {}, logger, void 0, isBundledDev, config.input);
|
|
35661
36460
|
const ssr = resolveSSROptions({
|
|
35662
36461
|
...config.ssr,
|
|
35663
36462
|
external: resolvedEnvironments.ssr?.resolve.external,
|
|
@@ -35814,6 +36613,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
|
|
|
35814
36613
|
removeSsrLoadModule: "warn"
|
|
35815
36614
|
} : config.future,
|
|
35816
36615
|
ssr,
|
|
36616
|
+
input: resolveInput(config.input, resolvedRoot),
|
|
35817
36617
|
optimizeDeps: backwardCompatibleOptimizeDeps,
|
|
35818
36618
|
resolve: resolvedDefaultResolve,
|
|
35819
36619
|
dev: resolvedDevEnvironmentOptions,
|
|
@@ -35941,7 +36741,7 @@ async function loadConfigFromFile(configEnv, configFile, configRoot = process.cw
|
|
|
35941
36741
|
return null;
|
|
35942
36742
|
}
|
|
35943
36743
|
try {
|
|
35944
|
-
const { configExport, dependencies } = await (configLoader === "bundle" ? bundleAndLoadConfigFile : configLoader === "runner" ? runnerImportConfigFile : nativeImportConfigFile
|
|
36744
|
+
const { configExport, dependencies } = await (configLoader === "bundle" ? bundleAndLoadConfigFile(resolvedPath, configRoot, logLevel, customLogger) : configLoader === "runner" ? runnerImportConfigFile(resolvedPath) : nativeImportConfigFile(resolvedPath));
|
|
35945
36745
|
debug?.(`config file loaded in ${getTime()}`);
|
|
35946
36746
|
const config = await (typeof configExport === "function" ? configExport(configEnv) : configExport);
|
|
35947
36747
|
if (!isObject$1(config)) throw new Error(`config must export or return an object.`);
|
|
@@ -35978,11 +36778,13 @@ async function runnerImportConfigFile(resolvedPath) {
|
|
|
35978
36778
|
dependencies
|
|
35979
36779
|
};
|
|
35980
36780
|
}
|
|
35981
|
-
async function bundleAndLoadConfigFile(resolvedPath) {
|
|
36781
|
+
async function bundleAndLoadConfigFile(resolvedPath, configRoot, logLevel, customLogger) {
|
|
35982
36782
|
const isESM = typeof process.versions.deno === "string" || isFilePathESM(resolvedPath);
|
|
35983
36783
|
const bundled = await bundleConfigFile(resolvedPath, isESM);
|
|
36784
|
+
const userConfig = await loadConfigFromBundledFile(resolvedPath, bundled.code, isESM);
|
|
36785
|
+
if (bundled.nativeIncompatibilities.length > 0) createLogger(logLevel, { customLogger }).warn(formatNativeConfigIncompatWarning(bundled.nativeIncompatibilities, configRoot));
|
|
35984
36786
|
return {
|
|
35985
|
-
configExport:
|
|
36787
|
+
configExport: userConfig,
|
|
35986
36788
|
dependencies: bundled.dependencies
|
|
35987
36789
|
};
|
|
35988
36790
|
}
|
|
@@ -35994,6 +36796,7 @@ async function bundleConfigFile(fileName, isESM) {
|
|
|
35994
36796
|
const importMetaUrlVarName = "__vite_injected_original_import_meta_url";
|
|
35995
36797
|
const importMetaResolveVarName = "__vite_injected_original_import_meta_resolve";
|
|
35996
36798
|
const importMetaResolveRegex = /import\.meta\s*\.\s*resolve/;
|
|
36799
|
+
const nativeIncompatibilities = [];
|
|
35997
36800
|
const bundle = await rolldown({
|
|
35998
36801
|
input: fileName,
|
|
35999
36802
|
platform: "node",
|
|
@@ -36009,68 +36812,72 @@ async function bundleConfigFile(fileName, isESM) {
|
|
|
36009
36812
|
} },
|
|
36010
36813
|
treeshake: false,
|
|
36011
36814
|
tsconfig: false,
|
|
36012
|
-
plugins: [
|
|
36013
|
-
|
|
36014
|
-
|
|
36015
|
-
|
|
36016
|
-
|
|
36017
|
-
|
|
36018
|
-
|
|
36019
|
-
id
|
|
36020
|
-
|
|
36021
|
-
|
|
36022
|
-
|
|
36023
|
-
|
|
36024
|
-
|
|
36025
|
-
idFsPath
|
|
36026
|
-
|
|
36027
|
-
|
|
36028
|
-
|
|
36029
|
-
|
|
36030
|
-
|
|
36031
|
-
|
|
36032
|
-
|
|
36033
|
-
canResolveWithImport =
|
|
36034
|
-
|
|
36035
|
-
|
|
36815
|
+
plugins: [
|
|
36816
|
+
!process.env.VITE_CONFIG_NATIVE_IGNORE_WARNING && createNativeConfigCompatPlugin(nativeIncompatibilities),
|
|
36817
|
+
{
|
|
36818
|
+
name: "externalize-deps",
|
|
36819
|
+
resolveId: {
|
|
36820
|
+
filter: { id: /^[^.#].*/ },
|
|
36821
|
+
handler(id, importer, { kind }) {
|
|
36822
|
+
if (!importer || path.isAbsolute(id) || isNodeBuiltin(id)) return;
|
|
36823
|
+
if (isNodeLikeBuiltin(id) || id.startsWith("npm:")) return {
|
|
36824
|
+
id,
|
|
36825
|
+
external: true
|
|
36826
|
+
};
|
|
36827
|
+
const isImport = isESM || kind === "dynamic-import";
|
|
36828
|
+
let idFsPath;
|
|
36829
|
+
try {
|
|
36830
|
+
idFsPath = nodeResolveWithVite(id, importer, {
|
|
36831
|
+
root,
|
|
36832
|
+
isRequire: !isImport
|
|
36833
|
+
});
|
|
36834
|
+
} catch (e) {
|
|
36835
|
+
if (!isImport) {
|
|
36836
|
+
let canResolveWithImport = false;
|
|
36837
|
+
try {
|
|
36838
|
+
canResolveWithImport = !!nodeResolveWithVite(id, importer, { root });
|
|
36839
|
+
} catch {}
|
|
36840
|
+
if (canResolveWithImport) throw new Error(`Failed to resolve ${JSON.stringify(id)}. This package is ESM only but it was tried to load by \`require\`. See https://vite.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.`);
|
|
36841
|
+
}
|
|
36842
|
+
throw e;
|
|
36036
36843
|
}
|
|
36037
|
-
|
|
36844
|
+
if (!idFsPath) return;
|
|
36845
|
+
if (idFsPath.endsWith(".json")) return idFsPath;
|
|
36846
|
+
if (idFsPath && isImport) idFsPath = pathToFileURL(idFsPath).href;
|
|
36847
|
+
return {
|
|
36848
|
+
id: idFsPath,
|
|
36849
|
+
external: true
|
|
36850
|
+
};
|
|
36038
36851
|
}
|
|
36039
|
-
if (!idFsPath) return;
|
|
36040
|
-
if (idFsPath.endsWith(".json")) return idFsPath;
|
|
36041
|
-
if (idFsPath && isImport) idFsPath = pathToFileURL(idFsPath).href;
|
|
36042
|
-
return {
|
|
36043
|
-
id: idFsPath,
|
|
36044
|
-
external: true
|
|
36045
|
-
};
|
|
36046
36852
|
}
|
|
36047
|
-
}
|
|
36048
|
-
|
|
36049
|
-
|
|
36050
|
-
|
|
36051
|
-
|
|
36052
|
-
|
|
36053
|
-
|
|
36054
|
-
|
|
36055
|
-
|
|
36056
|
-
|
|
36057
|
-
|
|
36058
|
-
|
|
36059
|
-
|
|
36060
|
-
|
|
36061
|
-
|
|
36062
|
-
|
|
36063
|
-
|
|
36064
|
-
|
|
36065
|
-
|
|
36066
|
-
|
|
36067
|
-
|
|
36068
|
-
|
|
36069
|
-
|
|
36070
|
-
|
|
36853
|
+
},
|
|
36854
|
+
{
|
|
36855
|
+
name: "inject-file-scope-variables",
|
|
36856
|
+
transform: {
|
|
36857
|
+
filter: { id: /\.[cm]?[jt]s$/ },
|
|
36858
|
+
handler(code, id) {
|
|
36859
|
+
let injectValues = `const ${dirnameVarName} = ${JSON.stringify(path.dirname(id))};const ${filenameVarName} = ${JSON.stringify(id)};const ${importMetaUrlVarName} = ${JSON.stringify(pathToFileURL(id).href)};`;
|
|
36860
|
+
if (importMetaResolveRegex.test(code)) if (isESM) {
|
|
36861
|
+
if (!importMetaResolverRegistered) {
|
|
36862
|
+
importMetaResolverRegistered = true;
|
|
36863
|
+
createImportMetaResolver();
|
|
36864
|
+
}
|
|
36865
|
+
injectValues += `const ${importMetaResolveVarName} = (specifier, importer = ${importMetaUrlVarName}) => (${importMetaResolveWithCustomHookString})(specifier, importer);`;
|
|
36866
|
+
} else injectValues += `const ${importMetaResolveVarName} = (specifier, importer = ${importMetaUrlVarName}) => { throw new Error('import.meta.resolve is not supported in CJS config files') };`;
|
|
36867
|
+
let injectedContents;
|
|
36868
|
+
if (code.startsWith("#!")) {
|
|
36869
|
+
let firstLineEndIndex = code.indexOf("\n");
|
|
36870
|
+
if (firstLineEndIndex < 0) firstLineEndIndex = code.length;
|
|
36871
|
+
injectedContents = code.slice(0, firstLineEndIndex + 1) + injectValues + code.slice(firstLineEndIndex + 1);
|
|
36872
|
+
} else injectedContents = injectValues + code;
|
|
36873
|
+
return {
|
|
36874
|
+
code: injectedContents,
|
|
36875
|
+
map: null
|
|
36876
|
+
};
|
|
36877
|
+
}
|
|
36071
36878
|
}
|
|
36072
36879
|
}
|
|
36073
|
-
|
|
36880
|
+
]
|
|
36074
36881
|
});
|
|
36075
36882
|
const result = await bundle.generate({
|
|
36076
36883
|
format: isESM ? "esm" : "cjs",
|
|
@@ -36087,7 +36894,8 @@ async function bundleConfigFile(fileName, isESM) {
|
|
|
36087
36894
|
collectAllModules(bundleChunks, entryChunk.fileName, allModules);
|
|
36088
36895
|
return {
|
|
36089
36896
|
code: entryChunk.code,
|
|
36090
|
-
dependencies: [...allModules].filter((m) => !m.startsWith("\0"))
|
|
36897
|
+
dependencies: [...allModules].filter((m) => !m.startsWith("\0")),
|
|
36898
|
+
nativeIncompatibilities
|
|
36091
36899
|
};
|
|
36092
36900
|
}
|
|
36093
36901
|
function collectAllModules(bundle, fileName, allModules, analyzedModules = /* @__PURE__ */ new Set()) {
|
|
@@ -36223,4 +37031,4 @@ const parseAst$1 = parseAst;
|
|
|
36223
37031
|
const parseAstAsync$1 = parseAstAsync;
|
|
36224
37032
|
const esbuildVersion = "0.25.0";
|
|
36225
37033
|
//#endregion
|
|
36226
|
-
export { mergeConfig as $, createServer$2 as A, ssrTransform as B, fetchModule as C, optimizeDeps as D, createBuilder as E, createIdResolver as F, resolveEnvPrefix as G, createServerModuleRunnerTransport as H, perEnvironmentState as I, createLogger as J, transformWithOxc as K, isFileLoadingAllowed as L, formatPostcssSourceMap as M, preprocessCSS as N, optimizer_exports as O, searchForWorkspaceRoot as P, mergeAlias as Q, isFileServingAllowed as R, DevEnvironment as S, build as T, buildErrorMessage as U, createServerModuleRunner as V, loadEnv as W, createFilter$1 as X, perEnvironmentPlugin as Y, isCSSRequest as Z, runnerImport as _, minifySync as a, DEFAULT_CLIENT_MAIN_FIELDS as at, createRunnableDevEnvironment as b, parseAstAsync$1 as c, DEFAULT_SERVER_MAIN_FIELDS as ct, isFetchableDevEnvironment as d, require_picocolors as dt, normalizePath as et, config_exports as f, __commonJSMin as ft, sortUserPlugins as g, resolveConfig as h, minify as i, DEFAULT_CLIENT_CONDITIONS as it, server_exports as j, createServerHotChannel as k, parseSync as l, VERSION as lt, loadConfigFromFile as m, __toESM as mt, esbuildVersion as n, rollupVersion as nt, parse as o, DEFAULT_EXTERNAL_CONDITIONS as ot, defineConfig as p, __require as pt, transformWithEsbuild as q, esmExternalRequirePlugin$1 as r, withFilter as rt, parseAst$1 as s, DEFAULT_SERVER_CONDITIONS as st, Visitor as t, rolldownVersion as tt, createFetchableDevEnvironment as u, defaultAllowedOrigins as ut, preview as v, BuildEnvironment as w, isRunnableDevEnvironment as x, preview_exports as y, send$1 as z };
|
|
37034
|
+
export { mergeConfig as $, createServer$2 as A, ssrTransform as B, fetchModule as C, optimizeDeps as D, createBuilder as E, createIdResolver as F, resolveEnvPrefix as G, createServerModuleRunnerTransport as H, perEnvironmentState as I, createLogger as J, transformWithOxc as K, isFileLoadingAllowed as L, formatPostcssSourceMap as M, preprocessCSS as N, optimizer_exports as O, searchForWorkspaceRoot as P, mergeAlias as Q, isFileServingAllowed as R, DevEnvironment as S, build as T, buildErrorMessage as U, createServerModuleRunner as V, loadEnv as W, createFilter$1 as X, perEnvironmentPlugin as Y, isCSSRequest as Z, runnerImport as _, minifySync as a, DEFAULT_CLIENT_MAIN_FIELDS as at, createRunnableDevEnvironment as b, parseAstAsync$1 as c, DEFAULT_SERVER_MAIN_FIELDS as ct, isFetchableDevEnvironment as d, require_picocolors as dt, normalizePath as et, config_exports as f, __commonJSMin as ft, sortUserPlugins as g, resolveConfig as h, minify as i, DEFAULT_CLIENT_CONDITIONS as it, server_exports as j, createServerHotChannel as k, parseSync$1 as l, VERSION as lt, loadConfigFromFile as m, __toESM as mt, esbuildVersion as n, rollupVersion as nt, parse as o, DEFAULT_EXTERNAL_CONDITIONS as ot, defineConfig as p, __require as pt, transformWithEsbuild as q, esmExternalRequirePlugin$1 as r, withFilter as rt, parseAst$1 as s, DEFAULT_SERVER_CONDITIONS as st, Visitor as t, rolldownVersion as tt, createFetchableDevEnvironment as u, defaultAllowedOrigins as ut, preview as v, BuildEnvironment as w, isRunnableDevEnvironment as x, preview_exports as y, send$1 as z };
|