@rollipop/rolldown 1.0.0-rc.3 → 1.0.0-rc.5

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.
Files changed (42) hide show
  1. package/bin/cli.mjs +0 -1
  2. package/dist/cli.mjs +11 -22
  3. package/dist/config.d.mts +2 -2
  4. package/dist/config.mjs +10 -11
  5. package/dist/experimental-index.d.mts +26 -6
  6. package/dist/experimental-index.mjs +39 -22
  7. package/dist/filter-index.d.mts +2 -2
  8. package/dist/filter-index.mjs +2 -8
  9. package/dist/get-log-filter.mjs +1 -2
  10. package/dist/index.d.mts +3 -3
  11. package/dist/index.mjs +10 -13
  12. package/dist/parallel-plugin-worker.mjs +7 -9
  13. package/dist/parallel-plugin.d.mts +2 -2
  14. package/dist/parallel-plugin.mjs +1 -2
  15. package/dist/parse-ast-index.d.mts +1 -1
  16. package/dist/parse-ast-index.mjs +4 -6
  17. package/dist/plugins-index.d.mts +3 -3
  18. package/dist/plugins-index.mjs +4 -6
  19. package/dist/shared/{binding-D25Pz9Tj.mjs → binding-BpAdsRMp.mjs} +33 -42
  20. package/dist/shared/{binding-C4ZlFAt6.d.mts → binding-MOe7QjvW.d.mts} +22 -6
  21. package/dist/shared/{bindingify-input-options-D6jfpJ6l.mjs → bindingify-input-options-DlgCN9zc.mjs} +36 -58
  22. package/dist/shared/{constructors-C-tyKVjw.d.mts → constructors-BVMsBEI4.d.mts} +2 -2
  23. package/dist/shared/{constructors-BAGdj697.mjs → constructors-ByA8Vmcs.mjs} +2 -4
  24. package/dist/shared/{define-config-BKLqq_zt.d.mts → define-config-D2erlXSV.d.mts} +75 -30
  25. package/dist/shared/{define-config-BMj_QknW.mjs → define-config-DJOr6Iwt.mjs} +1 -2
  26. package/dist/shared/{error-BoaGIj5N.mjs → error-Rnftw-T1.mjs} +3 -8
  27. package/dist/shared/{load-config-CV5K8wKJ.mjs → load-config-C1TxsD8r.mjs} +2 -4
  28. package/dist/shared/{logs-CCc_0vhs.mjs → logs-D80CXhvg.mjs} +5 -8
  29. package/dist/shared/{misc-Xty885dB.mjs → misc-DJYbNKZX.mjs} +1 -2
  30. package/dist/shared/{normalize-string-or-regex-tBSnk6HY.mjs → normalize-string-or-regex-BFIgWR19.mjs} +3 -6
  31. package/dist/shared/{parse-DWZRPGsB.mjs → parse-BuECM1WH.mjs} +2 -5
  32. package/dist/shared/{prompt-B56gTa4S.mjs → prompt-BYQIwEjg.mjs} +1 -3
  33. package/dist/shared/{rolldown-CZ1SIh-x.mjs → rolldown-BpbRpba4.mjs} +2 -4
  34. package/dist/shared/{rolldown-build-BYA-VVk0.mjs → rolldown-build-Cc7GWaEw.mjs} +427 -473
  35. package/dist/shared/{transform-CIcvJTbn.mjs → transform-CFiExOzd.mjs} +3 -6
  36. package/dist/shared/{transform-DoG7c5_r.d.mts → transform-DKslvixZ.d.mts} +1 -1
  37. package/dist/shared/{watch-DV7vV2OV.mjs → watch-BBA-reCD.mjs} +71 -77
  38. package/dist/utils-index.d.mts +2 -2
  39. package/dist/utils-index.mjs +9 -18
  40. package/package.json +12 -12
  41. package/dist/cli-setup.d.mts +0 -1
  42. package/dist/cli-setup.mjs +0 -17
@@ -1,16 +1,15 @@
1
- import { n as __toESM, t as require_binding } from "./binding-D25Pz9Tj.mjs";
2
- import { i as logInputHookInOutputPlugin, n as error } from "./logs-CCc_0vhs.mjs";
3
- import { n as BuiltinPlugin } from "./normalize-string-or-regex-tBSnk6HY.mjs";
4
- import { _ as LOG_LEVEL_WARN, a as transformToRollupOutput, b as VERSION, c as transformAssetSource, d as MinimalPluginContextImpl, f as normalizeHook, g as LOG_LEVEL_INFO, h as LOG_LEVEL_ERROR, 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-D6jfpJ6l.mjs";
5
- import { i as unimplemented } from "./misc-Xty885dB.mjs";
6
- import { i as unwrapBindingResult } from "./error-BoaGIj5N.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-BpAdsRMp.mjs";
2
+ import { i as logInputHookInOutputPlugin, n as error } from "./logs-D80CXhvg.mjs";
3
+ import { n as BuiltinPlugin } from "./normalize-string-or-regex-BFIgWR19.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-DlgCN9zc.mjs";
5
+ import { i as unimplemented } from "./misc-DJYbNKZX.mjs";
6
+ import { i as unwrapBindingResult } from "./error-Rnftw-T1.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(LOG_LEVEL_DEBUG),
27
+ debug: getLogHandler("debug"),
29
28
  error: (log) => error(normalizeLog(log)),
30
- info: getLogHandler(LOG_LEVEL_INFO),
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(LOG_LEVEL_WARN),
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 === LOG_LEVEL_ERROR) return error(normalizeLog(handledLog));
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 === LOG_LEVEL_WARN) onwarn(addLogToString(log), (warning) => printLog(LOG_LEVEL_WARN, normalizeLog(warning)));
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 || LOG_LEVEL_INFO;
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,332 @@ 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 RewriteImportExtensionsSchema = union([
1515
- literal("rewrite"),
1516
- literal("remove"),
1517
- boolean()
1518
- ]);
1519
- const TypescriptSchema = object({
1520
- jsxPragma: optional(string()),
1521
- jsxPragmaFrag: optional(string()),
1522
- onlyRemoveTypeImports: optional(boolean()),
1523
- allowNamespaces: optional(boolean()),
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(RewriteImportExtensionsSchema)
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 WatcherOptionsSchema = strictObject({
1566
- chokidar: optional(never(`The "watch.chokidar" option is deprecated, please use "watch.notify" instead of it`)),
1567
- exclude: optional(union([StringOrRegExpSchema, array(StringOrRegExpSchema)])),
1568
- include: optional(union([StringOrRegExpSchema, array(StringOrRegExpSchema)])),
1569
- notify: pipe(optional(strictObject({
1570
- compareContents: optional(boolean()),
1571
- pollInterval: optional(number())
1572
- })), description("Notify options")),
1573
- skipWrite: pipe(optional(boolean()), description("Skip the bundle.write() step")),
1574
- buildDelay: pipe(optional(number()), description("Throttle watch rebuilds")),
1575
- clearScreen: pipe(optional(boolean()), description("Whether to clear the screen when a rebuild is triggered")),
1576
- onInvalidate: pipe(optional(vFunction()), description("An optional function that will be called immediately every time a module changes that is part of the build."))
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.")),
1711
+ id: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Unique identifier for build task"))
1752
1712
  });
1753
1713
  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."))
1714
+ const InputCliOverrideSchema = /* @__PURE__ */ strictObject({
1715
+ input: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Entry file")),
1716
+ external: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
1717
+ treeshake: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("enable treeshaking")),
1718
+ makeAbsoluteExternalsRelative: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Prevent normalization of external imports")),
1719
+ preserveEntrySignatures: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ literal(false)), /* @__PURE__ */ description("Avoid facade chunks for entry points")),
1720
+ context: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("The entity top-level `this` represents."))
1761
1721
  });
1762
- const InputCliOptionsSchema = omit(strictObject({
1722
+ const InputCliOptionsSchema = /* @__PURE__ */ omit(/* @__PURE__ */ strictObject({
1763
1723
  ...InputOptionsSchema.entries,
1764
1724
  ...InputCliOverrideSchema.entries
1765
1725
  }), [
@@ -1770,172 +1730,174 @@ const InputCliOptionsSchema = omit(strictObject({
1770
1730
  "experimental",
1771
1731
  "watch"
1772
1732
  ]);
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")
1733
+ const ModuleFormatSchema = /* @__PURE__ */ union([
1734
+ /* @__PURE__ */ literal("es"),
1735
+ /* @__PURE__ */ literal("cjs"),
1736
+ /* @__PURE__ */ literal("esm"),
1737
+ /* @__PURE__ */ literal("module"),
1738
+ /* @__PURE__ */ literal("commonjs"),
1739
+ /* @__PURE__ */ literal("iife"),
1740
+ /* @__PURE__ */ literal("umd")
1781
1741
  ]);
1782
1742
  isTypeTrue();
1783
- const AddonFunctionSchema = pipe(vFunction(), args(tuple([custom(() => true)])), returnsAsync(unionAsync([string(), pipeAsync(promise(), awaitAsync(), string())])));
1743
+ 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
1744
  isTypeTrue();
1785
- const ChunkFileNamesFunctionSchema = pipe(vFunction(), args(tuple([custom(() => true)])), returns(string()));
1745
+ const ChunkFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
1786
1746
  isTypeTrue();
1787
- const ChunkFileNamesSchema = union([string(), ChunkFileNamesFunctionSchema]);
1788
- const AssetFileNamesFunctionSchema = pipe(vFunction(), args(tuple([custom(() => true)])), returns(string()));
1747
+ const ChunkFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), ChunkFileNamesFunctionSchema]);
1748
+ const AssetFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
1789
1749
  isTypeTrue();
1790
- const AssetFileNamesSchema = union([string(), AssetFileNamesFunctionSchema]);
1791
- const SanitizeFileNameFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(string()));
1750
+ const AssetFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), AssetFileNamesFunctionSchema]);
1751
+ const SanitizeFileNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
1792
1752
  isTypeTrue();
1793
- const SanitizeFileNameSchema = union([boolean(), SanitizeFileNameFunctionSchema]);
1794
- const GlobalsFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(string()));
1753
+ const SanitizeFileNameSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), SanitizeFileNameFunctionSchema]);
1754
+ const GlobalsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
1795
1755
  isTypeTrue();
1796
- const PathsFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(string()));
1756
+ const PathsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
1797
1757
  isTypeTrue();
1798
- const ManualChunksFunctionSchema = pipe(vFunction(), args(tuple([string(), object({})])), returns(nullish(string())));
1758
+ const ManualChunksFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));
1799
1759
  isTypeTrue();
1800
- const AdvancedChunksNameFunctionSchema = pipe(vFunction(), args(tuple([string(), object({})])), returns(nullish(string())));
1760
+ const AdvancedChunksNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));
1801
1761
  isTypeTrue();
1802
- const AdvancedChunksTestFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(union([
1803
- boolean(),
1804
- void_(),
1805
- undefined_()
1762
+ const AdvancedChunksTestFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ union([
1763
+ /* @__PURE__ */ boolean(),
1764
+ /* @__PURE__ */ void_(),
1765
+ /* @__PURE__ */ undefined_()
1806
1766
  ])));
1807
1767
  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())
1768
+ const AdvancedChunksSchema = /* @__PURE__ */ strictObject({
1769
+ includeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1770
+ minSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1771
+ maxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1772
+ minModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1773
+ maxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1774
+ minShareCount: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1775
+ groups: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ strictObject({
1776
+ name: /* @__PURE__ */ union([/* @__PURE__ */ string(), AdvancedChunksNameFunctionSchema]),
1777
+ test: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, AdvancedChunksTestFunctionSchema])),
1778
+ priority: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1779
+ minSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1780
+ minShareCount: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1781
+ maxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1782
+ minModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1783
+ maxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1784
+ entriesAware: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1785
+ entriesAwareMergeThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ number())
1826
1786
  })))
1827
1787
  });
1828
1788
  isTypeTrue();
1829
- const GeneratedCodePresetSchema = union([literal("es5"), literal("es2015")]);
1789
+ const GeneratedCodePresetSchema = /* @__PURE__ */ union([/* @__PURE__ */ literal("es5"), /* @__PURE__ */ literal("es2015")]);
1830
1790
  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"))
1791
+ const GeneratedCodeOptionsSchema = /* @__PURE__ */ strictObject({
1792
+ symbols: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to use Symbol.toStringTag for namespace objects")),
1793
+ preset: /* @__PURE__ */ optional(GeneratedCodePresetSchema),
1794
+ profilerNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to add readable names to internal variables for profiling purposes"))
1835
1795
  });
1836
1796
  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),
1797
+ const OutputOptionsSchema = /* @__PURE__ */ strictObject({
1798
+ dir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Output directory, defaults to `dist` if `file` is not set")),
1799
+ file: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Single output file")),
1800
+ exports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
1801
+ /* @__PURE__ */ literal("auto"),
1802
+ /* @__PURE__ */ literal("named"),
1803
+ /* @__PURE__ */ literal("default"),
1804
+ /* @__PURE__ */ literal("none")
1805
+ ])), /* @__PURE__ */ description(`Specify a export mode (${styleText$1("underline", "auto")}, named, default, none)`)),
1806
+ hashCharacters: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
1807
+ /* @__PURE__ */ literal("base64"),
1808
+ /* @__PURE__ */ literal("base36"),
1809
+ /* @__PURE__ */ literal("hex")
1810
+ ])), /* @__PURE__ */ description("Use the specified character set for file hashes")),
1811
+ format: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ModuleFormatSchema), /* @__PURE__ */ description(`Output format of the generated bundle (supports ${styleText$1("underline", "esm")}, cjs, and iife)`)),
1812
+ sourcemap: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
1813
+ /* @__PURE__ */ boolean(),
1814
+ /* @__PURE__ */ literal("inline"),
1815
+ /* @__PURE__ */ literal("hidden")
1816
+ ])), /* @__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")})`)),
1817
+ sourcemapBaseUrl: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Base URL used to prefix sourcemap paths")),
1818
+ sourcemapDebugIds: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Inject sourcemap debug IDs")),
1819
+ sourcemapIgnoreList: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1820
+ /* @__PURE__ */ boolean(),
1821
+ /* @__PURE__ */ custom(() => true),
1862
1822
  StringOrRegExpSchema
1863
1823
  ])),
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"),
1824
+ sourcemapPathTransform: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
1825
+ banner: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
1826
+ footer: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
1827
+ postBanner: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
1828
+ postFooter: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
1829
+ intro: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
1830
+ outro: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
1831
+ extend: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Extend global variable defined by name in IIFE / UMD formats")),
1832
+ esModule: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("if-default-prop")])),
1833
+ assetFileNames: /* @__PURE__ */ optional(AssetFileNamesSchema),
1834
+ entryFileNames: /* @__PURE__ */ optional(ChunkFileNamesSchema),
1835
+ chunkFileNames: /* @__PURE__ */ optional(ChunkFileNamesSchema),
1836
+ sanitizeFileName: /* @__PURE__ */ optional(SanitizeFileNameSchema),
1837
+ minify: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
1838
+ /* @__PURE__ */ boolean(),
1839
+ /* @__PURE__ */ literal("dce-only"),
1880
1840
  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
- globalIdentifiers: pipe(optional(array(string())), description("Reserved global identifiers to be avoided when generating export binding names for module chunks"))
1841
+ ])), /* @__PURE__ */ description("Minify the bundled file")),
1842
+ name: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name for UMD / IIFE format outputs")),
1843
+ 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`)")),
1844
+ paths: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string()), PathsFunctionSchema])), /* @__PURE__ */ description("Maps external module IDs to paths")),
1845
+ generatedCode: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ partial(GeneratedCodeOptionsSchema)), /* @__PURE__ */ description("Generated code options")),
1846
+ externalLiveBindings: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("external live bindings")),
1847
+ inlineDynamicImports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Inline dynamic imports")),
1848
+ dynamicImportInCjs: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Dynamic import in CJS output")),
1849
+ manualChunks: /* @__PURE__ */ optional(ManualChunksFunctionSchema),
1850
+ codeSplitting: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), AdvancedChunksSchema])),
1851
+ advancedChunks: /* @__PURE__ */ optional(AdvancedChunksSchema),
1852
+ legalComments: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("none"), /* @__PURE__ */ literal("inline")])), /* @__PURE__ */ description("Control legal comments in the output")),
1853
+ comments: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
1854
+ legal: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1855
+ annotation: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1856
+ jsdoc: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1857
+ })])), /* @__PURE__ */ description("Control comments in the output")),
1858
+ plugins: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
1859
+ polyfillRequire: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Disable require polyfill injection")),
1860
+ hoistTransitiveImports: /* @__PURE__ */ optional(/* @__PURE__ */ literal(false)),
1861
+ preserveModules: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Preserve module structure")),
1862
+ preserveModulesRoot: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Put preserved modules under this path at root level")),
1863
+ virtualDirname: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1864
+ minifyInternalExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Minify internal exports")),
1865
+ topLevelVar: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Rewrite top-level declarations to use `var`.")),
1866
+ cleanDir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Clean output directory before emitting output")),
1867
+ keepNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Keep function and class names after bundling")),
1868
+ strictExecutionOrder: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Lets modules be executed in the order they are declared.")),
1869
+ 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.")),
1870
+ persistentCache: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Enable persistent transform cache to disk.")),
1871
+ 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
1872
  });
1911
1873
  isTypeTrue();
1912
1874
  const getAddonDescription = (placement, wrapper) => {
1913
1875
  return `Code to insert the ${styleText$1("bold", placement)} of the bundled file (${styleText$1("bold", wrapper)} the wrapper function)`;
1914
1876
  };
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"))
1877
+ const OutputCliOverrideSchema = /* @__PURE__ */ strictObject({
1878
+ assetFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for asset files")),
1879
+ entryFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for emitted entry chunks")),
1880
+ chunkFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for emitted secondary chunks")),
1881
+ sanitizeFileName: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Sanitize file name")),
1882
+ banner: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("top", "outside"))),
1883
+ footer: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("bottom", "outside"))),
1884
+ 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")),
1885
+ 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")),
1886
+ intro: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("top", "inside"))),
1887
+ outro: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("bottom", "inside"))),
1888
+ 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)")),
1889
+ globals: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())), /* @__PURE__ */ description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
1890
+ codeSplitting: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
1891
+ minSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum size of the chunk")),
1892
+ minShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum share count of the chunk"))
1893
+ })])), /* @__PURE__ */ description("Code splitting options (true, false, or object)")),
1894
+ advancedChunks: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
1895
+ minSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum size of the chunk")),
1896
+ minShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum share count of the chunk"))
1897
+ })), /* @__PURE__ */ description("Deprecated: use codeSplitting instead")),
1898
+ minify: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Minify the bundled file"))
1937
1899
  });
1938
- const OutputCliOptionsSchema = omit(strictObject({
1900
+ const OutputCliOptionsSchema = /* @__PURE__ */ omit(/* @__PURE__ */ strictObject({
1939
1901
  ...OutputOptionsSchema.entries,
1940
1902
  ...OutputCliOverrideSchema.entries
1941
1903
  }), [
@@ -1944,17 +1906,17 @@ const OutputCliOptionsSchema = omit(strictObject({
1944
1906
  "plugins",
1945
1907
  "hoistTransitiveImports"
1946
1908
  ]);
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")),
1909
+ const CliOptionsSchema = /* @__PURE__ */ strictObject({
1910
+ config: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ boolean()])), /* @__PURE__ */ description("Path to the config file (default: `rolldown.config.js`)")),
1911
+ help: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Show help")),
1912
+ 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.")),
1913
+ version: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Show version number")),
1914
+ watch: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Watch files in bundle and rebuild on changes")),
1953
1915
  ...InputCliOptionsSchema.entries,
1954
1916
  ...OutputCliOptionsSchema.entries
1955
1917
  });
1956
1918
  function validateCliOptions(options) {
1957
- let parsed = safeParse(CliOptionsSchema, options);
1919
+ let parsed = /* @__PURE__ */ safeParse(CliOptionsSchema, options);
1958
1920
  return [parsed.output, parsed.issues?.map((issue) => {
1959
1921
  return `Invalid value for option ${issue.path?.map((pathItem) => pathItem.key).join(" ")}: ${issue.message}`;
1960
1922
  })];
@@ -1967,7 +1929,7 @@ const outputHelperMsgRecord = {};
1967
1929
  function validateOption(key, options) {
1968
1930
  if (typeof options !== "object") throw new Error(`Invalid ${key} options. Expected an Object but received ${JSON.stringify(options)}.`);
1969
1931
  if (globalThis.process?.env?.ROLLUP_TEST) return;
1970
- let parsed = safeParse(key === "input" ? InputOptionsSchema : OutputOptionsSchema, options);
1932
+ let parsed = /* @__PURE__ */ safeParse(key === "input" ? InputOptionsSchema : OutputOptionsSchema, options);
1971
1933
  if (!parsed.success) {
1972
1934
  const errors = parsed.issues.map((issue) => {
1973
1935
  let issueMsg = issue.message;
@@ -1988,15 +1950,14 @@ function validateOption(key, options) {
1988
1950
  }
1989
1951
  }
1990
1952
  function getInputCliKeys() {
1991
- return keyof(InputCliOptionsSchema).options;
1953
+ return (/* @__PURE__ */ keyof(InputCliOptionsSchema)).options;
1992
1954
  }
1993
1955
  function getOutputCliKeys() {
1994
- return keyof(OutputCliOptionsSchema).options;
1956
+ return (/* @__PURE__ */ keyof(OutputCliOptionsSchema)).options;
1995
1957
  }
1996
1958
  function getCliSchemaInfo() {
1997
1959
  return flattenValibotSchema(CliOptionsSchema);
1998
1960
  }
1999
-
2000
1961
  //#endregion
2001
1962
  //#region src/types/rolldown-output-impl.ts
2002
1963
  var RolldownOutputImpl = class extends PlainObjectLike {
@@ -2020,7 +1981,6 @@ var RolldownOutputImpl = class extends PlainObjectLike {
2020
1981
  }
2021
1982
  };
2022
1983
  __decorate([lazyProp], RolldownOutputImpl.prototype, "output", null);
2023
-
2024
1984
  //#endregion
2025
1985
  //#region src/types/chunking-context.ts
2026
1986
  var ChunkingContextImpl = class {
@@ -2036,7 +1996,6 @@ var ChunkingContextImpl = class {
2036
1996
  return null;
2037
1997
  }
2038
1998
  };
2039
-
2040
1999
  //#endregion
2041
2000
  //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs
2042
2001
  const LogLevels = {
@@ -2422,7 +2381,6 @@ Consola.prototype.resume = Consola.prototype.resumeLogs;
2422
2381
  function createConsola$1(options = {}) {
2423
2382
  return new Consola(options);
2424
2383
  }
2425
-
2426
2384
  //#endregion
2427
2385
  //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
2428
2386
  function parseStack(stack, message) {
@@ -2482,7 +2440,6 @@ ${indent}`);
2482
2440
  }) + "\n", logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
2483
2441
  }
2484
2442
  };
2485
-
2486
2443
  //#endregion
2487
2444
  //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
2488
2445
  const { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
@@ -2671,7 +2628,6 @@ function box(text, _opts = {}) {
2671
2628
  if (opts.style.marginBottom > 0) boxLines.push("".repeat(opts.style.marginBottom));
2672
2629
  return boxLines.join("\n");
2673
2630
  }
2674
-
2675
2631
  //#endregion
2676
2632
  //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs
2677
2633
  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 +2932,7 @@ function createConsola(options = {}) {
2976
2932
  defaults: { level },
2977
2933
  stdout: process.stdout,
2978
2934
  stderr: process.stderr,
2979
- prompt: (...args) => import("./prompt-B56gTa4S.mjs").then((m) => m.prompt(...args)),
2935
+ prompt: (...args) => import("./prompt-BYQIwEjg.mjs").then((m) => m.prompt(...args)),
2980
2936
  reporters: options.reporters || [options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
2981
2937
  ...options
2982
2938
  });
@@ -2986,8 +2942,7 @@ function _getDefaultLogLevel() {
2986
2942
  if (R) return LogLevels.warn;
2987
2943
  return LogLevels.info;
2988
2944
  }
2989
- const consola = createConsola();
2990
-
2945
+ createConsola();
2991
2946
  //#endregion
2992
2947
  //#region src/cli/logger.ts
2993
2948
  /**
@@ -3015,7 +2970,6 @@ function createTestingLogger() {
3015
2970
  for (const type of types) ret[type] = (...args) => console.log(...args);
3016
2971
  return ret;
3017
2972
  }
3018
-
3019
2973
  //#endregion
3020
2974
  //#region src/utils/bindingify-output-options.ts
3021
2975
  function bindingifyOutputOptions(outputOptions) {
@@ -3065,6 +3019,8 @@ function bindingifyOutputOptions(outputOptions) {
3065
3019
  minifyInternalExports: outputOptions.minifyInternalExports,
3066
3020
  cleanDir,
3067
3021
  strictExecutionOrder,
3022
+ strict: outputOptions.strict,
3023
+ persistentCache: outputOptions.persistentCache,
3068
3024
  globalIdentifiers
3069
3025
  };
3070
3026
  }
@@ -3166,7 +3122,6 @@ function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, adva
3166
3122
  advancedChunks: advancedChunksResult
3167
3123
  };
3168
3124
  }
3169
-
3170
3125
  //#endregion
3171
3126
  //#region src/utils/initialize-parallel-plugins.ts
3172
3127
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
@@ -3229,23 +3184,24 @@ const availableParallelism = () => {
3229
3184
  }
3230
3185
  return Math.min(availableParallelism, 8);
3231
3186
  };
3232
-
3233
3187
  //#endregion
3234
3188
  //#region src/utils/create-bundler-option.ts
3235
3189
  async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
3236
3190
  const inputPlugins = await normalizePluginOption(inputOptions.plugins);
3237
3191
  const outputPlugins = await normalizePluginOption(outputOptions.plugins);
3238
- const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
3192
+ const logLevel = inputOptions.logLevel || "info";
3239
3193
  const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
3240
3194
  outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
3241
- const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
3242
- let plugins = [...normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX), ...checkOutputPluginOption(normalizePlugins(normalizedOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX), onLog)];
3195
+ const hookOutputPlugins = await normalizePluginOption(outputOptions.plugins);
3196
+ const normalizedInputPlugins = normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX);
3197
+ const normalizedOutputPlugins = normalizePlugins(hookOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX);
3198
+ let plugins = [...normalizedInputPlugins, ...checkOutputPluginOption(normalizedOutputPlugins, onLog)];
3243
3199
  const parallelPluginInitResult = await initializeParallelPlugins(plugins);
3244
3200
  if (inputOptions.experimental?.strictExecutionOrder !== void 0) console.warn("`experimental.strictExecutionOrder` has been stabilized and moved to `output.strictExecutionOrder`. Please update your configuration.");
3245
3201
  try {
3246
3202
  return {
3247
3203
  bundlerOptions: {
3248
- inputOptions: bindingifyInputOptions(plugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode),
3204
+ inputOptions: bindingifyInputOptions(plugins, inputOptions, outputOptions, normalizedInputPlugins, normalizedOutputPlugins, onLog, logLevel, watchMode),
3249
3205
  outputOptions: bindingifyOutputOptions(outputOptions),
3250
3206
  parallelPluginsRegistry: parallelPluginInitResult?.registry
3251
3207
  },
@@ -3258,7 +3214,6 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
3258
3214
  throw e;
3259
3215
  }
3260
3216
  }
3261
-
3262
3217
  //#endregion
3263
3218
  //#region src/api/rolldown/rolldown-build.ts
3264
3219
  Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
@@ -3293,7 +3248,7 @@ var RolldownBuild = class RolldownBuild {
3293
3248
  *
3294
3249
  * @param outputOptions The output options.
3295
3250
  * @returns The generated bundle.
3296
- * @throws {@linkcode RolldownError} When an error occurs during the build.
3251
+ * @throws {@linkcode BundleError} When an error occurs during the build.
3297
3252
  */
3298
3253
  async generate(outputOptions = {}) {
3299
3254
  return this.#build(false, outputOptions);
@@ -3305,7 +3260,7 @@ var RolldownBuild = class RolldownBuild {
3305
3260
  *
3306
3261
  * @param outputOptions The output options.
3307
3262
  * @returns The generated bundle.
3308
- * @throws {@linkcode RolldownError} When an error occurs during the build.
3263
+ * @throws {@linkcode BundleError} When an error occurs during the build.
3309
3264
  */
3310
3265
  async write(outputOptions = {}) {
3311
3266
  return this.#build(true, outputOptions);
@@ -3362,6 +3317,5 @@ var RolldownBuild = class RolldownBuild {
3362
3317
  }
3363
3318
  }
3364
3319
  };
3365
-
3366
3320
  //#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 };
3321
+ 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 };