rolldown 1.0.0-beta.7-commit.a7cf9ac → 1.0.0-beta.7-commit.b80d472
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 +78 -13
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +79 -14
- package/dist/experimental-index.cjs +1 -1
- package/dist/experimental-index.d.cts +65 -0
- package/dist/experimental-index.d.mts +65 -0
- package/dist/experimental-index.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +1 -1
- package/dist/parallel-plugin-worker.cjs +1 -1
- package/dist/parallel-plugin-worker.d.cts +1 -0
- package/dist/parallel-plugin-worker.d.mts +1 -0
- package/dist/parallel-plugin-worker.mjs +1 -1
- package/dist/parallel-plugin.d.cts +15 -0
- package/dist/parallel-plugin.d.mts +15 -0
- package/dist/parallel-plugin.mjs +0 -1
- package/dist/parse-ast-index.d.cts +9 -0
- package/dist/parse-ast-index.d.mts +9 -0
- package/dist/shared/binding.d-CJ9AePJ7.d.cts +789 -0
- package/dist/shared/binding.d-jRGZ_qiz.d.mts +789 -0
- package/dist/shared/input-options.d-0CaiVwOO.d.cts +1046 -0
- package/dist/shared/input-options.d-6gWWIKa5.d.mts +1046 -0
- package/dist/shared/{src-CY9fSPIv.mjs → src-Cgiazi-7.mjs} +71 -4
- package/dist/shared/{src-B6DuetJS.cjs → src-DiHrbNiz.cjs} +67 -4
- package/package.json +16 -20
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/api/build.d.ts +0 -18
- package/dist/types/api/experimental.d.ts +0 -7
- package/dist/types/api/rolldown/index.d.ts +0 -3
- package/dist/types/api/rolldown/rolldown-build.d.ts +0 -15
- package/dist/types/api/watch/index.d.ts +0 -3
- package/dist/types/api/watch/watch-emitter.d.ts +0 -31
- package/dist/types/api/watch/watcher.d.ts +0 -13
- package/dist/types/binding.d.ts +0 -1507
- package/dist/types/builtin-plugin/alias-plugin.d.ts +0 -10
- package/dist/types/builtin-plugin/constructors.d.ts +0 -23
- package/dist/types/builtin-plugin/replace-plugin.d.ts +0 -27
- package/dist/types/builtin-plugin/transform-plugin.d.ts +0 -9
- package/dist/types/builtin-plugin/utils.d.ts +0 -8
- package/dist/types/cli/arguments/alias.d.ts +0 -16
- package/dist/types/cli/arguments/index.d.ts +0 -15
- package/dist/types/cli/arguments/normalize.d.ts +0 -16
- package/dist/types/cli/arguments/utils.d.ts +0 -8
- package/dist/types/cli/commands/bundle.d.ts +0 -3
- package/dist/types/cli/commands/help.d.ts +0 -1
- package/dist/types/cli/index.d.ts +0 -1
- package/dist/types/cli/load-config.d.ts +0 -5
- package/dist/types/cli/logger.d.ts +0 -5
- package/dist/types/constants/plugin-context.d.ts +0 -7
- package/dist/types/constants/plugin.d.ts +0 -45
- package/dist/types/experimental-index.d.ts +0 -9
- package/dist/types/index.d.ts +0 -31
- package/dist/types/log/log-handler.d.ts +0 -4
- package/dist/types/log/logger.d.ts +0 -6
- package/dist/types/log/logging.d.ts +0 -12
- package/dist/types/log/logs.d.ts +0 -18
- package/dist/types/options/generated/checks-options.d.ts +0 -57
- package/dist/types/options/input-options.d.ts +0 -185
- package/dist/types/options/normalized-input-options.d.ts +0 -18
- package/dist/types/options/normalized-output-options.d.ts +0 -70
- package/dist/types/options/output-options.d.ts +0 -182
- package/dist/types/options/watch-options.d.ts +0 -5
- package/dist/types/parallel-plugin-worker.d.ts +0 -1
- package/dist/types/parallel-plugin.d.ts +0 -1
- package/dist/types/parse-ast-index.d.ts +0 -5
- package/dist/types/plugin/bindingify-build-hooks.d.ts +0 -10
- package/dist/types/plugin/bindingify-hook-filter.d.ts +0 -7
- package/dist/types/plugin/bindingify-output-hooks.d.ts +0 -14
- package/dist/types/plugin/bindingify-plugin-hook-meta.d.ts +0 -8
- package/dist/types/plugin/bindingify-plugin.d.ts +0 -17
- package/dist/types/plugin/bindingify-watch-hooks.d.ts +0 -5
- package/dist/types/plugin/hook-filter.d.ts +0 -49
- package/dist/types/plugin/index.d.ts +0 -141
- package/dist/types/plugin/minimal-plugin-context.d.ts +0 -24
- package/dist/types/plugin/parallel-plugin-implementation.d.ts +0 -10
- package/dist/types/plugin/parallel-plugin.d.ts +0 -9
- package/dist/types/plugin/plugin-context-data.d.ts +0 -22
- package/dist/types/plugin/plugin-context.d.ts +0 -67
- package/dist/types/plugin/plugin-driver.d.ts +0 -10
- package/dist/types/plugin/transform-plugin-context.d.ts +0 -28
- package/dist/types/plugin/with-filter.d.ts +0 -10
- package/dist/types/types/assert.d.ts +0 -14
- package/dist/types/types/config-export.d.ts +0 -5
- package/dist/types/types/misc.d.ts +0 -40
- package/dist/types/types/module-info.d.ts +0 -15
- package/dist/types/types/module-side-effects.d.ts +0 -12
- package/dist/types/types/output-bundle.d.ts +0 -4
- package/dist/types/types/rolldown-options.d.ts +0 -5
- package/dist/types/types/rolldown-output.d.ts +0 -66
- package/dist/types/types/schema.d.ts +0 -33
- package/dist/types/types/sourcemap.d.ts +0 -14
- package/dist/types/types/utils.d.ts +0 -13
- package/dist/types/types.d.ts +0 -7
- package/dist/types/utils/asset-source.d.ts +0 -4
- package/dist/types/utils/async-flatten.d.ts +0 -1
- package/dist/types/utils/bindingify-input-options.d.ts +0 -7
- package/dist/types/utils/bindingify-output-options.d.ts +0 -5
- package/dist/types/utils/code-frame.d.ts +0 -1
- package/dist/types/utils/compose-js-plugins.d.ts +0 -2
- package/dist/types/utils/create-bundler-option.d.ts +0 -11
- package/dist/types/utils/create-bundler.d.ts +0 -9
- package/dist/types/utils/define-config.d.ts +0 -5
- package/dist/types/utils/error.d.ts +0 -2
- package/dist/types/utils/initialize-parallel-plugins.d.ts +0 -17
- package/dist/types/utils/misc.d.ts +0 -7
- package/dist/types/utils/normalize-hook.d.ts +0 -7
- package/dist/types/utils/normalize-plugin-option.d.ts +0 -13
- package/dist/types/utils/normalize-string-or-regex.d.ts +0 -2
- package/dist/types/utils/plugin/index.d.ts +0 -2
- package/dist/types/utils/resolved-external.d.ts +0 -4
- package/dist/types/utils/transform-module-info.d.ts +0 -4
- package/dist/types/utils/transform-rendered-chunk.d.ts +0 -4
- package/dist/types/utils/transform-rendered-module.d.ts +0 -3
- package/dist/types/utils/transform-side-effects.d.ts +0 -3
- package/dist/types/utils/transform-sourcemap.d.ts +0 -3
- package/dist/types/utils/transform-to-rollup-output.d.ts +0 -11
- package/dist/types/utils/validator.d.ts +0 -6
package/dist/cli.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-DiHrbNiz.cjs');
|
|
3
3
|
require('./shared/parse-ast-index-CLx_7WML.cjs');
|
|
4
4
|
const node_fs = require_chunk.__toESM(require("node:fs"));
|
|
5
5
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
@@ -1121,7 +1121,8 @@ function normalizeCliOptions(cliOptions, positionals) {
|
|
|
1121
1121
|
process.exit(1);
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
|
-
if (!result.config && positionals.length > 0) result.input.input
|
|
1124
|
+
if (!result.config && positionals.length > 0) if (Array.isArray(result.input.input)) result.input.input.push(...positionals);
|
|
1125
|
+
else result.input.input = positionals;
|
|
1125
1126
|
return result;
|
|
1126
1127
|
}
|
|
1127
1128
|
|
|
@@ -1515,6 +1516,67 @@ async function loadConfig(configPath) {
|
|
|
1515
1516
|
}
|
|
1516
1517
|
}
|
|
1517
1518
|
|
|
1519
|
+
//#endregion
|
|
1520
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.64.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1521
|
+
var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.64.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
|
|
1522
|
+
function _usingCtx() {
|
|
1523
|
+
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1524
|
+
var n$2 = Error();
|
|
1525
|
+
return n$2.name = "SuppressedError", n$2.error = r$2, n$2.suppressed = e$1, n$2;
|
|
1526
|
+
}, e = {}, n$1 = [];
|
|
1527
|
+
function using(r$2, e$1) {
|
|
1528
|
+
if (null != e$1) {
|
|
1529
|
+
if (Object(e$1) !== e$1) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");
|
|
1530
|
+
if (r$2) var o$1 = e$1[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")];
|
|
1531
|
+
if (void 0 === o$1 && (o$1 = e$1[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r$2)) var t$1 = o$1;
|
|
1532
|
+
if ("function" != typeof o$1) throw new TypeError("Object is not disposable.");
|
|
1533
|
+
t$1 && (o$1 = function o$2() {
|
|
1534
|
+
try {
|
|
1535
|
+
t$1.call(e$1);
|
|
1536
|
+
} catch (r$3) {
|
|
1537
|
+
return Promise.reject(r$3);
|
|
1538
|
+
}
|
|
1539
|
+
}), n$1.push({
|
|
1540
|
+
v: e$1,
|
|
1541
|
+
d: o$1,
|
|
1542
|
+
a: r$2
|
|
1543
|
+
});
|
|
1544
|
+
} else r$2 && n$1.push({
|
|
1545
|
+
d: e$1,
|
|
1546
|
+
a: r$2
|
|
1547
|
+
});
|
|
1548
|
+
return e$1;
|
|
1549
|
+
}
|
|
1550
|
+
return {
|
|
1551
|
+
e,
|
|
1552
|
+
u: using.bind(null, !1),
|
|
1553
|
+
a: using.bind(null, !0),
|
|
1554
|
+
d: function d() {
|
|
1555
|
+
var o$1, t$1 = this.e, s$1 = 0;
|
|
1556
|
+
function next() {
|
|
1557
|
+
for (; o$1 = n$1.pop();) try {
|
|
1558
|
+
if (!o$1.a && 1 === s$1) return s$1 = 0, n$1.push(o$1), Promise.resolve().then(next);
|
|
1559
|
+
if (o$1.d) {
|
|
1560
|
+
var r$2 = o$1.d.call(o$1.v);
|
|
1561
|
+
if (o$1.a) return s$1 |= 2, Promise.resolve(r$2).then(next, err);
|
|
1562
|
+
} else s$1 |= 1;
|
|
1563
|
+
} catch (r$3) {
|
|
1564
|
+
return err(r$3);
|
|
1565
|
+
}
|
|
1566
|
+
if (1 === s$1) return t$1 !== e ? Promise.reject(t$1) : Promise.resolve();
|
|
1567
|
+
if (t$1 !== e) throw t$1;
|
|
1568
|
+
}
|
|
1569
|
+
function err(n$2) {
|
|
1570
|
+
return t$1 = t$1 !== e ? new r$1(n$2, t$1) : n$2, next();
|
|
1571
|
+
}
|
|
1572
|
+
return next();
|
|
1573
|
+
}
|
|
1574
|
+
};
|
|
1575
|
+
}
|
|
1576
|
+
module.exports = _usingCtx, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1577
|
+
} });
|
|
1578
|
+
var import_usingCtx = require_chunk.__toESM(require_usingCtx());
|
|
1579
|
+
|
|
1518
1580
|
//#endregion
|
|
1519
1581
|
//#region src/cli/commands/bundle.ts
|
|
1520
1582
|
async function bundleWithConfig(configPath, cliOptions) {
|
|
@@ -1527,17 +1589,18 @@ async function bundleWithConfig(configPath, cliOptions) {
|
|
|
1527
1589
|
else await bundleInner(config, cliOptions);
|
|
1528
1590
|
}
|
|
1529
1591
|
async function bundleWithCliOptions(cliOptions) {
|
|
1530
|
-
if (cliOptions.output.dir || cliOptions.output.file) {
|
|
1531
|
-
const operation = cliOptions.watch ? watchInner : bundleInner;
|
|
1532
|
-
await operation({}, cliOptions);
|
|
1533
|
-
return;
|
|
1534
|
-
}
|
|
1535
|
-
if (cliOptions.watch) {
|
|
1536
|
-
logger.error("You must specify `output.dir` to use watch mode");
|
|
1537
|
-
process.exit(1);
|
|
1538
|
-
}
|
|
1539
|
-
const build = await require_src.rolldown(cliOptions.input);
|
|
1540
1592
|
try {
|
|
1593
|
+
var _usingCtx$1 = (0, import_usingCtx.default)();
|
|
1594
|
+
if (cliOptions.output.dir || cliOptions.output.file) {
|
|
1595
|
+
const operation = cliOptions.watch ? watchInner : bundleInner;
|
|
1596
|
+
await operation({}, cliOptions);
|
|
1597
|
+
return;
|
|
1598
|
+
}
|
|
1599
|
+
if (cliOptions.watch) {
|
|
1600
|
+
logger.error("You must specify `output.dir` to use watch mode");
|
|
1601
|
+
process.exit(1);
|
|
1602
|
+
}
|
|
1603
|
+
const build = _usingCtx$1.a(await require_src.rolldown(cliOptions.input));
|
|
1541
1604
|
const { output: outputs } = await build.generate(cliOptions.output);
|
|
1542
1605
|
if (outputs.length === 0) {
|
|
1543
1606
|
logger.error("No output generated");
|
|
@@ -1547,8 +1610,10 @@ async function bundleWithCliOptions(cliOptions) {
|
|
|
1547
1610
|
if (outputs.length > 1) logger.log(`\n${ansis.default.cyan(ansis.default.bold(`|→ ${file.fileName}:`))}\n`);
|
|
1548
1611
|
console.log(file.type === "asset" ? file.source : file.code);
|
|
1549
1612
|
}
|
|
1613
|
+
} catch (_$1) {
|
|
1614
|
+
_usingCtx$1.e = _$1;
|
|
1550
1615
|
} finally {
|
|
1551
|
-
await
|
|
1616
|
+
await _usingCtx$1.d();
|
|
1552
1617
|
}
|
|
1553
1618
|
}
|
|
1554
1619
|
async function watchInner(config, cliOptions) {
|
package/dist/cli.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/cli.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __commonJS, __esm } from "./shared/chunk-DUYDk_2O.mjs";
|
|
2
|
-
import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
1
|
+
import { __commonJS, __esm, __toESM } from "./shared/chunk-DUYDk_2O.mjs";
|
|
2
|
+
import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-Cgiazi-7.mjs";
|
|
3
3
|
import "./shared/parse-ast-index-lybCSSSh.mjs";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path, { sep } from "node:path";
|
|
@@ -1144,7 +1144,8 @@ function normalizeCliOptions(cliOptions, positionals) {
|
|
|
1144
1144
|
process.exit(1);
|
|
1145
1145
|
}
|
|
1146
1146
|
}
|
|
1147
|
-
if (!result.config && positionals.length > 0) result.input.input
|
|
1147
|
+
if (!result.config && positionals.length > 0) if (Array.isArray(result.input.input)) result.input.input.push(...positionals);
|
|
1148
|
+
else result.input.input = positionals;
|
|
1148
1149
|
return result;
|
|
1149
1150
|
}
|
|
1150
1151
|
var init_normalize = __esm({ "src/cli/arguments/normalize.ts"() {
|
|
@@ -1562,6 +1563,67 @@ var init_load_config = __esm({ "src/cli/load-config.ts"() {
|
|
|
1562
1563
|
DEFAULT_CONFIG_BASE = "rolldown.config";
|
|
1563
1564
|
} });
|
|
1564
1565
|
|
|
1566
|
+
//#endregion
|
|
1567
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.64.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1568
|
+
var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.64.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
|
|
1569
|
+
function _usingCtx() {
|
|
1570
|
+
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1571
|
+
var n$2 = Error();
|
|
1572
|
+
return n$2.name = "SuppressedError", n$2.error = r$2, n$2.suppressed = e$1, n$2;
|
|
1573
|
+
}, e = {}, n$1 = [];
|
|
1574
|
+
function using(r$2, e$1) {
|
|
1575
|
+
if (null != e$1) {
|
|
1576
|
+
if (Object(e$1) !== e$1) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");
|
|
1577
|
+
if (r$2) var o$1 = e$1[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")];
|
|
1578
|
+
if (void 0 === o$1 && (o$1 = e$1[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r$2)) var t$1 = o$1;
|
|
1579
|
+
if ("function" != typeof o$1) throw new TypeError("Object is not disposable.");
|
|
1580
|
+
t$1 && (o$1 = function o$2() {
|
|
1581
|
+
try {
|
|
1582
|
+
t$1.call(e$1);
|
|
1583
|
+
} catch (r$3) {
|
|
1584
|
+
return Promise.reject(r$3);
|
|
1585
|
+
}
|
|
1586
|
+
}), n$1.push({
|
|
1587
|
+
v: e$1,
|
|
1588
|
+
d: o$1,
|
|
1589
|
+
a: r$2
|
|
1590
|
+
});
|
|
1591
|
+
} else r$2 && n$1.push({
|
|
1592
|
+
d: e$1,
|
|
1593
|
+
a: r$2
|
|
1594
|
+
});
|
|
1595
|
+
return e$1;
|
|
1596
|
+
}
|
|
1597
|
+
return {
|
|
1598
|
+
e,
|
|
1599
|
+
u: using.bind(null, !1),
|
|
1600
|
+
a: using.bind(null, !0),
|
|
1601
|
+
d: function d() {
|
|
1602
|
+
var o$1, t$1 = this.e, s$1 = 0;
|
|
1603
|
+
function next() {
|
|
1604
|
+
for (; o$1 = n$1.pop();) try {
|
|
1605
|
+
if (!o$1.a && 1 === s$1) return s$1 = 0, n$1.push(o$1), Promise.resolve().then(next);
|
|
1606
|
+
if (o$1.d) {
|
|
1607
|
+
var r$2 = o$1.d.call(o$1.v);
|
|
1608
|
+
if (o$1.a) return s$1 |= 2, Promise.resolve(r$2).then(next, err);
|
|
1609
|
+
} else s$1 |= 1;
|
|
1610
|
+
} catch (r$3) {
|
|
1611
|
+
return err(r$3);
|
|
1612
|
+
}
|
|
1613
|
+
if (1 === s$1) return t$1 !== e ? Promise.reject(t$1) : Promise.resolve();
|
|
1614
|
+
if (t$1 !== e) throw t$1;
|
|
1615
|
+
}
|
|
1616
|
+
function err(n$2) {
|
|
1617
|
+
return t$1 = t$1 !== e ? new r$1(n$2, t$1) : n$2, next();
|
|
1618
|
+
}
|
|
1619
|
+
return next();
|
|
1620
|
+
}
|
|
1621
|
+
};
|
|
1622
|
+
}
|
|
1623
|
+
module.exports = _usingCtx, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1624
|
+
} });
|
|
1625
|
+
var import_usingCtx = __toESM(require_usingCtx());
|
|
1626
|
+
|
|
1565
1627
|
//#endregion
|
|
1566
1628
|
//#region src/cli/commands/bundle.ts
|
|
1567
1629
|
async function bundleWithConfig(configPath, cliOptions) {
|
|
@@ -1574,17 +1636,18 @@ async function bundleWithConfig(configPath, cliOptions) {
|
|
|
1574
1636
|
else await bundleInner(config, cliOptions);
|
|
1575
1637
|
}
|
|
1576
1638
|
async function bundleWithCliOptions(cliOptions) {
|
|
1577
|
-
if (cliOptions.output.dir || cliOptions.output.file) {
|
|
1578
|
-
const operation = cliOptions.watch ? watchInner : bundleInner;
|
|
1579
|
-
await operation({}, cliOptions);
|
|
1580
|
-
return;
|
|
1581
|
-
}
|
|
1582
|
-
if (cliOptions.watch) {
|
|
1583
|
-
logger.error("You must specify `output.dir` to use watch mode");
|
|
1584
|
-
process.exit(1);
|
|
1585
|
-
}
|
|
1586
|
-
const build = await rolldown(cliOptions.input);
|
|
1587
1639
|
try {
|
|
1640
|
+
var _usingCtx$1 = (0, import_usingCtx.default)();
|
|
1641
|
+
if (cliOptions.output.dir || cliOptions.output.file) {
|
|
1642
|
+
const operation = cliOptions.watch ? watchInner : bundleInner;
|
|
1643
|
+
await operation({}, cliOptions);
|
|
1644
|
+
return;
|
|
1645
|
+
}
|
|
1646
|
+
if (cliOptions.watch) {
|
|
1647
|
+
logger.error("You must specify `output.dir` to use watch mode");
|
|
1648
|
+
process.exit(1);
|
|
1649
|
+
}
|
|
1650
|
+
const build = _usingCtx$1.a(await rolldown(cliOptions.input));
|
|
1588
1651
|
const { output: outputs } = await build.generate(cliOptions.output);
|
|
1589
1652
|
if (outputs.length === 0) {
|
|
1590
1653
|
logger.error("No output generated");
|
|
@@ -1594,8 +1657,10 @@ async function bundleWithCliOptions(cliOptions) {
|
|
|
1594
1657
|
if (outputs.length > 1) logger.log(`\n${colors.cyan(colors.bold(`|→ ${file.fileName}:`))}\n`);
|
|
1595
1658
|
console.log(file.type === "asset" ? file.source : file.code);
|
|
1596
1659
|
}
|
|
1660
|
+
} catch (_$1) {
|
|
1661
|
+
_usingCtx$1.e = _$1;
|
|
1597
1662
|
} finally {
|
|
1598
|
-
await
|
|
1663
|
+
await _usingCtx$1.d();
|
|
1599
1664
|
}
|
|
1600
1665
|
}
|
|
1601
1666
|
async function watchInner(config, cliOptions) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
3
|
-
const require_src = require('./shared/src-
|
|
3
|
+
const require_src = require('./shared/src-DiHrbNiz.cjs');
|
|
4
4
|
const require_parse_ast_index = require('./shared/parse-ast-index-CLx_7WML.cjs');
|
|
5
5
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
6
6
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult$1 as TransformResult, moduleRunnerTransform, transform } from "./shared/binding.d-CJ9AePJ7.cjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/input-options.d-0CaiVwOO.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/api/experimental.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* This is an experimental API. It's behavior may change in the future.
|
|
7
|
+
*
|
|
8
|
+
* Calling this API will only execute the scan stage of rolldown.
|
|
9
|
+
*/
|
|
10
|
+
declare const experimental_scan: (input: InputOptions) => Promise<void>;
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/utils/compose-js-plugins.d.ts
|
|
14
|
+
declare function composeJsPlugins(plugins: RolldownPlugin[]): RolldownPlugin[];
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/builtin-plugin/alias-plugin.d.ts
|
|
18
|
+
type AliasPluginAlias = {
|
|
19
|
+
find: string | RegExp
|
|
20
|
+
replacement: string
|
|
21
|
+
};
|
|
22
|
+
type AliasPluginConfig = {
|
|
23
|
+
entries: AliasPluginAlias[]
|
|
24
|
+
};
|
|
25
|
+
declare function aliasPlugin(config: AliasPluginConfig): BuiltinPlugin;
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
29
|
+
/**
|
|
30
|
+
* Replaces targeted strings in files while bundling.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // Basic usage
|
|
34
|
+
* ```js
|
|
35
|
+
* replacePlugin({
|
|
36
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
37
|
+
* __buildDate__: () => JSON.stringify(new Date()),
|
|
38
|
+
* __buildVersion: 15
|
|
39
|
+
* })
|
|
40
|
+
* ```
|
|
41
|
+
* @example
|
|
42
|
+
* // With options
|
|
43
|
+
* ```js
|
|
44
|
+
* replacePlugin({
|
|
45
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
46
|
+
* __buildDate__: () => JSON.stringify(new Date()),
|
|
47
|
+
* __buildVersion: 15
|
|
48
|
+
* }, {
|
|
49
|
+
* preventAssignment: false,
|
|
50
|
+
* })
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare function replacePlugin(values?: BindingReplacePluginConfig["values"], options?: Omit<BindingReplacePluginConfig, "values">): BuiltinPlugin;
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/builtin-plugin/transform-plugin.d.ts
|
|
57
|
+
type TransformPattern = string | RegExp | (RegExp | string)[];
|
|
58
|
+
type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exclude"> & {
|
|
59
|
+
include?: TransformPattern
|
|
60
|
+
exclude?: TransformPattern
|
|
61
|
+
};
|
|
62
|
+
declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
export { TransformOptions, TransformResult, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult$1 as TransformResult, moduleRunnerTransform, transform } from "./shared/binding.d-jRGZ_qiz.mjs";
|
|
2
|
+
import { BuiltinPlugin$1 as BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin$1 as buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin$1 as dynamicImportVarsPlugin, importGlobPlugin$1 as importGlobPlugin, isolatedDeclarationPlugin$1 as isolatedDeclarationPlugin, jsonPlugin$1 as jsonPlugin, loadFallbackPlugin$1 as loadFallbackPlugin, manifestPlugin$1 as manifestPlugin, moduleFederationPlugin$1 as moduleFederationPlugin, modulePreloadPolyfillPlugin$1 as modulePreloadPolyfillPlugin, reportPlugin$1 as reportPlugin, viteResolvePlugin$1 as viteResolvePlugin, wasmFallbackPlugin$1 as wasmFallbackPlugin, wasmHelperPlugin$1 as wasmHelperPlugin } from "./shared/input-options.d-6gWWIKa5.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/api/experimental.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* This is an experimental API. It's behavior may change in the future.
|
|
7
|
+
*
|
|
8
|
+
* Calling this API will only execute the scan stage of rolldown.
|
|
9
|
+
*/
|
|
10
|
+
declare const experimental_scan: (input: InputOptions) => Promise<void>;
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/utils/compose-js-plugins.d.ts
|
|
14
|
+
declare function composeJsPlugins(plugins: RolldownPlugin[]): RolldownPlugin[];
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/builtin-plugin/alias-plugin.d.ts
|
|
18
|
+
type AliasPluginAlias = {
|
|
19
|
+
find: string | RegExp
|
|
20
|
+
replacement: string
|
|
21
|
+
};
|
|
22
|
+
type AliasPluginConfig = {
|
|
23
|
+
entries: AliasPluginAlias[]
|
|
24
|
+
};
|
|
25
|
+
declare function aliasPlugin(config: AliasPluginConfig): BuiltinPlugin;
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
29
|
+
/**
|
|
30
|
+
* Replaces targeted strings in files while bundling.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // Basic usage
|
|
34
|
+
* ```js
|
|
35
|
+
* replacePlugin({
|
|
36
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
37
|
+
* __buildDate__: () => JSON.stringify(new Date()),
|
|
38
|
+
* __buildVersion: 15
|
|
39
|
+
* })
|
|
40
|
+
* ```
|
|
41
|
+
* @example
|
|
42
|
+
* // With options
|
|
43
|
+
* ```js
|
|
44
|
+
* replacePlugin({
|
|
45
|
+
* 'process.env.NODE_ENV': JSON.stringify('production'),
|
|
46
|
+
* __buildDate__: () => JSON.stringify(new Date()),
|
|
47
|
+
* __buildVersion: 15
|
|
48
|
+
* }, {
|
|
49
|
+
* preventAssignment: false,
|
|
50
|
+
* })
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare function replacePlugin(values?: BindingReplacePluginConfig["values"], options?: Omit<BindingReplacePluginConfig, "values">): BuiltinPlugin;
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/builtin-plugin/transform-plugin.d.ts
|
|
57
|
+
type TransformPattern = string | RegExp | (RegExp | string)[];
|
|
58
|
+
type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exclude"> & {
|
|
59
|
+
include?: TransformPattern
|
|
60
|
+
exclude?: TransformPattern
|
|
61
|
+
};
|
|
62
|
+
declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
export { TransformOptions, TransformResult, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-
|
|
1
|
+
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-Cgiazi-7.mjs";
|
|
2
2
|
import { import_binding } from "./shared/parse-ast-index-lybCSSSh.mjs";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
|
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding.d-CJ9AePJ7.cjs";
|
|
2
|
+
import { AsyncPluginHooks, BuildOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GetModuleInfo, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogOrStringHandler, LoggingFunction, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, SourceDescription, SourceMap, SourceMapInput, StringFilter, TransformPluginContext, TransformResult, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter } from "./shared/input-options.d-0CaiVwOO.cjs";
|
|
3
|
+
|
|
4
|
+
export { AsyncPluginHooks, BuildOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GetModuleInfo, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogOrStringHandler, LoggingFunction, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, SourceDescription, SourceMap, SourceMapInput, StringFilter, TransformPluginContext, TransformResult, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding.d-jRGZ_qiz.mjs";
|
|
2
|
+
import { AsyncPluginHooks, BuildOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GetModuleInfo, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogOrStringHandler, LoggingFunction, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, SourceDescription, SourceMap, SourceMapInput, StringFilter, TransformPluginContext, TransformResult, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch, withFilter$1 as withFilter } from "./shared/input-options.d-6gWWIKa5.mjs";
|
|
3
|
+
|
|
4
|
+
export { AsyncPluginHooks, BuildOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GetModuleInfo, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogOrStringHandler, LoggingFunction, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, SourceDescription, SourceMap, SourceMapInput, StringFilter, TransformPluginContext, TransformResult, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-
|
|
1
|
+
import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-Cgiazi-7.mjs";
|
|
2
2
|
import "./shared/parse-ast-index-lybCSSSh.mjs";
|
|
3
3
|
|
|
4
4
|
init_src();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-DiHrbNiz.cjs');
|
|
3
3
|
const require_parse_ast_index = require('./shared/parse-ast-index-CLx_7WML.cjs');
|
|
4
4
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
5
5
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __commonJS } from "./shared/chunk-DUYDk_2O.mjs";
|
|
2
|
-
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-
|
|
2
|
+
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-Cgiazi-7.mjs";
|
|
3
3
|
import { import_binding } from "./shared/parse-ast-index-lybCSSSh.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "./shared/binding.d-CJ9AePJ7.cjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/input-options.d-0CaiVwOO.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
|
+
type ParallelPluginImplementation = Plugin;
|
|
6
|
+
type Context = {
|
|
7
|
+
/**
|
|
8
|
+
* Thread number
|
|
9
|
+
*/
|
|
10
|
+
threadNumber: number
|
|
11
|
+
};
|
|
12
|
+
declare function defineParallelPluginImplementation<Options>(plugin: (Options: Options, context: Context) => MaybePromise<ParallelPluginImplementation>): (Options: Options, context: Context) => MaybePromise<ParallelPluginImplementation>;
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Context, ParallelPluginImplementation, defineParallelPluginImplementation };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "./shared/binding.d-jRGZ_qiz.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/input-options.d-6gWWIKa5.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
|
+
type ParallelPluginImplementation = Plugin;
|
|
6
|
+
type Context = {
|
|
7
|
+
/**
|
|
8
|
+
* Thread number
|
|
9
|
+
*/
|
|
10
|
+
threadNumber: number
|
|
11
|
+
};
|
|
12
|
+
declare function defineParallelPluginImplementation<Options>(plugin: (Options: Options, context: Context) => MaybePromise<ParallelPluginImplementation>): (Options: Options, context: Context) => MaybePromise<ParallelPluginImplementation>;
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Context, ParallelPluginImplementation, defineParallelPluginImplementation };
|
package/dist/parallel-plugin.mjs
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ParseResult, ParserOptions } from "./shared/binding.d-CJ9AePJ7.cjs";
|
|
2
|
+
import { Program } from "@oxc-project/types";
|
|
3
|
+
|
|
4
|
+
//#region src/parse-ast-index.d.ts
|
|
5
|
+
declare function parseAst(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Program;
|
|
6
|
+
declare function parseAstAsync(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Promise<Program>;
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ParseResult, ParserOptions, parseAst, parseAstAsync };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ParseResult, ParserOptions } from "./shared/binding.d-jRGZ_qiz.mjs";
|
|
2
|
+
import { Program } from "@oxc-project/types";
|
|
3
|
+
|
|
4
|
+
//#region src/parse-ast-index.d.ts
|
|
5
|
+
declare function parseAst(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Program;
|
|
6
|
+
declare function parseAstAsync(sourceText: string, options?: ParserOptions | undefined | null, filename?: string): Promise<Program>;
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ParseResult, ParserOptions, parseAst, parseAstAsync };
|