@rolldown/browser 1.0.0-beta.32 → 1.0.0-beta.33
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 +31 -31
- package/dist/cli.mjs +31 -31
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +3 -3
- package/dist/experimental-index.browser.mjs +1 -1
- package/dist/experimental-index.cjs +2 -2
- package/dist/experimental-index.d.cts +2 -2
- package/dist/experimental-index.d.mts +2 -2
- package/dist/experimental-index.mjs +2 -2
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.cjs +2 -2
- package/dist/parallel-plugin-worker.mjs +2 -2
- package/dist/parallel-plugin.d.cts +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.cjs +1 -1
- package/dist/parse-ast-index.d.cts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-BEeJNtY4.d.mts → binding-CFhvYkVn.d.mts} +3 -3
- package/dist/shared/{binding-CRMJJtol.d.cts → binding-DQk9TN_A.d.cts} +3 -3
- package/dist/shared/{define-config-Dw9PP95x.d.cts → define-config-B3QOs3Kt.d.cts} +7 -1
- package/dist/shared/{define-config-rQzrgjTj.d.mts → define-config-DyjJkNqG.d.mts} +7 -1
- package/dist/shared/{load-config-Dv1HB87g.mjs → load-config-CLPLfZVe.mjs} +1 -1
- package/dist/shared/{load-config-Df5heSrD.cjs → load-config-xKQFLlGV.cjs} +1 -1
- package/dist/shared/{parse-ast-index-CqHkFxPM.mjs → parse-ast-index-BGzB5Bo-.mjs} +1 -1
- package/dist/shared/{parse-ast-index-DAsDnaa1.cjs → parse-ast-index-BZfwAN9P.cjs} +1 -1
- package/dist/shared/{src-BDMOiU9t.cjs → src-CGziNJPr.cjs} +30 -26
- package/dist/shared/{src-ZwxjvPpL.mjs → src-CZgQg1yE.mjs} +25 -21
- package/dist/{src-ZTshMqyf.js → src-D_htlJ_o.js} +24 -20
- package/package.json +2 -2
package/dist/cli.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-CGziNJPr.cjs');
|
|
3
|
+
require('./shared/parse-ast-index-BZfwAN9P.cjs');
|
|
4
4
|
const require_dist = require('./shared/dist-CK0hotcm.cjs');
|
|
5
|
-
const require_load_config = require('./shared/load-config-
|
|
5
|
+
const require_load_config = require('./shared/load-config-xKQFLlGV.cjs');
|
|
6
6
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
7
7
|
const node_process = require_chunk.__toESM(require("node:process"));
|
|
8
8
|
const node_util = require_chunk.__toESM(require("node:util"));
|
|
@@ -526,9 +526,9 @@ const colorDefs = {
|
|
|
526
526
|
function createColors(useColor = isColorSupported) {
|
|
527
527
|
return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
|
|
528
528
|
}
|
|
529
|
-
const colors = createColors();
|
|
529
|
+
const colors$2 = createColors();
|
|
530
530
|
function getColor$1(color, fallback = "reset") {
|
|
531
|
-
return colors[color] || colors[fallback];
|
|
531
|
+
return colors$2[color] || colors$2[fallback];
|
|
532
532
|
}
|
|
533
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("|");
|
|
534
534
|
function stripAnsi(text) {
|
|
@@ -905,12 +905,12 @@ var FancyReporter = class extends BasicReporter {
|
|
|
905
905
|
formatStack(stack, message, opts) {
|
|
906
906
|
const indent = " ".repeat((opts?.errorLevel || 0) + 1);
|
|
907
907
|
return `
|
|
908
|
-
${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors.cyan(m)})`)).join(`
|
|
908
|
+
${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors$2.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors$2.cyan(m)})`)).join(`
|
|
909
909
|
${indent}`);
|
|
910
910
|
}
|
|
911
911
|
formatType(logObj, isBadge, opts) {
|
|
912
912
|
const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
|
|
913
|
-
if (isBadge) return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
|
|
913
|
+
if (isBadge) return getBgColor(typeColor)(colors$2.black(` ${logObj.type.toUpperCase()} `));
|
|
914
914
|
const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
|
|
915
915
|
return _type ? getColor(typeColor)(_type) : "";
|
|
916
916
|
}
|
|
@@ -921,15 +921,15 @@ ${indent}`);
|
|
|
921
921
|
style: logObj.style
|
|
922
922
|
});
|
|
923
923
|
const date = this.formatDate(logObj.date, opts);
|
|
924
|
-
const coloredDate = date && colors.gray(date);
|
|
924
|
+
const coloredDate = date && colors$2.gray(date);
|
|
925
925
|
const isBadge = logObj.badge ?? logObj.level < 2;
|
|
926
926
|
const type = this.formatType(logObj, isBadge, opts);
|
|
927
|
-
const tag = logObj.tag ? colors.gray(logObj.tag) : "";
|
|
927
|
+
const tag = logObj.tag ? colors$2.gray(logObj.tag) : "";
|
|
928
928
|
let line;
|
|
929
929
|
const left = this.filterAndJoin([type, characterFormat(message)]);
|
|
930
930
|
const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
|
|
931
931
|
const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
|
|
932
|
-
line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
|
|
932
|
+
line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors$2.gray(`[${right}]`)} ` : "") + left;
|
|
933
933
|
line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
|
|
934
934
|
if (logObj.type === "trace") {
|
|
935
935
|
const _err = /* @__PURE__ */ new Error("Trace: " + logObj.message);
|
|
@@ -939,13 +939,13 @@ ${indent}`);
|
|
|
939
939
|
}
|
|
940
940
|
};
|
|
941
941
|
function characterFormat(str) {
|
|
942
|
-
return str.replace(/`([^`]+)`/gm, (_$1, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_$1, m) => ` ${colors.underline(m)} `);
|
|
942
|
+
return str.replace(/`([^`]+)`/gm, (_$1, m) => colors$2.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_$1, m) => ` ${colors$2.underline(m)} `);
|
|
943
943
|
}
|
|
944
944
|
function getColor(color = "white") {
|
|
945
|
-
return colors[color] || colors.white;
|
|
945
|
+
return colors$2[color] || colors$2.white;
|
|
946
946
|
}
|
|
947
947
|
function getBgColor(color = "bgWhite") {
|
|
948
|
-
return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
|
|
948
|
+
return colors$2[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors$2.bgWhite;
|
|
949
949
|
}
|
|
950
950
|
function createConsola(options$1 = {}) {
|
|
951
951
|
let level = _getDefaultLogLevel();
|
|
@@ -1434,8 +1434,8 @@ function getClearScreenFunction(options$1) {
|
|
|
1434
1434
|
}
|
|
1435
1435
|
|
|
1436
1436
|
//#endregion
|
|
1437
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1438
|
-
var require_usingCtx = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1437
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.82.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1438
|
+
var require_usingCtx = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.82.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js": ((exports, module) => {
|
|
1439
1439
|
function _usingCtx() {
|
|
1440
1440
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1441
1441
|
var n$2 = Error();
|
|
@@ -1528,7 +1528,7 @@ async function bundleWithCliOptions(cliOptions) {
|
|
|
1528
1528
|
process.exit(1);
|
|
1529
1529
|
}
|
|
1530
1530
|
for (const file of outputs) {
|
|
1531
|
-
if (outputs.length > 1) logger.log(`\n${require_src.
|
|
1531
|
+
if (outputs.length > 1) logger.log(`\n${require_src.import_ansis.default.cyan(require_src.import_ansis.default.bold(`|→ ${file.fileName}:`))}\n`);
|
|
1532
1532
|
console.log(file.type === "asset" ? file.source : file.code);
|
|
1533
1533
|
}
|
|
1534
1534
|
} catch (_$1) {
|
|
@@ -1568,12 +1568,12 @@ async function watchInner(config, cliOptions) {
|
|
|
1568
1568
|
clearScreen?.();
|
|
1569
1569
|
break;
|
|
1570
1570
|
case "BUNDLE_START":
|
|
1571
|
-
if (changedFile.length > 0) logger.log(`Found ${require_src.
|
|
1571
|
+
if (changedFile.length > 0) logger.log(`Found ${require_src.import_ansis.default.bold(changedFile.map(relativeId).join(", "))} changed, rebuilding...`);
|
|
1572
1572
|
changedFile.length = 0;
|
|
1573
1573
|
break;
|
|
1574
1574
|
case "BUNDLE_END":
|
|
1575
1575
|
await event.result.close();
|
|
1576
|
-
logger.success(`Rebuilt ${require_src.
|
|
1576
|
+
logger.success(`Rebuilt ${require_src.import_ansis.default.bold(relativeId(event.output[0]))} in ${require_src.import_ansis.default.green(ms(event.duration))}.`);
|
|
1577
1577
|
break;
|
|
1578
1578
|
case "ERROR":
|
|
1579
1579
|
await event.result.close();
|
|
@@ -1607,7 +1607,7 @@ async function bundleInner(config, cliOptions) {
|
|
|
1607
1607
|
logger.log(``);
|
|
1608
1608
|
const endTime = node_perf_hooks.performance.now();
|
|
1609
1609
|
const duration = endTime - startTime;
|
|
1610
|
-
logger.success(`rolldown v${require_src.version} Finished in ${require_src.
|
|
1610
|
+
logger.success(`rolldown v${require_src.version} Finished in ${require_src.import_ansis.default.green(ms(duration))}`);
|
|
1611
1611
|
}
|
|
1612
1612
|
function printBundleOutputPretty(output) {
|
|
1613
1613
|
const outputEntries = collectOutputEntries(output.output);
|
|
@@ -1654,10 +1654,10 @@ function printOutputEntries(entries, sizeAdjustment, distPath) {
|
|
|
1654
1654
|
const filtered = entries.filter((e) => e.type === group.type);
|
|
1655
1655
|
if (!filtered.length) continue;
|
|
1656
1656
|
for (const entry of filtered.sort((a$1, z) => a$1.size - z.size)) {
|
|
1657
|
-
let log = require_src.
|
|
1658
|
-
log += require_src.
|
|
1659
|
-
log += require_src.
|
|
1660
|
-
log += require_src.
|
|
1657
|
+
let log = require_src.import_ansis.default.dim(withTrailingSlash(distPath));
|
|
1658
|
+
log += require_src.import_ansis.default[group.color](entry.fileName.padEnd(sizeAdjustment.longest + 2));
|
|
1659
|
+
log += require_src.import_ansis.default.dim(entry.type);
|
|
1660
|
+
log += require_src.import_ansis.default.dim(` │ size: ${displaySize(entry.size).padStart(sizeAdjustment.sizePad)}`);
|
|
1661
1661
|
logger.log(log);
|
|
1662
1662
|
}
|
|
1663
1663
|
}
|
|
@@ -1676,9 +1676,9 @@ function relativeId(id) {
|
|
|
1676
1676
|
|
|
1677
1677
|
//#endregion
|
|
1678
1678
|
//#region src/cli/commands/help.ts
|
|
1679
|
-
const introduction = `${require_src.
|
|
1679
|
+
const introduction = `${require_src.import_ansis.default.gray(`${require_src.description} (rolldown v${require_src.version})`)}
|
|
1680
1680
|
|
|
1681
|
-
${require_src.
|
|
1681
|
+
${require_src.import_ansis.default.bold(require_src.import_ansis.default.underline("USAGE"))} ${require_src.import_ansis.default.cyan("rolldown -c <config>")} or ${require_src.import_ansis.default.cyan("rolldown <input> <options>")}`;
|
|
1682
1682
|
const examples = [
|
|
1683
1683
|
{
|
|
1684
1684
|
title: "Bundle with a config file `rolldown.config.mjs`",
|
|
@@ -1710,7 +1710,7 @@ const notes = [
|
|
|
1710
1710
|
function showHelp() {
|
|
1711
1711
|
logger.log(introduction);
|
|
1712
1712
|
logger.log("");
|
|
1713
|
-
logger.log(`${require_src.
|
|
1713
|
+
logger.log(`${require_src.import_ansis.default.bold(require_src.import_ansis.default.underline("OPTIONS"))}`);
|
|
1714
1714
|
logger.log("");
|
|
1715
1715
|
logger.log(Object.entries(options).sort(([a$1], [b$1]) => {
|
|
1716
1716
|
if (options[a$1].short && !options[b$1].short) return -1;
|
|
@@ -1723,20 +1723,20 @@ function showHelp() {
|
|
|
1723
1723
|
if (short) optionStr += `-${short}, `;
|
|
1724
1724
|
if (type === "string") optionStr += `<${hint ?? option}>`;
|
|
1725
1725
|
if (description$1 && description$1.length > 0) description$1 = description$1[0].toUpperCase() + description$1.slice(1);
|
|
1726
|
-
return require_src.
|
|
1726
|
+
return require_src.import_ansis.default.cyan(optionStr.padEnd(30)) + description$1 + (description$1 && description$1?.endsWith(".") ? "" : ".");
|
|
1727
1727
|
}).join("\n"));
|
|
1728
1728
|
logger.log("");
|
|
1729
|
-
logger.log(`${require_src.
|
|
1729
|
+
logger.log(`${require_src.import_ansis.default.bold(require_src.import_ansis.default.underline("EXAMPLES"))}`);
|
|
1730
1730
|
logger.log("");
|
|
1731
1731
|
examples.forEach(({ title, command }, ord) => {
|
|
1732
1732
|
logger.log(` ${ord + 1}. ${title}:`);
|
|
1733
|
-
logger.log(` ${require_src.
|
|
1733
|
+
logger.log(` ${require_src.import_ansis.default.cyan(command)}`);
|
|
1734
1734
|
logger.log("");
|
|
1735
1735
|
});
|
|
1736
|
-
logger.log(`${require_src.
|
|
1736
|
+
logger.log(`${require_src.import_ansis.default.bold(require_src.import_ansis.default.underline("NOTES"))}`);
|
|
1737
1737
|
logger.log("");
|
|
1738
1738
|
notes.forEach((note) => {
|
|
1739
|
-
logger.log(` * ${require_src.
|
|
1739
|
+
logger.log(` * ${require_src.import_ansis.default.gray(note)}`);
|
|
1740
1740
|
});
|
|
1741
1741
|
}
|
|
1742
1742
|
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { __commonJS, __toESM,
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { __commonJS, __toESM, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, import_ansis, rolldown, validateCliOptions, version, watch } from "./shared/src-CZgQg1yE.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-BGzB5Bo-.mjs";
|
|
3
3
|
import { arraify } from "./shared/dist-ByKQkexh.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-CLPLfZVe.mjs";
|
|
5
5
|
import path, { sep } from "node:path";
|
|
6
6
|
import process$1 from "node:process";
|
|
7
7
|
import { formatWithOptions, parseArgs } from "node:util";
|
|
@@ -525,9 +525,9 @@ const colorDefs = {
|
|
|
525
525
|
function createColors(useColor = isColorSupported) {
|
|
526
526
|
return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
|
|
527
527
|
}
|
|
528
|
-
const colors = createColors();
|
|
528
|
+
const colors$2 = createColors();
|
|
529
529
|
function getColor$1(color, fallback = "reset") {
|
|
530
|
-
return colors[color] || colors[fallback];
|
|
530
|
+
return colors$2[color] || colors$2[fallback];
|
|
531
531
|
}
|
|
532
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("|");
|
|
533
533
|
function stripAnsi(text) {
|
|
@@ -904,12 +904,12 @@ var FancyReporter = class extends BasicReporter {
|
|
|
904
904
|
formatStack(stack, message, opts) {
|
|
905
905
|
const indent = " ".repeat((opts?.errorLevel || 0) + 1);
|
|
906
906
|
return `
|
|
907
|
-
${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors.cyan(m)})`)).join(`
|
|
907
|
+
${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors$2.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors$2.cyan(m)})`)).join(`
|
|
908
908
|
${indent}`);
|
|
909
909
|
}
|
|
910
910
|
formatType(logObj, isBadge, opts) {
|
|
911
911
|
const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
|
|
912
|
-
if (isBadge) return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
|
|
912
|
+
if (isBadge) return getBgColor(typeColor)(colors$2.black(` ${logObj.type.toUpperCase()} `));
|
|
913
913
|
const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
|
|
914
914
|
return _type ? getColor(typeColor)(_type) : "";
|
|
915
915
|
}
|
|
@@ -920,15 +920,15 @@ ${indent}`);
|
|
|
920
920
|
style: logObj.style
|
|
921
921
|
});
|
|
922
922
|
const date = this.formatDate(logObj.date, opts);
|
|
923
|
-
const coloredDate = date && colors.gray(date);
|
|
923
|
+
const coloredDate = date && colors$2.gray(date);
|
|
924
924
|
const isBadge = logObj.badge ?? logObj.level < 2;
|
|
925
925
|
const type = this.formatType(logObj, isBadge, opts);
|
|
926
|
-
const tag = logObj.tag ? colors.gray(logObj.tag) : "";
|
|
926
|
+
const tag = logObj.tag ? colors$2.gray(logObj.tag) : "";
|
|
927
927
|
let line;
|
|
928
928
|
const left = this.filterAndJoin([type, characterFormat(message)]);
|
|
929
929
|
const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
|
|
930
930
|
const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
|
|
931
|
-
line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
|
|
931
|
+
line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors$2.gray(`[${right}]`)} ` : "") + left;
|
|
932
932
|
line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
|
|
933
933
|
if (logObj.type === "trace") {
|
|
934
934
|
const _err = /* @__PURE__ */ new Error("Trace: " + logObj.message);
|
|
@@ -938,13 +938,13 @@ ${indent}`);
|
|
|
938
938
|
}
|
|
939
939
|
};
|
|
940
940
|
function characterFormat(str) {
|
|
941
|
-
return str.replace(/`([^`]+)`/gm, (_$1, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_$1, m) => ` ${colors.underline(m)} `);
|
|
941
|
+
return str.replace(/`([^`]+)`/gm, (_$1, m) => colors$2.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_$1, m) => ` ${colors$2.underline(m)} `);
|
|
942
942
|
}
|
|
943
943
|
function getColor(color = "white") {
|
|
944
|
-
return colors[color] || colors.white;
|
|
944
|
+
return colors$2[color] || colors$2.white;
|
|
945
945
|
}
|
|
946
946
|
function getBgColor(color = "bgWhite") {
|
|
947
|
-
return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
|
|
947
|
+
return colors$2[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors$2.bgWhite;
|
|
948
948
|
}
|
|
949
949
|
function createConsola(options$1 = {}) {
|
|
950
950
|
let level = _getDefaultLogLevel();
|
|
@@ -1433,8 +1433,8 @@ function getClearScreenFunction(options$1) {
|
|
|
1433
1433
|
}
|
|
1434
1434
|
|
|
1435
1435
|
//#endregion
|
|
1436
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1437
|
-
var require_usingCtx = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1436
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.82.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1437
|
+
var require_usingCtx = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.82.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js": ((exports, module) => {
|
|
1438
1438
|
function _usingCtx() {
|
|
1439
1439
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1440
1440
|
var n$2 = Error();
|
|
@@ -1527,7 +1527,7 @@ async function bundleWithCliOptions(cliOptions) {
|
|
|
1527
1527
|
process.exit(1);
|
|
1528
1528
|
}
|
|
1529
1529
|
for (const file of outputs) {
|
|
1530
|
-
if (outputs.length > 1) logger.log(`\n${
|
|
1530
|
+
if (outputs.length > 1) logger.log(`\n${import_ansis.default.cyan(import_ansis.default.bold(`|→ ${file.fileName}:`))}\n`);
|
|
1531
1531
|
console.log(file.type === "asset" ? file.source : file.code);
|
|
1532
1532
|
}
|
|
1533
1533
|
} catch (_$1) {
|
|
@@ -1567,12 +1567,12 @@ async function watchInner(config, cliOptions) {
|
|
|
1567
1567
|
clearScreen?.();
|
|
1568
1568
|
break;
|
|
1569
1569
|
case "BUNDLE_START":
|
|
1570
|
-
if (changedFile.length > 0) logger.log(`Found ${
|
|
1570
|
+
if (changedFile.length > 0) logger.log(`Found ${import_ansis.default.bold(changedFile.map(relativeId).join(", "))} changed, rebuilding...`);
|
|
1571
1571
|
changedFile.length = 0;
|
|
1572
1572
|
break;
|
|
1573
1573
|
case "BUNDLE_END":
|
|
1574
1574
|
await event.result.close();
|
|
1575
|
-
logger.success(`Rebuilt ${
|
|
1575
|
+
logger.success(`Rebuilt ${import_ansis.default.bold(relativeId(event.output[0]))} in ${import_ansis.default.green(ms(event.duration))}.`);
|
|
1576
1576
|
break;
|
|
1577
1577
|
case "ERROR":
|
|
1578
1578
|
await event.result.close();
|
|
@@ -1606,7 +1606,7 @@ async function bundleInner(config, cliOptions) {
|
|
|
1606
1606
|
logger.log(``);
|
|
1607
1607
|
const endTime = performance.now();
|
|
1608
1608
|
const duration = endTime - startTime;
|
|
1609
|
-
logger.success(`rolldown v${version} Finished in ${
|
|
1609
|
+
logger.success(`rolldown v${version} Finished in ${import_ansis.default.green(ms(duration))}`);
|
|
1610
1610
|
}
|
|
1611
1611
|
function printBundleOutputPretty(output) {
|
|
1612
1612
|
const outputEntries = collectOutputEntries(output.output);
|
|
@@ -1653,10 +1653,10 @@ function printOutputEntries(entries, sizeAdjustment, distPath) {
|
|
|
1653
1653
|
const filtered = entries.filter((e) => e.type === group.type);
|
|
1654
1654
|
if (!filtered.length) continue;
|
|
1655
1655
|
for (const entry of filtered.sort((a$1, z) => a$1.size - z.size)) {
|
|
1656
|
-
let log =
|
|
1657
|
-
log +=
|
|
1658
|
-
log +=
|
|
1659
|
-
log +=
|
|
1656
|
+
let log = import_ansis.default.dim(withTrailingSlash(distPath));
|
|
1657
|
+
log += import_ansis.default[group.color](entry.fileName.padEnd(sizeAdjustment.longest + 2));
|
|
1658
|
+
log += import_ansis.default.dim(entry.type);
|
|
1659
|
+
log += import_ansis.default.dim(` │ size: ${displaySize(entry.size).padStart(sizeAdjustment.sizePad)}`);
|
|
1660
1660
|
logger.log(log);
|
|
1661
1661
|
}
|
|
1662
1662
|
}
|
|
@@ -1675,9 +1675,9 @@ function relativeId(id) {
|
|
|
1675
1675
|
|
|
1676
1676
|
//#endregion
|
|
1677
1677
|
//#region src/cli/commands/help.ts
|
|
1678
|
-
const introduction = `${
|
|
1678
|
+
const introduction = `${import_ansis.default.gray(`${description} (rolldown v${version})`)}
|
|
1679
1679
|
|
|
1680
|
-
${
|
|
1680
|
+
${import_ansis.default.bold(import_ansis.default.underline("USAGE"))} ${import_ansis.default.cyan("rolldown -c <config>")} or ${import_ansis.default.cyan("rolldown <input> <options>")}`;
|
|
1681
1681
|
const examples = [
|
|
1682
1682
|
{
|
|
1683
1683
|
title: "Bundle with a config file `rolldown.config.mjs`",
|
|
@@ -1709,7 +1709,7 @@ const notes = [
|
|
|
1709
1709
|
function showHelp() {
|
|
1710
1710
|
logger.log(introduction);
|
|
1711
1711
|
logger.log("");
|
|
1712
|
-
logger.log(`${
|
|
1712
|
+
logger.log(`${import_ansis.default.bold(import_ansis.default.underline("OPTIONS"))}`);
|
|
1713
1713
|
logger.log("");
|
|
1714
1714
|
logger.log(Object.entries(options).sort(([a$1], [b$1]) => {
|
|
1715
1715
|
if (options[a$1].short && !options[b$1].short) return -1;
|
|
@@ -1722,20 +1722,20 @@ function showHelp() {
|
|
|
1722
1722
|
if (short) optionStr += `-${short}, `;
|
|
1723
1723
|
if (type === "string") optionStr += `<${hint ?? option}>`;
|
|
1724
1724
|
if (description$1 && description$1.length > 0) description$1 = description$1[0].toUpperCase() + description$1.slice(1);
|
|
1725
|
-
return
|
|
1725
|
+
return import_ansis.default.cyan(optionStr.padEnd(30)) + description$1 + (description$1 && description$1?.endsWith(".") ? "" : ".");
|
|
1726
1726
|
}).join("\n"));
|
|
1727
1727
|
logger.log("");
|
|
1728
|
-
logger.log(`${
|
|
1728
|
+
logger.log(`${import_ansis.default.bold(import_ansis.default.underline("EXAMPLES"))}`);
|
|
1729
1729
|
logger.log("");
|
|
1730
1730
|
examples.forEach(({ title, command }, ord) => {
|
|
1731
1731
|
logger.log(` ${ord + 1}. ${title}:`);
|
|
1732
|
-
logger.log(` ${
|
|
1732
|
+
logger.log(` ${import_ansis.default.cyan(command)}`);
|
|
1733
1733
|
logger.log("");
|
|
1734
1734
|
});
|
|
1735
|
-
logger.log(`${
|
|
1735
|
+
logger.log(`${import_ansis.default.bold(import_ansis.default.underline("NOTES"))}`);
|
|
1736
1736
|
logger.log("");
|
|
1737
1737
|
notes.forEach((note) => {
|
|
1738
|
-
logger.log(` * ${
|
|
1738
|
+
logger.log(` * ${import_ansis.default.gray(note)}`);
|
|
1739
1739
|
});
|
|
1740
1740
|
}
|
|
1741
1741
|
|
package/dist/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
2
|
-
require('./shared/parse-ast-index-
|
|
1
|
+
const require_src = require('./shared/src-CGziNJPr.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-BZfwAN9P.cjs');
|
|
3
3
|
require('./shared/dist-CK0hotcm.cjs');
|
|
4
|
-
const require_load_config = require('./shared/load-config-
|
|
4
|
+
const require_load_config = require('./shared/load-config-xKQFLlGV.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = require_src.version;
|
package/dist/config.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { ConfigExport, defineConfig } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-DQk9TN_A.cjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-B3QOs3Kt.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/load-config.d.ts
|
|
5
5
|
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/config.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { ConfigExport, defineConfig } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-CFhvYkVn.mjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-DyjJkNqG.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/load-config.d.ts
|
|
5
5
|
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/parse-ast-index-
|
|
1
|
+
import { defineConfig, version } from "./shared/src-CZgQg1yE.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-BGzB5Bo-.mjs";
|
|
3
3
|
import "./shared/dist-ByKQkexh.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-CLPLfZVe.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = version;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-
|
|
1
|
+
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-D_htlJ_o.js";
|
|
2
2
|
import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-CGziNJPr.cjs');
|
|
3
|
+
require('./shared/parse-ast-index-BZfwAN9P.cjs');
|
|
4
4
|
require('./shared/dist-CK0hotcm.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
6
6
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-
|
|
2
|
-
import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-DQk9TN_A.cjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-B3QOs3Kt.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-
|
|
2
|
-
import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-CFhvYkVn.mjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-DyjJkNqG.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-CZgQg1yE.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-BGzB5Bo-.mjs";
|
|
3
3
|
import "./shared/dist-ByKQkexh.mjs";
|
|
4
4
|
import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
package/dist/filter-index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-DQk9TN_A.cjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-B3QOs3Kt.cjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-CFhvYkVn.mjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-DyjJkNqG.mjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/index.browser.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
2
|
-
require('./shared/parse-ast-index-
|
|
1
|
+
const require_src = require('./shared/src-CGziNJPr.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-BZfwAN9P.cjs');
|
|
3
3
|
require('./shared/dist-CK0hotcm.cjs');
|
|
4
4
|
|
|
5
5
|
exports.VERSION = require_src.VERSION;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, 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, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-DQk9TN_A.cjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, 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, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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-B3QOs3Kt.cjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, 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, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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 { PreRenderedChunk } from "./shared/binding-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, 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, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-CFhvYkVn.mjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, 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, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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-DyjJkNqG.mjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, 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, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, 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/parse-ast-index-
|
|
1
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-CZgQg1yE.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-BGzB5Bo-.mjs";
|
|
3
3
|
import "./shared/dist-ByKQkexh.mjs";
|
|
4
4
|
|
|
5
5
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-CGziNJPr.cjs');
|
|
3
|
+
require('./shared/parse-ast-index-BZfwAN9P.cjs');
|
|
4
4
|
require('./shared/dist-CK0hotcm.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
6
6
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PluginContextData, bindingifyPlugin } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-CZgQg1yE.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-BGzB5Bo-.mjs";
|
|
3
3
|
import "./shared/dist-ByKQkexh.mjs";
|
|
4
4
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
5
5
|
import { parentPort, workerData } from "node:worker_threads";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-DQk9TN_A.cjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-B3QOs3Kt.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-CFhvYkVn.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-DyjJkNqG.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
package/dist/parse-ast-index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_parse_ast_index = require('./shared/parse-ast-index-
|
|
1
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-BZfwAN9P.cjs');
|
|
2
2
|
|
|
3
3
|
exports.parseAst = require_parse_ast_index.parseAst;
|
|
4
4
|
exports.parseAstAsync = require_parse_ast_index.parseAstAsync;
|
package/dist/parse-ast-index.mjs
CHANGED
|
Binary file
|
|
@@ -857,7 +857,7 @@ interface StyledComponentsOptions {
|
|
|
857
857
|
* from this list, the directory name will be used instead of the file name for
|
|
858
858
|
* the component's display name.
|
|
859
859
|
*
|
|
860
|
-
* @default ["index"]
|
|
860
|
+
* @default `["index"]`
|
|
861
861
|
*/
|
|
862
862
|
meaninglessFileNames?: Array<string>;
|
|
863
863
|
/**
|
|
@@ -920,8 +920,8 @@ interface TransformOptions {
|
|
|
920
920
|
*
|
|
921
921
|
* Example:
|
|
922
922
|
*
|
|
923
|
-
* * 'es2015'
|
|
924
|
-
* * ['es2020', 'chrome58', 'edge16', 'firefox57', 'node12', 'safari11']
|
|
923
|
+
* * `'es2015'`
|
|
924
|
+
* * `['es2020', 'chrome58', 'edge16', 'firefox57', 'node12', 'safari11']`
|
|
925
925
|
*
|
|
926
926
|
* @default `esnext` (No transformation)
|
|
927
927
|
*
|
|
@@ -857,7 +857,7 @@ interface StyledComponentsOptions {
|
|
|
857
857
|
* from this list, the directory name will be used instead of the file name for
|
|
858
858
|
* the component's display name.
|
|
859
859
|
*
|
|
860
|
-
* @default ["index"]
|
|
860
|
+
* @default `["index"]`
|
|
861
861
|
*/
|
|
862
862
|
meaninglessFileNames?: Array<string>;
|
|
863
863
|
/**
|
|
@@ -920,8 +920,8 @@ interface TransformOptions {
|
|
|
920
920
|
*
|
|
921
921
|
* Example:
|
|
922
922
|
*
|
|
923
|
-
* * 'es2015'
|
|
924
|
-
* * ['es2020', 'chrome58', 'edge16', 'firefox57', 'node12', 'safari11']
|
|
923
|
+
* * `'es2015'`
|
|
924
|
+
* * `['es2020', 'chrome58', 'edge16', 'firefox57', 'node12', 'safari11']`
|
|
925
925
|
*
|
|
926
926
|
* @default `esnext` (No transformation)
|
|
927
927
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMinifyOptions, BindingModulePreloadPolyfillPluginConfig, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMinifyOptions, BindingModulePreloadPolyfillPluginConfig, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-DQk9TN_A.cjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -543,6 +543,7 @@ interface NormalizedInputOptions {
|
|
|
543
543
|
cwd: string | undefined;
|
|
544
544
|
platform: InputOptions["platform"];
|
|
545
545
|
shimMissingExports: boolean;
|
|
546
|
+
context: string;
|
|
546
547
|
}
|
|
547
548
|
//#endregion
|
|
548
549
|
//#region src/options/normalized-output-options.d.ts
|
|
@@ -1117,6 +1118,11 @@ interface InputOptions {
|
|
|
1117
1118
|
/**
|
|
1118
1119
|
* Expected platform where the code run.
|
|
1119
1120
|
*
|
|
1121
|
+
* When the platform is set to neutral:
|
|
1122
|
+
* - When bundling is enabled the default output format is set to esm, which uses the export syntax introduced with ECMAScript 2015 (i.e. ES6). You can change the output format if this default is not appropriate.
|
|
1123
|
+
* - The main fields setting is empty by default. If you want to use npm-style packages, you will likely have to configure this to be something else such as main for the standard main field used by node.
|
|
1124
|
+
* - The conditions setting does not automatically include any platform-specific values.
|
|
1125
|
+
*
|
|
1120
1126
|
* @default
|
|
1121
1127
|
* - 'node' if the format is 'cjs'
|
|
1122
1128
|
* - 'browser' for other formats
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMinifyOptions, BindingModulePreloadPolyfillPluginConfig, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMinifyOptions, BindingModulePreloadPolyfillPluginConfig, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-CFhvYkVn.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -543,6 +543,7 @@ interface NormalizedInputOptions {
|
|
|
543
543
|
cwd: string | undefined;
|
|
544
544
|
platform: InputOptions["platform"];
|
|
545
545
|
shimMissingExports: boolean;
|
|
546
|
+
context: string;
|
|
546
547
|
}
|
|
547
548
|
//#endregion
|
|
548
549
|
//#region src/options/normalized-output-options.d.ts
|
|
@@ -1117,6 +1118,11 @@ interface InputOptions {
|
|
|
1117
1118
|
/**
|
|
1118
1119
|
* Expected platform where the code run.
|
|
1119
1120
|
*
|
|
1121
|
+
* When the platform is set to neutral:
|
|
1122
|
+
* - When bundling is enabled the default output format is set to esm, which uses the export syntax introduced with ECMAScript 2015 (i.e. ES6). You can change the output format if this default is not appropriate.
|
|
1123
|
+
* - The main fields setting is empty by default. If you want to use npm-style packages, you will likely have to configure this to be something else such as main for the standard main field used by node.
|
|
1124
|
+
* - The conditions setting does not automatically include any platform-specific values.
|
|
1125
|
+
*
|
|
1120
1126
|
* @default
|
|
1121
1127
|
* - 'node' if the format is 'cjs'
|
|
1122
1128
|
* - 'browser' for other formats
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./src-
|
|
2
|
+
const require_src = require('./src-CGziNJPr.cjs');
|
|
3
3
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
4
4
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
5
5
|
const node_fs_promises = require_chunk.__toESM(require("node:fs/promises"));
|
|
@@ -186,7 +186,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
//#endregion
|
|
189
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
189
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.82.2/node_modules/oxc-parser/wrap.mjs
|
|
190
190
|
function wrap$1(result) {
|
|
191
191
|
let program, module, comments, errors;
|
|
192
192
|
return {
|
|
@@ -187,7 +187,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
//#endregion
|
|
190
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
190
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.82.2/node_modules/oxc-parser/wrap.mjs
|
|
191
191
|
function wrap$1(result) {
|
|
192
192
|
let program, module$1, comments, errors;
|
|
193
193
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_parse_ast_index = require('./parse-ast-index-
|
|
2
|
+
const require_parse_ast_index = require('./parse-ast-index-BZfwAN9P.cjs');
|
|
3
3
|
const require_dist = require('./dist-CK0hotcm.cjs');
|
|
4
4
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("../rolldown-binding.wasi.cjs"));
|
|
5
5
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
@@ -9,7 +9,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
|
|
|
9
9
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "1.0.0-beta.
|
|
12
|
+
var version = "1.0.0-beta.33";
|
|
13
13
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
@@ -1913,7 +1913,6 @@ var require_ansis = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
|
|
|
1913
1913
|
//#endregion
|
|
1914
1914
|
//#region ../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.mjs
|
|
1915
1915
|
var import_ansis = /* @__PURE__ */ require_chunk.__toESM(require_ansis(), 1);
|
|
1916
|
-
var ansis_default = import_ansis.default;
|
|
1917
1916
|
const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, bold, dim, italic, underline, strikethrough, black, red, green, yellow, blue, magenta, cyan, white, gray, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGray, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright } = import_ansis.default;
|
|
1918
1917
|
|
|
1919
1918
|
//#endregion
|
|
@@ -2092,11 +2091,11 @@ const InputOptionsSchema = strictObject({
|
|
|
2092
2091
|
literal("browser"),
|
|
2093
2092
|
literal("neutral"),
|
|
2094
2093
|
literal("node")
|
|
2095
|
-
])), description(`Platform for which the code should be generated (node, ${
|
|
2094
|
+
])), description(`Platform for which the code should be generated (node, ${import_ansis.default.underline("browser")}, neutral)`)),
|
|
2096
2095
|
shimMissingExports: pipe(optional(boolean()), description("Create shim variables for missing exports")),
|
|
2097
2096
|
treeshake: optional(TreeshakingOptionsSchema),
|
|
2098
2097
|
optimization: optional(OptimizationOptionsSchema),
|
|
2099
|
-
logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${
|
|
2098
|
+
logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${import_ansis.default.dim("silent")}, ${import_ansis.default.underline(import_ansis.default.gray("info"))}, debug, ${import_ansis.default.yellow("warn")})`)),
|
|
2100
2099
|
onLog: optional(OnLogSchema),
|
|
2101
2100
|
onwarn: optional(OnwarnSchema),
|
|
2102
2101
|
moduleTypes: pipe(optional(ModuleTypesSchema), description("Module types for customized extensions")),
|
|
@@ -2214,18 +2213,18 @@ const OutputOptionsSchema = strictObject({
|
|
|
2214
2213
|
literal("named"),
|
|
2215
2214
|
literal("default"),
|
|
2216
2215
|
literal("none")
|
|
2217
|
-
])), description(`Specify a export mode (${
|
|
2216
|
+
])), description(`Specify a export mode (${import_ansis.default.underline("auto")}, named, default, none)`)),
|
|
2218
2217
|
hashCharacters: pipe(optional(union([
|
|
2219
2218
|
literal("base64"),
|
|
2220
2219
|
literal("base36"),
|
|
2221
2220
|
literal("hex")
|
|
2222
2221
|
])), description("Use the specified character set for file hashes")),
|
|
2223
|
-
format: pipe(optional(ModuleFormatSchema), description(`Output format of the generated bundle (supports ${
|
|
2222
|
+
format: pipe(optional(ModuleFormatSchema), description(`Output format of the generated bundle (supports ${import_ansis.default.underline("esm")}, cjs, and iife)`)),
|
|
2224
2223
|
sourcemap: pipe(optional(union([
|
|
2225
2224
|
boolean(),
|
|
2226
2225
|
literal("inline"),
|
|
2227
2226
|
literal("hidden")
|
|
2228
|
-
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${
|
|
2227
|
+
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${import_ansis.default.bold("pass the `-s` on the last argument if you want to generate `.map` file")})`)),
|
|
2229
2228
|
sourcemapBaseUrl: pipe(optional(string()), description("Base URL used to prefix sourcemap paths")),
|
|
2230
2229
|
sourcemapDebugIds: pipe(optional(boolean()), description("Inject sourcemap debug IDs")),
|
|
2231
2230
|
sourcemapIgnoreList: optional(union([boolean(), custom(() => true)])),
|
|
@@ -2266,7 +2265,7 @@ const OutputOptionsSchema = strictObject({
|
|
|
2266
2265
|
minifyInternalExports: pipe(optional(boolean()), description("Minify internal exports"))
|
|
2267
2266
|
});
|
|
2268
2267
|
const getAddonDescription = (placement, wrapper) => {
|
|
2269
|
-
return `Code to insert the ${
|
|
2268
|
+
return `Code to insert the ${import_ansis.default.bold(placement)} of the bundled file (${import_ansis.default.bold(wrapper)} the wrapper function)`;
|
|
2270
2269
|
};
|
|
2271
2270
|
const OutputCliOverrideSchema = strictObject({
|
|
2272
2271
|
assetFileNames: pipe(optional(string()), description("Name pattern for asset files")),
|
|
@@ -3550,6 +3549,9 @@ var NormalizedInputOptionsImpl = class {
|
|
|
3550
3549
|
get platform() {
|
|
3551
3550
|
return this.inner.platform;
|
|
3552
3551
|
}
|
|
3552
|
+
get context() {
|
|
3553
|
+
return this.inner.context;
|
|
3554
|
+
}
|
|
3553
3555
|
};
|
|
3554
3556
|
|
|
3555
3557
|
//#endregion
|
|
@@ -4219,12 +4221,12 @@ const availableParallelism = () => {
|
|
|
4219
4221
|
|
|
4220
4222
|
//#endregion
|
|
4221
4223
|
//#region src/utils/create-bundler-option.ts
|
|
4222
|
-
async function createBundlerOptions(inputOptions, outputOptions, watchMode
|
|
4224
|
+
async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
4223
4225
|
const inputPlugins = await normalizePluginOption(inputOptions.plugins);
|
|
4224
4226
|
const outputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
4225
4227
|
const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
|
|
4226
4228
|
const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
4227
|
-
|
|
4229
|
+
outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
|
|
4228
4230
|
const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
4229
4231
|
let plugins = [
|
|
4230
4232
|
...BUILTIN_PLUGINS,
|
|
@@ -4254,8 +4256,8 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode, isCl
|
|
|
4254
4256
|
//#endregion
|
|
4255
4257
|
//#region src/utils/create-bundler.ts
|
|
4256
4258
|
let asyncRuntimeShutdown = false;
|
|
4257
|
-
async function createBundlerImpl(bundler, inputOptions, outputOptions
|
|
4258
|
-
const option = await createBundlerOptions(inputOptions, outputOptions, false
|
|
4259
|
+
async function createBundlerImpl(bundler, inputOptions, outputOptions) {
|
|
4260
|
+
const option = await createBundlerOptions(inputOptions, outputOptions, false);
|
|
4259
4261
|
if (asyncRuntimeShutdown) (0, src_rolldown_binding_wasi_cjs.startAsyncRuntime)();
|
|
4260
4262
|
try {
|
|
4261
4263
|
return {
|
|
@@ -4296,11 +4298,11 @@ var RolldownBuild = class {
|
|
|
4296
4298
|
this.#bundler = new src_rolldown_binding_wasi_cjs.BindingBundler();
|
|
4297
4299
|
}
|
|
4298
4300
|
get closed() {
|
|
4299
|
-
return this.#bundlerImpl?.impl.closed ??
|
|
4301
|
+
return this.#bundlerImpl?.impl.closed ?? true;
|
|
4300
4302
|
}
|
|
4301
|
-
async #getBundlerWithStopWorker(outputOptions
|
|
4303
|
+
async #getBundlerWithStopWorker(outputOptions) {
|
|
4302
4304
|
if (this.#bundlerImpl) await this.#bundlerImpl.stopWorkers?.();
|
|
4303
|
-
return this.#bundlerImpl = await createBundlerImpl(this.#bundler, this.#inputOptions, outputOptions
|
|
4305
|
+
return this.#bundlerImpl = await createBundlerImpl(this.#bundler, this.#inputOptions, outputOptions);
|
|
4304
4306
|
}
|
|
4305
4307
|
async generate(outputOptions = {}) {
|
|
4306
4308
|
validateOption("output", outputOptions);
|
|
@@ -4315,10 +4317,12 @@ var RolldownBuild = class {
|
|
|
4315
4317
|
return transformToRollupOutput(output);
|
|
4316
4318
|
}
|
|
4317
4319
|
async close() {
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4320
|
+
if (this.#bundlerImpl) {
|
|
4321
|
+
await this.#bundlerImpl.stopWorkers?.();
|
|
4322
|
+
await this.#bundlerImpl.impl.close();
|
|
4323
|
+
this.#bundlerImpl.shutdown();
|
|
4324
|
+
this.#bundlerImpl = void 0;
|
|
4325
|
+
}
|
|
4322
4326
|
}
|
|
4323
4327
|
async [Symbol.asyncDispose]() {
|
|
4324
4328
|
await this.close();
|
|
@@ -4531,12 +4535,6 @@ Object.defineProperty(exports, 'VERSION', {
|
|
|
4531
4535
|
return VERSION;
|
|
4532
4536
|
}
|
|
4533
4537
|
});
|
|
4534
|
-
Object.defineProperty(exports, 'ansis_default', {
|
|
4535
|
-
enumerable: true,
|
|
4536
|
-
get: function () {
|
|
4537
|
-
return ansis_default;
|
|
4538
|
-
}
|
|
4539
|
-
});
|
|
4540
4538
|
Object.defineProperty(exports, 'assetPlugin', {
|
|
4541
4539
|
enumerable: true,
|
|
4542
4540
|
get: function () {
|
|
@@ -4615,6 +4613,12 @@ Object.defineProperty(exports, 'importGlobPlugin', {
|
|
|
4615
4613
|
return importGlobPlugin;
|
|
4616
4614
|
}
|
|
4617
4615
|
});
|
|
4616
|
+
Object.defineProperty(exports, 'import_ansis', {
|
|
4617
|
+
enumerable: true,
|
|
4618
|
+
get: function () {
|
|
4619
|
+
return import_ansis;
|
|
4620
|
+
}
|
|
4621
|
+
});
|
|
4618
4622
|
Object.defineProperty(exports, 'isolatedDeclarationPlugin', {
|
|
4619
4623
|
enumerable: true,
|
|
4620
4624
|
get: function () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { augmentCodeLocation, error, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-
|
|
1
|
+
import { augmentCodeLocation, error, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-BGzB5Bo-.mjs";
|
|
2
2
|
import { and, arraify, code, exclude, id, include, moduleType, noop, or, unimplemented, unreachable, unsupported } from "./dist-ByKQkexh.mjs";
|
|
3
3
|
import { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingChunkModuleOrderBy, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingWatcher, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -34,7 +34,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
|
|
35
35
|
//#endregion
|
|
36
36
|
//#region package.json
|
|
37
|
-
var version = "1.0.0-beta.
|
|
37
|
+
var version = "1.0.0-beta.33";
|
|
38
38
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
@@ -1938,7 +1938,6 @@ var require_ansis = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ansis
|
|
|
1938
1938
|
//#endregion
|
|
1939
1939
|
//#region ../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.mjs
|
|
1940
1940
|
var import_ansis = /* @__PURE__ */ __toESM(require_ansis(), 1);
|
|
1941
|
-
var ansis_default = import_ansis.default;
|
|
1942
1941
|
const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, bold, dim, italic, underline, strikethrough, black, red, green, yellow, blue, magenta, cyan, white, gray, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGray, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright } = import_ansis.default;
|
|
1943
1942
|
|
|
1944
1943
|
//#endregion
|
|
@@ -2117,11 +2116,11 @@ const InputOptionsSchema = strictObject({
|
|
|
2117
2116
|
literal("browser"),
|
|
2118
2117
|
literal("neutral"),
|
|
2119
2118
|
literal("node")
|
|
2120
|
-
])), description(`Platform for which the code should be generated (node, ${
|
|
2119
|
+
])), description(`Platform for which the code should be generated (node, ${import_ansis.default.underline("browser")}, neutral)`)),
|
|
2121
2120
|
shimMissingExports: pipe(optional(boolean()), description("Create shim variables for missing exports")),
|
|
2122
2121
|
treeshake: optional(TreeshakingOptionsSchema),
|
|
2123
2122
|
optimization: optional(OptimizationOptionsSchema),
|
|
2124
|
-
logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${
|
|
2123
|
+
logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${import_ansis.default.dim("silent")}, ${import_ansis.default.underline(import_ansis.default.gray("info"))}, debug, ${import_ansis.default.yellow("warn")})`)),
|
|
2125
2124
|
onLog: optional(OnLogSchema),
|
|
2126
2125
|
onwarn: optional(OnwarnSchema),
|
|
2127
2126
|
moduleTypes: pipe(optional(ModuleTypesSchema), description("Module types for customized extensions")),
|
|
@@ -2239,18 +2238,18 @@ const OutputOptionsSchema = strictObject({
|
|
|
2239
2238
|
literal("named"),
|
|
2240
2239
|
literal("default"),
|
|
2241
2240
|
literal("none")
|
|
2242
|
-
])), description(`Specify a export mode (${
|
|
2241
|
+
])), description(`Specify a export mode (${import_ansis.default.underline("auto")}, named, default, none)`)),
|
|
2243
2242
|
hashCharacters: pipe(optional(union([
|
|
2244
2243
|
literal("base64"),
|
|
2245
2244
|
literal("base36"),
|
|
2246
2245
|
literal("hex")
|
|
2247
2246
|
])), description("Use the specified character set for file hashes")),
|
|
2248
|
-
format: pipe(optional(ModuleFormatSchema), description(`Output format of the generated bundle (supports ${
|
|
2247
|
+
format: pipe(optional(ModuleFormatSchema), description(`Output format of the generated bundle (supports ${import_ansis.default.underline("esm")}, cjs, and iife)`)),
|
|
2249
2248
|
sourcemap: pipe(optional(union([
|
|
2250
2249
|
boolean(),
|
|
2251
2250
|
literal("inline"),
|
|
2252
2251
|
literal("hidden")
|
|
2253
|
-
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${
|
|
2252
|
+
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${import_ansis.default.bold("pass the `-s` on the last argument if you want to generate `.map` file")})`)),
|
|
2254
2253
|
sourcemapBaseUrl: pipe(optional(string()), description("Base URL used to prefix sourcemap paths")),
|
|
2255
2254
|
sourcemapDebugIds: pipe(optional(boolean()), description("Inject sourcemap debug IDs")),
|
|
2256
2255
|
sourcemapIgnoreList: optional(union([boolean(), custom(() => true)])),
|
|
@@ -2291,7 +2290,7 @@ const OutputOptionsSchema = strictObject({
|
|
|
2291
2290
|
minifyInternalExports: pipe(optional(boolean()), description("Minify internal exports"))
|
|
2292
2291
|
});
|
|
2293
2292
|
const getAddonDescription = (placement, wrapper) => {
|
|
2294
|
-
return `Code to insert the ${
|
|
2293
|
+
return `Code to insert the ${import_ansis.default.bold(placement)} of the bundled file (${import_ansis.default.bold(wrapper)} the wrapper function)`;
|
|
2295
2294
|
};
|
|
2296
2295
|
const OutputCliOverrideSchema = strictObject({
|
|
2297
2296
|
assetFileNames: pipe(optional(string()), description("Name pattern for asset files")),
|
|
@@ -3575,6 +3574,9 @@ var NormalizedInputOptionsImpl = class {
|
|
|
3575
3574
|
get platform() {
|
|
3576
3575
|
return this.inner.platform;
|
|
3577
3576
|
}
|
|
3577
|
+
get context() {
|
|
3578
|
+
return this.inner.context;
|
|
3579
|
+
}
|
|
3578
3580
|
};
|
|
3579
3581
|
|
|
3580
3582
|
//#endregion
|
|
@@ -4244,12 +4246,12 @@ const availableParallelism = () => {
|
|
|
4244
4246
|
|
|
4245
4247
|
//#endregion
|
|
4246
4248
|
//#region src/utils/create-bundler-option.ts
|
|
4247
|
-
async function createBundlerOptions(inputOptions, outputOptions, watchMode
|
|
4249
|
+
async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
4248
4250
|
const inputPlugins = await normalizePluginOption(inputOptions.plugins);
|
|
4249
4251
|
const outputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
4250
4252
|
const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
|
|
4251
4253
|
const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
4252
|
-
|
|
4254
|
+
outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
|
|
4253
4255
|
const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
4254
4256
|
let plugins = [
|
|
4255
4257
|
...BUILTIN_PLUGINS,
|
|
@@ -4279,8 +4281,8 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode, isCl
|
|
|
4279
4281
|
//#endregion
|
|
4280
4282
|
//#region src/utils/create-bundler.ts
|
|
4281
4283
|
let asyncRuntimeShutdown = false;
|
|
4282
|
-
async function createBundlerImpl(bundler, inputOptions, outputOptions
|
|
4283
|
-
const option = await createBundlerOptions(inputOptions, outputOptions, false
|
|
4284
|
+
async function createBundlerImpl(bundler, inputOptions, outputOptions) {
|
|
4285
|
+
const option = await createBundlerOptions(inputOptions, outputOptions, false);
|
|
4284
4286
|
if (asyncRuntimeShutdown) startAsyncRuntime();
|
|
4285
4287
|
try {
|
|
4286
4288
|
return {
|
|
@@ -4321,11 +4323,11 @@ var RolldownBuild = class {
|
|
|
4321
4323
|
this.#bundler = new BindingBundler();
|
|
4322
4324
|
}
|
|
4323
4325
|
get closed() {
|
|
4324
|
-
return this.#bundlerImpl?.impl.closed ??
|
|
4326
|
+
return this.#bundlerImpl?.impl.closed ?? true;
|
|
4325
4327
|
}
|
|
4326
|
-
async #getBundlerWithStopWorker(outputOptions
|
|
4328
|
+
async #getBundlerWithStopWorker(outputOptions) {
|
|
4327
4329
|
if (this.#bundlerImpl) await this.#bundlerImpl.stopWorkers?.();
|
|
4328
|
-
return this.#bundlerImpl = await createBundlerImpl(this.#bundler, this.#inputOptions, outputOptions
|
|
4330
|
+
return this.#bundlerImpl = await createBundlerImpl(this.#bundler, this.#inputOptions, outputOptions);
|
|
4329
4331
|
}
|
|
4330
4332
|
async generate(outputOptions = {}) {
|
|
4331
4333
|
validateOption("output", outputOptions);
|
|
@@ -4340,10 +4342,12 @@ var RolldownBuild = class {
|
|
|
4340
4342
|
return transformToRollupOutput(output);
|
|
4341
4343
|
}
|
|
4342
4344
|
async close() {
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4345
|
+
if (this.#bundlerImpl) {
|
|
4346
|
+
await this.#bundlerImpl.stopWorkers?.();
|
|
4347
|
+
await this.#bundlerImpl.impl.close();
|
|
4348
|
+
this.#bundlerImpl.shutdown();
|
|
4349
|
+
this.#bundlerImpl = void 0;
|
|
4350
|
+
}
|
|
4347
4351
|
}
|
|
4348
4352
|
async [Symbol.asyncDispose]() {
|
|
4349
4353
|
await this.close();
|
|
@@ -4532,4 +4536,4 @@ function defineConfig(config) {
|
|
|
4532
4536
|
const VERSION = version;
|
|
4533
4537
|
|
|
4534
4538
|
//#endregion
|
|
4535
|
-
export { BuiltinPlugin, PluginContextData, PluginDriver, VERSION, __commonJS, __toESM,
|
|
4539
|
+
export { BuiltinPlugin, PluginContextData, PluginDriver, VERSION, __commonJS, __toESM, assetPlugin, bindingifyPlugin, build, buildImportAnalysisPlugin, createBundlerImpl, defineConfig, description$1 as description, dynamicImportVarsPlugin, getInputCliKeys, getJsonSchema, getOutputCliKeys, handleOutputErrors, importGlobPlugin, import_ansis, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, rolldown, validateCliOptions, version, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin };
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region package.json
|
|
30
|
-
var version = "1.0.0-beta.
|
|
30
|
+
var version = "1.0.0-beta.33";
|
|
31
31
|
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/utils/normalize-string-or-regex.ts
|
|
@@ -2175,7 +2175,6 @@ var require_ansis = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ansis
|
|
|
2175
2175
|
//#endregion
|
|
2176
2176
|
//#region ../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.mjs
|
|
2177
2177
|
var import_ansis = /* @__PURE__ */ __toESM(require_ansis(), 1);
|
|
2178
|
-
var ansis_default = import_ansis.default;
|
|
2179
2178
|
const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, bold, dim, italic, underline, strikethrough, black, red, green, yellow, blue, magenta, cyan, white, gray, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGray, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright } = import_ansis.default;
|
|
2180
2179
|
|
|
2181
2180
|
//#endregion
|
|
@@ -2354,11 +2353,11 @@ const InputOptionsSchema = strictObject({
|
|
|
2354
2353
|
literal("browser"),
|
|
2355
2354
|
literal("neutral"),
|
|
2356
2355
|
literal("node")
|
|
2357
|
-
])), description(`Platform for which the code should be generated (node, ${
|
|
2356
|
+
])), description(`Platform for which the code should be generated (node, ${import_ansis.default.underline("browser")}, neutral)`)),
|
|
2358
2357
|
shimMissingExports: pipe(optional(boolean()), description("Create shim variables for missing exports")),
|
|
2359
2358
|
treeshake: optional(TreeshakingOptionsSchema),
|
|
2360
2359
|
optimization: optional(OptimizationOptionsSchema),
|
|
2361
|
-
logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${
|
|
2360
|
+
logLevel: pipe(optional(LogLevelOptionSchema), description(`Log level (${import_ansis.default.dim("silent")}, ${import_ansis.default.underline(import_ansis.default.gray("info"))}, debug, ${import_ansis.default.yellow("warn")})`)),
|
|
2362
2361
|
onLog: optional(OnLogSchema),
|
|
2363
2362
|
onwarn: optional(OnwarnSchema),
|
|
2364
2363
|
moduleTypes: pipe(optional(ModuleTypesSchema), description("Module types for customized extensions")),
|
|
@@ -2476,18 +2475,18 @@ const OutputOptionsSchema = strictObject({
|
|
|
2476
2475
|
literal("named"),
|
|
2477
2476
|
literal("default"),
|
|
2478
2477
|
literal("none")
|
|
2479
|
-
])), description(`Specify a export mode (${
|
|
2478
|
+
])), description(`Specify a export mode (${import_ansis.default.underline("auto")}, named, default, none)`)),
|
|
2480
2479
|
hashCharacters: pipe(optional(union([
|
|
2481
2480
|
literal("base64"),
|
|
2482
2481
|
literal("base36"),
|
|
2483
2482
|
literal("hex")
|
|
2484
2483
|
])), description("Use the specified character set for file hashes")),
|
|
2485
|
-
format: pipe(optional(ModuleFormatSchema), description(`Output format of the generated bundle (supports ${
|
|
2484
|
+
format: pipe(optional(ModuleFormatSchema), description(`Output format of the generated bundle (supports ${import_ansis.default.underline("esm")}, cjs, and iife)`)),
|
|
2486
2485
|
sourcemap: pipe(optional(union([
|
|
2487
2486
|
boolean(),
|
|
2488
2487
|
literal("inline"),
|
|
2489
2488
|
literal("hidden")
|
|
2490
|
-
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${
|
|
2489
|
+
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${import_ansis.default.bold("pass the `-s` on the last argument if you want to generate `.map` file")})`)),
|
|
2491
2490
|
sourcemapBaseUrl: pipe(optional(string()), description("Base URL used to prefix sourcemap paths")),
|
|
2492
2491
|
sourcemapDebugIds: pipe(optional(boolean()), description("Inject sourcemap debug IDs")),
|
|
2493
2492
|
sourcemapIgnoreList: optional(union([boolean(), custom(() => true)])),
|
|
@@ -2528,7 +2527,7 @@ const OutputOptionsSchema = strictObject({
|
|
|
2528
2527
|
minifyInternalExports: pipe(optional(boolean()), description("Minify internal exports"))
|
|
2529
2528
|
});
|
|
2530
2529
|
const getAddonDescription = (placement, wrapper) => {
|
|
2531
|
-
return `Code to insert the ${
|
|
2530
|
+
return `Code to insert the ${import_ansis.default.bold(placement)} of the bundled file (${import_ansis.default.bold(wrapper)} the wrapper function)`;
|
|
2532
2531
|
};
|
|
2533
2532
|
const OutputCliOverrideSchema = strictObject({
|
|
2534
2533
|
assetFileNames: pipe(optional(string()), description("Name pattern for asset files")),
|
|
@@ -2957,7 +2956,7 @@ function bindingPluginOrder(order) {
|
|
|
2957
2956
|
}
|
|
2958
2957
|
|
|
2959
2958
|
//#endregion
|
|
2960
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2959
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.82.2/node_modules/oxc-parser/wrap.mjs
|
|
2961
2960
|
function wrap$1(result) {
|
|
2962
2961
|
let program, module$1, comments, errors;
|
|
2963
2962
|
return {
|
|
@@ -3956,6 +3955,9 @@ var NormalizedInputOptionsImpl = class {
|
|
|
3956
3955
|
get platform() {
|
|
3957
3956
|
return this.inner.platform;
|
|
3958
3957
|
}
|
|
3958
|
+
get context() {
|
|
3959
|
+
return this.inner.context;
|
|
3960
|
+
}
|
|
3959
3961
|
};
|
|
3960
3962
|
|
|
3961
3963
|
//#endregion
|
|
@@ -4563,12 +4565,12 @@ function bindingifyPreserveEntrySignatures(preserveEntrySignatures) {
|
|
|
4563
4565
|
|
|
4564
4566
|
//#endregion
|
|
4565
4567
|
//#region src/utils/create-bundler-option.ts
|
|
4566
|
-
async function createBundlerOptions(inputOptions, outputOptions, watchMode
|
|
4568
|
+
async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
4567
4569
|
const inputPlugins = await normalizePluginOption(inputOptions.plugins);
|
|
4568
4570
|
const outputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
4569
4571
|
const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
|
|
4570
4572
|
const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
4571
|
-
|
|
4573
|
+
outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
|
|
4572
4574
|
const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
4573
4575
|
let plugins = [
|
|
4574
4576
|
...BUILTIN_PLUGINS,
|
|
@@ -4598,8 +4600,8 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode, isCl
|
|
|
4598
4600
|
//#endregion
|
|
4599
4601
|
//#region src/utils/create-bundler.ts
|
|
4600
4602
|
let asyncRuntimeShutdown = false;
|
|
4601
|
-
async function createBundlerImpl(bundler, inputOptions, outputOptions
|
|
4602
|
-
const option = await createBundlerOptions(inputOptions, outputOptions, false
|
|
4603
|
+
async function createBundlerImpl(bundler, inputOptions, outputOptions) {
|
|
4604
|
+
const option = await createBundlerOptions(inputOptions, outputOptions, false);
|
|
4603
4605
|
if (asyncRuntimeShutdown) startAsyncRuntime();
|
|
4604
4606
|
try {
|
|
4605
4607
|
return {
|
|
@@ -4640,11 +4642,11 @@ var RolldownBuild = class {
|
|
|
4640
4642
|
this.#bundler = new BindingBundler();
|
|
4641
4643
|
}
|
|
4642
4644
|
get closed() {
|
|
4643
|
-
return this.#bundlerImpl?.impl.closed ??
|
|
4645
|
+
return this.#bundlerImpl?.impl.closed ?? true;
|
|
4644
4646
|
}
|
|
4645
|
-
async #getBundlerWithStopWorker(outputOptions
|
|
4647
|
+
async #getBundlerWithStopWorker(outputOptions) {
|
|
4646
4648
|
if (this.#bundlerImpl) await this.#bundlerImpl.stopWorkers?.();
|
|
4647
|
-
return this.#bundlerImpl = await createBundlerImpl(this.#bundler, this.#inputOptions, outputOptions
|
|
4649
|
+
return this.#bundlerImpl = await createBundlerImpl(this.#bundler, this.#inputOptions, outputOptions);
|
|
4648
4650
|
}
|
|
4649
4651
|
async generate(outputOptions = {}) {
|
|
4650
4652
|
validateOption("output", outputOptions);
|
|
@@ -4659,10 +4661,12 @@ var RolldownBuild = class {
|
|
|
4659
4661
|
return transformToRollupOutput(output);
|
|
4660
4662
|
}
|
|
4661
4663
|
async close() {
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4664
|
+
if (this.#bundlerImpl) {
|
|
4665
|
+
await this.#bundlerImpl.stopWorkers?.();
|
|
4666
|
+
await this.#bundlerImpl.impl.close();
|
|
4667
|
+
this.#bundlerImpl.shutdown();
|
|
4668
|
+
this.#bundlerImpl = void 0;
|
|
4669
|
+
}
|
|
4666
4670
|
}
|
|
4667
4671
|
async [Symbol.asyncDispose]() {
|
|
4668
4672
|
await this.close();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolldown/browser",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.33",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"homepage": "https://rolldown.rs/",
|
|
6
6
|
"type": "module",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@napi-rs/wasm-runtime": "^1.0.0",
|
|
59
|
-
"@oxc-project/runtime": "=0.
|
|
59
|
+
"@oxc-project/runtime": "=0.82.2"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "pnpm run build:debug",
|