@rolldown/browser 1.0.0-beta.10-commit.ac4e5db → 1.0.0-beta.10-commit.81375fe

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 (33) hide show
  1. package/dist/cli.cjs +28 -29
  2. package/dist/cli.mjs +29 -56
  3. package/dist/config.cjs +2 -2
  4. package/dist/config.d.cts +1 -1
  5. package/dist/config.d.mts +1 -1
  6. package/dist/config.mjs +3 -3
  7. package/dist/experimental-index.browser.mjs +1 -1
  8. package/dist/experimental-index.cjs +1 -1
  9. package/dist/experimental-index.d.cts +1 -1
  10. package/dist/experimental-index.d.mts +1 -1
  11. package/dist/experimental-index.mjs +2 -2
  12. package/dist/filter-index.d.cts +1 -1
  13. package/dist/filter-index.d.mts +1 -1
  14. package/dist/filter-index.mjs +1 -1
  15. package/dist/index.browser.mjs +1 -1
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.d.cts +1 -1
  18. package/dist/index.d.mts +1 -1
  19. package/dist/index.mjs +2 -2
  20. package/dist/parallel-plugin-worker.cjs +1 -1
  21. package/dist/parallel-plugin-worker.mjs +2 -2
  22. package/dist/parallel-plugin.d.cts +1 -1
  23. package/dist/parallel-plugin.d.mts +1 -1
  24. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  25. package/dist/shared/{define-config.d-DII1FzpF.d.cts → define-config.d-BDJzbjFe.d.mts} +3 -2
  26. package/dist/shared/{define-config.d-BBxr6_Bs.d.mts → define-config.d-C0X0fNDk.d.cts} +4 -3
  27. package/dist/shared/{dist-JdACkHJM.mjs → dist-BoWaIc-K.mjs} +1 -1
  28. package/dist/shared/{load-config-DHiFIPc1.cjs → load-config-Cr472rVH.cjs} +1 -1
  29. package/dist/shared/{load-config-DXspXfGi.mjs → load-config-a5TDbL5U.mjs} +1 -1
  30. package/dist/shared/{src-DYeE276c.cjs → src-Cd6dJVwS.cjs} +237 -98
  31. package/dist/shared/{src-CrAobyBl.mjs → src-Mp5z-lgE.mjs} +259 -100
  32. package/dist/{src-Bhvm4CGb.js → src--mQWdm3h.js} +269 -110
  33. package/package.json +2 -6
package/dist/cli.cjs CHANGED
@@ -1,10 +1,9 @@
1
1
  const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-DYeE276c.cjs');
2
+ const require_src = require('./shared/src-Cd6dJVwS.cjs');
3
3
  const require_dist = require('./shared/dist-BMVjvV-v.cjs');
4
4
  require('./shared/parse-ast-index-BuelS_NF.cjs');
5
- const require_load_config = require('./shared/load-config-DHiFIPc1.cjs');
5
+ const require_load_config = require('./shared/load-config-Cr472rVH.cjs');
6
6
  const node_path = require_chunk.__toESM(require("node:path"));
7
- const ansis = require_chunk.__toESM(require("ansis"));
8
7
  const node_process = require_chunk.__toESM(require("node:process"));
9
8
  const node_util = require_chunk.__toESM(require("node:util"));
10
9
  const node_tty = require_chunk.__toESM(require("node:tty"));
@@ -527,9 +526,9 @@ const colorDefs = {
527
526
  function createColors(useColor = isColorSupported) {
528
527
  return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
529
528
  }
530
- const colors$2 = createColors();
529
+ const colors = createColors();
531
530
  function getColor$1(color, fallback = "reset") {
532
- return colors$2[color] || colors$2[fallback];
531
+ return colors[color] || colors[fallback];
533
532
  }
534
533
  const ansiRegex$1 = [String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`, String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");
535
534
  function stripAnsi(text) {
@@ -906,12 +905,12 @@ var FancyReporter = class extends BasicReporter {
906
905
  formatStack(stack, message, opts) {
907
906
  const indent = " ".repeat((opts?.errorLevel || 0) + 1);
908
907
  return `
909
- ${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors$2.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors$2.cyan(m)})`)).join(`
908
+ ${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors.cyan(m)})`)).join(`
910
909
  ${indent}`);
911
910
  }
912
911
  formatType(logObj, isBadge, opts) {
913
912
  const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
914
- if (isBadge) return getBgColor(typeColor)(colors$2.black(` ${logObj.type.toUpperCase()} `));
913
+ if (isBadge) return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
915
914
  const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
916
915
  return _type ? getColor(typeColor)(_type) : "";
917
916
  }
@@ -922,15 +921,15 @@ ${indent}`);
922
921
  style: logObj.style
923
922
  });
924
923
  const date = this.formatDate(logObj.date, opts);
925
- const coloredDate = date && colors$2.gray(date);
924
+ const coloredDate = date && colors.gray(date);
926
925
  const isBadge = logObj.badge ?? logObj.level < 2;
927
926
  const type = this.formatType(logObj, isBadge, opts);
928
- const tag = logObj.tag ? colors$2.gray(logObj.tag) : "";
927
+ const tag = logObj.tag ? colors.gray(logObj.tag) : "";
929
928
  let line;
930
929
  const left = this.filterAndJoin([type, characterFormat(message)]);
931
930
  const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
932
931
  const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
933
- line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors$2.gray(`[${right}]`)} ` : "") + left;
932
+ line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
934
933
  line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
935
934
  if (logObj.type === "trace") {
936
935
  const _err = new Error("Trace: " + logObj.message);
@@ -940,13 +939,13 @@ ${indent}`);
940
939
  }
941
940
  };
942
941
  function characterFormat(str) {
943
- return str.replace(/`([^`]+)`/gm, (_$1, m) => colors$2.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_$1, m) => ` ${colors$2.underline(m)} `);
942
+ return str.replace(/`([^`]+)`/gm, (_$1, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_$1, m) => ` ${colors.underline(m)} `);
944
943
  }
945
944
  function getColor(color = "white") {
946
- return colors$2[color] || colors$2.white;
945
+ return colors[color] || colors.white;
947
946
  }
948
947
  function getBgColor(color = "bgWhite") {
949
- return colors$2[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors$2.bgWhite;
948
+ return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
950
949
  }
951
950
  function createConsola(options$1 = {}) {
952
951
  let level = _getDefaultLogLevel();
@@ -1514,7 +1513,7 @@ async function bundleWithCliOptions(cliOptions) {
1514
1513
  process.exit(1);
1515
1514
  }
1516
1515
  for (const file of outputs) {
1517
- if (outputs.length > 1) logger.log(`\n${ansis.default.cyan(ansis.default.bold(`|→ ${file.fileName}:`))}\n`);
1516
+ if (outputs.length > 1) logger.log(`\n${require_src.ansis_default.cyan(require_src.ansis_default.bold(`|→ ${file.fileName}:`))}\n`);
1518
1517
  console.log(file.type === "asset" ? file.source : file.code);
1519
1518
  }
1520
1519
  } catch (_$1) {
@@ -1550,12 +1549,12 @@ async function watchInner(config, cliOptions) {
1550
1549
  watcher.on("event", async (event) => {
1551
1550
  switch (event.code) {
1552
1551
  case "BUNDLE_START":
1553
- if (changedFile.length > 0) logger.log(`Found ${ansis.default.bold(changedFile.map(relativeId).join(", "))} changed, rebuilding...`);
1552
+ if (changedFile.length > 0) logger.log(`Found ${require_src.ansis_default.bold(changedFile.map(relativeId).join(", "))} changed, rebuilding...`);
1554
1553
  changedFile.length = 0;
1555
1554
  break;
1556
1555
  case "BUNDLE_END":
1557
1556
  await event.result.close();
1558
- logger.success(`Rebuilt ${ansis.default.bold(relativeId(event.output[0]))} in ${ansis.default.bold(ms(event.duration))}.`);
1557
+ logger.success(`Rebuilt ${require_src.ansis_default.bold(relativeId(event.output[0]))} in ${require_src.ansis_default.bold(ms(event.duration))}.`);
1559
1558
  break;
1560
1559
  case "ERROR":
1561
1560
  await event.result.close();
@@ -1589,7 +1588,7 @@ async function bundleInner(config, cliOptions) {
1589
1588
  logger.log(``);
1590
1589
  const endTime = node_perf_hooks.performance.now();
1591
1590
  const duration = endTime - startTime;
1592
- logger.success(`Finished in ${ansis.default.bold(ms(duration))}`);
1591
+ logger.success(`Finished in ${require_src.ansis_default.bold(ms(duration))}`);
1593
1592
  }
1594
1593
  function printBundleOutputPretty(output) {
1595
1594
  const outputEntries = collectOutputEntries(output.output);
@@ -1636,10 +1635,10 @@ function printOutputEntries(entries, sizeAdjustment, distPath) {
1636
1635
  const filtered = entries.filter((e) => e.type === group.type);
1637
1636
  if (!filtered.length) continue;
1638
1637
  for (const entry of filtered.sort((a$1, z) => a$1.size - z.size)) {
1639
- let log = ansis.default.dim(withTrailingSlash(distPath));
1640
- log += ansis.default[group.color](entry.fileName.padEnd(sizeAdjustment.longest + 2));
1641
- log += ansis.default.dim(entry.type);
1642
- log += ansis.default.dim(` │ size: ${displaySize(entry.size).padStart(sizeAdjustment.sizePad)}`);
1638
+ let log = require_src.ansis_default.dim(withTrailingSlash(distPath));
1639
+ log += require_src.ansis_default[group.color](entry.fileName.padEnd(sizeAdjustment.longest + 2));
1640
+ log += require_src.ansis_default.dim(entry.type);
1641
+ log += require_src.ansis_default.dim(` │ size: ${displaySize(entry.size).padStart(sizeAdjustment.sizePad)}`);
1643
1642
  logger.log(log);
1644
1643
  }
1645
1644
  }
@@ -1658,9 +1657,9 @@ function relativeId(id) {
1658
1657
 
1659
1658
  //#endregion
1660
1659
  //#region src/cli/commands/help.ts
1661
- const introduction = `${ansis.default.gray(`${require_src.description} (rolldown v${require_src.version})`)}
1660
+ const introduction = `${require_src.ansis_default.gray(`${require_src.description} (rolldown v${require_src.version})`)}
1662
1661
 
1663
- ${ansis.default.bold(ansis.default.underline("USAGE"))} ${ansis.default.cyan("rolldown -c <config>")} or ${ansis.default.cyan("rolldown <input> <options>")}`;
1662
+ ${require_src.ansis_default.bold(require_src.ansis_default.underline("USAGE"))} ${require_src.ansis_default.cyan("rolldown -c <config>")} or ${require_src.ansis_default.cyan("rolldown <input> <options>")}`;
1664
1663
  const examples = [
1665
1664
  {
1666
1665
  title: "Bundle with a config file `rolldown.config.mjs`",
@@ -1692,7 +1691,7 @@ const notes = [
1692
1691
  function showHelp() {
1693
1692
  logger.log(introduction);
1694
1693
  logger.log("");
1695
- logger.log(`${ansis.default.bold(ansis.default.underline("OPTIONS"))}`);
1694
+ logger.log(`${require_src.ansis_default.bold(require_src.ansis_default.underline("OPTIONS"))}`);
1696
1695
  logger.log("");
1697
1696
  logger.log(Object.entries(options).sort(([a$1], [b$1]) => {
1698
1697
  if (options[a$1].short && !options[b$1].short) return -1;
@@ -1705,20 +1704,20 @@ function showHelp() {
1705
1704
  if (short) optionStr += `-${short}, `;
1706
1705
  if (type === "string") optionStr += `<${hint ?? option}>`;
1707
1706
  if (description$1 && description$1.length > 0) description$1 = description$1[0].toUpperCase() + description$1.slice(1);
1708
- return ansis.default.cyan(optionStr.padEnd(30)) + description$1 + (description$1 && description$1?.endsWith(".") ? "" : ".");
1707
+ return require_src.ansis_default.cyan(optionStr.padEnd(30)) + description$1 + (description$1 && description$1?.endsWith(".") ? "" : ".");
1709
1708
  }).join("\n"));
1710
1709
  logger.log("");
1711
- logger.log(`${ansis.default.bold(ansis.default.underline("EXAMPLES"))}`);
1710
+ logger.log(`${require_src.ansis_default.bold(require_src.ansis_default.underline("EXAMPLES"))}`);
1712
1711
  logger.log("");
1713
1712
  examples.forEach(({ title, command }, ord) => {
1714
1713
  logger.log(` ${ord + 1}. ${title}:`);
1715
- logger.log(` ${ansis.default.cyan(command)}`);
1714
+ logger.log(` ${require_src.ansis_default.cyan(command)}`);
1716
1715
  logger.log("");
1717
1716
  });
1718
- logger.log(`${ansis.default.bold(ansis.default.underline("NOTES"))}`);
1717
+ logger.log(`${require_src.ansis_default.bold(require_src.ansis_default.underline("NOTES"))}`);
1719
1718
  logger.log("");
1720
1719
  notes.forEach((note) => {
1721
- logger.log(` * ${ansis.default.gray(note)}`);
1720
+ logger.log(` * ${require_src.ansis_default.gray(note)}`);
1722
1721
  });
1723
1722
  }
1724
1723
 
package/dist/cli.mjs CHANGED
@@ -1,40 +1,13 @@
1
- import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-CrAobyBl.mjs";
2
- import { arraify } from "./shared/dist-JdACkHJM.mjs";
1
+ import { __commonJS, __toESM, ansis_default, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-Mp5z-lgE.mjs";
2
+ import { arraify } from "./shared/dist-BoWaIc-K.mjs";
3
3
  import "./shared/parse-ast-index-C31FpvkE.mjs";
4
- import { loadConfig } from "./shared/load-config-DXspXfGi.mjs";
4
+ import { loadConfig } from "./shared/load-config-a5TDbL5U.mjs";
5
5
  import path, { sep } from "node:path";
6
- import colors from "ansis";
7
6
  import process$1 from "node:process";
8
7
  import { formatWithOptions, parseArgs } from "node:util";
9
8
  import * as tty from "node:tty";
10
9
  import { performance } from "node:perf_hooks";
11
10
 
12
- //#region rolldown:runtime
13
- var __create = Object.create;
14
- var __defProp = Object.defineProperty;
15
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
16
- var __getOwnPropNames = Object.getOwnPropertyNames;
17
- var __getProtoOf = Object.getPrototypeOf;
18
- var __hasOwnProp = Object.prototype.hasOwnProperty;
19
- var __commonJS = (cb, mod) => function() {
20
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
21
- };
22
- var __copyProps = (to, from, except, desc) => {
23
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i$1 = 0, n$1 = keys.length, key; i$1 < n$1; i$1++) {
24
- key = keys[i$1];
25
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
26
- get: ((k) => from[k]).bind(null, key),
27
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
28
- });
29
- }
30
- return to;
31
- };
32
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
33
- value: mod,
34
- enumerable: true
35
- }) : target, mod));
36
-
37
- //#endregion
38
11
  //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs
39
12
  const LogLevels = {
40
13
  silent: Number.NEGATIVE_INFINITY,
@@ -552,9 +525,9 @@ const colorDefs = {
552
525
  function createColors(useColor = isColorSupported) {
553
526
  return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
554
527
  }
555
- const colors$1 = createColors();
528
+ const colors = createColors();
556
529
  function getColor$1(color, fallback = "reset") {
557
- return colors$1[color] || colors$1[fallback];
530
+ return colors[color] || colors[fallback];
558
531
  }
559
532
  const ansiRegex$1 = [String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`, String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");
560
533
  function stripAnsi(text) {
@@ -931,12 +904,12 @@ var FancyReporter = class extends BasicReporter {
931
904
  formatStack(stack, message, opts) {
932
905
  const indent = " ".repeat((opts?.errorLevel || 0) + 1);
933
906
  return `
934
- ${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors$1.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors$1.cyan(m)})`)).join(`
907
+ ${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors.cyan(m)})`)).join(`
935
908
  ${indent}`);
936
909
  }
937
910
  formatType(logObj, isBadge, opts) {
938
911
  const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
939
- if (isBadge) return getBgColor(typeColor)(colors$1.black(` ${logObj.type.toUpperCase()} `));
912
+ if (isBadge) return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
940
913
  const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
941
914
  return _type ? getColor(typeColor)(_type) : "";
942
915
  }
@@ -947,15 +920,15 @@ ${indent}`);
947
920
  style: logObj.style
948
921
  });
949
922
  const date = this.formatDate(logObj.date, opts);
950
- const coloredDate = date && colors$1.gray(date);
923
+ const coloredDate = date && colors.gray(date);
951
924
  const isBadge = logObj.badge ?? logObj.level < 2;
952
925
  const type = this.formatType(logObj, isBadge, opts);
953
- const tag = logObj.tag ? colors$1.gray(logObj.tag) : "";
926
+ const tag = logObj.tag ? colors.gray(logObj.tag) : "";
954
927
  let line;
955
928
  const left = this.filterAndJoin([type, characterFormat(message)]);
956
929
  const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
957
930
  const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
958
- line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors$1.gray(`[${right}]`)} ` : "") + left;
931
+ line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
959
932
  line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
960
933
  if (logObj.type === "trace") {
961
934
  const _err = new Error("Trace: " + logObj.message);
@@ -965,13 +938,13 @@ ${indent}`);
965
938
  }
966
939
  };
967
940
  function characterFormat(str) {
968
- return str.replace(/`([^`]+)`/gm, (_$1, m) => colors$1.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_$1, m) => ` ${colors$1.underline(m)} `);
941
+ return str.replace(/`([^`]+)`/gm, (_$1, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_$1, m) => ` ${colors.underline(m)} `);
969
942
  }
970
943
  function getColor(color = "white") {
971
- return colors$1[color] || colors$1.white;
944
+ return colors[color] || colors.white;
972
945
  }
973
946
  function getBgColor(color = "bgWhite") {
974
- return colors$1[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors$1.bgWhite;
947
+ return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
975
948
  }
976
949
  function createConsola(options$1 = {}) {
977
950
  let level = _getDefaultLogLevel();
@@ -1537,7 +1510,7 @@ async function bundleWithCliOptions(cliOptions) {
1537
1510
  process.exit(1);
1538
1511
  }
1539
1512
  for (const file of outputs) {
1540
- if (outputs.length > 1) logger.log(`\n${colors.cyan(colors.bold(`|→ ${file.fileName}:`))}\n`);
1513
+ if (outputs.length > 1) logger.log(`\n${ansis_default.cyan(ansis_default.bold(`|→ ${file.fileName}:`))}\n`);
1541
1514
  console.log(file.type === "asset" ? file.source : file.code);
1542
1515
  }
1543
1516
  } catch (_$1) {
@@ -1573,12 +1546,12 @@ async function watchInner(config, cliOptions) {
1573
1546
  watcher.on("event", async (event) => {
1574
1547
  switch (event.code) {
1575
1548
  case "BUNDLE_START":
1576
- if (changedFile.length > 0) logger.log(`Found ${colors.bold(changedFile.map(relativeId).join(", "))} changed, rebuilding...`);
1549
+ if (changedFile.length > 0) logger.log(`Found ${ansis_default.bold(changedFile.map(relativeId).join(", "))} changed, rebuilding...`);
1577
1550
  changedFile.length = 0;
1578
1551
  break;
1579
1552
  case "BUNDLE_END":
1580
1553
  await event.result.close();
1581
- logger.success(`Rebuilt ${colors.bold(relativeId(event.output[0]))} in ${colors.bold(ms(event.duration))}.`);
1554
+ logger.success(`Rebuilt ${ansis_default.bold(relativeId(event.output[0]))} in ${ansis_default.bold(ms(event.duration))}.`);
1582
1555
  break;
1583
1556
  case "ERROR":
1584
1557
  await event.result.close();
@@ -1612,7 +1585,7 @@ async function bundleInner(config, cliOptions) {
1612
1585
  logger.log(``);
1613
1586
  const endTime = performance.now();
1614
1587
  const duration = endTime - startTime;
1615
- logger.success(`Finished in ${colors.bold(ms(duration))}`);
1588
+ logger.success(`Finished in ${ansis_default.bold(ms(duration))}`);
1616
1589
  }
1617
1590
  function printBundleOutputPretty(output) {
1618
1591
  const outputEntries = collectOutputEntries(output.output);
@@ -1659,10 +1632,10 @@ function printOutputEntries(entries, sizeAdjustment, distPath) {
1659
1632
  const filtered = entries.filter((e) => e.type === group.type);
1660
1633
  if (!filtered.length) continue;
1661
1634
  for (const entry of filtered.sort((a$1, z) => a$1.size - z.size)) {
1662
- let log = colors.dim(withTrailingSlash(distPath));
1663
- log += colors[group.color](entry.fileName.padEnd(sizeAdjustment.longest + 2));
1664
- log += colors.dim(entry.type);
1665
- log += colors.dim(` │ size: ${displaySize(entry.size).padStart(sizeAdjustment.sizePad)}`);
1635
+ let log = ansis_default.dim(withTrailingSlash(distPath));
1636
+ log += ansis_default[group.color](entry.fileName.padEnd(sizeAdjustment.longest + 2));
1637
+ log += ansis_default.dim(entry.type);
1638
+ log += ansis_default.dim(` │ size: ${displaySize(entry.size).padStart(sizeAdjustment.sizePad)}`);
1666
1639
  logger.log(log);
1667
1640
  }
1668
1641
  }
@@ -1681,9 +1654,9 @@ function relativeId(id) {
1681
1654
 
1682
1655
  //#endregion
1683
1656
  //#region src/cli/commands/help.ts
1684
- const introduction = `${colors.gray(`${description} (rolldown v${version})`)}
1657
+ const introduction = `${ansis_default.gray(`${description} (rolldown v${version})`)}
1685
1658
 
1686
- ${colors.bold(colors.underline("USAGE"))} ${colors.cyan("rolldown -c <config>")} or ${colors.cyan("rolldown <input> <options>")}`;
1659
+ ${ansis_default.bold(ansis_default.underline("USAGE"))} ${ansis_default.cyan("rolldown -c <config>")} or ${ansis_default.cyan("rolldown <input> <options>")}`;
1687
1660
  const examples = [
1688
1661
  {
1689
1662
  title: "Bundle with a config file `rolldown.config.mjs`",
@@ -1715,7 +1688,7 @@ const notes = [
1715
1688
  function showHelp() {
1716
1689
  logger.log(introduction);
1717
1690
  logger.log("");
1718
- logger.log(`${colors.bold(colors.underline("OPTIONS"))}`);
1691
+ logger.log(`${ansis_default.bold(ansis_default.underline("OPTIONS"))}`);
1719
1692
  logger.log("");
1720
1693
  logger.log(Object.entries(options).sort(([a$1], [b$1]) => {
1721
1694
  if (options[a$1].short && !options[b$1].short) return -1;
@@ -1728,20 +1701,20 @@ function showHelp() {
1728
1701
  if (short) optionStr += `-${short}, `;
1729
1702
  if (type === "string") optionStr += `<${hint ?? option}>`;
1730
1703
  if (description$1 && description$1.length > 0) description$1 = description$1[0].toUpperCase() + description$1.slice(1);
1731
- return colors.cyan(optionStr.padEnd(30)) + description$1 + (description$1 && description$1?.endsWith(".") ? "" : ".");
1704
+ return ansis_default.cyan(optionStr.padEnd(30)) + description$1 + (description$1 && description$1?.endsWith(".") ? "" : ".");
1732
1705
  }).join("\n"));
1733
1706
  logger.log("");
1734
- logger.log(`${colors.bold(colors.underline("EXAMPLES"))}`);
1707
+ logger.log(`${ansis_default.bold(ansis_default.underline("EXAMPLES"))}`);
1735
1708
  logger.log("");
1736
1709
  examples.forEach(({ title, command }, ord) => {
1737
1710
  logger.log(` ${ord + 1}. ${title}:`);
1738
- logger.log(` ${colors.cyan(command)}`);
1711
+ logger.log(` ${ansis_default.cyan(command)}`);
1739
1712
  logger.log("");
1740
1713
  });
1741
- logger.log(`${colors.bold(colors.underline("NOTES"))}`);
1714
+ logger.log(`${ansis_default.bold(ansis_default.underline("NOTES"))}`);
1742
1715
  logger.log("");
1743
1716
  notes.forEach((note) => {
1744
- logger.log(` * ${colors.gray(note)}`);
1717
+ logger.log(` * ${ansis_default.gray(note)}`);
1745
1718
  });
1746
1719
  }
1747
1720
 
package/dist/config.cjs CHANGED
@@ -1,7 +1,7 @@
1
- const require_src = require('./shared/src-DYeE276c.cjs');
1
+ const require_src = require('./shared/src-Cd6dJVwS.cjs');
2
2
  require('./shared/dist-BMVjvV-v.cjs');
3
3
  require('./shared/parse-ast-index-BuelS_NF.cjs');
4
- const require_load_config = require('./shared/load-config-DHiFIPc1.cjs');
4
+ const require_load_config = require('./shared/load-config-Cr472rVH.cjs');
5
5
 
6
6
  //#region src/config.ts
7
7
  const VERSION = require_src.version;
package/dist/config.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { ConfigExport, defineConfig } from "./shared/define-config.d-DII1FzpF.cjs";
1
+ import { ConfigExport, defineConfig } from "./shared/define-config.d-C0X0fNDk.cjs";
2
2
 
3
3
  //#region src/utils/load-config.d.ts
4
4
  declare function loadConfig(configPath: string): Promise<ConfigExport>;
package/dist/config.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { ConfigExport, defineConfig$1 as defineConfig } from "./shared/define-config.d-BBxr6_Bs.mjs";
1
+ import { ConfigExport, defineConfig } from "./shared/define-config.d-BDJzbjFe.mjs";
2
2
 
3
3
  //#region src/utils/load-config.d.ts
4
4
  declare function loadConfig(configPath: string): Promise<ConfigExport>;
package/dist/config.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { defineConfig, version } from "./shared/src-CrAobyBl.mjs";
2
- import "./shared/dist-JdACkHJM.mjs";
1
+ import { defineConfig, version } from "./shared/src-Mp5z-lgE.mjs";
2
+ import "./shared/dist-BoWaIc-K.mjs";
3
3
  import "./shared/parse-ast-index-C31FpvkE.mjs";
4
- import { loadConfig } from "./shared/load-config-DXspXfGi.mjs";
4
+ import { loadConfig } from "./shared/load-config-a5TDbL5U.mjs";
5
5
 
6
6
  //#region src/config.ts
7
7
  const VERSION = version;
@@ -1,4 +1,4 @@
1
- import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-Bhvm4CGb.js";
1
+ import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src--mQWdm3h.js";
2
2
  import { ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
3
3
 
4
4
  //#region src/api/experimental.ts
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-DYeE276c.cjs');
2
+ const require_src = require('./shared/src-Cd6dJVwS.cjs');
3
3
  require('./shared/dist-BMVjvV-v.cjs');
4
4
  require('./shared/parse-ast-index-BuelS_NF.cjs');
5
5
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
@@ -1,4 +1,4 @@
1
- import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config.d-DII1FzpF.cjs";
1
+ import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config.d-C0X0fNDk.cjs";
2
2
  import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
3
3
 
4
4
  //#region src/api/experimental.d.ts
@@ -1,4 +1,4 @@
1
- import { BuiltinPlugin$1 as BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin$1 as assetPlugin, buildImportAnalysisPlugin$1 as buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin$1 as dynamicImportVarsPlugin, importGlobPlugin$1 as importGlobPlugin, isolatedDeclarationPlugin$1 as isolatedDeclarationPlugin, jsonPlugin$1 as jsonPlugin, loadFallbackPlugin$1 as loadFallbackPlugin, manifestPlugin$1 as manifestPlugin, moduleFederationPlugin$1 as moduleFederationPlugin, modulePreloadPolyfillPlugin$1 as modulePreloadPolyfillPlugin, reporterPlugin$1 as reporterPlugin, viteResolvePlugin$1 as viteResolvePlugin, wasmFallbackPlugin$1 as wasmFallbackPlugin, wasmHelperPlugin$1 as wasmHelperPlugin, webWorkerPostPlugin$1 as webWorkerPostPlugin } from "./shared/define-config.d-BBxr6_Bs.mjs";
1
+ import { BuiltinPlugin, InputOptions, RolldownPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config.d-BDJzbjFe.mjs";
2
2
  import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
3
3
 
4
4
  //#region src/api/experimental.d.ts
@@ -1,5 +1,5 @@
1
- import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-CrAobyBl.mjs";
2
- import "./shared/dist-JdACkHJM.mjs";
1
+ import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-Mp5z-lgE.mjs";
2
+ import "./shared/dist-BoWaIc-K.mjs";
3
3
  import "./shared/parse-ast-index-C31FpvkE.mjs";
4
4
  import { ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
5
5
  import { pathToFileURL } from "node:url";
@@ -1,3 +1,3 @@
1
- import { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter } from "./shared/define-config.d-DII1FzpF.cjs";
1
+ import { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter } from "./shared/define-config.d-C0X0fNDk.cjs";
2
2
 
3
3
  export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
@@ -1,3 +1,3 @@
1
- import { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter } from "./shared/define-config.d-BBxr6_Bs.mjs";
1
+ import { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter } from "./shared/define-config.d-BDJzbjFe.mjs";
2
2
 
3
3
  export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
@@ -1,4 +1,4 @@
1
- import { and$1 as and, arraify, code$1 as code, exclude$1 as exclude, id$1 as id, include$1 as include, isPromiseLike, moduleType$1 as moduleType, not$1 as not, or$1 as or, queries$1 as queries, query$1 as query } from "./shared/dist-JdACkHJM.mjs";
1
+ import { and, arraify, code, exclude, id, include, isPromiseLike, moduleType, not, or, queries, query } from "./shared/dist-BoWaIc-K.mjs";
2
2
 
3
3
  //#region src/plugin/with-filter.ts
4
4
  function withFilterImpl(pluginOption, filterObjectList) {
@@ -1,3 +1,3 @@
1
- import { VERSION, build, defineConfig, rolldown, watch } from "./src-Bhvm4CGb.js";
1
+ import { VERSION, build, defineConfig, rolldown, watch } from "./src--mQWdm3h.js";
2
2
 
3
3
  export { VERSION, build, defineConfig, rolldown, watch };
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_src = require('./shared/src-DYeE276c.cjs');
1
+ const require_src = require('./shared/src-Cd6dJVwS.cjs');
2
2
  require('./shared/dist-BMVjvV-v.cjs');
3
3
  require('./shared/parse-ast-index-BuelS_NF.cjs');
4
4
 
package/dist/index.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config.d-DII1FzpF.cjs";
1
+ import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config.d-C0X0fNDk.cjs";
2
2
 
3
3
  export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch } from "./shared/define-config.d-BBxr6_Bs.mjs";
1
+ import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config.d-BDJzbjFe.mjs";
2
2
 
3
3
  export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-CrAobyBl.mjs";
2
- import "./shared/dist-JdACkHJM.mjs";
1
+ import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-Mp5z-lgE.mjs";
2
+ import "./shared/dist-BoWaIc-K.mjs";
3
3
  import "./shared/parse-ast-index-C31FpvkE.mjs";
4
4
 
5
5
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-DYeE276c.cjs');
2
+ const require_src = require('./shared/src-Cd6dJVwS.cjs');
3
3
  require('./shared/dist-BMVjvV-v.cjs');
4
4
  require('./shared/parse-ast-index-BuelS_NF.cjs');
5
5
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
@@ -1,5 +1,5 @@
1
- import { PluginContextData, bindingifyPlugin } from "./shared/src-CrAobyBl.mjs";
2
- import "./shared/dist-JdACkHJM.mjs";
1
+ import { PluginContextData, bindingifyPlugin } from "./shared/src-Mp5z-lgE.mjs";
2
+ import "./shared/dist-BoWaIc-K.mjs";
3
3
  import "./shared/parse-ast-index-C31FpvkE.mjs";
4
4
  import { registerPlugins } from "./rolldown-binding.wasi.cjs";
5
5
  import { parentPort, workerData } from "node:worker_threads";
@@ -1,4 +1,4 @@
1
- import { MaybePromise, Plugin } from "./shared/define-config.d-DII1FzpF.cjs";
1
+ import { MaybePromise, Plugin } from "./shared/define-config.d-C0X0fNDk.cjs";
2
2
 
3
3
  //#region src/plugin/parallel-plugin-implementation.d.ts
4
4
  type ParallelPluginImplementation = Plugin;
@@ -1,4 +1,4 @@
1
- import { MaybePromise, Plugin } from "./shared/define-config.d-BBxr6_Bs.mjs";
1
+ import { MaybePromise, Plugin } from "./shared/define-config.d-BDJzbjFe.mjs";
2
2
 
3
3
  //#region src/plugin/parallel-plugin-implementation.d.ts
4
4
  type ParallelPluginImplementation = Plugin;
@@ -218,15 +218,16 @@ interface OutputOptions {
218
218
  */
219
219
  name: string
220
220
  /**
221
- * - Type: `string | RegExp`
221
+ * - Type: `string | RegExp | ((id: string) => boolean | undefined | void);`
222
222
  *
223
223
  * Controls which modules are captured in this group.
224
224
  *
225
225
  * If `test` is a string, the module whose id contains the string will be captured.
226
226
  * If `test` is a regular expression, the module whose id matches the regular expression will be captured.
227
+ * If `test` is a function, modules for which `test(id)` returns `true` will be captured.
227
228
  * if `test` is empty, any module will be considered as matched.
228
229
  */
229
- test?: StringOrRegExp
230
+ test?: StringOrRegExp | ((id: string) => boolean | undefined | void)
230
231
  /**
231
232
  * - Type: `number`
232
233
  *
@@ -218,15 +218,16 @@ interface OutputOptions {
218
218
  */
219
219
  name: string
220
220
  /**
221
- * - Type: `string | RegExp`
221
+ * - Type: `string | RegExp | ((id: string) => boolean | undefined | void);`
222
222
  *
223
223
  * Controls which modules are captured in this group.
224
224
  *
225
225
  * If `test` is a string, the module whose id contains the string will be captured.
226
226
  * If `test` is a regular expression, the module whose id matches the regular expression will be captured.
227
+ * If `test` is a function, modules for which `test(id)` returns `true` will be captured.
227
228
  * if `test` is empty, any module will be considered as matched.
228
229
  */
229
- test?: StringOrRegExp
230
+ test?: StringOrRegExp | ((id: string) => boolean | undefined | void)
230
231
  /**
231
232
  * - Type: `number`
232
233
  *
@@ -1164,4 +1165,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
1164
1165
  declare function defineConfig(config: ConfigExport): ConfigExport;
1165
1166
 
1166
1167
  //#endregion
1167
- export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin as BuiltinPlugin$1, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk$1 as PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION as VERSION$1, WarningHandlerWithDefault, WatchOptions, WatcherOptions, and, assetPlugin as assetPlugin$1, build as build$1, buildImportAnalysisPlugin as buildImportAnalysisPlugin$1, code, defineConfig as defineConfig$1, defineParallelPlugin, dynamicImportVarsPlugin as dynamicImportVarsPlugin$1, exclude, id, importGlobPlugin as importGlobPlugin$1, include, isolatedDeclarationPlugin as isolatedDeclarationPlugin$1, jsonPlugin as jsonPlugin$1, loadFallbackPlugin as loadFallbackPlugin$1, manifestPlugin as manifestPlugin$1, moduleFederationPlugin as moduleFederationPlugin$1, modulePreloadPolyfillPlugin as modulePreloadPolyfillPlugin$1, moduleType, not, or, queries, query, reporterPlugin as reporterPlugin$1, rolldown as rolldown$1, viteResolvePlugin as viteResolvePlugin$1, wasmFallbackPlugin as wasmFallbackPlugin$1, wasmHelperPlugin as wasmHelperPlugin$1, watch as watch$1, webWorkerPostPlugin as webWorkerPostPlugin$1, withFilter };
1168
+ export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk$1 as PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, and, assetPlugin, build, buildImportAnalysisPlugin, code, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, exclude, id, importGlobPlugin, include, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleType, not, or, queries, query, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
@@ -144,4 +144,4 @@ function queries(queryFilter) {
144
144
  }
145
145
 
146
146
  //#endregion
147
- export { and as and$1, arraify, code as code$1, exclude as exclude$1, id as id$1, include as include$1, isNullish, isPromiseLike, moduleType as moduleType$1, noop, not as not$1, or as or$1, queries as queries$1, query as query$1, unimplemented, unreachable, unsupported };
147
+ export { and, arraify, code, exclude, id, include, isNullish, isPromiseLike, moduleType, noop, not, or, queries, query, unimplemented, unreachable, unsupported };