@rolldown/browser 1.0.0-beta.33 → 1.0.0-beta.34
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 +34 -3
- package/dist/experimental-index.cjs +36 -2
- package/dist/experimental-index.d.cts +36 -4
- package/dist/experimental-index.d.mts +36 -4
- package/dist/experimental-index.mjs +35 -4
- 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.wasi-browser.js +3 -0
- package/dist/rolldown-binding.wasi.cjs +3 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-CFhvYkVn.d.mts → binding-9k0egz6L.d.mts} +107 -7
- package/dist/shared/{binding-DQk9TN_A.d.cts → binding-D13M6Llu.d.cts} +107 -7
- package/dist/shared/{define-config-B3QOs3Kt.d.cts → define-config-D5AluabE.d.cts} +63 -24
- package/dist/shared/{define-config-DyjJkNqG.d.mts → define-config-DzIQxNqU.d.mts} +63 -24
- package/dist/shared/{load-config-CLPLfZVe.mjs → load-config--VYNOtUY.mjs} +1 -1
- package/dist/shared/{load-config-xKQFLlGV.cjs → load-config-DfHD1OI9.cjs} +1 -1
- package/dist/shared/{parse-ast-index-BGzB5Bo-.mjs → parse-ast-index-C_CZT4St.mjs} +1 -1
- package/dist/shared/{parse-ast-index-BZfwAN9P.cjs → parse-ast-index-ChWj_C49.cjs} +1 -1
- package/dist/shared/{src-CZgQg1yE.mjs → src-B4V64IkU.mjs} +105 -90
- package/dist/shared/{src-CGziNJPr.cjs → src-McCMqGpa.cjs} +122 -95
- package/dist/{src-D_htlJ_o.js → src-Bl12Y5ab.js} +102 -87
- package/package.json +19 -11
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-McCMqGpa.cjs');
|
|
3
|
+
require('./shared/parse-ast-index-ChWj_C49.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-DfHD1OI9.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
|
|
529
|
+
const colors = createColors();
|
|
530
530
|
function getColor$1(color, fallback = "reset") {
|
|
531
|
-
return colors
|
|
531
|
+
return colors[color] || colors[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
|
|
908
|
+
${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors.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
|
|
913
|
+
if (isBadge) return getBgColor(typeColor)(colors.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
|
|
924
|
+
const coloredDate = date && colors.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
|
|
927
|
+
const tag = logObj.tag ? colors.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
|
|
932
|
+
line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.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
|
|
942
|
+
return str.replace(/`([^`]+)`/gm, (_$1, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_$1, m) => ` ${colors.underline(m)} `);
|
|
943
943
|
}
|
|
944
944
|
function getColor(color = "white") {
|
|
945
|
-
return colors
|
|
945
|
+
return colors[color] || colors.white;
|
|
946
946
|
}
|
|
947
947
|
function getBgColor(color = "bgWhite") {
|
|
948
|
-
return colors
|
|
948
|
+
return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.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.82.
|
|
1438
|
-
var require_usingCtx = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.82.
|
|
1437
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.82.3/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.3/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.ansis_default.cyan(require_src.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.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.ansis_default.bold(relativeId(event.output[0]))} in ${require_src.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.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.ansis_default.dim(withTrailingSlash(distPath));
|
|
1658
|
+
log += require_src.ansis_default[group.color](entry.fileName.padEnd(sizeAdjustment.longest + 2));
|
|
1659
|
+
log += require_src.ansis_default.dim(entry.type);
|
|
1660
|
+
log += require_src.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.ansis_default.gray(`${require_src.description} (rolldown v${require_src.version})`)}
|
|
1680
1680
|
|
|
1681
|
-
${require_src.
|
|
1681
|
+
${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>")}`;
|
|
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.ansis_default.bold(require_src.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.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.ansis_default.bold(require_src.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.ansis_default.cyan(command)}`);
|
|
1734
1734
|
logger.log("");
|
|
1735
1735
|
});
|
|
1736
|
-
logger.log(`${require_src.
|
|
1736
|
+
logger.log(`${require_src.ansis_default.bold(require_src.ansis_default.underline("NOTES"))}`);
|
|
1737
1737
|
logger.log("");
|
|
1738
1738
|
notes.forEach((note) => {
|
|
1739
|
-
logger.log(` * ${require_src.
|
|
1739
|
+
logger.log(` * ${require_src.ansis_default.gray(note)}`);
|
|
1740
1740
|
});
|
|
1741
1741
|
}
|
|
1742
1742
|
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { __commonJS, __toESM, description, getInputCliKeys, getJsonSchema, getOutputCliKeys,
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { __commonJS, __toESM, ansis_default, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-B4V64IkU.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-C_CZT4St.mjs";
|
|
3
3
|
import { arraify } from "./shared/dist-ByKQkexh.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config
|
|
4
|
+
import { loadConfig } from "./shared/load-config--VYNOtUY.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
|
|
528
|
+
const colors = createColors();
|
|
529
529
|
function getColor$1(color, fallback = "reset") {
|
|
530
|
-
return colors
|
|
530
|
+
return colors[color] || colors[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
|
|
907
|
+
${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors.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
|
|
912
|
+
if (isBadge) return getBgColor(typeColor)(colors.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
|
|
923
|
+
const coloredDate = date && colors.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
|
|
926
|
+
const tag = logObj.tag ? colors.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
|
|
931
|
+
line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.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
|
|
941
|
+
return str.replace(/`([^`]+)`/gm, (_$1, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_$1, m) => ` ${colors.underline(m)} `);
|
|
942
942
|
}
|
|
943
943
|
function getColor(color = "white") {
|
|
944
|
-
return colors
|
|
944
|
+
return colors[color] || colors.white;
|
|
945
945
|
}
|
|
946
946
|
function getBgColor(color = "bgWhite") {
|
|
947
|
-
return colors
|
|
947
|
+
return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.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.82.
|
|
1437
|
-
var require_usingCtx = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.82.
|
|
1436
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.82.3/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1437
|
+
var require_usingCtx = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.82.3/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${ansis_default.cyan(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 ${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 ${ansis_default.bold(relativeId(event.output[0]))} in ${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 ${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 = ansis_default.dim(withTrailingSlash(distPath));
|
|
1657
|
+
log += ansis_default[group.color](entry.fileName.padEnd(sizeAdjustment.longest + 2));
|
|
1658
|
+
log += ansis_default.dim(entry.type);
|
|
1659
|
+
log += 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 = `${ansis_default.gray(`${description} (rolldown v${version})`)}
|
|
1679
1679
|
|
|
1680
|
-
${
|
|
1680
|
+
${ansis_default.bold(ansis_default.underline("USAGE"))} ${ansis_default.cyan("rolldown -c <config>")} or ${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(`${ansis_default.bold(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 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(`${ansis_default.bold(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(` ${ansis_default.cyan(command)}`);
|
|
1733
1733
|
logger.log("");
|
|
1734
1734
|
});
|
|
1735
|
-
logger.log(`${
|
|
1735
|
+
logger.log(`${ansis_default.bold(ansis_default.underline("NOTES"))}`);
|
|
1736
1736
|
logger.log("");
|
|
1737
1737
|
notes.forEach((note) => {
|
|
1738
|
-
logger.log(` * ${
|
|
1738
|
+
logger.log(` * ${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-McCMqGpa.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-ChWj_C49.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-DfHD1OI9.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-D13M6Llu.cjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-D5AluabE.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-9k0egz6L.mjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-DzIQxNqU.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-B4V64IkU.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-C_CZT4St.mjs";
|
|
3
3
|
import "./shared/dist-ByKQkexh.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config
|
|
4
|
+
import { loadConfig } from "./shared/load-config--VYNOtUY.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = version;
|
|
@@ -1,6 +1,37 @@
|
|
|
1
|
-
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-
|
|
2
|
-
import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
1
|
+
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, createBundlerOptions, dynamicImportVarsPlugin, esmExternalRequirePlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-Bl12Y5ab.js";
|
|
2
|
+
import { BindingBundler, BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
|
|
4
|
+
//#region src/api/dev/dev-engine.ts
|
|
5
|
+
var DevEngine = class DevEngine {
|
|
6
|
+
#inner;
|
|
7
|
+
#cachedBuildFinishPromise = null;
|
|
8
|
+
static async create(inputOptions, outputOptions) {
|
|
9
|
+
inputOptions = await PluginDriver.callOptionsHook(inputOptions);
|
|
10
|
+
const options = await createBundlerOptions(inputOptions, outputOptions, false);
|
|
11
|
+
const inner = new BindingDevEngine(options.bundlerOptions);
|
|
12
|
+
return new DevEngine(inner);
|
|
13
|
+
}
|
|
14
|
+
constructor(inner) {
|
|
15
|
+
this.#inner = inner;
|
|
16
|
+
}
|
|
17
|
+
async run() {
|
|
18
|
+
await this.#inner.run();
|
|
19
|
+
}
|
|
20
|
+
async ensureCurrentBuildFinish() {
|
|
21
|
+
if (this.#cachedBuildFinishPromise) return this.#cachedBuildFinishPromise;
|
|
22
|
+
const promise = this.#inner.ensureCurrentBuildFinish().then(() => {
|
|
23
|
+
this.#cachedBuildFinishPromise = null;
|
|
24
|
+
});
|
|
25
|
+
this.#cachedBuildFinishPromise = promise;
|
|
26
|
+
return promise;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/api/dev/index.ts
|
|
32
|
+
var dev = DevEngine.create;
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
4
35
|
//#region src/api/experimental.ts
|
|
5
36
|
/**
|
|
6
37
|
* This is an experimental API. It's behavior may change in the future.
|
|
@@ -72,4 +103,4 @@ function transformPlugin(config) {
|
|
|
72
103
|
}
|
|
73
104
|
|
|
74
105
|
//#endregion
|
|
75
|
-
export { ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
106
|
+
export { DevEngine, ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
@@ -1,10 +1,41 @@
|
|
|
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-McCMqGpa.cjs');
|
|
3
|
+
require('./shared/parse-ast-index-ChWj_C49.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"));
|
|
7
7
|
|
|
8
|
+
//#region src/api/dev/dev-engine.ts
|
|
9
|
+
var DevEngine = class DevEngine {
|
|
10
|
+
#inner;
|
|
11
|
+
#cachedBuildFinishPromise = null;
|
|
12
|
+
static async create(inputOptions, outputOptions) {
|
|
13
|
+
inputOptions = await require_src.PluginDriver.callOptionsHook(inputOptions);
|
|
14
|
+
const options = await require_src.createBundlerOptions(inputOptions, outputOptions, false);
|
|
15
|
+
const inner = new src_rolldown_binding_wasi_cjs.BindingDevEngine(options.bundlerOptions);
|
|
16
|
+
return new DevEngine(inner);
|
|
17
|
+
}
|
|
18
|
+
constructor(inner) {
|
|
19
|
+
this.#inner = inner;
|
|
20
|
+
}
|
|
21
|
+
async run() {
|
|
22
|
+
await this.#inner.run();
|
|
23
|
+
}
|
|
24
|
+
async ensureCurrentBuildFinish() {
|
|
25
|
+
if (this.#cachedBuildFinishPromise) return this.#cachedBuildFinishPromise;
|
|
26
|
+
const promise = this.#inner.ensureCurrentBuildFinish().then(() => {
|
|
27
|
+
this.#cachedBuildFinishPromise = null;
|
|
28
|
+
});
|
|
29
|
+
this.#cachedBuildFinishPromise = promise;
|
|
30
|
+
return promise;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/api/dev/index.ts
|
|
36
|
+
var dev = DevEngine.create;
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
8
39
|
//#region src/api/experimental.ts
|
|
9
40
|
/**
|
|
10
41
|
* This is an experimental API. It's behavior may change in the future.
|
|
@@ -81,6 +112,7 @@ function transformPlugin(config) {
|
|
|
81
112
|
}
|
|
82
113
|
|
|
83
114
|
//#endregion
|
|
115
|
+
exports.DevEngine = DevEngine;
|
|
84
116
|
Object.defineProperty(exports, 'ResolverFactory', {
|
|
85
117
|
enumerable: true,
|
|
86
118
|
get: function () {
|
|
@@ -91,7 +123,9 @@ exports.aliasPlugin = aliasPlugin;
|
|
|
91
123
|
exports.assetPlugin = require_src.assetPlugin;
|
|
92
124
|
exports.buildImportAnalysisPlugin = require_src.buildImportAnalysisPlugin;
|
|
93
125
|
exports.defineParallelPlugin = defineParallelPlugin;
|
|
126
|
+
exports.dev = dev;
|
|
94
127
|
exports.dynamicImportVarsPlugin = require_src.dynamicImportVarsPlugin;
|
|
128
|
+
exports.esmExternalRequirePlugin = require_src.esmExternalRequirePlugin;
|
|
95
129
|
exports.importGlobPlugin = require_src.importGlobPlugin;
|
|
96
130
|
Object.defineProperty(exports, 'isolatedDeclaration', {
|
|
97
131
|
enumerable: true,
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-
|
|
2
|
-
import { BuiltinPlugin, InputOptions,
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-D13M6Llu.cjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, OutputOptions, StringOrRegExp, defineParallelPlugin } from "./shared/define-config-D5AluabE.cjs";
|
|
3
3
|
|
|
4
|
+
//#region src/api/dev/dev-engine.d.ts
|
|
5
|
+
declare class DevEngine {
|
|
6
|
+
#private;
|
|
7
|
+
static create(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<DevEngine>;
|
|
8
|
+
private constructor();
|
|
9
|
+
run(): Promise<void>;
|
|
10
|
+
ensureCurrentBuildFinish(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/api/dev/index.d.ts
|
|
14
|
+
declare var dev: typeof DevEngine.create;
|
|
15
|
+
//#endregion
|
|
4
16
|
//#region src/api/experimental.d.ts
|
|
5
|
-
|
|
6
17
|
/**
|
|
7
18
|
* This is an experimental API. It's behavior may change in the future.
|
|
8
19
|
*
|
|
@@ -10,6 +21,27 @@ import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, de
|
|
|
10
21
|
*/
|
|
11
22
|
declare const experimental_scan: (input: InputOptions) => Promise<void>;
|
|
12
23
|
//#endregion
|
|
24
|
+
//#region src/builtin-plugin/constructors.d.ts
|
|
25
|
+
declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
26
|
+
type DynamicImportVarsPluginConfig = Omit<BindingDynamicImportVarsPluginConfig, "include" | "exclude"> & {
|
|
27
|
+
include?: StringOrRegExp | StringOrRegExp[];
|
|
28
|
+
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
29
|
+
};
|
|
30
|
+
declare function dynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
|
|
31
|
+
declare function importGlobPlugin(config?: BindingImportGlobPluginConfig): BuiltinPlugin;
|
|
32
|
+
declare function reporterPlugin(config?: BindingReporterPluginConfig): BuiltinPlugin;
|
|
33
|
+
declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
|
|
34
|
+
declare function wasmHelperPlugin(config?: BindingWasmHelperPluginConfig): BuiltinPlugin;
|
|
35
|
+
declare function wasmFallbackPlugin(): BuiltinPlugin;
|
|
36
|
+
declare function loadFallbackPlugin(): BuiltinPlugin;
|
|
37
|
+
declare function jsonPlugin(config?: BindingJsonPluginConfig): BuiltinPlugin;
|
|
38
|
+
declare function buildImportAnalysisPlugin(config: BindingBuildImportAnalysisPluginConfig): BuiltinPlugin;
|
|
39
|
+
declare function viteResolvePlugin(config: BindingViteResolvePluginConfig): BuiltinPlugin;
|
|
40
|
+
declare function isolatedDeclarationPlugin(config?: BindingIsolatedDeclarationPluginConfig): BuiltinPlugin;
|
|
41
|
+
declare function assetPlugin(config?: BindingAssetPluginConfig): BuiltinPlugin;
|
|
42
|
+
declare function webWorkerPostPlugin(): BuiltinPlugin;
|
|
43
|
+
declare function esmExternalRequirePlugin(config?: BindingEsmExternalRequirePluginConfig): BuiltinPlugin;
|
|
44
|
+
//#endregion
|
|
13
45
|
//#region src/builtin-plugin/alias-plugin.d.ts
|
|
14
46
|
type AliasPluginAlias = {
|
|
15
47
|
find: string | RegExp;
|
|
@@ -55,4 +87,4 @@ type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exc
|
|
|
55
87
|
};
|
|
56
88
|
declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
|
|
57
89
|
//#endregion
|
|
58
|
-
export { type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
90
|
+
export { DevEngine, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-
|
|
2
|
-
import { BuiltinPlugin, InputOptions,
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-9k0egz6L.mjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, OutputOptions, StringOrRegExp, defineParallelPlugin } from "./shared/define-config-DzIQxNqU.mjs";
|
|
3
3
|
|
|
4
|
+
//#region src/api/dev/dev-engine.d.ts
|
|
5
|
+
declare class DevEngine {
|
|
6
|
+
#private;
|
|
7
|
+
static create(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<DevEngine>;
|
|
8
|
+
private constructor();
|
|
9
|
+
run(): Promise<void>;
|
|
10
|
+
ensureCurrentBuildFinish(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/api/dev/index.d.ts
|
|
14
|
+
declare var dev: typeof DevEngine.create;
|
|
15
|
+
//#endregion
|
|
4
16
|
//#region src/api/experimental.d.ts
|
|
5
|
-
|
|
6
17
|
/**
|
|
7
18
|
* This is an experimental API. It's behavior may change in the future.
|
|
8
19
|
*
|
|
@@ -10,6 +21,27 @@ import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, de
|
|
|
10
21
|
*/
|
|
11
22
|
declare const experimental_scan: (input: InputOptions) => Promise<void>;
|
|
12
23
|
//#endregion
|
|
24
|
+
//#region src/builtin-plugin/constructors.d.ts
|
|
25
|
+
declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
26
|
+
type DynamicImportVarsPluginConfig = Omit<BindingDynamicImportVarsPluginConfig, "include" | "exclude"> & {
|
|
27
|
+
include?: StringOrRegExp | StringOrRegExp[];
|
|
28
|
+
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
29
|
+
};
|
|
30
|
+
declare function dynamicImportVarsPlugin(config?: DynamicImportVarsPluginConfig): BuiltinPlugin;
|
|
31
|
+
declare function importGlobPlugin(config?: BindingImportGlobPluginConfig): BuiltinPlugin;
|
|
32
|
+
declare function reporterPlugin(config?: BindingReporterPluginConfig): BuiltinPlugin;
|
|
33
|
+
declare function manifestPlugin(config?: BindingManifestPluginConfig): BuiltinPlugin;
|
|
34
|
+
declare function wasmHelperPlugin(config?: BindingWasmHelperPluginConfig): BuiltinPlugin;
|
|
35
|
+
declare function wasmFallbackPlugin(): BuiltinPlugin;
|
|
36
|
+
declare function loadFallbackPlugin(): BuiltinPlugin;
|
|
37
|
+
declare function jsonPlugin(config?: BindingJsonPluginConfig): BuiltinPlugin;
|
|
38
|
+
declare function buildImportAnalysisPlugin(config: BindingBuildImportAnalysisPluginConfig): BuiltinPlugin;
|
|
39
|
+
declare function viteResolvePlugin(config: BindingViteResolvePluginConfig): BuiltinPlugin;
|
|
40
|
+
declare function isolatedDeclarationPlugin(config?: BindingIsolatedDeclarationPluginConfig): BuiltinPlugin;
|
|
41
|
+
declare function assetPlugin(config?: BindingAssetPluginConfig): BuiltinPlugin;
|
|
42
|
+
declare function webWorkerPostPlugin(): BuiltinPlugin;
|
|
43
|
+
declare function esmExternalRequirePlugin(config?: BindingEsmExternalRequirePluginConfig): BuiltinPlugin;
|
|
44
|
+
//#endregion
|
|
13
45
|
//#region src/builtin-plugin/alias-plugin.d.ts
|
|
14
46
|
type AliasPluginAlias = {
|
|
15
47
|
find: string | RegExp;
|
|
@@ -55,4 +87,4 @@ type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exc
|
|
|
55
87
|
};
|
|
56
88
|
declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
|
|
57
89
|
//#endregion
|
|
58
|
-
export { type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
90
|
+
export { DevEngine, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, type TransformOptions, type TransformResult, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|