@rolldown/browser 1.0.0-beta.31-commit.832324a → 1.0.0-beta.32
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/dist/cli.cjs +2 -2
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +4 -3
- package/dist/config.cjs +2 -2
- package/dist/config.d.cts +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +2 -2
- package/dist/experimental-index.browser.mjs +1 -1
- package/dist/experimental-index.cjs +1 -1
- package/dist/experimental-index.d.cts +2 -2
- package/dist/experimental-index.d.mts +2 -2
- package/dist/experimental-index.mjs +1 -1
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/parallel-plugin-worker.cjs +1 -1
- package/dist/parallel-plugin-worker.d.cts +1 -1
- package/dist/parallel-plugin-worker.d.mts +1 -1
- package/dist/parallel-plugin-worker.mjs +3 -2
- package/dist/parallel-plugin.d.cts +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.cts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-BIqlUgrm.d.cts → binding-BEeJNtY4.d.mts} +1 -0
- package/dist/shared/{binding-COE5UL-B.d.mts → binding-CRMJJtol.d.cts} +1 -0
- package/dist/shared/{define-config-DFC0Nu7H.d.cts → define-config-Dw9PP95x.d.cts} +1 -1
- package/dist/shared/{define-config-Cf2D2abn.d.mts → define-config-rQzrgjTj.d.mts} +1 -1
- package/dist/shared/{load-config-Dw0YNzS-.cjs → load-config-Df5heSrD.cjs} +1 -1
- package/dist/shared/{load-config-CoJFc3w2.mjs → load-config-Dv1HB87g.mjs} +1 -1
- package/dist/shared/{src-DEIlKgUM.cjs → src-BDMOiU9t.cjs} +116 -116
- package/dist/shared/{src-38thNb51.mjs → src-ZwxjvPpL.mjs} +118 -118
- package/dist/{src-jf6KDQ1I.js → src-ZTshMqyf.js} +229 -229
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
|
|
|
9
9
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "1.0.0-beta.
|
|
12
|
+
var version = "1.0.0-beta.32";
|
|
13
13
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
@@ -31,9 +31,9 @@ function makeBuiltinPluginCallable(plugin) {
|
|
|
31
31
|
for (const key in callablePlugin) wrappedPlugin[key] = async function(...args$1) {
|
|
32
32
|
try {
|
|
33
33
|
return await callablePlugin[key](...args$1);
|
|
34
|
-
} catch (e$
|
|
35
|
-
if (e$
|
|
36
|
-
return require_parse_ast_index.error(require_parse_ast_index.logPluginError(e$
|
|
34
|
+
} catch (e$2) {
|
|
35
|
+
if (e$2 instanceof Error && !e$2.stack?.includes("at ")) Error.captureStackTrace(e$2, wrappedPlugin[key]);
|
|
36
|
+
return require_parse_ast_index.error(require_parse_ast_index.logPluginError(e$2, plugin.name, {
|
|
37
37
|
hook: key,
|
|
38
38
|
id: key === "transform" ? args$1[2] : void 0
|
|
39
39
|
}));
|
|
@@ -352,8 +352,8 @@ var MinimalPluginContextImpl = class {
|
|
|
352
352
|
watchMode
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
-
error(e$
|
|
356
|
-
return require_parse_ast_index.error(require_parse_ast_index.logPluginError(normalizeLog(e$
|
|
355
|
+
error(e$2) {
|
|
356
|
+
return require_parse_ast_index.error(require_parse_ast_index.logPluginError(normalizeLog(e$2), this.pluginName, { hook: this.hookName }));
|
|
357
357
|
}
|
|
358
358
|
};
|
|
359
359
|
|
|
@@ -1808,22 +1808,22 @@ function toJsonSchema(schema, config) {
|
|
|
1808
1808
|
//#endregion
|
|
1809
1809
|
//#region ../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.cjs
|
|
1810
1810
|
var require_ansis = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.cjs": ((exports, module) => {
|
|
1811
|
-
let e, t, r, { defineProperty: n, setPrototypeOf: l, create: o, keys: s } = Object, i
|
|
1812
|
-
let t$
|
|
1811
|
+
let e$1, t$2, r, { defineProperty: n$1, setPrototypeOf: l, create: o, keys: s } = Object, i = "", { round: c, max: a$1 } = Math, p = (e$2) => {
|
|
1812
|
+
let t$3 = /([a-f\d]{3,6})/i.exec(e$2)?.[1], r$1 = t$3?.length, n$2 = parseInt(6 ^ r$1 ? 3 ^ r$1 ? "0" : t$3[0] + t$3[0] + t$3[1] + t$3[1] + t$3[2] + t$3[2] : t$3, 16);
|
|
1813
1813
|
return [
|
|
1814
|
-
n$
|
|
1815
|
-
n$
|
|
1816
|
-
255 & n$
|
|
1814
|
+
n$2 >> 16 & 255,
|
|
1815
|
+
n$2 >> 8 & 255,
|
|
1816
|
+
255 & n$2
|
|
1817
1817
|
];
|
|
1818
|
-
}, u
|
|
1819
|
-
let t$
|
|
1820
|
-
return 8 > e$
|
|
1818
|
+
}, u = (e$2, t$3, r$1) => e$2 ^ t$3 || t$3 ^ r$1 ? 16 + 36 * c(e$2 / 51) + 6 * c(t$3 / 51) + c(r$1 / 51) : 8 > e$2 ? 16 : e$2 > 248 ? 231 : c(24 * (e$2 - 8) / 247) + 232, d = (e$2) => {
|
|
1819
|
+
let t$3, r$1, n$2, l$1, o$1;
|
|
1820
|
+
return 8 > e$2 ? 30 + e$2 : 16 > e$2 ? e$2 - 8 + 90 : (232 > e$2 ? (o$1 = (e$2 -= 16) % 36, t$3 = (e$2 / 36 | 0) / 5, r$1 = (o$1 / 6 | 0) / 5, n$2 = o$1 % 6 / 5) : t$3 = r$1 = n$2 = (10 * (e$2 - 232) + 8) / 255, l$1 = 2 * a$1(t$3, r$1, n$2), l$1 ? 30 + (c(n$2) << 2 | c(r$1) << 1 | c(t$3)) + (2 ^ l$1 ? 0 : 60) : 30);
|
|
1821
1821
|
}, g = (() => {
|
|
1822
|
-
let r$1 = (e$
|
|
1822
|
+
let r$1 = (e$2) => o$1.some(((t$3) => e$2.test(t$3))), n$2 = globalThis, l$1 = n$2.process ?? {}, o$1 = l$1.argv ?? [], i$1 = l$1.env ?? {}, c$1 = -1;
|
|
1823
1823
|
try {
|
|
1824
|
-
e = "," + s(i$
|
|
1825
|
-
} catch (e$
|
|
1826
|
-
i$
|
|
1824
|
+
e$1 = "," + s(i$1).join(",");
|
|
1825
|
+
} catch (e$2) {
|
|
1826
|
+
i$1 = {}, c$1 = 0;
|
|
1827
1827
|
}
|
|
1828
1828
|
let a$2 = "FORCE_COLOR", p$1 = {
|
|
1829
1829
|
false: 0,
|
|
@@ -1831,61 +1831,61 @@ var require_ansis = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
1831
1831
|
1: 1,
|
|
1832
1832
|
2: 2,
|
|
1833
1833
|
3: 3
|
|
1834
|
-
}[i$
|
|
1835
|
-
return u$
|
|
1834
|
+
}[i$1[a$2]] ?? -1, u$1 = a$2 in i$1 && p$1 || r$1(/^--color=?(true|always)?$/);
|
|
1835
|
+
return u$1 && (c$1 = p$1), ~c$1 || (c$1 = ((r$2, n$3, l$2) => (t$2 = r$2.TERM, {
|
|
1836
1836
|
"24bit": 3,
|
|
1837
1837
|
truecolor: 3,
|
|
1838
1838
|
ansi256: 2,
|
|
1839
1839
|
ansi: 1
|
|
1840
|
-
}[r$2.COLORTERM] || (r$2.CI ? /,GITHUB/.test(e) ? 3 : 1 : n$
|
|
1840
|
+
}[r$2.COLORTERM] || (r$2.CI ? /,GITHUB/.test(e$1) ? 3 : 1 : n$3 && "dumb" !== t$2 ? l$2 ? 3 : /-256/.test(t$2) ? 2 : 1 : 0)))(i$1, !!i$1.PM2_HOME || i$1.NEXT_RUNTIME?.includes("edge") || !!l$1.stdout?.isTTY, "win32" === l$1.platform)), !p$1 || i$1.NO_COLOR || r$1(/^--(no-color|color=(false|never))$/) ? 0 : n$2.window?.chrome || u$1 && !c$1 ? 3 : c$1;
|
|
1841
1841
|
})(), f = {
|
|
1842
|
-
open: i
|
|
1843
|
-
close: i
|
|
1844
|
-
}, h = 39, b = 49, O = {}, m = ({ p: e$
|
|
1845
|
-
let o$1 = (e$
|
|
1846
|
-
if (!e$
|
|
1847
|
-
if (t$
|
|
1848
|
-
if ((e$
|
|
1842
|
+
open: i,
|
|
1843
|
+
close: i
|
|
1844
|
+
}, h = 39, b = 49, O = {}, m = ({ p: e$2 }, { open: t$3, close: n$2 }) => {
|
|
1845
|
+
let o$1 = (e$3, ...r$1) => {
|
|
1846
|
+
if (!e$3) {
|
|
1847
|
+
if (t$3 && t$3 === n$2) return t$3;
|
|
1848
|
+
if ((e$3 ?? i) === i) return i;
|
|
1849
1849
|
}
|
|
1850
|
-
let l$1, s$2 = e$
|
|
1850
|
+
let l$1, s$2 = e$3.raw ? String.raw({ raw: e$3 }, ...r$1) : i + e$3, c$2 = o$1.p, a$2 = c$2.o, p$1 = c$2.c;
|
|
1851
1851
|
if (s$2.includes("\x1B")) for (; c$2; c$2 = c$2.p) {
|
|
1852
|
-
let { open: e$
|
|
1853
|
-
if (r$2) for (; ~(l$1 = s$2.indexOf(t$
|
|
1854
|
-
s$2 = n$
|
|
1852
|
+
let { open: e$4, close: t$4 } = c$2, r$2 = t$4.length, n$3 = i, o$2 = 0;
|
|
1853
|
+
if (r$2) for (; ~(l$1 = s$2.indexOf(t$4, o$2)); o$2 = l$1 + r$2) n$3 += s$2.slice(o$2, l$1) + e$4;
|
|
1854
|
+
s$2 = n$3 + s$2.slice(o$2);
|
|
1855
1855
|
}
|
|
1856
1856
|
return a$2 + (s$2.includes("\n") ? s$2.replace(/(\r?\n)/g, p$1 + "$1" + a$2) : s$2) + p$1;
|
|
1857
|
-
}, s$1 = t$
|
|
1858
|
-
return e$
|
|
1859
|
-
open: t$
|
|
1860
|
-
close: n$
|
|
1857
|
+
}, s$1 = t$3, c$1 = n$2;
|
|
1858
|
+
return e$2 && (s$1 = e$2.o + t$3, c$1 = n$2 + e$2.c), l(o$1, r), o$1.p = {
|
|
1859
|
+
open: t$3,
|
|
1860
|
+
close: n$2,
|
|
1861
1861
|
o: s$1,
|
|
1862
1862
|
c: c$1,
|
|
1863
|
-
p: e$
|
|
1863
|
+
p: e$2
|
|
1864
1864
|
}, o$1.open = s$1, o$1.close = c$1, o$1;
|
|
1865
1865
|
};
|
|
1866
|
-
const w = function(e$
|
|
1867
|
-
let t$
|
|
1866
|
+
const w = function(e$2 = g) {
|
|
1867
|
+
let t$3 = {
|
|
1868
1868
|
Ansis: w,
|
|
1869
|
-
level: e$
|
|
1869
|
+
level: e$2,
|
|
1870
1870
|
isSupported: () => s$1,
|
|
1871
|
-
strip: (e$
|
|
1872
|
-
extend(e$
|
|
1873
|
-
for (let t$
|
|
1874
|
-
let r$1 = e$
|
|
1875
|
-
O[t$
|
|
1876
|
-
return (...e$
|
|
1871
|
+
strip: (e$3) => e$3.replace(/[][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, i),
|
|
1872
|
+
extend(e$3) {
|
|
1873
|
+
for (let t$4 in e$3) {
|
|
1874
|
+
let r$1 = e$3[t$4], l$1 = (typeof r$1)[0], o$1 = "s" === l$1 ? x(...p(r$1)) : r$1;
|
|
1875
|
+
O[t$4] = "f" === l$1 ? { get() {
|
|
1876
|
+
return (...e$4) => m(this, r$1(...e$4));
|
|
1877
1877
|
} } : { get() {
|
|
1878
|
-
let e$
|
|
1879
|
-
return n(this, t$
|
|
1878
|
+
let e$4 = m(this, o$1);
|
|
1879
|
+
return n$1(this, t$4, { value: e$4 }), e$4;
|
|
1880
1880
|
} };
|
|
1881
1881
|
}
|
|
1882
|
-
return r = o({}, O), l(t$
|
|
1882
|
+
return r = o({}, O), l(t$3, r), t$3;
|
|
1883
1883
|
}
|
|
1884
|
-
}, s$1 = e$
|
|
1885
|
-
open: `[${e$
|
|
1886
|
-
close: `[${t$
|
|
1887
|
-
} : f, a$2 = (e$
|
|
1888
|
-
2 === e$
|
|
1884
|
+
}, s$1 = e$2 > 0, c$1 = (e$3, t$4) => s$1 ? {
|
|
1885
|
+
open: `[${e$3}m`,
|
|
1886
|
+
close: `[${t$4}m`
|
|
1887
|
+
} : f, a$2 = (e$3) => (t$4) => e$3(...p(t$4)), y$1 = (e$3, t$4) => (r$1, n$2, l$1) => c$1(`${e$3}8;2;${r$1};${n$2};${l$1}`, t$4), R = (e$3, t$4) => (r$1, n$2, l$1) => c$1(((e$4, t$5, r$2) => d(u(e$4, t$5, r$2)))(r$1, n$2, l$1) + e$3, t$4), $ = (e$3) => (t$4, r$1, n$2) => e$3(u(t$4, r$1, n$2)), x = y$1(3, h), T = y$1(4, b), v = (e$3) => c$1("38;5;" + e$3, h), C = (e$3) => c$1("48;5;" + e$3, b);
|
|
1888
|
+
2 === e$2 ? (x = $(v), T = $(C)) : 1 === e$2 && (x = R(0, h), T = R(10, b), v = (e$3) => c$1(d(e$3), h), C = (e$3) => c$1(d(e$3) + 10, b));
|
|
1889
1889
|
let E, M = {
|
|
1890
1890
|
fg: v,
|
|
1891
1891
|
bg: C,
|
|
@@ -1903,9 +1903,9 @@ var require_ansis = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
1903
1903
|
hidden: c$1(8, 28),
|
|
1904
1904
|
strikethrough: c$1(9, 29)
|
|
1905
1905
|
}, I = "Bright";
|
|
1906
|
-
return "black,red,green,yellow,blue,magenta,cyan,white,gray".split(",").map(((e$
|
|
1907
|
-
E = "bg" + e$
|
|
1908
|
-
})), t$
|
|
1906
|
+
return "black,red,green,yellow,blue,magenta,cyan,white,gray".split(",").map(((e$3, t$4) => {
|
|
1907
|
+
E = "bg" + e$3[0].toUpperCase() + e$3.slice(1), 8 > t$4 ? (M[e$3 + I] = c$1(90 + t$4, h), M[E + I] = c$1(100 + t$4, b)) : t$4 = 60, M[e$3] = c$1(30 + t$4, h), M[E] = c$1(40 + t$4, b);
|
|
1908
|
+
})), t$3.extend(M);
|
|
1909
1909
|
}, y = new w();
|
|
1910
1910
|
module.exports = y, y.default = y;
|
|
1911
1911
|
}) });
|
|
@@ -2321,7 +2321,7 @@ function validateOption(key, options) {
|
|
|
2321
2321
|
const issuePaths = issue.path.map((path$2) => path$2.key);
|
|
2322
2322
|
let issueMsg = issue.message;
|
|
2323
2323
|
if (issue.type === "union") {
|
|
2324
|
-
const subIssue = issue.issues?.find((i$
|
|
2324
|
+
const subIssue = issue.issues?.find((i$1) => !(i$1.type !== issue.received && i$1.input === issue.input));
|
|
2325
2325
|
if (subIssue) {
|
|
2326
2326
|
if (subIssue.path) issuePaths.push(subIssue.path.map((path$2) => path$2.key));
|
|
2327
2327
|
issueMsg = subIssue.message;
|
|
@@ -2364,19 +2364,19 @@ function bindingifySourcemap$1(map) {
|
|
|
2364
2364
|
//#endregion
|
|
2365
2365
|
//#region src/utils/error.ts
|
|
2366
2366
|
function normalizeErrors(rawErrors) {
|
|
2367
|
-
const errors = rawErrors.map((e$
|
|
2368
|
-
kind: e$
|
|
2369
|
-
message: e$
|
|
2367
|
+
const errors = rawErrors.map((e$2) => e$2 instanceof Error ? e$2 : Object.assign(/* @__PURE__ */ new Error(), {
|
|
2368
|
+
kind: e$2.kind,
|
|
2369
|
+
message: e$2.message,
|
|
2370
2370
|
stack: void 0
|
|
2371
2371
|
}));
|
|
2372
2372
|
let summary = `Build failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
|
|
2373
|
-
for (let i$
|
|
2373
|
+
for (let i$1 = 0; i$1 < errors.length; i$1++) {
|
|
2374
2374
|
summary += "\n";
|
|
2375
|
-
if (i$
|
|
2375
|
+
if (i$1 >= 5) {
|
|
2376
2376
|
summary += "...";
|
|
2377
2377
|
break;
|
|
2378
2378
|
}
|
|
2379
|
-
summary += getErrorMessage(errors[i$
|
|
2379
|
+
summary += getErrorMessage(errors[i$1]);
|
|
2380
2380
|
}
|
|
2381
2381
|
const wrapper = new Error(summary);
|
|
2382
2382
|
Object.defineProperty(wrapper, "errors", {
|
|
@@ -2391,20 +2391,20 @@ function normalizeErrors(rawErrors) {
|
|
|
2391
2391
|
});
|
|
2392
2392
|
return wrapper;
|
|
2393
2393
|
}
|
|
2394
|
-
function getErrorMessage(e$
|
|
2395
|
-
if (Object.hasOwn(e$
|
|
2394
|
+
function getErrorMessage(e$2) {
|
|
2395
|
+
if (Object.hasOwn(e$2, "kind")) return e$2.message;
|
|
2396
2396
|
let s$1 = "";
|
|
2397
|
-
if (e$
|
|
2398
|
-
const id$1 = e$
|
|
2397
|
+
if (e$2.plugin) s$1 += `[plugin ${e$2.plugin}]`;
|
|
2398
|
+
const id$1 = e$2.id ?? e$2.loc?.file;
|
|
2399
2399
|
if (id$1) {
|
|
2400
2400
|
s$1 += " " + id$1;
|
|
2401
|
-
if (e$
|
|
2401
|
+
if (e$2.loc) s$1 += `:${e$2.loc.line}:${e$2.loc.column}`;
|
|
2402
2402
|
}
|
|
2403
2403
|
if (s$1) s$1 += "\n";
|
|
2404
|
-
const message = `${e$
|
|
2404
|
+
const message = `${e$2.name ?? "Error"}: ${e$2.message}`;
|
|
2405
2405
|
s$1 += message;
|
|
2406
|
-
if (e$
|
|
2407
|
-
if (e$
|
|
2406
|
+
if (e$2.frame) s$1 = joinNewLine(s$1, e$2.frame);
|
|
2407
|
+
if (e$2.stack) s$1 = joinNewLine(s$1, e$2.stack.replace(message, ""));
|
|
2408
2408
|
return s$1;
|
|
2409
2409
|
}
|
|
2410
2410
|
function joinNewLine(s1, s2) {
|
|
@@ -2448,33 +2448,33 @@ function normalizeTransformHookSourcemap(id$1, originalCode, rawMap) {
|
|
|
2448
2448
|
}
|
|
2449
2449
|
|
|
2450
2450
|
//#endregion
|
|
2451
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2452
|
-
function
|
|
2453
|
-
let
|
|
2454
|
-
return
|
|
2455
|
-
lazy:
|
|
2456
|
-
lazyArgs:
|
|
2451
|
+
//#region ../../node_modules/.pnpm/remeda@2.30.0/node_modules/remeda/dist/lazyDataLastImpl-BDhrIOwR.js
|
|
2452
|
+
function e(e$2, t$3, n$2) {
|
|
2453
|
+
let r$1 = (n$3) => e$2(n$3, ...t$3);
|
|
2454
|
+
return n$2 === void 0 ? r$1 : Object.assign(r$1, {
|
|
2455
|
+
lazy: n$2,
|
|
2456
|
+
lazyArgs: t$3
|
|
2457
2457
|
});
|
|
2458
2458
|
}
|
|
2459
2459
|
|
|
2460
2460
|
//#endregion
|
|
2461
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2462
|
-
function
|
|
2463
|
-
let
|
|
2464
|
-
if (
|
|
2465
|
-
if (
|
|
2466
|
-
throw
|
|
2461
|
+
//#region ../../node_modules/.pnpm/remeda@2.30.0/node_modules/remeda/dist/purry-DH9cw9sy.js
|
|
2462
|
+
function t(t$3, n$2, r$1) {
|
|
2463
|
+
let i$1 = t$3.length - n$2.length;
|
|
2464
|
+
if (i$1 === 0) return t$3(...n$2);
|
|
2465
|
+
if (i$1 === 1) return e(t$3, n$2, r$1);
|
|
2466
|
+
throw Error(`Wrong number of arguments`);
|
|
2467
2467
|
}
|
|
2468
2468
|
|
|
2469
2469
|
//#endregion
|
|
2470
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2471
|
-
function
|
|
2472
|
-
return
|
|
2473
|
-
}
|
|
2474
|
-
|
|
2475
|
-
let
|
|
2476
|
-
for (let [
|
|
2477
|
-
return
|
|
2470
|
+
//#region ../../node_modules/.pnpm/remeda@2.30.0/node_modules/remeda/dist/partition-BJYkp-a7.js
|
|
2471
|
+
function t$1(...t$3) {
|
|
2472
|
+
return t(n, t$3);
|
|
2473
|
+
}
|
|
2474
|
+
const n = (e$2, t$3) => {
|
|
2475
|
+
let n$2 = [[], []];
|
|
2476
|
+
for (let [r$1, i$1] of e$2.entries()) t$3(i$1, r$1, e$2) ? n$2[0].push(i$1) : n$2[1].push(i$1);
|
|
2477
|
+
return n$2;
|
|
2478
2478
|
};
|
|
2479
2479
|
|
|
2480
2480
|
//#endregion
|
|
@@ -2499,8 +2499,8 @@ function transformFilterMatcherToFilterExprs(filterOption) {
|
|
|
2499
2499
|
let idExcludes = [];
|
|
2500
2500
|
let codeIncludes = [];
|
|
2501
2501
|
let codeExcludes = [];
|
|
2502
|
-
if (id$1) [idIncludes, idExcludes] =
|
|
2503
|
-
if (code$1) [codeIncludes, codeExcludes] =
|
|
2502
|
+
if (id$1) [idIncludes, idExcludes] = t$1(generalHookFilterMatcherToFilterExprs(id$1, "id") ?? [], (m$1) => m$1.kind === "include");
|
|
2503
|
+
if (code$1) [codeIncludes, codeExcludes] = t$1(generalHookFilterMatcherToFilterExprs(code$1, "code") ?? [], (m$1) => m$1.kind === "include");
|
|
2504
2504
|
ret.push(...idExcludes);
|
|
2505
2505
|
ret.push(...codeExcludes);
|
|
2506
2506
|
let andExprList = [];
|
|
@@ -2528,7 +2528,7 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2528
2528
|
switch (expr.kind) {
|
|
2529
2529
|
case "and": {
|
|
2530
2530
|
let args$1 = expr.args;
|
|
2531
|
-
for (let i$
|
|
2531
|
+
for (let i$1 = args$1.length - 1; i$1 >= 0; i$1--) bindingifyFilterExprImpl(args$1[i$1], list);
|
|
2532
2532
|
list.push({
|
|
2533
2533
|
kind: "And",
|
|
2534
2534
|
payload: args$1.length
|
|
@@ -2537,7 +2537,7 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2537
2537
|
}
|
|
2538
2538
|
case "or": {
|
|
2539
2539
|
let args$1 = expr.args;
|
|
2540
|
-
for (let i$
|
|
2540
|
+
for (let i$1 = args$1.length - 1; i$1 >= 0; i$1--) bindingifyFilterExprImpl(args$1[i$1], list);
|
|
2541
2541
|
list.push({
|
|
2542
2542
|
kind: "Or",
|
|
2543
2543
|
payload: args$1.length
|
|
@@ -2687,10 +2687,10 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
2687
2687
|
data.loadModulePromiseMap.set(id$1, promise$1);
|
|
2688
2688
|
try {
|
|
2689
2689
|
await context.load(id$1, options.moduleSideEffects ?? void 0);
|
|
2690
|
-
} catch (e$
|
|
2690
|
+
} catch (e$2) {
|
|
2691
2691
|
data.loadModulePromiseMap.delete(id$1);
|
|
2692
2692
|
data.loadModulePromiseResolveFnMap.delete(id$1);
|
|
2693
|
-
throw e$
|
|
2693
|
+
throw e$2;
|
|
2694
2694
|
}
|
|
2695
2695
|
return promise$1;
|
|
2696
2696
|
}
|
|
@@ -2777,12 +2777,12 @@ var TransformPluginContextImpl = class extends PluginContextImpl {
|
|
|
2777
2777
|
this.warn = getLogHandler$1(this.warn);
|
|
2778
2778
|
this.info = getLogHandler$1(this.info);
|
|
2779
2779
|
}
|
|
2780
|
-
error(e$
|
|
2781
|
-
if (typeof e$
|
|
2782
|
-
if (pos) require_parse_ast_index.augmentCodeLocation(e$
|
|
2783
|
-
e$
|
|
2784
|
-
e$
|
|
2785
|
-
return require_parse_ast_index.error(require_parse_ast_index.logPluginError(normalizeLog(e$
|
|
2780
|
+
error(e$2, pos) {
|
|
2781
|
+
if (typeof e$2 === "string") e$2 = { message: e$2 };
|
|
2782
|
+
if (pos) require_parse_ast_index.augmentCodeLocation(e$2, pos, this.moduleSource, this.moduleId);
|
|
2783
|
+
e$2.id = this.moduleId;
|
|
2784
|
+
e$2.hook = "transform";
|
|
2785
|
+
return require_parse_ast_index.error(require_parse_ast_index.logPluginError(normalizeLog(e$2), this.pluginName));
|
|
2786
2786
|
}
|
|
2787
2787
|
getCombinedSourcemap() {
|
|
2788
2788
|
return JSON.parse(this.inner.getCombinedSourcemap());
|
|
@@ -3008,9 +3008,9 @@ function transformRenderedChunk(chunk) {
|
|
|
3008
3008
|
}
|
|
3009
3009
|
function transformChunkModules(modules) {
|
|
3010
3010
|
const result = {};
|
|
3011
|
-
for (let i$
|
|
3012
|
-
let key = modules.keys[i$
|
|
3013
|
-
const mod = modules.values[i$
|
|
3011
|
+
for (let i$1 = 0; i$1 < modules.values.length; i$1++) {
|
|
3012
|
+
let key = modules.keys[i$1];
|
|
3013
|
+
const mod = modules.values[i$1];
|
|
3014
3014
|
result[key] = transformToRenderedModule(mod);
|
|
3015
3015
|
}
|
|
3016
3016
|
return result;
|
|
@@ -3519,8 +3519,8 @@ function wrapHandlers(plugin) {
|
|
|
3519
3519
|
if (handler) plugin[hookName] = async (...args$1) => {
|
|
3520
3520
|
try {
|
|
3521
3521
|
return await handler(...args$1);
|
|
3522
|
-
} catch (e$
|
|
3523
|
-
return require_parse_ast_index.error(require_parse_ast_index.logPluginError(e$
|
|
3522
|
+
} catch (e$2) {
|
|
3523
|
+
return require_parse_ast_index.error(require_parse_ast_index.logPluginError(e$2, plugin.name, {
|
|
3524
3524
|
hook: hookName,
|
|
3525
3525
|
id: hookName === "transform" ? args$1[2] : void 0
|
|
3526
3526
|
}));
|
|
@@ -4181,7 +4181,7 @@ async function initializeParallelPlugins(plugins) {
|
|
|
4181
4181
|
};
|
|
4182
4182
|
}
|
|
4183
4183
|
function initializeWorkers(registryId, count, pluginInfos) {
|
|
4184
|
-
return Promise.all(Array.from({ length: count }, (_, i$
|
|
4184
|
+
return Promise.all(Array.from({ length: count }, (_, i$1) => initializeWorker(registryId, pluginInfos, i$1)));
|
|
4185
4185
|
}
|
|
4186
4186
|
async function initializeWorker(registryId, pluginInfos, threadNumber) {
|
|
4187
4187
|
const urlString = (void 0)("#parallel-plugin-worker");
|
|
@@ -4201,9 +4201,9 @@ async function initializeWorker(registryId, pluginInfos, threadNumber) {
|
|
|
4201
4201
|
});
|
|
4202
4202
|
});
|
|
4203
4203
|
return worker;
|
|
4204
|
-
} catch (e$
|
|
4204
|
+
} catch (e$2) {
|
|
4205
4205
|
worker?.terminate();
|
|
4206
|
-
throw e$
|
|
4206
|
+
throw e$2;
|
|
4207
4207
|
}
|
|
4208
4208
|
}
|
|
4209
4209
|
const availableParallelism = () => {
|
|
@@ -4245,9 +4245,9 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode, isCl
|
|
|
4245
4245
|
onLog,
|
|
4246
4246
|
stopWorkers: parallelPluginInitResult?.stopWorkers
|
|
4247
4247
|
};
|
|
4248
|
-
} catch (e$
|
|
4248
|
+
} catch (e$2) {
|
|
4249
4249
|
await parallelPluginInitResult?.stopWorkers();
|
|
4250
|
-
throw e$
|
|
4250
|
+
throw e$2;
|
|
4251
4251
|
}
|
|
4252
4252
|
}
|
|
4253
4253
|
|
|
@@ -4266,9 +4266,9 @@ async function createBundlerImpl(bundler, inputOptions, outputOptions, isClose)
|
|
|
4266
4266
|
asyncRuntimeShutdown = true;
|
|
4267
4267
|
}
|
|
4268
4268
|
};
|
|
4269
|
-
} catch (e$
|
|
4269
|
+
} catch (e$2) {
|
|
4270
4270
|
await option.stopWorkers?.();
|
|
4271
|
-
throw e$
|
|
4271
|
+
throw e$2;
|
|
4272
4272
|
}
|
|
4273
4273
|
}
|
|
4274
4274
|
|