@rolldown/browser 1.0.0-beta.53 → 1.0.0-beta.55
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.mjs +20 -20
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +7 -7
- package/dist/{constructors-YnYYKXAq.js → constructors-DoEj0CTZ.js} +8 -3
- package/dist/experimental-index.browser.mjs +16 -8
- package/dist/experimental-index.d.mts +17 -11
- package/dist/experimental-index.mjs +14 -10
- package/dist/filter-index.d.mts +1 -1
- package/dist/filter-index.mjs +2 -2
- package/dist/get-log-filter.d.mts +7 -0
- package/dist/get-log-filter.mjs +48 -0
- package/dist/index.browser.mjs +2 -2
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +7 -7
- package/dist/{normalize-string-or-regex-BVvsez4S.js → normalize-string-or-regex-dwgRHUz6.js} +4 -2
- package/dist/parallel-plugin-worker.mjs +3 -3
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/plugins-index.browser.mjs +2 -2
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +2 -2
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-DdLgyfGg.js → rolldown-build-7uuCodq1.js} +51 -23
- package/dist/shared/{binding-CY7Z709f.d.mts → binding-r9j8jqRV.d.mts} +65 -19
- package/dist/shared/{bindingify-input-options-DcGFRvkp.mjs → bindingify-input-options-nvXYfbt3.mjs} +36 -17
- package/dist/shared/{constructors-S9gqtBdT.d.mts → constructors-G-fr57ib.d.mts} +6 -6
- package/dist/shared/{constructors-Bi2whoYR.mjs → constructors-oU7W7sz4.mjs} +8 -3
- package/dist/shared/{define-config-CPSppdHs.d.mts → define-config-Bwwa5Tc_.d.mts} +31 -7
- package/dist/shared/{load-config-B09j7Dnd.mjs → load-config-DumfiMa-.mjs} +1 -1
- package/dist/shared/logging-BpAvp7KV.d.mts +37 -0
- package/dist/shared/{normalize-string-or-regex-Bsz_9HAl.mjs → normalize-string-or-regex-FzNsMab1.mjs} +6 -4
- package/dist/shared/{parse-ast-index-BOAjpcDq.mjs → parse-ast-index-BZ4FJxMm.mjs} +2 -2
- package/dist/shared/{rolldown-vJGs7rCs.mjs → rolldown-CTRsCETA.mjs} +1 -1
- package/dist/shared/{rolldown-build-CyazSAHY.mjs → rolldown-build-D8oOi181.mjs} +22 -13
- package/dist/shared/utils-CMDrspre.d.mts +29 -0
- package/dist/shared/{watch-Abdexkk9.mjs → watch-DDjo8C9u.mjs} +18 -6
- package/package.json +1 -1
- package/dist/shared/utils-m9n-gTFq.d.mts +0 -62
- /package/dist/shared/{composable-filters-DZ5ToxRJ.mjs → composable-filters-G1eqjHFo.mjs} +0 -0
- /package/dist/shared/{define-config-DfeZGBEt.mjs → define-config-BF4P-Pum.mjs} +0 -0
- /package/dist/shared/{logs-CPsamAuj.mjs → logs-By66Jt-E.mjs} +0 -0
- /package/dist/shared/{misc-5GYLGQ20.mjs → misc-BubmxcE3.mjs} +0 -0
- /package/dist/shared/{prompt-pmGBC3ws.mjs → prompt-CNt8OM9C.mjs} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { A as BindingWatcherBundler, B as ParserOptions, F as JsxOptions, I as MinifyOptions$1, M as ExternalMemoryStatus, V as PreRenderedChunk, W as TransformOptions$1, a as BindingHookResolveIdExtraArgs, d as BindingTransformHookExtraArgs, j as BindingWatcherEvent, l as BindingRenderedChunk, s as BindingMagicString } from "./binding-
|
|
1
|
+
import { a as RollupLog, i as RollupError, n as LogLevelOption, o as RollupLogWithString, r as LogOrStringHandler, t as LogLevel } from "./logging-BpAvp7KV.mjs";
|
|
2
|
+
import { A as BindingWatcherBundler, B as ParserOptions, F as JsxOptions, I as MinifyOptions$1, M as ExternalMemoryStatus, V as PreRenderedChunk, W as TransformOptions$1, a as BindingHookResolveIdExtraArgs, d as BindingTransformHookExtraArgs, j as BindingWatcherEvent, l as BindingRenderedChunk, s as BindingMagicString } from "./binding-r9j8jqRV.mjs";
|
|
3
|
+
import { a as MakeAsync, c as NullValue, l as PartialNull, n as LoggingFunction, o as MaybeArray, r as LoggingFunctionWithPosition, s as MaybePromise, t as BuiltinPlugin, u as StringOrRegExp } from "./utils-CMDrspre.mjs";
|
|
3
4
|
import { Program } from "@oxc-project/types";
|
|
4
5
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
5
6
|
|
|
@@ -256,6 +257,14 @@ interface OutputOptions {
|
|
|
256
257
|
sourcemapPathTransform?: SourcemapPathTransformOption;
|
|
257
258
|
banner?: string | AddonFunction;
|
|
258
259
|
footer?: string | AddonFunction;
|
|
260
|
+
/**
|
|
261
|
+
* Similar to `banner` option, but will run after the `renderChunk` hook and builtin minification.
|
|
262
|
+
*/
|
|
263
|
+
postBanner?: string | AddonFunction;
|
|
264
|
+
/**
|
|
265
|
+
* Similar to `footer` option, but will run after the `renderChunk` hook and builtin minification.
|
|
266
|
+
*/
|
|
267
|
+
postFooter?: string | AddonFunction;
|
|
259
268
|
intro?: string | AddonFunction;
|
|
260
269
|
outro?: string | AddonFunction;
|
|
261
270
|
extend?: boolean;
|
|
@@ -669,7 +678,7 @@ declare const watch: (input: WatchOptions | WatchOptions[]) => RolldownWatcher;
|
|
|
669
678
|
//#region src/options/normalized-input-options.d.ts
|
|
670
679
|
interface NormalizedInputOptions {
|
|
671
680
|
input: string[] | Record<string, string>;
|
|
672
|
-
cwd: string
|
|
681
|
+
cwd: string;
|
|
673
682
|
platform: InputOptions["platform"];
|
|
674
683
|
shimMissingExports: boolean;
|
|
675
684
|
context: string;
|
|
@@ -695,6 +704,8 @@ interface NormalizedOutputOptions {
|
|
|
695
704
|
externalLiveBindings: boolean;
|
|
696
705
|
banner: AddonFunction;
|
|
697
706
|
footer: AddonFunction;
|
|
707
|
+
postBanner: AddonFunction;
|
|
708
|
+
postFooter: AddonFunction;
|
|
698
709
|
intro: AddonFunction;
|
|
699
710
|
outro: AddonFunction;
|
|
700
711
|
esModule: boolean | "if-default-prop";
|
|
@@ -867,7 +878,15 @@ interface EmittedChunk {
|
|
|
867
878
|
id: string;
|
|
868
879
|
importer?: string;
|
|
869
880
|
}
|
|
870
|
-
|
|
881
|
+
interface EmittedPrebuiltChunk {
|
|
882
|
+
type: "prebuilt-chunk";
|
|
883
|
+
fileName: string;
|
|
884
|
+
code: string;
|
|
885
|
+
exports?: string[];
|
|
886
|
+
map?: SourceMap;
|
|
887
|
+
sourcemapFileName?: string;
|
|
888
|
+
}
|
|
889
|
+
type EmittedFile = EmittedAsset | EmittedChunk | EmittedPrebuiltChunk;
|
|
871
890
|
interface PluginContextResolveOptions {
|
|
872
891
|
isEntry?: boolean;
|
|
873
892
|
skipSelf?: boolean;
|
|
@@ -1174,6 +1193,11 @@ interface ChecksOptions {
|
|
|
1174
1193
|
* @default true
|
|
1175
1194
|
*/
|
|
1176
1195
|
couldNotCleanDirectory?: boolean;
|
|
1196
|
+
/**
|
|
1197
|
+
* Whether to emit warning when detecting plugin timings
|
|
1198
|
+
* @default true
|
|
1199
|
+
*/
|
|
1200
|
+
pluginTimings?: boolean;
|
|
1177
1201
|
}
|
|
1178
1202
|
//#endregion
|
|
1179
1203
|
//#region src/options/transform-options.d.ts
|
|
@@ -1300,7 +1324,7 @@ interface WatcherOptions {
|
|
|
1300
1324
|
clearScreen?: boolean;
|
|
1301
1325
|
}
|
|
1302
1326
|
type MakeAbsoluteExternalsRelative = boolean | "ifRelativeSource";
|
|
1303
|
-
type
|
|
1327
|
+
type DevModeOptions = boolean | {
|
|
1304
1328
|
host?: string;
|
|
1305
1329
|
port?: number;
|
|
1306
1330
|
implement?: string;
|
|
@@ -1426,7 +1450,7 @@ interface InputOptions {
|
|
|
1426
1450
|
disableLiveBindings?: boolean;
|
|
1427
1451
|
viteMode?: boolean;
|
|
1428
1452
|
resolveNewUrlToAsset?: boolean;
|
|
1429
|
-
|
|
1453
|
+
devMode?: DevModeOptions;
|
|
1430
1454
|
/**
|
|
1431
1455
|
* Control which order should use when rendering modules in chunk
|
|
1432
1456
|
*
|
|
@@ -1618,4 +1642,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
|
1618
1642
|
declare function defineConfig(config: RolldownOptionsFunction): RolldownOptionsFunction;
|
|
1619
1643
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
1620
1644
|
//#endregion
|
|
1621
|
-
export {
|
|
1645
|
+
export { InternalModuleFormat as $, VERSION as A, GetModuleInfo as B, ResolveIdResult as C, RenderedModule as Ct, SourceDescription as D, ModuleInfo as Dt, RolldownPluginOption as E, freeExternalMemory as Et, TreeshakingOptions as F, PluginContextMeta as G, DefineParallelPluginResult as H, TransformPluginContext as I, ModuleTypeFilter as J, GeneralHookFilter as K, EmittedAsset as L, SourceMapInput as M, RolldownOptionsFunction as N, TransformResult as O, SourcemapIgnoreListOption as Ot, OutputBundle as P, RolldownFsModule as Q, EmittedFile as R, ResolveIdExtraOptions as S, RenderedChunk as St, RolldownPlugin as T, SourceMap as Tt, defineParallelPlugin as U, PluginContext as V, MinimalPluginContext as W, RolldownDirectoryEntry as X, BufferEncoding as Y, RolldownFileStats as Z, ModuleType as _, ModuleFormat as _t, InputOption as a, WatchOptions as at, PartialResolvedId as b, OutputAsset as bt, OptimizationOptions as c, BuildOptions as ct, CustomPluginOptions as d, ChunkFileNamesFunction as dt, NormalizedOutputOptions as et, FunctionPluginHooks as f, ChunkingContext as ft, ModuleOptions as g, MinifyOptions as gt, LoadResult as h, GlobalsFunction as ht, ExternalOption as i, RolldownWatcherEvent as it, ExistingRawSourceMap as j, withFilter as k, WatcherOptions as l, build as lt, ImportKind as m, GeneratedCodePreset as mt, ConfigExport as n, watch as nt, InputOptions as o, rolldown as ot, HookFilterExtension as p, GeneratedCodeOptions as pt, HookFilter as q, RolldownOptions as r, RolldownWatcher as rt, ModuleTypes as s, RolldownBuild as st, defineConfig as t, NormalizedInputOptions as tt, AsyncPluginHooks as u, AddonFunction as ut, ObjectHook as v, OutputOptions as vt, ResolvedId as w, RolldownOutput as wt, Plugin as x, OutputChunk as xt, ParallelPluginHooks as y, PreRenderedAsset as yt, EmittedPrebuiltChunk as z };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/log/logging.d.ts
|
|
2
|
+
type LogLevel = "info" | "debug" | "warn";
|
|
3
|
+
type LogLevelOption = LogLevel | "silent";
|
|
4
|
+
type LogLevelWithError = LogLevel | "error";
|
|
5
|
+
interface RollupLog {
|
|
6
|
+
binding?: string;
|
|
7
|
+
cause?: unknown;
|
|
8
|
+
code?: string;
|
|
9
|
+
exporter?: string;
|
|
10
|
+
frame?: string;
|
|
11
|
+
hook?: string;
|
|
12
|
+
id?: string;
|
|
13
|
+
ids?: string[];
|
|
14
|
+
loc?: {
|
|
15
|
+
column: number;
|
|
16
|
+
file?: string;
|
|
17
|
+
line: number;
|
|
18
|
+
};
|
|
19
|
+
message: string;
|
|
20
|
+
meta?: any;
|
|
21
|
+
names?: string[];
|
|
22
|
+
plugin?: string;
|
|
23
|
+
pluginCode?: unknown;
|
|
24
|
+
pos?: number;
|
|
25
|
+
reexporter?: string;
|
|
26
|
+
stack?: string;
|
|
27
|
+
url?: string;
|
|
28
|
+
}
|
|
29
|
+
type RollupLogWithString = RollupLog | string;
|
|
30
|
+
interface RollupError extends RollupLog {
|
|
31
|
+
name?: string;
|
|
32
|
+
stack?: string;
|
|
33
|
+
watchFiles?: string[];
|
|
34
|
+
}
|
|
35
|
+
type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { RollupLog as a, RollupError as i, LogLevelOption as n, RollupLogWithString as o, LogOrStringHandler as r, LogLevel as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as logInvalidLogPosition, c as logPluginError, n as error } from "./logs-
|
|
2
|
-
import { r as noop } from "./misc-
|
|
1
|
+
import { a as logInvalidLogPosition, c as logPluginError, n as error } from "./logs-By66Jt-E.mjs";
|
|
2
|
+
import { r as noop } from "./misc-BubmxcE3.mjs";
|
|
3
3
|
import { BindingCallableBuiltinPlugin } from "../rolldown-binding.wasi.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/log/logging.ts
|
|
@@ -32,7 +32,7 @@ function getLogHandler(level, code, logger, pluginName, logLevel) {
|
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region package.json
|
|
35
|
-
var version = "1.0.0-beta.
|
|
35
|
+
var version = "1.0.0-beta.55";
|
|
36
36
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
37
37
|
|
|
38
38
|
//#endregion
|
|
@@ -190,7 +190,7 @@ function bindingAssetSource(source) {
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
//#endregion
|
|
193
|
-
//#region \0@oxc-project+runtime@0.
|
|
193
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/decorate.js
|
|
194
194
|
function __decorate(decorators, target, key, desc) {
|
|
195
195
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
196
196
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -557,6 +557,8 @@ function collectChangedBundle(changed, bundle) {
|
|
|
557
557
|
//#endregion
|
|
558
558
|
//#region src/builtin-plugin/utils.ts
|
|
559
559
|
var BuiltinPlugin = class {
|
|
560
|
+
/** Vite-specific option to control plugin ordering */
|
|
561
|
+
enforce;
|
|
560
562
|
constructor(name, _options) {
|
|
561
563
|
this.name = name;
|
|
562
564
|
this._options = _options;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { l as locate, n as error, s as logParseError, u as getCodeFrame } from "./logs-
|
|
1
|
+
import { l as locate, n as error, s as logParseError, u as getCodeFrame } from "./logs-By66Jt-E.mjs";
|
|
2
2
|
import { parse, parseSync } from "../rolldown-binding.wasi.cjs";
|
|
3
3
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
4
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.103.0/node_modules/oxc-parser/src-js/wrap.js
|
|
5
5
|
function wrap$1(result) {
|
|
6
6
|
let program, module, comments, errors;
|
|
7
7
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-
|
|
1
|
+
import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-D8oOi181.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/api/rolldown/index.ts
|
|
4
4
|
const rolldown = async (input) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as logInputHookInOutputPlugin, n as error } from "./logs-
|
|
2
|
-
import { i as unimplemented } from "./misc-
|
|
3
|
-
import { C as LOG_LEVEL_DEBUG, D as logLevelPriority, E as LOG_LEVEL_WARN, S as normalizeLog, T as LOG_LEVEL_INFO, _ as PlainObjectLike, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, n as BuiltinPlugin, p as __decorate, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_ERROR, y as VERSION } from "./normalize-string-or-regex-
|
|
4
|
-
import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-
|
|
1
|
+
import { i as logInputHookInOutputPlugin, n as error } from "./logs-By66Jt-E.mjs";
|
|
2
|
+
import { i as unimplemented } from "./misc-BubmxcE3.mjs";
|
|
3
|
+
import { C as LOG_LEVEL_DEBUG, D as logLevelPriority, E as LOG_LEVEL_WARN, S as normalizeLog, T as LOG_LEVEL_INFO, _ as PlainObjectLike, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, n as BuiltinPlugin, p as __decorate, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_ERROR, y as VERSION } from "./normalize-string-or-regex-FzNsMab1.mjs";
|
|
4
|
+
import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-nvXYfbt3.mjs";
|
|
5
5
|
import { Worker } from "node:worker_threads";
|
|
6
6
|
import { BindingBundler, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
|
|
7
7
|
import path from "node:path";
|
|
@@ -1585,7 +1585,7 @@ const TransformOptionsSchema = object({
|
|
|
1585
1585
|
JsxOptionsSchema
|
|
1586
1586
|
])),
|
|
1587
1587
|
target: pipe(optional(union([string(), array(string())])), description("The JavaScript target environment")),
|
|
1588
|
-
define: pipe(optional(record(string(), string())), description("Define global variables")),
|
|
1588
|
+
define: pipe(optional(record(string(), string())), description("Define global variables (syntax: key=value,key2=value2)")),
|
|
1589
1589
|
inject: pipe(optional(record(string(), union([string(), tuple([string(), string()])]))), description("Inject import statements on demand")),
|
|
1590
1590
|
dropLabels: pipe(optional(array(string())), description("Remove labeled statements with these label names"))
|
|
1591
1591
|
});
|
|
@@ -1616,7 +1616,8 @@ const ChecksOptionsSchema = strictObject({
|
|
|
1616
1616
|
emptyImportMeta: pipe(optional(boolean()), description("Whether to emit warning when detecting empty import meta")),
|
|
1617
1617
|
configurationFieldConflict: pipe(optional(boolean()), description("Whether to emit warning when detecting configuration field conflict")),
|
|
1618
1618
|
preferBuiltinFeature: pipe(optional(boolean()), description("Whether to emit warning when detecting prefer builtin feature")),
|
|
1619
|
-
couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warning when detecting could not clean directory"))
|
|
1619
|
+
couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warning when detecting could not clean directory")),
|
|
1620
|
+
pluginTimings: pipe(optional(boolean()), description("Whether to emit warning when detecting plugin timings"))
|
|
1620
1621
|
});
|
|
1621
1622
|
const CompressOptionsKeepNamesSchema = strictObject({
|
|
1622
1623
|
function: boolean(),
|
|
@@ -1695,7 +1696,7 @@ const OnLogSchema = pipe(vFunction(), args(tuple([
|
|
|
1695
1696
|
LogOrStringHandlerSchema
|
|
1696
1697
|
])));
|
|
1697
1698
|
const OnwarnSchema = pipe(vFunction(), args(tuple([RollupLogSchema, pipe(vFunction(), args(tuple([union([RollupLogWithStringSchema, pipe(vFunction(), returns(RollupLogWithStringSchema))])])))])));
|
|
1698
|
-
const
|
|
1699
|
+
const DevModeSchema = union([boolean(), strictObject({
|
|
1699
1700
|
new: optional(boolean()),
|
|
1700
1701
|
port: optional(number()),
|
|
1701
1702
|
host: optional(string()),
|
|
@@ -1728,7 +1729,7 @@ const InputOptionsSchema = strictObject({
|
|
|
1728
1729
|
strictExecutionOrder: optional(boolean()),
|
|
1729
1730
|
onDemandWrapping: optional(boolean()),
|
|
1730
1731
|
incrementalBuild: optional(boolean()),
|
|
1731
|
-
|
|
1732
|
+
devMode: optional(DevModeSchema),
|
|
1732
1733
|
attachDebugInfo: optional(union([
|
|
1733
1734
|
literal("none"),
|
|
1734
1735
|
literal("simple"),
|
|
@@ -1851,6 +1852,8 @@ const OutputOptionsSchema = strictObject({
|
|
|
1851
1852
|
sourcemapPathTransform: optional(custom(() => true)),
|
|
1852
1853
|
banner: optional(union([string(), AddonFunctionSchema])),
|
|
1853
1854
|
footer: optional(union([string(), AddonFunctionSchema])),
|
|
1855
|
+
postBanner: optional(union([string(), AddonFunctionSchema])),
|
|
1856
|
+
postFooter: optional(union([string(), AddonFunctionSchema])),
|
|
1854
1857
|
intro: optional(union([string(), AddonFunctionSchema])),
|
|
1855
1858
|
outro: optional(union([string(), AddonFunctionSchema])),
|
|
1856
1859
|
extend: pipe(optional(boolean()), description("Extend global variable defined by name in IIFE / UMD formats")),
|
|
@@ -1898,6 +1901,8 @@ const OutputCliOverrideSchema = strictObject({
|
|
|
1898
1901
|
sanitizeFileName: pipe(optional(boolean()), description("Sanitize file name")),
|
|
1899
1902
|
banner: pipe(optional(string()), description(getAddonDescription("top", "outside"))),
|
|
1900
1903
|
footer: pipe(optional(string()), description(getAddonDescription("bottom", "outside"))),
|
|
1904
|
+
postBanner: pipe(optional(string()), description("A string to prepend to the top of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
1905
|
+
postFooter: pipe(optional(string()), description("A string to append to the bottom of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
1901
1906
|
intro: pipe(optional(string()), description(getAddonDescription("top", "inside"))),
|
|
1902
1907
|
outro: pipe(optional(string()), description(getAddonDescription("bottom", "inside"))),
|
|
1903
1908
|
esModule: pipe(optional(boolean()), description("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")),
|
|
@@ -2013,7 +2018,10 @@ var ChunkingContextImpl = class {
|
|
|
2013
2018
|
//#endregion
|
|
2014
2019
|
//#region src/utils/bindingify-output-options.ts
|
|
2015
2020
|
function bindingifyOutputOptions(outputOptions) {
|
|
2016
|
-
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir } = outputOptions;
|
|
2021
|
+
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir } = outputOptions;
|
|
2022
|
+
if (outputOptions.inlineDynamicImports === true) {
|
|
2023
|
+
if (manualChunks != null) throw new Error("Invalid value \"true\" for option \"output.inlineDynamicImports\" - this option is not supported for \"output.manualChunks\".");
|
|
2024
|
+
}
|
|
2017
2025
|
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
2018
2026
|
return {
|
|
2019
2027
|
dir,
|
|
@@ -2028,6 +2036,8 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
2028
2036
|
sourcemapPathTransform,
|
|
2029
2037
|
banner: bindingifyAddon(banner),
|
|
2030
2038
|
footer: bindingifyAddon(footer),
|
|
2039
|
+
postBanner: bindingifyAddon(postBanner),
|
|
2040
|
+
postFooter: bindingifyAddon(postFooter),
|
|
2031
2041
|
intro: bindingifyAddon(intro),
|
|
2032
2042
|
outro: bindingifyAddon(outro),
|
|
2033
2043
|
extend: outputOptions.extend,
|
|
@@ -2058,10 +2068,9 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
2058
2068
|
};
|
|
2059
2069
|
}
|
|
2060
2070
|
function bindingifyAddon(configAddon) {
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
};
|
|
2071
|
+
if (configAddon == null || configAddon === "") return;
|
|
2072
|
+
if (typeof configAddon === "function") return async (chunk) => configAddon(transformRenderedChunk(chunk));
|
|
2073
|
+
return configAddon;
|
|
2065
2074
|
}
|
|
2066
2075
|
function bindingifyFormat(format) {
|
|
2067
2076
|
switch (format) {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { a as RollupLog } from "./logging-BpAvp7KV.mjs";
|
|
2
|
+
import { t as BindingBuiltinPluginName } from "./binding-r9j8jqRV.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/types/utils.d.ts
|
|
5
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
6
|
+
type NullValue<T = void> = T | undefined | null | void;
|
|
7
|
+
type PartialNull<T> = { [P in keyof T]: T[P] | null };
|
|
8
|
+
type MakeAsync<Function_> = Function_ extends ((this: infer This, ...parameters: infer Arguments) => infer Return) ? (this: This, ...parameters: Arguments) => Return | Promise<Return> : never;
|
|
9
|
+
type MaybeArray<T> = T | T[];
|
|
10
|
+
type StringOrRegExp = string | RegExp;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/log/log-handler.d.ts
|
|
13
|
+
type LoggingFunction = (log: RollupLog | string | (() => RollupLog | string)) => void;
|
|
14
|
+
type LoggingFunctionWithPosition = (log: RollupLog | string | (() => RollupLog | string), pos?: number | {
|
|
15
|
+
column: number;
|
|
16
|
+
line: number;
|
|
17
|
+
}) => void;
|
|
18
|
+
type WarningHandlerWithDefault = (warning: RollupLog, defaultHandler: LoggingFunction) => void;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/builtin-plugin/utils.d.ts
|
|
21
|
+
declare class BuiltinPlugin {
|
|
22
|
+
name: BindingBuiltinPluginName;
|
|
23
|
+
_options?: unknown;
|
|
24
|
+
/** Vite-specific option to control plugin ordering */
|
|
25
|
+
enforce?: "pre" | "post";
|
|
26
|
+
constructor(name: BindingBuiltinPluginName, _options?: unknown);
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { MakeAsync as a, NullValue as c, WarningHandlerWithDefault as i, PartialNull as l, LoggingFunction as n, MaybeArray as o, LoggingFunctionWithPosition as r, MaybePromise as s, BuiltinPlugin as t, StringOrRegExp as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { o as logMultiplyNotifyOption } from "./logs-
|
|
2
|
-
import { t as arraify } from "./misc-
|
|
3
|
-
import { E as LOG_LEVEL_WARN } from "./normalize-string-or-regex-
|
|
4
|
-
import { l as PluginDriver, n as createBundlerOptions } from "./rolldown-build-
|
|
5
|
-
import { a as aggregateBindingErrorsIntoJsError } from "./bindingify-input-options-
|
|
1
|
+
import { o as logMultiplyNotifyOption } from "./logs-By66Jt-E.mjs";
|
|
2
|
+
import { t as arraify } from "./misc-BubmxcE3.mjs";
|
|
3
|
+
import { E as LOG_LEVEL_WARN } from "./normalize-string-or-regex-FzNsMab1.mjs";
|
|
4
|
+
import { l as PluginDriver, n as createBundlerOptions } from "./rolldown-build-D8oOi181.mjs";
|
|
5
|
+
import { a as aggregateBindingErrorsIntoJsError } from "./bindingify-input-options-nvXYfbt3.mjs";
|
|
6
6
|
import { BindingWatcher, shutdownAsyncRuntime } from "../rolldown-binding.wasi.cjs";
|
|
7
7
|
|
|
8
8
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
@@ -203,7 +203,19 @@ var SignalExit = class extends SignalExitBase {
|
|
|
203
203
|
}
|
|
204
204
|
};
|
|
205
205
|
const process$1 = globalThis.process;
|
|
206
|
-
const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
206
|
+
const { onExit: onExit$1, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
|
|
207
|
+
|
|
208
|
+
//#endregion
|
|
209
|
+
//#region src/utils/signal-exit.ts
|
|
210
|
+
function onExit(...args) {
|
|
211
|
+
if (typeof process === "object" && process.versions.webcontainer) {
|
|
212
|
+
process.on("exit", (code) => {
|
|
213
|
+
args[0](code, null);
|
|
214
|
+
});
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
onExit$1(...args);
|
|
218
|
+
}
|
|
207
219
|
|
|
208
220
|
//#endregion
|
|
209
221
|
//#region src/api/watch/watch-emitter.ts
|
package/package.json
CHANGED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { t as BindingBuiltinPluginName } from "./binding-CY7Z709f.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/log/logging.d.ts
|
|
4
|
-
type LogLevel = "info" | "debug" | "warn";
|
|
5
|
-
type LogLevelOption = LogLevel | "silent";
|
|
6
|
-
type LogLevelWithError = LogLevel | "error";
|
|
7
|
-
interface RollupLog {
|
|
8
|
-
binding?: string;
|
|
9
|
-
cause?: unknown;
|
|
10
|
-
code?: string;
|
|
11
|
-
exporter?: string;
|
|
12
|
-
frame?: string;
|
|
13
|
-
hook?: string;
|
|
14
|
-
id?: string;
|
|
15
|
-
ids?: string[];
|
|
16
|
-
loc?: {
|
|
17
|
-
column: number;
|
|
18
|
-
file?: string;
|
|
19
|
-
line: number;
|
|
20
|
-
};
|
|
21
|
-
message: string;
|
|
22
|
-
meta?: any;
|
|
23
|
-
names?: string[];
|
|
24
|
-
plugin?: string;
|
|
25
|
-
pluginCode?: unknown;
|
|
26
|
-
pos?: number;
|
|
27
|
-
reexporter?: string;
|
|
28
|
-
stack?: string;
|
|
29
|
-
url?: string;
|
|
30
|
-
}
|
|
31
|
-
type RollupLogWithString = RollupLog | string;
|
|
32
|
-
interface RollupError extends RollupLog {
|
|
33
|
-
name?: string;
|
|
34
|
-
stack?: string;
|
|
35
|
-
watchFiles?: string[];
|
|
36
|
-
}
|
|
37
|
-
type LogOrStringHandler = (level: LogLevelWithError, log: RollupLogWithString) => void;
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/types/utils.d.ts
|
|
40
|
-
type MaybePromise<T> = T | Promise<T>;
|
|
41
|
-
type NullValue<T = void> = T | undefined | null | void;
|
|
42
|
-
type PartialNull<T> = { [P in keyof T]: T[P] | null };
|
|
43
|
-
type MakeAsync<Function_> = Function_ extends ((this: infer This, ...parameters: infer Arguments) => infer Return) ? (this: This, ...parameters: Arguments) => Return | Promise<Return> : never;
|
|
44
|
-
type MaybeArray<T> = T | T[];
|
|
45
|
-
type StringOrRegExp = string | RegExp;
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/log/log-handler.d.ts
|
|
48
|
-
type LoggingFunction = (log: RollupLog | string | (() => RollupLog | string)) => void;
|
|
49
|
-
type LoggingFunctionWithPosition = (log: RollupLog | string | (() => RollupLog | string), pos?: number | {
|
|
50
|
-
column: number;
|
|
51
|
-
line: number;
|
|
52
|
-
}) => void;
|
|
53
|
-
type WarningHandlerWithDefault = (warning: RollupLog, defaultHandler: LoggingFunction) => void;
|
|
54
|
-
//#endregion
|
|
55
|
-
//#region src/builtin-plugin/utils.d.ts
|
|
56
|
-
declare class BuiltinPlugin {
|
|
57
|
-
name: BindingBuiltinPluginName;
|
|
58
|
-
_options?: unknown;
|
|
59
|
-
constructor(name: BindingBuiltinPluginName, _options?: unknown);
|
|
60
|
-
}
|
|
61
|
-
//#endregion
|
|
62
|
-
export { MakeAsync as a, NullValue as c, LogLevel as d, LogLevelOption as f, RollupLogWithString as g, RollupLog as h, WarningHandlerWithDefault as i, PartialNull as l, RollupError as m, LoggingFunction as n, MaybeArray as o, LogOrStringHandler as p, LoggingFunctionWithPosition as r, MaybePromise as s, BuiltinPlugin as t, StringOrRegExp as u };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|