@rolldown/browser 1.0.0-beta.43 → 1.0.0-beta.45
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-setup.d.mts +1 -0
- package/dist/cli-setup.mjs +16 -0
- package/dist/cli.mjs +1049 -76
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +4 -4
- package/dist/experimental-index.browser.mjs +34 -453
- package/dist/experimental-index.d.mts +21 -6
- package/dist/experimental-index.mjs +39 -16
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +1 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/parallel-plugin-worker.mjs +3 -3
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +3 -3
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/rolldown-binding.wasi-browser.js +1 -2
- package/dist/rolldown-binding.wasi.cjs +1 -2
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-BkaKdpud.d.mts → binding-DRegrFdE.d.mts} +98 -22
- package/dist/shared/{dist-CU0dSkK2.mjs → composable-filters-D_PY7Qa7.mjs} +2 -2
- package/dist/shared/{define-config-D5LB7YAC.d.mts → define-config-C6-goOPh.d.mts} +217 -99
- package/dist/shared/{load-config-DBsf9ada.mjs → load-config-Z2MWPLZO.mjs} +4 -4
- package/dist/shared/{parse-ast-index-Gktxd-oi.mjs → parse-ast-index-Ck5SwMSC.mjs} +37 -6
- package/dist/shared/{prompt-B4e-jZUR.mjs → prompt-BDwA3jSr.mjs} +1 -1
- package/dist/shared/{src-Dqrw8WuH.mjs → src-B4ZmdjD5.mjs} +637 -669
- package/dist/{src-DXN0YLUN.js → src-CLWy1Uip.js} +871 -873
- package/package.json +1 -1
- package/dist/shared/logger-B83ocDok.mjs +0 -985
|
@@ -1,33 +1,7 @@
|
|
|
1
|
-
import { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingChunkModuleOrderBy,
|
|
1
|
+
import { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingMagicString as BindingMagicString$1, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, BindingWatcher, parseSync, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
2
2
|
|
|
3
|
-
//#region rolldown:runtime
|
|
4
|
-
var __create = Object.create;
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __commonJS = (cb, mod) => function() {
|
|
11
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
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
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
-
get: ((k) => from[k]).bind(null, key),
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
-
value: mod,
|
|
25
|
-
enumerable: true
|
|
26
|
-
}) : target, mod));
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
3
|
//#region package.json
|
|
30
|
-
var version = "1.0.0-beta.
|
|
4
|
+
var version = "1.0.0-beta.45";
|
|
31
5
|
|
|
32
6
|
//#endregion
|
|
33
7
|
//#region src/utils/code-frame.ts
|
|
@@ -68,6 +42,12 @@ function getCodeFrame(source, line, column) {
|
|
|
68
42
|
}).join("\n");
|
|
69
43
|
}
|
|
70
44
|
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/utils/style-text.ts
|
|
47
|
+
function styleText(...args$1) {
|
|
48
|
+
return args$1[1];
|
|
49
|
+
}
|
|
50
|
+
|
|
71
51
|
//#endregion
|
|
72
52
|
//#region src/log/locate-character/index.js
|
|
73
53
|
/** @typedef {import('./types').Location} Location */
|
|
@@ -85,18 +65,18 @@ function rangeContains(range, index) {
|
|
|
85
65
|
function getLocator(source, options = {}) {
|
|
86
66
|
const { offsetLine = 0, offsetColumn = 0 } = options;
|
|
87
67
|
let start = 0;
|
|
88
|
-
const ranges = source.split("\n").map((line, i$
|
|
68
|
+
const ranges = source.split("\n").map((line, i$1) => {
|
|
89
69
|
const end = start + line.length + 1;
|
|
90
70
|
/** @type {import('./types').Range} */
|
|
91
71
|
const range = {
|
|
92
72
|
start,
|
|
93
73
|
end,
|
|
94
|
-
line: i$
|
|
74
|
+
line: i$1
|
|
95
75
|
};
|
|
96
76
|
start = end;
|
|
97
77
|
return range;
|
|
98
78
|
});
|
|
99
|
-
let i
|
|
79
|
+
let i = 0;
|
|
100
80
|
/**
|
|
101
81
|
* @param {string | number} search
|
|
102
82
|
* @param {number} [index]
|
|
@@ -105,16 +85,16 @@ function getLocator(source, options = {}) {
|
|
|
105
85
|
function locator(search, index) {
|
|
106
86
|
if (typeof search === "string") search = source.indexOf(search, index ?? 0);
|
|
107
87
|
if (search === -1) return void 0;
|
|
108
|
-
let range = ranges[i
|
|
109
|
-
const d
|
|
88
|
+
let range = ranges[i];
|
|
89
|
+
const d = search >= range.end ? 1 : -1;
|
|
110
90
|
while (range) {
|
|
111
91
|
if (rangeContains(range, search)) return {
|
|
112
92
|
line: offsetLine + range.line,
|
|
113
93
|
column: offsetColumn + search - range.start,
|
|
114
94
|
character: search
|
|
115
95
|
};
|
|
116
|
-
i
|
|
117
|
-
range = ranges[i
|
|
96
|
+
i += d;
|
|
97
|
+
range = ranges[i];
|
|
118
98
|
}
|
|
119
99
|
}
|
|
120
100
|
return locator;
|
|
@@ -131,7 +111,7 @@ function locate(source, search, options) {
|
|
|
131
111
|
|
|
132
112
|
//#endregion
|
|
133
113
|
//#region src/log/logs.ts
|
|
134
|
-
const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR",
|
|
114
|
+
const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR", NO_FS_IN_BROWSER = "NO_FS_IN_BROWSER", DEPRECATED_DEFINE = "DEPRECATED_DEFINE", DEPRECATED_INJECT = "DEPRECATED_INJECT", DEPRECATED_PROFILER_NAMES = "DEPRECATED_PROFILER_NAMES", DEPRECATED_KEEP_NAMES = "DEPRECATED_KEEP_NAMES", DEPRECATED_DROP_LABELS = "DEPRECATED_DROP_LABELS";
|
|
135
115
|
function logParseError(message) {
|
|
136
116
|
return {
|
|
137
117
|
code: PARSE_ERROR,
|
|
@@ -162,18 +142,42 @@ function logMultiplyNotifyOption() {
|
|
|
162
142
|
message: `Found multiply notify option at watch options, using first one to start notify watcher.`
|
|
163
143
|
};
|
|
164
144
|
}
|
|
165
|
-
function logDuplicateJsxConfig() {
|
|
166
|
-
return {
|
|
167
|
-
code: DUPLICATE_JSX_CONFIG,
|
|
168
|
-
message: "Both `options.jsx` and `options.transform.jsx` are set so `options.jsx` is ignored"
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
145
|
function logNoFileSystemInBrowser(method) {
|
|
172
146
|
return {
|
|
173
147
|
code: NO_FS_IN_BROWSER,
|
|
174
148
|
message: `Cannot access the file system (via "${method}") when using the browser build of Rolldown.`
|
|
175
149
|
};
|
|
176
150
|
}
|
|
151
|
+
function logDeprecatedDefine() {
|
|
152
|
+
return {
|
|
153
|
+
code: DEPRECATED_DEFINE,
|
|
154
|
+
message: `${styleText(["yellow", "bold"], "⚠ Deprecation Warning:")} The top-level "define" option is deprecated. Use "transform.define" instead.`
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function logDeprecatedInject() {
|
|
158
|
+
return {
|
|
159
|
+
code: DEPRECATED_INJECT,
|
|
160
|
+
message: `${styleText(["yellow", "bold"], "⚠ Deprecation Warning:")} The top-level "inject" option is deprecated. Use "transform.inject" instead.`
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function logDeprecatedProfilerNames() {
|
|
164
|
+
return {
|
|
165
|
+
code: DEPRECATED_PROFILER_NAMES,
|
|
166
|
+
message: "The top-level \"profilerNames\" option is deprecated. Use \"output.generatedCode.profilerNames\" instead."
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function logDeprecatedKeepNames() {
|
|
170
|
+
return {
|
|
171
|
+
code: DEPRECATED_KEEP_NAMES,
|
|
172
|
+
message: "The top-level \"keepNames\" option is deprecated. Use \"output.keepNames\" instead."
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
function logDeprecatedDropLabels() {
|
|
176
|
+
return {
|
|
177
|
+
code: DEPRECATED_DROP_LABELS,
|
|
178
|
+
message: `${styleText(["yellow", "bold"], "⚠ Deprecation Warning:")} The top-level "dropLabels" option is deprecated. Use "transform.dropLabels" instead.`
|
|
179
|
+
};
|
|
180
|
+
}
|
|
177
181
|
function logPluginError(error$1, plugin, { hook, id: id$1 } = {}) {
|
|
178
182
|
try {
|
|
179
183
|
const code$1 = error$1.code;
|
|
@@ -235,9 +239,9 @@ function makeBuiltinPluginCallable(plugin) {
|
|
|
235
239
|
for (const key in callablePlugin) wrappedPlugin[key] = async function(...args$1) {
|
|
236
240
|
try {
|
|
237
241
|
return await callablePlugin[key](...args$1);
|
|
238
|
-
} catch (e$
|
|
239
|
-
if (e$
|
|
240
|
-
return error(logPluginError(e$
|
|
242
|
+
} catch (e$1) {
|
|
243
|
+
if (e$1 instanceof Error && !e$1.stack?.includes("at ")) Error.captureStackTrace(e$1, wrappedPlugin[key]);
|
|
244
|
+
return error(logPluginError(e$1, plugin.name, {
|
|
241
245
|
hook: key,
|
|
242
246
|
id: key === "transform" ? args$1[2] : void 0
|
|
243
247
|
}));
|
|
@@ -256,187 +260,187 @@ function bindingifyBuiltInPlugin(plugin) {
|
|
|
256
260
|
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
257
261
|
let _lazyMatch = () => {
|
|
258
262
|
var __lib__ = (() => {
|
|
259
|
-
var m
|
|
260
|
-
for (var n$
|
|
261
|
-
get: e$
|
|
263
|
+
var m = Object.defineProperty, V = Object.getOwnPropertyDescriptor, G = Object.getOwnPropertyNames, T = Object.prototype.hasOwnProperty, q = (r, e$1) => {
|
|
264
|
+
for (var n$1 in e$1) m(r, n$1, {
|
|
265
|
+
get: e$1[n$1],
|
|
262
266
|
enumerable: true
|
|
263
267
|
});
|
|
264
|
-
}, H = (r
|
|
265
|
-
if (e$
|
|
266
|
-
get: () => e$
|
|
267
|
-
enumerable: !(a
|
|
268
|
+
}, H = (r, e$1, n$1, a) => {
|
|
269
|
+
if (e$1 && typeof e$1 == "object" || typeof e$1 == "function") for (let t$2 of G(e$1)) !T.call(r, t$2) && t$2 !== n$1 && m(r, t$2, {
|
|
270
|
+
get: () => e$1[t$2],
|
|
271
|
+
enumerable: !(a = V(e$1, t$2)) || a.enumerable
|
|
268
272
|
});
|
|
269
|
-
return r
|
|
270
|
-
}, J = (r
|
|
271
|
-
q(w
|
|
272
|
-
var A = (r
|
|
273
|
-
const e$
|
|
274
|
-
return (n$
|
|
275
|
-
const a
|
|
276
|
-
if (a
|
|
277
|
-
const t$
|
|
278
|
-
return e$
|
|
273
|
+
return r;
|
|
274
|
+
}, J = (r) => H(m({}, "__esModule", { value: true }), r), w = {};
|
|
275
|
+
q(w, { default: () => re });
|
|
276
|
+
var A = (r) => Array.isArray(r), d = (r) => typeof r == "function", Q = (r) => r.length === 0, W = (r) => typeof r == "number", K = (r) => typeof r == "object" && r !== null, X = (r) => r instanceof RegExp, b = (r) => typeof r == "string", h = (r) => r === void 0, Y = (r) => {
|
|
277
|
+
const e$1 = /* @__PURE__ */ new Map();
|
|
278
|
+
return (n$1) => {
|
|
279
|
+
const a = e$1.get(n$1);
|
|
280
|
+
if (a) return a;
|
|
281
|
+
const t$2 = r(n$1);
|
|
282
|
+
return e$1.set(n$1, t$2), t$2;
|
|
279
283
|
};
|
|
280
|
-
}, rr = (r
|
|
281
|
-
const a
|
|
284
|
+
}, rr = (r, e$1, n$1 = {}) => {
|
|
285
|
+
const a = {
|
|
282
286
|
cache: {},
|
|
283
|
-
input: r
|
|
287
|
+
input: r,
|
|
284
288
|
index: 0,
|
|
285
289
|
indexMax: 0,
|
|
286
|
-
options: n$
|
|
290
|
+
options: n$1,
|
|
287
291
|
output: []
|
|
288
292
|
};
|
|
289
|
-
if (v(e$
|
|
290
|
-
throw new Error(`Failed to parse at index ${a
|
|
291
|
-
}, i
|
|
292
|
-
const n$
|
|
293
|
-
for (const a
|
|
294
|
-
if (a
|
|
295
|
-
const t$
|
|
296
|
-
n$
|
|
293
|
+
if (v(e$1)(a) && a.index === r.length) return a.output;
|
|
294
|
+
throw new Error(`Failed to parse at index ${a.indexMax}`);
|
|
295
|
+
}, i = (r, e$1) => A(r) ? er(r, e$1) : b(r) ? ar(r, e$1) : nr(r, e$1), er = (r, e$1) => {
|
|
296
|
+
const n$1 = {};
|
|
297
|
+
for (const a of r) {
|
|
298
|
+
if (a.length !== 1) throw new Error(`Invalid character: "${a}"`);
|
|
299
|
+
const t$2 = a.charCodeAt(0);
|
|
300
|
+
n$1[t$2] = true;
|
|
297
301
|
}
|
|
298
|
-
return (a
|
|
299
|
-
const t$
|
|
300
|
-
for (; a
|
|
301
|
-
const u
|
|
302
|
-
if (u
|
|
303
|
-
if (!h
|
|
304
|
-
const s
|
|
305
|
-
h
|
|
302
|
+
return (a) => {
|
|
303
|
+
const t$2 = a.index, o = a.input;
|
|
304
|
+
for (; a.index < o.length && o.charCodeAt(a.index) in n$1;) a.index += 1;
|
|
305
|
+
const u = a.index;
|
|
306
|
+
if (u > t$2) {
|
|
307
|
+
if (!h(e$1) && !a.options.silent) {
|
|
308
|
+
const s = a.input.slice(t$2, u), c = d(e$1) ? e$1(s, o, String(t$2)) : e$1;
|
|
309
|
+
h(c) || a.output.push(c);
|
|
306
310
|
}
|
|
307
|
-
a
|
|
311
|
+
a.indexMax = Math.max(a.indexMax, a.index);
|
|
308
312
|
}
|
|
309
313
|
return true;
|
|
310
314
|
};
|
|
311
|
-
}, nr = (r
|
|
312
|
-
const n$
|
|
313
|
-
return g
|
|
314
|
-
t$
|
|
315
|
-
const u
|
|
316
|
-
if (u
|
|
317
|
-
if (!h
|
|
318
|
-
const s
|
|
319
|
-
h
|
|
315
|
+
}, nr = (r, e$1) => {
|
|
316
|
+
const n$1 = r.source, a = r.flags.replace(/y|$/, "y"), t$2 = new RegExp(n$1, a);
|
|
317
|
+
return g((o) => {
|
|
318
|
+
t$2.lastIndex = o.index;
|
|
319
|
+
const u = t$2.exec(o.input);
|
|
320
|
+
if (u) {
|
|
321
|
+
if (!h(e$1) && !o.options.silent) {
|
|
322
|
+
const s = d(e$1) ? e$1(...u, o.input, String(o.index)) : e$1;
|
|
323
|
+
h(s) || o.output.push(s);
|
|
320
324
|
}
|
|
321
|
-
return o
|
|
325
|
+
return o.index += u[0].length, o.indexMax = Math.max(o.indexMax, o.index), true;
|
|
322
326
|
} else return false;
|
|
323
327
|
});
|
|
324
|
-
}, ar = (r
|
|
325
|
-
if (n$
|
|
326
|
-
if (!h
|
|
327
|
-
const t$
|
|
328
|
-
h
|
|
328
|
+
}, ar = (r, e$1) => (n$1) => {
|
|
329
|
+
if (n$1.input.startsWith(r, n$1.index)) {
|
|
330
|
+
if (!h(e$1) && !n$1.options.silent) {
|
|
331
|
+
const t$2 = d(e$1) ? e$1(r, n$1.input, String(n$1.index)) : e$1;
|
|
332
|
+
h(t$2) || n$1.output.push(t$2);
|
|
329
333
|
}
|
|
330
|
-
return n$
|
|
334
|
+
return n$1.index += r.length, n$1.indexMax = Math.max(n$1.indexMax, n$1.index), true;
|
|
331
335
|
} else return false;
|
|
332
|
-
}, C = (r
|
|
333
|
-
const t$
|
|
334
|
-
return g
|
|
335
|
-
let u
|
|
336
|
-
for (; u
|
|
337
|
-
const s
|
|
338
|
-
if (!t$
|
|
336
|
+
}, C = (r, e$1, n$1, a) => {
|
|
337
|
+
const t$2 = v(r);
|
|
338
|
+
return g(_(M((o) => {
|
|
339
|
+
let u = 0;
|
|
340
|
+
for (; u < n$1;) {
|
|
341
|
+
const s = o.index;
|
|
342
|
+
if (!t$2(o) || (u += 1, o.index === s)) break;
|
|
339
343
|
}
|
|
340
|
-
return u
|
|
344
|
+
return u >= e$1;
|
|
341
345
|
})));
|
|
342
|
-
}, tr = (r
|
|
343
|
-
const n$
|
|
344
|
-
return g
|
|
345
|
-
for (let t$
|
|
346
|
+
}, tr = (r, e$1) => C(r, 0, 1), f = (r, e$1) => C(r, 0, Infinity), x = (r, e$1) => {
|
|
347
|
+
const n$1 = r.map(v);
|
|
348
|
+
return g(_(M((a) => {
|
|
349
|
+
for (let t$2 = 0, o = n$1.length; t$2 < o; t$2++) if (!n$1[t$2](a)) return false;
|
|
346
350
|
return true;
|
|
347
351
|
})));
|
|
348
|
-
}, l
|
|
349
|
-
const n$
|
|
350
|
-
return g
|
|
351
|
-
for (let t$
|
|
352
|
+
}, l = (r, e$1) => {
|
|
353
|
+
const n$1 = r.map(v);
|
|
354
|
+
return g(_((a) => {
|
|
355
|
+
for (let t$2 = 0, o = n$1.length; t$2 < o; t$2++) if (n$1[t$2](a)) return true;
|
|
352
356
|
return false;
|
|
353
357
|
}));
|
|
354
|
-
}, M = (r
|
|
355
|
-
const n$
|
|
356
|
-
return (a
|
|
357
|
-
const t$
|
|
358
|
-
return (!u
|
|
358
|
+
}, M = (r, e$1 = false) => {
|
|
359
|
+
const n$1 = v(r);
|
|
360
|
+
return (a) => {
|
|
361
|
+
const t$2 = a.index, o = a.output.length, u = n$1(a);
|
|
362
|
+
return (!u || e$1) && (a.index = t$2, a.output.length !== o && (a.output.length = o)), u;
|
|
359
363
|
};
|
|
360
|
-
}, _ = (r
|
|
361
|
-
return v(r
|
|
362
|
-
}, g
|
|
363
|
-
let r
|
|
364
|
-
return (e$
|
|
365
|
-
const n$
|
|
366
|
-
return (t$
|
|
367
|
-
var o
|
|
368
|
-
if (t$
|
|
369
|
-
const u
|
|
370
|
-
if (c
|
|
371
|
-
if (W(c
|
|
372
|
-
if (c
|
|
364
|
+
}, _ = (r, e$1) => {
|
|
365
|
+
return v(r);
|
|
366
|
+
}, g = (() => {
|
|
367
|
+
let r = 0;
|
|
368
|
+
return (e$1) => {
|
|
369
|
+
const n$1 = v(e$1), a = r += 1;
|
|
370
|
+
return (t$2) => {
|
|
371
|
+
var o;
|
|
372
|
+
if (t$2.options.memoization === false) return n$1(t$2);
|
|
373
|
+
const u = t$2.index, s = (o = t$2.cache)[a] || (o[a] = /* @__PURE__ */ new Map()), c = s.get(u);
|
|
374
|
+
if (c === false) return false;
|
|
375
|
+
if (W(c)) return t$2.index = c, true;
|
|
376
|
+
if (c) return t$2.index = c.index, c.output?.length && t$2.output.push(...c.output), true;
|
|
373
377
|
{
|
|
374
|
-
const Z = t$
|
|
375
|
-
if (n$
|
|
376
|
-
const D = t$
|
|
378
|
+
const Z = t$2.output.length;
|
|
379
|
+
if (n$1(t$2)) {
|
|
380
|
+
const D = t$2.index, U = t$2.output.length;
|
|
377
381
|
if (U > Z) {
|
|
378
|
-
const ee = t$
|
|
379
|
-
s
|
|
382
|
+
const ee = t$2.output.slice(Z, U);
|
|
383
|
+
s.set(u, {
|
|
380
384
|
index: D,
|
|
381
385
|
output: ee
|
|
382
386
|
});
|
|
383
|
-
} else s
|
|
387
|
+
} else s.set(u, D);
|
|
384
388
|
return true;
|
|
385
|
-
} else return s
|
|
389
|
+
} else return s.set(u, false), false;
|
|
386
390
|
}
|
|
387
391
|
};
|
|
388
392
|
};
|
|
389
|
-
})(), E = (r
|
|
390
|
-
let e$
|
|
391
|
-
return (n$
|
|
392
|
-
}, v = Y((r
|
|
393
|
-
if (d
|
|
394
|
-
if (b
|
|
395
|
-
if (A(r
|
|
396
|
-
if (K(r
|
|
393
|
+
})(), E = (r) => {
|
|
394
|
+
let e$1;
|
|
395
|
+
return (n$1) => (e$1 || (e$1 = v(r())), e$1(n$1));
|
|
396
|
+
}, v = Y((r) => {
|
|
397
|
+
if (d(r)) return Q(r) ? E(r) : r;
|
|
398
|
+
if (b(r) || X(r)) return i(r);
|
|
399
|
+
if (A(r)) return x(r);
|
|
400
|
+
if (K(r)) return l(Object.values(r));
|
|
397
401
|
throw new Error("Invalid rule");
|
|
398
|
-
}), P = "abcdefghijklmnopqrstuvwxyz", ir = (r
|
|
399
|
-
let e$
|
|
400
|
-
for (; r
|
|
401
|
-
return e$
|
|
402
|
-
}, O
|
|
403
|
-
let e$
|
|
404
|
-
for (let n$
|
|
405
|
-
return e$
|
|
406
|
-
}, S = (r
|
|
407
|
-
if (e$
|
|
408
|
-
const n$
|
|
409
|
-
for (; r
|
|
410
|
-
return n$
|
|
411
|
-
}, or$1 = (r
|
|
412
|
-
const e$
|
|
413
|
-
return (n$
|
|
414
|
-
}, sr = i
|
|
415
|
-
i
|
|
416
|
-
i
|
|
417
|
-
i
|
|
418
|
-
i
|
|
419
|
-
]), N = l
|
|
402
|
+
}), P = "abcdefghijklmnopqrstuvwxyz", ir = (r) => {
|
|
403
|
+
let e$1 = "";
|
|
404
|
+
for (; r > 0;) e$1 = P[(r - 1) % 26] + e$1, r = Math.floor((r - 1) / 26);
|
|
405
|
+
return e$1;
|
|
406
|
+
}, O = (r) => {
|
|
407
|
+
let e$1 = 0;
|
|
408
|
+
for (let n$1 = 0, a = r.length; n$1 < a; n$1++) e$1 = e$1 * 26 + P.indexOf(r[n$1]) + 1;
|
|
409
|
+
return e$1;
|
|
410
|
+
}, S = (r, e$1) => {
|
|
411
|
+
if (e$1 < r) return S(e$1, r);
|
|
412
|
+
const n$1 = [];
|
|
413
|
+
for (; r <= e$1;) n$1.push(r++);
|
|
414
|
+
return n$1;
|
|
415
|
+
}, or$1 = (r, e$1, n$1) => S(r, e$1).map((a) => String(a).padStart(n$1, "0")), R = (r, e$1) => S(O(r), O(e$1)).map(ir), p = (r) => r, z = (r) => ur((e$1) => rr(e$1, r, { memoization: false }).join("")), ur = (r) => {
|
|
416
|
+
const e$1 = {};
|
|
417
|
+
return (n$1) => e$1[n$1] ?? (e$1[n$1] = r(n$1));
|
|
418
|
+
}, sr = i(/^\*\*\/\*$/, ".*"), cr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/, (r, e$1, n$1) => `.*${e$1 ? "" : "(?:^|/)"}${n$1.replaceAll(".", "\\.")}`), lr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/, (r, e$1, n$1, a) => `.*${e$1 ? "" : "(?:^|/)"}${n$1.replaceAll(".", "\\.")}(?:${a.replaceAll(",", "|").replaceAll(".", "\\.")})`), y = i(/\\./, p), pr = i(/[$.*+?^(){}[\]\|]/, (r) => `\\${r}`), vr = i(/./, p), fr = l([i(/^(?:!!)*!(.*)$/, (r, e$1) => `(?!^${L(e$1)}$).*?`), i(/^(!!)+/, "")]), j = l([
|
|
419
|
+
i(/\/(\*\*\/)+/, "(?:/.+/|/)"),
|
|
420
|
+
i(/^(\*\*\/)+/, "(?:^|.*/)"),
|
|
421
|
+
i(/\/(\*\*)$/, "(?:/.*|$)"),
|
|
422
|
+
i(/\*\*/, ".*")
|
|
423
|
+
]), N = l([i(/\*\/(?!\*\*\/)/, "[^/]*/"), i(/\*/, "[^/]*")]), k = i("?", "[^/]"), $r = i("[", p), wr = i("]", p), Ar = i(/[!^]/, "^/"), br = i(/[a-z]-[a-z]|[0-9]-[0-9]/i, p), Er = l([
|
|
420
424
|
y,
|
|
421
|
-
i
|
|
425
|
+
i(/[$.*+?^(){}[\|]/, (r) => `\\${r}`),
|
|
422
426
|
br,
|
|
423
|
-
i
|
|
427
|
+
i(/[^\]]/, p)
|
|
424
428
|
]), B = x([
|
|
425
429
|
$r,
|
|
426
430
|
tr(Ar),
|
|
427
|
-
f
|
|
431
|
+
f(Er),
|
|
428
432
|
wr
|
|
429
|
-
]), Pr = i
|
|
433
|
+
]), Pr = i("{", "(?:"), Or$1 = i("}", ")"), I = x([
|
|
430
434
|
Pr,
|
|
431
|
-
l
|
|
432
|
-
i
|
|
433
|
-
i
|
|
434
|
-
i
|
|
435
|
+
l([
|
|
436
|
+
i(/(\d+)\.\.(\d+)/, (r, e$1, n$1) => or$1(+e$1, +n$1, Math.min(e$1.length, n$1.length)).join("|")),
|
|
437
|
+
i(/([a-z]+)\.\.([a-z]+)/, (r, e$1, n$1) => R(e$1, n$1).join("|")),
|
|
438
|
+
i(/([A-Z]+)\.\.([A-Z]+)/, (r, e$1, n$1) => R(e$1.toLowerCase(), n$1.toLowerCase()).join("|").toUpperCase())
|
|
435
439
|
]),
|
|
436
440
|
Or$1
|
|
437
|
-
]), kr = i
|
|
441
|
+
]), kr = i("{", "(?:"), Br = i("}", ")"), Ir = i(",", "|"), Fr = i(/[$.*+?^(){[\]\|]/, (r) => `\\${r}`), Lr = i(/[^}]/, p), F = x([
|
|
438
442
|
kr,
|
|
439
|
-
f
|
|
443
|
+
f(l([
|
|
440
444
|
j,
|
|
441
445
|
N,
|
|
442
446
|
k,
|
|
@@ -449,7 +453,7 @@ let _lazyMatch = () => {
|
|
|
449
453
|
Lr
|
|
450
454
|
])),
|
|
451
455
|
Br
|
|
452
|
-
]), L = z(f
|
|
456
|
+
]), L = z(f(l([
|
|
453
457
|
sr,
|
|
454
458
|
cr,
|
|
455
459
|
lr,
|
|
@@ -463,21 +467,21 @@ let _lazyMatch = () => {
|
|
|
463
467
|
y,
|
|
464
468
|
pr,
|
|
465
469
|
vr
|
|
466
|
-
]))), Tr = i
|
|
470
|
+
]))), Tr = i(/\\./, p), qr = i(/./, p), Yr = z(f(l([
|
|
467
471
|
Tr,
|
|
468
|
-
i
|
|
469
|
-
i
|
|
470
|
-
i
|
|
472
|
+
i(/\*\*\*+/, "*"),
|
|
473
|
+
i(/([^/{[(!])\*\*/, (r, e$1) => `${e$1}*`),
|
|
474
|
+
i(/(^|.)\*\*(?=[^*/)\]}])/, (r, e$1) => `${e$1}*`),
|
|
471
475
|
qr
|
|
472
|
-
]))), $ = (r
|
|
473
|
-
const n$
|
|
474
|
-
if (!n$
|
|
475
|
-
const a
|
|
476
|
-
return a
|
|
476
|
+
]))), $ = (r, e$1) => {
|
|
477
|
+
const n$1 = Array.isArray(r) ? r : [r];
|
|
478
|
+
if (!n$1.length) return false;
|
|
479
|
+
const a = n$1.map($.compile), t$2 = n$1.every((s) => /(\/(?:\*\*)?|\[\/\])$/.test(s)), o = e$1.replace(/[\\\/]+/g, "/").replace(/\/$/, t$2 ? "/" : "");
|
|
480
|
+
return a.some((s) => s.test(o));
|
|
477
481
|
};
|
|
478
|
-
$.compile = (r
|
|
482
|
+
$.compile = (r) => new RegExp(`^${L(Yr(r))}$`, "s");
|
|
479
483
|
var re = $;
|
|
480
|
-
return J(w
|
|
484
|
+
return J(w);
|
|
481
485
|
})();
|
|
482
486
|
return __lib__.default || __lib__;
|
|
483
487
|
};
|
|
@@ -492,7 +496,7 @@ const zeptomatch = (path, pattern) => {
|
|
|
492
496
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
493
497
|
function normalizeWindowsPath(input = "") {
|
|
494
498
|
if (!input) return input;
|
|
495
|
-
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r
|
|
499
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
496
500
|
}
|
|
497
501
|
const _UNC_REGEX = /^[/\\]{2}/;
|
|
498
502
|
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
@@ -601,15 +605,15 @@ function normalizeString(path, allowAboveRoot) {
|
|
|
601
605
|
}
|
|
602
606
|
return res;
|
|
603
607
|
}
|
|
604
|
-
const isAbsolute = function(p
|
|
605
|
-
return _IS_ABSOLUTE_RE.test(p
|
|
608
|
+
const isAbsolute = function(p) {
|
|
609
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
606
610
|
};
|
|
607
|
-
const toNamespacedPath = function(p
|
|
608
|
-
return normalizeWindowsPath(p
|
|
611
|
+
const toNamespacedPath = function(p) {
|
|
612
|
+
return normalizeWindowsPath(p);
|
|
609
613
|
};
|
|
610
|
-
const extname = function(p
|
|
611
|
-
if (p
|
|
612
|
-
const match = _EXTNAME_RE.exec(normalizeWindowsPath(p
|
|
614
|
+
const extname = function(p) {
|
|
615
|
+
if (p === "..") return "";
|
|
616
|
+
const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
|
|
613
617
|
return match && match[1] || "";
|
|
614
618
|
};
|
|
615
619
|
const relative = function(from, to) {
|
|
@@ -624,25 +628,25 @@ const relative = function(from, to) {
|
|
|
624
628
|
}
|
|
625
629
|
return [..._from.map(() => ".."), ..._to].join("/");
|
|
626
630
|
};
|
|
627
|
-
const dirname = function(p
|
|
628
|
-
const segments = normalizeWindowsPath(p
|
|
631
|
+
const dirname = function(p) {
|
|
632
|
+
const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
629
633
|
if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) segments[0] += "/";
|
|
630
|
-
return segments.join("/") || (isAbsolute(p
|
|
634
|
+
return segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
631
635
|
};
|
|
632
|
-
const format = function(p
|
|
633
|
-
const ext = p
|
|
636
|
+
const format = function(p) {
|
|
637
|
+
const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
|
|
634
638
|
const segments = [
|
|
635
|
-
p
|
|
636
|
-
p
|
|
637
|
-
p
|
|
639
|
+
p.root,
|
|
640
|
+
p.dir,
|
|
641
|
+
p.base ?? (p.name ?? "") + ext
|
|
638
642
|
].filter(Boolean);
|
|
639
|
-
return normalizeWindowsPath(p
|
|
643
|
+
return normalizeWindowsPath(p.root ? resolve(...segments) : segments.join("/"));
|
|
640
644
|
};
|
|
641
|
-
const basename = function(p
|
|
642
|
-
const segments = normalizeWindowsPath(p
|
|
645
|
+
const basename = function(p, extension) {
|
|
646
|
+
const segments = normalizeWindowsPath(p).split("/");
|
|
643
647
|
let lastSegment = "";
|
|
644
|
-
for (let i
|
|
645
|
-
const val = segments[i
|
|
648
|
+
for (let i = segments.length - 1; i >= 0; i--) {
|
|
649
|
+
const val = segments[i];
|
|
646
650
|
if (val) {
|
|
647
651
|
lastSegment = val;
|
|
648
652
|
break;
|
|
@@ -650,13 +654,13 @@ const basename = function(p$1, extension) {
|
|
|
650
654
|
}
|
|
651
655
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
652
656
|
};
|
|
653
|
-
const parse = function(p
|
|
654
|
-
const root = _PATH_ROOT_RE.exec(p
|
|
655
|
-
const base = basename(p
|
|
657
|
+
const parse = function(p) {
|
|
658
|
+
const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
|
|
659
|
+
const base = basename(p);
|
|
656
660
|
const extension = extname(base);
|
|
657
661
|
return {
|
|
658
662
|
root,
|
|
659
|
-
dir: dirname(p
|
|
663
|
+
dir: dirname(p),
|
|
660
664
|
base,
|
|
661
665
|
ext: extension,
|
|
662
666
|
name: base.slice(0, base.length - extension.length)
|
|
@@ -959,8 +963,8 @@ var MinimalPluginContextImpl = class {
|
|
|
959
963
|
watchMode
|
|
960
964
|
};
|
|
961
965
|
}
|
|
962
|
-
error(e$
|
|
963
|
-
return error(logPluginError(normalizeLog(e$
|
|
966
|
+
error(e$1) {
|
|
967
|
+
return error(logPluginError(normalizeLog(e$1), this.pluginName, { hook: this.hookName }));
|
|
964
968
|
}
|
|
965
969
|
};
|
|
966
970
|
|
|
@@ -1031,117 +1035,6 @@ function getSortedPlugins(hookName, plugins) {
|
|
|
1031
1035
|
];
|
|
1032
1036
|
}
|
|
1033
1037
|
|
|
1034
|
-
//#endregion
|
|
1035
|
-
//#region ../../node_modules/.pnpm/ansis@4.2.0/node_modules/ansis/index.cjs
|
|
1036
|
-
var require_ansis = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ansis@4.2.0/node_modules/ansis/index.cjs": ((exports, module) => {
|
|
1037
|
-
let e$1, t$2, r, { defineProperty: l, setPrototypeOf: n$1, create: o, keys: s } = Object, i = "", { round: c, max: a$1 } = Math, p = (e$2) => {
|
|
1038
|
-
let t$3 = /([a-f\d]{3,6})/i.exec(e$2)?.[1], r$1 = t$3?.length, l$1 = 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);
|
|
1039
|
-
return [
|
|
1040
|
-
l$1 >> 16 & 255,
|
|
1041
|
-
l$1 >> 8 & 255,
|
|
1042
|
-
255 & l$1
|
|
1043
|
-
];
|
|
1044
|
-
}, 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) => {
|
|
1045
|
-
let t$3, r$1, l$1, n$2, o$1;
|
|
1046
|
-
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, l$1 = o$1 % 6 / 5) : t$3 = r$1 = l$1 = (10 * (e$2 - 232) + 8) / 255, n$2 = 2 * a$1(t$3, r$1, l$1), n$2 ? 30 + (c(l$1) << 2 | c(r$1) << 1 | c(t$3)) + (2 ^ n$2 ? 0 : 60) : 30);
|
|
1047
|
-
}, f = (() => {
|
|
1048
|
-
let r$1 = (e$2) => o$1.some(((t$3) => e$2.test(t$3))), l$1 = globalThis, n$2 = l$1.process ?? {}, o$1 = n$2.argv ?? [], i$1 = n$2.env ?? {}, c$1 = -1;
|
|
1049
|
-
try {
|
|
1050
|
-
e$1 = "," + s(i$1).join(",");
|
|
1051
|
-
} catch (e$2) {
|
|
1052
|
-
i$1 = {}, c$1 = 0;
|
|
1053
|
-
}
|
|
1054
|
-
let a$2 = "FORCE_COLOR", p$1 = {
|
|
1055
|
-
false: 0,
|
|
1056
|
-
0: 0,
|
|
1057
|
-
1: 1,
|
|
1058
|
-
2: 2,
|
|
1059
|
-
3: 3
|
|
1060
|
-
}[i$1[a$2]] ?? -1, u$1 = a$2 in i$1 && p$1 || r$1(/^--color=?(true|always)?$/);
|
|
1061
|
-
return u$1 && (c$1 = p$1), ~c$1 || (c$1 = ((r$2, l$2, n$3) => (t$2 = r$2.TERM, {
|
|
1062
|
-
"24bit": 3,
|
|
1063
|
-
truecolor: 3,
|
|
1064
|
-
ansi256: 2,
|
|
1065
|
-
ansi: 1
|
|
1066
|
-
}[r$2.COLORTERM] || (r$2.CI ? /,GITHUB/.test(e$1) ? 3 : 1 : l$2 && "dumb" !== t$2 ? n$3 ? 3 : /-256/.test(t$2) ? 2 : 1 : 0)))(i$1, !!i$1.PM2_HOME || i$1.NEXT_RUNTIME?.includes("edge") || !!n$2.stdout?.isTTY, "win32" === n$2.platform)), !p$1 || i$1.NO_COLOR || r$1(/^--(no-color|color=(false|never))$/) ? 0 : l$1.window?.chrome || u$1 && !c$1 ? 3 : c$1;
|
|
1067
|
-
})(), g = {
|
|
1068
|
-
open: i,
|
|
1069
|
-
close: i
|
|
1070
|
-
}, h = 39, b = 49, O = {}, m = ({ p: e$2 }, { open: t$3, close: l$1 }) => {
|
|
1071
|
-
let o$1 = (e$3, ...r$1) => {
|
|
1072
|
-
if (!e$3) {
|
|
1073
|
-
if (t$3 && t$3 === l$1) return t$3;
|
|
1074
|
-
if ((e$3 ?? i) === i) return i;
|
|
1075
|
-
}
|
|
1076
|
-
let n$2, 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;
|
|
1077
|
-
if (s$2.includes("\x1B")) for (; c$2; c$2 = c$2.p) {
|
|
1078
|
-
let { open: e$4, close: t$4 } = c$2, r$2 = t$4.length, l$2 = i, o$2 = 0;
|
|
1079
|
-
if (r$2) for (; ~(n$2 = s$2.indexOf(t$4, o$2)); o$2 = n$2 + r$2) l$2 += s$2.slice(o$2, n$2) + e$4;
|
|
1080
|
-
s$2 = l$2 + s$2.slice(o$2);
|
|
1081
|
-
}
|
|
1082
|
-
return a$2 + (s$2.includes("\n") ? s$2.replace(/(\r?\n)/g, p$1 + "$1" + a$2) : s$2) + p$1;
|
|
1083
|
-
}, s$1 = t$3, c$1 = l$1;
|
|
1084
|
-
return e$2 && (s$1 = e$2.o + t$3, c$1 = l$1 + e$2.c), n$1(o$1, r), o$1.p = {
|
|
1085
|
-
open: t$3,
|
|
1086
|
-
close: l$1,
|
|
1087
|
-
o: s$1,
|
|
1088
|
-
c: c$1,
|
|
1089
|
-
p: e$2
|
|
1090
|
-
}, o$1.open = s$1, o$1.close = c$1, o$1;
|
|
1091
|
-
};
|
|
1092
|
-
const w = new function e$2(t$3 = f) {
|
|
1093
|
-
let s$1 = {
|
|
1094
|
-
Ansis: e$2,
|
|
1095
|
-
level: t$3,
|
|
1096
|
-
isSupported: () => a$2,
|
|
1097
|
-
strip: (e$3) => e$3.replace(/[][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, i),
|
|
1098
|
-
extend(e$3) {
|
|
1099
|
-
for (let t$4 in e$3) {
|
|
1100
|
-
let r$1 = e$3[t$4], l$1 = (typeof r$1)[0];
|
|
1101
|
-
"s" === l$1 ? (c$1(t$4, T(...p(r$1))), c$1(_(t$4), v(...p(r$1)))) : c$1(t$4, r$1, "f" === l$1);
|
|
1102
|
-
}
|
|
1103
|
-
return r = o({}, O), n$1(s$1, r), s$1;
|
|
1104
|
-
}
|
|
1105
|
-
}, c$1 = (e$3, t$4, r$1) => {
|
|
1106
|
-
O[e$3] = { get() {
|
|
1107
|
-
let n$2 = r$1 ? (...e$4) => m(this, t$4(...e$4)) : m(this, t$4);
|
|
1108
|
-
return l(this, e$3, { value: n$2 }), n$2;
|
|
1109
|
-
} };
|
|
1110
|
-
}, a$2 = t$3 > 0, w$1 = (e$3, t$4) => a$2 ? {
|
|
1111
|
-
open: `[${e$3}m`,
|
|
1112
|
-
close: `[${t$4}m`
|
|
1113
|
-
} : g, y = (e$3) => (t$4) => e$3(...p(t$4)), R = (e$3, t$4) => (r$1, l$1, n$2) => w$1(`${e$3}8;2;${r$1};${l$1};${n$2}`, t$4), $ = (e$3, t$4) => (r$1, l$1, n$2) => w$1(((e$4, t$5, r$2) => d(u(e$4, t$5, r$2)))(r$1, l$1, n$2) + e$3, t$4), x = (e$3) => (t$4, r$1, l$1) => e$3(u(t$4, r$1, l$1)), T = R(3, h), v = R(4, b), C = (e$3) => w$1("38;5;" + e$3, h), E = (e$3) => w$1("48;5;" + e$3, b);
|
|
1114
|
-
2 === t$3 ? (T = x(C), v = x(E)) : 1 === t$3 && (T = $(0, h), v = $(10, b), C = (e$3) => w$1(d(e$3), h), E = (e$3) => w$1(d(e$3) + 10, b));
|
|
1115
|
-
let M, I = {
|
|
1116
|
-
fg: C,
|
|
1117
|
-
bg: E,
|
|
1118
|
-
rgb: T,
|
|
1119
|
-
bgRgb: v,
|
|
1120
|
-
hex: y(T),
|
|
1121
|
-
bgHex: y(v),
|
|
1122
|
-
visible: g,
|
|
1123
|
-
reset: w$1(0, 0),
|
|
1124
|
-
bold: w$1(1, 22),
|
|
1125
|
-
dim: w$1(2, 22),
|
|
1126
|
-
italic: w$1(3, 23),
|
|
1127
|
-
underline: w$1(4, 24),
|
|
1128
|
-
inverse: w$1(7, 27),
|
|
1129
|
-
hidden: w$1(8, 28),
|
|
1130
|
-
strikethrough: w$1(9, 29)
|
|
1131
|
-
}, _ = (e$3) => "bg" + e$3[0].toUpperCase() + e$3.slice(1), k = "Bright";
|
|
1132
|
-
return "black,red,green,yellow,blue,magenta,cyan,white,gray".split(",").map(((e$3, t$4) => {
|
|
1133
|
-
M = _(e$3), 8 > t$4 ? (I[e$3 + k] = w$1(90 + t$4, h), I[M + k] = w$1(100 + t$4, b)) : t$4 = 60, I[e$3] = w$1(30 + t$4, h), I[M] = w$1(40 + t$4, b);
|
|
1134
|
-
})), s$1.extend(I);
|
|
1135
|
-
}();
|
|
1136
|
-
module.exports = w, w.default = w;
|
|
1137
|
-
}) });
|
|
1138
|
-
|
|
1139
|
-
//#endregion
|
|
1140
|
-
//#region ../../node_modules/.pnpm/ansis@4.2.0/node_modules/ansis/index.mjs
|
|
1141
|
-
var import_ansis = /* @__PURE__ */ __toESM(require_ansis(), 1);
|
|
1142
|
-
var ansis_default = import_ansis.default;
|
|
1143
|
-
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;
|
|
1144
|
-
|
|
1145
1038
|
//#endregion
|
|
1146
1039
|
//#region ../../node_modules/.pnpm/valibot@1.1.0_typescript@5.9.3/node_modules/valibot/dist/index.js
|
|
1147
1040
|
var store;
|
|
@@ -1940,6 +1833,25 @@ function tuple(items, message2) {
|
|
|
1940
1833
|
};
|
|
1941
1834
|
}
|
|
1942
1835
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1836
|
+
function undefined_(message2) {
|
|
1837
|
+
return {
|
|
1838
|
+
kind: "schema",
|
|
1839
|
+
type: "undefined",
|
|
1840
|
+
reference: undefined_,
|
|
1841
|
+
expects: "undefined",
|
|
1842
|
+
async: false,
|
|
1843
|
+
message: message2,
|
|
1844
|
+
get "~standard"() {
|
|
1845
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
1846
|
+
},
|
|
1847
|
+
"~run"(dataset, config2) {
|
|
1848
|
+
if (dataset.value === void 0) dataset.typed = true;
|
|
1849
|
+
else _addIssue(this, "type", dataset, config2);
|
|
1850
|
+
return dataset;
|
|
1851
|
+
}
|
|
1852
|
+
};
|
|
1853
|
+
}
|
|
1854
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1943
1855
|
function _subIssues(datasets) {
|
|
1944
1856
|
let issues;
|
|
1945
1857
|
if (datasets) for (const dataset of datasets) if (issues) issues.push(...dataset.issues);
|
|
@@ -2122,6 +2034,9 @@ function safeParse(schema, input, config2) {
|
|
|
2122
2034
|
//#endregion
|
|
2123
2035
|
//#region src/utils/validator.ts
|
|
2124
2036
|
const StringOrRegExpSchema = union([string(), instance(RegExp)]);
|
|
2037
|
+
function vFunction() {
|
|
2038
|
+
return function_();
|
|
2039
|
+
}
|
|
2125
2040
|
const LogLevelSchema = union([
|
|
2126
2041
|
literal("debug"),
|
|
2127
2042
|
literal("info"),
|
|
@@ -2136,14 +2051,15 @@ const InputOptionSchema = union([
|
|
|
2136
2051
|
array(string()),
|
|
2137
2052
|
record(string(), string())
|
|
2138
2053
|
]);
|
|
2139
|
-
const
|
|
2054
|
+
const ExternalOptionFunctionSchema = pipe(vFunction(), args(tuple([
|
|
2055
|
+
string(),
|
|
2056
|
+
optional(string()),
|
|
2057
|
+
boolean()
|
|
2058
|
+
])), returns(nullish(boolean())));
|
|
2059
|
+
const ExternalOptionSchema = union([
|
|
2140
2060
|
StringOrRegExpSchema,
|
|
2141
2061
|
array(StringOrRegExpSchema),
|
|
2142
|
-
|
|
2143
|
-
string(),
|
|
2144
|
-
optional(string()),
|
|
2145
|
-
boolean()
|
|
2146
|
-
])), returns(nullish(boolean())))
|
|
2062
|
+
ExternalOptionFunctionSchema
|
|
2147
2063
|
]);
|
|
2148
2064
|
const ModuleTypesSchema = record(string(), union([
|
|
2149
2065
|
literal("asset"),
|
|
@@ -2162,23 +2078,12 @@ const ModuleTypesSchema = record(string(), union([
|
|
|
2162
2078
|
const JsxOptionsSchema = strictObject({
|
|
2163
2079
|
runtime: pipe(optional(union([literal("classic"), literal("automatic")])), description("Which runtime to use")),
|
|
2164
2080
|
development: pipe(optional(boolean()), description("Development specific information")),
|
|
2165
|
-
throwIfNamespace: pipe(optional(
|
|
2081
|
+
throwIfNamespace: pipe(optional(boolean()), description("Toggles whether to throw an error when a tag name uses an XML namespace")),
|
|
2166
2082
|
importSource: pipe(optional(string()), description("Import the factory of element and fragment if mode is classic")),
|
|
2167
2083
|
pragma: pipe(optional(string()), description("Jsx element transformation")),
|
|
2168
2084
|
pragmaFrag: pipe(optional(string()), description("Jsx fragment transformation")),
|
|
2169
2085
|
refresh: pipe(optional(boolean()), description("Enable react fast refresh"))
|
|
2170
2086
|
});
|
|
2171
|
-
const RollupJsxOptionsSchema = strictObject({
|
|
2172
|
-
mode: optional(union([
|
|
2173
|
-
literal("classic"),
|
|
2174
|
-
literal("automatic"),
|
|
2175
|
-
literal("preserve")
|
|
2176
|
-
])),
|
|
2177
|
-
factory: optional(string()),
|
|
2178
|
-
fragment: optional(string()),
|
|
2179
|
-
importSource: optional(string()),
|
|
2180
|
-
jsxImportSource: optional(string())
|
|
2181
|
-
});
|
|
2182
2087
|
const HelperModeSchema = union([literal("Runtime"), literal("External")]);
|
|
2183
2088
|
const DecoratorOptionSchema = object({
|
|
2184
2089
|
legacy: optional(boolean()),
|
|
@@ -2214,8 +2119,17 @@ const TransformOptionsSchema = object({
|
|
|
2214
2119
|
typescript: optional(TypescriptSchema),
|
|
2215
2120
|
helpers: optional(HelpersSchema),
|
|
2216
2121
|
decorators: optional(DecoratorOptionSchema),
|
|
2217
|
-
jsx: optional(union([
|
|
2218
|
-
|
|
2122
|
+
jsx: optional(union([
|
|
2123
|
+
literal(false),
|
|
2124
|
+
literal("preserve"),
|
|
2125
|
+
literal("react"),
|
|
2126
|
+
literal("react-jsx"),
|
|
2127
|
+
JsxOptionsSchema
|
|
2128
|
+
])),
|
|
2129
|
+
target: pipe(optional(union([string(), array(string())])), description("The JavaScript target environment")),
|
|
2130
|
+
define: optional(record(string(), string())),
|
|
2131
|
+
inject: optional(record(string(), union([string(), tuple([string(), string()])]))),
|
|
2132
|
+
dropLabels: pipe(optional(array(string())), description("Remove labeled statements with these label names"))
|
|
2219
2133
|
});
|
|
2220
2134
|
const WatchOptionsSchema = strictObject({
|
|
2221
2135
|
chokidar: optional(never(`The "watch.chokidar" option is deprecated, please use "watch.notify" instead of it`)),
|
|
@@ -2246,8 +2160,8 @@ const ChecksOptionsSchema = strictObject({
|
|
|
2246
2160
|
preferBuiltinFeature: pipe(optional(boolean()), description("Whether to emit warning when detecting prefer builtin feature"))
|
|
2247
2161
|
});
|
|
2248
2162
|
const CompressOptionsKeepNamesSchema = strictObject({
|
|
2249
|
-
function:
|
|
2250
|
-
class:
|
|
2163
|
+
function: boolean(),
|
|
2164
|
+
class: boolean()
|
|
2251
2165
|
});
|
|
2252
2166
|
const CompressOptionsSchema = strictObject({
|
|
2253
2167
|
target: optional(union([
|
|
@@ -2269,8 +2183,8 @@ const CompressOptionsSchema = strictObject({
|
|
|
2269
2183
|
unused: optional(union([boolean(), literal("keep_assign")]))
|
|
2270
2184
|
});
|
|
2271
2185
|
const MangleOptionsKeepNamesSchema = strictObject({
|
|
2272
|
-
function:
|
|
2273
|
-
class:
|
|
2186
|
+
function: boolean(),
|
|
2187
|
+
class: boolean()
|
|
2274
2188
|
});
|
|
2275
2189
|
const MangleOptionsSchema = strictObject({
|
|
2276
2190
|
toplevel: optional(boolean()),
|
|
@@ -2309,22 +2223,19 @@ const TreeshakingOptionsSchema = union([boolean(), looseObject({
|
|
|
2309
2223
|
propertyWriteSideEffects: optional(union([literal(false), literal("always")]))
|
|
2310
2224
|
})]);
|
|
2311
2225
|
const OptimizationOptionsSchema = strictObject({
|
|
2312
|
-
inlineConst: pipe(optional(union([
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
mode: optional(union([literal("all"), literal("smart")])),
|
|
2317
|
-
pass: optional(number())
|
|
2318
|
-
})
|
|
2319
|
-
])), description("Enable crossmodule constant inlining")),
|
|
2226
|
+
inlineConst: pipe(optional(union([boolean(), strictObject({
|
|
2227
|
+
mode: optional(union([literal("all"), literal("smart")])),
|
|
2228
|
+
pass: optional(number())
|
|
2229
|
+
})])), description("Enable crossmodule constant inlining")),
|
|
2320
2230
|
pifeForModuleWrappers: pipe(optional(boolean()), description("Use PIFE pattern for module wrappers"))
|
|
2321
2231
|
});
|
|
2322
|
-
const
|
|
2232
|
+
const LogOrStringHandlerSchema = pipe(vFunction(), args(tuple([LogLevelWithErrorSchema, RollupLogWithStringSchema])));
|
|
2233
|
+
const OnLogSchema = pipe(vFunction(), args(tuple([
|
|
2323
2234
|
LogLevelSchema,
|
|
2324
2235
|
RollupLogSchema,
|
|
2325
|
-
|
|
2236
|
+
LogOrStringHandlerSchema
|
|
2326
2237
|
])));
|
|
2327
|
-
const OnwarnSchema = pipe(
|
|
2238
|
+
const OnwarnSchema = pipe(vFunction(), args(tuple([RollupLogSchema, pipe(vFunction(), args(tuple([union([RollupLogWithStringSchema, pipe(vFunction(), returns(RollupLogWithStringSchema))])])))])));
|
|
2328
2239
|
const HmrSchema = union([boolean(), strictObject({
|
|
2329
2240
|
new: optional(boolean()),
|
|
2330
2241
|
port: optional(number()),
|
|
@@ -2334,7 +2245,7 @@ const HmrSchema = union([boolean(), strictObject({
|
|
|
2334
2245
|
const InputOptionsSchema = strictObject({
|
|
2335
2246
|
input: optional(InputOptionSchema),
|
|
2336
2247
|
plugins: optional(custom(() => true)),
|
|
2337
|
-
external: optional(
|
|
2248
|
+
external: optional(ExternalOptionSchema),
|
|
2338
2249
|
makeAbsoluteExternalsRelative: optional(union([boolean(), literal("ifRelativeSource")])),
|
|
2339
2250
|
resolve: optional(ResolveOptionsSchema),
|
|
2340
2251
|
cwd: pipe(optional(string()), description("Current working directory")),
|
|
@@ -2342,11 +2253,11 @@ const InputOptionsSchema = strictObject({
|
|
|
2342
2253
|
literal("browser"),
|
|
2343
2254
|
literal("neutral"),
|
|
2344
2255
|
literal("node")
|
|
2345
|
-
])), description(`Platform for which the code should be generated (node, ${
|
|
2256
|
+
])), description(`Platform for which the code should be generated (node, ${styleText("underline", "browser")}, neutral)`)),
|
|
2346
2257
|
shimMissingExports: pipe(optional(boolean()), description("Create shim variables for missing exports")),
|
|
2347
2258
|
treeshake: optional(TreeshakingOptionsSchema),
|
|
2348
2259
|
optimization: optional(OptimizationOptionsSchema),
|
|
2349
|
-
logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${
|
|
2260
|
+
logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${styleText("dim", "silent")}, ${styleText(["underline", "gray"], "info")}, debug, ${styleText("yellow", "warn")})`)),
|
|
2350
2261
|
onLog: optional(OnLogSchema),
|
|
2351
2262
|
onwarn: optional(OnwarnSchema),
|
|
2352
2263
|
moduleTypes: pipe(optional(ModuleTypesSchema), description("Module types for customized extensions")),
|
|
@@ -2374,13 +2285,6 @@ const InputOptionsSchema = strictObject({
|
|
|
2374
2285
|
define: pipe(optional(record(string(), string())), description("Define global variables")),
|
|
2375
2286
|
inject: optional(record(string(), union([string(), tuple([string(), string()])]))),
|
|
2376
2287
|
profilerNames: optional(boolean()),
|
|
2377
|
-
jsx: optional(union([
|
|
2378
|
-
literal(false),
|
|
2379
|
-
literal("react"),
|
|
2380
|
-
literal("react-jsx"),
|
|
2381
|
-
literal("preserve"),
|
|
2382
|
-
RollupJsxOptionsSchema
|
|
2383
|
-
])),
|
|
2384
2288
|
transform: optional(TransformOptionsSchema),
|
|
2385
2289
|
watch: optional(union([WatchOptionsSchema, literal(false)])),
|
|
2386
2290
|
dropLabels: pipe(optional(array(string())), description("Remove labeled statements with these label names")),
|
|
@@ -2401,12 +2305,6 @@ const InputCliOverrideSchema = strictObject({
|
|
|
2401
2305
|
inject: pipe(optional(record(string(), string())), description("Inject import statements on demand")),
|
|
2402
2306
|
treeshake: pipe(optional(boolean()), description("enable treeshaking")),
|
|
2403
2307
|
makeAbsoluteExternalsRelative: pipe(optional(boolean()), description("Prevent normalization of external imports")),
|
|
2404
|
-
jsx: pipe(optional(union([
|
|
2405
|
-
literal(false),
|
|
2406
|
-
literal("react"),
|
|
2407
|
-
literal("react-jsx"),
|
|
2408
|
-
literal("preserve")
|
|
2409
|
-
])), description("Jsx options preset")),
|
|
2410
2308
|
preserveEntrySignatures: pipe(optional(literal(false)), description("Avoid facade chunks for entry points")),
|
|
2411
2309
|
context: pipe(optional(string()), description("The entity top-level `this` represents."))
|
|
2412
2310
|
});
|
|
@@ -2431,12 +2329,22 @@ const ModuleFormatSchema = union([
|
|
|
2431
2329
|
literal("iife"),
|
|
2432
2330
|
literal("umd")
|
|
2433
2331
|
]);
|
|
2434
|
-
const AddonFunctionSchema = pipe(
|
|
2435
|
-
const
|
|
2436
|
-
const
|
|
2437
|
-
const
|
|
2438
|
-
const
|
|
2439
|
-
const
|
|
2332
|
+
const AddonFunctionSchema = pipe(vFunction(), args(tuple([custom(() => true)])), returnsAsync(unionAsync([string(), pipeAsync(promise(), awaitAsync(), string())])));
|
|
2333
|
+
const ChunkFileNamesFunctionSchema = pipe(vFunction(), args(tuple([custom(() => true)])), returns(string()));
|
|
2334
|
+
const ChunkFileNamesSchema = union([string(), ChunkFileNamesFunctionSchema]);
|
|
2335
|
+
const AssetFileNamesFunctionSchema = pipe(vFunction(), args(tuple([custom(() => true)])), returns(string()));
|
|
2336
|
+
const AssetFileNamesSchema = union([string(), AssetFileNamesFunctionSchema]);
|
|
2337
|
+
const SanitizeFileNameFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(string()));
|
|
2338
|
+
const SanitizeFileNameSchema = union([boolean(), SanitizeFileNameFunctionSchema]);
|
|
2339
|
+
const GlobalsFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(string()));
|
|
2340
|
+
const PathsFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(string()));
|
|
2341
|
+
const ManualChunksFunctionSchema = pipe(vFunction(), args(tuple([string(), object({})])), returns(nullish(string())));
|
|
2342
|
+
const AdvancedChunksNameFunctionSchema = pipe(vFunction(), args(tuple([string(), object({})])), returns(nullish(string())));
|
|
2343
|
+
const AdvancedChunksTestFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(union([
|
|
2344
|
+
boolean(),
|
|
2345
|
+
void_(),
|
|
2346
|
+
undefined_()
|
|
2347
|
+
])));
|
|
2440
2348
|
const AdvancedChunksSchema = strictObject({
|
|
2441
2349
|
includeDependenciesRecursively: optional(boolean()),
|
|
2442
2350
|
minSize: optional(number()),
|
|
@@ -2445,12 +2353,8 @@ const AdvancedChunksSchema = strictObject({
|
|
|
2445
2353
|
maxModuleSize: optional(number()),
|
|
2446
2354
|
minShareCount: optional(number()),
|
|
2447
2355
|
groups: optional(array(strictObject({
|
|
2448
|
-
name: union([string(),
|
|
2449
|
-
test: optional(union([
|
|
2450
|
-
string(),
|
|
2451
|
-
instance(RegExp),
|
|
2452
|
-
pipe(function_(), args(tuple([string()])), returns(union([nullish(boolean()), void_()])))
|
|
2453
|
-
])),
|
|
2356
|
+
name: union([string(), AdvancedChunksNameFunctionSchema]),
|
|
2357
|
+
test: optional(union([StringOrRegExpSchema, AdvancedChunksTestFunctionSchema])),
|
|
2454
2358
|
priority: optional(number()),
|
|
2455
2359
|
minSize: optional(number()),
|
|
2456
2360
|
minShareCount: optional(number()),
|
|
@@ -2462,7 +2366,8 @@ const AdvancedChunksSchema = strictObject({
|
|
|
2462
2366
|
const GeneratedCodePresetSchema = union([literal("es5"), literal("es2015")]);
|
|
2463
2367
|
const GeneratedCodeOptionsSchema = strictObject({
|
|
2464
2368
|
symbols: pipe(optional(boolean()), description("Whether to use Symbol.toStringTag for namespace objects")),
|
|
2465
|
-
preset: GeneratedCodePresetSchema
|
|
2369
|
+
preset: GeneratedCodePresetSchema,
|
|
2370
|
+
profilerNames: pipe(optional(boolean()), description("Whether to add readable names to internal variables for profiling purposes"))
|
|
2466
2371
|
});
|
|
2467
2372
|
const OutputOptionsSchema = strictObject({
|
|
2468
2373
|
dir: pipe(optional(string()), description("Output directory, defaults to `dist` if `file` is not set")),
|
|
@@ -2472,18 +2377,18 @@ const OutputOptionsSchema = strictObject({
|
|
|
2472
2377
|
literal("named"),
|
|
2473
2378
|
literal("default"),
|
|
2474
2379
|
literal("none")
|
|
2475
|
-
])), description(`Specify a export mode (${
|
|
2380
|
+
])), description(`Specify a export mode (${styleText("underline", "auto")}, named, default, none)`)),
|
|
2476
2381
|
hashCharacters: pipe(optional(union([
|
|
2477
2382
|
literal("base64"),
|
|
2478
2383
|
literal("base36"),
|
|
2479
2384
|
literal("hex")
|
|
2480
2385
|
])), description("Use the specified character set for file hashes")),
|
|
2481
|
-
format: pipe(optional(ModuleFormatSchema), description(`Output format of the generated bundle (supports ${
|
|
2386
|
+
format: pipe(optional(ModuleFormatSchema), description(`Output format of the generated bundle (supports ${styleText("underline", "esm")}, cjs, and iife)`)),
|
|
2482
2387
|
sourcemap: pipe(optional(union([
|
|
2483
2388
|
boolean(),
|
|
2484
2389
|
literal("inline"),
|
|
2485
2390
|
literal("hidden")
|
|
2486
|
-
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${
|
|
2391
|
+
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${styleText("bold", "pass the `-s` on the last argument if you want to generate `.map` file")})`)),
|
|
2487
2392
|
sourcemapBaseUrl: pipe(optional(string()), description("Base URL used to prefix sourcemap paths")),
|
|
2488
2393
|
sourcemapDebugIds: pipe(optional(boolean()), description("Inject sourcemap debug IDs")),
|
|
2489
2394
|
sourcemapIgnoreList: optional(union([
|
|
@@ -2506,7 +2411,7 @@ const OutputOptionsSchema = strictObject({
|
|
|
2506
2411
|
sanitizeFileName: optional(SanitizeFileNameSchema),
|
|
2507
2412
|
minify: pipe(optional(union([
|
|
2508
2413
|
boolean(),
|
|
2509
|
-
|
|
2414
|
+
literal("dce-only"),
|
|
2510
2415
|
MinifyOptionsSchema
|
|
2511
2416
|
])), description("Minify the bundled file")),
|
|
2512
2417
|
name: pipe(optional(string()), description("Name for UMD / IIFE format outputs")),
|
|
@@ -2515,23 +2420,22 @@ const OutputOptionsSchema = strictObject({
|
|
|
2515
2420
|
generatedCode: pipe(optional(partial(GeneratedCodeOptionsSchema)), description("Generated code options")),
|
|
2516
2421
|
externalLiveBindings: pipe(optional(boolean()), description("external live bindings")),
|
|
2517
2422
|
inlineDynamicImports: pipe(optional(boolean()), description("Inline dynamic imports")),
|
|
2518
|
-
manualChunks: optional(
|
|
2423
|
+
manualChunks: optional(ManualChunksFunctionSchema),
|
|
2519
2424
|
advancedChunks: optional(AdvancedChunksSchema),
|
|
2520
2425
|
legalComments: pipe(optional(union([literal("none"), literal("inline")])), description("Control comments in the output")),
|
|
2521
2426
|
plugins: optional(custom(() => true)),
|
|
2522
2427
|
polyfillRequire: pipe(optional(boolean()), description("Disable require polyfill injection")),
|
|
2523
|
-
hoistTransitiveImports: optional(
|
|
2524
|
-
if (input) return false;
|
|
2525
|
-
return true;
|
|
2526
|
-
}, () => `The 'true' value is not supported`)),
|
|
2428
|
+
hoistTransitiveImports: optional(literal(false)),
|
|
2527
2429
|
preserveModules: pipe(optional(boolean()), description("Preserve module structure")),
|
|
2528
2430
|
preserveModulesRoot: pipe(optional(string()), description("Put preserved modules under this path at root level")),
|
|
2529
2431
|
virtualDirname: optional(string()),
|
|
2530
2432
|
minifyInternalExports: pipe(optional(boolean()), description("Minify internal exports")),
|
|
2531
|
-
topLevelVar: pipe(optional(boolean()), description("Rewrite top-level declarations to use `var`."))
|
|
2433
|
+
topLevelVar: pipe(optional(boolean()), description("Rewrite top-level declarations to use `var`.")),
|
|
2434
|
+
cleanDir: pipe(optional(boolean()), description("Clean output directory before emitting output")),
|
|
2435
|
+
keepNames: pipe(optional(boolean()), description("Keep function and class names after bundling"))
|
|
2532
2436
|
});
|
|
2533
2437
|
const getAddonDescription = (placement, wrapper) => {
|
|
2534
|
-
return `Code to insert the ${
|
|
2438
|
+
return `Code to insert the ${styleText("bold", placement)} of the bundled file (${styleText("bold", wrapper)} the wrapper function)`;
|
|
2535
2439
|
};
|
|
2536
2440
|
const OutputCliOverrideSchema = strictObject({
|
|
2537
2441
|
assetFileNames: pipe(optional(string()), description("Name pattern for asset files")),
|
|
@@ -2584,7 +2488,7 @@ function validateOption(key, options) {
|
|
|
2584
2488
|
let issueMsg = issue.message;
|
|
2585
2489
|
const issuePaths = issue.path.map((path) => path.key);
|
|
2586
2490
|
if (issue.type === "union") {
|
|
2587
|
-
const subIssue = issue.issues?.find((i
|
|
2491
|
+
const subIssue = issue.issues?.find((i) => !(i.type !== issue.received && i.input === issue.input));
|
|
2588
2492
|
if (subIssue) {
|
|
2589
2493
|
if (subIssue.path) issuePaths.push(subIssue.path.map((path) => path.key));
|
|
2590
2494
|
issueMsg = subIssue.message;
|
|
@@ -2599,77 +2503,6 @@ function validateOption(key, options) {
|
|
|
2599
2503
|
}
|
|
2600
2504
|
}
|
|
2601
2505
|
|
|
2602
|
-
//#endregion
|
|
2603
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.94.0/node_modules/oxc-parser/src-js/wrap.js
|
|
2604
|
-
function wrap$1(result) {
|
|
2605
|
-
let program, module$1, comments, errors;
|
|
2606
|
-
return {
|
|
2607
|
-
get program() {
|
|
2608
|
-
if (!program) program = jsonParseAst(result.program);
|
|
2609
|
-
return program;
|
|
2610
|
-
},
|
|
2611
|
-
get module() {
|
|
2612
|
-
if (!module$1) module$1 = result.module;
|
|
2613
|
-
return module$1;
|
|
2614
|
-
},
|
|
2615
|
-
get comments() {
|
|
2616
|
-
if (!comments) comments = result.comments;
|
|
2617
|
-
return comments;
|
|
2618
|
-
},
|
|
2619
|
-
get errors() {
|
|
2620
|
-
if (!errors) errors = result.errors;
|
|
2621
|
-
return errors;
|
|
2622
|
-
}
|
|
2623
|
-
};
|
|
2624
|
-
}
|
|
2625
|
-
function jsonParseAst(programJson) {
|
|
2626
|
-
const { node: program, fixes } = JSON.parse(programJson);
|
|
2627
|
-
for (const fixPath of fixes) applyFix(program, fixPath);
|
|
2628
|
-
return program;
|
|
2629
|
-
}
|
|
2630
|
-
function applyFix(program, fixPath) {
|
|
2631
|
-
let node = program;
|
|
2632
|
-
for (const key of fixPath) node = node[key];
|
|
2633
|
-
if (node.bigint) node.value = BigInt(node.bigint);
|
|
2634
|
-
else try {
|
|
2635
|
-
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
2636
|
-
} catch (_err) {}
|
|
2637
|
-
}
|
|
2638
|
-
|
|
2639
|
-
//#endregion
|
|
2640
|
-
//#region src/parse-ast-index.ts
|
|
2641
|
-
function wrap(result, sourceText) {
|
|
2642
|
-
result = wrap$1(result);
|
|
2643
|
-
if (result.errors.length > 0) return normalizeParseError(sourceText, result.errors);
|
|
2644
|
-
return result.program;
|
|
2645
|
-
}
|
|
2646
|
-
function normalizeParseError(sourceText, errors) {
|
|
2647
|
-
let message = `Parse failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
|
|
2648
|
-
for (let i$1 = 0; i$1 < errors.length; i$1++) {
|
|
2649
|
-
if (i$1 >= 5) {
|
|
2650
|
-
message += "\n...";
|
|
2651
|
-
break;
|
|
2652
|
-
}
|
|
2653
|
-
const e$2 = errors[i$1];
|
|
2654
|
-
message += e$2.message + "\n" + e$2.labels.map((label) => {
|
|
2655
|
-
const location = locate(sourceText, label.start, { offsetLine: 1 });
|
|
2656
|
-
if (!location) return;
|
|
2657
|
-
return getCodeFrame(sourceText, location.line, location.column);
|
|
2658
|
-
}).filter(Boolean).join("\n");
|
|
2659
|
-
}
|
|
2660
|
-
return error(logParseError(message));
|
|
2661
|
-
}
|
|
2662
|
-
const defaultParserOptions = {
|
|
2663
|
-
lang: "js",
|
|
2664
|
-
preserveParens: false
|
|
2665
|
-
};
|
|
2666
|
-
function parseAst(sourceText, options, filename) {
|
|
2667
|
-
return wrap(parseSync(filename ?? "file.js", sourceText, {
|
|
2668
|
-
...defaultParserOptions,
|
|
2669
|
-
...options
|
|
2670
|
-
}), sourceText);
|
|
2671
|
-
}
|
|
2672
|
-
|
|
2673
2506
|
//#endregion
|
|
2674
2507
|
//#region src/types/sourcemap.ts
|
|
2675
2508
|
function bindingifySourcemap$1(map) {
|
|
@@ -2678,8 +2511,8 @@ function bindingifySourcemap$1(map) {
|
|
|
2678
2511
|
file: map.file ?? void 0,
|
|
2679
2512
|
mappings: map.mappings,
|
|
2680
2513
|
sourceRoot: "sourceRoot" in map ? map.sourceRoot ?? void 0 : void 0,
|
|
2681
|
-
sources: map.sources?.map((s
|
|
2682
|
-
sourcesContent: map.sourcesContent?.map((s
|
|
2514
|
+
sources: map.sources?.map((s) => s ?? void 0),
|
|
2515
|
+
sourcesContent: map.sourcesContent?.map((s) => s ?? void 0),
|
|
2683
2516
|
names: map.names,
|
|
2684
2517
|
x_google_ignoreList: map.x_google_ignoreList,
|
|
2685
2518
|
debugId: "debugId" in map ? map.debugId : void 0
|
|
@@ -2687,98 +2520,471 @@ function bindingifySourcemap$1(map) {
|
|
|
2687
2520
|
}
|
|
2688
2521
|
|
|
2689
2522
|
//#endregion
|
|
2690
|
-
//#region src/utils/
|
|
2691
|
-
function
|
|
2692
|
-
|
|
2693
|
-
return container;
|
|
2694
|
-
}
|
|
2695
|
-
function normalizeBindingResult(container) {
|
|
2696
|
-
if (typeof container === "object" && container !== null && "isBindingErrors" in container && container.isBindingErrors) return aggregateBindingErrorsIntoJsError(container.errors);
|
|
2697
|
-
return container;
|
|
2523
|
+
//#region src/utils/asset-source.ts
|
|
2524
|
+
function transformAssetSource(bindingAssetSource$1) {
|
|
2525
|
+
return bindingAssetSource$1.inner;
|
|
2698
2526
|
}
|
|
2699
|
-
function
|
|
2700
|
-
return
|
|
2701
|
-
kind: e$2.field0.kind,
|
|
2702
|
-
message: e$2.field0.message,
|
|
2703
|
-
stack: void 0
|
|
2704
|
-
});
|
|
2527
|
+
function bindingAssetSource(source) {
|
|
2528
|
+
return { inner: source };
|
|
2705
2529
|
}
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2530
|
+
|
|
2531
|
+
//#endregion
|
|
2532
|
+
//#region src/utils/transform-rendered-module.ts
|
|
2533
|
+
function transformToRenderedModule(bindingRenderedModule) {
|
|
2534
|
+
return {
|
|
2535
|
+
get code() {
|
|
2536
|
+
return bindingRenderedModule.code;
|
|
2537
|
+
},
|
|
2538
|
+
get renderedLength() {
|
|
2539
|
+
return bindingRenderedModule.code?.length || 0;
|
|
2540
|
+
},
|
|
2541
|
+
get renderedExports() {
|
|
2542
|
+
return bindingRenderedModule.renderedExports;
|
|
2714
2543
|
}
|
|
2715
|
-
|
|
2716
|
-
}
|
|
2717
|
-
const wrapper = new Error(summary);
|
|
2718
|
-
Object.defineProperty(wrapper, "errors", {
|
|
2719
|
-
configurable: true,
|
|
2720
|
-
enumerable: true,
|
|
2721
|
-
get: () => errors,
|
|
2722
|
-
set: (value) => Object.defineProperty(wrapper, "errors", {
|
|
2723
|
-
configurable: true,
|
|
2724
|
-
enumerable: true,
|
|
2725
|
-
value
|
|
2726
|
-
})
|
|
2727
|
-
});
|
|
2728
|
-
return wrapper;
|
|
2729
|
-
}
|
|
2730
|
-
function getErrorMessage(e$2) {
|
|
2731
|
-
if (Object.hasOwn(e$2, "kind")) return e$2.message;
|
|
2732
|
-
let s$1 = "";
|
|
2733
|
-
if (e$2.plugin) s$1 += `[plugin ${e$2.plugin}]`;
|
|
2734
|
-
const id$1 = e$2.id ?? e$2.loc?.file;
|
|
2735
|
-
if (id$1) {
|
|
2736
|
-
s$1 += " " + id$1;
|
|
2737
|
-
if (e$2.loc) s$1 += `:${e$2.loc.line}:${e$2.loc.column}`;
|
|
2738
|
-
}
|
|
2739
|
-
if (s$1) s$1 += "\n";
|
|
2740
|
-
const message = `${e$2.name ?? "Error"}: ${e$2.message}`;
|
|
2741
|
-
s$1 += message;
|
|
2742
|
-
if (e$2.frame) s$1 = joinNewLine(s$1, e$2.frame);
|
|
2743
|
-
if (e$2.stack) s$1 = joinNewLine(s$1, e$2.stack.replace(message, ""));
|
|
2744
|
-
if (e$2.cause) {
|
|
2745
|
-
s$1 = joinNewLine(s$1, "Caused by:");
|
|
2746
|
-
s$1 = joinNewLine(s$1, getErrorMessage(e$2.cause).split("\n").map((line) => " " + line).join("\n"));
|
|
2747
|
-
}
|
|
2748
|
-
return s$1;
|
|
2749
|
-
}
|
|
2750
|
-
function joinNewLine(s1, s2) {
|
|
2751
|
-
return s1.replace(/\n+$/, "") + "\n" + s2.replace(/^\n+/, "");
|
|
2544
|
+
};
|
|
2752
2545
|
}
|
|
2753
2546
|
|
|
2754
2547
|
//#endregion
|
|
2755
|
-
//#region src/utils/transform-
|
|
2756
|
-
function
|
|
2548
|
+
//#region src/utils/transform-rendered-chunk.ts
|
|
2549
|
+
function transformRenderedChunk(chunk) {
|
|
2550
|
+
let modules = null;
|
|
2757
2551
|
return {
|
|
2758
|
-
|
|
2759
|
-
|
|
2552
|
+
type: "chunk",
|
|
2553
|
+
get name() {
|
|
2554
|
+
return chunk.name;
|
|
2760
2555
|
},
|
|
2761
|
-
get
|
|
2762
|
-
return
|
|
2556
|
+
get isEntry() {
|
|
2557
|
+
return chunk.isEntry;
|
|
2763
2558
|
},
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2559
|
+
get isDynamicEntry() {
|
|
2560
|
+
return chunk.isDynamicEntry;
|
|
2561
|
+
},
|
|
2562
|
+
get facadeModuleId() {
|
|
2563
|
+
return chunk.facadeModuleId;
|
|
2564
|
+
},
|
|
2565
|
+
get moduleIds() {
|
|
2566
|
+
return chunk.moduleIds;
|
|
2567
|
+
},
|
|
2568
|
+
get exports() {
|
|
2569
|
+
return chunk.exports;
|
|
2570
|
+
},
|
|
2571
|
+
get fileName() {
|
|
2572
|
+
return chunk.fileName;
|
|
2573
|
+
},
|
|
2574
|
+
get imports() {
|
|
2575
|
+
return chunk.imports;
|
|
2576
|
+
},
|
|
2577
|
+
get dynamicImports() {
|
|
2578
|
+
return chunk.dynamicImports;
|
|
2579
|
+
},
|
|
2580
|
+
get modules() {
|
|
2581
|
+
if (!modules) modules = transformChunkModules(chunk.modules);
|
|
2582
|
+
return modules;
|
|
2583
|
+
}
|
|
2772
2584
|
};
|
|
2773
2585
|
}
|
|
2586
|
+
function transformChunkModules(modules) {
|
|
2587
|
+
const result = {};
|
|
2588
|
+
for (let i = 0; i < modules.values.length; i++) {
|
|
2589
|
+
let key = modules.keys[i];
|
|
2590
|
+
const mod = modules.values[i];
|
|
2591
|
+
result[key] = transformToRenderedModule(mod);
|
|
2592
|
+
}
|
|
2593
|
+
return result;
|
|
2594
|
+
}
|
|
2774
2595
|
|
|
2775
2596
|
//#endregion
|
|
2776
|
-
//#region src/utils/transform-
|
|
2777
|
-
function
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2597
|
+
//#region src/utils/transform-to-rollup-output.ts
|
|
2598
|
+
function transformToRollupSourceMap(map) {
|
|
2599
|
+
const obj = {
|
|
2600
|
+
...JSON.parse(map),
|
|
2601
|
+
toString() {
|
|
2602
|
+
return JSON.stringify(obj);
|
|
2603
|
+
},
|
|
2604
|
+
toUrl() {
|
|
2605
|
+
return `data:application/json;charset=utf-8;base64,${Buffer.from(obj.toString(), "utf-8").toString("base64")}`;
|
|
2606
|
+
}
|
|
2607
|
+
};
|
|
2608
|
+
return obj;
|
|
2609
|
+
}
|
|
2610
|
+
function transformToRollupOutputChunk(bindingChunk) {
|
|
2611
|
+
const chunk = {
|
|
2612
|
+
type: "chunk",
|
|
2613
|
+
get code() {
|
|
2614
|
+
return bindingChunk.code;
|
|
2615
|
+
},
|
|
2616
|
+
fileName: bindingChunk.fileName,
|
|
2617
|
+
name: bindingChunk.name,
|
|
2618
|
+
get modules() {
|
|
2619
|
+
return transformChunkModules(bindingChunk.modules);
|
|
2620
|
+
},
|
|
2621
|
+
get imports() {
|
|
2622
|
+
return bindingChunk.imports;
|
|
2623
|
+
},
|
|
2624
|
+
get dynamicImports() {
|
|
2625
|
+
return bindingChunk.dynamicImports;
|
|
2626
|
+
},
|
|
2627
|
+
exports: bindingChunk.exports,
|
|
2628
|
+
isEntry: bindingChunk.isEntry,
|
|
2629
|
+
facadeModuleId: bindingChunk.facadeModuleId || null,
|
|
2630
|
+
isDynamicEntry: bindingChunk.isDynamicEntry,
|
|
2631
|
+
get moduleIds() {
|
|
2632
|
+
return bindingChunk.moduleIds;
|
|
2633
|
+
},
|
|
2634
|
+
get map() {
|
|
2635
|
+
return bindingChunk.map ? transformToRollupSourceMap(bindingChunk.map) : null;
|
|
2636
|
+
},
|
|
2637
|
+
sourcemapFileName: bindingChunk.sourcemapFileName || null,
|
|
2638
|
+
preliminaryFileName: bindingChunk.preliminaryFileName
|
|
2639
|
+
};
|
|
2640
|
+
const cache = {};
|
|
2641
|
+
return new Proxy(chunk, {
|
|
2642
|
+
get(target, p) {
|
|
2643
|
+
if (p in cache) return cache[p];
|
|
2644
|
+
const value = target[p];
|
|
2645
|
+
cache[p] = value;
|
|
2646
|
+
return value;
|
|
2647
|
+
},
|
|
2648
|
+
has(target, p) {
|
|
2649
|
+
if (p in cache) return true;
|
|
2650
|
+
return p in target;
|
|
2651
|
+
}
|
|
2652
|
+
});
|
|
2653
|
+
}
|
|
2654
|
+
function transformToMutableRollupOutputChunk(bindingChunk, changed) {
|
|
2655
|
+
const chunk = {
|
|
2656
|
+
type: "chunk",
|
|
2657
|
+
get code() {
|
|
2658
|
+
return bindingChunk.code;
|
|
2659
|
+
},
|
|
2660
|
+
fileName: bindingChunk.fileName,
|
|
2661
|
+
name: bindingChunk.name,
|
|
2662
|
+
get modules() {
|
|
2663
|
+
return transformChunkModules(bindingChunk.modules);
|
|
2664
|
+
},
|
|
2665
|
+
get imports() {
|
|
2666
|
+
return bindingChunk.imports;
|
|
2667
|
+
},
|
|
2668
|
+
get dynamicImports() {
|
|
2669
|
+
return bindingChunk.dynamicImports;
|
|
2670
|
+
},
|
|
2671
|
+
exports: bindingChunk.exports,
|
|
2672
|
+
isEntry: bindingChunk.isEntry,
|
|
2673
|
+
facadeModuleId: bindingChunk.facadeModuleId || null,
|
|
2674
|
+
isDynamicEntry: bindingChunk.isDynamicEntry,
|
|
2675
|
+
get moduleIds() {
|
|
2676
|
+
return bindingChunk.moduleIds;
|
|
2677
|
+
},
|
|
2678
|
+
get map() {
|
|
2679
|
+
return bindingChunk.map ? transformToRollupSourceMap(bindingChunk.map) : null;
|
|
2680
|
+
},
|
|
2681
|
+
sourcemapFileName: bindingChunk.sourcemapFileName || null,
|
|
2682
|
+
preliminaryFileName: bindingChunk.preliminaryFileName
|
|
2683
|
+
};
|
|
2684
|
+
const cache = {};
|
|
2685
|
+
return new Proxy(chunk, {
|
|
2686
|
+
get(target, p) {
|
|
2687
|
+
if (p in cache) return cache[p];
|
|
2688
|
+
const value = target[p];
|
|
2689
|
+
cache[p] = value;
|
|
2690
|
+
return value;
|
|
2691
|
+
},
|
|
2692
|
+
set(_target, p, newValue) {
|
|
2693
|
+
cache[p] = newValue;
|
|
2694
|
+
changed.updated.add(bindingChunk.fileName);
|
|
2695
|
+
return true;
|
|
2696
|
+
},
|
|
2697
|
+
has(target, p) {
|
|
2698
|
+
if (p in cache) return true;
|
|
2699
|
+
return p in target;
|
|
2700
|
+
}
|
|
2701
|
+
});
|
|
2702
|
+
}
|
|
2703
|
+
function transformToRollupOutputAsset(bindingAsset) {
|
|
2704
|
+
const asset = {
|
|
2705
|
+
type: "asset",
|
|
2706
|
+
fileName: bindingAsset.fileName,
|
|
2707
|
+
originalFileName: bindingAsset.originalFileName || null,
|
|
2708
|
+
originalFileNames: bindingAsset.originalFileNames,
|
|
2709
|
+
get source() {
|
|
2710
|
+
return transformAssetSource(bindingAsset.source);
|
|
2711
|
+
},
|
|
2712
|
+
name: bindingAsset.name ?? void 0,
|
|
2713
|
+
names: bindingAsset.names
|
|
2714
|
+
};
|
|
2715
|
+
const cache = {};
|
|
2716
|
+
return new Proxy(asset, { get(target, p) {
|
|
2717
|
+
if (p in cache) return cache[p];
|
|
2718
|
+
const value = target[p];
|
|
2719
|
+
cache[p] = value;
|
|
2720
|
+
return value;
|
|
2721
|
+
} });
|
|
2722
|
+
}
|
|
2723
|
+
function transformToMutableRollupOutputAsset(bindingAsset, changed) {
|
|
2724
|
+
const asset = {
|
|
2725
|
+
type: "asset",
|
|
2726
|
+
fileName: bindingAsset.fileName,
|
|
2727
|
+
originalFileName: bindingAsset.originalFileName || null,
|
|
2728
|
+
originalFileNames: bindingAsset.originalFileNames,
|
|
2729
|
+
get source() {
|
|
2730
|
+
return transformAssetSource(bindingAsset.source);
|
|
2731
|
+
},
|
|
2732
|
+
name: bindingAsset.name ?? void 0,
|
|
2733
|
+
names: bindingAsset.names
|
|
2734
|
+
};
|
|
2735
|
+
const cache = {};
|
|
2736
|
+
return new Proxy(asset, {
|
|
2737
|
+
get(target, p) {
|
|
2738
|
+
if (p in cache) return cache[p];
|
|
2739
|
+
const value = target[p];
|
|
2740
|
+
cache[p] = value;
|
|
2741
|
+
return value;
|
|
2742
|
+
},
|
|
2743
|
+
set(_target, p, newValue) {
|
|
2744
|
+
cache[p] = newValue;
|
|
2745
|
+
changed.updated.add(bindingAsset.fileName);
|
|
2746
|
+
return true;
|
|
2747
|
+
}
|
|
2748
|
+
});
|
|
2749
|
+
}
|
|
2750
|
+
function transformToRollupOutput(output) {
|
|
2751
|
+
const { chunks, assets } = output;
|
|
2752
|
+
return { output: [...chunks.map((chunk) => transformToRollupOutputChunk(chunk)), ...assets.map((asset) => transformToRollupOutputAsset(asset))] };
|
|
2753
|
+
}
|
|
2754
|
+
function transformToMutableRollupOutput(output, changed) {
|
|
2755
|
+
const { chunks, assets } = output;
|
|
2756
|
+
return { output: [...chunks.map((chunk) => transformToMutableRollupOutputChunk(chunk, changed)), ...assets.map((asset) => transformToMutableRollupOutputAsset(asset, changed))] };
|
|
2757
|
+
}
|
|
2758
|
+
function transformToOutputBundle(context, output, changed) {
|
|
2759
|
+
const bundle = Object.fromEntries(transformToMutableRollupOutput(output, changed).output.map((item) => [item.fileName, item]));
|
|
2760
|
+
return new Proxy(bundle, {
|
|
2761
|
+
set(_target, _p, _newValue, _receiver) {
|
|
2762
|
+
const originalStackTraceLimit = Error.stackTraceLimit;
|
|
2763
|
+
Error.stackTraceLimit = 2;
|
|
2764
|
+
const message = "This plugin assigns to bundle variable. This is discouraged by Rollup and is not supported by Rolldown. This will be ignored. https://rollupjs.org/plugin-development/#generatebundle:~:text=DANGER,this.emitFile.";
|
|
2765
|
+
const stack = new Error(message).stack ?? message;
|
|
2766
|
+
Error.stackTraceLimit = originalStackTraceLimit;
|
|
2767
|
+
context.warn({
|
|
2768
|
+
message: stack,
|
|
2769
|
+
code: "UNSUPPORTED_BUNDLE_ASSIGNMENT"
|
|
2770
|
+
});
|
|
2771
|
+
return true;
|
|
2772
|
+
},
|
|
2773
|
+
deleteProperty(target, property) {
|
|
2774
|
+
if (typeof property === "string") changed.deleted.add(property);
|
|
2775
|
+
return true;
|
|
2776
|
+
}
|
|
2777
|
+
});
|
|
2778
|
+
}
|
|
2779
|
+
function collectChangedBundle(changed, bundle) {
|
|
2780
|
+
const changes = {};
|
|
2781
|
+
for (const key in bundle) {
|
|
2782
|
+
if (changed.deleted.has(key) || !changed.updated.has(key)) continue;
|
|
2783
|
+
const item = bundle[key];
|
|
2784
|
+
if (item.type === "asset") changes[key] = {
|
|
2785
|
+
filename: item.fileName,
|
|
2786
|
+
originalFileNames: item.originalFileNames,
|
|
2787
|
+
source: bindingAssetSource(item.source),
|
|
2788
|
+
names: item.names
|
|
2789
|
+
};
|
|
2790
|
+
else changes[key] = {
|
|
2791
|
+
code: item.code,
|
|
2792
|
+
filename: item.fileName,
|
|
2793
|
+
name: item.name,
|
|
2794
|
+
isEntry: item.isEntry,
|
|
2795
|
+
exports: item.exports,
|
|
2796
|
+
modules: {},
|
|
2797
|
+
imports: item.imports,
|
|
2798
|
+
dynamicImports: item.dynamicImports,
|
|
2799
|
+
facadeModuleId: item.facadeModuleId || void 0,
|
|
2800
|
+
isDynamicEntry: item.isDynamicEntry,
|
|
2801
|
+
moduleIds: item.moduleIds,
|
|
2802
|
+
map: bindingifySourcemap$1(item.map),
|
|
2803
|
+
sourcemapFilename: item.sourcemapFileName || void 0,
|
|
2804
|
+
preliminaryFilename: item.preliminaryFileName
|
|
2805
|
+
};
|
|
2806
|
+
}
|
|
2807
|
+
return {
|
|
2808
|
+
changes,
|
|
2809
|
+
deleted: changed.deleted
|
|
2810
|
+
};
|
|
2811
|
+
}
|
|
2812
|
+
|
|
2813
|
+
//#endregion
|
|
2814
|
+
//#region src/types/rolldown-output-impl.ts
|
|
2815
|
+
var RolldownOutputImpl = class {
|
|
2816
|
+
constructor(bindingOutputs) {
|
|
2817
|
+
this.bindingOutputs = bindingOutputs;
|
|
2818
|
+
}
|
|
2819
|
+
get output() {
|
|
2820
|
+
return transformToRollupOutput(this.bindingOutputs).output;
|
|
2821
|
+
}
|
|
2822
|
+
};
|
|
2823
|
+
|
|
2824
|
+
//#endregion
|
|
2825
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.95.0/node_modules/oxc-parser/src-js/wrap.js
|
|
2826
|
+
function wrap$1(result) {
|
|
2827
|
+
let program, module, comments, errors;
|
|
2828
|
+
return {
|
|
2829
|
+
get program() {
|
|
2830
|
+
if (!program) program = jsonParseAst(result.program);
|
|
2831
|
+
return program;
|
|
2832
|
+
},
|
|
2833
|
+
get module() {
|
|
2834
|
+
if (!module) module = result.module;
|
|
2835
|
+
return module;
|
|
2836
|
+
},
|
|
2837
|
+
get comments() {
|
|
2838
|
+
if (!comments) comments = result.comments;
|
|
2839
|
+
return comments;
|
|
2840
|
+
},
|
|
2841
|
+
get errors() {
|
|
2842
|
+
if (!errors) errors = result.errors;
|
|
2843
|
+
return errors;
|
|
2844
|
+
}
|
|
2845
|
+
};
|
|
2846
|
+
}
|
|
2847
|
+
function jsonParseAst(programJson) {
|
|
2848
|
+
const { node: program, fixes } = JSON.parse(programJson);
|
|
2849
|
+
for (const fixPath of fixes) applyFix(program, fixPath);
|
|
2850
|
+
return program;
|
|
2851
|
+
}
|
|
2852
|
+
function applyFix(program, fixPath) {
|
|
2853
|
+
let node = program;
|
|
2854
|
+
for (const key of fixPath) node = node[key];
|
|
2855
|
+
if (node.bigint) node.value = BigInt(node.bigint);
|
|
2856
|
+
else try {
|
|
2857
|
+
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
2858
|
+
} catch (_err) {}
|
|
2859
|
+
}
|
|
2860
|
+
|
|
2861
|
+
//#endregion
|
|
2862
|
+
//#region src/parse-ast-index.ts
|
|
2863
|
+
function wrap(result, sourceText) {
|
|
2864
|
+
result = wrap$1(result);
|
|
2865
|
+
if (result.errors.length > 0) return normalizeParseError(sourceText, result.errors);
|
|
2866
|
+
return result.program;
|
|
2867
|
+
}
|
|
2868
|
+
function normalizeParseError(sourceText, errors) {
|
|
2869
|
+
let message = `Parse failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
|
|
2870
|
+
for (let i = 0; i < errors.length; i++) {
|
|
2871
|
+
if (i >= 5) {
|
|
2872
|
+
message += "\n...";
|
|
2873
|
+
break;
|
|
2874
|
+
}
|
|
2875
|
+
const e$1 = errors[i];
|
|
2876
|
+
message += e$1.message + "\n" + e$1.labels.map((label) => {
|
|
2877
|
+
const location = locate(sourceText, label.start, { offsetLine: 1 });
|
|
2878
|
+
if (!location) return;
|
|
2879
|
+
return getCodeFrame(sourceText, location.line, location.column);
|
|
2880
|
+
}).filter(Boolean).join("\n");
|
|
2881
|
+
}
|
|
2882
|
+
return error(logParseError(message));
|
|
2883
|
+
}
|
|
2884
|
+
const defaultParserOptions = {
|
|
2885
|
+
lang: "js",
|
|
2886
|
+
preserveParens: false
|
|
2887
|
+
};
|
|
2888
|
+
function parseAst(sourceText, options, filename) {
|
|
2889
|
+
return wrap(parseSync(filename ?? "file.js", sourceText, {
|
|
2890
|
+
...defaultParserOptions,
|
|
2891
|
+
...options
|
|
2892
|
+
}), sourceText);
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
//#endregion
|
|
2896
|
+
//#region src/utils/error.ts
|
|
2897
|
+
function unwrapBindingResult(container) {
|
|
2898
|
+
if (typeof container === "object" && container !== null && "isBindingErrors" in container && container.isBindingErrors) throw aggregateBindingErrorsIntoJsError(container.errors);
|
|
2899
|
+
return container;
|
|
2900
|
+
}
|
|
2901
|
+
function normalizeBindingResult(container) {
|
|
2902
|
+
if (typeof container === "object" && container !== null && "isBindingErrors" in container && container.isBindingErrors) return aggregateBindingErrorsIntoJsError(container.errors);
|
|
2903
|
+
return container;
|
|
2904
|
+
}
|
|
2905
|
+
function normalizeBindingError(e$1) {
|
|
2906
|
+
return e$1.type === "JsError" ? e$1.field0 : Object.assign(/* @__PURE__ */ new Error(), {
|
|
2907
|
+
kind: e$1.field0.kind,
|
|
2908
|
+
message: e$1.field0.message,
|
|
2909
|
+
stack: void 0
|
|
2910
|
+
});
|
|
2911
|
+
}
|
|
2912
|
+
function aggregateBindingErrorsIntoJsError(rawErrors) {
|
|
2913
|
+
const errors = rawErrors.map(normalizeBindingError);
|
|
2914
|
+
let summary = `Build failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
|
|
2915
|
+
for (let i = 0; i < errors.length; i++) {
|
|
2916
|
+
summary += "\n";
|
|
2917
|
+
if (i >= 5) {
|
|
2918
|
+
summary += "...";
|
|
2919
|
+
break;
|
|
2920
|
+
}
|
|
2921
|
+
summary += getErrorMessage(errors[i]);
|
|
2922
|
+
}
|
|
2923
|
+
const wrapper = new Error(summary);
|
|
2924
|
+
Object.defineProperty(wrapper, "errors", {
|
|
2925
|
+
configurable: true,
|
|
2926
|
+
enumerable: true,
|
|
2927
|
+
get: () => errors,
|
|
2928
|
+
set: (value) => Object.defineProperty(wrapper, "errors", {
|
|
2929
|
+
configurable: true,
|
|
2930
|
+
enumerable: true,
|
|
2931
|
+
value
|
|
2932
|
+
})
|
|
2933
|
+
});
|
|
2934
|
+
return wrapper;
|
|
2935
|
+
}
|
|
2936
|
+
function getErrorMessage(e$1) {
|
|
2937
|
+
if (Object.hasOwn(e$1, "kind")) return e$1.message;
|
|
2938
|
+
let s = "";
|
|
2939
|
+
if (e$1.plugin) s += `[plugin ${e$1.plugin}]`;
|
|
2940
|
+
const id$1 = e$1.id ?? e$1.loc?.file;
|
|
2941
|
+
if (id$1) {
|
|
2942
|
+
s += " " + id$1;
|
|
2943
|
+
if (e$1.loc) s += `:${e$1.loc.line}:${e$1.loc.column}`;
|
|
2944
|
+
}
|
|
2945
|
+
if (s) s += "\n";
|
|
2946
|
+
const message = `${e$1.name ?? "Error"}: ${e$1.message}`;
|
|
2947
|
+
s += message;
|
|
2948
|
+
if (e$1.frame) s = joinNewLine(s, e$1.frame);
|
|
2949
|
+
if (e$1.stack) s = joinNewLine(s, e$1.stack.replace(message, ""));
|
|
2950
|
+
if (e$1.cause) {
|
|
2951
|
+
s = joinNewLine(s, "Caused by:");
|
|
2952
|
+
s = joinNewLine(s, getErrorMessage(e$1.cause).split("\n").map((line) => " " + line).join("\n"));
|
|
2953
|
+
}
|
|
2954
|
+
return s;
|
|
2955
|
+
}
|
|
2956
|
+
function joinNewLine(s1, s2) {
|
|
2957
|
+
return s1.replace(/\n+$/, "") + "\n" + s2.replace(/^\n+/, "");
|
|
2958
|
+
}
|
|
2959
|
+
|
|
2960
|
+
//#endregion
|
|
2961
|
+
//#region src/utils/transform-module-info.ts
|
|
2962
|
+
function transformModuleInfo(info, option) {
|
|
2963
|
+
return {
|
|
2964
|
+
get ast() {
|
|
2965
|
+
return unsupported("ModuleInfo#ast");
|
|
2966
|
+
},
|
|
2967
|
+
get code() {
|
|
2968
|
+
return info.code;
|
|
2969
|
+
},
|
|
2970
|
+
id: info.id,
|
|
2971
|
+
importers: info.importers,
|
|
2972
|
+
dynamicImporters: info.dynamicImporters,
|
|
2973
|
+
importedIds: info.importedIds,
|
|
2974
|
+
dynamicallyImportedIds: info.dynamicallyImportedIds,
|
|
2975
|
+
exports: info.exports,
|
|
2976
|
+
isEntry: info.isEntry,
|
|
2977
|
+
...option
|
|
2978
|
+
};
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2981
|
+
//#endregion
|
|
2982
|
+
//#region src/utils/transform-sourcemap.ts
|
|
2983
|
+
function isEmptySourcemapFiled(array$1) {
|
|
2984
|
+
if (!array$1) return true;
|
|
2985
|
+
if (array$1.length === 0 || !array$1[0]) return true;
|
|
2986
|
+
return false;
|
|
2987
|
+
}
|
|
2782
2988
|
function normalizeTransformHookSourcemap(id$1, originalCode, rawMap) {
|
|
2783
2989
|
if (!rawMap) return;
|
|
2784
2990
|
let map = typeof rawMap === "object" ? rawMap : JSON.parse(rawMap);
|
|
@@ -2788,7 +2994,7 @@ function normalizeTransformHookSourcemap(id$1, originalCode, rawMap) {
|
|
|
2788
2994
|
}
|
|
2789
2995
|
|
|
2790
2996
|
//#endregion
|
|
2791
|
-
//#region ../pluginutils/dist/
|
|
2997
|
+
//#region ../pluginutils/dist/composable-filters.js
|
|
2792
2998
|
var And = class {
|
|
2793
2999
|
kind;
|
|
2794
3000
|
args;
|
|
@@ -2873,42 +3079,42 @@ function exclude(expr) {
|
|
|
2873
3079
|
|
|
2874
3080
|
//#endregion
|
|
2875
3081
|
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/lazyDataLastImpl-BDhrIOwR.js
|
|
2876
|
-
function e(e$
|
|
2877
|
-
let r
|
|
2878
|
-
return n$
|
|
2879
|
-
lazy: n$
|
|
2880
|
-
lazyArgs: t$
|
|
3082
|
+
function e(e$1, t$2, n$1) {
|
|
3083
|
+
let r = (n$2) => e$1(n$2, ...t$2);
|
|
3084
|
+
return n$1 === void 0 ? r : Object.assign(r, {
|
|
3085
|
+
lazy: n$1,
|
|
3086
|
+
lazyArgs: t$2
|
|
2881
3087
|
});
|
|
2882
3088
|
}
|
|
2883
3089
|
|
|
2884
3090
|
//#endregion
|
|
2885
3091
|
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purry-DH9cw9sy.js
|
|
2886
|
-
function t(t$
|
|
2887
|
-
let i
|
|
2888
|
-
if (i
|
|
2889
|
-
if (i
|
|
3092
|
+
function t(t$2, n$1, r) {
|
|
3093
|
+
let i = t$2.length - n$1.length;
|
|
3094
|
+
if (i === 0) return t$2(...n$1);
|
|
3095
|
+
if (i === 1) return e(t$2, n$1, r);
|
|
2890
3096
|
throw Error(`Wrong number of arguments`);
|
|
2891
3097
|
}
|
|
2892
3098
|
|
|
2893
3099
|
//#endregion
|
|
2894
3100
|
//#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/partition-DAu403JQ.js
|
|
2895
|
-
function t$1(...t$
|
|
2896
|
-
return t(n, t$
|
|
3101
|
+
function t$1(...t$2) {
|
|
3102
|
+
return t(n, t$2);
|
|
2897
3103
|
}
|
|
2898
|
-
const n = (e$
|
|
2899
|
-
let n$
|
|
2900
|
-
for (let [r
|
|
2901
|
-
return n$
|
|
3104
|
+
const n = (e$1, t$2) => {
|
|
3105
|
+
let n$1 = [[], []];
|
|
3106
|
+
for (let [r, i] of e$1.entries()) t$2(i, r, e$1) ? n$1[0].push(i) : n$1[1].push(i);
|
|
3107
|
+
return n$1;
|
|
2902
3108
|
};
|
|
2903
3109
|
|
|
2904
3110
|
//#endregion
|
|
2905
3111
|
//#region src/plugin/bindingify-hook-filter.ts
|
|
2906
3112
|
function generalHookFilterMatcherToFilterExprs(matcher, stringKind) {
|
|
2907
3113
|
if (typeof matcher === "string" || matcher instanceof RegExp) return [include(generateAtomMatcher(stringKind, matcher))];
|
|
2908
|
-
if (Array.isArray(matcher)) return matcher.map((m
|
|
3114
|
+
if (Array.isArray(matcher)) return matcher.map((m) => include(generateAtomMatcher(stringKind, m)));
|
|
2909
3115
|
let ret = [];
|
|
2910
|
-
if (matcher.exclude) ret.push(...arraify(matcher.exclude).map((m
|
|
2911
|
-
if (matcher.include) ret.push(...arraify(matcher.include).map((m
|
|
3116
|
+
if (matcher.exclude) ret.push(...arraify(matcher.exclude).map((m) => exclude(generateAtomMatcher(stringKind, m))));
|
|
3117
|
+
if (matcher.include) ret.push(...arraify(matcher.include).map((m) => include(generateAtomMatcher(stringKind, m))));
|
|
2912
3118
|
return ret;
|
|
2913
3119
|
}
|
|
2914
3120
|
function generateAtomMatcher(kind, matcher) {
|
|
@@ -2923,14 +3129,14 @@ function transformFilterMatcherToFilterExprs(filterOption) {
|
|
|
2923
3129
|
let idExcludes = [];
|
|
2924
3130
|
let codeIncludes = [];
|
|
2925
3131
|
let codeExcludes = [];
|
|
2926
|
-
if (id$1) [idIncludes, idExcludes] = t$1(generalHookFilterMatcherToFilterExprs(id$1, "id") ?? [], (m
|
|
2927
|
-
if (code$1) [codeIncludes, codeExcludes] = t$1(generalHookFilterMatcherToFilterExprs(code$1, "code") ?? [], (m
|
|
3132
|
+
if (id$1) [idIncludes, idExcludes] = t$1(generalHookFilterMatcherToFilterExprs(id$1, "id") ?? [], (m) => m.kind === "include");
|
|
3133
|
+
if (code$1) [codeIncludes, codeExcludes] = t$1(generalHookFilterMatcherToFilterExprs(code$1, "code") ?? [], (m) => m.kind === "include");
|
|
2928
3134
|
ret.push(...idExcludes);
|
|
2929
3135
|
ret.push(...codeExcludes);
|
|
2930
3136
|
let andExprList = [];
|
|
2931
3137
|
if (moduleType$1) {
|
|
2932
3138
|
let moduleTypes = Array.isArray(moduleType$1) ? moduleType$1 : moduleType$1.include ?? [];
|
|
2933
|
-
andExprList.push(or(...moduleTypes.map((m
|
|
3139
|
+
andExprList.push(or(...moduleTypes.map((m) => moduleType(m))));
|
|
2934
3140
|
}
|
|
2935
3141
|
if (idIncludes.length) andExprList.push(or(...idIncludes.map((item) => item.expr)));
|
|
2936
3142
|
if (codeIncludes.length) andExprList.push(or(...codeIncludes.map((item) => item.expr)));
|
|
@@ -2952,7 +3158,7 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2952
3158
|
switch (expr.kind) {
|
|
2953
3159
|
case "and": {
|
|
2954
3160
|
let args$1 = expr.args;
|
|
2955
|
-
for (let i
|
|
3161
|
+
for (let i = args$1.length - 1; i >= 0; i--) bindingifyFilterExprImpl(args$1[i], list);
|
|
2956
3162
|
list.push({
|
|
2957
3163
|
kind: "And",
|
|
2958
3164
|
payload: args$1.length
|
|
@@ -2961,7 +3167,7 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2961
3167
|
}
|
|
2962
3168
|
case "or": {
|
|
2963
3169
|
let args$1 = expr.args;
|
|
2964
|
-
for (let i
|
|
3170
|
+
for (let i = args$1.length - 1; i >= 0; i--) bindingifyFilterExprImpl(args$1[i], list);
|
|
2965
3171
|
list.push({
|
|
2966
3172
|
kind: "Or",
|
|
2967
3173
|
payload: args$1.length
|
|
@@ -3050,15 +3256,6 @@ function bindingPluginOrder(order) {
|
|
|
3050
3256
|
}
|
|
3051
3257
|
}
|
|
3052
3258
|
|
|
3053
|
-
//#endregion
|
|
3054
|
-
//#region src/utils/asset-source.ts
|
|
3055
|
-
function transformAssetSource(bindingAssetSource$1) {
|
|
3056
|
-
return bindingAssetSource$1.inner;
|
|
3057
|
-
}
|
|
3058
|
-
function bindingAssetSource(source) {
|
|
3059
|
-
return { inner: source };
|
|
3060
|
-
}
|
|
3061
|
-
|
|
3062
3259
|
//#endregion
|
|
3063
3260
|
//#region src/plugin/fs.ts
|
|
3064
3261
|
const fsModule = {
|
|
@@ -3198,12 +3395,12 @@ var TransformPluginContextImpl = class extends PluginContextImpl {
|
|
|
3198
3395
|
this.warn = getLogHandler$1(this.warn);
|
|
3199
3396
|
this.info = getLogHandler$1(this.info);
|
|
3200
3397
|
}
|
|
3201
|
-
error(e$
|
|
3202
|
-
if (typeof e$
|
|
3203
|
-
if (pos) augmentCodeLocation(e$
|
|
3204
|
-
e$
|
|
3205
|
-
e$
|
|
3206
|
-
return error(logPluginError(normalizeLog(e$
|
|
3398
|
+
error(e$1, pos) {
|
|
3399
|
+
if (typeof e$1 === "string") e$1 = { message: e$1 };
|
|
3400
|
+
if (pos) augmentCodeLocation(e$1, pos, this.moduleSource, this.moduleId);
|
|
3401
|
+
e$1.id = this.moduleId;
|
|
3402
|
+
e$1.hook = "transform";
|
|
3403
|
+
return error(logPluginError(normalizeLog(e$1), this.pluginName));
|
|
3207
3404
|
}
|
|
3208
3405
|
getCombinedSourcemap() {
|
|
3209
3406
|
return JSON.parse(this.inner.getCombinedSourcemap());
|
|
@@ -3211,8 +3408,8 @@ var TransformPluginContextImpl = class extends PluginContextImpl {
|
|
|
3211
3408
|
addWatchFile(id$1) {
|
|
3212
3409
|
this.inner.addWatchFile(id$1);
|
|
3213
3410
|
}
|
|
3214
|
-
sendMagicString(s
|
|
3215
|
-
this.inner.sendMagicString(s
|
|
3411
|
+
sendMagicString(s) {
|
|
3412
|
+
this.inner.sendMagicString(s);
|
|
3216
3413
|
}
|
|
3217
3414
|
};
|
|
3218
3415
|
|
|
@@ -3411,220 +3608,6 @@ function bindingifyModuleParsed(args$1) {
|
|
|
3411
3608
|
};
|
|
3412
3609
|
}
|
|
3413
3610
|
|
|
3414
|
-
//#endregion
|
|
3415
|
-
//#region src/utils/transform-rendered-module.ts
|
|
3416
|
-
function transformToRenderedModule(bindingRenderedModule) {
|
|
3417
|
-
return {
|
|
3418
|
-
get code() {
|
|
3419
|
-
return bindingRenderedModule.code;
|
|
3420
|
-
},
|
|
3421
|
-
get renderedLength() {
|
|
3422
|
-
return bindingRenderedModule.code?.length || 0;
|
|
3423
|
-
},
|
|
3424
|
-
get renderedExports() {
|
|
3425
|
-
return bindingRenderedModule.renderedExports;
|
|
3426
|
-
}
|
|
3427
|
-
};
|
|
3428
|
-
}
|
|
3429
|
-
|
|
3430
|
-
//#endregion
|
|
3431
|
-
//#region src/utils/transform-rendered-chunk.ts
|
|
3432
|
-
function transformRenderedChunk(chunk) {
|
|
3433
|
-
let modules = null;
|
|
3434
|
-
return {
|
|
3435
|
-
type: "chunk",
|
|
3436
|
-
get name() {
|
|
3437
|
-
return chunk.name;
|
|
3438
|
-
},
|
|
3439
|
-
get isEntry() {
|
|
3440
|
-
return chunk.isEntry;
|
|
3441
|
-
},
|
|
3442
|
-
get isDynamicEntry() {
|
|
3443
|
-
return chunk.isDynamicEntry;
|
|
3444
|
-
},
|
|
3445
|
-
get facadeModuleId() {
|
|
3446
|
-
return chunk.facadeModuleId;
|
|
3447
|
-
},
|
|
3448
|
-
get moduleIds() {
|
|
3449
|
-
return chunk.moduleIds;
|
|
3450
|
-
},
|
|
3451
|
-
get exports() {
|
|
3452
|
-
return chunk.exports;
|
|
3453
|
-
},
|
|
3454
|
-
get fileName() {
|
|
3455
|
-
return chunk.fileName;
|
|
3456
|
-
},
|
|
3457
|
-
get imports() {
|
|
3458
|
-
return chunk.imports;
|
|
3459
|
-
},
|
|
3460
|
-
get dynamicImports() {
|
|
3461
|
-
return chunk.dynamicImports;
|
|
3462
|
-
},
|
|
3463
|
-
get modules() {
|
|
3464
|
-
if (!modules) modules = transformChunkModules(chunk.modules);
|
|
3465
|
-
return modules;
|
|
3466
|
-
}
|
|
3467
|
-
};
|
|
3468
|
-
}
|
|
3469
|
-
function transformChunkModules(modules) {
|
|
3470
|
-
const result = {};
|
|
3471
|
-
for (let i$1 = 0; i$1 < modules.values.length; i$1++) {
|
|
3472
|
-
let key = modules.keys[i$1];
|
|
3473
|
-
const mod = modules.values[i$1];
|
|
3474
|
-
result[key] = transformToRenderedModule(mod);
|
|
3475
|
-
}
|
|
3476
|
-
return result;
|
|
3477
|
-
}
|
|
3478
|
-
|
|
3479
|
-
//#endregion
|
|
3480
|
-
//#region src/utils/transform-to-rollup-output.ts
|
|
3481
|
-
function transformToRollupSourceMap(map) {
|
|
3482
|
-
const obj = {
|
|
3483
|
-
...JSON.parse(map),
|
|
3484
|
-
toString() {
|
|
3485
|
-
return JSON.stringify(obj);
|
|
3486
|
-
},
|
|
3487
|
-
toUrl() {
|
|
3488
|
-
return `data:application/json;charset=utf-8;base64,${Buffer.from(obj.toString(), "utf-8").toString("base64")}`;
|
|
3489
|
-
}
|
|
3490
|
-
};
|
|
3491
|
-
return obj;
|
|
3492
|
-
}
|
|
3493
|
-
function transformToRollupOutputChunk(bindingChunk, changed) {
|
|
3494
|
-
const chunk = {
|
|
3495
|
-
type: "chunk",
|
|
3496
|
-
get code() {
|
|
3497
|
-
return bindingChunk.code;
|
|
3498
|
-
},
|
|
3499
|
-
fileName: bindingChunk.fileName,
|
|
3500
|
-
name: bindingChunk.name,
|
|
3501
|
-
get modules() {
|
|
3502
|
-
return transformChunkModules(bindingChunk.modules);
|
|
3503
|
-
},
|
|
3504
|
-
get imports() {
|
|
3505
|
-
return bindingChunk.imports;
|
|
3506
|
-
},
|
|
3507
|
-
get dynamicImports() {
|
|
3508
|
-
return bindingChunk.dynamicImports;
|
|
3509
|
-
},
|
|
3510
|
-
exports: bindingChunk.exports,
|
|
3511
|
-
isEntry: bindingChunk.isEntry,
|
|
3512
|
-
facadeModuleId: bindingChunk.facadeModuleId || null,
|
|
3513
|
-
isDynamicEntry: bindingChunk.isDynamicEntry,
|
|
3514
|
-
get moduleIds() {
|
|
3515
|
-
return bindingChunk.moduleIds;
|
|
3516
|
-
},
|
|
3517
|
-
get map() {
|
|
3518
|
-
return bindingChunk.map ? transformToRollupSourceMap(bindingChunk.map) : null;
|
|
3519
|
-
},
|
|
3520
|
-
sourcemapFileName: bindingChunk.sourcemapFileName || null,
|
|
3521
|
-
preliminaryFileName: bindingChunk.preliminaryFileName
|
|
3522
|
-
};
|
|
3523
|
-
const cache = {};
|
|
3524
|
-
return new Proxy(chunk, {
|
|
3525
|
-
get(target, p$1) {
|
|
3526
|
-
if (p$1 in cache) return cache[p$1];
|
|
3527
|
-
const value = target[p$1];
|
|
3528
|
-
cache[p$1] = value;
|
|
3529
|
-
return value;
|
|
3530
|
-
},
|
|
3531
|
-
set(_target, p$1, newValue) {
|
|
3532
|
-
cache[p$1] = newValue;
|
|
3533
|
-
changed?.updated.add(bindingChunk.fileName);
|
|
3534
|
-
return true;
|
|
3535
|
-
},
|
|
3536
|
-
has(target, p$1) {
|
|
3537
|
-
if (p$1 in cache) return true;
|
|
3538
|
-
return p$1 in target;
|
|
3539
|
-
}
|
|
3540
|
-
});
|
|
3541
|
-
}
|
|
3542
|
-
function transformToRollupOutputAsset(bindingAsset, changed) {
|
|
3543
|
-
const asset = {
|
|
3544
|
-
type: "asset",
|
|
3545
|
-
fileName: bindingAsset.fileName,
|
|
3546
|
-
originalFileName: bindingAsset.originalFileName || null,
|
|
3547
|
-
originalFileNames: bindingAsset.originalFileNames,
|
|
3548
|
-
get source() {
|
|
3549
|
-
return transformAssetSource(bindingAsset.source);
|
|
3550
|
-
},
|
|
3551
|
-
name: bindingAsset.name ?? void 0,
|
|
3552
|
-
names: bindingAsset.names
|
|
3553
|
-
};
|
|
3554
|
-
const cache = {};
|
|
3555
|
-
return new Proxy(asset, {
|
|
3556
|
-
get(target, p$1) {
|
|
3557
|
-
if (p$1 in cache) return cache[p$1];
|
|
3558
|
-
const value = target[p$1];
|
|
3559
|
-
cache[p$1] = value;
|
|
3560
|
-
return value;
|
|
3561
|
-
},
|
|
3562
|
-
set(_target, p$1, newValue) {
|
|
3563
|
-
cache[p$1] = newValue;
|
|
3564
|
-
changed?.updated.add(bindingAsset.fileName);
|
|
3565
|
-
return true;
|
|
3566
|
-
}
|
|
3567
|
-
});
|
|
3568
|
-
}
|
|
3569
|
-
function transformToRollupOutput(output, changed) {
|
|
3570
|
-
const { chunks, assets } = output;
|
|
3571
|
-
return { output: [...chunks.map((chunk) => transformToRollupOutputChunk(chunk, changed)), ...assets.map((asset) => transformToRollupOutputAsset(asset, changed))] };
|
|
3572
|
-
}
|
|
3573
|
-
function transformToOutputBundle(context, output, changed) {
|
|
3574
|
-
const bundle = Object.fromEntries(transformToRollupOutput(output, changed).output.map((item) => [item.fileName, item]));
|
|
3575
|
-
return new Proxy(bundle, {
|
|
3576
|
-
set(_target, _p, _newValue, _receiver) {
|
|
3577
|
-
const originalStackTraceLimit = Error.stackTraceLimit;
|
|
3578
|
-
Error.stackTraceLimit = 2;
|
|
3579
|
-
const message = "This plugin assigns to bundle variable. This is discouraged by Rollup and is not supported by Rolldown. This will be ignored. https://rollupjs.org/plugin-development/#generatebundle:~:text=DANGER,this.emitFile.";
|
|
3580
|
-
const stack = new Error(message).stack ?? message;
|
|
3581
|
-
Error.stackTraceLimit = originalStackTraceLimit;
|
|
3582
|
-
context.warn({
|
|
3583
|
-
message: stack,
|
|
3584
|
-
code: "UNSUPPORTED_BUNDLE_ASSIGNMENT"
|
|
3585
|
-
});
|
|
3586
|
-
return true;
|
|
3587
|
-
},
|
|
3588
|
-
deleteProperty(target, property) {
|
|
3589
|
-
if (typeof property === "string") changed.deleted.add(property);
|
|
3590
|
-
return true;
|
|
3591
|
-
}
|
|
3592
|
-
});
|
|
3593
|
-
}
|
|
3594
|
-
function collectChangedBundle(changed, bundle) {
|
|
3595
|
-
const changes = {};
|
|
3596
|
-
for (const key in bundle) {
|
|
3597
|
-
if (changed.deleted.has(key) || !changed.updated.has(key)) continue;
|
|
3598
|
-
const item = bundle[key];
|
|
3599
|
-
if (item.type === "asset") changes[key] = {
|
|
3600
|
-
filename: item.fileName,
|
|
3601
|
-
originalFileNames: item.originalFileNames,
|
|
3602
|
-
source: bindingAssetSource(item.source),
|
|
3603
|
-
names: item.names
|
|
3604
|
-
};
|
|
3605
|
-
else changes[key] = {
|
|
3606
|
-
code: item.code,
|
|
3607
|
-
filename: item.fileName,
|
|
3608
|
-
name: item.name,
|
|
3609
|
-
isEntry: item.isEntry,
|
|
3610
|
-
exports: item.exports,
|
|
3611
|
-
modules: {},
|
|
3612
|
-
imports: item.imports,
|
|
3613
|
-
dynamicImports: item.dynamicImports,
|
|
3614
|
-
facadeModuleId: item.facadeModuleId || void 0,
|
|
3615
|
-
isDynamicEntry: item.isDynamicEntry,
|
|
3616
|
-
moduleIds: item.moduleIds,
|
|
3617
|
-
map: bindingifySourcemap$1(item.map),
|
|
3618
|
-
sourcemapFilename: item.sourcemapFileName || void 0,
|
|
3619
|
-
preliminaryFilename: item.preliminaryFileName
|
|
3620
|
-
};
|
|
3621
|
-
}
|
|
3622
|
-
return {
|
|
3623
|
-
changes,
|
|
3624
|
-
deleted: changed.deleted
|
|
3625
|
-
};
|
|
3626
|
-
}
|
|
3627
|
-
|
|
3628
3611
|
//#endregion
|
|
3629
3612
|
//#region src/plugin/bindingify-output-hooks.ts
|
|
3630
3613
|
function bindingifyRenderStart(args$1) {
|
|
@@ -3664,7 +3647,7 @@ function bindingifyAugmentChunkHash(args$1) {
|
|
|
3664
3647
|
const { handler, meta } = normalizeHook(hook);
|
|
3665
3648
|
return {
|
|
3666
3649
|
plugin: async (ctx, chunk) => {
|
|
3667
|
-
return
|
|
3650
|
+
return handler.call(new PluginContextImpl(args$1.outputOptions, ctx, args$1.plugin, args$1.pluginContextData, args$1.onLog, args$1.logLevel, args$1.watchMode), transformRenderedChunk(chunk));
|
|
3668
3651
|
},
|
|
3669
3652
|
meta: bindingifyPluginHookMeta(meta)
|
|
3670
3653
|
};
|
|
@@ -3972,8 +3955,8 @@ function wrapHandlers(plugin) {
|
|
|
3972
3955
|
if (handler) plugin[hookName] = async (...args$1) => {
|
|
3973
3956
|
try {
|
|
3974
3957
|
return await handler(...args$1);
|
|
3975
|
-
} catch (e$
|
|
3976
|
-
return error(logPluginError(e$
|
|
3958
|
+
} catch (e$1) {
|
|
3959
|
+
return error(logPluginError(e$1, plugin.name, {
|
|
3977
3960
|
hook: hookName,
|
|
3978
3961
|
id: hookName === "transform" ? args$1[2] : void 0
|
|
3979
3962
|
}));
|
|
@@ -4244,6 +4227,49 @@ function isReadonlyArray(input) {
|
|
|
4244
4227
|
return Array.isArray(input);
|
|
4245
4228
|
}
|
|
4246
4229
|
|
|
4230
|
+
//#endregion
|
|
4231
|
+
//#region src/utils/normalize-transform-options.ts
|
|
4232
|
+
/**
|
|
4233
|
+
* Normalizes transform options by extracting `define`, `inject`, and `dropLabels` separately from OXC transform options.
|
|
4234
|
+
*
|
|
4235
|
+
* Prioritizes values from `transform.define`, `transform.inject`, and `transform.dropLabels` over deprecated top-level options.
|
|
4236
|
+
*/
|
|
4237
|
+
function normalizeTransformOptions(inputOptions, onLog) {
|
|
4238
|
+
const transform = inputOptions.transform;
|
|
4239
|
+
let define;
|
|
4240
|
+
if (transform?.define) define = Object.entries(transform.define);
|
|
4241
|
+
else if (inputOptions.define) {
|
|
4242
|
+
onLog(LOG_LEVEL_WARN, logDeprecatedDefine());
|
|
4243
|
+
define = Object.entries(inputOptions.define);
|
|
4244
|
+
}
|
|
4245
|
+
let inject;
|
|
4246
|
+
if (transform?.inject) inject = transform.inject;
|
|
4247
|
+
else if (inputOptions.inject) {
|
|
4248
|
+
onLog(LOG_LEVEL_WARN, logDeprecatedInject());
|
|
4249
|
+
inject = inputOptions.inject;
|
|
4250
|
+
}
|
|
4251
|
+
let dropLabels;
|
|
4252
|
+
if (transform?.dropLabels) dropLabels = transform.dropLabels;
|
|
4253
|
+
else if (inputOptions.dropLabels) {
|
|
4254
|
+
onLog(LOG_LEVEL_WARN, logDeprecatedDropLabels());
|
|
4255
|
+
dropLabels = inputOptions.dropLabels;
|
|
4256
|
+
}
|
|
4257
|
+
let oxcTransformOptions;
|
|
4258
|
+
if (transform) {
|
|
4259
|
+
const { define: _define, inject: _inject, dropLabels: _dropLabels,...rest } = transform;
|
|
4260
|
+
if (Object.keys(rest).length > 0) {
|
|
4261
|
+
if (rest.jsx === false) rest.jsx = "disable";
|
|
4262
|
+
oxcTransformOptions = rest;
|
|
4263
|
+
}
|
|
4264
|
+
}
|
|
4265
|
+
return {
|
|
4266
|
+
define,
|
|
4267
|
+
inject,
|
|
4268
|
+
dropLabels,
|
|
4269
|
+
oxcTransformOptions
|
|
4270
|
+
};
|
|
4271
|
+
}
|
|
4272
|
+
|
|
4247
4273
|
//#endregion
|
|
4248
4274
|
//#region src/utils/bindingify-input-options.ts
|
|
4249
4275
|
function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode) {
|
|
@@ -4253,7 +4279,19 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
4253
4279
|
if (plugin instanceof BuiltinPlugin) return bindingifyBuiltInPlugin(plugin);
|
|
4254
4280
|
return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode);
|
|
4255
4281
|
});
|
|
4256
|
-
const
|
|
4282
|
+
const normalizedTransform = normalizeTransformOptions(inputOptions, onLog);
|
|
4283
|
+
let profilerNames;
|
|
4284
|
+
if (outputOptions.generatedCode?.profilerNames !== void 0) profilerNames = outputOptions.generatedCode.profilerNames;
|
|
4285
|
+
else if (inputOptions.profilerNames !== void 0) {
|
|
4286
|
+
onLog(LOG_LEVEL_WARN, logDeprecatedProfilerNames());
|
|
4287
|
+
profilerNames = inputOptions.profilerNames;
|
|
4288
|
+
}
|
|
4289
|
+
let keepNames;
|
|
4290
|
+
if (outputOptions.keepNames !== void 0) keepNames = outputOptions.keepNames;
|
|
4291
|
+
else if (inputOptions.keepNames !== void 0) {
|
|
4292
|
+
onLog(LOG_LEVEL_WARN, logDeprecatedKeepNames());
|
|
4293
|
+
keepNames = inputOptions.keepNames;
|
|
4294
|
+
}
|
|
4257
4295
|
return {
|
|
4258
4296
|
input: bindingifyInput(inputOptions.input),
|
|
4259
4297
|
plugins,
|
|
@@ -4266,15 +4304,14 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
4266
4304
|
onLog: async (level, log) => onLog(level, log),
|
|
4267
4305
|
treeshake: bindingifyTreeshakeOptions(inputOptions.treeshake),
|
|
4268
4306
|
moduleTypes: inputOptions.moduleTypes,
|
|
4269
|
-
define:
|
|
4270
|
-
inject: bindingifyInject(
|
|
4307
|
+
define: normalizedTransform.define,
|
|
4308
|
+
inject: bindingifyInject(normalizedTransform.inject),
|
|
4271
4309
|
experimental: bindingifyExperimental(inputOptions.experimental),
|
|
4272
|
-
profilerNames
|
|
4273
|
-
|
|
4274
|
-
transform,
|
|
4310
|
+
profilerNames,
|
|
4311
|
+
transform: normalizedTransform.oxcTransformOptions,
|
|
4275
4312
|
watch: bindingifyWatch(inputOptions.watch),
|
|
4276
|
-
dropLabels:
|
|
4277
|
-
keepNames
|
|
4313
|
+
dropLabels: normalizedTransform.dropLabels,
|
|
4314
|
+
keepNames,
|
|
4278
4315
|
checks: inputOptions.checks,
|
|
4279
4316
|
deferSyncScanData: () => {
|
|
4280
4317
|
let ret = [];
|
|
@@ -4403,46 +4440,6 @@ function bindingifyInput(input) {
|
|
|
4403
4440
|
};
|
|
4404
4441
|
});
|
|
4405
4442
|
}
|
|
4406
|
-
function bindingifyJsx(onLog, input, transform) {
|
|
4407
|
-
if (transform?.jsx) {
|
|
4408
|
-
if (input !== void 0) onLog(LOG_LEVEL_WARN, logDuplicateJsxConfig());
|
|
4409
|
-
return { transform };
|
|
4410
|
-
}
|
|
4411
|
-
if (typeof input === "object") {
|
|
4412
|
-
if (input.mode === "preserve") return {
|
|
4413
|
-
jsx: BindingJsx.Preserve,
|
|
4414
|
-
transform
|
|
4415
|
-
};
|
|
4416
|
-
const mode = input.mode ?? "automatic";
|
|
4417
|
-
transform ??= {};
|
|
4418
|
-
transform.jsx = {
|
|
4419
|
-
runtime: mode,
|
|
4420
|
-
pragma: input.factory,
|
|
4421
|
-
pragmaFrag: input.fragment,
|
|
4422
|
-
importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource : void 0
|
|
4423
|
-
};
|
|
4424
|
-
return { transform };
|
|
4425
|
-
}
|
|
4426
|
-
let jsx;
|
|
4427
|
-
switch (input) {
|
|
4428
|
-
case false:
|
|
4429
|
-
jsx = BindingJsx.Disable;
|
|
4430
|
-
break;
|
|
4431
|
-
case "react":
|
|
4432
|
-
jsx = BindingJsx.React;
|
|
4433
|
-
break;
|
|
4434
|
-
case "react-jsx":
|
|
4435
|
-
jsx = BindingJsx.ReactJsx;
|
|
4436
|
-
break;
|
|
4437
|
-
case "preserve":
|
|
4438
|
-
jsx = BindingJsx.Preserve;
|
|
4439
|
-
break;
|
|
4440
|
-
}
|
|
4441
|
-
return {
|
|
4442
|
-
jsx,
|
|
4443
|
-
transform
|
|
4444
|
-
};
|
|
4445
|
-
}
|
|
4446
4443
|
function bindingifyWatch(watch$1) {
|
|
4447
4444
|
if (watch$1) return {
|
|
4448
4445
|
buildDelay: watch$1.buildDelay,
|
|
@@ -4529,7 +4526,7 @@ var ChunkingContextImpl = class {
|
|
|
4529
4526
|
//#endregion
|
|
4530
4527
|
//#region src/utils/bindingify-output-options.ts
|
|
4531
4528
|
function bindingifyOutputOptions(outputOptions) {
|
|
4532
|
-
const { dir, format: format$1, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar } = outputOptions;
|
|
4529
|
+
const { dir, format: format$1, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir } = outputOptions;
|
|
4533
4530
|
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
4534
4531
|
return {
|
|
4535
4532
|
dir,
|
|
@@ -4569,7 +4566,8 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
4569
4566
|
legalComments,
|
|
4570
4567
|
preserveModulesRoot,
|
|
4571
4568
|
topLevelVar,
|
|
4572
|
-
minifyInternalExports: outputOptions.minifyInternalExports
|
|
4569
|
+
minifyInternalExports: outputOptions.minifyInternalExports,
|
|
4570
|
+
cleanDir
|
|
4573
4571
|
};
|
|
4574
4572
|
}
|
|
4575
4573
|
function bindingifyAddon(configAddon) {
|
|
@@ -4655,9 +4653,9 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
|
4655
4653
|
onLog,
|
|
4656
4654
|
stopWorkers: parallelPluginInitResult?.stopWorkers
|
|
4657
4655
|
};
|
|
4658
|
-
} catch (e$
|
|
4656
|
+
} catch (e$1) {
|
|
4659
4657
|
await parallelPluginInitResult?.stopWorkers();
|
|
4660
|
-
throw e$
|
|
4658
|
+
throw e$1;
|
|
4661
4659
|
}
|
|
4662
4660
|
}
|
|
4663
4661
|
|
|
@@ -4689,9 +4687,9 @@ var RolldownBuild = class RolldownBuild {
|
|
|
4689
4687
|
RolldownBuild.asyncRuntimeShutdown = true;
|
|
4690
4688
|
}
|
|
4691
4689
|
};
|
|
4692
|
-
} catch (e$
|
|
4690
|
+
} catch (e$1) {
|
|
4693
4691
|
await option.stopWorkers?.();
|
|
4694
|
-
throw e$
|
|
4692
|
+
throw e$1;
|
|
4695
4693
|
}
|
|
4696
4694
|
}
|
|
4697
4695
|
async scan() {
|
|
@@ -4701,12 +4699,12 @@ var RolldownBuild = class RolldownBuild {
|
|
|
4701
4699
|
async generate(outputOptions = {}) {
|
|
4702
4700
|
validateOption("output", outputOptions);
|
|
4703
4701
|
const { impl } = await this.#getBundlerWithStopWorker(outputOptions);
|
|
4704
|
-
return
|
|
4702
|
+
return new RolldownOutputImpl(unwrapBindingResult(await impl.generate()));
|
|
4705
4703
|
}
|
|
4706
4704
|
async write(outputOptions = {}) {
|
|
4707
4705
|
validateOption("output", outputOptions);
|
|
4708
4706
|
const { impl } = await this.#getBundlerWithStopWorker(outputOptions);
|
|
4709
|
-
return
|
|
4707
|
+
return new RolldownOutputImpl(unwrapBindingResult(await impl.write()));
|
|
4710
4708
|
}
|
|
4711
4709
|
async close() {
|
|
4712
4710
|
if (this.#bundlerImpl) {
|
|
@@ -4887,4 +4885,4 @@ function defineConfig(config) {
|
|
|
4887
4885
|
const VERSION = version;
|
|
4888
4886
|
|
|
4889
4887
|
//#endregion
|
|
4890
|
-
export {
|
|
4888
|
+
export { build as a, createBundlerOptions as c, transformToRollupOutput as d, bindingifySourcemap$1 as f, makeBuiltinPluginCallable as h, watch as i, normalizedStringOrRegex as l, BuiltinPlugin as m, VERSION as n, rolldown as o, PluginDriver as p, defineConfig as r, RolldownBuild as s, BindingMagicString$1 as t, normalizeBindingResult as u };
|