@rolldown/browser 1.0.0-beta.31-commit.832324a → 1.0.0-beta.33
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 +31 -31
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +33 -32
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +3 -3
- package/dist/experimental-index.browser.mjs +1 -1
- package/dist/experimental-index.cjs +2 -2
- package/dist/experimental-index.d.cts +2 -2
- package/dist/experimental-index.d.mts +2 -2
- package/dist/experimental-index.mjs +2 -2
- 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 +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.cjs +2 -2
- package/dist/parallel-plugin-worker.d.cts +1 -1
- package/dist/parallel-plugin-worker.d.mts +1 -1
- package/dist/parallel-plugin-worker.mjs +4 -3
- package/dist/parallel-plugin.d.cts +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.cjs +1 -1
- package/dist/parse-ast-index.d.cts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-BIqlUgrm.d.cts → binding-CFhvYkVn.d.mts} +4 -3
- package/dist/shared/{binding-COE5UL-B.d.mts → binding-DQk9TN_A.d.cts} +4 -3
- package/dist/shared/{define-config-DFC0Nu7H.d.cts → define-config-B3QOs3Kt.d.cts} +7 -1
- package/dist/shared/{define-config-Cf2D2abn.d.mts → define-config-DyjJkNqG.d.mts} +7 -1
- package/dist/shared/{load-config-CoJFc3w2.mjs → load-config-CLPLfZVe.mjs} +1 -1
- package/dist/shared/{load-config-Dw0YNzS-.cjs → load-config-xKQFLlGV.cjs} +1 -1
- package/dist/shared/{parse-ast-index-CqHkFxPM.mjs → parse-ast-index-BGzB5Bo-.mjs} +1 -1
- package/dist/shared/{parse-ast-index-DAsDnaa1.cjs → parse-ast-index-BZfwAN9P.cjs} +1 -1
- package/dist/shared/{src-DEIlKgUM.cjs → src-CGziNJPr.cjs} +145 -141
- package/dist/shared/{src-38thNb51.mjs → src-CZgQg1yE.mjs} +142 -138
- package/dist/{src-jf6KDQ1I.js → src-D_htlJ_o.js} +252 -248
- package/package.json +2 -2
|
@@ -11,8 +11,8 @@ var __commonJS = (cb, mod) => function() {
|
|
|
11
11
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
12
|
};
|
|
13
13
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i$
|
|
15
|
-
key = keys[i$
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i$1 = 0, n$2 = keys.length, key; i$1 < n$2; i$1++) {
|
|
15
|
+
key = keys[i$1];
|
|
16
16
|
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
17
|
get: ((k) => from[k]).bind(null, key),
|
|
18
18
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region package.json
|
|
30
|
-
var version = "1.0.0-beta.
|
|
30
|
+
var version = "1.0.0-beta.33";
|
|
31
31
|
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/utils/normalize-string-or-regex.ts
|
|
@@ -96,18 +96,18 @@ function rangeContains(range, index) {
|
|
|
96
96
|
function getLocator(source, options = {}) {
|
|
97
97
|
const { offsetLine = 0, offsetColumn = 0 } = options;
|
|
98
98
|
let start = 0;
|
|
99
|
-
const ranges = source.split("\n").map((line, i$
|
|
99
|
+
const ranges = source.split("\n").map((line, i$2) => {
|
|
100
100
|
const end = start + line.length + 1;
|
|
101
101
|
/** @type {import('./types').Range} */
|
|
102
102
|
const range = {
|
|
103
103
|
start,
|
|
104
104
|
end,
|
|
105
|
-
line: i$
|
|
105
|
+
line: i$2
|
|
106
106
|
};
|
|
107
107
|
start = end;
|
|
108
108
|
return range;
|
|
109
109
|
});
|
|
110
|
-
let i$
|
|
110
|
+
let i$1 = 0;
|
|
111
111
|
/**
|
|
112
112
|
* @param {string | number} search
|
|
113
113
|
* @param {number} [index]
|
|
@@ -116,16 +116,16 @@ function getLocator(source, options = {}) {
|
|
|
116
116
|
function locator(search, index) {
|
|
117
117
|
if (typeof search === "string") search = source.indexOf(search, index ?? 0);
|
|
118
118
|
if (search === -1) return void 0;
|
|
119
|
-
let range = ranges[i$
|
|
120
|
-
const d$
|
|
119
|
+
let range = ranges[i$1];
|
|
120
|
+
const d$1 = search >= range.end ? 1 : -1;
|
|
121
121
|
while (range) {
|
|
122
122
|
if (rangeContains(range, search)) return {
|
|
123
123
|
line: offsetLine + range.line,
|
|
124
124
|
column: offsetColumn + search - range.start,
|
|
125
125
|
character: search
|
|
126
126
|
};
|
|
127
|
-
i$
|
|
128
|
-
range = ranges[i$
|
|
127
|
+
i$1 += d$1;
|
|
128
|
+
range = ranges[i$1];
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
return locator;
|
|
@@ -240,9 +240,9 @@ function makeBuiltinPluginCallable(plugin) {
|
|
|
240
240
|
for (const key in callablePlugin) wrappedPlugin[key] = async function(...args$1) {
|
|
241
241
|
try {
|
|
242
242
|
return await callablePlugin[key](...args$1);
|
|
243
|
-
} catch (e$
|
|
244
|
-
if (e$
|
|
245
|
-
return error(logPluginError(e$
|
|
243
|
+
} catch (e$2) {
|
|
244
|
+
if (e$2 instanceof Error && !e$2.stack?.includes("at ")) Error.captureStackTrace(e$2, wrappedPlugin[key]);
|
|
245
|
+
return error(logPluginError(e$2, plugin.name, {
|
|
246
246
|
hook: key,
|
|
247
247
|
id: key === "transform" ? args$1[2] : void 0
|
|
248
248
|
}));
|
|
@@ -319,171 +319,171 @@ function webWorkerPostPlugin() {
|
|
|
319
319
|
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
320
320
|
let _lazyMatch = () => {
|
|
321
321
|
var __lib__ = (() => {
|
|
322
|
-
var m$1 = Object.defineProperty, V = Object.getOwnPropertyDescriptor, G = Object.getOwnPropertyNames, T = Object.prototype.hasOwnProperty, q = (r$1, e$
|
|
323
|
-
for (var n$
|
|
324
|
-
get: e$
|
|
322
|
+
var m$1 = Object.defineProperty, V = Object.getOwnPropertyDescriptor, G = Object.getOwnPropertyNames, T = Object.prototype.hasOwnProperty, q = (r$1, e$2) => {
|
|
323
|
+
for (var n$2 in e$2) m$1(r$1, n$2, {
|
|
324
|
+
get: e$2[n$2],
|
|
325
325
|
enumerable: true
|
|
326
326
|
});
|
|
327
|
-
}, H = (r$1, e$
|
|
328
|
-
if (e$
|
|
329
|
-
get: () => e$
|
|
330
|
-
enumerable: !(a$2 = V(e$
|
|
327
|
+
}, H = (r$1, e$2, n$2, a$2) => {
|
|
328
|
+
if (e$2 && typeof e$2 == "object" || typeof e$2 == "function") for (let t$3 of G(e$2)) !T.call(r$1, t$3) && t$3 !== n$2 && m$1(r$1, t$3, {
|
|
329
|
+
get: () => e$2[t$3],
|
|
330
|
+
enumerable: !(a$2 = V(e$2, t$3)) || a$2.enumerable
|
|
331
331
|
});
|
|
332
332
|
return r$1;
|
|
333
333
|
}, J = (r$1) => H(m$1({}, "__esModule", { value: true }), r$1), w$1 = {};
|
|
334
334
|
q(w$1, { default: () => re });
|
|
335
|
-
var A = (r$1) => Array.isArray(r$1), d$
|
|
336
|
-
const e$
|
|
337
|
-
return (n$
|
|
338
|
-
const a$2 = e$
|
|
335
|
+
var A = (r$1) => Array.isArray(r$1), d$1 = (r$1) => typeof r$1 == "function", Q = (r$1) => r$1.length === 0, W = (r$1) => typeof r$1 == "number", K = (r$1) => typeof r$1 == "object" && r$1 !== null, X = (r$1) => r$1 instanceof RegExp, b$1 = (r$1) => typeof r$1 == "string", h$1 = (r$1) => r$1 === void 0, Y = (r$1) => {
|
|
336
|
+
const e$2 = /* @__PURE__ */ new Map();
|
|
337
|
+
return (n$2) => {
|
|
338
|
+
const a$2 = e$2.get(n$2);
|
|
339
339
|
if (a$2) return a$2;
|
|
340
|
-
const t$
|
|
341
|
-
return e$
|
|
340
|
+
const t$3 = r$1(n$2);
|
|
341
|
+
return e$2.set(n$2, t$3), t$3;
|
|
342
342
|
};
|
|
343
|
-
}, rr = (r$1, e$
|
|
343
|
+
}, rr = (r$1, e$2, n$2 = {}) => {
|
|
344
344
|
const a$2 = {
|
|
345
345
|
cache: {},
|
|
346
346
|
input: r$1,
|
|
347
347
|
index: 0,
|
|
348
348
|
indexMax: 0,
|
|
349
|
-
options: n$
|
|
349
|
+
options: n$2,
|
|
350
350
|
output: []
|
|
351
351
|
};
|
|
352
|
-
if (v(e$
|
|
352
|
+
if (v(e$2)(a$2) && a$2.index === r$1.length) return a$2.output;
|
|
353
353
|
throw new Error(`Failed to parse at index ${a$2.indexMax}`);
|
|
354
|
-
}, i$
|
|
355
|
-
const n$
|
|
354
|
+
}, i$1 = (r$1, e$2) => A(r$1) ? er(r$1, e$2) : b$1(r$1) ? ar(r$1, e$2) : nr(r$1, e$2), er = (r$1, e$2) => {
|
|
355
|
+
const n$2 = {};
|
|
356
356
|
for (const a$2 of r$1) {
|
|
357
357
|
if (a$2.length !== 1) throw new Error(`Invalid character: "${a$2}"`);
|
|
358
|
-
const t$
|
|
359
|
-
n$
|
|
358
|
+
const t$3 = a$2.charCodeAt(0);
|
|
359
|
+
n$2[t$3] = true;
|
|
360
360
|
}
|
|
361
361
|
return (a$2) => {
|
|
362
|
-
const t$
|
|
363
|
-
for (; a$2.index < o$1.length && o$1.charCodeAt(a$2.index) in n$
|
|
364
|
-
const u$
|
|
365
|
-
if (u$
|
|
366
|
-
if (!h$1(e$
|
|
367
|
-
const s$1 = a$2.input.slice(t$
|
|
362
|
+
const t$3 = a$2.index, o$1 = a$2.input;
|
|
363
|
+
for (; a$2.index < o$1.length && o$1.charCodeAt(a$2.index) in n$2;) a$2.index += 1;
|
|
364
|
+
const u$1 = a$2.index;
|
|
365
|
+
if (u$1 > t$3) {
|
|
366
|
+
if (!h$1(e$2) && !a$2.options.silent) {
|
|
367
|
+
const s$1 = a$2.input.slice(t$3, u$1), c$1 = d$1(e$2) ? e$2(s$1, o$1, String(t$3)) : e$2;
|
|
368
368
|
h$1(c$1) || a$2.output.push(c$1);
|
|
369
369
|
}
|
|
370
370
|
a$2.indexMax = Math.max(a$2.indexMax, a$2.index);
|
|
371
371
|
}
|
|
372
372
|
return true;
|
|
373
373
|
};
|
|
374
|
-
}, nr = (r$1, e$
|
|
375
|
-
const n$
|
|
374
|
+
}, nr = (r$1, e$2) => {
|
|
375
|
+
const n$2 = r$1.source, a$2 = r$1.flags.replace(/y|$/, "y"), t$3 = new RegExp(n$2, a$2);
|
|
376
376
|
return g$1((o$1) => {
|
|
377
|
-
t$
|
|
378
|
-
const u$
|
|
379
|
-
if (u$
|
|
380
|
-
if (!h$1(e$
|
|
381
|
-
const s$1 = d$
|
|
377
|
+
t$3.lastIndex = o$1.index;
|
|
378
|
+
const u$1 = t$3.exec(o$1.input);
|
|
379
|
+
if (u$1) {
|
|
380
|
+
if (!h$1(e$2) && !o$1.options.silent) {
|
|
381
|
+
const s$1 = d$1(e$2) ? e$2(...u$1, o$1.input, String(o$1.index)) : e$2;
|
|
382
382
|
h$1(s$1) || o$1.output.push(s$1);
|
|
383
383
|
}
|
|
384
|
-
return o$1.index += u$
|
|
384
|
+
return o$1.index += u$1[0].length, o$1.indexMax = Math.max(o$1.indexMax, o$1.index), true;
|
|
385
385
|
} else return false;
|
|
386
386
|
});
|
|
387
|
-
}, ar = (r$1, e$
|
|
388
|
-
if (n$
|
|
389
|
-
if (!h$1(e$
|
|
390
|
-
const t$
|
|
391
|
-
h$1(t$
|
|
387
|
+
}, ar = (r$1, e$2) => (n$2) => {
|
|
388
|
+
if (n$2.input.startsWith(r$1, n$2.index)) {
|
|
389
|
+
if (!h$1(e$2) && !n$2.options.silent) {
|
|
390
|
+
const t$3 = d$1(e$2) ? e$2(r$1, n$2.input, String(n$2.index)) : e$2;
|
|
391
|
+
h$1(t$3) || n$2.output.push(t$3);
|
|
392
392
|
}
|
|
393
|
-
return n$
|
|
393
|
+
return n$2.index += r$1.length, n$2.indexMax = Math.max(n$2.indexMax, n$2.index), true;
|
|
394
394
|
} else return false;
|
|
395
|
-
}, C = (r$1, e$
|
|
396
|
-
const t$
|
|
395
|
+
}, C = (r$1, e$2, n$2, a$2) => {
|
|
396
|
+
const t$3 = v(r$1);
|
|
397
397
|
return g$1(_(M((o$1) => {
|
|
398
|
-
let u$
|
|
399
|
-
for (; u$
|
|
398
|
+
let u$1 = 0;
|
|
399
|
+
for (; u$1 < n$2;) {
|
|
400
400
|
const s$1 = o$1.index;
|
|
401
|
-
if (!t$
|
|
401
|
+
if (!t$3(o$1) || (u$1 += 1, o$1.index === s$1)) break;
|
|
402
402
|
}
|
|
403
|
-
return u$
|
|
403
|
+
return u$1 >= e$2;
|
|
404
404
|
})));
|
|
405
|
-
}, tr = (r$1, e$
|
|
406
|
-
const n$
|
|
405
|
+
}, tr = (r$1, e$2) => C(r$1, 0, 1), f$1 = (r$1, e$2) => C(r$1, 0, Infinity), x = (r$1, e$2) => {
|
|
406
|
+
const n$2 = r$1.map(v);
|
|
407
407
|
return g$1(_(M((a$2) => {
|
|
408
|
-
for (let t$
|
|
408
|
+
for (let t$3 = 0, o$1 = n$2.length; t$3 < o$1; t$3++) if (!n$2[t$3](a$2)) return false;
|
|
409
409
|
return true;
|
|
410
410
|
})));
|
|
411
|
-
}, l$1 = (r$1, e$
|
|
412
|
-
const n$
|
|
411
|
+
}, l$1 = (r$1, e$2) => {
|
|
412
|
+
const n$2 = r$1.map(v);
|
|
413
413
|
return g$1(_((a$2) => {
|
|
414
|
-
for (let t$
|
|
414
|
+
for (let t$3 = 0, o$1 = n$2.length; t$3 < o$1; t$3++) if (n$2[t$3](a$2)) return true;
|
|
415
415
|
return false;
|
|
416
416
|
}));
|
|
417
|
-
}, M = (r$1, e$
|
|
418
|
-
const n$
|
|
417
|
+
}, M = (r$1, e$2 = false) => {
|
|
418
|
+
const n$2 = v(r$1);
|
|
419
419
|
return (a$2) => {
|
|
420
|
-
const t$
|
|
421
|
-
return (!u$
|
|
420
|
+
const t$3 = a$2.index, o$1 = a$2.output.length, u$1 = n$2(a$2);
|
|
421
|
+
return (!u$1 || e$2) && (a$2.index = t$3, a$2.output.length !== o$1 && (a$2.output.length = o$1)), u$1;
|
|
422
422
|
};
|
|
423
|
-
}, _ = (r$1, e$
|
|
424
|
-
const n$
|
|
425
|
-
return n$
|
|
423
|
+
}, _ = (r$1, e$2) => {
|
|
424
|
+
const n$2 = v(r$1);
|
|
425
|
+
return n$2;
|
|
426
426
|
}, g$1 = (() => {
|
|
427
427
|
let r$1 = 0;
|
|
428
|
-
return (e$
|
|
429
|
-
const n$
|
|
430
|
-
return (t$
|
|
428
|
+
return (e$2) => {
|
|
429
|
+
const n$2 = v(e$2), a$2 = r$1 += 1;
|
|
430
|
+
return (t$3) => {
|
|
431
431
|
var o$1;
|
|
432
|
-
if (t$
|
|
433
|
-
const u$
|
|
432
|
+
if (t$3.options.memoization === false) return n$2(t$3);
|
|
433
|
+
const u$1 = t$3.index, s$1 = (o$1 = t$3.cache)[a$2] || (o$1[a$2] = /* @__PURE__ */ new Map()), c$1 = s$1.get(u$1);
|
|
434
434
|
if (c$1 === false) return false;
|
|
435
|
-
if (W(c$1)) return t$
|
|
436
|
-
if (c$1) return t$
|
|
435
|
+
if (W(c$1)) return t$3.index = c$1, true;
|
|
436
|
+
if (c$1) return t$3.index = c$1.index, c$1.output?.length && t$3.output.push(...c$1.output), true;
|
|
437
437
|
{
|
|
438
|
-
const Z = t$
|
|
439
|
-
if (n$
|
|
440
|
-
const D = t$
|
|
438
|
+
const Z = t$3.output.length;
|
|
439
|
+
if (n$2(t$3)) {
|
|
440
|
+
const D = t$3.index, U = t$3.output.length;
|
|
441
441
|
if (U > Z) {
|
|
442
|
-
const ee = t$
|
|
443
|
-
s$1.set(u$
|
|
442
|
+
const ee = t$3.output.slice(Z, U);
|
|
443
|
+
s$1.set(u$1, {
|
|
444
444
|
index: D,
|
|
445
445
|
output: ee
|
|
446
446
|
});
|
|
447
|
-
} else s$1.set(u$
|
|
447
|
+
} else s$1.set(u$1, D);
|
|
448
448
|
return true;
|
|
449
|
-
} else return s$1.set(u$
|
|
449
|
+
} else return s$1.set(u$1, false), false;
|
|
450
450
|
}
|
|
451
451
|
};
|
|
452
452
|
};
|
|
453
453
|
})(), E = (r$1) => {
|
|
454
|
-
let e$
|
|
455
|
-
return (n$
|
|
454
|
+
let e$2;
|
|
455
|
+
return (n$2) => (e$2 || (e$2 = v(r$1())), e$2(n$2));
|
|
456
456
|
}, v = Y((r$1) => {
|
|
457
|
-
if (d$
|
|
458
|
-
if (b$1(r$1) || X(r$1)) return i$
|
|
457
|
+
if (d$1(r$1)) return Q(r$1) ? E(r$1) : r$1;
|
|
458
|
+
if (b$1(r$1) || X(r$1)) return i$1(r$1);
|
|
459
459
|
if (A(r$1)) return x(r$1);
|
|
460
460
|
if (K(r$1)) return l$1(Object.values(r$1));
|
|
461
461
|
throw new Error("Invalid rule");
|
|
462
462
|
}), P = "abcdefghijklmnopqrstuvwxyz", ir = (r$1) => {
|
|
463
|
-
let e$
|
|
463
|
+
let e$2 = "";
|
|
464
464
|
for (; r$1 > 0;) {
|
|
465
|
-
const n$
|
|
466
|
-
e$
|
|
465
|
+
const n$2 = (r$1 - 1) % 26;
|
|
466
|
+
e$2 = P[n$2] + e$2, r$1 = Math.floor((r$1 - 1) / 26);
|
|
467
467
|
}
|
|
468
|
-
return e$
|
|
468
|
+
return e$2;
|
|
469
469
|
}, O$1 = (r$1) => {
|
|
470
|
-
let e$
|
|
471
|
-
for (let n$
|
|
472
|
-
return e$
|
|
473
|
-
}, S = (r$1, e$
|
|
474
|
-
if (e$
|
|
475
|
-
const n$
|
|
476
|
-
for (; r$1 <= e$
|
|
477
|
-
return n$
|
|
478
|
-
}, or$1 = (r$1, e$
|
|
479
|
-
const e$
|
|
480
|
-
return (n$
|
|
481
|
-
}, sr = i$
|
|
470
|
+
let e$2 = 0;
|
|
471
|
+
for (let n$2 = 0, a$2 = r$1.length; n$2 < a$2; n$2++) e$2 = e$2 * 26 + P.indexOf(r$1[n$2]) + 1;
|
|
472
|
+
return e$2;
|
|
473
|
+
}, S = (r$1, e$2) => {
|
|
474
|
+
if (e$2 < r$1) return S(e$2, r$1);
|
|
475
|
+
const n$2 = [];
|
|
476
|
+
for (; r$1 <= e$2;) n$2.push(r$1++);
|
|
477
|
+
return n$2;
|
|
478
|
+
}, or$1 = (r$1, e$2, n$2) => S(r$1, e$2).map((a$2) => String(a$2).padStart(n$2, "0")), R = (r$1, e$2) => S(O$1(r$1), O$1(e$2)).map(ir), p$1 = (r$1) => r$1, z = (r$1) => ur((e$2) => rr(e$2, r$1, { memoization: false }).join("")), ur = (r$1) => {
|
|
479
|
+
const e$2 = {};
|
|
480
|
+
return (n$2) => e$2[n$2] ?? (e$2[n$2] = r$1(n$2));
|
|
481
|
+
}, sr = i$1(/^\*\*\/\*$/, ".*"), cr = i$1(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/, (r$1, e$2, n$2) => `.*${e$2 ? "" : "(?:^|/)"}${n$2.replaceAll(".", "\\.")}`), lr = i$1(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/, (r$1, e$2, n$2, a$2) => `.*${e$2 ? "" : "(?:^|/)"}${n$2.replaceAll(".", "\\.")}(?:${a$2.replaceAll(",", "|").replaceAll(".", "\\.")})`), y$1 = i$1(/\\./, p$1), pr = i$1(/[$.*+?^(){}[\]\|]/, (r$1) => `\\${r$1}`), vr = i$1(/./, p$1), hr = i$1(/^(?:!!)*!(.*)$/, (r$1, e$2) => `(?!^${L(e$2)}$).*?`), dr = i$1(/^(!!)+/, ""), fr = l$1([hr, dr]), xr = i$1(/\/(\*\*\/)+/, "(?:/.+/|/)"), gr = i$1(/^(\*\*\/)+/, "(?:^|.*/)"), mr = i$1(/\/(\*\*)$/, "(?:/.*|$)"), _r = i$1(/\*\*/, ".*"), j = l$1([
|
|
482
482
|
xr,
|
|
483
483
|
gr,
|
|
484
484
|
mr,
|
|
485
485
|
_r
|
|
486
|
-
]), Sr = i$
|
|
486
|
+
]), Sr = i$1(/\*\/(?!\*\*\/)/, "[^/]*/"), yr = i$1(/\*/, "[^/]*"), N = l$1([Sr, yr]), k = i$1("?", "[^/]"), $r = i$1("[", p$1), wr = i$1("]", p$1), Ar = i$1(/[!^]/, "^/"), br = i$1(/[a-z]-[a-z]|[0-9]-[0-9]/i, p$1), Cr = i$1(/[$.*+?^(){}[\|]/, (r$1) => `\\${r$1}`), Mr = i$1(/[^\]]/, p$1), Er = l$1([
|
|
487
487
|
y$1,
|
|
488
488
|
Cr,
|
|
489
489
|
br,
|
|
@@ -493,7 +493,7 @@ let _lazyMatch = () => {
|
|
|
493
493
|
tr(Ar),
|
|
494
494
|
f$1(Er),
|
|
495
495
|
wr
|
|
496
|
-
]), Pr = i$
|
|
496
|
+
]), Pr = i$1("{", "(?:"), Or$1 = i$1("}", ")"), Rr = i$1(/(\d+)\.\.(\d+)/, (r$1, e$2, n$2) => or$1(+e$2, +n$2, Math.min(e$2.length, n$2.length)).join("|")), zr = i$1(/([a-z]+)\.\.([a-z]+)/, (r$1, e$2, n$2) => R(e$2, n$2).join("|")), jr = i$1(/([A-Z]+)\.\.([A-Z]+)/, (r$1, e$2, n$2) => R(e$2.toLowerCase(), n$2.toLowerCase()).join("|").toUpperCase()), Nr = l$1([
|
|
497
497
|
Rr,
|
|
498
498
|
zr,
|
|
499
499
|
jr
|
|
@@ -501,7 +501,7 @@ let _lazyMatch = () => {
|
|
|
501
501
|
Pr,
|
|
502
502
|
Nr,
|
|
503
503
|
Or$1
|
|
504
|
-
]), kr = i$
|
|
504
|
+
]), kr = i$1("{", "(?:"), Br = i$1("}", ")"), Ir = i$1(",", "|"), Fr = i$1(/[$.*+?^(){[\]\|]/, (r$1) => `\\${r$1}`), Lr = i$1(/[^}]/, p$1), Zr = E(() => F), Dr = l$1([
|
|
505
505
|
j,
|
|
506
506
|
N,
|
|
507
507
|
k,
|
|
@@ -530,16 +530,16 @@ let _lazyMatch = () => {
|
|
|
530
530
|
y$1,
|
|
531
531
|
pr,
|
|
532
532
|
vr
|
|
533
|
-
])), Vr = Ur, Gr = z(Vr), L = Gr, Tr = i$
|
|
533
|
+
])), Vr = Ur, Gr = z(Vr), L = Gr, Tr = i$1(/\\./, p$1), qr = i$1(/./, p$1), Hr = i$1(/\*\*\*+/, "*"), Jr = i$1(/([^/{[(!])\*\*/, (r$1, e$2) => `${e$2}*`), Qr = i$1(/(^|.)\*\*(?=[^*/)\]}])/, (r$1, e$2) => `${e$2}*`), Wr = f$1(l$1([
|
|
534
534
|
Tr,
|
|
535
535
|
Hr,
|
|
536
536
|
Jr,
|
|
537
537
|
Qr,
|
|
538
538
|
qr
|
|
539
|
-
])), Kr = Wr, Xr = z(Kr), Yr = Xr, $ = (r$1, e$
|
|
540
|
-
const n$
|
|
541
|
-
if (!n$
|
|
542
|
-
const a$2 = n$
|
|
539
|
+
])), Kr = Wr, Xr = z(Kr), Yr = Xr, $ = (r$1, e$2) => {
|
|
540
|
+
const n$2 = Array.isArray(r$1) ? r$1 : [r$1];
|
|
541
|
+
if (!n$2.length) return false;
|
|
542
|
+
const a$2 = n$2.map($.compile), t$3 = n$2.every((s$1) => /(\/(?:\*\*)?|\[\/\])$/.test(s$1)), o$1 = e$2.replace(/[\\\/]+/g, "/").replace(/\/$/, t$3 ? "/" : "");
|
|
543
543
|
return a$2.some((s$1) => s$1.test(o$1));
|
|
544
544
|
};
|
|
545
545
|
$.compile = (r$1) => new RegExp(`^${L(Yr(r$1))}$`, "s");
|
|
@@ -709,8 +709,8 @@ const format = function(p$1) {
|
|
|
709
709
|
const basename = function(p$1, extension) {
|
|
710
710
|
const segments = normalizeWindowsPath(p$1).split("/");
|
|
711
711
|
let lastSegment = "";
|
|
712
|
-
for (let i$
|
|
713
|
-
const val = segments[i$
|
|
712
|
+
for (let i$1 = segments.length - 1; i$1 >= 0; i$1--) {
|
|
713
|
+
const val = segments[i$1];
|
|
714
714
|
if (val) {
|
|
715
715
|
lastSegment = val;
|
|
716
716
|
break;
|
|
@@ -1030,8 +1030,8 @@ var MinimalPluginContextImpl = class {
|
|
|
1030
1030
|
watchMode
|
|
1031
1031
|
};
|
|
1032
1032
|
}
|
|
1033
|
-
error(e$
|
|
1034
|
-
return error(logPluginError(normalizeLog(e$
|
|
1033
|
+
error(e$2) {
|
|
1034
|
+
return error(logPluginError(normalizeLog(e$2), this.pluginName, { hook: this.hookName }));
|
|
1035
1035
|
}
|
|
1036
1036
|
};
|
|
1037
1037
|
|
|
@@ -2070,22 +2070,22 @@ function safeParse(schema, input, config2) {
|
|
|
2070
2070
|
//#endregion
|
|
2071
2071
|
//#region ../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.cjs
|
|
2072
2072
|
var require_ansis = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.cjs": ((exports, module) => {
|
|
2073
|
-
let e, t, r, { defineProperty: n, setPrototypeOf: l, create: o, keys: s } = Object, i
|
|
2074
|
-
let t$
|
|
2073
|
+
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) => {
|
|
2074
|
+
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);
|
|
2075
2075
|
return [
|
|
2076
|
-
n$
|
|
2077
|
-
n$
|
|
2078
|
-
255 & n$
|
|
2076
|
+
n$2 >> 16 & 255,
|
|
2077
|
+
n$2 >> 8 & 255,
|
|
2078
|
+
255 & n$2
|
|
2079
2079
|
];
|
|
2080
|
-
}, u
|
|
2081
|
-
let t$
|
|
2082
|
-
return 8 > e$
|
|
2080
|
+
}, 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) => {
|
|
2081
|
+
let t$3, r$1, n$2, l$1, o$1;
|
|
2082
|
+
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);
|
|
2083
2083
|
}, g = (() => {
|
|
2084
|
-
let r$1 = (e$
|
|
2084
|
+
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;
|
|
2085
2085
|
try {
|
|
2086
|
-
e = "," + s(i$
|
|
2087
|
-
} catch (e$
|
|
2088
|
-
i$
|
|
2086
|
+
e$1 = "," + s(i$1).join(",");
|
|
2087
|
+
} catch (e$2) {
|
|
2088
|
+
i$1 = {}, c$1 = 0;
|
|
2089
2089
|
}
|
|
2090
2090
|
let a$2 = "FORCE_COLOR", p$1 = {
|
|
2091
2091
|
false: 0,
|
|
@@ -2093,61 +2093,61 @@ var require_ansis = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ansis
|
|
|
2093
2093
|
1: 1,
|
|
2094
2094
|
2: 2,
|
|
2095
2095
|
3: 3
|
|
2096
|
-
}[i$
|
|
2097
|
-
return u$
|
|
2096
|
+
}[i$1[a$2]] ?? -1, u$1 = a$2 in i$1 && p$1 || r$1(/^--color=?(true|always)?$/);
|
|
2097
|
+
return u$1 && (c$1 = p$1), ~c$1 || (c$1 = ((r$2, n$3, l$2) => (t$2 = r$2.TERM, {
|
|
2098
2098
|
"24bit": 3,
|
|
2099
2099
|
truecolor: 3,
|
|
2100
2100
|
ansi256: 2,
|
|
2101
2101
|
ansi: 1
|
|
2102
|
-
}[r$2.COLORTERM] || (r$2.CI ? /,GITHUB/.test(e) ? 3 : 1 : n$
|
|
2102
|
+
}[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;
|
|
2103
2103
|
})(), f = {
|
|
2104
|
-
open: i
|
|
2105
|
-
close: i
|
|
2106
|
-
}, h = 39, b = 49, O = {}, m = ({ p: e$
|
|
2107
|
-
let o$1 = (e$
|
|
2108
|
-
if (!e$
|
|
2109
|
-
if (t$
|
|
2110
|
-
if ((e$
|
|
2104
|
+
open: i,
|
|
2105
|
+
close: i
|
|
2106
|
+
}, h = 39, b = 49, O = {}, m = ({ p: e$2 }, { open: t$3, close: n$2 }) => {
|
|
2107
|
+
let o$1 = (e$3, ...r$1) => {
|
|
2108
|
+
if (!e$3) {
|
|
2109
|
+
if (t$3 && t$3 === n$2) return t$3;
|
|
2110
|
+
if ((e$3 ?? i) === i) return i;
|
|
2111
2111
|
}
|
|
2112
|
-
let l$1, s$2 = e$
|
|
2112
|
+
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;
|
|
2113
2113
|
if (s$2.includes("\x1B")) for (; c$2; c$2 = c$2.p) {
|
|
2114
|
-
let { open: e$
|
|
2115
|
-
if (r$2) for (; ~(l$1 = s$2.indexOf(t$
|
|
2116
|
-
s$2 = n$
|
|
2114
|
+
let { open: e$4, close: t$4 } = c$2, r$2 = t$4.length, n$3 = i, o$2 = 0;
|
|
2115
|
+
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;
|
|
2116
|
+
s$2 = n$3 + s$2.slice(o$2);
|
|
2117
2117
|
}
|
|
2118
2118
|
return a$2 + (s$2.includes("\n") ? s$2.replace(/(\r?\n)/g, p$1 + "$1" + a$2) : s$2) + p$1;
|
|
2119
|
-
}, s$1 = t$
|
|
2120
|
-
return e$
|
|
2121
|
-
open: t$
|
|
2122
|
-
close: n$
|
|
2119
|
+
}, s$1 = t$3, c$1 = n$2;
|
|
2120
|
+
return e$2 && (s$1 = e$2.o + t$3, c$1 = n$2 + e$2.c), l(o$1, r), o$1.p = {
|
|
2121
|
+
open: t$3,
|
|
2122
|
+
close: n$2,
|
|
2123
2123
|
o: s$1,
|
|
2124
2124
|
c: c$1,
|
|
2125
|
-
p: e$
|
|
2125
|
+
p: e$2
|
|
2126
2126
|
}, o$1.open = s$1, o$1.close = c$1, o$1;
|
|
2127
2127
|
};
|
|
2128
|
-
const w = function(e$
|
|
2129
|
-
let t$
|
|
2128
|
+
const w = function(e$2 = g) {
|
|
2129
|
+
let t$3 = {
|
|
2130
2130
|
Ansis: w,
|
|
2131
|
-
level: e$
|
|
2131
|
+
level: e$2,
|
|
2132
2132
|
isSupported: () => s$1,
|
|
2133
|
-
strip: (e$
|
|
2134
|
-
extend(e$
|
|
2135
|
-
for (let t$
|
|
2136
|
-
let r$1 = e$
|
|
2137
|
-
O[t$
|
|
2138
|
-
return (...e$
|
|
2133
|
+
strip: (e$3) => e$3.replace(/[][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, i),
|
|
2134
|
+
extend(e$3) {
|
|
2135
|
+
for (let t$4 in e$3) {
|
|
2136
|
+
let r$1 = e$3[t$4], l$1 = (typeof r$1)[0], o$1 = "s" === l$1 ? x(...p(r$1)) : r$1;
|
|
2137
|
+
O[t$4] = "f" === l$1 ? { get() {
|
|
2138
|
+
return (...e$4) => m(this, r$1(...e$4));
|
|
2139
2139
|
} } : { get() {
|
|
2140
|
-
let e$
|
|
2141
|
-
return n(this, t$
|
|
2140
|
+
let e$4 = m(this, o$1);
|
|
2141
|
+
return n$1(this, t$4, { value: e$4 }), e$4;
|
|
2142
2142
|
} };
|
|
2143
2143
|
}
|
|
2144
|
-
return r = o({}, O), l(t$
|
|
2144
|
+
return r = o({}, O), l(t$3, r), t$3;
|
|
2145
2145
|
}
|
|
2146
|
-
}, s$1 = e$
|
|
2147
|
-
open: `[${e$
|
|
2148
|
-
close: `[${t$
|
|
2149
|
-
} : f, a$2 = (e$
|
|
2150
|
-
2 === e$
|
|
2146
|
+
}, s$1 = e$2 > 0, c$1 = (e$3, t$4) => s$1 ? {
|
|
2147
|
+
open: `[${e$3}m`,
|
|
2148
|
+
close: `[${t$4}m`
|
|
2149
|
+
} : 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);
|
|
2150
|
+
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));
|
|
2151
2151
|
let E, M = {
|
|
2152
2152
|
fg: v,
|
|
2153
2153
|
bg: C,
|
|
@@ -2165,9 +2165,9 @@ var require_ansis = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ansis
|
|
|
2165
2165
|
hidden: c$1(8, 28),
|
|
2166
2166
|
strikethrough: c$1(9, 29)
|
|
2167
2167
|
}, I = "Bright";
|
|
2168
|
-
return "black,red,green,yellow,blue,magenta,cyan,white,gray".split(",").map(((e$
|
|
2169
|
-
E = "bg" + e$
|
|
2170
|
-
})), t$
|
|
2168
|
+
return "black,red,green,yellow,blue,magenta,cyan,white,gray".split(",").map(((e$3, t$4) => {
|
|
2169
|
+
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);
|
|
2170
|
+
})), t$3.extend(M);
|
|
2171
2171
|
}, y = new w();
|
|
2172
2172
|
module.exports = y, y.default = y;
|
|
2173
2173
|
}) });
|
|
@@ -2175,7 +2175,6 @@ var require_ansis = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ansis
|
|
|
2175
2175
|
//#endregion
|
|
2176
2176
|
//#region ../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.mjs
|
|
2177
2177
|
var import_ansis = /* @__PURE__ */ __toESM(require_ansis(), 1);
|
|
2178
|
-
var ansis_default = import_ansis.default;
|
|
2179
2178
|
const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, bold, dim, italic, underline, strikethrough, black, red, green, yellow, blue, magenta, cyan, white, gray, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGray, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright } = import_ansis.default;
|
|
2180
2179
|
|
|
2181
2180
|
//#endregion
|
|
@@ -2354,11 +2353,11 @@ const InputOptionsSchema = strictObject({
|
|
|
2354
2353
|
literal("browser"),
|
|
2355
2354
|
literal("neutral"),
|
|
2356
2355
|
literal("node")
|
|
2357
|
-
])), description(`Platform for which the code should be generated (node, ${
|
|
2356
|
+
])), description(`Platform for which the code should be generated (node, ${import_ansis.default.underline("browser")}, neutral)`)),
|
|
2358
2357
|
shimMissingExports: pipe(optional(boolean()), description("Create shim variables for missing exports")),
|
|
2359
2358
|
treeshake: optional(TreeshakingOptionsSchema),
|
|
2360
2359
|
optimization: optional(OptimizationOptionsSchema),
|
|
2361
|
-
logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${
|
|
2360
|
+
logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${import_ansis.default.dim("silent")}, ${import_ansis.default.underline(import_ansis.default.gray("info"))}, debug, ${import_ansis.default.yellow("warn")})`)),
|
|
2362
2361
|
onLog: optional(OnLogSchema),
|
|
2363
2362
|
onwarn: optional(OnwarnSchema),
|
|
2364
2363
|
moduleTypes: pipe(optional(ModuleTypesSchema), description("Module types for customized extensions")),
|
|
@@ -2476,18 +2475,18 @@ const OutputOptionsSchema = strictObject({
|
|
|
2476
2475
|
literal("named"),
|
|
2477
2476
|
literal("default"),
|
|
2478
2477
|
literal("none")
|
|
2479
|
-
])), description(`Specify a export mode (${
|
|
2478
|
+
])), description(`Specify a export mode (${import_ansis.default.underline("auto")}, named, default, none)`)),
|
|
2480
2479
|
hashCharacters: pipe(optional(union([
|
|
2481
2480
|
literal("base64"),
|
|
2482
2481
|
literal("base36"),
|
|
2483
2482
|
literal("hex")
|
|
2484
2483
|
])), description("Use the specified character set for file hashes")),
|
|
2485
|
-
format: pipe(optional(ModuleFormatSchema), description(`Output format of the generated bundle (supports ${
|
|
2484
|
+
format: pipe(optional(ModuleFormatSchema), description(`Output format of the generated bundle (supports ${import_ansis.default.underline("esm")}, cjs, and iife)`)),
|
|
2486
2485
|
sourcemap: pipe(optional(union([
|
|
2487
2486
|
boolean(),
|
|
2488
2487
|
literal("inline"),
|
|
2489
2488
|
literal("hidden")
|
|
2490
|
-
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${
|
|
2489
|
+
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${import_ansis.default.bold("pass the `-s` on the last argument if you want to generate `.map` file")})`)),
|
|
2491
2490
|
sourcemapBaseUrl: pipe(optional(string()), description("Base URL used to prefix sourcemap paths")),
|
|
2492
2491
|
sourcemapDebugIds: pipe(optional(boolean()), description("Inject sourcemap debug IDs")),
|
|
2493
2492
|
sourcemapIgnoreList: optional(union([boolean(), custom(() => true)])),
|
|
@@ -2528,7 +2527,7 @@ const OutputOptionsSchema = strictObject({
|
|
|
2528
2527
|
minifyInternalExports: pipe(optional(boolean()), description("Minify internal exports"))
|
|
2529
2528
|
});
|
|
2530
2529
|
const getAddonDescription = (placement, wrapper) => {
|
|
2531
|
-
return `Code to insert the ${
|
|
2530
|
+
return `Code to insert the ${import_ansis.default.bold(placement)} of the bundled file (${import_ansis.default.bold(wrapper)} the wrapper function)`;
|
|
2532
2531
|
};
|
|
2533
2532
|
const OutputCliOverrideSchema = strictObject({
|
|
2534
2533
|
assetFileNames: pipe(optional(string()), description("Name pattern for asset files")),
|
|
@@ -2576,7 +2575,7 @@ function validateOption(key, options) {
|
|
|
2576
2575
|
const issuePaths = issue.path.map((path) => path.key);
|
|
2577
2576
|
let issueMsg = issue.message;
|
|
2578
2577
|
if (issue.type === "union") {
|
|
2579
|
-
const subIssue = issue.issues?.find((i$
|
|
2578
|
+
const subIssue = issue.issues?.find((i$1) => !(i$1.type !== issue.received && i$1.input === issue.input));
|
|
2580
2579
|
if (subIssue) {
|
|
2581
2580
|
if (subIssue.path) issuePaths.push(subIssue.path.map((path) => path.key));
|
|
2582
2581
|
issueMsg = subIssue.message;
|
|
@@ -2610,19 +2609,19 @@ function bindingifySourcemap$1(map) {
|
|
|
2610
2609
|
//#endregion
|
|
2611
2610
|
//#region src/utils/error.ts
|
|
2612
2611
|
function normalizeErrors(rawErrors) {
|
|
2613
|
-
const errors = rawErrors.map((e$
|
|
2614
|
-
kind: e$
|
|
2615
|
-
message: e$
|
|
2612
|
+
const errors = rawErrors.map((e$2) => e$2 instanceof Error ? e$2 : Object.assign(/* @__PURE__ */ new Error(), {
|
|
2613
|
+
kind: e$2.kind,
|
|
2614
|
+
message: e$2.message,
|
|
2616
2615
|
stack: void 0
|
|
2617
2616
|
}));
|
|
2618
2617
|
let summary = `Build failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
|
|
2619
|
-
for (let i$
|
|
2618
|
+
for (let i$1 = 0; i$1 < errors.length; i$1++) {
|
|
2620
2619
|
summary += "\n";
|
|
2621
|
-
if (i$
|
|
2620
|
+
if (i$1 >= 5) {
|
|
2622
2621
|
summary += "...";
|
|
2623
2622
|
break;
|
|
2624
2623
|
}
|
|
2625
|
-
summary += getErrorMessage(errors[i$
|
|
2624
|
+
summary += getErrorMessage(errors[i$1]);
|
|
2626
2625
|
}
|
|
2627
2626
|
const wrapper = new Error(summary);
|
|
2628
2627
|
Object.defineProperty(wrapper, "errors", {
|
|
@@ -2637,20 +2636,20 @@ function normalizeErrors(rawErrors) {
|
|
|
2637
2636
|
});
|
|
2638
2637
|
return wrapper;
|
|
2639
2638
|
}
|
|
2640
|
-
function getErrorMessage(e$
|
|
2641
|
-
if (Object.hasOwn(e$
|
|
2639
|
+
function getErrorMessage(e$2) {
|
|
2640
|
+
if (Object.hasOwn(e$2, "kind")) return e$2.message;
|
|
2642
2641
|
let s$1 = "";
|
|
2643
|
-
if (e$
|
|
2644
|
-
const id$1 = e$
|
|
2642
|
+
if (e$2.plugin) s$1 += `[plugin ${e$2.plugin}]`;
|
|
2643
|
+
const id$1 = e$2.id ?? e$2.loc?.file;
|
|
2645
2644
|
if (id$1) {
|
|
2646
2645
|
s$1 += " " + id$1;
|
|
2647
|
-
if (e$
|
|
2646
|
+
if (e$2.loc) s$1 += `:${e$2.loc.line}:${e$2.loc.column}`;
|
|
2648
2647
|
}
|
|
2649
2648
|
if (s$1) s$1 += "\n";
|
|
2650
|
-
const message = `${e$
|
|
2649
|
+
const message = `${e$2.name ?? "Error"}: ${e$2.message}`;
|
|
2651
2650
|
s$1 += message;
|
|
2652
|
-
if (e$
|
|
2653
|
-
if (e$
|
|
2651
|
+
if (e$2.frame) s$1 = joinNewLine(s$1, e$2.frame);
|
|
2652
|
+
if (e$2.stack) s$1 = joinNewLine(s$1, e$2.stack.replace(message, ""));
|
|
2654
2653
|
return s$1;
|
|
2655
2654
|
}
|
|
2656
2655
|
function joinNewLine(s1, s2) {
|
|
@@ -2778,33 +2777,33 @@ function exclude(expr) {
|
|
|
2778
2777
|
}
|
|
2779
2778
|
|
|
2780
2779
|
//#endregion
|
|
2781
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2782
|
-
function
|
|
2783
|
-
let
|
|
2784
|
-
return
|
|
2785
|
-
lazy:
|
|
2786
|
-
lazyArgs:
|
|
2780
|
+
//#region ../../node_modules/.pnpm/remeda@2.30.0/node_modules/remeda/dist/lazyDataLastImpl-BDhrIOwR.js
|
|
2781
|
+
function e(e$2, t$3, n$2) {
|
|
2782
|
+
let r$1 = (n$3) => e$2(n$3, ...t$3);
|
|
2783
|
+
return n$2 === void 0 ? r$1 : Object.assign(r$1, {
|
|
2784
|
+
lazy: n$2,
|
|
2785
|
+
lazyArgs: t$3
|
|
2787
2786
|
});
|
|
2788
2787
|
}
|
|
2789
2788
|
|
|
2790
2789
|
//#endregion
|
|
2791
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2792
|
-
function
|
|
2793
|
-
let
|
|
2794
|
-
if (
|
|
2795
|
-
if (
|
|
2796
|
-
throw
|
|
2790
|
+
//#region ../../node_modules/.pnpm/remeda@2.30.0/node_modules/remeda/dist/purry-DH9cw9sy.js
|
|
2791
|
+
function t(t$3, n$2, r$1) {
|
|
2792
|
+
let i$1 = t$3.length - n$2.length;
|
|
2793
|
+
if (i$1 === 0) return t$3(...n$2);
|
|
2794
|
+
if (i$1 === 1) return e(t$3, n$2, r$1);
|
|
2795
|
+
throw Error(`Wrong number of arguments`);
|
|
2797
2796
|
}
|
|
2798
2797
|
|
|
2799
2798
|
//#endregion
|
|
2800
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2801
|
-
function
|
|
2802
|
-
return
|
|
2803
|
-
}
|
|
2804
|
-
|
|
2805
|
-
let
|
|
2806
|
-
for (let [
|
|
2807
|
-
return
|
|
2799
|
+
//#region ../../node_modules/.pnpm/remeda@2.30.0/node_modules/remeda/dist/partition-BJYkp-a7.js
|
|
2800
|
+
function t$1(...t$3) {
|
|
2801
|
+
return t(n, t$3);
|
|
2802
|
+
}
|
|
2803
|
+
const n = (e$2, t$3) => {
|
|
2804
|
+
let n$2 = [[], []];
|
|
2805
|
+
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);
|
|
2806
|
+
return n$2;
|
|
2808
2807
|
};
|
|
2809
2808
|
|
|
2810
2809
|
//#endregion
|
|
@@ -2829,8 +2828,8 @@ function transformFilterMatcherToFilterExprs(filterOption) {
|
|
|
2829
2828
|
let idExcludes = [];
|
|
2830
2829
|
let codeIncludes = [];
|
|
2831
2830
|
let codeExcludes = [];
|
|
2832
|
-
if (id$1) [idIncludes, idExcludes] =
|
|
2833
|
-
if (code$1) [codeIncludes, codeExcludes] =
|
|
2831
|
+
if (id$1) [idIncludes, idExcludes] = t$1(generalHookFilterMatcherToFilterExprs(id$1, "id") ?? [], (m$1) => m$1.kind === "include");
|
|
2832
|
+
if (code$1) [codeIncludes, codeExcludes] = t$1(generalHookFilterMatcherToFilterExprs(code$1, "code") ?? [], (m$1) => m$1.kind === "include");
|
|
2834
2833
|
ret.push(...idExcludes);
|
|
2835
2834
|
ret.push(...codeExcludes);
|
|
2836
2835
|
let andExprList = [];
|
|
@@ -2858,7 +2857,7 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2858
2857
|
switch (expr.kind) {
|
|
2859
2858
|
case "and": {
|
|
2860
2859
|
let args$1 = expr.args;
|
|
2861
|
-
for (let i$
|
|
2860
|
+
for (let i$1 = args$1.length - 1; i$1 >= 0; i$1--) bindingifyFilterExprImpl(args$1[i$1], list);
|
|
2862
2861
|
list.push({
|
|
2863
2862
|
kind: "And",
|
|
2864
2863
|
payload: args$1.length
|
|
@@ -2867,7 +2866,7 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2867
2866
|
}
|
|
2868
2867
|
case "or": {
|
|
2869
2868
|
let args$1 = expr.args;
|
|
2870
|
-
for (let i$
|
|
2869
|
+
for (let i$1 = args$1.length - 1; i$1 >= 0; i$1--) bindingifyFilterExprImpl(args$1[i$1], list);
|
|
2871
2870
|
list.push({
|
|
2872
2871
|
kind: "Or",
|
|
2873
2872
|
payload: args$1.length
|
|
@@ -2957,7 +2956,7 @@ function bindingPluginOrder(order) {
|
|
|
2957
2956
|
}
|
|
2958
2957
|
|
|
2959
2958
|
//#endregion
|
|
2960
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2959
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.82.2/node_modules/oxc-parser/wrap.mjs
|
|
2961
2960
|
function wrap$1(result) {
|
|
2962
2961
|
let program, module$1, comments, errors;
|
|
2963
2962
|
return {
|
|
@@ -3002,13 +3001,13 @@ function wrap(result, sourceText) {
|
|
|
3002
3001
|
}
|
|
3003
3002
|
function normalizeParseError(sourceText, errors) {
|
|
3004
3003
|
let message = `Parse failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
|
|
3005
|
-
for (let i$
|
|
3006
|
-
if (i$
|
|
3004
|
+
for (let i$1 = 0; i$1 < errors.length; i$1++) {
|
|
3005
|
+
if (i$1 >= 5) {
|
|
3007
3006
|
message += "\n...";
|
|
3008
3007
|
break;
|
|
3009
3008
|
}
|
|
3010
|
-
const e$
|
|
3011
|
-
message += e$
|
|
3009
|
+
const e$2 = errors[i$1];
|
|
3010
|
+
message += e$2.message + "\n" + e$2.labels.map((label) => {
|
|
3012
3011
|
const location = locate(sourceText, label.start, { offsetLine: 1 });
|
|
3013
3012
|
if (!location) return;
|
|
3014
3013
|
return getCodeFrame(sourceText, location.line, location.column);
|
|
@@ -3093,10 +3092,10 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
3093
3092
|
data.loadModulePromiseMap.set(id$1, promise$1);
|
|
3094
3093
|
try {
|
|
3095
3094
|
await context.load(id$1, options.moduleSideEffects ?? void 0);
|
|
3096
|
-
} catch (e$
|
|
3095
|
+
} catch (e$2) {
|
|
3097
3096
|
data.loadModulePromiseMap.delete(id$1);
|
|
3098
3097
|
data.loadModulePromiseResolveFnMap.delete(id$1);
|
|
3099
|
-
throw e$
|
|
3098
|
+
throw e$2;
|
|
3100
3099
|
}
|
|
3101
3100
|
return promise$1;
|
|
3102
3101
|
}
|
|
@@ -3183,12 +3182,12 @@ var TransformPluginContextImpl = class extends PluginContextImpl {
|
|
|
3183
3182
|
this.warn = getLogHandler$1(this.warn);
|
|
3184
3183
|
this.info = getLogHandler$1(this.info);
|
|
3185
3184
|
}
|
|
3186
|
-
error(e$
|
|
3187
|
-
if (typeof e$
|
|
3188
|
-
if (pos) augmentCodeLocation(e$
|
|
3189
|
-
e$
|
|
3190
|
-
e$
|
|
3191
|
-
return error(logPluginError(normalizeLog(e$
|
|
3185
|
+
error(e$2, pos) {
|
|
3186
|
+
if (typeof e$2 === "string") e$2 = { message: e$2 };
|
|
3187
|
+
if (pos) augmentCodeLocation(e$2, pos, this.moduleSource, this.moduleId);
|
|
3188
|
+
e$2.id = this.moduleId;
|
|
3189
|
+
e$2.hook = "transform";
|
|
3190
|
+
return error(logPluginError(normalizeLog(e$2), this.pluginName));
|
|
3192
3191
|
}
|
|
3193
3192
|
getCombinedSourcemap() {
|
|
3194
3193
|
return JSON.parse(this.inner.getCombinedSourcemap());
|
|
@@ -3414,9 +3413,9 @@ function transformRenderedChunk(chunk) {
|
|
|
3414
3413
|
}
|
|
3415
3414
|
function transformChunkModules(modules) {
|
|
3416
3415
|
const result = {};
|
|
3417
|
-
for (let i$
|
|
3418
|
-
let key = modules.keys[i$
|
|
3419
|
-
const mod = modules.values[i$
|
|
3416
|
+
for (let i$1 = 0; i$1 < modules.values.length; i$1++) {
|
|
3417
|
+
let key = modules.keys[i$1];
|
|
3418
|
+
const mod = modules.values[i$1];
|
|
3420
3419
|
result[key] = transformToRenderedModule(mod);
|
|
3421
3420
|
}
|
|
3422
3421
|
return result;
|
|
@@ -3925,8 +3924,8 @@ function wrapHandlers(plugin) {
|
|
|
3925
3924
|
if (handler) plugin[hookName] = async (...args$1) => {
|
|
3926
3925
|
try {
|
|
3927
3926
|
return await handler(...args$1);
|
|
3928
|
-
} catch (e$
|
|
3929
|
-
return error(logPluginError(e$
|
|
3927
|
+
} catch (e$2) {
|
|
3928
|
+
return error(logPluginError(e$2, plugin.name, {
|
|
3930
3929
|
hook: hookName,
|
|
3931
3930
|
id: hookName === "transform" ? args$1[2] : void 0
|
|
3932
3931
|
}));
|
|
@@ -3956,6 +3955,9 @@ var NormalizedInputOptionsImpl = class {
|
|
|
3956
3955
|
get platform() {
|
|
3957
3956
|
return this.inner.platform;
|
|
3958
3957
|
}
|
|
3958
|
+
get context() {
|
|
3959
|
+
return this.inner.context;
|
|
3960
|
+
}
|
|
3959
3961
|
};
|
|
3960
3962
|
|
|
3961
3963
|
//#endregion
|
|
@@ -4563,12 +4565,12 @@ function bindingifyPreserveEntrySignatures(preserveEntrySignatures) {
|
|
|
4563
4565
|
|
|
4564
4566
|
//#endregion
|
|
4565
4567
|
//#region src/utils/create-bundler-option.ts
|
|
4566
|
-
async function createBundlerOptions(inputOptions, outputOptions, watchMode
|
|
4568
|
+
async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
4567
4569
|
const inputPlugins = await normalizePluginOption(inputOptions.plugins);
|
|
4568
4570
|
const outputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
4569
4571
|
const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
|
|
4570
4572
|
const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
4571
|
-
|
|
4573
|
+
outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
|
|
4572
4574
|
const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
4573
4575
|
let plugins = [
|
|
4574
4576
|
...BUILTIN_PLUGINS,
|
|
@@ -4589,17 +4591,17 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode, isCl
|
|
|
4589
4591
|
onLog,
|
|
4590
4592
|
stopWorkers: parallelPluginInitResult?.stopWorkers
|
|
4591
4593
|
};
|
|
4592
|
-
} catch (e$
|
|
4594
|
+
} catch (e$2) {
|
|
4593
4595
|
await parallelPluginInitResult?.stopWorkers();
|
|
4594
|
-
throw e$
|
|
4596
|
+
throw e$2;
|
|
4595
4597
|
}
|
|
4596
4598
|
}
|
|
4597
4599
|
|
|
4598
4600
|
//#endregion
|
|
4599
4601
|
//#region src/utils/create-bundler.ts
|
|
4600
4602
|
let asyncRuntimeShutdown = false;
|
|
4601
|
-
async function createBundlerImpl(bundler, inputOptions, outputOptions
|
|
4602
|
-
const option = await createBundlerOptions(inputOptions, outputOptions, false
|
|
4603
|
+
async function createBundlerImpl(bundler, inputOptions, outputOptions) {
|
|
4604
|
+
const option = await createBundlerOptions(inputOptions, outputOptions, false);
|
|
4603
4605
|
if (asyncRuntimeShutdown) startAsyncRuntime();
|
|
4604
4606
|
try {
|
|
4605
4607
|
return {
|
|
@@ -4610,9 +4612,9 @@ async function createBundlerImpl(bundler, inputOptions, outputOptions, isClose)
|
|
|
4610
4612
|
asyncRuntimeShutdown = true;
|
|
4611
4613
|
}
|
|
4612
4614
|
};
|
|
4613
|
-
} catch (e$
|
|
4615
|
+
} catch (e$2) {
|
|
4614
4616
|
await option.stopWorkers?.();
|
|
4615
|
-
throw e$
|
|
4617
|
+
throw e$2;
|
|
4616
4618
|
}
|
|
4617
4619
|
}
|
|
4618
4620
|
|
|
@@ -4640,11 +4642,11 @@ var RolldownBuild = class {
|
|
|
4640
4642
|
this.#bundler = new BindingBundler();
|
|
4641
4643
|
}
|
|
4642
4644
|
get closed() {
|
|
4643
|
-
return this.#bundlerImpl?.impl.closed ??
|
|
4645
|
+
return this.#bundlerImpl?.impl.closed ?? true;
|
|
4644
4646
|
}
|
|
4645
|
-
async #getBundlerWithStopWorker(outputOptions
|
|
4647
|
+
async #getBundlerWithStopWorker(outputOptions) {
|
|
4646
4648
|
if (this.#bundlerImpl) await this.#bundlerImpl.stopWorkers?.();
|
|
4647
|
-
return this.#bundlerImpl = await createBundlerImpl(this.#bundler, this.#inputOptions, outputOptions
|
|
4649
|
+
return this.#bundlerImpl = await createBundlerImpl(this.#bundler, this.#inputOptions, outputOptions);
|
|
4648
4650
|
}
|
|
4649
4651
|
async generate(outputOptions = {}) {
|
|
4650
4652
|
validateOption("output", outputOptions);
|
|
@@ -4659,10 +4661,12 @@ var RolldownBuild = class {
|
|
|
4659
4661
|
return transformToRollupOutput(output);
|
|
4660
4662
|
}
|
|
4661
4663
|
async close() {
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4664
|
+
if (this.#bundlerImpl) {
|
|
4665
|
+
await this.#bundlerImpl.stopWorkers?.();
|
|
4666
|
+
await this.#bundlerImpl.impl.close();
|
|
4667
|
+
this.#bundlerImpl.shutdown();
|
|
4668
|
+
this.#bundlerImpl = void 0;
|
|
4669
|
+
}
|
|
4666
4670
|
}
|
|
4667
4671
|
async [Symbol.asyncDispose]() {
|
|
4668
4672
|
await this.close();
|