@rolldown/browser 1.0.0-rc.6 → 1.0.0-rc.7

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 (46) hide show
  1. package/dist/cli.mjs +10 -21
  2. package/dist/config.d.mts +1 -1
  3. package/dist/config.mjs +9 -10
  4. package/dist/{constructors-WyngiSlS.js → constructors-BgL_dmUe.js} +2 -4
  5. package/dist/{error-D4EjR7H_.js → error-DkAP_6fk.js} +1 -6
  6. package/dist/experimental-index.browser.mjs +22 -19
  7. package/dist/experimental-index.d.mts +18 -4
  8. package/dist/experimental-index.mjs +24 -21
  9. package/dist/filter-index.d.mts +1 -1
  10. package/dist/filter-index.mjs +2 -6
  11. package/dist/get-log-filter.mjs +1 -2
  12. package/dist/index.browser.mjs +67 -73
  13. package/dist/index.d.mts +2 -2
  14. package/dist/index.mjs +9 -12
  15. package/dist/{normalize-string-or-regex-B0X1hEA4.js → normalize-string-or-regex-TtAGUp42.js} +5 -11
  16. package/dist/parallel-plugin-worker.mjs +6 -8
  17. package/dist/parallel-plugin.d.mts +1 -1
  18. package/dist/parallel-plugin.mjs +1 -2
  19. package/dist/parse-ast-index.mjs +3 -5
  20. package/dist/plugins-index.browser.mjs +3 -5
  21. package/dist/plugins-index.mjs +3 -5
  22. package/dist/rolldown-binding.wasi-browser.js +0 -1
  23. package/dist/rolldown-binding.wasi.cjs +0 -1
  24. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  25. package/dist/{rolldown-build-DwnjyX40.js → rolldown-build-D97C-VhN.js} +440 -522
  26. package/dist/shared/{bindingify-input-options-CSIYh5O4.mjs → bindingify-input-options-kCVufQp0.mjs} +33 -56
  27. package/dist/shared/{composable-filters-C_jBPRPI.mjs → composable-filters-B2ByPP8y.mjs} +1 -4
  28. package/dist/shared/{constructors-B2viugwd.mjs → constructors-C7Kkidxk.mjs} +2 -4
  29. package/dist/shared/{define-config-DMEhSrNE.d.mts → define-config-Cci3IvO_.d.mts} +65 -29
  30. package/dist/shared/{define-config-BMj_QknW.mjs → define-config-DJOr6Iwt.mjs} +1 -2
  31. package/dist/shared/{error-DDzqVYr_.mjs → error-CQ6njWsV.mjs} +1 -4
  32. package/dist/shared/{load-config-CmC4WvoS.mjs → load-config-DNGVjxdv.mjs} +2 -4
  33. package/dist/shared/{logs-CCc_0vhs.mjs → logs-D80CXhvg.mjs} +5 -8
  34. package/dist/shared/{normalize-string-or-regex-FTOVR1Jb.mjs → normalize-string-or-regex-CF3Uz6aU.mjs} +2 -5
  35. package/dist/shared/{parse-DIZtKd4C.mjs → parse-DDUnGYGU.mjs} +1 -4
  36. package/dist/shared/{prompt-B56gTa4S.mjs → prompt-BYQIwEjg.mjs} +1 -3
  37. package/dist/shared/{rolldown-D7O5_axp.mjs → rolldown-C9kn7lTZ.mjs} +2 -4
  38. package/dist/shared/{rolldown-build-BV90HQts.mjs → rolldown-build-8_xyZuDH.mjs} +423 -472
  39. package/dist/shared/{transform-D49mi4JH.mjs → transform-B_n5An0U.mjs} +2 -5
  40. package/dist/shared/{watch-COON6c2j.mjs → watch-dCFQWE8a.mjs} +69 -75
  41. package/dist/{transform-qJgOBSav.js → transform-UkHb5h4g.js} +2 -5
  42. package/dist/utils-index.browser.mjs +7 -16
  43. package/dist/utils-index.mjs +8 -17
  44. package/package.json +1 -1
  45. package/dist/cli-setup.d.mts +0 -1
  46. package/dist/cli-setup.mjs +0 -16
@@ -1,7 +1,6 @@
1
- import { c as logCycleLoading, f as logNoFileSystemInBrowser, g as getCodeFrame, h as locate, i as bindingifyManifestPlugin, l as logInputHookInOutputPlugin, m as logPluginError, n as BuiltinPlugin, o as augmentCodeLocation, p as logParseError, r as bindingifyBuiltInPlugin, s as error, t as normalizedStringOrRegex, u as logInvalidLogPosition } from "./normalize-string-or-regex-B0X1hEA4.js";
2
- import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-D4EjR7H_.js";
1
+ import { c as logCycleLoading, f as logNoFileSystemInBrowser, g as getCodeFrame, h as locate, i as bindingifyManifestPlugin, l as logInputHookInOutputPlugin, m as logPluginError, n as BuiltinPlugin, o as augmentCodeLocation, p as logParseError, r as bindingifyBuiltInPlugin, s as error, t as normalizedStringOrRegex, u as logInvalidLogPosition } from "./normalize-string-or-regex-TtAGUp42.js";
2
+ import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-DkAP_6fk.js";
3
3
  import { BindingAttachDebugInfo, BindingBundler, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
4
-
5
4
  //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
6
5
  let _lazyMatch = () => {
7
6
  var __lib__ = (() => {
@@ -249,7 +248,6 @@ const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
249
248
  const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
250
249
  const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
251
250
  const _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
252
- const sep = "/";
253
251
  const normalize = function(path) {
254
252
  if (path.length === 0) return ".";
255
253
  path = normalizeWindowsPath(path);
@@ -428,10 +426,9 @@ const _path = {
428
426
  parse: parse$1,
429
427
  relative,
430
428
  resolve,
431
- sep,
429
+ sep: "/",
432
430
  toNamespacedPath
433
431
  };
434
-
435
432
  //#endregion
436
433
  //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs
437
434
  const delimiter = globalThis.process?.platform === "win32" ? ";" : ":";
@@ -449,11 +446,6 @@ const mix = (del = delimiter) => {
449
446
  };
450
447
  const posix = /* @__PURE__ */ mix(":");
451
448
  const win32 = /* @__PURE__ */ mix(";");
452
-
453
- //#endregion
454
- //#region package.json
455
- var version = "1.0.0-rc.6";
456
-
457
449
  //#endregion
458
450
  //#region src/constants/version.ts
459
451
  /**
@@ -462,15 +454,13 @@ var version = "1.0.0-rc.6";
462
454
  *
463
455
  * @category Plugin APIs
464
456
  */
465
- const VERSION = version;
466
-
457
+ const VERSION = "1.0.0-rc.7";
467
458
  //#endregion
468
459
  //#region src/constants/index.ts
469
460
  /**
470
461
  * Runtime helper module ID
471
462
  */
472
463
  const RUNTIME_MODULE_ID = "\0rolldown/runtime.js";
473
-
474
464
  //#endregion
475
465
  //#region src/utils/misc.ts
476
466
  function arraify(value) {
@@ -488,11 +478,9 @@ function unsupported(info) {
488
478
  throw new Error(`UNSUPPORTED: ${info}`);
489
479
  }
490
480
  function noop(..._args) {}
491
-
492
481
  //#endregion
493
482
  //#region src/log/logging.ts
494
483
  const LOG_LEVEL_SILENT = "silent";
495
- const LOG_LEVEL_ERROR = "error";
496
484
  const LOG_LEVEL_WARN = "warn";
497
485
  const LOG_LEVEL_INFO = "info";
498
486
  const LOG_LEVEL_DEBUG = "debug";
@@ -502,7 +490,6 @@ const logLevelPriority = {
502
490
  [LOG_LEVEL_WARN]: 2,
503
491
  [LOG_LEVEL_SILENT]: 3
504
492
  };
505
-
506
493
  //#endregion
507
494
  //#region src/log/log-handler.ts
508
495
  const normalizeLog = (log) => typeof log === "string" ? { message: log } : typeof log === "function" ? normalizeLog(log()) : log;
@@ -517,7 +504,6 @@ function getLogHandler(level, code, logger, pluginName, logLevel) {
517
504
  logger(level, log);
518
505
  };
519
506
  }
520
-
521
507
  //#endregion
522
508
  //#region src/log/logger.ts
523
509
  function getLogger(plugins, onLog, logLevel, watchMode) {
@@ -533,15 +519,15 @@ function getLogger(plugins, onLog, logLevel, watchMode) {
533
519
  return (log) => logger(level, normalizeLog(log), new Set(skipped).add(plugin));
534
520
  };
535
521
  if (("handler" in pluginOnLog ? pluginOnLog.handler : pluginOnLog).call({
536
- debug: getLogHandler(LOG_LEVEL_DEBUG),
522
+ debug: getLogHandler("debug"),
537
523
  error: (log) => error(normalizeLog(log)),
538
- info: getLogHandler(LOG_LEVEL_INFO),
524
+ info: getLogHandler("info"),
539
525
  meta: {
540
526
  rollupVersion: "4.23.0",
541
527
  rolldownVersion: VERSION,
542
528
  watchMode
543
529
  },
544
- warn: getLogHandler(LOG_LEVEL_WARN),
530
+ warn: getLogHandler("warn"),
545
531
  pluginName: plugin.name || "unknown"
546
532
  }, level, log) === false) return;
547
533
  }
@@ -556,14 +542,14 @@ const getOnLog = (config, logLevel, printLog = defaultPrintLog) => {
556
542
  if (onLog) {
557
543
  const minimalPriority = logLevelPriority[logLevel];
558
544
  return (level, log) => onLog(level, addLogToString(log), (level, handledLog) => {
559
- if (level === LOG_LEVEL_ERROR) return error(normalizeLog(handledLog));
545
+ if (level === "error") return error(normalizeLog(handledLog));
560
546
  if (logLevelPriority[level] >= minimalPriority) defaultOnLog(level, normalizeLog(handledLog));
561
547
  });
562
548
  }
563
549
  return defaultOnLog;
564
550
  };
565
551
  const getDefaultOnLog = (printLog, onwarn) => onwarn ? (level, log) => {
566
- if (level === LOG_LEVEL_WARN) onwarn(addLogToString(log), (warning) => printLog(LOG_LEVEL_WARN, normalizeLog(warning)));
552
+ if (level === "warn") onwarn(addLogToString(log), (warning) => printLog(LOG_LEVEL_WARN, normalizeLog(warning)));
567
553
  else printLog(level, log);
568
554
  } : printLog;
569
555
  const addLogToString = (log) => {
@@ -591,7 +577,6 @@ function relativeId(id) {
591
577
  if (!posix.isAbsolute(id)) return id;
592
578
  return posix.relative(posix.resolve(), id);
593
579
  }
594
-
595
580
  //#endregion
596
581
  //#region src/utils/normalize-hook.ts
597
582
  function normalizeHook(hook) {
@@ -610,7 +595,6 @@ function normalizeHook(hook) {
610
595
  }
611
596
  unreachable("Invalid hook type");
612
597
  }
613
-
614
598
  //#endregion
615
599
  //#region src/constants/plugin.ts
616
600
  const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES = [
@@ -644,42 +628,7 @@ const ENUMERATED_PLUGIN_HOOK_NAMES = [
644
628
  "intro",
645
629
  "outro"
646
630
  ];
647
- /**
648
- * Names of all defined hooks. It's like
649
- * ```js
650
- * const DEFINED_HOOK_NAMES ={
651
- * options: 'options',
652
- * buildStart: 'buildStart',
653
- * ...
654
- * }
655
- * ```
656
- */
657
- const DEFINED_HOOK_NAMES = {
658
- [ENUMERATED_PLUGIN_HOOK_NAMES[0]]: ENUMERATED_PLUGIN_HOOK_NAMES[0],
659
- [ENUMERATED_PLUGIN_HOOK_NAMES[1]]: ENUMERATED_PLUGIN_HOOK_NAMES[1],
660
- [ENUMERATED_PLUGIN_HOOK_NAMES[2]]: ENUMERATED_PLUGIN_HOOK_NAMES[2],
661
- [ENUMERATED_PLUGIN_HOOK_NAMES[3]]: ENUMERATED_PLUGIN_HOOK_NAMES[3],
662
- [ENUMERATED_PLUGIN_HOOK_NAMES[4]]: ENUMERATED_PLUGIN_HOOK_NAMES[4],
663
- [ENUMERATED_PLUGIN_HOOK_NAMES[5]]: ENUMERATED_PLUGIN_HOOK_NAMES[5],
664
- [ENUMERATED_PLUGIN_HOOK_NAMES[6]]: ENUMERATED_PLUGIN_HOOK_NAMES[6],
665
- [ENUMERATED_PLUGIN_HOOK_NAMES[7]]: ENUMERATED_PLUGIN_HOOK_NAMES[7],
666
- [ENUMERATED_PLUGIN_HOOK_NAMES[8]]: ENUMERATED_PLUGIN_HOOK_NAMES[8],
667
- [ENUMERATED_PLUGIN_HOOK_NAMES[9]]: ENUMERATED_PLUGIN_HOOK_NAMES[9],
668
- [ENUMERATED_PLUGIN_HOOK_NAMES[10]]: ENUMERATED_PLUGIN_HOOK_NAMES[10],
669
- [ENUMERATED_PLUGIN_HOOK_NAMES[11]]: ENUMERATED_PLUGIN_HOOK_NAMES[11],
670
- [ENUMERATED_PLUGIN_HOOK_NAMES[12]]: ENUMERATED_PLUGIN_HOOK_NAMES[12],
671
- [ENUMERATED_PLUGIN_HOOK_NAMES[13]]: ENUMERATED_PLUGIN_HOOK_NAMES[13],
672
- [ENUMERATED_PLUGIN_HOOK_NAMES[14]]: ENUMERATED_PLUGIN_HOOK_NAMES[14],
673
- [ENUMERATED_PLUGIN_HOOK_NAMES[15]]: ENUMERATED_PLUGIN_HOOK_NAMES[15],
674
- [ENUMERATED_PLUGIN_HOOK_NAMES[16]]: ENUMERATED_PLUGIN_HOOK_NAMES[16],
675
- [ENUMERATED_PLUGIN_HOOK_NAMES[17]]: ENUMERATED_PLUGIN_HOOK_NAMES[17],
676
- [ENUMERATED_PLUGIN_HOOK_NAMES[18]]: ENUMERATED_PLUGIN_HOOK_NAMES[18],
677
- [ENUMERATED_PLUGIN_HOOK_NAMES[19]]: ENUMERATED_PLUGIN_HOOK_NAMES[19],
678
- [ENUMERATED_PLUGIN_HOOK_NAMES[20]]: ENUMERATED_PLUGIN_HOOK_NAMES[20],
679
- [ENUMERATED_PLUGIN_HOOK_NAMES[21]]: ENUMERATED_PLUGIN_HOOK_NAMES[21],
680
- [ENUMERATED_PLUGIN_HOOK_NAMES[22]]: ENUMERATED_PLUGIN_HOOK_NAMES[22]
681
- };
682
-
631
+ 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];
683
632
  //#endregion
684
633
  //#region src/utils/async-flatten.ts
685
634
  async function asyncFlatten(array) {
@@ -688,7 +637,6 @@ async function asyncFlatten(array) {
688
637
  while (array.some((v) => v?.then));
689
638
  return array;
690
639
  }
691
-
692
640
  //#endregion
693
641
  //#region src/utils/normalize-plugin-option.ts
694
642
  const normalizePluginOption = async (plugins) => (await asyncFlatten([plugins])).filter(Boolean);
@@ -709,7 +657,6 @@ function normalizePlugins(plugins, anonymousPrefix) {
709
657
  }
710
658
  const ANONYMOUS_PLUGIN_PREFIX = "at position ";
711
659
  const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = "at output position ";
712
-
713
660
  //#endregion
714
661
  //#region src/plugin/minimal-plugin-context.ts
715
662
  var MinimalPluginContextImpl = class {
@@ -733,12 +680,11 @@ var MinimalPluginContextImpl = class {
733
680
  return error(logPluginError(normalizeLog(e), this.pluginName, { hook: this.hookName }));
734
681
  }
735
682
  };
736
-
737
683
  //#endregion
738
684
  //#region src/plugin/plugin-driver.ts
739
685
  var PluginDriver = class {
740
686
  static async callOptionsHook(inputOptions, watchMode = false) {
741
- const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
687
+ const logLevel = inputOptions.logLevel || "info";
742
688
  const plugins = getSortedPlugins("options", getObjectPlugins(await normalizePluginOption(inputOptions.plugins)));
743
689
  const logger = getLogger(plugins, getOnLog(inputOptions, logLevel), logLevel, watchMode);
744
690
  for (const plugin of plugins) {
@@ -800,7 +746,6 @@ function getSortedPlugins(hookName, plugins) {
800
746
  ...post
801
747
  ];
802
748
  }
803
-
804
749
  //#endregion
805
750
  //#region ../../node_modules/.pnpm/valibot@1.2.0_typescript@5.9.3/node_modules/valibot/dist/index.mjs
806
751
  let store$4;
@@ -1887,336 +1832,336 @@ function safeParse(schema, input, config$1) {
1887
1832
  issues: dataset.issues
1888
1833
  };
1889
1834
  }
1890
-
1891
1835
  //#endregion
1892
1836
  //#region src/utils/style-text.ts
1893
1837
  function styleText(...args) {
1894
1838
  return args[1];
1895
1839
  }
1896
-
1897
1840
  //#endregion
1898
1841
  //#region src/utils/validator.ts
1899
1842
  function isTypeTrue() {}
1900
- const StringOrRegExpSchema = union([string(), instance(RegExp)]);
1843
+ const StringOrRegExpSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ instance(RegExp)]);
1901
1844
  isTypeTrue();
1902
1845
  function vFunction() {
1903
- return function_();
1846
+ return /* @__PURE__ */ function_();
1904
1847
  }
1905
- const LogLevelSchema = union([
1906
- literal("debug"),
1907
- literal("info"),
1908
- literal("warn")
1848
+ const LogLevelSchema = /* @__PURE__ */ union([
1849
+ /* @__PURE__ */ literal("debug"),
1850
+ /* @__PURE__ */ literal("info"),
1851
+ /* @__PURE__ */ literal("warn")
1909
1852
  ]);
1910
1853
  isTypeTrue();
1911
- const LogLevelOptionSchema = union([LogLevelSchema, literal("silent")]);
1854
+ const LogLevelOptionSchema = /* @__PURE__ */ union([LogLevelSchema, /* @__PURE__ */ literal("silent")]);
1912
1855
  isTypeTrue();
1913
- const LogLevelWithErrorSchema = union([LogLevelSchema, literal("error")]);
1856
+ const LogLevelWithErrorSchema = /* @__PURE__ */ union([LogLevelSchema, /* @__PURE__ */ literal("error")]);
1914
1857
  isTypeTrue();
1915
- const RollupLogSchema = any();
1916
- const RollupLogWithStringSchema = union([RollupLogSchema, string()]);
1858
+ const RollupLogSchema = /* @__PURE__ */ any();
1859
+ const RollupLogWithStringSchema = /* @__PURE__ */ union([RollupLogSchema, /* @__PURE__ */ string()]);
1917
1860
  isTypeTrue();
1918
- const InputOptionSchema = union([
1919
- string(),
1920
- array(string()),
1921
- record(string(), string())
1861
+ const InputOptionSchema = /* @__PURE__ */ union([
1862
+ /* @__PURE__ */ string(),
1863
+ /* @__PURE__ */ array(/* @__PURE__ */ string()),
1864
+ /* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())
1922
1865
  ]);
1923
1866
  isTypeTrue();
1924
- const ExternalOptionFunctionSchema = pipe(vFunction(), args(tuple([
1925
- string(),
1926
- optional(string()),
1927
- boolean()
1928
- ])), returns(nullish(boolean())));
1867
+ const ExternalOptionFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([
1868
+ /* @__PURE__ */ string(),
1869
+ /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1870
+ /* @__PURE__ */ boolean()
1871
+ ])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ boolean())));
1929
1872
  isTypeTrue();
1930
- const ExternalOptionSchema = union([
1873
+ const ExternalOptionSchema = /* @__PURE__ */ union([
1931
1874
  StringOrRegExpSchema,
1932
- array(StringOrRegExpSchema),
1875
+ /* @__PURE__ */ array(StringOrRegExpSchema),
1933
1876
  ExternalOptionFunctionSchema
1934
1877
  ]);
1935
1878
  isTypeTrue();
1936
- const ModuleTypesSchema = record(string(), union([
1937
- literal("asset"),
1938
- literal("base64"),
1939
- literal("binary"),
1940
- literal("copy"),
1941
- literal("css"),
1942
- literal("dataurl"),
1943
- literal("empty"),
1944
- literal("js"),
1945
- literal("json"),
1946
- literal("jsx"),
1947
- literal("text"),
1948
- literal("ts"),
1949
- literal("tsx")
1879
+ const ModuleTypesSchema = /* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([
1880
+ /* @__PURE__ */ literal("asset"),
1881
+ /* @__PURE__ */ literal("base64"),
1882
+ /* @__PURE__ */ literal("binary"),
1883
+ /* @__PURE__ */ literal("copy"),
1884
+ /* @__PURE__ */ literal("css"),
1885
+ /* @__PURE__ */ literal("dataurl"),
1886
+ /* @__PURE__ */ literal("empty"),
1887
+ /* @__PURE__ */ literal("js"),
1888
+ /* @__PURE__ */ literal("json"),
1889
+ /* @__PURE__ */ literal("jsx"),
1890
+ /* @__PURE__ */ literal("text"),
1891
+ /* @__PURE__ */ literal("ts"),
1892
+ /* @__PURE__ */ literal("tsx")
1950
1893
  ]));
1951
1894
  isTypeTrue();
1952
- const JsxOptionsSchema = strictObject({
1953
- runtime: pipe(optional(union([literal("classic"), literal("automatic")])), description("Which runtime to use")),
1954
- development: pipe(optional(boolean()), description("Development specific information")),
1955
- throwIfNamespace: pipe(optional(boolean()), description("Toggles whether to throw an error when a tag name uses an XML namespace")),
1956
- pure: pipe(optional(boolean()), description("Mark JSX elements and top-level React method calls as pure for tree shaking.")),
1957
- importSource: pipe(optional(string()), description("Import the factory of element and fragment if mode is classic")),
1958
- pragma: pipe(optional(string()), description("Jsx element transformation")),
1959
- pragmaFrag: pipe(optional(string()), description("Jsx fragment transformation")),
1960
- refresh: pipe(optional(union([boolean(), any()])), description("Enable react fast refresh"))
1895
+ const JsxOptionsSchema = /* @__PURE__ */ strictObject({
1896
+ runtime: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("classic"), /* @__PURE__ */ literal("automatic")])), /* @__PURE__ */ description("Which runtime to use")),
1897
+ development: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Development specific information")),
1898
+ throwIfNamespace: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Toggles whether to throw an error when a tag name uses an XML namespace")),
1899
+ pure: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Mark JSX elements and top-level React method calls as pure for tree shaking.")),
1900
+ importSource: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Import the factory of element and fragment if mode is classic")),
1901
+ pragma: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Jsx element transformation")),
1902
+ pragmaFrag: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Jsx fragment transformation")),
1903
+ refresh: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ any()])), /* @__PURE__ */ description("Enable react fast refresh"))
1961
1904
  });
1962
1905
  isTypeTrue();
1963
- const HelperModeSchema = union([literal("Runtime"), literal("External")]);
1964
- const DecoratorOptionSchema = object({
1965
- legacy: optional(boolean()),
1966
- emitDecoratorMetadata: optional(boolean())
1906
+ const HelperModeSchema = /* @__PURE__ */ union([/* @__PURE__ */ literal("Runtime"), /* @__PURE__ */ literal("External")]);
1907
+ const DecoratorOptionSchema = /* @__PURE__ */ object({
1908
+ legacy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1909
+ emitDecoratorMetadata: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1967
1910
  });
1968
1911
  isTypeTrue();
1969
- const HelpersSchema = object({ mode: optional(HelperModeSchema) });
1912
+ const HelpersSchema = /* @__PURE__ */ object({ mode: /* @__PURE__ */ optional(HelperModeSchema) });
1970
1913
  isTypeTrue();
1971
- const RewriteImportExtensionsSchema = union([
1972
- literal("rewrite"),
1973
- literal("remove"),
1974
- boolean()
1975
- ]);
1976
- const TypescriptSchema = object({
1977
- jsxPragma: optional(string()),
1978
- jsxPragmaFrag: optional(string()),
1979
- onlyRemoveTypeImports: optional(boolean()),
1980
- allowNamespaces: optional(boolean()),
1981
- allowDeclareFields: optional(boolean()),
1982
- removeClassFieldsWithoutInitializer: optional(boolean()),
1983
- declaration: optional(object({
1984
- stripInternal: optional(boolean()),
1985
- sourcemap: optional(boolean())
1914
+ const TypescriptSchema = /* @__PURE__ */ object({
1915
+ jsxPragma: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1916
+ jsxPragmaFrag: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1917
+ onlyRemoveTypeImports: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1918
+ allowNamespaces: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1919
+ allowDeclareFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1920
+ removeClassFieldsWithoutInitializer: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1921
+ declaration: /* @__PURE__ */ optional(/* @__PURE__ */ object({
1922
+ stripInternal: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1923
+ sourcemap: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1986
1924
  })),
1987
- rewriteImportExtensions: optional(RewriteImportExtensionsSchema)
1925
+ rewriteImportExtensions: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1926
+ /* @__PURE__ */ literal("rewrite"),
1927
+ /* @__PURE__ */ literal("remove"),
1928
+ /* @__PURE__ */ boolean()
1929
+ ]))
1988
1930
  });
1989
1931
  isTypeTrue();
1990
- const AssumptionsSchema = object({
1991
- ignoreFunctionLength: optional(boolean()),
1992
- noDocumentAll: optional(boolean()),
1993
- objectRestNoSymbols: optional(boolean()),
1994
- pureGetters: optional(boolean()),
1995
- setPublicClassFields: optional(boolean())
1932
+ const AssumptionsSchema = /* @__PURE__ */ object({
1933
+ ignoreFunctionLength: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1934
+ noDocumentAll: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1935
+ objectRestNoSymbols: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1936
+ pureGetters: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1937
+ setPublicClassFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1996
1938
  });
1997
1939
  isTypeTrue();
1998
- const TransformPluginsSchema = object({
1999
- styledComponents: optional(any()),
2000
- taggedTemplateEscape: optional(boolean())
1940
+ const TransformPluginsSchema = /* @__PURE__ */ object({
1941
+ styledComponents: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
1942
+ taggedTemplateEscape: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
2001
1943
  });
2002
1944
  isTypeTrue();
2003
- const TransformOptionsSchema = object({
2004
- assumptions: optional(AssumptionsSchema),
2005
- typescript: optional(TypescriptSchema),
2006
- helpers: optional(HelpersSchema),
2007
- decorator: optional(DecoratorOptionSchema),
2008
- jsx: optional(union([
2009
- literal(false),
2010
- literal("preserve"),
2011
- literal("react"),
2012
- literal("react-jsx"),
1945
+ const TransformOptionsSchema = /* @__PURE__ */ object({
1946
+ assumptions: /* @__PURE__ */ optional(AssumptionsSchema),
1947
+ typescript: /* @__PURE__ */ optional(TypescriptSchema),
1948
+ helpers: /* @__PURE__ */ optional(HelpersSchema),
1949
+ decorator: /* @__PURE__ */ optional(DecoratorOptionSchema),
1950
+ jsx: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1951
+ /* @__PURE__ */ literal(false),
1952
+ /* @__PURE__ */ literal("preserve"),
1953
+ /* @__PURE__ */ literal("react"),
1954
+ /* @__PURE__ */ literal("react-jsx"),
2013
1955
  JsxOptionsSchema
2014
1956
  ])),
2015
- target: pipe(optional(union([string(), array(string())])), description("The JavaScript target environment")),
2016
- define: pipe(optional(record(string(), string())), description("Define global variables (syntax: key=value,key2=value2)")),
2017
- inject: pipe(optional(record(string(), union([string(), tuple([string(), string()])]))), description("Inject import statements on demand")),
2018
- dropLabels: pipe(optional(array(string())), description("Remove labeled statements with these label names")),
2019
- plugins: pipe(optional(TransformPluginsSchema), description("Third-party plugins to use"))
1957
+ target: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])), /* @__PURE__ */ description("The JavaScript target environment")),
1958
+ define: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())), /* @__PURE__ */ description("Define global variables (syntax: key=value,key2=value2)")),
1959
+ 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")),
1960
+ dropLabels: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Remove labeled statements with these label names")),
1961
+ plugins: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(TransformPluginsSchema), /* @__PURE__ */ description("Third-party plugins to use"))
2020
1962
  });
2021
1963
  isTypeTrue();
2022
- const WatcherOptionsSchema = strictObject({
2023
- chokidar: optional(never(`The "watch.chokidar" option is deprecated, please use "watch.notify" instead of it`)),
2024
- exclude: optional(union([StringOrRegExpSchema, array(StringOrRegExpSchema)])),
2025
- include: optional(union([StringOrRegExpSchema, array(StringOrRegExpSchema)])),
2026
- notify: pipe(optional(strictObject({
2027
- compareContents: optional(boolean()),
2028
- pollInterval: optional(number())
2029
- })), description("Notify options")),
2030
- skipWrite: pipe(optional(boolean()), description("Skip the bundle.write() step")),
2031
- buildDelay: pipe(optional(number()), description("Throttle watch rebuilds")),
2032
- clearScreen: pipe(optional(boolean()), description("Whether to clear the screen when a rebuild is triggered")),
2033
- onInvalidate: pipe(optional(vFunction()), description("An optional function that will be called immediately every time a module changes that is part of the build."))
1964
+ const WatcherFileWatcherOptionsSchema = /* @__PURE__ */ strictObject({
1965
+ usePolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use polling-based file watching instead of native OS events")),
1966
+ pollInterval: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Poll interval in milliseconds (only used when usePolling is true)")),
1967
+ compareContentsForPolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Compare file contents for poll-based watchers (only used when usePolling is true)"))
1968
+ });
1969
+ const WatcherOptionsSchema = /* @__PURE__ */ strictObject({
1970
+ chokidar: /* @__PURE__ */ optional(/* @__PURE__ */ never(`The "watch.chokidar" option is deprecated, please use "watch.watcher" instead of it`)),
1971
+ exclude: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, /* @__PURE__ */ array(StringOrRegExpSchema)])),
1972
+ include: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, /* @__PURE__ */ array(StringOrRegExpSchema)])),
1973
+ watcher: /* @__PURE__ */ optional(WatcherFileWatcherOptionsSchema),
1974
+ notify: /* @__PURE__ */ optional(WatcherFileWatcherOptionsSchema),
1975
+ skipWrite: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Skip the bundle.write() step")),
1976
+ buildDelay: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Throttle watch rebuilds")),
1977
+ clearScreen: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to clear the screen when a rebuild is triggered")),
1978
+ 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."))
2034
1979
  });
2035
1980
  isTypeTrue();
2036
- const ChecksOptionsSchema = strictObject({
2037
- circularDependency: pipe(optional(boolean()), description("Whether to emit warnings when detecting circular dependency")),
2038
- eval: pipe(optional(boolean()), description("Whether to emit warnings when detecting uses of direct `eval`s")),
2039
- missingGlobalName: pipe(optional(boolean()), description("Whether to emit warnings when the `output.globals` option is missing when needed")),
2040
- missingNameOptionForIifeExport: pipe(optional(boolean()), description("Whether to emit warnings when the `output.name` option is missing when needed")),
2041
- mixedExports: pipe(optional(boolean()), description("Whether to emit warnings when the way to export values is ambiguous")),
2042
- unresolvedEntry: pipe(optional(boolean()), description("Whether to emit warnings when an entrypoint cannot be resolved")),
2043
- unresolvedImport: pipe(optional(boolean()), description("Whether to emit warnings when an import cannot be resolved")),
2044
- filenameConflict: pipe(optional(boolean()), description("Whether to emit warnings when files generated have the same name with different contents")),
2045
- commonJsVariableInEsm: pipe(optional(boolean()), description("Whether to emit warnings when a CommonJS variable is used in an ES module")),
2046
- importIsUndefined: pipe(optional(boolean()), description("Whether to emit warnings when an imported variable is not exported")),
2047
- 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 (`{}`)")),
2048
- toleratedTransform: pipe(optional(boolean()), description("Whether to emit warnings when detecting tolerated transform")),
2049
- cannotCallNamespace: pipe(optional(boolean()), description("Whether to emit warnings when a namespace is called as a function")),
2050
- configurationFieldConflict: pipe(optional(boolean()), description("Whether to emit warnings when a config value is overridden by another config value with a higher priority")),
2051
- preferBuiltinFeature: pipe(optional(boolean()), description("Whether to emit warnings when a plugin that is covered by a built-in feature is used")),
2052
- couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warnings when Rolldown could not clean the output directory")),
2053
- pluginTimings: pipe(optional(boolean()), description("Whether to emit warnings when plugins take significant time during the build process")),
2054
- duplicateShebang: pipe(optional(boolean()), description("Whether to emit warnings when both the code and postBanner contain shebang")),
2055
- unsupportedTsconfigOption: pipe(optional(boolean()), description("Whether to emit warnings when a tsconfig option or combination of options is not supported")),
2056
- 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"))
1981
+ const ChecksOptionsSchema = /* @__PURE__ */ strictObject({
1982
+ circularDependency: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting circular dependency")),
1983
+ eval: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting uses of direct `eval`s")),
1984
+ missingGlobalName: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when the `output.globals` option is missing when needed")),
1985
+ missingNameOptionForIifeExport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when the `output.name` option is missing when needed")),
1986
+ mixedExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when the way to export values is ambiguous")),
1987
+ unresolvedEntry: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an entrypoint cannot be resolved")),
1988
+ unresolvedImport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an import cannot be resolved")),
1989
+ filenameConflict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when files generated have the same name with different contents")),
1990
+ commonJsVariableInEsm: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a CommonJS variable is used in an ES module")),
1991
+ importIsUndefined: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an imported variable is not exported")),
1992
+ 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 (`{}`)")),
1993
+ toleratedTransform: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting tolerated transform")),
1994
+ cannotCallNamespace: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a namespace is called as a function")),
1995
+ 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")),
1996
+ 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")),
1997
+ couldNotCleanDirectory: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when Rolldown could not clean the output directory")),
1998
+ pluginTimings: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when plugins take significant time during the build process")),
1999
+ duplicateShebang: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when both the code and postBanner contain shebang")),
2000
+ unsupportedTsconfigOption: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a tsconfig option or combination of options is not supported")),
2001
+ 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"))
2057
2002
  });
2058
2003
  isTypeTrue();
2059
- const CompressOptionsKeepNamesSchema = strictObject({
2060
- function: boolean(),
2061
- class: boolean()
2004
+ const CompressOptionsKeepNamesSchema = /* @__PURE__ */ strictObject({
2005
+ function: /* @__PURE__ */ boolean(),
2006
+ class: /* @__PURE__ */ boolean()
2062
2007
  });
2063
2008
  isTypeTrue();
2064
- const CompressTreeshakeOptionsSchema = strictObject({
2065
- annotations: optional(boolean()),
2066
- manualPureFunctions: optional(array(string())),
2067
- propertyReadSideEffects: optional(union([boolean(), literal("always")])),
2068
- unknownGlobalSideEffects: optional(boolean()),
2069
- invalidImportSideEffects: optional(boolean())
2009
+ const CompressTreeshakeOptionsSchema = /* @__PURE__ */ strictObject({
2010
+ annotations: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2011
+ manualPureFunctions: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
2012
+ propertyReadSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("always")])),
2013
+ unknownGlobalSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2014
+ invalidImportSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
2070
2015
  });
2071
2016
  isTypeTrue();
2072
- const CompressOptionsSchema = strictObject({
2073
- target: optional(union([string(), array(string())])),
2074
- dropConsole: optional(boolean()),
2075
- dropDebugger: optional(boolean()),
2076
- keepNames: optional(CompressOptionsKeepNamesSchema),
2077
- unused: optional(union([boolean(), literal("keep_assign")])),
2078
- joinVars: optional(boolean()),
2079
- sequences: optional(boolean()),
2080
- dropLabels: optional(array(string())),
2081
- maxIterations: optional(number()),
2082
- treeshake: optional(CompressTreeshakeOptionsSchema)
2017
+ const CompressOptionsSchema = /* @__PURE__ */ strictObject({
2018
+ target: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])),
2019
+ dropConsole: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2020
+ dropDebugger: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2021
+ keepNames: /* @__PURE__ */ optional(CompressOptionsKeepNamesSchema),
2022
+ unused: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("keep_assign")])),
2023
+ joinVars: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2024
+ sequences: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2025
+ dropLabels: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
2026
+ maxIterations: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2027
+ treeshake: /* @__PURE__ */ optional(CompressTreeshakeOptionsSchema)
2083
2028
  });
2084
2029
  isTypeTrue();
2085
- const MangleOptionsKeepNamesSchema = strictObject({
2086
- function: boolean(),
2087
- class: boolean()
2030
+ const MangleOptionsKeepNamesSchema = /* @__PURE__ */ strictObject({
2031
+ function: /* @__PURE__ */ boolean(),
2032
+ class: /* @__PURE__ */ boolean()
2088
2033
  });
2089
2034
  isTypeTrue();
2090
- const MangleOptionsSchema = strictObject({
2091
- toplevel: optional(boolean()),
2092
- keepNames: optional(union([boolean(), MangleOptionsKeepNamesSchema])),
2093
- debug: optional(boolean())
2035
+ const MangleOptionsSchema = /* @__PURE__ */ strictObject({
2036
+ toplevel: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2037
+ keepNames: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), MangleOptionsKeepNamesSchema])),
2038
+ debug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
2094
2039
  });
2095
2040
  isTypeTrue();
2096
- const CodegenOptionsSchema = strictObject({ removeWhitespace: optional(boolean()) });
2041
+ const CodegenOptionsSchema = /* @__PURE__ */ strictObject({ removeWhitespace: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()) });
2097
2042
  isTypeTrue();
2098
- const MinifyOptionsSchema = strictObject({
2099
- compress: optional(union([boolean(), CompressOptionsSchema])),
2100
- mangle: optional(union([boolean(), MangleOptionsSchema])),
2101
- codegen: optional(union([boolean(), CodegenOptionsSchema]))
2043
+ const MinifyOptionsSchema = /* @__PURE__ */ strictObject({
2044
+ compress: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), CompressOptionsSchema])),
2045
+ mangle: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), MangleOptionsSchema])),
2046
+ codegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), CodegenOptionsSchema]))
2102
2047
  });
2103
2048
  isTypeTrue();
2104
- const ResolveOptionsSchema = strictObject({
2105
- alias: optional(record(string(), union([
2106
- literal(false),
2107
- string(),
2108
- array(string())
2049
+ const ResolveOptionsSchema = /* @__PURE__ */ strictObject({
2050
+ alias: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([
2051
+ /* @__PURE__ */ literal(false),
2052
+ /* @__PURE__ */ string(),
2053
+ /* @__PURE__ */ array(/* @__PURE__ */ string())
2109
2054
  ]))),
2110
- aliasFields: optional(array(array(string()))),
2111
- conditionNames: optional(array(string())),
2112
- extensionAlias: optional(record(string(), array(string()))),
2113
- exportsFields: optional(array(array(string()))),
2114
- extensions: optional(array(string())),
2115
- mainFields: optional(array(string())),
2116
- mainFiles: optional(array(string())),
2117
- modules: optional(array(string())),
2118
- symlinks: optional(boolean()),
2119
- tsconfigFilename: optional(string())
2055
+ aliasFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ array(/* @__PURE__ */ string()))),
2056
+ conditionNames: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
2057
+ extensionAlias: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string()))),
2058
+ exportsFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ array(/* @__PURE__ */ string()))),
2059
+ extensions: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
2060
+ mainFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
2061
+ mainFiles: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
2062
+ modules: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
2063
+ symlinks: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2064
+ tsconfigFilename: /* @__PURE__ */ optional(/* @__PURE__ */ string())
2120
2065
  });
2121
2066
  isTypeTrue();
2122
- const TreeshakingOptionsSchema = strictObject({
2123
- moduleSideEffects: optional(any()),
2124
- annotations: optional(boolean()),
2125
- manualPureFunctions: optional(custom((input) => is(array(string()), input), "string array")),
2126
- unknownGlobalSideEffects: optional(boolean()),
2127
- invalidImportSideEffects: optional(boolean()),
2128
- commonjs: optional(boolean()),
2129
- propertyReadSideEffects: optional(union([literal(false), literal("always")])),
2130
- propertyWriteSideEffects: optional(union([literal(false), literal("always")]))
2067
+ const TreeshakingOptionsSchema = /* @__PURE__ */ strictObject({
2068
+ moduleSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
2069
+ annotations: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2070
+ manualPureFunctions: /* @__PURE__ */ optional(/* @__PURE__ */ custom((input) => /* @__PURE__ */ is(/* @__PURE__ */ array(/* @__PURE__ */ string()), input), "string array")),
2071
+ unknownGlobalSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2072
+ invalidImportSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2073
+ commonjs: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2074
+ propertyReadSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(false), /* @__PURE__ */ literal("always")])),
2075
+ propertyWriteSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(false), /* @__PURE__ */ literal("always")]))
2131
2076
  });
2132
2077
  isTypeTrue();
2133
- const OptimizationOptionsSchema = strictObject({
2134
- inlineConst: pipe(optional(union([boolean(), strictObject({
2135
- mode: optional(union([literal("all"), literal("smart")])),
2136
- pass: optional(number())
2137
- })])), description("Enable crossmodule constant inlining")),
2138
- pifeForModuleWrappers: pipe(optional(boolean()), description("Use PIFE pattern for module wrappers"))
2078
+ const OptimizationOptionsSchema = /* @__PURE__ */ strictObject({
2079
+ inlineConst: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
2080
+ mode: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("all"), /* @__PURE__ */ literal("smart")])),
2081
+ pass: /* @__PURE__ */ optional(/* @__PURE__ */ number())
2082
+ })])), /* @__PURE__ */ description("Enable crossmodule constant inlining")),
2083
+ pifeForModuleWrappers: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use PIFE pattern for module wrappers"))
2139
2084
  });
2140
2085
  isTypeTrue();
2141
- const LogOrStringHandlerSchema = pipe(vFunction(), args(tuple([LogLevelWithErrorSchema, RollupLogWithStringSchema])));
2086
+ const LogOrStringHandlerSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([LogLevelWithErrorSchema, RollupLogWithStringSchema])));
2142
2087
  isTypeTrue();
2143
- const OnLogSchema = pipe(vFunction(), args(tuple([
2088
+ const OnLogSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([
2144
2089
  LogLevelSchema,
2145
2090
  RollupLogSchema,
2146
2091
  LogOrStringHandlerSchema
2147
2092
  ])));
2148
2093
  isTypeTrue();
2149
- const OnwarnSchema = pipe(vFunction(), args(tuple([RollupLogSchema, pipe(vFunction(), args(tuple([union([RollupLogWithStringSchema, pipe(vFunction(), returns(RollupLogWithStringSchema))])])))])));
2094
+ 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))])])))])));
2150
2095
  isTypeTrue();
2151
- const DevModeSchema = union([boolean(), strictObject({
2152
- port: optional(number()),
2153
- host: optional(string()),
2154
- implement: optional(string()),
2155
- lazy: optional(boolean())
2096
+ const DevModeSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
2097
+ port: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2098
+ host: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
2099
+ implement: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
2100
+ lazy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
2156
2101
  })]);
2157
2102
  isTypeTrue();
2158
- const InputOptionsSchema = strictObject({
2159
- input: optional(InputOptionSchema),
2160
- plugins: optional(custom(() => true)),
2161
- external: optional(ExternalOptionSchema),
2162
- makeAbsoluteExternalsRelative: optional(union([boolean(), literal("ifRelativeSource")])),
2163
- resolve: optional(ResolveOptionsSchema),
2164
- cwd: pipe(optional(string()), description("Current working directory")),
2165
- platform: pipe(optional(union([
2166
- literal("browser"),
2167
- literal("neutral"),
2168
- literal("node")
2169
- ])), description(`Platform for which the code should be generated (node, ${styleText("underline", "browser")}, neutral)`)),
2170
- shimMissingExports: pipe(optional(boolean()), description("Create shim variables for missing exports")),
2171
- treeshake: optional(union([boolean(), TreeshakingOptionsSchema])),
2172
- optimization: optional(OptimizationOptionsSchema),
2173
- logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${styleText("dim", "silent")}, ${styleText(["underline", "gray"], "info")}, debug, ${styleText("yellow", "warn")})`)),
2174
- onLog: optional(OnLogSchema),
2175
- onwarn: optional(OnwarnSchema),
2176
- moduleTypes: pipe(optional(ModuleTypesSchema), description("Module types for customized extensions")),
2177
- experimental: optional(strictObject({
2178
- viteMode: optional(boolean()),
2179
- resolveNewUrlToAsset: optional(boolean()),
2180
- devMode: optional(DevModeSchema),
2181
- chunkModulesOrder: optional(union([literal("module-id"), literal("exec-order")])),
2182
- attachDebugInfo: optional(union([
2183
- literal("none"),
2184
- literal("simple"),
2185
- literal("full")
2103
+ const InputOptionsSchema = /* @__PURE__ */ strictObject({
2104
+ input: /* @__PURE__ */ optional(InputOptionSchema),
2105
+ plugins: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
2106
+ external: /* @__PURE__ */ optional(ExternalOptionSchema),
2107
+ makeAbsoluteExternalsRelative: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("ifRelativeSource")])),
2108
+ resolve: /* @__PURE__ */ optional(ResolveOptionsSchema),
2109
+ cwd: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Current working directory")),
2110
+ platform: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
2111
+ /* @__PURE__ */ literal("browser"),
2112
+ /* @__PURE__ */ literal("neutral"),
2113
+ /* @__PURE__ */ literal("node")
2114
+ ])), /* @__PURE__ */ description(`Platform for which the code should be generated (node, ${styleText("underline", "browser")}, neutral)`)),
2115
+ shimMissingExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Create shim variables for missing exports")),
2116
+ treeshake: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), TreeshakingOptionsSchema])),
2117
+ optimization: /* @__PURE__ */ optional(OptimizationOptionsSchema),
2118
+ logLevel: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(LogLevelOptionSchema), /* @__PURE__ */ description(`Log level (${styleText("dim", "silent")}, ${styleText(["underline", "gray"], "info")}, debug, ${styleText("yellow", "warn")})`)),
2119
+ onLog: /* @__PURE__ */ optional(OnLogSchema),
2120
+ onwarn: /* @__PURE__ */ optional(OnwarnSchema),
2121
+ moduleTypes: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ModuleTypesSchema), /* @__PURE__ */ description("Module types for customized extensions")),
2122
+ experimental: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
2123
+ viteMode: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2124
+ resolveNewUrlToAsset: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2125
+ devMode: /* @__PURE__ */ optional(DevModeSchema),
2126
+ chunkModulesOrder: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("module-id"), /* @__PURE__ */ literal("exec-order")])),
2127
+ attachDebugInfo: /* @__PURE__ */ optional(/* @__PURE__ */ union([
2128
+ /* @__PURE__ */ literal("none"),
2129
+ /* @__PURE__ */ literal("simple"),
2130
+ /* @__PURE__ */ literal("full")
2186
2131
  ])),
2187
- chunkImportMap: optional(union([boolean(), object({
2188
- baseUrl: optional(string()),
2189
- fileName: optional(string())
2132
+ chunkImportMap: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ object({
2133
+ baseUrl: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
2134
+ fileName: /* @__PURE__ */ optional(/* @__PURE__ */ string())
2190
2135
  })])),
2191
- onDemandWrapping: optional(boolean()),
2192
- incrementalBuild: optional(boolean()),
2193
- nativeMagicString: optional(boolean()),
2194
- chunkOptimization: optional(boolean()),
2195
- lazyBarrel: optional(boolean())
2136
+ onDemandWrapping: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2137
+ incrementalBuild: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2138
+ nativeMagicString: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2139
+ chunkOptimization: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2140
+ lazyBarrel: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
2196
2141
  })),
2197
- transform: optional(TransformOptionsSchema),
2198
- watch: optional(union([WatcherOptionsSchema, literal(false)])),
2199
- checks: optional(ChecksOptionsSchema),
2200
- 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.")),
2201
- preserveEntrySignatures: pipe(optional(union([
2202
- literal("strict"),
2203
- literal("allow-extension"),
2204
- literal("exports-only"),
2205
- literal(false)
2142
+ transform: /* @__PURE__ */ optional(TransformOptionsSchema),
2143
+ watch: /* @__PURE__ */ optional(/* @__PURE__ */ union([WatcherOptionsSchema, /* @__PURE__ */ literal(false)])),
2144
+ checks: /* @__PURE__ */ optional(ChecksOptionsSchema),
2145
+ 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.")),
2146
+ preserveEntrySignatures: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
2147
+ /* @__PURE__ */ literal("strict"),
2148
+ /* @__PURE__ */ literal("allow-extension"),
2149
+ /* @__PURE__ */ literal("exports-only"),
2150
+ /* @__PURE__ */ literal(false)
2206
2151
  ]))),
2207
- context: pipe(optional(string()), description("The value of `this` at the top level of each module.")),
2208
- tsconfig: pipe(optional(union([boolean(), string()])), description("Path to the tsconfig.json file."))
2152
+ context: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("The value of `this` at the top level of each module.")),
2153
+ tsconfig: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ string()])), /* @__PURE__ */ description("Path to the tsconfig.json file."))
2209
2154
  });
2210
2155
  isTypeTrue();
2211
- const InputCliOverrideSchema = strictObject({
2212
- input: pipe(optional(array(string())), description("Entry file")),
2213
- external: pipe(optional(array(string())), description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
2214
- treeshake: pipe(optional(boolean()), description("enable treeshaking")),
2215
- makeAbsoluteExternalsRelative: pipe(optional(boolean()), description("Prevent normalization of external imports")),
2216
- preserveEntrySignatures: pipe(optional(literal(false)), description("Avoid facade chunks for entry points")),
2217
- context: pipe(optional(string()), description("The entity top-level `this` represents."))
2156
+ const InputCliOverrideSchema = /* @__PURE__ */ strictObject({
2157
+ input: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Entry file")),
2158
+ external: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
2159
+ treeshake: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("enable treeshaking")),
2160
+ makeAbsoluteExternalsRelative: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Prevent normalization of external imports")),
2161
+ preserveEntrySignatures: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ literal(false)), /* @__PURE__ */ description("Avoid facade chunks for entry points")),
2162
+ context: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("The entity top-level `this` represents."))
2218
2163
  });
2219
- const InputCliOptionsSchema = omit(strictObject({
2164
+ const InputCliOptionsSchema = /* @__PURE__ */ omit(/* @__PURE__ */ strictObject({
2220
2165
  ...InputOptionsSchema.entries,
2221
2166
  ...InputCliOverrideSchema.entries
2222
2167
  }), [
@@ -2227,171 +2172,172 @@ const InputCliOptionsSchema = omit(strictObject({
2227
2172
  "experimental",
2228
2173
  "watch"
2229
2174
  ]);
2230
- const ModuleFormatSchema = union([
2231
- literal("es"),
2232
- literal("cjs"),
2233
- literal("esm"),
2234
- literal("module"),
2235
- literal("commonjs"),
2236
- literal("iife"),
2237
- literal("umd")
2175
+ const ModuleFormatSchema = /* @__PURE__ */ union([
2176
+ /* @__PURE__ */ literal("es"),
2177
+ /* @__PURE__ */ literal("cjs"),
2178
+ /* @__PURE__ */ literal("esm"),
2179
+ /* @__PURE__ */ literal("module"),
2180
+ /* @__PURE__ */ literal("commonjs"),
2181
+ /* @__PURE__ */ literal("iife"),
2182
+ /* @__PURE__ */ literal("umd")
2238
2183
  ]);
2239
2184
  isTypeTrue();
2240
- const AddonFunctionSchema = pipe(vFunction(), args(tuple([custom(() => true)])), returnsAsync(unionAsync([string(), pipeAsync(promise(), awaitAsync(), string())])));
2185
+ 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())])));
2241
2186
  isTypeTrue();
2242
- const ChunkFileNamesFunctionSchema = pipe(vFunction(), args(tuple([custom(() => true)])), returns(string()));
2187
+ const ChunkFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
2243
2188
  isTypeTrue();
2244
- const ChunkFileNamesSchema = union([string(), ChunkFileNamesFunctionSchema]);
2245
- const AssetFileNamesFunctionSchema = pipe(vFunction(), args(tuple([custom(() => true)])), returns(string()));
2189
+ const ChunkFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), ChunkFileNamesFunctionSchema]);
2190
+ const AssetFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
2246
2191
  isTypeTrue();
2247
- const AssetFileNamesSchema = union([string(), AssetFileNamesFunctionSchema]);
2248
- const SanitizeFileNameFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(string()));
2192
+ const AssetFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), AssetFileNamesFunctionSchema]);
2193
+ const SanitizeFileNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
2249
2194
  isTypeTrue();
2250
- const SanitizeFileNameSchema = union([boolean(), SanitizeFileNameFunctionSchema]);
2251
- const GlobalsFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(string()));
2195
+ const SanitizeFileNameSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), SanitizeFileNameFunctionSchema]);
2196
+ const GlobalsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
2252
2197
  isTypeTrue();
2253
- const PathsFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(string()));
2198
+ const PathsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
2254
2199
  isTypeTrue();
2255
- const ManualChunksFunctionSchema = pipe(vFunction(), args(tuple([string(), object({})])), returns(nullish(string())));
2200
+ const ManualChunksFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));
2256
2201
  isTypeTrue();
2257
- const AdvancedChunksNameFunctionSchema = pipe(vFunction(), args(tuple([string(), object({})])), returns(nullish(string())));
2202
+ const AdvancedChunksNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));
2258
2203
  isTypeTrue();
2259
- const AdvancedChunksTestFunctionSchema = pipe(vFunction(), args(tuple([string()])), returns(union([
2260
- boolean(),
2261
- void_(),
2262
- undefined_()
2204
+ const AdvancedChunksTestFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ union([
2205
+ /* @__PURE__ */ boolean(),
2206
+ /* @__PURE__ */ void_(),
2207
+ /* @__PURE__ */ undefined_()
2263
2208
  ])));
2264
2209
  isTypeTrue();
2265
- const AdvancedChunksSchema = strictObject({
2266
- includeDependenciesRecursively: optional(boolean()),
2267
- minSize: optional(number()),
2268
- maxSize: optional(number()),
2269
- minModuleSize: optional(number()),
2270
- maxModuleSize: optional(number()),
2271
- minShareCount: optional(number()),
2272
- groups: optional(array(strictObject({
2273
- name: union([string(), AdvancedChunksNameFunctionSchema]),
2274
- test: optional(union([StringOrRegExpSchema, AdvancedChunksTestFunctionSchema])),
2275
- priority: optional(number()),
2276
- minSize: optional(number()),
2277
- minShareCount: optional(number()),
2278
- maxSize: optional(number()),
2279
- minModuleSize: optional(number()),
2280
- maxModuleSize: optional(number()),
2281
- entriesAware: optional(boolean()),
2282
- entriesAwareMergeThreshold: optional(number())
2210
+ const AdvancedChunksSchema = /* @__PURE__ */ strictObject({
2211
+ includeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2212
+ minSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2213
+ maxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2214
+ minModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2215
+ maxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2216
+ minShareCount: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2217
+ groups: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ strictObject({
2218
+ name: /* @__PURE__ */ union([/* @__PURE__ */ string(), AdvancedChunksNameFunctionSchema]),
2219
+ test: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, AdvancedChunksTestFunctionSchema])),
2220
+ priority: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2221
+ minSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2222
+ minShareCount: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2223
+ maxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2224
+ minModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2225
+ maxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2226
+ entriesAware: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2227
+ entriesAwareMergeThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ number())
2283
2228
  })))
2284
2229
  });
2285
2230
  isTypeTrue();
2286
- const GeneratedCodePresetSchema = union([literal("es5"), literal("es2015")]);
2231
+ const GeneratedCodePresetSchema = /* @__PURE__ */ union([/* @__PURE__ */ literal("es5"), /* @__PURE__ */ literal("es2015")]);
2287
2232
  isTypeTrue();
2288
- const GeneratedCodeOptionsSchema = strictObject({
2289
- symbols: pipe(optional(boolean()), description("Whether to use Symbol.toStringTag for namespace objects")),
2290
- preset: optional(GeneratedCodePresetSchema),
2291
- profilerNames: pipe(optional(boolean()), description("Whether to add readable names to internal variables for profiling purposes"))
2233
+ const GeneratedCodeOptionsSchema = /* @__PURE__ */ strictObject({
2234
+ symbols: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to use Symbol.toStringTag for namespace objects")),
2235
+ preset: /* @__PURE__ */ optional(GeneratedCodePresetSchema),
2236
+ profilerNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to add readable names to internal variables for profiling purposes"))
2292
2237
  });
2293
2238
  isTypeTrue();
2294
- const OutputOptionsSchema = strictObject({
2295
- dir: pipe(optional(string()), description("Output directory, defaults to `dist` if `file` is not set")),
2296
- file: pipe(optional(string()), description("Single output file")),
2297
- exports: pipe(optional(union([
2298
- literal("auto"),
2299
- literal("named"),
2300
- literal("default"),
2301
- literal("none")
2302
- ])), description(`Specify a export mode (${styleText("underline", "auto")}, named, default, none)`)),
2303
- hashCharacters: pipe(optional(union([
2304
- literal("base64"),
2305
- literal("base36"),
2306
- literal("hex")
2307
- ])), description("Use the specified character set for file hashes")),
2308
- format: pipe(optional(ModuleFormatSchema), description(`Output format of the generated bundle (supports ${styleText("underline", "esm")}, cjs, and iife)`)),
2309
- sourcemap: pipe(optional(union([
2310
- boolean(),
2311
- literal("inline"),
2312
- literal("hidden")
2313
- ])), description(`Generate sourcemap (\`-s inline\` for inline, or ${styleText("bold", "pass the `-s` on the last argument if you want to generate `.map` file")})`)),
2314
- sourcemapBaseUrl: pipe(optional(string()), description("Base URL used to prefix sourcemap paths")),
2315
- sourcemapDebugIds: pipe(optional(boolean()), description("Inject sourcemap debug IDs")),
2316
- sourcemapIgnoreList: optional(union([
2317
- boolean(),
2318
- custom(() => true),
2239
+ const OutputOptionsSchema = /* @__PURE__ */ strictObject({
2240
+ dir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Output directory, defaults to `dist` if `file` is not set")),
2241
+ file: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Single output file")),
2242
+ exports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
2243
+ /* @__PURE__ */ literal("auto"),
2244
+ /* @__PURE__ */ literal("named"),
2245
+ /* @__PURE__ */ literal("default"),
2246
+ /* @__PURE__ */ literal("none")
2247
+ ])), /* @__PURE__ */ description(`Specify a export mode (${styleText("underline", "auto")}, named, default, none)`)),
2248
+ hashCharacters: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
2249
+ /* @__PURE__ */ literal("base64"),
2250
+ /* @__PURE__ */ literal("base36"),
2251
+ /* @__PURE__ */ literal("hex")
2252
+ ])), /* @__PURE__ */ description("Use the specified character set for file hashes")),
2253
+ format: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ModuleFormatSchema), /* @__PURE__ */ description(`Output format of the generated bundle (supports ${styleText("underline", "esm")}, cjs, and iife)`)),
2254
+ sourcemap: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
2255
+ /* @__PURE__ */ boolean(),
2256
+ /* @__PURE__ */ literal("inline"),
2257
+ /* @__PURE__ */ literal("hidden")
2258
+ ])), /* @__PURE__ */ description(`Generate sourcemap (\`-s inline\` for inline, or ${styleText("bold", "pass the `-s` on the last argument if you want to generate `.map` file")})`)),
2259
+ sourcemapBaseUrl: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Base URL used to prefix sourcemap paths")),
2260
+ sourcemapDebugIds: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Inject sourcemap debug IDs")),
2261
+ sourcemapIgnoreList: /* @__PURE__ */ optional(/* @__PURE__ */ union([
2262
+ /* @__PURE__ */ boolean(),
2263
+ /* @__PURE__ */ custom(() => true),
2319
2264
  StringOrRegExpSchema
2320
2265
  ])),
2321
- sourcemapPathTransform: optional(custom(() => true)),
2322
- banner: optional(union([string(), AddonFunctionSchema])),
2323
- footer: optional(union([string(), AddonFunctionSchema])),
2324
- postBanner: optional(union([string(), AddonFunctionSchema])),
2325
- postFooter: optional(union([string(), AddonFunctionSchema])),
2326
- intro: optional(union([string(), AddonFunctionSchema])),
2327
- outro: optional(union([string(), AddonFunctionSchema])),
2328
- extend: pipe(optional(boolean()), description("Extend global variable defined by name in IIFE / UMD formats")),
2329
- esModule: optional(union([boolean(), literal("if-default-prop")])),
2330
- assetFileNames: optional(AssetFileNamesSchema),
2331
- entryFileNames: optional(ChunkFileNamesSchema),
2332
- chunkFileNames: optional(ChunkFileNamesSchema),
2333
- sanitizeFileName: optional(SanitizeFileNameSchema),
2334
- minify: pipe(optional(union([
2335
- boolean(),
2336
- literal("dce-only"),
2266
+ sourcemapPathTransform: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
2267
+ banner: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
2268
+ footer: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
2269
+ postBanner: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
2270
+ postFooter: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
2271
+ intro: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
2272
+ outro: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
2273
+ extend: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Extend global variable defined by name in IIFE / UMD formats")),
2274
+ esModule: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("if-default-prop")])),
2275
+ assetFileNames: /* @__PURE__ */ optional(AssetFileNamesSchema),
2276
+ entryFileNames: /* @__PURE__ */ optional(ChunkFileNamesSchema),
2277
+ chunkFileNames: /* @__PURE__ */ optional(ChunkFileNamesSchema),
2278
+ sanitizeFileName: /* @__PURE__ */ optional(SanitizeFileNameSchema),
2279
+ minify: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
2280
+ /* @__PURE__ */ boolean(),
2281
+ /* @__PURE__ */ literal("dce-only"),
2337
2282
  MinifyOptionsSchema
2338
- ])), description("Minify the bundled file")),
2339
- name: pipe(optional(string()), description("Name for UMD / IIFE format outputs")),
2340
- globals: pipe(optional(union([record(string(), string()), GlobalsFunctionSchema])), description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
2341
- paths: pipe(optional(union([record(string(), string()), PathsFunctionSchema])), description("Maps external module IDs to paths")),
2342
- generatedCode: pipe(optional(partial(GeneratedCodeOptionsSchema)), description("Generated code options")),
2343
- externalLiveBindings: pipe(optional(boolean()), description("external live bindings")),
2344
- inlineDynamicImports: pipe(optional(boolean()), description("Inline dynamic imports")),
2345
- dynamicImportInCjs: pipe(optional(boolean()), description("Dynamic import in CJS output")),
2346
- manualChunks: optional(ManualChunksFunctionSchema),
2347
- codeSplitting: optional(union([boolean(), AdvancedChunksSchema])),
2348
- advancedChunks: optional(AdvancedChunksSchema),
2349
- legalComments: pipe(optional(union([literal("none"), literal("inline")])), description("Control legal comments in the output")),
2350
- comments: pipe(optional(union([boolean(), strictObject({
2351
- legal: optional(boolean()),
2352
- annotation: optional(boolean()),
2353
- jsdoc: optional(boolean())
2354
- })])), description("Control comments in the output")),
2355
- plugins: optional(custom(() => true)),
2356
- polyfillRequire: pipe(optional(boolean()), description("Disable require polyfill injection")),
2357
- hoistTransitiveImports: optional(literal(false)),
2358
- preserveModules: pipe(optional(boolean()), description("Preserve module structure")),
2359
- preserveModulesRoot: pipe(optional(string()), description("Put preserved modules under this path at root level")),
2360
- virtualDirname: optional(string()),
2361
- minifyInternalExports: pipe(optional(boolean()), description("Minify internal exports")),
2362
- topLevelVar: pipe(optional(boolean()), description("Rewrite top-level declarations to use `var`.")),
2363
- cleanDir: pipe(optional(boolean()), description("Clean output directory before emitting output")),
2364
- keepNames: pipe(optional(boolean()), description("Keep function and class names after bundling")),
2365
- strictExecutionOrder: pipe(optional(boolean()), description("Lets modules be executed in the order they are declared."))
2283
+ ])), /* @__PURE__ */ description("Minify the bundled file")),
2284
+ name: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name for UMD / IIFE format outputs")),
2285
+ 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`)")),
2286
+ paths: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string()), PathsFunctionSchema])), /* @__PURE__ */ description("Maps external module IDs to paths")),
2287
+ generatedCode: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ partial(GeneratedCodeOptionsSchema)), /* @__PURE__ */ description("Generated code options")),
2288
+ externalLiveBindings: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("external live bindings")),
2289
+ inlineDynamicImports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Inline dynamic imports")),
2290
+ dynamicImportInCjs: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Dynamic import in CJS output")),
2291
+ manualChunks: /* @__PURE__ */ optional(ManualChunksFunctionSchema),
2292
+ codeSplitting: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), AdvancedChunksSchema])),
2293
+ advancedChunks: /* @__PURE__ */ optional(AdvancedChunksSchema),
2294
+ legalComments: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("none"), /* @__PURE__ */ literal("inline")])), /* @__PURE__ */ description("Control legal comments in the output")),
2295
+ comments: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
2296
+ legal: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2297
+ annotation: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2298
+ jsdoc: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
2299
+ })])), /* @__PURE__ */ description("Control comments in the output")),
2300
+ plugins: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
2301
+ polyfillRequire: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Disable require polyfill injection")),
2302
+ hoistTransitiveImports: /* @__PURE__ */ optional(/* @__PURE__ */ literal(false)),
2303
+ preserveModules: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Preserve module structure")),
2304
+ preserveModulesRoot: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Put preserved modules under this path at root level")),
2305
+ virtualDirname: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
2306
+ minifyInternalExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Minify internal exports")),
2307
+ topLevelVar: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Rewrite top-level declarations to use `var`.")),
2308
+ cleanDir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Clean output directory before emitting output")),
2309
+ keepNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Keep function and class names after bundling")),
2310
+ strictExecutionOrder: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Lets modules be executed in the order they are declared.")),
2311
+ 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."))
2366
2312
  });
2367
2313
  isTypeTrue();
2368
2314
  const getAddonDescription = (placement, wrapper) => {
2369
2315
  return `Code to insert the ${styleText("bold", placement)} of the bundled file (${styleText("bold", wrapper)} the wrapper function)`;
2370
2316
  };
2371
- const OutputCliOverrideSchema = strictObject({
2372
- assetFileNames: pipe(optional(string()), description("Name pattern for asset files")),
2373
- entryFileNames: pipe(optional(string()), description("Name pattern for emitted entry chunks")),
2374
- chunkFileNames: pipe(optional(string()), description("Name pattern for emitted secondary chunks")),
2375
- sanitizeFileName: pipe(optional(boolean()), description("Sanitize file name")),
2376
- banner: pipe(optional(string()), description(getAddonDescription("top", "outside"))),
2377
- footer: pipe(optional(string()), description(getAddonDescription("bottom", "outside"))),
2378
- postBanner: pipe(optional(string()), description("A string to prepend to the top of each chunk. Applied after the `renderChunk` hook and minification")),
2379
- postFooter: pipe(optional(string()), description("A string to append to the bottom of each chunk. Applied after the `renderChunk` hook and minification")),
2380
- intro: pipe(optional(string()), description(getAddonDescription("top", "inside"))),
2381
- outro: pipe(optional(string()), description(getAddonDescription("bottom", "inside"))),
2382
- esModule: pipe(optional(boolean()), description("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")),
2383
- globals: pipe(optional(record(string(), string())), description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
2384
- codeSplitting: pipe(optional(union([boolean(), strictObject({
2385
- minSize: pipe(optional(number()), description("Minimum size of the chunk")),
2386
- minShareCount: pipe(optional(number()), description("Minimum share count of the chunk"))
2387
- })])), description("Code splitting options (true, false, or object)")),
2388
- advancedChunks: pipe(optional(strictObject({
2389
- minSize: pipe(optional(number()), description("Minimum size of the chunk")),
2390
- minShareCount: pipe(optional(number()), description("Minimum share count of the chunk"))
2391
- })), description("Deprecated: use codeSplitting instead")),
2392
- minify: pipe(optional(boolean()), description("Minify the bundled file"))
2317
+ const OutputCliOverrideSchema = /* @__PURE__ */ strictObject({
2318
+ assetFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for asset files")),
2319
+ entryFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for emitted entry chunks")),
2320
+ chunkFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for emitted secondary chunks")),
2321
+ sanitizeFileName: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Sanitize file name")),
2322
+ banner: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("top", "outside"))),
2323
+ footer: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("bottom", "outside"))),
2324
+ 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")),
2325
+ 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")),
2326
+ intro: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("top", "inside"))),
2327
+ outro: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("bottom", "inside"))),
2328
+ 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)")),
2329
+ globals: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())), /* @__PURE__ */ description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
2330
+ codeSplitting: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
2331
+ minSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum size of the chunk")),
2332
+ minShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum share count of the chunk"))
2333
+ })])), /* @__PURE__ */ description("Code splitting options (true, false, or object)")),
2334
+ advancedChunks: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
2335
+ minSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum size of the chunk")),
2336
+ minShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum share count of the chunk"))
2337
+ })), /* @__PURE__ */ description("Deprecated: use codeSplitting instead")),
2338
+ minify: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Minify the bundled file"))
2393
2339
  });
2394
- const OutputCliOptionsSchema = omit(strictObject({
2340
+ const OutputCliOptionsSchema = /* @__PURE__ */ omit(/* @__PURE__ */ strictObject({
2395
2341
  ...OutputOptionsSchema.entries,
2396
2342
  ...OutputCliOverrideSchema.entries
2397
2343
  }), [
@@ -2400,12 +2346,7 @@ const OutputCliOptionsSchema = omit(strictObject({
2400
2346
  "plugins",
2401
2347
  "hoistTransitiveImports"
2402
2348
  ]);
2403
- const CliOptionsSchema = strictObject({
2404
- config: pipe(optional(union([string(), boolean()])), description("Path to the config file (default: `rolldown.config.js`)")),
2405
- help: pipe(optional(boolean()), description("Show help")),
2406
- environment: pipe(optional(union([string(), array(string())])), description("Pass additional settings to the config file via process.ENV.")),
2407
- version: pipe(optional(boolean()), description("Show version number")),
2408
- watch: pipe(optional(boolean()), description("Watch files in bundle and rebuild on changes")),
2349
+ ({
2409
2350
  ...InputCliOptionsSchema.entries,
2410
2351
  ...OutputCliOptionsSchema.entries
2411
2352
  });
@@ -2417,7 +2358,7 @@ const outputHelperMsgRecord = {};
2417
2358
  function validateOption(key, options) {
2418
2359
  if (typeof options !== "object") throw new Error(`Invalid ${key} options. Expected an Object but received ${JSON.stringify(options)}.`);
2419
2360
  if (globalThis.process?.env?.ROLLUP_TEST) return;
2420
- let parsed = safeParse(key === "input" ? InputOptionsSchema : OutputOptionsSchema, options);
2361
+ let parsed = /* @__PURE__ */ safeParse(key === "input" ? InputOptionsSchema : OutputOptionsSchema, options);
2421
2362
  if (!parsed.success) {
2422
2363
  const errors = parsed.issues.map((issue) => {
2423
2364
  let issueMsg = issue.message;
@@ -2437,7 +2378,6 @@ function validateOption(key, options) {
2437
2378
  if (errors.length) console.warn(`\x1b[33mWarning: Invalid ${key} options (${errors.length} issue${errors.length === 1 ? "" : "s"} found)\n${errors.join("\n")}\x1b[0m`);
2438
2379
  }
2439
2380
  }
2440
-
2441
2381
  //#endregion
2442
2382
  //#region src/types/plain-object-like.ts
2443
2383
  const LAZY_FIELDS_KEY = Symbol("__lazy_fields__");
@@ -2516,7 +2456,6 @@ function getLazyFields(instance) {
2516
2456
  const lazyFields = instance.constructor[LAZY_FIELDS_KEY];
2517
2457
  return lazyFields ? new Set(lazyFields.keys()) : /* @__PURE__ */ new Set();
2518
2458
  }
2519
-
2520
2459
  //#endregion
2521
2460
  //#region src/decorators/lazy.ts
2522
2461
  /**
@@ -2554,7 +2493,6 @@ function lazyProp(target, propertyKey, descriptor) {
2554
2493
  configurable: true
2555
2494
  };
2556
2495
  }
2557
-
2558
2496
  //#endregion
2559
2497
  //#region src/utils/asset-source.ts
2560
2498
  function transformAssetSource(bindingAssetSource) {
@@ -2563,7 +2501,6 @@ function transformAssetSource(bindingAssetSource) {
2563
2501
  function bindingAssetSource(source) {
2564
2502
  return { inner: source };
2565
2503
  }
2566
-
2567
2504
  //#endregion
2568
2505
  //#region \0@oxc-project+runtime@0.115.0/helpers/decorate.js
2569
2506
  function __decorate(decorators, target, key, desc) {
@@ -2572,7 +2509,6 @@ function __decorate(decorators, target, key, desc) {
2572
2509
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2573
2510
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2574
2511
  }
2575
-
2576
2512
  //#endregion
2577
2513
  //#region src/types/output-asset-impl.ts
2578
2514
  var OutputAssetImpl = class extends PlainObjectLike {
@@ -2613,7 +2549,6 @@ __decorate([lazyProp], OutputAssetImpl.prototype, "originalFileNames", null);
2613
2549
  __decorate([lazyProp], OutputAssetImpl.prototype, "name", null);
2614
2550
  __decorate([lazyProp], OutputAssetImpl.prototype, "names", null);
2615
2551
  __decorate([lazyProp], OutputAssetImpl.prototype, "source", null);
2616
-
2617
2552
  //#endregion
2618
2553
  //#region src/utils/transform-rendered-module.ts
2619
2554
  function transformToRenderedModule(bindingRenderedModule) {
@@ -2629,7 +2564,6 @@ function transformToRenderedModule(bindingRenderedModule) {
2629
2564
  }
2630
2565
  };
2631
2566
  }
2632
-
2633
2567
  //#endregion
2634
2568
  //#region src/utils/transform-rendered-chunk.ts
2635
2569
  function transformRenderedChunk(chunk) {
@@ -2678,7 +2612,6 @@ function transformChunkModules(modules) {
2678
2612
  }
2679
2613
  return result;
2680
2614
  }
2681
-
2682
2615
  //#endregion
2683
2616
  //#region src/types/output-chunk-impl.ts
2684
2617
  var OutputChunkImpl = class extends PlainObjectLike {
@@ -2752,7 +2685,6 @@ __decorate([lazyProp], OutputChunkImpl.prototype, "imports", null);
2752
2685
  __decorate([lazyProp], OutputChunkImpl.prototype, "dynamicImports", null);
2753
2686
  __decorate([lazyProp], OutputChunkImpl.prototype, "moduleIds", null);
2754
2687
  __decorate([lazyProp], OutputChunkImpl.prototype, "map", null);
2755
-
2756
2688
  //#endregion
2757
2689
  //#region src/utils/transform-to-rollup-output.ts
2758
2690
  function transformToRollupSourceMap(map) {
@@ -2912,7 +2844,6 @@ function collectChangedBundle(changed, bundle) {
2912
2844
  deleted: changed.deleted
2913
2845
  };
2914
2846
  }
2915
-
2916
2847
  //#endregion
2917
2848
  //#region src/types/rolldown-output-impl.ts
2918
2849
  var RolldownOutputImpl = class extends PlainObjectLike {
@@ -2936,7 +2867,6 @@ var RolldownOutputImpl = class extends PlainObjectLike {
2936
2867
  }
2937
2868
  };
2938
2869
  __decorate([lazyProp], RolldownOutputImpl.prototype, "output", null);
2939
-
2940
2870
  //#endregion
2941
2871
  //#region src/parse-ast-index.ts
2942
2872
  function wrap(result, filename, sourceText) {
@@ -2980,7 +2910,6 @@ function parseAst(sourceText, options, filename) {
2980
2910
  ...options
2981
2911
  }), filename, sourceText);
2982
2912
  }
2983
-
2984
2913
  //#endregion
2985
2914
  //#region src/utils/transform-module-info.ts
2986
2915
  function transformModuleInfo(info, option) {
@@ -3002,7 +2931,6 @@ function transformModuleInfo(info, option) {
3002
2931
  ...option
3003
2932
  };
3004
2933
  }
3005
-
3006
2934
  //#endregion
3007
2935
  //#region src/utils/transform-sourcemap.ts
3008
2936
  function isEmptySourcemapFiled(array) {
@@ -3017,7 +2945,6 @@ function normalizeTransformHookSourcemap(id, originalCode, rawMap) {
3017
2945
  if (isEmptySourcemapFiled(map.sources) || map.sources && map.sources.length === 1 && map.sources[0] !== id) map.sources = [id];
3018
2946
  return map;
3019
2947
  }
3020
-
3021
2948
  //#endregion
3022
2949
  //#region ../pluginutils/dist/filter/composable-filters.js
3023
2950
  var And = class {
@@ -3101,7 +3028,6 @@ function include(expr) {
3101
3028
  function exclude(expr) {
3102
3029
  return new Exclude(expr);
3103
3030
  }
3104
-
3105
3031
  //#endregion
3106
3032
  //#region ../../node_modules/.pnpm/remeda@2.33.6/node_modules/remeda/dist/lazyDataLastImpl-DtF3cihj.js
3107
3033
  function e(e, t, n) {
@@ -3111,7 +3037,6 @@ function e(e, t, n) {
3111
3037
  lazyArgs: t
3112
3038
  });
3113
3039
  }
3114
-
3115
3040
  //#endregion
3116
3041
  //#region ../../node_modules/.pnpm/remeda@2.33.6/node_modules/remeda/dist/purry.js
3117
3042
  function t$1(t, n, r) {
@@ -3120,7 +3045,6 @@ function t$1(t, n, r) {
3120
3045
  if (i === 1) return e(t, n, r);
3121
3046
  throw Error(`Wrong number of arguments`);
3122
3047
  }
3123
-
3124
3048
  //#endregion
3125
3049
  //#region ../../node_modules/.pnpm/remeda@2.33.6/node_modules/remeda/dist/partition.js
3126
3050
  function t(...t) {
@@ -3131,7 +3055,6 @@ const n = (e, t) => {
3131
3055
  for (let [r, i] of e.entries()) t(i, r, e) ? n[0].push(i) : n[1].push(i);
3132
3056
  return n;
3133
3057
  };
3134
-
3135
3058
  //#endregion
3136
3059
  //#region src/plugin/bindingify-hook-filter.ts
3137
3060
  function generalHookFilterMatcherToFilterExprs(matcher, stringKind) {
@@ -3293,7 +3216,6 @@ function bindingifyRenderChunkFilter(filterOption) {
3293
3216
  }
3294
3217
  return filterOption.code ? bindingifyGeneralHookFilter("code", filterOption.code) : void 0;
3295
3218
  }
3296
-
3297
3219
  //#endregion
3298
3220
  //#region src/plugin/bindingify-plugin-hook-meta.ts
3299
3221
  function bindingifyPluginHookMeta(options) {
@@ -3308,7 +3230,6 @@ function bindingPluginOrder(order) {
3308
3230
  default: throw new Error(`Unknown plugin order: ${order}`);
3309
3231
  }
3310
3232
  }
3311
-
3312
3233
  //#endregion
3313
3234
  //#region src/plugin/fs.ts
3314
3235
  const fsModule = {
@@ -3331,7 +3252,6 @@ function throwNoFileSystemError(method) {
3331
3252
  error(logNoFileSystemInBrowser(method));
3332
3253
  };
3333
3254
  }
3334
-
3335
3255
  //#endregion
3336
3256
  //#region src/plugin/plugin-context.ts
3337
3257
  var PluginContextImpl = class extends MinimalPluginContextImpl {
@@ -3439,7 +3359,6 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
3439
3359
  return parseAst(input, options);
3440
3360
  }
3441
3361
  };
3442
-
3443
3362
  //#endregion
3444
3363
  //#region src/plugin/load-plugin-context.ts
3445
3364
  var LoadPluginContextImpl = class extends PluginContextImpl {
@@ -3451,7 +3370,6 @@ var LoadPluginContextImpl = class extends PluginContextImpl {
3451
3370
  this.inner.addWatchFile(id);
3452
3371
  }
3453
3372
  };
3454
-
3455
3373
  //#endregion
3456
3374
  //#region src/plugin/transform-plugin-context.ts
3457
3375
  var TransformPluginContextImpl = class extends PluginContextImpl {
@@ -3488,7 +3406,6 @@ var TransformPluginContextImpl = class extends PluginContextImpl {
3488
3406
  this.inner.sendMagicString(s);
3489
3407
  }
3490
3408
  };
3491
-
3492
3409
  //#endregion
3493
3410
  //#region src/plugin/bindingify-build-hooks.ts
3494
3411
  function createPluginContext(args, ctx) {
@@ -3691,7 +3608,6 @@ function bindingifyModuleParsed(args) {
3691
3608
  meta: bindingifyPluginHookMeta(meta)
3692
3609
  };
3693
3610
  }
3694
-
3695
3611
  //#endregion
3696
3612
  //#region src/plugin/bindingify-output-hooks.ts
3697
3613
  function bindingifyRenderStart(args) {
@@ -3888,7 +3804,6 @@ function bindingifyOutro(args) {
3888
3804
  meta: bindingifyPluginHookMeta(meta)
3889
3805
  };
3890
3806
  }
3891
-
3892
3807
  //#endregion
3893
3808
  //#region src/plugin/bindingify-watch-hooks.ts
3894
3809
  function bindingifyWatchChange(args) {
@@ -3913,7 +3828,6 @@ function bindingifyCloseWatcher(args) {
3913
3828
  meta: bindingifyPluginHookMeta(meta)
3914
3829
  };
3915
3830
  }
3916
-
3917
3831
  //#endregion
3918
3832
  //#region src/plugin/generated/hook-usage.ts
3919
3833
  let HookUsageKind = /* @__PURE__ */ function(HookUsageKind) {
@@ -3974,7 +3888,6 @@ function extractHookUsage(plugin) {
3974
3888
  if (plugin.outro) hookUsage.union(HookUsageKind.outro);
3975
3889
  return hookUsage;
3976
3890
  }
3977
-
3978
3891
  //#endregion
3979
3892
  //#region src/plugin/bindingify-plugin.ts
3980
3893
  function bindingifyPlugin(plugin, options, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode) {
@@ -4095,14 +4008,14 @@ function wrapHandlers(plugin) {
4095
4008
  }
4096
4009
  return plugin;
4097
4010
  }
4098
-
4099
4011
  //#endregion
4100
4012
  //#region src/options/normalized-input-options.ts
4101
4013
  var NormalizedInputOptionsImpl = class extends PlainObjectLike {
4102
4014
  inner;
4103
- constructor(inner, onLog) {
4015
+ constructor(inner, onLog, inputPlugins) {
4104
4016
  super();
4105
4017
  this.onLog = onLog;
4018
+ this.inputPlugins = inputPlugins;
4106
4019
  this.inner = inner;
4107
4020
  }
4108
4021
  get shimMissingExports() {
@@ -4120,13 +4033,15 @@ var NormalizedInputOptionsImpl = class extends PlainObjectLike {
4120
4033
  get context() {
4121
4034
  return this.inner.context;
4122
4035
  }
4036
+ get plugins() {
4037
+ return this.inputPlugins;
4038
+ }
4123
4039
  };
4124
4040
  __decorate([lazyProp], NormalizedInputOptionsImpl.prototype, "shimMissingExports", null);
4125
4041
  __decorate([lazyProp], NormalizedInputOptionsImpl.prototype, "input", null);
4126
4042
  __decorate([lazyProp], NormalizedInputOptionsImpl.prototype, "cwd", null);
4127
4043
  __decorate([lazyProp], NormalizedInputOptionsImpl.prototype, "platform", null);
4128
4044
  __decorate([lazyProp], NormalizedInputOptionsImpl.prototype, "context", null);
4129
-
4130
4045
  //#endregion
4131
4046
  //#region src/options/normalized-output-options.ts
4132
4047
  var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
@@ -4311,7 +4226,6 @@ function normalizeAddon(value) {
4311
4226
  if (typeof value === "function") return value;
4312
4227
  return () => value || "";
4313
4228
  }
4314
-
4315
4229
  //#endregion
4316
4230
  //#region src/plugin/plugin-context-data.ts
4317
4231
  var PluginContextData = class {
@@ -4321,9 +4235,10 @@ var PluginContextData = class {
4321
4235
  renderedChunkMeta = null;
4322
4236
  normalizedInputOptions = null;
4323
4237
  normalizedOutputOptions = null;
4324
- constructor(onLog, outputOptions, normalizedOutputPlugins) {
4238
+ constructor(onLog, outputOptions, normalizedInputPlugins, normalizedOutputPlugins) {
4325
4239
  this.onLog = onLog;
4326
4240
  this.outputOptions = outputOptions;
4241
+ this.normalizedInputPlugins = normalizedInputPlugins;
4327
4242
  this.normalizedOutputPlugins = normalizedOutputPlugins;
4328
4243
  }
4329
4244
  updateModuleOption(id, option) {
@@ -4396,7 +4311,7 @@ var PluginContextData = class {
4396
4311
  return this.renderedChunkMeta;
4397
4312
  }
4398
4313
  getInputOptions(opts) {
4399
- this.normalizedInputOptions ??= new NormalizedInputOptionsImpl(opts, this.onLog);
4314
+ this.normalizedInputOptions ??= new NormalizedInputOptionsImpl(opts, this.onLog, this.normalizedInputPlugins);
4400
4315
  return this.normalizedInputOptions;
4401
4316
  }
4402
4317
  getOutputOptions(opts) {
@@ -4408,7 +4323,6 @@ var PluginContextData = class {
4408
4323
  this.loadModulePromiseMap.clear();
4409
4324
  }
4410
4325
  };
4411
-
4412
4326
  //#endregion
4413
4327
  //#region src/utils/normalize-transform-options.ts
4414
4328
  /**
@@ -4436,11 +4350,10 @@ function normalizeTransformOptions(inputOptions) {
4436
4350
  oxcTransformOptions
4437
4351
  };
4438
4352
  }
4439
-
4440
4353
  //#endregion
4441
4354
  //#region src/utils/bindingify-input-options.ts
4442
- function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode) {
4443
- const pluginContextData = new PluginContextData(onLog, outputOptions, normalizedOutputPlugins);
4355
+ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normalizedInputPlugins, normalizedOutputPlugins, onLog, logLevel, watchMode) {
4356
+ const pluginContextData = new PluginContextData(onLog, outputOptions, normalizedInputPlugins, normalizedOutputPlugins);
4444
4357
  const plugins = rawPlugins.map((plugin) => {
4445
4358
  if ("_parallel" in plugin) return;
4446
4359
  if (plugin instanceof BuiltinPlugin) switch (plugin.name) {
@@ -4599,13 +4512,23 @@ function bindingifyInput(input) {
4599
4512
  });
4600
4513
  }
4601
4514
  function bindingifyWatch(watch) {
4602
- if (watch) return {
4603
- buildDelay: watch.buildDelay,
4604
- skipWrite: watch.skipWrite,
4605
- include: normalizedStringOrRegex(watch.include),
4606
- exclude: normalizedStringOrRegex(watch.exclude),
4607
- onInvalidate: (...args) => watch.onInvalidate?.(...args)
4608
- };
4515
+ if (watch) {
4516
+ if (watch.notify) console.warn("The \"watch.notify\" option is deprecated. Please use \"watch.watcher\" instead.");
4517
+ const watcher = {
4518
+ ...watch.notify,
4519
+ ...watch.watcher
4520
+ };
4521
+ return {
4522
+ buildDelay: watch.buildDelay,
4523
+ skipWrite: watch.skipWrite,
4524
+ usePolling: watcher.usePolling,
4525
+ pollInterval: watcher.pollInterval,
4526
+ compareContentsForPolling: watcher.compareContentsForPolling,
4527
+ include: normalizedStringOrRegex(watch.include),
4528
+ exclude: normalizedStringOrRegex(watch.exclude),
4529
+ onInvalidate: (...args) => watch.onInvalidate?.(...args)
4530
+ };
4531
+ }
4609
4532
  }
4610
4533
  function bindingifyTreeshakeOptions(config) {
4611
4534
  if (config === false) return;
@@ -4665,7 +4588,6 @@ function bindingifyPreserveEntrySignatures(preserveEntrySignatures) {
4665
4588
  field0: preserveEntrySignatures
4666
4589
  };
4667
4590
  }
4668
-
4669
4591
  //#endregion
4670
4592
  //#region src/types/chunking-context.ts
4671
4593
  var ChunkingContextImpl = class {
@@ -4681,7 +4603,6 @@ var ChunkingContextImpl = class {
4681
4603
  return null;
4682
4604
  }
4683
4605
  };
4684
-
4685
4606
  //#endregion
4686
4607
  //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs
4687
4608
  const LogLevels = {
@@ -5067,7 +4988,6 @@ Consola.prototype.resume = Consola.prototype.resumeLogs;
5067
4988
  function createConsola$1(options = {}) {
5068
4989
  return new Consola(options);
5069
4990
  }
5070
-
5071
4991
  //#endregion
5072
4992
  //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/browser.mjs
5073
4993
  var BrowserReporter = class {
@@ -5116,15 +5036,13 @@ function createConsola(options = {}) {
5116
5036
  ...options
5117
5037
  });
5118
5038
  }
5119
- const consola = createConsola();
5120
-
5039
+ createConsola();
5121
5040
  //#endregion
5122
5041
  //#region src/cli/logger.ts
5123
5042
  /**
5124
5043
  * Console logger
5125
5044
  */
5126
5045
  const logger = createConsola({ formatOptions: { date: false } });
5127
-
5128
5046
  //#endregion
5129
5047
  //#region src/utils/bindingify-output-options.ts
5130
5048
  function bindingifyOutputOptions(outputOptions) {
@@ -5173,7 +5091,8 @@ function bindingifyOutputOptions(outputOptions) {
5173
5091
  topLevelVar,
5174
5092
  minifyInternalExports: outputOptions.minifyInternalExports,
5175
5093
  cleanDir,
5176
- strictExecutionOrder
5094
+ strictExecutionOrder,
5095
+ strict: outputOptions.strict
5177
5096
  };
5178
5097
  }
5179
5098
  function bindingifyAddon(configAddon) {
@@ -5274,23 +5193,24 @@ function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, adva
5274
5193
  advancedChunks: advancedChunksResult
5275
5194
  };
5276
5195
  }
5277
-
5278
5196
  //#endregion
5279
5197
  //#region src/utils/create-bundler-option.ts
5280
5198
  async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
5281
5199
  const inputPlugins = await normalizePluginOption(inputOptions.plugins);
5282
5200
  const outputPlugins = await normalizePluginOption(outputOptions.plugins);
5283
- const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
5201
+ const logLevel = inputOptions.logLevel || "info";
5284
5202
  const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
5285
5203
  outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
5286
- const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
5287
- let plugins = [...normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX), ...checkOutputPluginOption(normalizePlugins(normalizedOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX), onLog)];
5204
+ const hookOutputPlugins = await normalizePluginOption(outputOptions.plugins);
5205
+ const normalizedInputPlugins = normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX);
5206
+ const normalizedOutputPlugins = normalizePlugins(hookOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX);
5207
+ let plugins = [...normalizedInputPlugins, ...checkOutputPluginOption(normalizedOutputPlugins, onLog)];
5288
5208
  const parallelPluginInitResult = void 0;
5289
5209
  if (inputOptions.experimental?.strictExecutionOrder !== void 0) console.warn("`experimental.strictExecutionOrder` has been stabilized and moved to `output.strictExecutionOrder`. Please update your configuration.");
5290
5210
  try {
5291
5211
  return {
5292
5212
  bundlerOptions: {
5293
- inputOptions: bindingifyInputOptions(plugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode),
5213
+ inputOptions: bindingifyInputOptions(plugins, inputOptions, outputOptions, normalizedInputPlugins, normalizedOutputPlugins, onLog, logLevel, watchMode),
5294
5214
  outputOptions: bindingifyOutputOptions(outputOptions),
5295
5215
  parallelPluginsRegistry: parallelPluginInitResult?.registry
5296
5216
  },
@@ -5303,7 +5223,6 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
5303
5223
  throw e;
5304
5224
  }
5305
5225
  }
5306
-
5307
5226
  //#endregion
5308
5227
  //#region src/api/rolldown/rolldown-build.ts
5309
5228
  Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
@@ -5338,7 +5257,7 @@ var RolldownBuild = class RolldownBuild {
5338
5257
  *
5339
5258
  * @param outputOptions The output options.
5340
5259
  * @returns The generated bundle.
5341
- * @throws {@linkcode RolldownError} When an error occurs during the build.
5260
+ * @throws {@linkcode BundleError} When an error occurs during the build.
5342
5261
  */
5343
5262
  async generate(outputOptions = {}) {
5344
5263
  return this.#build(false, outputOptions);
@@ -5350,7 +5269,7 @@ var RolldownBuild = class RolldownBuild {
5350
5269
  *
5351
5270
  * @param outputOptions The output options.
5352
5271
  * @returns The generated bundle.
5353
- * @throws {@linkcode RolldownError} When an error occurs during the build.
5272
+ * @throws {@linkcode BundleError} When an error occurs during the build.
5354
5273
  */
5355
5274
  async write(outputOptions = {}) {
5356
5275
  return this.#build(true, outputOptions);
@@ -5407,6 +5326,5 @@ var RolldownBuild = class RolldownBuild {
5407
5326
  }
5408
5327
  }
5409
5328
  };
5410
-
5411
5329
  //#endregion
5412
- export { PluginDriver as a, RUNTIME_MODULE_ID as c, validateOption as i, VERSION as l, createBundlerOptions as n, LOG_LEVEL_WARN as o, transformToRollupOutput as r, arraify as s, RolldownBuild as t };
5330
+ export { PluginDriver as a, RUNTIME_MODULE_ID as c, validateOption as i, VERSION as l, createBundlerOptions as n, LOG_LEVEL_WARN as o, transformToRollupOutput as r, arraify as s, RolldownBuild as t };