@rollipop/rolldown 1.0.0-rc.3 → 1.0.0-rc.4
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/bin/cli.mjs +0 -1
- package/dist/cli.mjs +11 -22
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +10 -11
- package/dist/experimental-index.d.mts +20 -6
- package/dist/experimental-index.mjs +24 -22
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +2 -8
- package/dist/get-log-filter.mjs +1 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +10 -13
- package/dist/parallel-plugin-worker.mjs +7 -9
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parallel-plugin.mjs +1 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +4 -6
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +4 -6
- package/dist/shared/{binding-C4ZlFAt6.d.mts → binding-BohGL_65.d.mts} +10 -5
- package/dist/shared/{binding-D25Pz9Tj.mjs → binding-BuW0Fhs2.mjs} +33 -42
- package/dist/shared/{bindingify-input-options-D6jfpJ6l.mjs → bindingify-input-options-o_7NioSs.mjs} +34 -57
- package/dist/shared/{constructors-C-tyKVjw.d.mts → constructors-Dg8A45sy.d.mts} +2 -2
- package/dist/shared/{constructors-BAGdj697.mjs → constructors-FqGyV5fj.mjs} +2 -4
- package/dist/shared/{define-config-BKLqq_zt.d.mts → define-config-BvszQ-i2.d.mts} +66 -30
- package/dist/shared/{define-config-BMj_QknW.mjs → define-config-DJOr6Iwt.mjs} +1 -2
- package/dist/shared/{error-BoaGIj5N.mjs → error-BjNWBTlf.mjs} +3 -8
- package/dist/shared/{load-config-CV5K8wKJ.mjs → load-config-2dmAH96P.mjs} +2 -4
- package/dist/shared/{logs-CCc_0vhs.mjs → logs-D80CXhvg.mjs} +5 -8
- package/dist/shared/{misc-Xty885dB.mjs → misc-DJYbNKZX.mjs} +1 -2
- package/dist/shared/{normalize-string-or-regex-tBSnk6HY.mjs → normalize-string-or-regex-BU5HSJy4.mjs} +3 -6
- package/dist/shared/{parse-DWZRPGsB.mjs → parse-Bt4kI3ey.mjs} +2 -5
- package/dist/shared/{prompt-B56gTa4S.mjs → prompt-BYQIwEjg.mjs} +1 -3
- package/dist/shared/{rolldown-CZ1SIh-x.mjs → rolldown-B4lV-glW.mjs} +2 -4
- package/dist/shared/{rolldown-build-BYA-VVk0.mjs → rolldown-build-tLuGZc7p.mjs} +424 -473
- package/dist/shared/{transform-DoG7c5_r.d.mts → transform-BoJxrM-e.d.mts} +1 -1
- package/dist/shared/{transform-CIcvJTbn.mjs → transform-Cbhgjik0.mjs} +3 -6
- package/dist/shared/{watch-DV7vV2OV.mjs → watch-hs9ntURJ.mjs} +71 -77
- package/dist/utils-index.d.mts +2 -2
- package/dist/utils-index.mjs +9 -18
- package/package.json +12 -12
- package/dist/cli-setup.d.mts +0 -1
- package/dist/cli-setup.mjs +0 -17
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./binding-
|
|
2
|
-
import { i as logInputHookInOutputPlugin, n as error } from "./logs-
|
|
3
|
-
import { n as BuiltinPlugin } from "./normalize-string-or-regex-
|
|
4
|
-
import { _ as LOG_LEVEL_WARN, a as transformToRollupOutput, b as VERSION, c as transformAssetSource, d as MinimalPluginContextImpl, f as normalizeHook,
|
|
5
|
-
import { i as unimplemented } from "./misc-
|
|
6
|
-
import { i as unwrapBindingResult } from "./error-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-BuW0Fhs2.mjs";
|
|
2
|
+
import { i as logInputHookInOutputPlugin, n as error } from "./logs-D80CXhvg.mjs";
|
|
3
|
+
import { n as BuiltinPlugin } from "./normalize-string-or-regex-BU5HSJy4.mjs";
|
|
4
|
+
import { _ as LOG_LEVEL_WARN, a as transformToRollupOutput, b as VERSION, c as transformAssetSource, d as MinimalPluginContextImpl, f as normalizeHook, i as transformModuleInfo, l as lazyProp, m as LOG_LEVEL_DEBUG, o as transformRenderedChunk, p as normalizeLog, s as __decorate, t as bindingifyInputOptions, u as PlainObjectLike, v as logLevelPriority } from "./bindingify-input-options-o_7NioSs.mjs";
|
|
5
|
+
import { i as unimplemented } from "./misc-DJYbNKZX.mjs";
|
|
6
|
+
import { i as unwrapBindingResult } from "./error-BjNWBTlf.mjs";
|
|
7
7
|
import { Worker } from "node:worker_threads";
|
|
8
8
|
import path, { sep } from "node:path";
|
|
9
9
|
import { formatWithOptions, styleText } from "node:util";
|
|
10
10
|
import process$1 from "node:process";
|
|
11
11
|
import * as tty from "node:tty";
|
|
12
12
|
import os from "node:os";
|
|
13
|
-
|
|
14
13
|
//#region src/log/logger.ts
|
|
15
14
|
function getLogger(plugins, onLog, logLevel, watchMode) {
|
|
16
15
|
const minimalPriority = logLevelPriority[logLevel];
|
|
@@ -25,15 +24,15 @@ function getLogger(plugins, onLog, logLevel, watchMode) {
|
|
|
25
24
|
return (log) => logger(level, normalizeLog(log), new Set(skipped).add(plugin));
|
|
26
25
|
};
|
|
27
26
|
if (("handler" in pluginOnLog ? pluginOnLog.handler : pluginOnLog).call({
|
|
28
|
-
debug: getLogHandler(
|
|
27
|
+
debug: getLogHandler("debug"),
|
|
29
28
|
error: (log) => error(normalizeLog(log)),
|
|
30
|
-
info: getLogHandler(
|
|
29
|
+
info: getLogHandler("info"),
|
|
31
30
|
meta: {
|
|
32
31
|
rollupVersion: "4.23.0",
|
|
33
32
|
rolldownVersion: VERSION,
|
|
34
33
|
watchMode
|
|
35
34
|
},
|
|
36
|
-
warn: getLogHandler(
|
|
35
|
+
warn: getLogHandler("warn"),
|
|
37
36
|
pluginName: plugin.name || "unknown"
|
|
38
37
|
}, level, log) === false) return;
|
|
39
38
|
}
|
|
@@ -48,14 +47,14 @@ const getOnLog = (config, logLevel, printLog = defaultPrintLog) => {
|
|
|
48
47
|
if (onLog) {
|
|
49
48
|
const minimalPriority = logLevelPriority[logLevel];
|
|
50
49
|
return (level, log) => onLog(level, addLogToString(log), (level, handledLog) => {
|
|
51
|
-
if (level ===
|
|
50
|
+
if (level === "error") return error(normalizeLog(handledLog));
|
|
52
51
|
if (logLevelPriority[level] >= minimalPriority) defaultOnLog(level, normalizeLog(handledLog));
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
54
|
return defaultOnLog;
|
|
56
55
|
};
|
|
57
56
|
const getDefaultOnLog = (printLog, onwarn) => onwarn ? (level, log) => {
|
|
58
|
-
if (level ===
|
|
57
|
+
if (level === "warn") onwarn(addLogToString(log), (warning) => printLog(LOG_LEVEL_WARN, normalizeLog(warning)));
|
|
59
58
|
else printLog(level, log);
|
|
60
59
|
} : printLog;
|
|
61
60
|
const addLogToString = (log) => {
|
|
@@ -83,7 +82,6 @@ function relativeId(id) {
|
|
|
83
82
|
if (!path.isAbsolute(id)) return id;
|
|
84
83
|
return path.relative(path.resolve(), id);
|
|
85
84
|
}
|
|
86
|
-
|
|
87
85
|
//#endregion
|
|
88
86
|
//#region src/constants/plugin.ts
|
|
89
87
|
const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES = [
|
|
@@ -117,42 +115,7 @@ const ENUMERATED_PLUGIN_HOOK_NAMES = [
|
|
|
117
115
|
"intro",
|
|
118
116
|
"outro"
|
|
119
117
|
];
|
|
120
|
-
|
|
121
|
-
* Names of all defined hooks. It's like
|
|
122
|
-
* ```js
|
|
123
|
-
* const DEFINED_HOOK_NAMES ={
|
|
124
|
-
* options: 'options',
|
|
125
|
-
* buildStart: 'buildStart',
|
|
126
|
-
* ...
|
|
127
|
-
* }
|
|
128
|
-
* ```
|
|
129
|
-
*/
|
|
130
|
-
const DEFINED_HOOK_NAMES = {
|
|
131
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[0]]: ENUMERATED_PLUGIN_HOOK_NAMES[0],
|
|
132
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[1]]: ENUMERATED_PLUGIN_HOOK_NAMES[1],
|
|
133
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[2]]: ENUMERATED_PLUGIN_HOOK_NAMES[2],
|
|
134
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[3]]: ENUMERATED_PLUGIN_HOOK_NAMES[3],
|
|
135
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[4]]: ENUMERATED_PLUGIN_HOOK_NAMES[4],
|
|
136
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[5]]: ENUMERATED_PLUGIN_HOOK_NAMES[5],
|
|
137
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[6]]: ENUMERATED_PLUGIN_HOOK_NAMES[6],
|
|
138
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[7]]: ENUMERATED_PLUGIN_HOOK_NAMES[7],
|
|
139
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[8]]: ENUMERATED_PLUGIN_HOOK_NAMES[8],
|
|
140
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[9]]: ENUMERATED_PLUGIN_HOOK_NAMES[9],
|
|
141
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[10]]: ENUMERATED_PLUGIN_HOOK_NAMES[10],
|
|
142
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[11]]: ENUMERATED_PLUGIN_HOOK_NAMES[11],
|
|
143
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[12]]: ENUMERATED_PLUGIN_HOOK_NAMES[12],
|
|
144
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[13]]: ENUMERATED_PLUGIN_HOOK_NAMES[13],
|
|
145
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[14]]: ENUMERATED_PLUGIN_HOOK_NAMES[14],
|
|
146
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[15]]: ENUMERATED_PLUGIN_HOOK_NAMES[15],
|
|
147
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[16]]: ENUMERATED_PLUGIN_HOOK_NAMES[16],
|
|
148
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[17]]: ENUMERATED_PLUGIN_HOOK_NAMES[17],
|
|
149
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[18]]: ENUMERATED_PLUGIN_HOOK_NAMES[18],
|
|
150
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[19]]: ENUMERATED_PLUGIN_HOOK_NAMES[19],
|
|
151
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[20]]: ENUMERATED_PLUGIN_HOOK_NAMES[20],
|
|
152
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[21]]: ENUMERATED_PLUGIN_HOOK_NAMES[21],
|
|
153
|
-
[ENUMERATED_PLUGIN_HOOK_NAMES[22]]: ENUMERATED_PLUGIN_HOOK_NAMES[22]
|
|
154
|
-
};
|
|
155
|
-
|
|
118
|
+
ENUMERATED_PLUGIN_HOOK_NAMES[0], ENUMERATED_PLUGIN_HOOK_NAMES[0], ENUMERATED_PLUGIN_HOOK_NAMES[1], ENUMERATED_PLUGIN_HOOK_NAMES[1], ENUMERATED_PLUGIN_HOOK_NAMES[2], ENUMERATED_PLUGIN_HOOK_NAMES[2], ENUMERATED_PLUGIN_HOOK_NAMES[3], ENUMERATED_PLUGIN_HOOK_NAMES[3], ENUMERATED_PLUGIN_HOOK_NAMES[4], ENUMERATED_PLUGIN_HOOK_NAMES[4], ENUMERATED_PLUGIN_HOOK_NAMES[5], ENUMERATED_PLUGIN_HOOK_NAMES[5], ENUMERATED_PLUGIN_HOOK_NAMES[6], ENUMERATED_PLUGIN_HOOK_NAMES[6], ENUMERATED_PLUGIN_HOOK_NAMES[7], ENUMERATED_PLUGIN_HOOK_NAMES[7], ENUMERATED_PLUGIN_HOOK_NAMES[8], ENUMERATED_PLUGIN_HOOK_NAMES[8], ENUMERATED_PLUGIN_HOOK_NAMES[9], ENUMERATED_PLUGIN_HOOK_NAMES[9], ENUMERATED_PLUGIN_HOOK_NAMES[10], ENUMERATED_PLUGIN_HOOK_NAMES[10], ENUMERATED_PLUGIN_HOOK_NAMES[11], ENUMERATED_PLUGIN_HOOK_NAMES[11], ENUMERATED_PLUGIN_HOOK_NAMES[12], ENUMERATED_PLUGIN_HOOK_NAMES[12], ENUMERATED_PLUGIN_HOOK_NAMES[13], ENUMERATED_PLUGIN_HOOK_NAMES[13], ENUMERATED_PLUGIN_HOOK_NAMES[14], ENUMERATED_PLUGIN_HOOK_NAMES[14], ENUMERATED_PLUGIN_HOOK_NAMES[15], ENUMERATED_PLUGIN_HOOK_NAMES[15], ENUMERATED_PLUGIN_HOOK_NAMES[16], ENUMERATED_PLUGIN_HOOK_NAMES[16], ENUMERATED_PLUGIN_HOOK_NAMES[17], ENUMERATED_PLUGIN_HOOK_NAMES[17], ENUMERATED_PLUGIN_HOOK_NAMES[18], ENUMERATED_PLUGIN_HOOK_NAMES[18], ENUMERATED_PLUGIN_HOOK_NAMES[19], ENUMERATED_PLUGIN_HOOK_NAMES[19], ENUMERATED_PLUGIN_HOOK_NAMES[20], ENUMERATED_PLUGIN_HOOK_NAMES[20], ENUMERATED_PLUGIN_HOOK_NAMES[21], ENUMERATED_PLUGIN_HOOK_NAMES[21], ENUMERATED_PLUGIN_HOOK_NAMES[22], ENUMERATED_PLUGIN_HOOK_NAMES[22];
|
|
156
119
|
//#endregion
|
|
157
120
|
//#region src/utils/async-flatten.ts
|
|
158
121
|
async function asyncFlatten(array) {
|
|
@@ -161,7 +124,6 @@ async function asyncFlatten(array) {
|
|
|
161
124
|
while (array.some((v) => v?.then));
|
|
162
125
|
return array;
|
|
163
126
|
}
|
|
164
|
-
|
|
165
127
|
//#endregion
|
|
166
128
|
//#region src/utils/normalize-plugin-option.ts
|
|
167
129
|
const normalizePluginOption = async (plugins) => (await asyncFlatten([plugins])).filter(Boolean);
|
|
@@ -182,12 +144,11 @@ function normalizePlugins(plugins, anonymousPrefix) {
|
|
|
182
144
|
}
|
|
183
145
|
const ANONYMOUS_PLUGIN_PREFIX = "at position ";
|
|
184
146
|
const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = "at output position ";
|
|
185
|
-
|
|
186
147
|
//#endregion
|
|
187
148
|
//#region src/plugin/plugin-driver.ts
|
|
188
149
|
var PluginDriver = class {
|
|
189
150
|
static async callOptionsHook(inputOptions, watchMode = false) {
|
|
190
|
-
const logLevel = inputOptions.logLevel ||
|
|
151
|
+
const logLevel = inputOptions.logLevel || "info";
|
|
191
152
|
const plugins = getSortedPlugins("options", getObjectPlugins(await normalizePluginOption(inputOptions.plugins)));
|
|
192
153
|
const logger = getLogger(plugins, getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
193
154
|
for (const plugin of plugins) {
|
|
@@ -249,7 +210,6 @@ function getSortedPlugins(hookName, plugins) {
|
|
|
249
210
|
...post
|
|
250
211
|
];
|
|
251
212
|
}
|
|
252
|
-
|
|
253
213
|
//#endregion
|
|
254
214
|
//#region ../../node_modules/.pnpm/valibot@1.2.0_typescript@5.9.3/node_modules/valibot/dist/index.mjs
|
|
255
215
|
let store$4;
|
|
@@ -1360,7 +1320,6 @@ function safeParse(schema, input, config$1) {
|
|
|
1360
1320
|
issues: dataset.issues
|
|
1361
1321
|
};
|
|
1362
1322
|
}
|
|
1363
|
-
|
|
1364
1323
|
//#endregion
|
|
1365
1324
|
//#region src/utils/flatten-valibot-schema.ts
|
|
1366
1325
|
function unwrapSchema(schema) {
|
|
@@ -1425,7 +1384,6 @@ function flattenValibotSchema(schema, result = {}, prefix = "") {
|
|
|
1425
1384
|
}
|
|
1426
1385
|
return result;
|
|
1427
1386
|
}
|
|
1428
|
-
|
|
1429
1387
|
//#endregion
|
|
1430
1388
|
//#region src/utils/style-text.ts
|
|
1431
1389
|
/**
|
|
@@ -1436,330 +1394,331 @@ function flattenValibotSchema(schema, result = {}, prefix = "") {
|
|
|
1436
1394
|
function styleText$1(...args) {
|
|
1437
1395
|
return styleText(...args);
|
|
1438
1396
|
}
|
|
1439
|
-
|
|
1440
1397
|
//#endregion
|
|
1441
1398
|
//#region src/utils/validator.ts
|
|
1442
1399
|
function isTypeTrue() {}
|
|
1443
|
-
const StringOrRegExpSchema = union([string(), instance(RegExp)]);
|
|
1400
|
+
const StringOrRegExpSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ instance(RegExp)]);
|
|
1444
1401
|
isTypeTrue();
|
|
1445
1402
|
function vFunction() {
|
|
1446
|
-
return function_();
|
|
1403
|
+
return /* @__PURE__ */ function_();
|
|
1447
1404
|
}
|
|
1448
|
-
const LogLevelSchema = union([
|
|
1449
|
-
literal("debug"),
|
|
1450
|
-
literal("info"),
|
|
1451
|
-
literal("warn")
|
|
1405
|
+
const LogLevelSchema = /* @__PURE__ */ union([
|
|
1406
|
+
/* @__PURE__ */ literal("debug"),
|
|
1407
|
+
/* @__PURE__ */ literal("info"),
|
|
1408
|
+
/* @__PURE__ */ literal("warn")
|
|
1452
1409
|
]);
|
|
1453
1410
|
isTypeTrue();
|
|
1454
|
-
const LogLevelOptionSchema = union([LogLevelSchema, literal("silent")]);
|
|
1411
|
+
const LogLevelOptionSchema = /* @__PURE__ */ union([LogLevelSchema, /* @__PURE__ */ literal("silent")]);
|
|
1455
1412
|
isTypeTrue();
|
|
1456
|
-
const LogLevelWithErrorSchema = union([LogLevelSchema, literal("error")]);
|
|
1413
|
+
const LogLevelWithErrorSchema = /* @__PURE__ */ union([LogLevelSchema, /* @__PURE__ */ literal("error")]);
|
|
1457
1414
|
isTypeTrue();
|
|
1458
|
-
const RollupLogSchema = any();
|
|
1459
|
-
const RollupLogWithStringSchema = union([RollupLogSchema, string()]);
|
|
1415
|
+
const RollupLogSchema = /* @__PURE__ */ any();
|
|
1416
|
+
const RollupLogWithStringSchema = /* @__PURE__ */ union([RollupLogSchema, /* @__PURE__ */ string()]);
|
|
1460
1417
|
isTypeTrue();
|
|
1461
|
-
const InputOptionSchema = union([
|
|
1462
|
-
string(),
|
|
1463
|
-
array(string()),
|
|
1464
|
-
record(string(), string())
|
|
1418
|
+
const InputOptionSchema = /* @__PURE__ */ union([
|
|
1419
|
+
/* @__PURE__ */ string(),
|
|
1420
|
+
/* @__PURE__ */ array(/* @__PURE__ */ string()),
|
|
1421
|
+
/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())
|
|
1465
1422
|
]);
|
|
1466
1423
|
isTypeTrue();
|
|
1467
|
-
const ExternalOptionFunctionSchema = pipe(vFunction(), args(tuple([
|
|
1468
|
-
string(),
|
|
1469
|
-
optional(string()),
|
|
1470
|
-
boolean()
|
|
1471
|
-
])), returns(nullish(boolean())));
|
|
1424
|
+
const ExternalOptionFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([
|
|
1425
|
+
/* @__PURE__ */ string(),
|
|
1426
|
+
/* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1427
|
+
/* @__PURE__ */ boolean()
|
|
1428
|
+
])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ boolean())));
|
|
1472
1429
|
isTypeTrue();
|
|
1473
|
-
const ExternalOptionSchema = union([
|
|
1430
|
+
const ExternalOptionSchema = /* @__PURE__ */ union([
|
|
1474
1431
|
StringOrRegExpSchema,
|
|
1475
|
-
array(StringOrRegExpSchema),
|
|
1432
|
+
/* @__PURE__ */ array(StringOrRegExpSchema),
|
|
1476
1433
|
ExternalOptionFunctionSchema
|
|
1477
1434
|
]);
|
|
1478
1435
|
isTypeTrue();
|
|
1479
|
-
const ModuleTypesSchema = record(string(), union([
|
|
1480
|
-
literal("asset"),
|
|
1481
|
-
literal("base64"),
|
|
1482
|
-
literal("binary"),
|
|
1483
|
-
literal("copy"),
|
|
1484
|
-
literal("css"),
|
|
1485
|
-
literal("dataurl"),
|
|
1486
|
-
literal("empty"),
|
|
1487
|
-
literal("js"),
|
|
1488
|
-
literal("json"),
|
|
1489
|
-
literal("jsx"),
|
|
1490
|
-
literal("text"),
|
|
1491
|
-
literal("ts"),
|
|
1492
|
-
literal("tsx")
|
|
1436
|
+
const ModuleTypesSchema = /* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([
|
|
1437
|
+
/* @__PURE__ */ literal("asset"),
|
|
1438
|
+
/* @__PURE__ */ literal("base64"),
|
|
1439
|
+
/* @__PURE__ */ literal("binary"),
|
|
1440
|
+
/* @__PURE__ */ literal("copy"),
|
|
1441
|
+
/* @__PURE__ */ literal("css"),
|
|
1442
|
+
/* @__PURE__ */ literal("dataurl"),
|
|
1443
|
+
/* @__PURE__ */ literal("empty"),
|
|
1444
|
+
/* @__PURE__ */ literal("js"),
|
|
1445
|
+
/* @__PURE__ */ literal("json"),
|
|
1446
|
+
/* @__PURE__ */ literal("jsx"),
|
|
1447
|
+
/* @__PURE__ */ literal("text"),
|
|
1448
|
+
/* @__PURE__ */ literal("ts"),
|
|
1449
|
+
/* @__PURE__ */ literal("tsx")
|
|
1493
1450
|
]));
|
|
1494
1451
|
isTypeTrue();
|
|
1495
|
-
const JsxOptionsSchema = strictObject({
|
|
1496
|
-
runtime: pipe(optional(union([literal("classic"), literal("automatic")])), description("Which runtime to use")),
|
|
1497
|
-
development: pipe(optional(boolean()), description("Development specific information")),
|
|
1498
|
-
throwIfNamespace: pipe(optional(boolean()), description("Toggles whether to throw an error when a tag name uses an XML namespace")),
|
|
1499
|
-
pure: pipe(optional(boolean()), description("Mark JSX elements and top-level React method calls as pure for tree shaking.")),
|
|
1500
|
-
importSource: pipe(optional(string()), description("Import the factory of element and fragment if mode is classic")),
|
|
1501
|
-
pragma: pipe(optional(string()), description("Jsx element transformation")),
|
|
1502
|
-
pragmaFrag: pipe(optional(string()), description("Jsx fragment transformation")),
|
|
1503
|
-
refresh: pipe(optional(union([boolean(), any()])), description("Enable react fast refresh"))
|
|
1452
|
+
const JsxOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1453
|
+
runtime: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("classic"), /* @__PURE__ */ literal("automatic")])), /* @__PURE__ */ description("Which runtime to use")),
|
|
1454
|
+
development: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Development specific information")),
|
|
1455
|
+
throwIfNamespace: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Toggles whether to throw an error when a tag name uses an XML namespace")),
|
|
1456
|
+
pure: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Mark JSX elements and top-level React method calls as pure for tree shaking.")),
|
|
1457
|
+
importSource: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Import the factory of element and fragment if mode is classic")),
|
|
1458
|
+
pragma: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Jsx element transformation")),
|
|
1459
|
+
pragmaFrag: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Jsx fragment transformation")),
|
|
1460
|
+
refresh: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ any()])), /* @__PURE__ */ description("Enable react fast refresh"))
|
|
1504
1461
|
});
|
|
1505
1462
|
isTypeTrue();
|
|
1506
|
-
const HelperModeSchema = union([literal("Runtime"), literal("External")]);
|
|
1507
|
-
const DecoratorOptionSchema = object({
|
|
1508
|
-
legacy: optional(boolean()),
|
|
1509
|
-
emitDecoratorMetadata: optional(boolean())
|
|
1463
|
+
const HelperModeSchema = /* @__PURE__ */ union([/* @__PURE__ */ literal("Runtime"), /* @__PURE__ */ literal("External")]);
|
|
1464
|
+
const DecoratorOptionSchema = /* @__PURE__ */ object({
|
|
1465
|
+
legacy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1466
|
+
emitDecoratorMetadata: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1510
1467
|
});
|
|
1511
1468
|
isTypeTrue();
|
|
1512
|
-
const HelpersSchema = object({ mode: optional(HelperModeSchema) });
|
|
1469
|
+
const HelpersSchema = /* @__PURE__ */ object({ mode: /* @__PURE__ */ optional(HelperModeSchema) });
|
|
1513
1470
|
isTypeTrue();
|
|
1514
|
-
const
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
boolean()
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
allowDeclareFields: optional(boolean()),
|
|
1525
|
-
removeClassFieldsWithoutInitializer: optional(boolean()),
|
|
1526
|
-
declaration: optional(object({
|
|
1527
|
-
stripInternal: optional(boolean()),
|
|
1528
|
-
sourcemap: optional(boolean())
|
|
1471
|
+
const TypescriptSchema = /* @__PURE__ */ object({
|
|
1472
|
+
jsxPragma: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1473
|
+
jsxPragmaFrag: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1474
|
+
onlyRemoveTypeImports: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1475
|
+
allowNamespaces: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1476
|
+
allowDeclareFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1477
|
+
removeClassFieldsWithoutInitializer: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1478
|
+
declaration: /* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
1479
|
+
stripInternal: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1480
|
+
sourcemap: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1529
1481
|
})),
|
|
1530
|
-
rewriteImportExtensions: optional(
|
|
1482
|
+
rewriteImportExtensions: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1483
|
+
/* @__PURE__ */ literal("rewrite"),
|
|
1484
|
+
/* @__PURE__ */ literal("remove"),
|
|
1485
|
+
/* @__PURE__ */ boolean()
|
|
1486
|
+
]))
|
|
1531
1487
|
});
|
|
1532
1488
|
isTypeTrue();
|
|
1533
|
-
const AssumptionsSchema = object({
|
|
1534
|
-
ignoreFunctionLength: optional(boolean()),
|
|
1535
|
-
noDocumentAll: optional(boolean()),
|
|
1536
|
-
objectRestNoSymbols: optional(boolean()),
|
|
1537
|
-
pureGetters: optional(boolean()),
|
|
1538
|
-
setPublicClassFields: optional(boolean())
|
|
1489
|
+
const AssumptionsSchema = /* @__PURE__ */ object({
|
|
1490
|
+
ignoreFunctionLength: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1491
|
+
noDocumentAll: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1492
|
+
objectRestNoSymbols: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1493
|
+
pureGetters: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1494
|
+
setPublicClassFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1539
1495
|
});
|
|
1540
1496
|
isTypeTrue();
|
|
1541
|
-
const TransformPluginsSchema = object({
|
|
1542
|
-
styledComponents: optional(any()),
|
|
1543
|
-
taggedTemplateEscape: optional(boolean())
|
|
1497
|
+
const TransformPluginsSchema = /* @__PURE__ */ object({
|
|
1498
|
+
styledComponents: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
|
|
1499
|
+
taggedTemplateEscape: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1544
1500
|
});
|
|
1545
1501
|
isTypeTrue();
|
|
1546
|
-
const TransformOptionsSchema = object({
|
|
1547
|
-
assumptions: optional(AssumptionsSchema),
|
|
1548
|
-
typescript: optional(TypescriptSchema),
|
|
1549
|
-
helpers: optional(HelpersSchema),
|
|
1550
|
-
decorator: optional(DecoratorOptionSchema),
|
|
1551
|
-
jsx: optional(union([
|
|
1552
|
-
literal(false),
|
|
1553
|
-
literal("preserve"),
|
|
1554
|
-
literal("react"),
|
|
1555
|
-
literal("react-jsx"),
|
|
1502
|
+
const TransformOptionsSchema = /* @__PURE__ */ object({
|
|
1503
|
+
assumptions: /* @__PURE__ */ optional(AssumptionsSchema),
|
|
1504
|
+
typescript: /* @__PURE__ */ optional(TypescriptSchema),
|
|
1505
|
+
helpers: /* @__PURE__ */ optional(HelpersSchema),
|
|
1506
|
+
decorator: /* @__PURE__ */ optional(DecoratorOptionSchema),
|
|
1507
|
+
jsx: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1508
|
+
/* @__PURE__ */ literal(false),
|
|
1509
|
+
/* @__PURE__ */ literal("preserve"),
|
|
1510
|
+
/* @__PURE__ */ literal("react"),
|
|
1511
|
+
/* @__PURE__ */ literal("react-jsx"),
|
|
1556
1512
|
JsxOptionsSchema
|
|
1557
1513
|
])),
|
|
1558
|
-
target: pipe(optional(union([string(), array(string())])), description("The JavaScript target environment")),
|
|
1559
|
-
define: pipe(optional(record(string(), string())), description("Define global variables (syntax: key=value,key2=value2)")),
|
|
1560
|
-
inject: pipe(optional(record(string(), union([string(), tuple([string(), string()])]))), description("Inject import statements on demand")),
|
|
1561
|
-
dropLabels: pipe(optional(array(string())), description("Remove labeled statements with these label names")),
|
|
1562
|
-
plugins: pipe(optional(TransformPluginsSchema), description("Third-party plugins to use"))
|
|
1514
|
+
target: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])), /* @__PURE__ */ description("The JavaScript target environment")),
|
|
1515
|
+
define: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())), /* @__PURE__ */ description("Define global variables (syntax: key=value,key2=value2)")),
|
|
1516
|
+
inject: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ string()])]))), /* @__PURE__ */ description("Inject import statements on demand")),
|
|
1517
|
+
dropLabels: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Remove labeled statements with these label names")),
|
|
1518
|
+
plugins: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(TransformPluginsSchema), /* @__PURE__ */ description("Third-party plugins to use"))
|
|
1563
1519
|
});
|
|
1564
1520
|
isTypeTrue();
|
|
1565
|
-
const
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1521
|
+
const WatcherFileWatcherOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1522
|
+
usePolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use polling-based file watching instead of native OS events")),
|
|
1523
|
+
pollInterval: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Poll interval in milliseconds (only used when usePolling is true)")),
|
|
1524
|
+
compareContentsForPolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Compare file contents for poll-based watchers (only used when usePolling is true)"))
|
|
1525
|
+
});
|
|
1526
|
+
const WatcherOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1527
|
+
chokidar: /* @__PURE__ */ optional(/* @__PURE__ */ never(`The "watch.chokidar" option is deprecated, please use "watch.watcher" instead of it`)),
|
|
1528
|
+
exclude: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, /* @__PURE__ */ array(StringOrRegExpSchema)])),
|
|
1529
|
+
include: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, /* @__PURE__ */ array(StringOrRegExpSchema)])),
|
|
1530
|
+
watcher: /* @__PURE__ */ optional(WatcherFileWatcherOptionsSchema),
|
|
1531
|
+
notify: /* @__PURE__ */ optional(WatcherFileWatcherOptionsSchema),
|
|
1532
|
+
skipWrite: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Skip the bundle.write() step")),
|
|
1533
|
+
buildDelay: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Throttle watch rebuilds")),
|
|
1534
|
+
clearScreen: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to clear the screen when a rebuild is triggered")),
|
|
1535
|
+
onInvalidate: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(vFunction()), /* @__PURE__ */ description("An optional function that will be called immediately every time a module changes that is part of the build."))
|
|
1577
1536
|
});
|
|
1578
1537
|
isTypeTrue();
|
|
1579
|
-
const ChecksOptionsSchema = strictObject({
|
|
1580
|
-
circularDependency: pipe(optional(boolean()), description("Whether to emit warnings when detecting circular dependency")),
|
|
1581
|
-
eval: pipe(optional(boolean()), description("Whether to emit warnings when detecting uses of direct `eval`s")),
|
|
1582
|
-
missingGlobalName: pipe(optional(boolean()), description("Whether to emit warnings when the `output.globals` option is missing when needed")),
|
|
1583
|
-
missingNameOptionForIifeExport: pipe(optional(boolean()), description("Whether to emit warnings when the `output.name` option is missing when needed")),
|
|
1584
|
-
mixedExports: pipe(optional(boolean()), description("Whether to emit warnings when the way to export values is ambiguous")),
|
|
1585
|
-
unresolvedEntry: pipe(optional(boolean()), description("Whether to emit warnings when an entrypoint cannot be resolved")),
|
|
1586
|
-
unresolvedImport: pipe(optional(boolean()), description("Whether to emit warnings when an import cannot be resolved")),
|
|
1587
|
-
filenameConflict: pipe(optional(boolean()), description("Whether to emit warnings when files generated have the same name with different contents")),
|
|
1588
|
-
commonJsVariableInEsm: pipe(optional(boolean()), description("Whether to emit warnings when a CommonJS variable is used in an ES module")),
|
|
1589
|
-
importIsUndefined: pipe(optional(boolean()), description("Whether to emit warnings when an imported variable is not exported")),
|
|
1590
|
-
emptyImportMeta: pipe(optional(boolean()), description("Whether to emit warnings when `import.meta` is not supported with the output format and is replaced with an empty object (`{}`)")),
|
|
1591
|
-
toleratedTransform: pipe(optional(boolean()), description("Whether to emit warnings when detecting tolerated transform")),
|
|
1592
|
-
cannotCallNamespace: pipe(optional(boolean()), description("Whether to emit warnings when a namespace is called as a function")),
|
|
1593
|
-
configurationFieldConflict: pipe(optional(boolean()), description("Whether to emit warnings when a config value is overridden by another config value with a higher priority")),
|
|
1594
|
-
preferBuiltinFeature: pipe(optional(boolean()), description("Whether to emit warnings when a plugin that is covered by a built-in feature is used")),
|
|
1595
|
-
couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warnings when Rolldown could not clean the output directory")),
|
|
1596
|
-
pluginTimings: pipe(optional(boolean()), description("Whether to emit warnings when plugins take significant time during the build process")),
|
|
1597
|
-
duplicateShebang: pipe(optional(boolean()), description("Whether to emit warnings when both the code and postBanner contain shebang")),
|
|
1598
|
-
unsupportedTsconfigOption: pipe(optional(boolean()), description("Whether to emit warnings when a tsconfig option or combination of options is not supported")),
|
|
1599
|
-
ineffectiveDynamicImport: pipe(optional(boolean()), description("Whether to emit warnings when a module is dynamically imported but also statically imported, making the dynamic import ineffective for code splitting"))
|
|
1538
|
+
const ChecksOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1539
|
+
circularDependency: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting circular dependency")),
|
|
1540
|
+
eval: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting uses of direct `eval`s")),
|
|
1541
|
+
missingGlobalName: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when the `output.globals` option is missing when needed")),
|
|
1542
|
+
missingNameOptionForIifeExport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when the `output.name` option is missing when needed")),
|
|
1543
|
+
mixedExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when the way to export values is ambiguous")),
|
|
1544
|
+
unresolvedEntry: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an entrypoint cannot be resolved")),
|
|
1545
|
+
unresolvedImport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an import cannot be resolved")),
|
|
1546
|
+
filenameConflict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when files generated have the same name with different contents")),
|
|
1547
|
+
commonJsVariableInEsm: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a CommonJS variable is used in an ES module")),
|
|
1548
|
+
importIsUndefined: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an imported variable is not exported")),
|
|
1549
|
+
emptyImportMeta: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when `import.meta` is not supported with the output format and is replaced with an empty object (`{}`)")),
|
|
1550
|
+
toleratedTransform: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting tolerated transform")),
|
|
1551
|
+
cannotCallNamespace: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a namespace is called as a function")),
|
|
1552
|
+
configurationFieldConflict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a config value is overridden by another config value with a higher priority")),
|
|
1553
|
+
preferBuiltinFeature: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a plugin that is covered by a built-in feature is used")),
|
|
1554
|
+
couldNotCleanDirectory: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when Rolldown could not clean the output directory")),
|
|
1555
|
+
pluginTimings: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when plugins take significant time during the build process")),
|
|
1556
|
+
duplicateShebang: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when both the code and postBanner contain shebang")),
|
|
1557
|
+
unsupportedTsconfigOption: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a tsconfig option or combination of options is not supported")),
|
|
1558
|
+
ineffectiveDynamicImport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a module is dynamically imported but also statically imported, making the dynamic import ineffective for code splitting"))
|
|
1600
1559
|
});
|
|
1601
1560
|
isTypeTrue();
|
|
1602
|
-
const CompressOptionsKeepNamesSchema = strictObject({
|
|
1603
|
-
function: boolean(),
|
|
1604
|
-
class: boolean()
|
|
1561
|
+
const CompressOptionsKeepNamesSchema = /* @__PURE__ */ strictObject({
|
|
1562
|
+
function: /* @__PURE__ */ boolean(),
|
|
1563
|
+
class: /* @__PURE__ */ boolean()
|
|
1605
1564
|
});
|
|
1606
1565
|
isTypeTrue();
|
|
1607
|
-
const CompressTreeshakeOptionsSchema = strictObject({
|
|
1608
|
-
annotations: optional(boolean()),
|
|
1609
|
-
manualPureFunctions: optional(array(string())),
|
|
1610
|
-
propertyReadSideEffects: optional(union([boolean(), literal("always")])),
|
|
1611
|
-
unknownGlobalSideEffects: optional(boolean()),
|
|
1612
|
-
invalidImportSideEffects: optional(boolean())
|
|
1566
|
+
const CompressTreeshakeOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1567
|
+
annotations: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1568
|
+
manualPureFunctions: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1569
|
+
propertyReadSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("always")])),
|
|
1570
|
+
unknownGlobalSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1571
|
+
invalidImportSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1613
1572
|
});
|
|
1614
1573
|
isTypeTrue();
|
|
1615
|
-
const CompressOptionsSchema = strictObject({
|
|
1616
|
-
target: optional(union([string(), array(string())])),
|
|
1617
|
-
dropConsole: optional(boolean()),
|
|
1618
|
-
dropDebugger: optional(boolean()),
|
|
1619
|
-
keepNames: optional(CompressOptionsKeepNamesSchema),
|
|
1620
|
-
unused: optional(union([boolean(), literal("keep_assign")])),
|
|
1621
|
-
joinVars: optional(boolean()),
|
|
1622
|
-
sequences: optional(boolean()),
|
|
1623
|
-
dropLabels: optional(array(string())),
|
|
1624
|
-
maxIterations: optional(number()),
|
|
1625
|
-
treeshake: optional(CompressTreeshakeOptionsSchema)
|
|
1574
|
+
const CompressOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1575
|
+
target: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])),
|
|
1576
|
+
dropConsole: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1577
|
+
dropDebugger: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1578
|
+
keepNames: /* @__PURE__ */ optional(CompressOptionsKeepNamesSchema),
|
|
1579
|
+
unused: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("keep_assign")])),
|
|
1580
|
+
joinVars: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1581
|
+
sequences: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1582
|
+
dropLabels: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1583
|
+
maxIterations: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1584
|
+
treeshake: /* @__PURE__ */ optional(CompressTreeshakeOptionsSchema)
|
|
1626
1585
|
});
|
|
1627
1586
|
isTypeTrue();
|
|
1628
|
-
const MangleOptionsKeepNamesSchema = strictObject({
|
|
1629
|
-
function: boolean(),
|
|
1630
|
-
class: boolean()
|
|
1587
|
+
const MangleOptionsKeepNamesSchema = /* @__PURE__ */ strictObject({
|
|
1588
|
+
function: /* @__PURE__ */ boolean(),
|
|
1589
|
+
class: /* @__PURE__ */ boolean()
|
|
1631
1590
|
});
|
|
1632
1591
|
isTypeTrue();
|
|
1633
|
-
const MangleOptionsSchema = strictObject({
|
|
1634
|
-
toplevel: optional(boolean()),
|
|
1635
|
-
keepNames: optional(union([boolean(), MangleOptionsKeepNamesSchema])),
|
|
1636
|
-
debug: optional(boolean())
|
|
1592
|
+
const MangleOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1593
|
+
toplevel: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1594
|
+
keepNames: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), MangleOptionsKeepNamesSchema])),
|
|
1595
|
+
debug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1637
1596
|
});
|
|
1638
1597
|
isTypeTrue();
|
|
1639
|
-
const CodegenOptionsSchema = strictObject({ removeWhitespace: optional(boolean()) });
|
|
1598
|
+
const CodegenOptionsSchema = /* @__PURE__ */ strictObject({ removeWhitespace: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()) });
|
|
1640
1599
|
isTypeTrue();
|
|
1641
|
-
const MinifyOptionsSchema = strictObject({
|
|
1642
|
-
compress: optional(union([boolean(), CompressOptionsSchema])),
|
|
1643
|
-
mangle: optional(union([boolean(), MangleOptionsSchema])),
|
|
1644
|
-
codegen: optional(union([boolean(), CodegenOptionsSchema]))
|
|
1600
|
+
const MinifyOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1601
|
+
compress: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), CompressOptionsSchema])),
|
|
1602
|
+
mangle: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), MangleOptionsSchema])),
|
|
1603
|
+
codegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), CodegenOptionsSchema]))
|
|
1645
1604
|
});
|
|
1646
1605
|
isTypeTrue();
|
|
1647
|
-
const ResolveOptionsSchema = strictObject({
|
|
1648
|
-
alias: optional(record(string(), union([
|
|
1649
|
-
literal(false),
|
|
1650
|
-
string(),
|
|
1651
|
-
array(string())
|
|
1606
|
+
const ResolveOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1607
|
+
alias: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([
|
|
1608
|
+
/* @__PURE__ */ literal(false),
|
|
1609
|
+
/* @__PURE__ */ string(),
|
|
1610
|
+
/* @__PURE__ */ array(/* @__PURE__ */ string())
|
|
1652
1611
|
]))),
|
|
1653
|
-
aliasFields: optional(array(array(string()))),
|
|
1654
|
-
conditionNames: optional(array(string())),
|
|
1655
|
-
extensionAlias: optional(record(string(), array(string()))),
|
|
1656
|
-
exportsFields: optional(array(array(string()))),
|
|
1657
|
-
extensions: optional(array(string())),
|
|
1658
|
-
mainFields: optional(array(string())),
|
|
1659
|
-
mainFiles: optional(array(string())),
|
|
1660
|
-
modules: optional(array(string())),
|
|
1661
|
-
symlinks: optional(boolean()),
|
|
1662
|
-
tsconfigFilename: optional(string())
|
|
1612
|
+
aliasFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ array(/* @__PURE__ */ string()))),
|
|
1613
|
+
conditionNames: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1614
|
+
extensionAlias: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string()))),
|
|
1615
|
+
exportsFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ array(/* @__PURE__ */ string()))),
|
|
1616
|
+
extensions: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1617
|
+
mainFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1618
|
+
mainFiles: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1619
|
+
modules: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1620
|
+
symlinks: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1621
|
+
tsconfigFilename: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
1663
1622
|
});
|
|
1664
1623
|
isTypeTrue();
|
|
1665
|
-
const TreeshakingOptionsSchema = strictObject({
|
|
1666
|
-
moduleSideEffects: optional(any()),
|
|
1667
|
-
annotations: optional(boolean()),
|
|
1668
|
-
manualPureFunctions: optional(custom((input) => is(array(string()), input), "string array")),
|
|
1669
|
-
unknownGlobalSideEffects: optional(boolean()),
|
|
1670
|
-
invalidImportSideEffects: optional(boolean()),
|
|
1671
|
-
commonjs: optional(boolean()),
|
|
1672
|
-
propertyReadSideEffects: optional(union([literal(false), literal("always")])),
|
|
1673
|
-
propertyWriteSideEffects: optional(union([literal(false), literal("always")]))
|
|
1624
|
+
const TreeshakingOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1625
|
+
moduleSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
|
|
1626
|
+
annotations: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1627
|
+
manualPureFunctions: /* @__PURE__ */ optional(/* @__PURE__ */ custom((input) => /* @__PURE__ */ is(/* @__PURE__ */ array(/* @__PURE__ */ string()), input), "string array")),
|
|
1628
|
+
unknownGlobalSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1629
|
+
invalidImportSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1630
|
+
commonjs: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1631
|
+
propertyReadSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(false), /* @__PURE__ */ literal("always")])),
|
|
1632
|
+
propertyWriteSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(false), /* @__PURE__ */ literal("always")]))
|
|
1674
1633
|
});
|
|
1675
1634
|
isTypeTrue();
|
|
1676
|
-
const OptimizationOptionsSchema = strictObject({
|
|
1677
|
-
inlineConst: pipe(optional(union([boolean(), strictObject({
|
|
1678
|
-
mode: optional(union([literal("all"), literal("smart")])),
|
|
1679
|
-
pass: optional(number())
|
|
1680
|
-
})])), description("Enable crossmodule constant inlining")),
|
|
1681
|
-
pifeForModuleWrappers: pipe(optional(boolean()), description("Use PIFE pattern for module wrappers"))
|
|
1635
|
+
const OptimizationOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1636
|
+
inlineConst: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1637
|
+
mode: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("all"), /* @__PURE__ */ literal("smart")])),
|
|
1638
|
+
pass: /* @__PURE__ */ optional(/* @__PURE__ */ number())
|
|
1639
|
+
})])), /* @__PURE__ */ description("Enable crossmodule constant inlining")),
|
|
1640
|
+
pifeForModuleWrappers: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use PIFE pattern for module wrappers"))
|
|
1682
1641
|
});
|
|
1683
1642
|
isTypeTrue();
|
|
1684
|
-
const LogOrStringHandlerSchema = pipe(vFunction(), args(tuple([LogLevelWithErrorSchema, RollupLogWithStringSchema])));
|
|
1643
|
+
const LogOrStringHandlerSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([LogLevelWithErrorSchema, RollupLogWithStringSchema])));
|
|
1685
1644
|
isTypeTrue();
|
|
1686
|
-
const OnLogSchema = pipe(vFunction(), args(tuple([
|
|
1645
|
+
const OnLogSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([
|
|
1687
1646
|
LogLevelSchema,
|
|
1688
1647
|
RollupLogSchema,
|
|
1689
1648
|
LogOrStringHandlerSchema
|
|
1690
1649
|
])));
|
|
1691
1650
|
isTypeTrue();
|
|
1692
|
-
const OnwarnSchema = pipe(vFunction(), args(tuple([RollupLogSchema, pipe(vFunction(), args(tuple([union([RollupLogWithStringSchema, pipe(vFunction(), returns(RollupLogWithStringSchema))])])))])));
|
|
1651
|
+
const OnwarnSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([RollupLogSchema, /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ union([RollupLogWithStringSchema, /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ returns(RollupLogWithStringSchema))])])))])));
|
|
1693
1652
|
isTypeTrue();
|
|
1694
|
-
const DevModeSchema = union([boolean(), strictObject({
|
|
1695
|
-
port: optional(number()),
|
|
1696
|
-
host: optional(string()),
|
|
1697
|
-
implement: optional(string()),
|
|
1698
|
-
lazy: optional(boolean())
|
|
1653
|
+
const DevModeSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1654
|
+
port: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1655
|
+
host: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1656
|
+
implement: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1657
|
+
lazy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1699
1658
|
})]);
|
|
1700
1659
|
isTypeTrue();
|
|
1701
|
-
const InputOptionsSchema = strictObject({
|
|
1702
|
-
input: optional(InputOptionSchema),
|
|
1703
|
-
plugins: optional(custom(() => true)),
|
|
1704
|
-
external: optional(ExternalOptionSchema),
|
|
1705
|
-
makeAbsoluteExternalsRelative: optional(union([boolean(), literal("ifRelativeSource")])),
|
|
1706
|
-
resolve: optional(ResolveOptionsSchema),
|
|
1707
|
-
cwd: pipe(optional(string()), description("Current working directory")),
|
|
1708
|
-
platform: pipe(optional(union([
|
|
1709
|
-
literal("browser"),
|
|
1710
|
-
literal("neutral"),
|
|
1711
|
-
literal("node")
|
|
1712
|
-
])), description(`Platform for which the code should be generated (node, ${styleText$1("underline", "browser")}, neutral)`)),
|
|
1713
|
-
shimMissingExports: pipe(optional(boolean()), description("Create shim variables for missing exports")),
|
|
1714
|
-
treeshake: optional(union([boolean(), TreeshakingOptionsSchema])),
|
|
1715
|
-
optimization: optional(OptimizationOptionsSchema),
|
|
1716
|
-
logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${styleText$1("dim", "silent")}, ${styleText$1(["underline", "gray"], "info")}, debug, ${styleText$1("yellow", "warn")})`)),
|
|
1717
|
-
onLog: optional(OnLogSchema),
|
|
1718
|
-
onwarn: optional(OnwarnSchema),
|
|
1719
|
-
moduleTypes: pipe(optional(ModuleTypesSchema), description("Module types for customized extensions")),
|
|
1720
|
-
experimental: optional(strictObject({
|
|
1721
|
-
viteMode: optional(boolean()),
|
|
1722
|
-
resolveNewUrlToAsset: optional(boolean()),
|
|
1723
|
-
devMode: optional(DevModeSchema),
|
|
1724
|
-
chunkModulesOrder: optional(union([literal("module-id"), literal("exec-order")])),
|
|
1725
|
-
attachDebugInfo: optional(union([
|
|
1726
|
-
literal("none"),
|
|
1727
|
-
literal("simple"),
|
|
1728
|
-
literal("full")
|
|
1660
|
+
const InputOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1661
|
+
input: /* @__PURE__ */ optional(InputOptionSchema),
|
|
1662
|
+
plugins: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
|
|
1663
|
+
external: /* @__PURE__ */ optional(ExternalOptionSchema),
|
|
1664
|
+
makeAbsoluteExternalsRelative: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("ifRelativeSource")])),
|
|
1665
|
+
resolve: /* @__PURE__ */ optional(ResolveOptionsSchema),
|
|
1666
|
+
cwd: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Current working directory")),
|
|
1667
|
+
platform: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1668
|
+
/* @__PURE__ */ literal("browser"),
|
|
1669
|
+
/* @__PURE__ */ literal("neutral"),
|
|
1670
|
+
/* @__PURE__ */ literal("node")
|
|
1671
|
+
])), /* @__PURE__ */ description(`Platform for which the code should be generated (node, ${styleText$1("underline", "browser")}, neutral)`)),
|
|
1672
|
+
shimMissingExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Create shim variables for missing exports")),
|
|
1673
|
+
treeshake: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), TreeshakingOptionsSchema])),
|
|
1674
|
+
optimization: /* @__PURE__ */ optional(OptimizationOptionsSchema),
|
|
1675
|
+
logLevel: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(LogLevelOptionSchema), /* @__PURE__ */ description(`Log level (${styleText$1("dim", "silent")}, ${styleText$1(["underline", "gray"], "info")}, debug, ${styleText$1("yellow", "warn")})`)),
|
|
1676
|
+
onLog: /* @__PURE__ */ optional(OnLogSchema),
|
|
1677
|
+
onwarn: /* @__PURE__ */ optional(OnwarnSchema),
|
|
1678
|
+
moduleTypes: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ModuleTypesSchema), /* @__PURE__ */ description("Module types for customized extensions")),
|
|
1679
|
+
experimental: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
|
|
1680
|
+
viteMode: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1681
|
+
resolveNewUrlToAsset: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1682
|
+
devMode: /* @__PURE__ */ optional(DevModeSchema),
|
|
1683
|
+
chunkModulesOrder: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("module-id"), /* @__PURE__ */ literal("exec-order")])),
|
|
1684
|
+
attachDebugInfo: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1685
|
+
/* @__PURE__ */ literal("none"),
|
|
1686
|
+
/* @__PURE__ */ literal("simple"),
|
|
1687
|
+
/* @__PURE__ */ literal("full")
|
|
1729
1688
|
])),
|
|
1730
|
-
chunkImportMap: optional(union([boolean(), object({
|
|
1731
|
-
baseUrl: optional(string()),
|
|
1732
|
-
fileName: optional(string())
|
|
1689
|
+
chunkImportMap: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ object({
|
|
1690
|
+
baseUrl: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1691
|
+
fileName: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
1733
1692
|
})])),
|
|
1734
|
-
onDemandWrapping: optional(boolean()),
|
|
1735
|
-
incrementalBuild: optional(boolean()),
|
|
1736
|
-
nativeMagicString: optional(boolean()),
|
|
1737
|
-
chunkOptimization: optional(boolean()),
|
|
1738
|
-
lazyBarrel: optional(boolean())
|
|
1693
|
+
onDemandWrapping: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1694
|
+
incrementalBuild: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1695
|
+
nativeMagicString: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1696
|
+
chunkOptimization: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1697
|
+
lazyBarrel: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1739
1698
|
})),
|
|
1740
|
-
transform: optional(TransformOptionsSchema),
|
|
1741
|
-
watch: optional(union([WatcherOptionsSchema, literal(false)])),
|
|
1742
|
-
checks: optional(ChecksOptionsSchema),
|
|
1743
|
-
devtools: pipe(optional(object({ sessionId: pipe(optional(string()), description("Used to name the build.")) })), description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly.")),
|
|
1744
|
-
preserveEntrySignatures: pipe(optional(union([
|
|
1745
|
-
literal("strict"),
|
|
1746
|
-
literal("allow-extension"),
|
|
1747
|
-
literal("exports-only"),
|
|
1748
|
-
literal(false)
|
|
1699
|
+
transform: /* @__PURE__ */ optional(TransformOptionsSchema),
|
|
1700
|
+
watch: /* @__PURE__ */ optional(/* @__PURE__ */ union([WatcherOptionsSchema, /* @__PURE__ */ literal(false)])),
|
|
1701
|
+
checks: /* @__PURE__ */ optional(ChecksOptionsSchema),
|
|
1702
|
+
devtools: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({ sessionId: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Used to name the build.")) })), /* @__PURE__ */ description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly.")),
|
|
1703
|
+
preserveEntrySignatures: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1704
|
+
/* @__PURE__ */ literal("strict"),
|
|
1705
|
+
/* @__PURE__ */ literal("allow-extension"),
|
|
1706
|
+
/* @__PURE__ */ literal("exports-only"),
|
|
1707
|
+
/* @__PURE__ */ literal(false)
|
|
1749
1708
|
]))),
|
|
1750
|
-
context: pipe(optional(string()), description("The value of `this` at the top level of each module.")),
|
|
1751
|
-
tsconfig: pipe(optional(union([boolean(), string()])), description("Path to the tsconfig.json file."))
|
|
1709
|
+
context: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("The value of `this` at the top level of each module.")),
|
|
1710
|
+
tsconfig: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ string()])), /* @__PURE__ */ description("Path to the tsconfig.json file."))
|
|
1752
1711
|
});
|
|
1753
1712
|
isTypeTrue();
|
|
1754
|
-
const InputCliOverrideSchema = strictObject({
|
|
1755
|
-
input: pipe(optional(array(string())), description("Entry file")),
|
|
1756
|
-
external: pipe(optional(array(string())), description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
|
|
1757
|
-
treeshake: pipe(optional(boolean()), description("enable treeshaking")),
|
|
1758
|
-
makeAbsoluteExternalsRelative: pipe(optional(boolean()), description("Prevent normalization of external imports")),
|
|
1759
|
-
preserveEntrySignatures: pipe(optional(literal(false)), description("Avoid facade chunks for entry points")),
|
|
1760
|
-
context: pipe(optional(string()), description("The entity top-level `this` represents."))
|
|
1713
|
+
const InputCliOverrideSchema = /* @__PURE__ */ strictObject({
|
|
1714
|
+
input: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Entry file")),
|
|
1715
|
+
external: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
|
|
1716
|
+
treeshake: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("enable treeshaking")),
|
|
1717
|
+
makeAbsoluteExternalsRelative: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Prevent normalization of external imports")),
|
|
1718
|
+
preserveEntrySignatures: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ literal(false)), /* @__PURE__ */ description("Avoid facade chunks for entry points")),
|
|
1719
|
+
context: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("The entity top-level `this` represents."))
|
|
1761
1720
|
});
|
|
1762
|
-
const InputCliOptionsSchema = omit(strictObject({
|
|
1721
|
+
const InputCliOptionsSchema = /* @__PURE__ */ omit(/* @__PURE__ */ strictObject({
|
|
1763
1722
|
...InputOptionsSchema.entries,
|
|
1764
1723
|
...InputCliOverrideSchema.entries
|
|
1765
1724
|
}), [
|
|
@@ -1770,172 +1729,173 @@ const InputCliOptionsSchema = omit(strictObject({
|
|
|
1770
1729
|
"experimental",
|
|
1771
1730
|
"watch"
|
|
1772
1731
|
]);
|
|
1773
|
-
const ModuleFormatSchema = union([
|
|
1774
|
-
literal("es"),
|
|
1775
|
-
literal("cjs"),
|
|
1776
|
-
literal("esm"),
|
|
1777
|
-
literal("module"),
|
|
1778
|
-
literal("commonjs"),
|
|
1779
|
-
literal("iife"),
|
|
1780
|
-
literal("umd")
|
|
1732
|
+
const ModuleFormatSchema = /* @__PURE__ */ union([
|
|
1733
|
+
/* @__PURE__ */ literal("es"),
|
|
1734
|
+
/* @__PURE__ */ literal("cjs"),
|
|
1735
|
+
/* @__PURE__ */ literal("esm"),
|
|
1736
|
+
/* @__PURE__ */ literal("module"),
|
|
1737
|
+
/* @__PURE__ */ literal("commonjs"),
|
|
1738
|
+
/* @__PURE__ */ literal("iife"),
|
|
1739
|
+
/* @__PURE__ */ literal("umd")
|
|
1781
1740
|
]);
|
|
1782
1741
|
isTypeTrue();
|
|
1783
|
-
const AddonFunctionSchema = pipe(vFunction(), args(tuple([custom(() => true)])), returnsAsync(unionAsync([string(), pipeAsync(promise(), awaitAsync(), string())])));
|
|
1742
|
+
const AddonFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returnsAsync(/* @__PURE__ */ unionAsync([/* @__PURE__ */ string(), /* @__PURE__ */ pipeAsync(/* @__PURE__ */ promise(), /* @__PURE__ */ awaitAsync(), /* @__PURE__ */ string())])));
|
|
1784
1743
|
isTypeTrue();
|
|
1785
|
-
const ChunkFileNamesFunctionSchema = pipe(vFunction(), args(tuple([custom(() => true)])), returns(string()));
|
|
1744
|
+
const ChunkFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1786
1745
|
isTypeTrue();
|
|
1787
|
-
const ChunkFileNamesSchema = union([string(), ChunkFileNamesFunctionSchema]);
|
|
1788
|
-
const AssetFileNamesFunctionSchema = pipe(vFunction(), args(tuple([custom(() => true)])), returns(string()));
|
|
1746
|
+
const ChunkFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), ChunkFileNamesFunctionSchema]);
|
|
1747
|
+
const AssetFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1789
1748
|
isTypeTrue();
|
|
1790
|
-
const AssetFileNamesSchema = union([string(), AssetFileNamesFunctionSchema]);
|
|
1791
|
-
const SanitizeFileNameFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(string()));
|
|
1749
|
+
const AssetFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), AssetFileNamesFunctionSchema]);
|
|
1750
|
+
const SanitizeFileNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1792
1751
|
isTypeTrue();
|
|
1793
|
-
const SanitizeFileNameSchema = union([boolean(), SanitizeFileNameFunctionSchema]);
|
|
1794
|
-
const GlobalsFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(string()));
|
|
1752
|
+
const SanitizeFileNameSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), SanitizeFileNameFunctionSchema]);
|
|
1753
|
+
const GlobalsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1795
1754
|
isTypeTrue();
|
|
1796
|
-
const PathsFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(string()));
|
|
1755
|
+
const PathsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1797
1756
|
isTypeTrue();
|
|
1798
|
-
const ManualChunksFunctionSchema = pipe(vFunction(), args(tuple([string(), object({})])), returns(nullish(string())));
|
|
1757
|
+
const ManualChunksFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));
|
|
1799
1758
|
isTypeTrue();
|
|
1800
|
-
const AdvancedChunksNameFunctionSchema = pipe(vFunction(), args(tuple([string(), object({})])), returns(nullish(string())));
|
|
1759
|
+
const AdvancedChunksNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));
|
|
1801
1760
|
isTypeTrue();
|
|
1802
|
-
const AdvancedChunksTestFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(union([
|
|
1803
|
-
boolean(),
|
|
1804
|
-
void_(),
|
|
1805
|
-
undefined_()
|
|
1761
|
+
const AdvancedChunksTestFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ union([
|
|
1762
|
+
/* @__PURE__ */ boolean(),
|
|
1763
|
+
/* @__PURE__ */ void_(),
|
|
1764
|
+
/* @__PURE__ */ undefined_()
|
|
1806
1765
|
])));
|
|
1807
1766
|
isTypeTrue();
|
|
1808
|
-
const AdvancedChunksSchema = strictObject({
|
|
1809
|
-
includeDependenciesRecursively: optional(boolean()),
|
|
1810
|
-
minSize: optional(number()),
|
|
1811
|
-
maxSize: optional(number()),
|
|
1812
|
-
minModuleSize: optional(number()),
|
|
1813
|
-
maxModuleSize: optional(number()),
|
|
1814
|
-
minShareCount: optional(number()),
|
|
1815
|
-
groups: optional(array(strictObject({
|
|
1816
|
-
name: union([string(), AdvancedChunksNameFunctionSchema]),
|
|
1817
|
-
test: optional(union([StringOrRegExpSchema, AdvancedChunksTestFunctionSchema])),
|
|
1818
|
-
priority: optional(number()),
|
|
1819
|
-
minSize: optional(number()),
|
|
1820
|
-
minShareCount: optional(number()),
|
|
1821
|
-
maxSize: optional(number()),
|
|
1822
|
-
minModuleSize: optional(number()),
|
|
1823
|
-
maxModuleSize: optional(number()),
|
|
1824
|
-
entriesAware: optional(boolean()),
|
|
1825
|
-
entriesAwareMergeThreshold: optional(number())
|
|
1767
|
+
const AdvancedChunksSchema = /* @__PURE__ */ strictObject({
|
|
1768
|
+
includeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1769
|
+
minSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1770
|
+
maxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1771
|
+
minModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1772
|
+
maxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1773
|
+
minShareCount: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1774
|
+
groups: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ strictObject({
|
|
1775
|
+
name: /* @__PURE__ */ union([/* @__PURE__ */ string(), AdvancedChunksNameFunctionSchema]),
|
|
1776
|
+
test: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, AdvancedChunksTestFunctionSchema])),
|
|
1777
|
+
priority: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1778
|
+
minSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1779
|
+
minShareCount: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1780
|
+
maxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1781
|
+
minModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1782
|
+
maxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1783
|
+
entriesAware: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1784
|
+
entriesAwareMergeThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ number())
|
|
1826
1785
|
})))
|
|
1827
1786
|
});
|
|
1828
1787
|
isTypeTrue();
|
|
1829
|
-
const GeneratedCodePresetSchema = union([literal("es5"), literal("es2015")]);
|
|
1788
|
+
const GeneratedCodePresetSchema = /* @__PURE__ */ union([/* @__PURE__ */ literal("es5"), /* @__PURE__ */ literal("es2015")]);
|
|
1830
1789
|
isTypeTrue();
|
|
1831
|
-
const GeneratedCodeOptionsSchema = strictObject({
|
|
1832
|
-
symbols: pipe(optional(boolean()), description("Whether to use Symbol.toStringTag for namespace objects")),
|
|
1833
|
-
preset: optional(GeneratedCodePresetSchema),
|
|
1834
|
-
profilerNames: pipe(optional(boolean()), description("Whether to add readable names to internal variables for profiling purposes"))
|
|
1790
|
+
const GeneratedCodeOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1791
|
+
symbols: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to use Symbol.toStringTag for namespace objects")),
|
|
1792
|
+
preset: /* @__PURE__ */ optional(GeneratedCodePresetSchema),
|
|
1793
|
+
profilerNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to add readable names to internal variables for profiling purposes"))
|
|
1835
1794
|
});
|
|
1836
1795
|
isTypeTrue();
|
|
1837
|
-
const OutputOptionsSchema = strictObject({
|
|
1838
|
-
dir: pipe(optional(string()), description("Output directory, defaults to `dist` if `file` is not set")),
|
|
1839
|
-
file: pipe(optional(string()), description("Single output file")),
|
|
1840
|
-
exports: pipe(optional(union([
|
|
1841
|
-
literal("auto"),
|
|
1842
|
-
literal("named"),
|
|
1843
|
-
literal("default"),
|
|
1844
|
-
literal("none")
|
|
1845
|
-
])), description(`Specify a export mode (${styleText$1("underline", "auto")}, named, default, none)`)),
|
|
1846
|
-
hashCharacters: pipe(optional(union([
|
|
1847
|
-
literal("base64"),
|
|
1848
|
-
literal("base36"),
|
|
1849
|
-
literal("hex")
|
|
1850
|
-
])), description("Use the specified character set for file hashes")),
|
|
1851
|
-
format: pipe(optional(ModuleFormatSchema), description(`Output format of the generated bundle (supports ${styleText$1("underline", "esm")}, cjs, and iife)`)),
|
|
1852
|
-
sourcemap: pipe(optional(union([
|
|
1853
|
-
boolean(),
|
|
1854
|
-
literal("inline"),
|
|
1855
|
-
literal("hidden")
|
|
1856
|
-
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${styleText$1("bold", "pass the `-s` on the last argument if you want to generate `.map` file")})`)),
|
|
1857
|
-
sourcemapBaseUrl: pipe(optional(string()), description("Base URL used to prefix sourcemap paths")),
|
|
1858
|
-
sourcemapDebugIds: pipe(optional(boolean()), description("Inject sourcemap debug IDs")),
|
|
1859
|
-
sourcemapIgnoreList: optional(union([
|
|
1860
|
-
boolean(),
|
|
1861
|
-
custom(() => true),
|
|
1796
|
+
const OutputOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1797
|
+
dir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Output directory, defaults to `dist` if `file` is not set")),
|
|
1798
|
+
file: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Single output file")),
|
|
1799
|
+
exports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1800
|
+
/* @__PURE__ */ literal("auto"),
|
|
1801
|
+
/* @__PURE__ */ literal("named"),
|
|
1802
|
+
/* @__PURE__ */ literal("default"),
|
|
1803
|
+
/* @__PURE__ */ literal("none")
|
|
1804
|
+
])), /* @__PURE__ */ description(`Specify a export mode (${styleText$1("underline", "auto")}, named, default, none)`)),
|
|
1805
|
+
hashCharacters: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1806
|
+
/* @__PURE__ */ literal("base64"),
|
|
1807
|
+
/* @__PURE__ */ literal("base36"),
|
|
1808
|
+
/* @__PURE__ */ literal("hex")
|
|
1809
|
+
])), /* @__PURE__ */ description("Use the specified character set for file hashes")),
|
|
1810
|
+
format: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ModuleFormatSchema), /* @__PURE__ */ description(`Output format of the generated bundle (supports ${styleText$1("underline", "esm")}, cjs, and iife)`)),
|
|
1811
|
+
sourcemap: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1812
|
+
/* @__PURE__ */ boolean(),
|
|
1813
|
+
/* @__PURE__ */ literal("inline"),
|
|
1814
|
+
/* @__PURE__ */ literal("hidden")
|
|
1815
|
+
])), /* @__PURE__ */ description(`Generate sourcemap (\`-s inline\` for inline, or ${styleText$1("bold", "pass the `-s` on the last argument if you want to generate `.map` file")})`)),
|
|
1816
|
+
sourcemapBaseUrl: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Base URL used to prefix sourcemap paths")),
|
|
1817
|
+
sourcemapDebugIds: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Inject sourcemap debug IDs")),
|
|
1818
|
+
sourcemapIgnoreList: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1819
|
+
/* @__PURE__ */ boolean(),
|
|
1820
|
+
/* @__PURE__ */ custom(() => true),
|
|
1862
1821
|
StringOrRegExpSchema
|
|
1863
1822
|
])),
|
|
1864
|
-
sourcemapPathTransform: optional(custom(() => true)),
|
|
1865
|
-
banner: optional(union([string(), AddonFunctionSchema])),
|
|
1866
|
-
footer: optional(union([string(), AddonFunctionSchema])),
|
|
1867
|
-
postBanner: optional(union([string(), AddonFunctionSchema])),
|
|
1868
|
-
postFooter: optional(union([string(), AddonFunctionSchema])),
|
|
1869
|
-
intro: optional(union([string(), AddonFunctionSchema])),
|
|
1870
|
-
outro: optional(union([string(), AddonFunctionSchema])),
|
|
1871
|
-
extend: pipe(optional(boolean()), description("Extend global variable defined by name in IIFE / UMD formats")),
|
|
1872
|
-
esModule: optional(union([boolean(), literal("if-default-prop")])),
|
|
1873
|
-
assetFileNames: optional(AssetFileNamesSchema),
|
|
1874
|
-
entryFileNames: optional(ChunkFileNamesSchema),
|
|
1875
|
-
chunkFileNames: optional(ChunkFileNamesSchema),
|
|
1876
|
-
sanitizeFileName: optional(SanitizeFileNameSchema),
|
|
1877
|
-
minify: pipe(optional(union([
|
|
1878
|
-
boolean(),
|
|
1879
|
-
literal("dce-only"),
|
|
1823
|
+
sourcemapPathTransform: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
|
|
1824
|
+
banner: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1825
|
+
footer: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1826
|
+
postBanner: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1827
|
+
postFooter: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1828
|
+
intro: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1829
|
+
outro: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1830
|
+
extend: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Extend global variable defined by name in IIFE / UMD formats")),
|
|
1831
|
+
esModule: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("if-default-prop")])),
|
|
1832
|
+
assetFileNames: /* @__PURE__ */ optional(AssetFileNamesSchema),
|
|
1833
|
+
entryFileNames: /* @__PURE__ */ optional(ChunkFileNamesSchema),
|
|
1834
|
+
chunkFileNames: /* @__PURE__ */ optional(ChunkFileNamesSchema),
|
|
1835
|
+
sanitizeFileName: /* @__PURE__ */ optional(SanitizeFileNameSchema),
|
|
1836
|
+
minify: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1837
|
+
/* @__PURE__ */ boolean(),
|
|
1838
|
+
/* @__PURE__ */ literal("dce-only"),
|
|
1880
1839
|
MinifyOptionsSchema
|
|
1881
|
-
])), description("Minify the bundled file")),
|
|
1882
|
-
name: pipe(optional(string()), description("Name for UMD / IIFE format outputs")),
|
|
1883
|
-
globals: pipe(optional(union([record(string(), string()), GlobalsFunctionSchema])), description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
|
|
1884
|
-
paths: pipe(optional(union([record(string(), string()), PathsFunctionSchema])), description("Maps external module IDs to paths")),
|
|
1885
|
-
generatedCode: pipe(optional(partial(GeneratedCodeOptionsSchema)), description("Generated code options")),
|
|
1886
|
-
externalLiveBindings: pipe(optional(boolean()), description("external live bindings")),
|
|
1887
|
-
inlineDynamicImports: pipe(optional(boolean()), description("Inline dynamic imports")),
|
|
1888
|
-
dynamicImportInCjs: pipe(optional(boolean()), description("Dynamic import in CJS output")),
|
|
1889
|
-
manualChunks: optional(ManualChunksFunctionSchema),
|
|
1890
|
-
codeSplitting: optional(union([boolean(), AdvancedChunksSchema])),
|
|
1891
|
-
advancedChunks: optional(AdvancedChunksSchema),
|
|
1892
|
-
legalComments: pipe(optional(union([literal("none"), literal("inline")])), description("Control legal comments in the output")),
|
|
1893
|
-
comments: pipe(optional(union([boolean(), strictObject({
|
|
1894
|
-
legal: optional(boolean()),
|
|
1895
|
-
annotation: optional(boolean()),
|
|
1896
|
-
jsdoc: optional(boolean())
|
|
1897
|
-
})])), description("Control comments in the output")),
|
|
1898
|
-
plugins: optional(custom(() => true)),
|
|
1899
|
-
polyfillRequire: pipe(optional(boolean()), description("Disable require polyfill injection")),
|
|
1900
|
-
hoistTransitiveImports: optional(literal(false)),
|
|
1901
|
-
preserveModules: pipe(optional(boolean()), description("Preserve module structure")),
|
|
1902
|
-
preserveModulesRoot: pipe(optional(string()), description("Put preserved modules under this path at root level")),
|
|
1903
|
-
virtualDirname: optional(string()),
|
|
1904
|
-
minifyInternalExports: pipe(optional(boolean()), description("Minify internal exports")),
|
|
1905
|
-
topLevelVar: pipe(optional(boolean()), description("Rewrite top-level declarations to use `var`.")),
|
|
1906
|
-
cleanDir: pipe(optional(boolean()), description("Clean output directory before emitting output")),
|
|
1907
|
-
keepNames: pipe(optional(boolean()), description("Keep function and class names after bundling")),
|
|
1908
|
-
strictExecutionOrder: pipe(optional(boolean()), description("Lets modules be executed in the order they are declared.")),
|
|
1909
|
-
|
|
1840
|
+
])), /* @__PURE__ */ description("Minify the bundled file")),
|
|
1841
|
+
name: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name for UMD / IIFE format outputs")),
|
|
1842
|
+
globals: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string()), GlobalsFunctionSchema])), /* @__PURE__ */ description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
|
|
1843
|
+
paths: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string()), PathsFunctionSchema])), /* @__PURE__ */ description("Maps external module IDs to paths")),
|
|
1844
|
+
generatedCode: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ partial(GeneratedCodeOptionsSchema)), /* @__PURE__ */ description("Generated code options")),
|
|
1845
|
+
externalLiveBindings: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("external live bindings")),
|
|
1846
|
+
inlineDynamicImports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Inline dynamic imports")),
|
|
1847
|
+
dynamicImportInCjs: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Dynamic import in CJS output")),
|
|
1848
|
+
manualChunks: /* @__PURE__ */ optional(ManualChunksFunctionSchema),
|
|
1849
|
+
codeSplitting: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), AdvancedChunksSchema])),
|
|
1850
|
+
advancedChunks: /* @__PURE__ */ optional(AdvancedChunksSchema),
|
|
1851
|
+
legalComments: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("none"), /* @__PURE__ */ literal("inline")])), /* @__PURE__ */ description("Control legal comments in the output")),
|
|
1852
|
+
comments: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1853
|
+
legal: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1854
|
+
annotation: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1855
|
+
jsdoc: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1856
|
+
})])), /* @__PURE__ */ description("Control comments in the output")),
|
|
1857
|
+
plugins: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
|
|
1858
|
+
polyfillRequire: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Disable require polyfill injection")),
|
|
1859
|
+
hoistTransitiveImports: /* @__PURE__ */ optional(/* @__PURE__ */ literal(false)),
|
|
1860
|
+
preserveModules: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Preserve module structure")),
|
|
1861
|
+
preserveModulesRoot: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Put preserved modules under this path at root level")),
|
|
1862
|
+
virtualDirname: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1863
|
+
minifyInternalExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Minify internal exports")),
|
|
1864
|
+
topLevelVar: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Rewrite top-level declarations to use `var`.")),
|
|
1865
|
+
cleanDir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Clean output directory before emitting output")),
|
|
1866
|
+
keepNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Keep function and class names after bundling")),
|
|
1867
|
+
strictExecutionOrder: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Lets modules be executed in the order they are declared.")),
|
|
1868
|
+
strict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("auto")])), /* @__PURE__ */ description("Whether to always output `\"use strict\"` directive in non-ES module outputs.")),
|
|
1869
|
+
globalIdentifiers: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Reserved global identifiers to be avoided when generating export binding names for module chunks"))
|
|
1910
1870
|
});
|
|
1911
1871
|
isTypeTrue();
|
|
1912
1872
|
const getAddonDescription = (placement, wrapper) => {
|
|
1913
1873
|
return `Code to insert the ${styleText$1("bold", placement)} of the bundled file (${styleText$1("bold", wrapper)} the wrapper function)`;
|
|
1914
1874
|
};
|
|
1915
|
-
const OutputCliOverrideSchema = strictObject({
|
|
1916
|
-
assetFileNames: pipe(optional(string()), description("Name pattern for asset files")),
|
|
1917
|
-
entryFileNames: pipe(optional(string()), description("Name pattern for emitted entry chunks")),
|
|
1918
|
-
chunkFileNames: pipe(optional(string()), description("Name pattern for emitted secondary chunks")),
|
|
1919
|
-
sanitizeFileName: pipe(optional(boolean()), description("Sanitize file name")),
|
|
1920
|
-
banner: pipe(optional(string()), description(getAddonDescription("top", "outside"))),
|
|
1921
|
-
footer: pipe(optional(string()), description(getAddonDescription("bottom", "outside"))),
|
|
1922
|
-
postBanner: pipe(optional(string()), description("A string to prepend to the top of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
1923
|
-
postFooter: pipe(optional(string()), description("A string to append to the bottom of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
1924
|
-
intro: pipe(optional(string()), description(getAddonDescription("top", "inside"))),
|
|
1925
|
-
outro: pipe(optional(string()), description(getAddonDescription("bottom", "inside"))),
|
|
1926
|
-
esModule: pipe(optional(boolean()), description("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")),
|
|
1927
|
-
globals: pipe(optional(record(string(), string())), description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
|
|
1928
|
-
codeSplitting: pipe(optional(union([boolean(), strictObject({
|
|
1929
|
-
minSize: pipe(optional(number()), description("Minimum size of the chunk")),
|
|
1930
|
-
minShareCount: pipe(optional(number()), description("Minimum share count of the chunk"))
|
|
1931
|
-
})])), description("Code splitting options (true, false, or object)")),
|
|
1932
|
-
advancedChunks: pipe(optional(strictObject({
|
|
1933
|
-
minSize: pipe(optional(number()), description("Minimum size of the chunk")),
|
|
1934
|
-
minShareCount: pipe(optional(number()), description("Minimum share count of the chunk"))
|
|
1935
|
-
})), description("Deprecated: use codeSplitting instead")),
|
|
1936
|
-
minify: pipe(optional(boolean()), description("Minify the bundled file"))
|
|
1875
|
+
const OutputCliOverrideSchema = /* @__PURE__ */ strictObject({
|
|
1876
|
+
assetFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for asset files")),
|
|
1877
|
+
entryFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for emitted entry chunks")),
|
|
1878
|
+
chunkFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for emitted secondary chunks")),
|
|
1879
|
+
sanitizeFileName: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Sanitize file name")),
|
|
1880
|
+
banner: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("top", "outside"))),
|
|
1881
|
+
footer: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("bottom", "outside"))),
|
|
1882
|
+
postBanner: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("A string to prepend to the top of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
1883
|
+
postFooter: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("A string to append to the bottom of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
1884
|
+
intro: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("top", "inside"))),
|
|
1885
|
+
outro: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("bottom", "inside"))),
|
|
1886
|
+
esModule: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")),
|
|
1887
|
+
globals: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())), /* @__PURE__ */ description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
|
|
1888
|
+
codeSplitting: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1889
|
+
minSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum size of the chunk")),
|
|
1890
|
+
minShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum share count of the chunk"))
|
|
1891
|
+
})])), /* @__PURE__ */ description("Code splitting options (true, false, or object)")),
|
|
1892
|
+
advancedChunks: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
|
|
1893
|
+
minSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum size of the chunk")),
|
|
1894
|
+
minShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum share count of the chunk"))
|
|
1895
|
+
})), /* @__PURE__ */ description("Deprecated: use codeSplitting instead")),
|
|
1896
|
+
minify: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Minify the bundled file"))
|
|
1937
1897
|
});
|
|
1938
|
-
const OutputCliOptionsSchema = omit(strictObject({
|
|
1898
|
+
const OutputCliOptionsSchema = /* @__PURE__ */ omit(/* @__PURE__ */ strictObject({
|
|
1939
1899
|
...OutputOptionsSchema.entries,
|
|
1940
1900
|
...OutputCliOverrideSchema.entries
|
|
1941
1901
|
}), [
|
|
@@ -1944,17 +1904,17 @@ const OutputCliOptionsSchema = omit(strictObject({
|
|
|
1944
1904
|
"plugins",
|
|
1945
1905
|
"hoistTransitiveImports"
|
|
1946
1906
|
]);
|
|
1947
|
-
const CliOptionsSchema = strictObject({
|
|
1948
|
-
config: pipe(optional(union([string(), boolean()])), description("Path to the config file (default: `rolldown.config.js`)")),
|
|
1949
|
-
help: pipe(optional(boolean()), description("Show help")),
|
|
1950
|
-
environment: pipe(optional(union([string(), array(string())])), description("Pass additional settings to the config file via process.ENV.")),
|
|
1951
|
-
version: pipe(optional(boolean()), description("Show version number")),
|
|
1952
|
-
watch: pipe(optional(boolean()), description("Watch files in bundle and rebuild on changes")),
|
|
1907
|
+
const CliOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1908
|
+
config: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ boolean()])), /* @__PURE__ */ description("Path to the config file (default: `rolldown.config.js`)")),
|
|
1909
|
+
help: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Show help")),
|
|
1910
|
+
environment: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])), /* @__PURE__ */ description("Pass additional settings to the config file via process.ENV.")),
|
|
1911
|
+
version: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Show version number")),
|
|
1912
|
+
watch: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Watch files in bundle and rebuild on changes")),
|
|
1953
1913
|
...InputCliOptionsSchema.entries,
|
|
1954
1914
|
...OutputCliOptionsSchema.entries
|
|
1955
1915
|
});
|
|
1956
1916
|
function validateCliOptions(options) {
|
|
1957
|
-
let parsed = safeParse(CliOptionsSchema, options);
|
|
1917
|
+
let parsed = /* @__PURE__ */ safeParse(CliOptionsSchema, options);
|
|
1958
1918
|
return [parsed.output, parsed.issues?.map((issue) => {
|
|
1959
1919
|
return `Invalid value for option ${issue.path?.map((pathItem) => pathItem.key).join(" ")}: ${issue.message}`;
|
|
1960
1920
|
})];
|
|
@@ -1967,7 +1927,7 @@ const outputHelperMsgRecord = {};
|
|
|
1967
1927
|
function validateOption(key, options) {
|
|
1968
1928
|
if (typeof options !== "object") throw new Error(`Invalid ${key} options. Expected an Object but received ${JSON.stringify(options)}.`);
|
|
1969
1929
|
if (globalThis.process?.env?.ROLLUP_TEST) return;
|
|
1970
|
-
let parsed = safeParse(key === "input" ? InputOptionsSchema : OutputOptionsSchema, options);
|
|
1930
|
+
let parsed = /* @__PURE__ */ safeParse(key === "input" ? InputOptionsSchema : OutputOptionsSchema, options);
|
|
1971
1931
|
if (!parsed.success) {
|
|
1972
1932
|
const errors = parsed.issues.map((issue) => {
|
|
1973
1933
|
let issueMsg = issue.message;
|
|
@@ -1988,15 +1948,14 @@ function validateOption(key, options) {
|
|
|
1988
1948
|
}
|
|
1989
1949
|
}
|
|
1990
1950
|
function getInputCliKeys() {
|
|
1991
|
-
return keyof(InputCliOptionsSchema).options;
|
|
1951
|
+
return (/* @__PURE__ */ keyof(InputCliOptionsSchema)).options;
|
|
1992
1952
|
}
|
|
1993
1953
|
function getOutputCliKeys() {
|
|
1994
|
-
return keyof(OutputCliOptionsSchema).options;
|
|
1954
|
+
return (/* @__PURE__ */ keyof(OutputCliOptionsSchema)).options;
|
|
1995
1955
|
}
|
|
1996
1956
|
function getCliSchemaInfo() {
|
|
1997
1957
|
return flattenValibotSchema(CliOptionsSchema);
|
|
1998
1958
|
}
|
|
1999
|
-
|
|
2000
1959
|
//#endregion
|
|
2001
1960
|
//#region src/types/rolldown-output-impl.ts
|
|
2002
1961
|
var RolldownOutputImpl = class extends PlainObjectLike {
|
|
@@ -2020,7 +1979,6 @@ var RolldownOutputImpl = class extends PlainObjectLike {
|
|
|
2020
1979
|
}
|
|
2021
1980
|
};
|
|
2022
1981
|
__decorate([lazyProp], RolldownOutputImpl.prototype, "output", null);
|
|
2023
|
-
|
|
2024
1982
|
//#endregion
|
|
2025
1983
|
//#region src/types/chunking-context.ts
|
|
2026
1984
|
var ChunkingContextImpl = class {
|
|
@@ -2036,7 +1994,6 @@ var ChunkingContextImpl = class {
|
|
|
2036
1994
|
return null;
|
|
2037
1995
|
}
|
|
2038
1996
|
};
|
|
2039
|
-
|
|
2040
1997
|
//#endregion
|
|
2041
1998
|
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs
|
|
2042
1999
|
const LogLevels = {
|
|
@@ -2422,7 +2379,6 @@ Consola.prototype.resume = Consola.prototype.resumeLogs;
|
|
|
2422
2379
|
function createConsola$1(options = {}) {
|
|
2423
2380
|
return new Consola(options);
|
|
2424
2381
|
}
|
|
2425
|
-
|
|
2426
2382
|
//#endregion
|
|
2427
2383
|
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
|
|
2428
2384
|
function parseStack(stack, message) {
|
|
@@ -2482,7 +2438,6 @@ ${indent}`);
|
|
|
2482
2438
|
}) + "\n", logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
|
|
2483
2439
|
}
|
|
2484
2440
|
};
|
|
2485
|
-
|
|
2486
2441
|
//#endregion
|
|
2487
2442
|
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
|
|
2488
2443
|
const { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
|
|
@@ -2671,7 +2626,6 @@ function box(text, _opts = {}) {
|
|
|
2671
2626
|
if (opts.style.marginBottom > 0) boxLines.push("".repeat(opts.style.marginBottom));
|
|
2672
2627
|
return boxLines.join("\n");
|
|
2673
2628
|
}
|
|
2674
|
-
|
|
2675
2629
|
//#endregion
|
|
2676
2630
|
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs
|
|
2677
2631
|
const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r : globalThis), o = new Proxy(r, {
|
|
@@ -2976,7 +2930,7 @@ function createConsola(options = {}) {
|
|
|
2976
2930
|
defaults: { level },
|
|
2977
2931
|
stdout: process.stdout,
|
|
2978
2932
|
stderr: process.stderr,
|
|
2979
|
-
prompt: (...args) => import("./prompt-
|
|
2933
|
+
prompt: (...args) => import("./prompt-BYQIwEjg.mjs").then((m) => m.prompt(...args)),
|
|
2980
2934
|
reporters: options.reporters || [options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
|
|
2981
2935
|
...options
|
|
2982
2936
|
});
|
|
@@ -2986,8 +2940,7 @@ function _getDefaultLogLevel() {
|
|
|
2986
2940
|
if (R) return LogLevels.warn;
|
|
2987
2941
|
return LogLevels.info;
|
|
2988
2942
|
}
|
|
2989
|
-
|
|
2990
|
-
|
|
2943
|
+
createConsola();
|
|
2991
2944
|
//#endregion
|
|
2992
2945
|
//#region src/cli/logger.ts
|
|
2993
2946
|
/**
|
|
@@ -3015,7 +2968,6 @@ function createTestingLogger() {
|
|
|
3015
2968
|
for (const type of types) ret[type] = (...args) => console.log(...args);
|
|
3016
2969
|
return ret;
|
|
3017
2970
|
}
|
|
3018
|
-
|
|
3019
2971
|
//#endregion
|
|
3020
2972
|
//#region src/utils/bindingify-output-options.ts
|
|
3021
2973
|
function bindingifyOutputOptions(outputOptions) {
|
|
@@ -3065,6 +3017,7 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
3065
3017
|
minifyInternalExports: outputOptions.minifyInternalExports,
|
|
3066
3018
|
cleanDir,
|
|
3067
3019
|
strictExecutionOrder,
|
|
3020
|
+
strict: outputOptions.strict,
|
|
3068
3021
|
globalIdentifiers
|
|
3069
3022
|
};
|
|
3070
3023
|
}
|
|
@@ -3166,7 +3119,6 @@ function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, adva
|
|
|
3166
3119
|
advancedChunks: advancedChunksResult
|
|
3167
3120
|
};
|
|
3168
3121
|
}
|
|
3169
|
-
|
|
3170
3122
|
//#endregion
|
|
3171
3123
|
//#region src/utils/initialize-parallel-plugins.ts
|
|
3172
3124
|
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
@@ -3229,23 +3181,24 @@ const availableParallelism = () => {
|
|
|
3229
3181
|
}
|
|
3230
3182
|
return Math.min(availableParallelism, 8);
|
|
3231
3183
|
};
|
|
3232
|
-
|
|
3233
3184
|
//#endregion
|
|
3234
3185
|
//#region src/utils/create-bundler-option.ts
|
|
3235
3186
|
async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
3236
3187
|
const inputPlugins = await normalizePluginOption(inputOptions.plugins);
|
|
3237
3188
|
const outputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
3238
|
-
const logLevel = inputOptions.logLevel ||
|
|
3189
|
+
const logLevel = inputOptions.logLevel || "info";
|
|
3239
3190
|
const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
3240
3191
|
outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
|
|
3241
|
-
const
|
|
3242
|
-
|
|
3192
|
+
const hookOutputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
3193
|
+
const normalizedInputPlugins = normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX);
|
|
3194
|
+
const normalizedOutputPlugins = normalizePlugins(hookOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX);
|
|
3195
|
+
let plugins = [...normalizedInputPlugins, ...checkOutputPluginOption(normalizedOutputPlugins, onLog)];
|
|
3243
3196
|
const parallelPluginInitResult = await initializeParallelPlugins(plugins);
|
|
3244
3197
|
if (inputOptions.experimental?.strictExecutionOrder !== void 0) console.warn("`experimental.strictExecutionOrder` has been stabilized and moved to `output.strictExecutionOrder`. Please update your configuration.");
|
|
3245
3198
|
try {
|
|
3246
3199
|
return {
|
|
3247
3200
|
bundlerOptions: {
|
|
3248
|
-
inputOptions: bindingifyInputOptions(plugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode),
|
|
3201
|
+
inputOptions: bindingifyInputOptions(plugins, inputOptions, outputOptions, normalizedInputPlugins, normalizedOutputPlugins, onLog, logLevel, watchMode),
|
|
3249
3202
|
outputOptions: bindingifyOutputOptions(outputOptions),
|
|
3250
3203
|
parallelPluginsRegistry: parallelPluginInitResult?.registry
|
|
3251
3204
|
},
|
|
@@ -3258,7 +3211,6 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
|
3258
3211
|
throw e;
|
|
3259
3212
|
}
|
|
3260
3213
|
}
|
|
3261
|
-
|
|
3262
3214
|
//#endregion
|
|
3263
3215
|
//#region src/api/rolldown/rolldown-build.ts
|
|
3264
3216
|
Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
|
|
@@ -3293,7 +3245,7 @@ var RolldownBuild = class RolldownBuild {
|
|
|
3293
3245
|
*
|
|
3294
3246
|
* @param outputOptions The output options.
|
|
3295
3247
|
* @returns The generated bundle.
|
|
3296
|
-
* @throws {@linkcode
|
|
3248
|
+
* @throws {@linkcode BundleError} When an error occurs during the build.
|
|
3297
3249
|
*/
|
|
3298
3250
|
async generate(outputOptions = {}) {
|
|
3299
3251
|
return this.#build(false, outputOptions);
|
|
@@ -3305,7 +3257,7 @@ var RolldownBuild = class RolldownBuild {
|
|
|
3305
3257
|
*
|
|
3306
3258
|
* @param outputOptions The output options.
|
|
3307
3259
|
* @returns The generated bundle.
|
|
3308
|
-
* @throws {@linkcode
|
|
3260
|
+
* @throws {@linkcode BundleError} When an error occurs during the build.
|
|
3309
3261
|
*/
|
|
3310
3262
|
async write(outputOptions = {}) {
|
|
3311
3263
|
return this.#build(true, outputOptions);
|
|
@@ -3362,6 +3314,5 @@ var RolldownBuild = class RolldownBuild {
|
|
|
3362
3314
|
}
|
|
3363
3315
|
}
|
|
3364
3316
|
};
|
|
3365
|
-
|
|
3366
3317
|
//#endregion
|
|
3367
|
-
export { getInputCliKeys as a, validateOption as c, getCliSchemaInfo as i, styleText$1 as l, createBundlerOptions as n, getOutputCliKeys as o, logger as r, validateCliOptions as s, RolldownBuild as t, PluginDriver as u };
|
|
3318
|
+
export { getInputCliKeys as a, validateOption as c, getCliSchemaInfo as i, styleText$1 as l, createBundlerOptions as n, getOutputCliKeys as o, logger as r, validateCliOptions as s, RolldownBuild as t, PluginDriver as u };
|