rolldown 0.10.0 → 0.10.1
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/chunks/prompt.cjs +2 -1
- package/dist/chunks/prompt.cjs.map +1 -1
- package/dist/chunks/prompt.mjs +2 -1
- package/dist/chunks/prompt.mjs.map +1 -1
- package/dist/cli.cjs +79 -12
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +77 -10
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +147 -54
- package/dist/index.d.mts +147 -54
- package/dist/index.d.ts +147 -54
- package/dist/index.mjs +1 -1
- package/dist/shared/{rolldown.dda7e541.mjs → rolldown.04482f71.mjs} +157 -248
- package/dist/shared/rolldown.04482f71.mjs.map +1 -0
- package/dist/shared/{rolldown.63afb352.cjs → rolldown.ee864e8d.cjs} +158 -249
- package/dist/shared/rolldown.ee864e8d.cjs.map +1 -0
- package/package.json +18 -16
- package/dist/shared/rolldown.63afb352.cjs.map +0 -1
- package/dist/shared/rolldown.dda7e541.mjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const require$$0 = require('fs');
|
|
4
|
-
const
|
|
4
|
+
const nodePath = require('node:path');
|
|
5
5
|
|
|
6
6
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
7
7
|
|
|
8
8
|
const require$$0__default = /*#__PURE__*/_interopDefaultCompat(require$$0);
|
|
9
|
-
const
|
|
9
|
+
const nodePath__default = /*#__PURE__*/_interopDefaultCompat(nodePath);
|
|
10
10
|
|
|
11
11
|
async function asyncFlatten(array) {
|
|
12
12
|
do {
|
|
@@ -18,17 +18,25 @@ async function asyncFlatten(array) {
|
|
|
18
18
|
function transformToRollupOutputChunk(chunk) {
|
|
19
19
|
return {
|
|
20
20
|
type: "chunk",
|
|
21
|
-
code
|
|
21
|
+
get code() {
|
|
22
|
+
return chunk.code;
|
|
23
|
+
},
|
|
22
24
|
fileName: chunk.fileName,
|
|
23
|
-
modules
|
|
24
|
-
Object.
|
|
25
|
-
|
|
25
|
+
get modules() {
|
|
26
|
+
return Object.fromEntries(
|
|
27
|
+
Object.entries(chunk.modules).map(([key, _]) => [key, {}])
|
|
28
|
+
);
|
|
29
|
+
},
|
|
26
30
|
exports: chunk.exports,
|
|
27
31
|
isEntry: chunk.isEntry,
|
|
28
32
|
facadeModuleId: chunk.facadeModuleId || null,
|
|
29
33
|
isDynamicEntry: chunk.isDynamicEntry,
|
|
30
|
-
moduleIds
|
|
31
|
-
|
|
34
|
+
get moduleIds() {
|
|
35
|
+
return chunk.moduleIds;
|
|
36
|
+
},
|
|
37
|
+
get map() {
|
|
38
|
+
return chunk.map ? JSON.parse(chunk.map) : null;
|
|
39
|
+
},
|
|
32
40
|
sourcemapFileName: chunk.sourcemapFileName || null
|
|
33
41
|
};
|
|
34
42
|
}
|
|
@@ -36,7 +44,9 @@ function transformToRollupOutputAsset(asset) {
|
|
|
36
44
|
return {
|
|
37
45
|
type: "asset",
|
|
38
46
|
fileName: asset.fileName,
|
|
39
|
-
source
|
|
47
|
+
get source() {
|
|
48
|
+
return asset.source;
|
|
49
|
+
}
|
|
40
50
|
};
|
|
41
51
|
}
|
|
42
52
|
function transformToRollupOutput(output) {
|
|
@@ -50,11 +60,6 @@ function transformToRollupOutput(output) {
|
|
|
50
60
|
]
|
|
51
61
|
};
|
|
52
62
|
}
|
|
53
|
-
function transformToOutputBundle(output) {
|
|
54
|
-
return Object.fromEntries(
|
|
55
|
-
transformToRollupOutput(output).output.map((item) => [item.fileName, item])
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
63
|
|
|
59
64
|
const normalizePluginOption = async (plugins) => (await asyncFlatten([plugins])).filter(Boolean);
|
|
60
65
|
|
|
@@ -381,6 +386,9 @@ if (!nativeBinding) {
|
|
|
381
386
|
}
|
|
382
387
|
throw new Error(`Failed to load native binding`);
|
|
383
388
|
}
|
|
389
|
+
nativeBinding.BindingOutputAsset;
|
|
390
|
+
nativeBinding.BindingOutputChunk;
|
|
391
|
+
nativeBinding.BindingOutputs;
|
|
384
392
|
nativeBinding.BindingPluginContext;
|
|
385
393
|
var Bundler = nativeBinding.Bundler;
|
|
386
394
|
|
|
@@ -425,257 +433,154 @@ function getResolve(resolve) {
|
|
|
425
433
|
}
|
|
426
434
|
}
|
|
427
435
|
|
|
428
|
-
function
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
buildStart: buildStart(plugin.buildStart, options),
|
|
432
|
-
resolveId: resolveId(plugin.resolveId),
|
|
433
|
-
load: load(plugin.load),
|
|
434
|
-
transform: transform(plugin.transform),
|
|
435
|
-
buildEnd: buildEnd(plugin.buildEnd),
|
|
436
|
-
renderChunk: renderChunk(plugin.renderChunk),
|
|
437
|
-
generateBundle: generateBundle(plugin.generateBundle),
|
|
438
|
-
writeBundle: writeBundle(plugin.writeBundle)
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
function writeBundle(hook) {
|
|
442
|
-
if (hook) {
|
|
443
|
-
if (typeof hook !== "function") {
|
|
444
|
-
return unimplemented();
|
|
445
|
-
}
|
|
446
|
-
return async (outputs) => {
|
|
447
|
-
try {
|
|
448
|
-
await hook.call({}, {}, transformToOutputBundle(outputs));
|
|
449
|
-
} catch (error) {
|
|
450
|
-
console.error(error);
|
|
451
|
-
throw error;
|
|
452
|
-
}
|
|
453
|
-
};
|
|
436
|
+
function normalizeHook(hook) {
|
|
437
|
+
if (typeof hook === "function") {
|
|
438
|
+
return [hook, {}];
|
|
454
439
|
}
|
|
440
|
+
const { handler, ...options } = hook;
|
|
441
|
+
return [handler, options];
|
|
455
442
|
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}
|
|
461
|
-
return async (outputs, isWrite) => {
|
|
462
|
-
try {
|
|
463
|
-
await hook.call(
|
|
464
|
-
{},
|
|
465
|
-
{},
|
|
466
|
-
// @ts-expect-error: FIXME: hyf0
|
|
467
|
-
transformToOutputBundle(outputs),
|
|
468
|
-
isWrite
|
|
469
|
-
);
|
|
470
|
-
} catch (error) {
|
|
471
|
-
console.error(error);
|
|
472
|
-
throw error;
|
|
473
|
-
}
|
|
474
|
-
};
|
|
443
|
+
|
|
444
|
+
function bindingifyBuildStart(options, hook) {
|
|
445
|
+
if (!hook) {
|
|
446
|
+
return void 0;
|
|
475
447
|
}
|
|
448
|
+
const [handler, _optionsIgnoredSofar] = normalizeHook(hook);
|
|
449
|
+
return async (ctx) => {
|
|
450
|
+
handler.call(ctx, options);
|
|
451
|
+
};
|
|
476
452
|
}
|
|
477
|
-
function
|
|
478
|
-
if (hook) {
|
|
479
|
-
|
|
480
|
-
return unimplemented();
|
|
481
|
-
}
|
|
482
|
-
return async (code, chunk) => {
|
|
483
|
-
try {
|
|
484
|
-
let renderedChunk = Object.assign(
|
|
485
|
-
{
|
|
486
|
-
get name() {
|
|
487
|
-
return unimplemented();
|
|
488
|
-
},
|
|
489
|
-
get dynamicImports() {
|
|
490
|
-
return unimplemented();
|
|
491
|
-
},
|
|
492
|
-
get imports() {
|
|
493
|
-
return unimplemented();
|
|
494
|
-
},
|
|
495
|
-
get implicitlyLoadedBefore() {
|
|
496
|
-
return unimplemented();
|
|
497
|
-
},
|
|
498
|
-
get importedBindings() {
|
|
499
|
-
return unimplemented();
|
|
500
|
-
},
|
|
501
|
-
get isImplicitEntry() {
|
|
502
|
-
return unimplemented();
|
|
503
|
-
},
|
|
504
|
-
get referencedFiles() {
|
|
505
|
-
return unimplemented();
|
|
506
|
-
},
|
|
507
|
-
type: "chunk"
|
|
508
|
-
},
|
|
509
|
-
chunk,
|
|
510
|
-
{
|
|
511
|
-
get modules() {
|
|
512
|
-
return Object.fromEntries(
|
|
513
|
-
Object.entries(chunk.modules).map(([key, value2]) => [
|
|
514
|
-
key,
|
|
515
|
-
Object.assign(
|
|
516
|
-
{
|
|
517
|
-
get code() {
|
|
518
|
-
return unimplemented();
|
|
519
|
-
}
|
|
520
|
-
},
|
|
521
|
-
value2
|
|
522
|
-
)
|
|
523
|
-
])
|
|
524
|
-
);
|
|
525
|
-
},
|
|
526
|
-
get facadeModuleId() {
|
|
527
|
-
return chunk.facadeModuleId || null;
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
);
|
|
531
|
-
const value = await hook.call(
|
|
532
|
-
{},
|
|
533
|
-
code,
|
|
534
|
-
// @ts-expect-error: FIXME: hyf0
|
|
535
|
-
renderedChunk,
|
|
536
|
-
{},
|
|
537
|
-
{}
|
|
538
|
-
);
|
|
539
|
-
if (value === void 0 || value === null) {
|
|
540
|
-
return;
|
|
541
|
-
}
|
|
542
|
-
if (typeof value === "string") {
|
|
543
|
-
return { code: value };
|
|
544
|
-
}
|
|
545
|
-
if (typeof value === "object") {
|
|
546
|
-
return { code: value.code };
|
|
547
|
-
}
|
|
548
|
-
} catch (error) {
|
|
549
|
-
console.error(error);
|
|
550
|
-
throw error;
|
|
551
|
-
}
|
|
552
|
-
};
|
|
453
|
+
function bindingifyBuildEnd(hook) {
|
|
454
|
+
if (!hook) {
|
|
455
|
+
return void 0;
|
|
553
456
|
}
|
|
457
|
+
const [handler, _optionsIgnoredSofar] = normalizeHook(hook);
|
|
458
|
+
return async (err) => {
|
|
459
|
+
try {
|
|
460
|
+
handler.call(null, err ?? void 0);
|
|
461
|
+
} catch (error) {
|
|
462
|
+
console.error(error);
|
|
463
|
+
}
|
|
464
|
+
};
|
|
554
465
|
}
|
|
555
|
-
function
|
|
556
|
-
if (hook) {
|
|
557
|
-
|
|
558
|
-
|
|
466
|
+
function bindingifyResolveId(hook) {
|
|
467
|
+
if (!hook) {
|
|
468
|
+
return void 0;
|
|
469
|
+
}
|
|
470
|
+
const [handler, _optionsIgnoredSofar] = normalizeHook(hook);
|
|
471
|
+
return async (specifier, importer, options) => {
|
|
472
|
+
const ret = await handler.call(
|
|
473
|
+
null,
|
|
474
|
+
specifier,
|
|
475
|
+
importer ?? void 0,
|
|
476
|
+
options
|
|
477
|
+
);
|
|
478
|
+
if (ret == false || ret == null) {
|
|
479
|
+
return;
|
|
559
480
|
}
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
};
|
|
568
|
-
}
|
|
481
|
+
if (typeof ret === "string") {
|
|
482
|
+
return {
|
|
483
|
+
id: ret
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
return ret;
|
|
487
|
+
};
|
|
569
488
|
}
|
|
570
|
-
function
|
|
571
|
-
if (hook) {
|
|
572
|
-
|
|
573
|
-
|
|
489
|
+
function bindingifyTransform(hook) {
|
|
490
|
+
if (!hook) {
|
|
491
|
+
return void 0;
|
|
492
|
+
}
|
|
493
|
+
const [handler, _optionsIgnoredSofar] = normalizeHook(hook);
|
|
494
|
+
return async (code, id) => {
|
|
495
|
+
const ret = await handler.call(null, code, id);
|
|
496
|
+
if (ret == null) {
|
|
497
|
+
return;
|
|
574
498
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
throw error;
|
|
581
|
-
}
|
|
499
|
+
const retCode = typeof ret === "string" ? ret : ret.code;
|
|
500
|
+
const retMap = typeof ret === "string" ? void 0 : ret.map;
|
|
501
|
+
return {
|
|
502
|
+
code: retCode,
|
|
503
|
+
map: retMap ?? void 0
|
|
582
504
|
};
|
|
583
|
-
}
|
|
584
|
-
return;
|
|
505
|
+
};
|
|
585
506
|
}
|
|
586
|
-
function
|
|
587
|
-
if (hook) {
|
|
588
|
-
|
|
589
|
-
|
|
507
|
+
function bindingifyLoad(hook) {
|
|
508
|
+
if (!hook) {
|
|
509
|
+
return void 0;
|
|
510
|
+
}
|
|
511
|
+
const [handler, _optionsIgnoredSofar] = normalizeHook(hook);
|
|
512
|
+
return async (id) => {
|
|
513
|
+
const ret = await handler.call(null, id);
|
|
514
|
+
if (ret == null) {
|
|
515
|
+
return;
|
|
590
516
|
}
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
}
|
|
597
|
-
if (typeof value === "string") {
|
|
598
|
-
return { code: value };
|
|
599
|
-
}
|
|
600
|
-
if (value.code === void 0) {
|
|
601
|
-
return;
|
|
602
|
-
}
|
|
603
|
-
return { code: value.code, map: transformSourcemap(value.map) };
|
|
604
|
-
} catch (error) {
|
|
605
|
-
console.error(error);
|
|
606
|
-
throw error;
|
|
607
|
-
}
|
|
517
|
+
const retCode = typeof ret === "string" ? ret : ret.code;
|
|
518
|
+
const retMap = typeof ret === "string" ? void 0 : ret.map;
|
|
519
|
+
return {
|
|
520
|
+
code: retCode,
|
|
521
|
+
map: retMap ?? void 0
|
|
608
522
|
};
|
|
609
|
-
}
|
|
523
|
+
};
|
|
610
524
|
}
|
|
611
|
-
function
|
|
612
|
-
if (hook) {
|
|
613
|
-
|
|
614
|
-
|
|
525
|
+
function bindingifyRenderChunk(hook) {
|
|
526
|
+
if (!hook) {
|
|
527
|
+
return void 0;
|
|
528
|
+
}
|
|
529
|
+
const [handler, _optionsIgnoredSofar] = normalizeHook(hook);
|
|
530
|
+
return async (code, chunk) => {
|
|
531
|
+
const ret = await handler.call(null, code, chunk);
|
|
532
|
+
if (ret == null) {
|
|
533
|
+
return;
|
|
615
534
|
}
|
|
616
|
-
return
|
|
617
|
-
|
|
618
|
-
const value = await hook.call(
|
|
619
|
-
{},
|
|
620
|
-
source,
|
|
621
|
-
importer ? importer : void 0,
|
|
622
|
-
options
|
|
623
|
-
);
|
|
624
|
-
if (value === void 0 || value === null) {
|
|
625
|
-
return;
|
|
626
|
-
}
|
|
627
|
-
if (typeof value === "string") {
|
|
628
|
-
return { id: value };
|
|
629
|
-
}
|
|
630
|
-
if (value === false) {
|
|
631
|
-
return { id: source, external: true };
|
|
632
|
-
}
|
|
633
|
-
if (value.external === "absolute" || value.external === "relative") {
|
|
634
|
-
throw new Error(
|
|
635
|
-
`External module type {${value.external}} is not supported yet.`
|
|
636
|
-
);
|
|
637
|
-
}
|
|
638
|
-
return value;
|
|
639
|
-
} catch (error) {
|
|
640
|
-
console.error(error);
|
|
641
|
-
throw error;
|
|
642
|
-
}
|
|
535
|
+
return {
|
|
536
|
+
code: ret
|
|
643
537
|
};
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
function bindingifyGenerateBundle(hook) {
|
|
542
|
+
if (!hook) {
|
|
543
|
+
return void 0;
|
|
644
544
|
}
|
|
545
|
+
const [handler, _optionsIgnoredSofar] = normalizeHook(hook);
|
|
546
|
+
return async (bundle, isWrite) => {
|
|
547
|
+
handler.call(null, bundle, isWrite);
|
|
548
|
+
};
|
|
645
549
|
}
|
|
646
|
-
function
|
|
647
|
-
if (hook) {
|
|
648
|
-
|
|
649
|
-
return unimplemented();
|
|
650
|
-
}
|
|
651
|
-
return async (id) => {
|
|
652
|
-
try {
|
|
653
|
-
const value = await hook.call({}, id);
|
|
654
|
-
if (value === void 0 || value === null) {
|
|
655
|
-
return;
|
|
656
|
-
}
|
|
657
|
-
if (typeof value === "string") {
|
|
658
|
-
return { code: value };
|
|
659
|
-
}
|
|
660
|
-
if (value.code === void 0) {
|
|
661
|
-
return;
|
|
662
|
-
}
|
|
663
|
-
return { code: value.code, map: transformSourcemap(value.map) };
|
|
664
|
-
} catch (error) {
|
|
665
|
-
console.error(error);
|
|
666
|
-
throw error;
|
|
667
|
-
}
|
|
668
|
-
};
|
|
550
|
+
function bindingifyWriteBundle(hook) {
|
|
551
|
+
if (!hook) {
|
|
552
|
+
return void 0;
|
|
669
553
|
}
|
|
554
|
+
const [handler, _optionsIgnoredSofar] = normalizeHook(hook);
|
|
555
|
+
return async (bundle) => {
|
|
556
|
+
handler.call(null, bundle);
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
function bindingifyPlugin(plugin, options) {
|
|
561
|
+
return {
|
|
562
|
+
name: plugin.name ?? "unknown",
|
|
563
|
+
buildStart: bindingifyBuildStart(options, plugin.buildStart),
|
|
564
|
+
resolveId: bindingifyResolveId(plugin.resolveId),
|
|
565
|
+
buildEnd: bindingifyBuildEnd(plugin.buildEnd),
|
|
566
|
+
transform: bindingifyTransform(plugin.transform),
|
|
567
|
+
load: bindingifyLoad(plugin.load),
|
|
568
|
+
renderChunk: bindingifyRenderChunk(plugin.renderChunk),
|
|
569
|
+
generateBundle: bindingifyGenerateBundle(plugin.generateBundle),
|
|
570
|
+
writeBundle: bindingifyWriteBundle(plugin.writeBundle)
|
|
571
|
+
};
|
|
670
572
|
}
|
|
671
573
|
|
|
672
574
|
function createInputOptionsAdapter(options, inputOptions) {
|
|
673
575
|
return {
|
|
674
576
|
input: normalizeInput(options.input),
|
|
675
577
|
plugins: options.plugins.map(
|
|
676
|
-
(plugin) =>
|
|
578
|
+
(plugin) => (
|
|
579
|
+
// @ts-expect-error
|
|
580
|
+
bindingifyPlugin(plugin, options)
|
|
581
|
+
)
|
|
677
582
|
),
|
|
678
|
-
cwd: process.cwd(),
|
|
583
|
+
cwd: inputOptions.cwd ?? process.cwd(),
|
|
679
584
|
external: inputOptions.external ? options.external : void 0,
|
|
680
585
|
resolve: options.resolve
|
|
681
586
|
};
|
|
@@ -683,7 +588,7 @@ function createInputOptionsAdapter(options, inputOptions) {
|
|
|
683
588
|
function normalizeInput(input) {
|
|
684
589
|
if (Array.isArray(input)) {
|
|
685
590
|
return input.map((src) => {
|
|
686
|
-
const name =
|
|
591
|
+
const name = nodePath__default.parse(src).name;
|
|
687
592
|
return {
|
|
688
593
|
name,
|
|
689
594
|
import: src
|
|
@@ -717,6 +622,15 @@ function normalizeSourcemap(sourcemap) {
|
|
|
717
622
|
throw new Error(`unknown sourcemap: ${sourcemap}`);
|
|
718
623
|
}
|
|
719
624
|
}
|
|
625
|
+
const getAddon = (config, name) => {
|
|
626
|
+
const configAddon = config[name];
|
|
627
|
+
if (configAddon === void 0)
|
|
628
|
+
return void 0;
|
|
629
|
+
if (typeof configAddon === "function") {
|
|
630
|
+
return configAddon;
|
|
631
|
+
}
|
|
632
|
+
return () => configAddon || "";
|
|
633
|
+
};
|
|
720
634
|
function normalizeOutputOptions(opts) {
|
|
721
635
|
const { dir, format, exports, sourcemap } = opts;
|
|
722
636
|
return {
|
|
@@ -724,7 +638,9 @@ function normalizeOutputOptions(opts) {
|
|
|
724
638
|
format: normalizeFormat(format),
|
|
725
639
|
exports,
|
|
726
640
|
sourcemap: normalizeSourcemap(sourcemap),
|
|
727
|
-
plugins: []
|
|
641
|
+
plugins: [],
|
|
642
|
+
banner: getAddon(opts, "banner"),
|
|
643
|
+
footer: getAddon(opts, "footer")
|
|
728
644
|
};
|
|
729
645
|
}
|
|
730
646
|
|
|
@@ -737,13 +653,6 @@ async function createBundler(inputOptions, outputOptions) {
|
|
|
737
653
|
return new Bundler(bindingInputOptions, normalizeOutputOptions(outputOptions));
|
|
738
654
|
}
|
|
739
655
|
|
|
740
|
-
function transformSourcemap(value) {
|
|
741
|
-
if (typeof value === "object") {
|
|
742
|
-
return JSON.stringify(value);
|
|
743
|
-
}
|
|
744
|
-
return value;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
656
|
function arraify(value) {
|
|
748
657
|
return Array.isArray(value) ? value : [value];
|
|
749
658
|
}
|
|
@@ -816,4 +725,4 @@ const experimental_scan = async (input) => {
|
|
|
816
725
|
exports.arraify = arraify;
|
|
817
726
|
exports.experimental_scan = experimental_scan;
|
|
818
727
|
exports.rolldown = rolldown;
|
|
819
|
-
//# sourceMappingURL=rolldown.
|
|
728
|
+
//# sourceMappingURL=rolldown.ee864e8d.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolldown.ee864e8d.cjs","sources":["../../src/utils/async-flatten.ts","../../src/utils/transform-to-rollup-output.ts","../../src/utils/normalize-plugin-option.ts","../../src/utils/ensure-array.ts","../../src/binding.js","../../src/options/input-options.ts","../../src/utils/normalize-hook.ts","../../src/plugin/bindingify-build-hooks.ts","../../src/plugin/bindingify-output-hooks.ts","../../src/plugin/bindingify-plugin.ts","../../src/options/input-options-adapter.ts","../../src/options/output-options.ts","../../src/utils/create-bundler.ts","../../src/utils/index.ts","../../src/rolldown-build.ts","../../src/rolldown.ts"],"sourcesContent":["// Copied from https://github.com/rollup/rollup/blob/3b560f7c889a63968dabc9b6970aabf52a77d3fd/src/utils/asyncFlatten.ts\n\nexport async function asyncFlatten<T>(array: T[]): Promise<T[]> {\n do {\n array = (await Promise.all(array)).flat(Infinity) as any\n } while (array.some((v: any) => v?.then))\n return array\n}\n","import {\n RolldownOutput,\n RolldownOutputAsset,\n RolldownOutputChunk,\n} from '../types/rolldown-output'\nimport { OutputBundle } from '../types/output-bundle'\nimport {\n BindingOutputAsset,\n BindingOutputChunk,\n BindingOutputs,\n} from '../binding'\n\nfunction transformToRollupOutputChunk(\n chunk: BindingOutputChunk,\n): RolldownOutputChunk {\n return {\n type: 'chunk',\n get code() {\n return chunk.code\n },\n fileName: chunk.fileName,\n get modules() {\n return Object.fromEntries(\n Object.entries(chunk.modules).map(([key, _]) => [key, {}]),\n )\n },\n exports: chunk.exports,\n isEntry: chunk.isEntry,\n facadeModuleId: chunk.facadeModuleId || null,\n isDynamicEntry: chunk.isDynamicEntry,\n get moduleIds() {\n return chunk.moduleIds\n },\n get map() {\n return chunk.map ? JSON.parse(chunk.map) : null\n },\n sourcemapFileName: chunk.sourcemapFileName || null,\n }\n}\n\nfunction transformToRollupOutputAsset(\n asset: BindingOutputAsset,\n): RolldownOutputAsset {\n return {\n type: 'asset',\n fileName: asset.fileName,\n get source() {\n return asset.source\n },\n }\n}\n\nexport function transformToRollupOutput(\n output: BindingOutputs,\n): RolldownOutput {\n const { chunks, assets } = output\n const [firstChunk, ...restChunks] = chunks\n return {\n output: [\n transformToRollupOutputChunk(firstChunk),\n ...restChunks.map(transformToRollupOutputChunk),\n ...assets.map(transformToRollupOutputAsset),\n ],\n }\n}\n\nexport function transformToOutputBundle(output: BindingOutputs): OutputBundle {\n return Object.fromEntries(\n transformToRollupOutput(output).output.map((item) => [item.fileName, item]),\n )\n}\n","import type {\n InputOptions,\n OutputOptions,\n Plugin,\n OutputPlugin,\n} from '../rollup-types'\nimport { asyncFlatten } from './async-flatten'\n\nexport const normalizePluginOption: {\n (plugins: InputOptions['plugins']): Promise<Plugin[]>\n (plugins: OutputOptions['plugins']): Promise<OutputPlugin[]>\n (plugins: unknown): Promise<any[]>\n} = async (plugins: any) => (await asyncFlatten([plugins])).filter(Boolean)\n","export function ensureArray<T>(\n items: (T | false | null | undefined)[] | T | false | null | undefined,\n): T[] {\n if (Array.isArray(items)) {\n return items.filter(Boolean) as T[]\n }\n if (items) {\n return [items]\n }\n return []\n}\n","// prettier-ignore\n/* eslint-disable */\n/* auto-generated by NAPI-RS */\n\nconst { readFileSync } = require('fs')\n\nlet nativeBinding = null\nconst loadErrors = []\n\nconst isMusl = () => {\n let musl = false\n if (process.platform === 'linux') {\n musl = isMuslFromFilesystem()\n if (musl === null) {\n musl = isMuslFromReport()\n }\n if (musl === null) {\n musl = isMuslFromChildProcess()\n }\n }\n return musl\n}\n\nconst isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')\n\nconst isMuslFromFilesystem = () => {\n try {\n return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')\n } catch {\n return null\n }\n}\n\nconst isMuslFromReport = () => {\n const report =\n typeof process.report.getReport === 'function'\n ? process.report.getReport()\n : null\n if (!report) {\n return null\n }\n if (report.header && report.header.glibcVersionRuntime) {\n return false\n }\n if (Array.isArray(report.sharedObjects)) {\n if (report.sharedObjects.some(isFileMusl)) {\n return true\n }\n }\n return false\n}\n\nconst isMuslFromChildProcess = () => {\n try {\n return require('child_process')\n .execSync('ldd --version', { encoding: 'utf8' })\n .includes('musl')\n } catch (e) {\n // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false\n return false\n }\n}\n\nfunction requireNative() {\n if (process.platform === 'android') {\n if (process.arch === 'arm64') {\n try {\n return require('./rolldown-binding.android-arm64.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-android-arm64')\n } catch (e) {\n loadErrors.push(e)\n }\n } else if (process.arch === 'arm') {\n try {\n return require('./rolldown-binding.android-arm-eabi.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-android-arm-eabi')\n } catch (e) {\n loadErrors.push(e)\n }\n } else {\n loadErrors.push(\n new Error(`Unsupported architecture on Android ${process.arch}`),\n )\n }\n } else if (process.platform === 'win32') {\n if (process.arch === 'x64') {\n try {\n return require('./rolldown-binding.win32-x64-msvc.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-win32-x64-msvc')\n } catch (e) {\n loadErrors.push(e)\n }\n } else if (process.arch === 'ia32') {\n try {\n return require('./rolldown-binding.win32-ia32-msvc.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-win32-ia32-msvc')\n } catch (e) {\n loadErrors.push(e)\n }\n } else if (process.arch === 'arm64') {\n try {\n return require('./rolldown-binding.win32-arm64-msvc.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-win32-arm64-msvc')\n } catch (e) {\n loadErrors.push(e)\n }\n } else {\n loadErrors.push(\n new Error(`Unsupported architecture on Windows: ${process.arch}`),\n )\n }\n } else if (process.platform === 'darwin') {\n try {\n return require('./rolldown-binding.darwin-universal.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-darwin-universal')\n } catch (e) {\n loadErrors.push(e)\n }\n\n if (process.arch === 'x64') {\n try {\n return require('./rolldown-binding.darwin-x64.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-darwin-x64')\n } catch (e) {\n loadErrors.push(e)\n }\n } else if (process.arch === 'arm64') {\n try {\n return require('./rolldown-binding.darwin-arm64.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-darwin-arm64')\n } catch (e) {\n loadErrors.push(e)\n }\n } else {\n loadErrors.push(\n new Error(`Unsupported architecture on macOS: ${process.arch}`),\n )\n }\n } else if (process.platform === 'freebsd') {\n if (process.arch === 'x64') {\n try {\n return require('./rolldown-binding.freebsd-x64.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-freebsd-x64')\n } catch (e) {\n loadErrors.push(e)\n }\n } else if (process.arch === 'arm64') {\n try {\n return require('./rolldown-binding.freebsd-arm64.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-freebsd-arm64')\n } catch (e) {\n loadErrors.push(e)\n }\n } else {\n loadErrors.push(\n new Error(`Unsupported architecture on FreeBSD: ${process.arch}`),\n )\n }\n } else if (process.platform === 'linux') {\n if (process.arch === 'x64') {\n if (isMusl()) {\n try {\n return require('./rolldown-binding.linux-x64-musl.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-linux-x64-musl')\n } catch (e) {\n loadErrors.push(e)\n }\n } else {\n try {\n return require('./rolldown-binding.linux-x64-gnu.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-linux-x64-gnu')\n } catch (e) {\n loadErrors.push(e)\n }\n }\n } else if (process.arch === 'arm64') {\n if (isMusl()) {\n try {\n return require('./rolldown-binding.linux-arm64-musl.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-linux-arm64-musl')\n } catch (e) {\n loadErrors.push(e)\n }\n } else {\n try {\n return require('./rolldown-binding.linux-arm64-gnu.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-linux-arm64-gnu')\n } catch (e) {\n loadErrors.push(e)\n }\n }\n } else if (process.arch === 'arm') {\n try {\n return require('./rolldown-binding.linux-arm-gnueabihf.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-linux-arm-gnueabihf')\n } catch (e) {\n loadErrors.push(e)\n }\n } else if (process.arch === 'riscv64') {\n if (isMusl()) {\n try {\n return require('./rolldown-binding.linux-riscv64-musl.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-linux-riscv64-musl')\n } catch (e) {\n loadErrors.push(e)\n }\n } else {\n try {\n return require('./rolldown-binding.linux-riscv64-gnu.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-linux-riscv64-gnu')\n } catch (e) {\n loadErrors.push(e)\n }\n }\n } else if (process.arch === 's390x') {\n try {\n return require('./rolldown-binding.linux-s390x-gnu.node')\n } catch (e) {\n loadErrors.push(e)\n }\n try {\n return require('@rolldown/binding-linux-s390x-gnu')\n } catch (e) {\n loadErrors.push(e)\n }\n } else {\n loadErrors.push(\n new Error(`Unsupported architecture on Linux: ${process.arch}`),\n )\n }\n } else {\n loadErrors.push(\n new Error(\n `Unsupported OS: ${process.platform}, architecture: ${process.arch}`,\n ),\n )\n }\n}\n\nnativeBinding = requireNative()\n\nif (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {\n try {\n nativeBinding = require('./rolldown-binding.wasi.cjs')\n } catch (err) {\n if (process.env.NAPI_RS_FORCE_WASI) {\n console.error(err)\n }\n }\n if (!nativeBinding) {\n try {\n nativeBinding = require('@rolldown/binding-wasm32-wasi')\n } catch (err) {\n if (process.env.NAPI_RS_FORCE_WASI) {\n console.error(err)\n }\n }\n }\n}\n\nif (!nativeBinding) {\n if (loadErrors.length > 0) {\n // TODO Link to documentation with potential fixes\n // - The package owner could build/publish bindings for this arch\n // - The user may need to bundle the correct files\n // - The user may need to re-install node_modules to get new packages\n throw new Error('Failed to load native binding', { cause: loadErrors })\n }\n throw new Error(`Failed to load native binding`)\n}\n\nmodule.exports.BindingOutputAsset = nativeBinding.BindingOutputAsset\nmodule.exports.BindingOutputChunk = nativeBinding.BindingOutputChunk\nmodule.exports.BindingOutputs = nativeBinding.BindingOutputs\nmodule.exports.BindingPluginContext = nativeBinding.BindingPluginContext\nmodule.exports.Bundler = nativeBinding.Bundler\n","import {\n NormalizedInputOptions,\n InputOptions as RollupInputOptions,\n} from '../rollup-types'\nimport { ensureArray, normalizePluginOption } from '../utils'\nimport { BindingResolveOptions } from '../binding'\nimport { Plugin } from '../plugin'\n\n// TODO export compat plugin type\nexport interface InputOptions {\n input?: RollupInputOptions['input']\n plugins?: Plugin[]\n external?: RollupInputOptions['external']\n resolve?: RolldownResolveOptions\n cwd?: string\n}\n\nexport type RolldownResolveOptions = Omit<BindingResolveOptions, 'alias'> & {\n alias?: Record<string, string>\n}\n\nexport type RolldownNormalizedInputOptions = NormalizedInputOptions & {\n resolve?: BindingResolveOptions\n}\n\nexport async function normalizeInputOptions(\n config: InputOptions,\n): Promise<RolldownNormalizedInputOptions> {\n // @ts-expect-error\n return {\n input: getInput(config),\n plugins: await normalizePluginOption(config.plugins),\n external: getIdMatcher(config.external),\n resolve: getResolve(config.resolve),\n }\n}\n\nfunction getInput(config: InputOptions): NormalizedInputOptions['input'] {\n const configInput = config.input\n return configInput == null\n ? []\n : typeof configInput === 'string'\n ? [configInput]\n : configInput\n}\n\nconst getIdMatcher = <T extends Array<any>>(\n option:\n | undefined\n // | boolean\n | string\n | RegExp\n | (string | RegExp)[]\n | ((id: string, ...parameters: T) => boolean | null | void),\n): ((id: string, ...parameters: T) => boolean) => {\n // if (option === true) {\n // \treturn () => true;\n // }\n if (typeof option === 'function') {\n return (id, ...parameters) =>\n (!id.startsWith('\\0') && option(id, ...parameters)) || false\n }\n if (option) {\n const ids = new Set<string>()\n const matchers: RegExp[] = []\n for (const value of ensureArray(option)) {\n if (value instanceof RegExp) {\n matchers.push(value)\n } else {\n ids.add(value)\n }\n }\n return (id: string, ..._arguments) =>\n ids.has(id) || matchers.some((matcher) => matcher.test(id))\n }\n // Rollup here convert `undefined` to function, it is bad for performance. So it will convert to `undefined` at adapter.\n return () => false\n}\n\nfunction getResolve(\n resolve?: RolldownResolveOptions,\n): RolldownNormalizedInputOptions['resolve'] {\n if (resolve) {\n return {\n ...resolve,\n alias: resolve.alias\n ? Object.fromEntries(\n Object.entries(resolve.alias).map(([key, value]) => [key, [value]]),\n )\n : undefined,\n }\n }\n}\n","import type { Hook } from '../plugin'\nimport type { AnyFn, AnyObj } from '../types/utils'\n\ntype NotFn<T> = T extends AnyFn ? never : T\n\nexport function normalizeHook<H extends Hook<AnyFn, AnyObj>>(\n hook: H,\n): H extends Hook<infer Handler, infer Options>\n ? [Handler, NotFn<Options>]\n : never {\n if (typeof hook === 'function') {\n // @ts-expect-error\n return [hook, {}]\n }\n const { handler, ...options } = hook\n\n // @ts-expect-error\n return [handler, options]\n}\n","import { normalizeHook } from '../utils/normalize-hook'\nimport type { BindingPluginOptions } from '../binding'\n\nimport type { Plugin } from './index'\nimport { RolldownNormalizedInputOptions } from '../options/input-options'\n\nexport function bindingifyBuildStart(\n options: RolldownNormalizedInputOptions,\n hook?: Plugin['buildStart'],\n): BindingPluginOptions['buildStart'] {\n if (!hook) {\n return undefined\n }\n const [handler, _optionsIgnoredSofar] = normalizeHook(hook)\n\n return async (ctx) => {\n handler.call(ctx, options)\n }\n}\n\nexport function bindingifyBuildEnd(\n hook?: Plugin['buildEnd'],\n): BindingPluginOptions['buildEnd'] {\n if (!hook) {\n return undefined\n }\n const [handler, _optionsIgnoredSofar] = normalizeHook(hook)\n\n return async (err) => {\n try {\n handler.call(null, err ?? undefined)\n } catch (error) {\n console.error(error)\n }\n }\n}\n\nexport function bindingifyResolveId(\n hook?: Plugin['resolveId'],\n): BindingPluginOptions['resolveId'] {\n if (!hook) {\n return undefined\n }\n const [handler, _optionsIgnoredSofar] = normalizeHook(hook)\n\n return async (specifier, importer, options) => {\n const ret = await handler.call(\n null,\n specifier,\n importer ?? undefined,\n options,\n )\n if (ret == false || ret == null) {\n return\n }\n if (typeof ret === 'string') {\n return {\n id: ret,\n }\n }\n return ret\n }\n}\n\nexport function bindingifyTransform(\n hook?: Plugin['transform'],\n): BindingPluginOptions['transform'] {\n if (!hook) {\n return undefined\n }\n const [handler, _optionsIgnoredSofar] = normalizeHook(hook)\n\n return async (code, id) => {\n const ret = await handler.call(null, code, id)\n\n if (ret == null) {\n return\n }\n\n const retCode = typeof ret === 'string' ? ret : ret.code\n const retMap = typeof ret === 'string' ? undefined : ret.map\n\n return {\n code: retCode,\n map: retMap ?? undefined,\n }\n }\n}\n\nexport function bindingifyLoad(\n hook?: Plugin['load'],\n): BindingPluginOptions['load'] {\n if (!hook) {\n return undefined\n }\n const [handler, _optionsIgnoredSofar] = normalizeHook(hook)\n\n return async (id) => {\n const ret = await handler.call(null, id)\n\n if (ret == null) {\n return\n }\n\n const retCode = typeof ret === 'string' ? ret : ret.code\n const retMap = typeof ret === 'string' ? undefined : ret.map\n\n return {\n code: retCode,\n map: retMap ?? undefined,\n }\n }\n}\n\nexport function bindingifyRenderChunk(\n hook?: Plugin['renderChunk'],\n): BindingPluginOptions['renderChunk'] {\n if (!hook) {\n return undefined\n }\n const [handler, _optionsIgnoredSofar] = normalizeHook(hook)\n\n return async (code, chunk) => {\n const ret = await handler.call(null, code, chunk)\n\n if (ret == null) {\n return\n }\n\n return {\n code: ret,\n }\n }\n}\n","import { normalizeHook } from '../utils/normalize-hook'\nimport type { BindingPluginOptions } from '../binding'\n\nimport type { Plugin } from './index'\n\nexport function bindingifyGenerateBundle(\n hook?: Plugin['generateBundle'],\n): BindingPluginOptions['generateBundle'] {\n if (!hook) {\n return undefined\n }\n const [handler, _optionsIgnoredSofar] = normalizeHook(hook)\n\n return async (bundle, isWrite) => {\n handler.call(null, bundle, isWrite)\n }\n}\nexport function bindingifyWriteBundle(\n hook?: Plugin['writeBundle'],\n): BindingPluginOptions['writeBundle'] {\n if (!hook) {\n return undefined\n }\n const [handler, _optionsIgnoredSofar] = normalizeHook(hook)\n\n return async (bundle) => {\n handler.call(null, bundle)\n }\n}\n","import type { BindingPluginOptions } from '../binding'\nimport {\n bindingifyBuildEnd,\n bindingifyBuildStart,\n bindingifyLoad,\n bindingifyRenderChunk,\n bindingifyResolveId,\n bindingifyTransform,\n} from './bindingify-build-hooks'\n\nimport {\n bindingifyGenerateBundle,\n bindingifyWriteBundle,\n} from './bindingify-output-hooks'\n\nimport type { Plugin } from './index'\nimport { RolldownNormalizedInputOptions } from '../options/input-options'\n\n// Note: because napi not catch error, so we need to catch error and print error to debugger in adapter.\nexport function bindingifyPlugin(\n plugin: Plugin,\n options: RolldownNormalizedInputOptions,\n): BindingPluginOptions {\n return {\n name: plugin.name ?? 'unknown',\n buildStart: bindingifyBuildStart(options, plugin.buildStart),\n resolveId: bindingifyResolveId(plugin.resolveId),\n buildEnd: bindingifyBuildEnd(plugin.buildEnd),\n transform: bindingifyTransform(plugin.transform),\n load: bindingifyLoad(plugin.load),\n renderChunk: bindingifyRenderChunk(plugin.renderChunk),\n generateBundle: bindingifyGenerateBundle(plugin.generateBundle),\n writeBundle: bindingifyWriteBundle(plugin.writeBundle),\n }\n}\n","import { NormalizedInputOptions } from '../rollup-types'\nimport { BindingInputOptions } from '../binding'\nimport nodePath from 'node:path'\nimport { bindingifyPlugin } from '../plugin/bindingify-plugin'\nimport { InputOptions, RolldownNormalizedInputOptions } from './input-options'\n\nexport function createInputOptionsAdapter(\n options: RolldownNormalizedInputOptions,\n inputOptions: InputOptions,\n): BindingInputOptions {\n return {\n input: normalizeInput(options.input),\n plugins: options.plugins.map((plugin) =>\n // @ts-expect-error\n bindingifyPlugin(plugin, options),\n ),\n cwd: inputOptions.cwd ?? process.cwd(),\n external: inputOptions.external ? options.external : undefined,\n resolve: options.resolve,\n }\n}\n\nfunction normalizeInput(\n input: NormalizedInputOptions['input'],\n): BindingInputOptions['input'] {\n if (Array.isArray(input)) {\n return input.map((src) => {\n const name = nodePath.parse(src).name\n return {\n name,\n import: src,\n }\n })\n } else {\n return Object.entries(input).map((value) => {\n return { name: value[0], import: value[1] }\n })\n }\n}\n","import { OutputOptions as RollupOutputOptions } from '../rollup-types'\nimport { BindingOutputOptions } from '../binding'\nimport { unimplemented } from '../utils'\n\nexport interface OutputOptions {\n dir?: RollupOutputOptions['dir']\n format?: 'es'\n exports?: RollupOutputOptions['exports']\n sourcemap?: RollupOutputOptions['sourcemap']\n banner?: RollupOutputOptions['banner']\n footer?: RollupOutputOptions['footer']\n}\n\nfunction normalizeFormat(\n format: OutputOptions['format'],\n): BindingOutputOptions['format'] {\n if (format == null || format === 'es' || format === 'cjs') {\n return format\n } else {\n return unimplemented(`output.format: ${format}`)\n }\n}\n\nfunction normalizeSourcemap(\n sourcemap: OutputOptions['sourcemap'],\n): BindingOutputOptions['sourcemap'] {\n switch (sourcemap) {\n case true:\n return 'file'\n\n case 'inline':\n return 'inline'\n\n case false:\n case undefined:\n case 'hidden':\n return 'hidden'\n\n default:\n throw new Error(`unknown sourcemap: ${sourcemap}`)\n }\n}\n\nconst getAddon = <T extends 'banner' | 'footer'>(\n config: OutputOptions,\n name: T,\n): BindingOutputOptions[T] => {\n const configAddon = config[name]\n if (configAddon === undefined) return undefined\n if (typeof configAddon === 'function') {\n return configAddon as BindingOutputOptions[T]\n }\n return () => configAddon || ''\n}\n\nexport function normalizeOutputOptions(\n opts: OutputOptions,\n): BindingOutputOptions {\n const { dir, format, exports, sourcemap } = opts\n return {\n dir: dir,\n format: normalizeFormat(format),\n exports,\n sourcemap: normalizeSourcemap(sourcemap),\n plugins: [],\n banner: getAddon(opts, 'banner'),\n footer: getAddon(opts, 'footer'),\n }\n}\n","import { Bundler } from '../binding'\nimport {\n normalizeInputOptions,\n type InputOptions,\n} from '../options/input-options'\nimport { createInputOptionsAdapter } from '../options/input-options-adapter'\nimport {\n OutputOptions,\n normalizeOutputOptions,\n} from '../options/output-options'\n\nexport async function createBundler(\n inputOptions: InputOptions,\n outputOptions: OutputOptions,\n): Promise<Bundler> {\n // Convert `InputOptions` to `NormalizedInputOptions`.\n const normalizedInputOptions = await normalizeInputOptions(inputOptions)\n // Convert `NormalizedInputOptions` to `BindingInputOptions`\n const bindingInputOptions = createInputOptionsAdapter(\n normalizedInputOptions,\n inputOptions,\n )\n return new Bundler(bindingInputOptions, normalizeOutputOptions(outputOptions))\n}\n","export * from './async-flatten'\nexport * from './transform-to-rollup-output'\nexport * from './normalize-plugin-option'\nexport * from './ensure-array'\nexport * from './create-bundler'\nexport * from './transform-sourcemap'\n\nexport function arraify<T>(value: T | T[]): T[] {\n return Array.isArray(value) ? value : [value]\n}\n\nexport function unimplemented(info?: string): never {\n if (info) {\n throw new Error(`unimplemented: ${info}`)\n }\n throw new Error('unimplemented')\n}\n\nexport function unreachable(info?: string): never {\n if (info) {\n throw new Error(`unreachable: ${info}`)\n }\n throw new Error('unreachable')\n}\n\nexport function noop(..._args: any[]) {}\n","import { Bundler } from './binding'\nimport { normalizeOutputOptions, OutputOptions } from './options/output-options'\nimport { createBundler, transformToRollupOutput, unimplemented } from './utils'\nimport { RolldownOutput } from './types/rolldown-output'\nimport { HasProperty, TypeAssert } from './utils/type-assert'\nimport { InputOptions } from './options/input-options'\n\nexport class RolldownBuild {\n #inputOptions: InputOptions\n #bundler?: Bundler\n\n constructor(inputOptions: InputOptions) {\n // TODO: Check if `inputOptions.output` is set. If so, throw an warning that it is ignored.\n this.#inputOptions = inputOptions\n }\n\n async #getBundler(outputOptions: OutputOptions): Promise<Bundler> {\n if (typeof this.#bundler === 'undefined') {\n this.#bundler = await createBundler(this.#inputOptions, outputOptions)\n }\n return this.#bundler\n }\n\n async generate(outputOptions: OutputOptions = {}): Promise<RolldownOutput> {\n const bundler = await this.#getBundler(outputOptions)\n const output = await bundler.generate()\n return transformToRollupOutput(output)\n }\n\n async write(outputOptions: OutputOptions = {}): Promise<RolldownOutput> {\n const bundler = await this.#getBundler(outputOptions)\n const output = await bundler.write()\n return transformToRollupOutput(output)\n }\n}\n\nfunction _assert() {\n type _ = TypeAssert<HasProperty<RolldownBuild, 'generate' | 'write'>>\n}\n","import { InputOptions } from './options/input-options'\nimport { RolldownBuild } from './rolldown-build'\nimport { createBundler } from './utils'\n\n// Compat to `rollup.rollup`, it is included scan module graph and linker.\nexport const rolldown = async (input: InputOptions): Promise<RolldownBuild> => {\n return new RolldownBuild(input)\n}\n\n/**\n * @description\n * This is an experimental API. It's behavior may change in the future.\n * Calling this API will only execute the scan stage of rolldown.\n */\nexport const experimental_scan = async (input: InputOptions): Promise<void> => {\n const bundler = await createBundler(input, {})\n await bundler.scan()\n}\n"],"names":["require$$0","nodePath"],"mappings":";;;;;;;;;;AAEA,eAAsB,aAAgB,KAA0B,EAAA;AAC9D,EAAG,GAAA;AACD,IAAA,KAAA,GAAA,CAAS,MAAM,OAAQ,CAAA,GAAA,CAAI,KAAK,CAAA,EAAG,KAAK,QAAQ,CAAA,CAAA;AAAA,WACzC,KAAM,CAAA,IAAA,CAAK,CAAC,CAAA,KAAW,GAAG,IAAI,CAAA,EAAA;AACvC,EAAO,OAAA,KAAA,CAAA;AACT;;ACKA,SAAS,6BACP,KACqB,EAAA;AACrB,EAAO,OAAA;AAAA,IACL,IAAM,EAAA,OAAA;AAAA,IACN,IAAI,IAAO,GAAA;AACT,MAAA,OAAO,KAAM,CAAA,IAAA,CAAA;AAAA,KACf;AAAA,IACA,UAAU,KAAM,CAAA,QAAA;AAAA,IAChB,IAAI,OAAU,GAAA;AACZ,MAAA,OAAO,MAAO,CAAA,WAAA;AAAA,QACZ,MAAO,CAAA,OAAA,CAAQ,KAAM,CAAA,OAAO,EAAE,GAAI,CAAA,CAAC,CAAC,GAAA,EAAK,CAAC,CAAM,KAAA,CAAC,GAAK,EAAA,EAAE,CAAC,CAAA;AAAA,OAC3D,CAAA;AAAA,KACF;AAAA,IACA,SAAS,KAAM,CAAA,OAAA;AAAA,IACf,SAAS,KAAM,CAAA,OAAA;AAAA,IACf,cAAA,EAAgB,MAAM,cAAkB,IAAA,IAAA;AAAA,IACxC,gBAAgB,KAAM,CAAA,cAAA;AAAA,IACtB,IAAI,SAAY,GAAA;AACd,MAAA,OAAO,KAAM,CAAA,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