@rolldown/browser 1.0.0-beta.10-commit.ac4e5db → 1.0.0-beta.10-commit.87188ed
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +28 -29
- package/dist/cli.mjs +29 -56
- package/dist/config.cjs +2 -2
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +3 -3
- package/dist/experimental-index.browser.mjs +1 -1
- package/dist/experimental-index.cjs +1 -1
- package/dist/experimental-index.d.cts +1 -1
- package/dist/experimental-index.d.mts +1 -1
- package/dist/experimental-index.mjs +2 -2
- package/dist/filter-index.d.cts +1 -1
- package/dist/filter-index.d.mts +1 -1
- package/dist/filter-index.mjs +1 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.cjs +1 -1
- package/dist/parallel-plugin-worker.mjs +2 -2
- package/dist/parallel-plugin.d.cts +1 -1
- package/dist/parallel-plugin.d.mts +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{define-config.d-DII1FzpF.d.cts → define-config.d-BDJzbjFe.d.mts} +3 -2
- package/dist/shared/{define-config.d-BBxr6_Bs.d.mts → define-config.d-C0X0fNDk.d.cts} +4 -3
- package/dist/shared/{dist-JdACkHJM.mjs → dist-BoWaIc-K.mjs} +1 -1
- package/dist/shared/{load-config-DHiFIPc1.cjs → load-config-B_Q6aohp.cjs} +1 -1
- package/dist/shared/{load-config-DXspXfGi.mjs → load-config-CDKSTiwt.mjs} +1 -1
- package/dist/shared/{src-CrAobyBl.mjs → src-4ZfclYbZ.mjs} +259 -100
- package/dist/shared/{src-DYeE276c.cjs → src-ChUevYxr.cjs} +237 -98
- package/dist/{src-Bhvm4CGb.js → src-BbJx4ixf.js} +269 -110
- 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-
|
|
2
|
+
const require_src = require('./shared/src-ChUevYxr.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-
|
|
5
|
+
const require_load_config = require('./shared/load-config-B_Q6aohp.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
|
|
529
|
+
const colors = createColors();
|
|
531
530
|
function getColor$1(color, fallback = "reset") {
|
|
532
|
-
return colors
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
945
|
+
return colors[color] || colors.white;
|
|
947
946
|
}
|
|
948
947
|
function getBgColor(color = "bgWhite") {
|
|
949
|
-
return colors
|
|
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${
|
|
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 ${
|
|
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 ${
|
|
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 ${
|
|
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 =
|
|
1640
|
-
log +=
|
|
1641
|
-
log +=
|
|
1642
|
-
log +=
|
|
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 = `${
|
|
1660
|
+
const introduction = `${require_src.ansis_default.gray(`${require_src.description} (rolldown v${require_src.version})`)}
|
|
1662
1661
|
|
|
1663
|
-
${
|
|
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(`${
|
|
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
|
|
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(`${
|
|
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(` ${
|
|
1714
|
+
logger.log(` ${require_src.ansis_default.cyan(command)}`);
|
|
1716
1715
|
logger.log("");
|
|
1717
1716
|
});
|
|
1718
|
-
logger.log(`${
|
|
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(` * ${
|
|
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-
|
|
2
|
-
import { arraify } from "./shared/dist-
|
|
1
|
+
import { __commonJS, __toESM, ansis_default, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-4ZfclYbZ.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-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-CDKSTiwt.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
|
|
528
|
+
const colors = createColors();
|
|
556
529
|
function getColor$1(color, fallback = "reset") {
|
|
557
|
-
return colors
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
944
|
+
return colors[color] || colors.white;
|
|
972
945
|
}
|
|
973
946
|
function getBgColor(color = "bgWhite") {
|
|
974
|
-
return colors
|
|
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${
|
|
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 ${
|
|
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 ${
|
|
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 ${
|
|
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 =
|
|
1663
|
-
log +=
|
|
1664
|
-
log +=
|
|
1665
|
-
log +=
|
|
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 = `${
|
|
1657
|
+
const introduction = `${ansis_default.gray(`${description} (rolldown v${version})`)}
|
|
1685
1658
|
|
|
1686
|
-
${
|
|
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(`${
|
|
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
|
|
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(`${
|
|
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(` ${
|
|
1711
|
+
logger.log(` ${ansis_default.cyan(command)}`);
|
|
1739
1712
|
logger.log("");
|
|
1740
1713
|
});
|
|
1741
|
-
logger.log(`${
|
|
1714
|
+
logger.log(`${ansis_default.bold(ansis_default.underline("NOTES"))}`);
|
|
1742
1715
|
logger.log("");
|
|
1743
1716
|
notes.forEach((note) => {
|
|
1744
|
-
logger.log(` * ${
|
|
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-
|
|
1
|
+
const require_src = require('./shared/src-ChUevYxr.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-
|
|
4
|
+
const require_load_config = require('./shared/load-config-B_Q6aohp.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-
|
|
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
|
+
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-
|
|
2
|
-
import "./shared/dist-
|
|
1
|
+
import { defineConfig, version } from "./shared/src-4ZfclYbZ.mjs";
|
|
2
|
+
import "./shared/dist-BoWaIc-K.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-C31FpvkE.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-CDKSTiwt.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-
|
|
1
|
+
import { BuiltinPlugin, assetPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-BbJx4ixf.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-
|
|
2
|
+
const require_src = require('./shared/src-ChUevYxr.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-
|
|
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
|
+
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-
|
|
2
|
-
import "./shared/dist-
|
|
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-4ZfclYbZ.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";
|
package/dist/filter-index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter } from "./shared/define-config.d-
|
|
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 };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter } from "./shared/define-config.d-
|
|
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 };
|
package/dist/filter-index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { and
|
|
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) {
|
package/dist/index.browser.mjs
CHANGED
package/dist/index.cjs
CHANGED
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-
|
|
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
|
+
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-
|
|
2
|
-
import "./shared/dist-
|
|
1
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-4ZfclYbZ.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-
|
|
2
|
+
const require_src = require('./shared/src-ChUevYxr.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-
|
|
2
|
-
import "./shared/dist-
|
|
1
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-4ZfclYbZ.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";
|
|
Binary file
|
|
@@ -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
|
|
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
|
|
147
|
+
export { and, arraify, code, exclude, id, include, isNullish, isPromiseLike, moduleType, noop, not, or, queries, query, unimplemented, unreachable, unsupported };
|