rolldown 0.10.5 → 0.11.0
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/cjs/cli.cjs +631 -69
- package/dist/cjs/index.cjs +16 -15
- package/dist/cjs/parallel-plugin-worker.cjs +17 -19
- package/dist/cjs/parallel-plugin.cjs +2 -4
- package/dist/esm/cli.mjs +630 -66
- package/dist/esm/index.mjs +13 -10
- package/dist/esm/parallel-plugin-worker.mjs +16 -18
- package/dist/shared/{chunk-eib2uzZZ.cjs → chunk-IY9XHjk1.cjs} +11 -17
- package/dist/shared/consola_36c0034f-5LhwiLE2.mjs +897 -0
- package/dist/shared/consola_36c0034f-WXb1k8ME.cjs +902 -0
- package/dist/shared/prompt-qKiYiowG.mjs +807 -0
- package/dist/shared/prompt-v8IJTptZ.cjs +810 -0
- package/dist/shared/rolldown-Jq_CbZp4.cjs +49 -0
- package/dist/shared/rolldown-RjvHfXoR.mjs +48 -0
- package/dist/shared/utils_index-DAvBTBzR.mjs +1532 -0
- package/dist/shared/utils_index-PYoHCZRc.cjs +1507 -0
- package/dist/types/binding.d.ts +72 -2
- package/dist/types/cli/colors.d.ts +0 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/log/logger.d.ts +1 -1
- package/dist/types/options/output-options.d.ts +4 -4
- package/dist/types/plugin/bindingify-builtin-plugin.d.ts +5 -2
- package/dist/types/plugin/plugin-context.d.ts +5 -0
- package/dist/types/utils/initialize-parallel-plugins.d.ts +0 -1
- package/package.json +18 -18
- package/dist/shared/bindingify_plugin-gPrr_HPR.mjs +0 -1053
- package/dist/shared/bindingify_plugin-sRZqfDBJ.cjs +0 -1032
- package/dist/shared/rolldown-1SJPa4fg.cjs +0 -547
- package/dist/shared/rolldown-bgokD9pg.mjs +0 -544
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const { createBundler, transformToRollupOutput } = require("./utils_index-PYoHCZRc.cjs");
|
|
4
|
+
|
|
5
|
+
//#region src/rolldown-build.ts
|
|
6
|
+
class RolldownBuild {
|
|
7
|
+
#inputOptions;
|
|
8
|
+
#bundler;
|
|
9
|
+
#stopWorkers;
|
|
10
|
+
constructor(inputOptions) {
|
|
11
|
+
this.#inputOptions = inputOptions;
|
|
12
|
+
}
|
|
13
|
+
async #getBundler(outputOptions) {
|
|
14
|
+
if (typeof this.#bundler === 'undefined') {
|
|
15
|
+
const { bundler, stopWorkers } = await createBundler(this.#inputOptions, outputOptions);
|
|
16
|
+
this.#bundler = bundler;
|
|
17
|
+
this.#stopWorkers = stopWorkers;
|
|
18
|
+
}
|
|
19
|
+
return this.#bundler;
|
|
20
|
+
}
|
|
21
|
+
async generate(outputOptions = {}) {
|
|
22
|
+
const bundler = await this.#getBundler(outputOptions);
|
|
23
|
+
const output = await bundler.generate();
|
|
24
|
+
return transformToRollupOutput(output);
|
|
25
|
+
}
|
|
26
|
+
async write(outputOptions = {}) {
|
|
27
|
+
const bundler = await this.#getBundler(outputOptions);
|
|
28
|
+
const output = await bundler.write();
|
|
29
|
+
return transformToRollupOutput(output);
|
|
30
|
+
}
|
|
31
|
+
async destroy() {
|
|
32
|
+
await this.#stopWorkers?.();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/rolldown.ts
|
|
38
|
+
const rolldown = async (input) => {
|
|
39
|
+
return new RolldownBuild(input);
|
|
40
|
+
};
|
|
41
|
+
const experimental_scan = async (input) => {
|
|
42
|
+
const { bundler, stopWorkers } = await createBundler(input, {});
|
|
43
|
+
await bundler.scan();
|
|
44
|
+
await stopWorkers?.();
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
exports.experimental_scan = experimental_scan;
|
|
49
|
+
exports.rolldown = rolldown;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import __node_module__ from 'node:module';
|
|
2
|
+
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
+
import { createBundler, transformToRollupOutput } from "./utils_index-DAvBTBzR.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/rolldown-build.ts
|
|
6
|
+
class RolldownBuild {
|
|
7
|
+
#inputOptions;
|
|
8
|
+
#bundler;
|
|
9
|
+
#stopWorkers;
|
|
10
|
+
constructor(inputOptions) {
|
|
11
|
+
this.#inputOptions = inputOptions;
|
|
12
|
+
}
|
|
13
|
+
async #getBundler(outputOptions) {
|
|
14
|
+
if (typeof this.#bundler === 'undefined') {
|
|
15
|
+
const { bundler, stopWorkers } = await createBundler(this.#inputOptions, outputOptions);
|
|
16
|
+
this.#bundler = bundler;
|
|
17
|
+
this.#stopWorkers = stopWorkers;
|
|
18
|
+
}
|
|
19
|
+
return this.#bundler;
|
|
20
|
+
}
|
|
21
|
+
async generate(outputOptions = {}) {
|
|
22
|
+
const bundler = await this.#getBundler(outputOptions);
|
|
23
|
+
const output = await bundler.generate();
|
|
24
|
+
return transformToRollupOutput(output);
|
|
25
|
+
}
|
|
26
|
+
async write(outputOptions = {}) {
|
|
27
|
+
const bundler = await this.#getBundler(outputOptions);
|
|
28
|
+
const output = await bundler.write();
|
|
29
|
+
return transformToRollupOutput(output);
|
|
30
|
+
}
|
|
31
|
+
async destroy() {
|
|
32
|
+
await this.#stopWorkers?.();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/rolldown.ts
|
|
38
|
+
const rolldown = async (input) => {
|
|
39
|
+
return new RolldownBuild(input);
|
|
40
|
+
};
|
|
41
|
+
const experimental_scan = async (input) => {
|
|
42
|
+
const { bundler, stopWorkers } = await createBundler(input, {});
|
|
43
|
+
await bundler.scan();
|
|
44
|
+
await stopWorkers?.();
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { experimental_scan, rolldown };
|