Comparing version 0.14.0-snapshot-18ee4d3-20241107003320 to 0.14.0-snapshot-1cfa47c-20241129015040
@@ -6,2 +6,19 @@ type MaybePromise<T> = T | Promise<T> | ||
export interface RenderedModule { | ||
readonly code: string | null | ||
renderedLength: number | ||
} | ||
export declare class BindingBundleEndEventData { | ||
output: string | ||
duration: number | ||
} | ||
export declare class BindingCallableBuiltinPlugin { | ||
constructor(plugin: BindingBuiltinPlugin) | ||
resolveId(id: string, importer?: string | undefined | null, options?: BindingHookJsResolveIdOptions | undefined | null): Promise<BindingHookJsResolveIdOutput | null> | ||
load(id: string): Promise<BindingHookJsLoadOutput | null> | ||
watchChange(path: string, event: BindingJsWatchChangeEvent): Promise<void> | ||
} | ||
export declare class BindingLog { | ||
@@ -22,2 +39,27 @@ code: string | ||
export declare class BindingNormalizedOptions { | ||
get input(): Array<string> | Record<string, string> | ||
get cwd(): string | null | ||
get platform(): 'node' | 'browser' | 'neutral' | ||
get shimMissingExports(): boolean | ||
get name(): string | null | ||
get cssEntryFilenames(): string | undefined | ||
get cssChunkFilenames(): string | undefined | ||
get entryFilenames(): string | undefined | ||
get chunkFilenames(): string | undefined | ||
get assetFilenames(): string | ||
get dir(): string | null | ||
get file(): string | null | ||
get format(): 'es' | 'cjs' | 'app' | 'iife' | 'umd' | ||
get exports(): 'default' | 'named' | 'none' | 'auto' | ||
get esModule(): boolean | 'if-default-prop' | ||
get inlineDynamicImports(): boolean | ||
get sourcemap(): boolean | 'inline' | 'hidden' | ||
get banner(): string | undefined | null | undefined | ||
get footer(): string | undefined | null | undefined | ||
get intro(): string | undefined | null | undefined | ||
get outro(): string | undefined | null | undefined | ||
get externalLiveBindings(): boolean | ||
} | ||
export declare class BindingOutputAsset { | ||
@@ -37,3 +79,3 @@ get fileName(): string | ||
get fileName(): string | ||
get modules(): Record<string, BindingRenderedModule> | ||
get modules(): Record<string, RenderedModule> | ||
get imports(): Array<string> | ||
@@ -51,5 +93,7 @@ get dynamicImports(): Array<string> | ||
get assets(): Array<BindingOutputAsset> | ||
get errors(): Array<unknown> | ||
} | ||
export declare class BindingPluginContext { | ||
load(specifier: string, sideEffects: BindingHookSideEffects | undefined, fn: () => void): Promise<void> | ||
resolve(specifier: string, importer?: string | undefined | null, extraOptions?: BindingPluginContextResolveOptions | undefined | null): Promise<BindingPluginContextResolvedId | null> | ||
@@ -63,2 +107,6 @@ emitFile(file: BindingEmittedAsset): string | ||
export declare class BindingRenderedModule { | ||
get code(): string | null | ||
} | ||
export declare class BindingTransformPluginContext { | ||
@@ -70,5 +118,18 @@ inner(): BindingPluginContext | ||
close(): Promise<void> | ||
on(event: BindingWatcherEvent, listener: (data?: Record<string, string>) => void): void | ||
start(listener: (data: BindingWatcherEvent) => void): Promise<void> | ||
} | ||
export declare class BindingWatcherChangeData { | ||
path: string | ||
kind: string | ||
} | ||
export declare class BindingWatcherEvent { | ||
eventKind(): string | ||
watchChangeData(): BindingWatcherChangeData | ||
bundleEndData(): BindingBundleEndEventData | ||
bundleEventKind(): string | ||
errors(): Array<unknown> | ||
} | ||
export declare class Bundler { | ||
@@ -78,5 +139,6 @@ constructor(inputOptions: BindingInputOptions, outputOptions: BindingOutputOptions, parallelPluginsRegistry?: ParallelJsPluginRegistry | undefined | null) | ||
generate(): Promise<BindingOutputs> | ||
scan(): Promise<void> | ||
scan(): Promise<BindingOutputs> | ||
close(): Promise<void> | ||
watch(): Promise<BindingWatcher> | ||
get closed(): boolean | ||
} | ||
@@ -139,16 +201,15 @@ | ||
export declare enum BindingBuiltinPluginName { | ||
WasmHelperPlugin = 0, | ||
ImportGlobPlugin = 1, | ||
DynamicImportVarsPlugin = 2, | ||
ModulePreloadPolyfillPlugin = 3, | ||
ManifestPlugin = 4, | ||
LoadFallbackPlugin = 5, | ||
TransformPlugin = 6, | ||
WasmFallbackPlugin = 7, | ||
AliasPlugin = 8, | ||
JsonPlugin = 9, | ||
BuildImportAnalysisPlugin = 10, | ||
ReplacePlugin = 11 | ||
} | ||
export type BindingBuiltinPluginName = 'builtin:wasm-helper'| | ||
'builtin:import-glob'| | ||
'builtin:dynamic-import-vars'| | ||
'builtin:module-preload-polyfill'| | ||
'builtin:manifest'| | ||
'builtin:load-fallback'| | ||
'builtin:transform'| | ||
'builtin:wasm-fallback'| | ||
'builtin:alias'| | ||
'builtin:json'| | ||
'builtin:build-import-analysis'| | ||
'builtin:replace'| | ||
'builtin:vite-resolve'; | ||
@@ -165,2 +226,4 @@ export interface BindingEmittedAsset { | ||
disableLiveBindings?: boolean | ||
viteMode?: boolean | ||
resolveNewUrlToAsset?: boolean | ||
} | ||
@@ -178,2 +241,18 @@ | ||
export interface BindingHookJsLoadOutput { | ||
code: string | ||
map?: string | ||
sideEffects: boolean | 'no-treeshake' | ||
} | ||
export interface BindingHookJsResolveIdOptions { | ||
scan?: boolean | ||
} | ||
export interface BindingHookJsResolveIdOutput { | ||
id: string | ||
external?: boolean | ||
sideEffects: boolean | 'no-treeshake' | ||
} | ||
export interface BindingHookLoadOutput { | ||
@@ -241,3 +320,3 @@ code: string | ||
platform?: 'node' | 'browser' | 'neutral' | ||
logLevel?: BindingLogLevel | ||
logLevel: BindingLogLevel | ||
onLog: (logLevel: 'debug' | 'warn' | 'info', log: BindingLog) => void | ||
@@ -248,2 +327,3 @@ cwd: string | ||
define?: Array<[string, string]> | ||
dropLabels?: Array<string> | ||
inject?: Array<BindingInjectImportNamed | BindingInjectImportNamespace> | ||
@@ -270,2 +350,6 @@ experimental?: BindingExperimentalOptions | ||
export interface BindingJsWatchChangeEvent { | ||
event: string | ||
} | ||
export declare enum BindingLogLevel { | ||
@@ -295,2 +379,8 @@ Silent = 0, | ||
export interface BindingModuleSideEffectsRule { | ||
test?: RegExp | undefined | ||
sideEffects: boolean | ||
external?: boolean | undefined | ||
} | ||
export interface BindingNotifyOption { | ||
@@ -303,5 +393,7 @@ pollInterval?: number | ||
name?: string | ||
assetFileNames?: string | ||
entryFileNames?: string | ((chunk: PreRenderedChunk) => string) | ||
chunkFileNames?: string | ((chunk: PreRenderedChunk) => string) | ||
assetFileNames?: string | ||
cssEntryFileNames?: string | ((chunk: PreRenderedChunk) => string) | ||
cssChunkFileNames?: string | ((chunk: PreRenderedChunk) => string) | ||
banner?: (chunk: RenderedChunk) => MaybePromise<VoidNullable<string>> | ||
@@ -316,3 +408,4 @@ dir?: string | ||
format?: 'es' | 'cjs' | 'iife' | 'umd' | ||
globals?: Record<string, string> | ||
globals?: Record<string, string> | ((name: string) => string) | ||
hashCharacters?: 'base64' | 'base36' | 'hex' | ||
inlineDynamicImports?: boolean | ||
@@ -328,2 +421,3 @@ intro?: (chunk: RenderedChunk) => MaybePromise<VoidNullable<string>> | ||
advancedChunks?: BindingAdvancedChunksOptions | ||
comments?: 'none' | 'preserve-legal' | ||
} | ||
@@ -348,3 +442,3 @@ | ||
name: string | ||
buildStart?: (ctx: BindingPluginContext) => MaybePromise<VoidNullable> | ||
buildStart?: (ctx: BindingPluginContext, opts: BindingNormalizedOptions) => MaybePromise<VoidNullable> | ||
buildStartMeta?: BindingPluginHookMeta | ||
@@ -366,13 +460,13 @@ resolveId?: (ctx: BindingPluginContext, specifier: string, importer: Nullable<string>, options: BindingHookResolveIdExtraArgs) => MaybePromise<VoidNullable<BindingHookResolveIdOutput>> | ||
buildEndMeta?: BindingPluginHookMeta | ||
renderChunk?: (ctx: BindingPluginContext, code: string, chunk: RenderedChunk) => MaybePromise<VoidNullable<BindingHookRenderChunkOutput>> | ||
renderChunk?: (ctx: BindingPluginContext, code: string, chunk: RenderedChunk, opts: BindingNormalizedOptions) => MaybePromise<VoidNullable<BindingHookRenderChunkOutput>> | ||
renderChunkMeta?: BindingPluginHookMeta | ||
augmentChunkHash?: (ctx: BindingPluginContext, chunk: RenderedChunk) => MaybePromise<void | string> | ||
augmentChunkHashMeta?: BindingPluginHookMeta | ||
renderStart?: (ctx: BindingPluginContext) => void | ||
renderStart?: (ctx: BindingPluginContext, opts: BindingNormalizedOptions) => void | ||
renderStartMeta?: BindingPluginHookMeta | ||
renderError?: (ctx: BindingPluginContext, error: string) => void | ||
renderErrorMeta?: BindingPluginHookMeta | ||
generateBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs, isWrite: boolean) => MaybePromise<VoidNullable<JsChangedOutputs>> | ||
generateBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs, isWrite: boolean, opts: BindingNormalizedOptions) => MaybePromise<VoidNullable<JsChangedOutputs>> | ||
generateBundleMeta?: BindingPluginHookMeta | ||
writeBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs) => MaybePromise<VoidNullable<JsChangedOutputs>> | ||
writeBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs, opts: BindingNormalizedOptions) => MaybePromise<VoidNullable<JsChangedOutputs>> | ||
writeBundleMeta?: BindingPluginHookMeta | ||
@@ -405,6 +499,2 @@ closeBundle?: (ctx: BindingPluginContext) => MaybePromise<VoidNullable> | ||
export interface BindingRenderedModule { | ||
code?: string | ||
} | ||
export interface BindingReplacePluginConfig { | ||
@@ -415,2 +505,3 @@ values: Record<string, string> | ||
objectGuards?: boolean | ||
sourcemap?: boolean | ||
} | ||
@@ -454,12 +545,34 @@ | ||
export interface BindingTreeshake { | ||
moduleSideEffects: string | ||
moduleSideEffects: boolean | BindingModuleSideEffectsRule[] | ||
annotations?: boolean | ||
} | ||
export declare enum BindingWatcherEvent { | ||
Close = 0, | ||
Event = 1, | ||
ReStart = 2, | ||
Change = 3 | ||
export interface BindingViteResolvePluginConfig { | ||
resolveOptions: BindingViteResolvePluginResolveOptions | ||
environmentConsumer: string | ||
environmentName: string | ||
external: true | string[] | ||
noExternal: true | string[] | ||
finalizeBareSpecifier?: (resolvedId: string, rawId: string, importer: string | null | undefined) => VoidNullable<string> | ||
finalizeOtherSpecifiers?: (resolvedId: string, rawId: string) => VoidNullable<string> | ||
runtime: string | ||
} | ||
export interface BindingViteResolvePluginResolveOptions { | ||
isBuild: boolean | ||
isProduction: boolean | ||
asSrc: boolean | ||
preferRelative: boolean | ||
isRequire?: boolean | ||
root: string | ||
scan: boolean | ||
mainFields: Array<string> | ||
conditions: Array<string> | ||
externalConditions: Array<string> | ||
extensions: Array<string> | ||
tryIndex: boolean | ||
tryPrefix?: string | ||
preserveSymlinks: boolean | ||
} | ||
export interface BindingWatchOption { | ||
@@ -525,3 +638,3 @@ skipWrite?: boolean | ||
filename: string | ||
modules: Record<string, BindingRenderedModule> | ||
modules: Record<string, RenderedModule> | ||
imports: Array<string> | ||
@@ -623,3 +736,3 @@ dynamicImports: Array<string> | ||
* | ||
* Conforms to the implementation in {@link https://github.com/facebook/react/tree/main/packages/react-refresh} | ||
* Conforms to the implementation in {@link https://github.com/facebook/react/tree/v18.3.1/packages/react-refresh} | ||
* | ||
@@ -666,3 +779,3 @@ * @default false | ||
fileName: string | ||
modules: Record<string, BindingRenderedModule> | ||
modules: Record<string, RenderedModule> | ||
imports: Array<string> | ||
@@ -725,2 +838,17 @@ dynamicImports: Array<string> | ||
jsx?: JsxOptions | ||
/** | ||
* Sets the target environment for the generated JavaScript. | ||
* | ||
* The lowest target is `es2015`. | ||
* | ||
* Example: | ||
* | ||
* * 'es2015' | ||
* * ['es2020', 'chrome58', 'edge16', 'firefox57', 'node12', 'safari11'] | ||
* | ||
* @default `esnext` (No transformation) | ||
* | ||
* @see [esbuild#target](https://esbuild.github.io/api/#target) | ||
*/ | ||
target?: string | Array<string> | ||
/** Define Plugin */ | ||
@@ -727,0 +855,0 @@ define?: Record<string, string> |
import { CliOptions } from './schema'; | ||
import type { InputOptions } from '../../types/input-options'; | ||
import type { OutputOptions } from '../../types/output-options'; | ||
import type { InputOptions } from '../../options/input-options'; | ||
import type { OutputOptions } from '../../options/output-options'; | ||
export interface NormalizedCliOptions { | ||
@@ -5,0 +5,0 @@ input: InputOptions; |
@@ -10,3 +10,3 @@ import type { ObjectSchema } from './types'; | ||
input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>; | ||
plugins: z.ZodOptional<z.ZodArray<z.ZodType<import("../../plugin").RolldownPluginRec, z.ZodTypeDef, import("../../plugin").RolldownPluginRec>, "many">>; | ||
plugins: z.ZodOptional<z.ZodType<import("../../plugin").RolldownPluginOption, z.ZodTypeDef, import("../../plugin").RolldownPluginOption>>; | ||
external: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodString>, z.ZodBoolean], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodVoid, z.ZodNull]>, z.ZodUndefined]>, z.ZodBoolean]>>]>>; | ||
@@ -53,3 +53,72 @@ resolve: z.ZodOptional<z.ZodObject<{ | ||
shimMissingExports: z.ZodOptional<z.ZodBoolean>; | ||
treeshake: z.ZodOptional<z.ZodType<boolean | import("../../treeshake").TreeshakingOptions, z.ZodTypeDef, boolean | import("../../treeshake").TreeshakingOptions>>; | ||
treeshake: z.ZodOptional<z.ZodUnion<[z.ZodObject<{ | ||
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>; | ||
external: z.ZodOptional<z.ZodBoolean>; | ||
sideEffects: z.ZodBoolean; | ||
}, "strip", z.ZodTypeAny, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ | ||
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>; | ||
external: z.ZodOptional<z.ZodBoolean>; | ||
sideEffects: z.ZodBoolean; | ||
}, "strip", z.ZodTypeAny, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ | ||
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>; | ||
external: z.ZodOptional<z.ZodBoolean>; | ||
sideEffects: z.ZodBoolean; | ||
}, "strip", z.ZodTypeAny, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough">>, z.ZodBoolean]>>; | ||
logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>; | ||
@@ -63,5 +132,7 @@ onLog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"error">]>, z.ZodUnion<[z.ZodAny, z.ZodString]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>; | ||
disableLiveBindings: z.ZodOptional<z.ZodBoolean>; | ||
resolveNewUrlToAsset: z.ZodOptional<z.ZodBoolean>; | ||
}, "strict", z.ZodTypeAny, { | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
resolveNewUrlToAsset?: boolean | undefined; | ||
enableComposingJsPlugins?: boolean | undefined; | ||
@@ -71,2 +142,3 @@ }, { | ||
disableLiveBindings?: boolean | undefined; | ||
resolveNewUrlToAsset?: boolean | undefined; | ||
enableComposingJsPlugins?: boolean | undefined; | ||
@@ -136,2 +208,3 @@ }>>; | ||
}>, z.ZodLiteral<false>]>>; | ||
dropLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
}, { | ||
@@ -141,6 +214,7 @@ external: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames" | "watch">>, Omit<z.objectUtil.extendShape<{ | ||
}>, "plugins" | "onLog" | "onwarn" | "input" | "resolve" | "watch" | "experimental" | "profilerNames">>, Omit<z.objectUtil.extendShape<{ | ||
dir: z.ZodOptional<z.ZodString>; | ||
file: z.ZodOptional<z.ZodString>; | ||
exports: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"named">]>, z.ZodLiteral<"default">]>, z.ZodLiteral<"none">]>>; | ||
hashCharacters: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"base64">, z.ZodLiteral<"base36">]>, z.ZodLiteral<"hex">]>>; | ||
format: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"cjs">]>, z.ZodLiteral<"esm">]>, z.ZodLiteral<"module">]>, z.ZodLiteral<"commonjs">]>, z.ZodLiteral<"iife">]>, z.ZodLiteral<"umd">]>>; | ||
@@ -156,8 +230,10 @@ sourcemap: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>, z.ZodLiteral<"hidden">]>>; | ||
esModule: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"if-default-prop">, z.ZodBoolean]>>; | ||
assetFileNames: z.ZodOptional<z.ZodString>; | ||
entryFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<import("../..").PreRenderedChunk, z.ZodTypeDef, import("../..").PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>; | ||
chunkFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<import("../..").PreRenderedChunk, z.ZodTypeDef, import("../..").PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>; | ||
assetFileNames: z.ZodOptional<z.ZodString>; | ||
cssEntryFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<import("../..").PreRenderedChunk, z.ZodTypeDef, import("../..").PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>; | ||
cssChunkFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<import("../..").PreRenderedChunk, z.ZodTypeDef, import("../..").PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>; | ||
minify: z.ZodOptional<z.ZodBoolean>; | ||
name: z.ZodOptional<z.ZodString>; | ||
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
globals: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodString>]>>; | ||
externalLiveBindings: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
@@ -176,11 +252,11 @@ inlineDynamicImports: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
name: string; | ||
test?: string | RegExp | undefined; | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
test?: string | RegExp | undefined; | ||
priority?: number | undefined; | ||
}, { | ||
name: string; | ||
test?: string | RegExp | undefined; | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
test?: string | RegExp | undefined; | ||
priority?: number | undefined; | ||
@@ -193,5 +269,5 @@ }>, "many">>; | ||
name: string; | ||
test?: string | RegExp | undefined; | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
test?: string | RegExp | undefined; | ||
priority?: number | undefined; | ||
@@ -204,8 +280,9 @@ }[] | undefined; | ||
name: string; | ||
test?: string | RegExp | undefined; | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
test?: string | RegExp | undefined; | ||
priority?: number | undefined; | ||
}[] | undefined; | ||
}>>; | ||
comments: z.ZodOptional<z.ZodEnum<["none", "preserve-legal"]>>; | ||
}, { | ||
@@ -217,2 +294,3 @@ banner: z.ZodOptional<z.ZodString>; | ||
esModule: z.ZodOptional<z.ZodBoolean>; | ||
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
advancedChunks: z.ZodOptional<z.ZodObject<{ | ||
@@ -229,29 +307,10 @@ minSize: z.ZodOptional<z.ZodNumber>; | ||
}>, "sourcemapIgnoreList" | "sourcemapPathTransform">>, "strict", z.ZodTypeAny, { | ||
treeshake?: boolean | undefined; | ||
external?: string[] | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | undefined; | ||
shimMissingExports?: boolean | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
inject?: Record<string, string> | undefined; | ||
jsx?: { | ||
development?: boolean | undefined; | ||
refresh?: boolean | undefined; | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
} | undefined; | ||
watch?: boolean | undefined; | ||
name?: string | undefined; | ||
exports?: "auto" | "named" | "default" | "none" | undefined; | ||
banner?: string | undefined; | ||
footer?: string | undefined; | ||
banner?: string | undefined; | ||
intro?: string | undefined; | ||
outro?: string | undefined; | ||
file?: string | undefined; | ||
name?: string | undefined; | ||
exports?: "auto" | "named" | "default" | "none" | undefined; | ||
esModule?: boolean | undefined; | ||
globals?: Record<string, string> | undefined; | ||
advancedChunks?: { | ||
@@ -262,25 +321,17 @@ minSize?: number | undefined; | ||
dir?: string | undefined; | ||
file?: string | undefined; | ||
hashCharacters?: "base64" | "base36" | "hex" | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined; | ||
sourcemap?: boolean | "inline" | "hidden" | undefined; | ||
extend?: boolean | undefined; | ||
assetFileNames?: string | undefined; | ||
entryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
assetFileNames?: string | undefined; | ||
cssEntryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
cssChunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
minify?: boolean | undefined; | ||
globals?: Record<string, string> | undefined; | ||
externalLiveBindings?: boolean | undefined; | ||
inlineDynamicImports?: boolean | undefined; | ||
version?: boolean | undefined; | ||
config?: string | boolean | undefined; | ||
help?: boolean | undefined; | ||
}, { | ||
treeshake?: boolean | undefined; | ||
comments?: "none" | "preserve-legal" | undefined; | ||
external?: string[] | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | undefined; | ||
shimMissingExports?: boolean | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
inject?: Record<string, string> | undefined; | ||
jsx?: { | ||
@@ -295,11 +346,24 @@ development?: boolean | undefined; | ||
} | undefined; | ||
platform?: "node" | "browser" | "neutral" | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
treeshake?: boolean | undefined; | ||
inject?: Record<string, string> | undefined; | ||
watch?: boolean | undefined; | ||
cwd?: string | undefined; | ||
shimMissingExports?: boolean | undefined; | ||
moduleTypes?: Record<string, "base64" | "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
dropLabels?: string[] | undefined; | ||
config?: string | boolean | undefined; | ||
help?: boolean | undefined; | ||
version?: boolean | undefined; | ||
}, { | ||
name?: string | undefined; | ||
exports?: "auto" | "named" | "default" | "none" | undefined; | ||
banner?: string | undefined; | ||
footer?: string | undefined; | ||
banner?: string | undefined; | ||
intro?: string | undefined; | ||
outro?: string | undefined; | ||
file?: string | undefined; | ||
name?: string | undefined; | ||
exports?: "auto" | "named" | "default" | "none" | undefined; | ||
esModule?: boolean | undefined; | ||
globals?: Record<string, string> | undefined; | ||
advancedChunks?: { | ||
@@ -310,17 +374,41 @@ minSize?: number | undefined; | ||
dir?: string | undefined; | ||
file?: string | undefined; | ||
hashCharacters?: "base64" | "base36" | "hex" | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined; | ||
sourcemap?: boolean | "inline" | "hidden" | undefined; | ||
extend?: boolean | undefined; | ||
assetFileNames?: string | undefined; | ||
entryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
assetFileNames?: string | undefined; | ||
cssEntryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
cssChunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
minify?: boolean | undefined; | ||
globals?: Record<string, string> | undefined; | ||
externalLiveBindings?: boolean | undefined; | ||
inlineDynamicImports?: boolean | undefined; | ||
version?: boolean | undefined; | ||
comments?: "none" | "preserve-legal" | undefined; | ||
external?: string[] | undefined; | ||
jsx?: { | ||
development?: boolean | undefined; | ||
refresh?: boolean | undefined; | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
} | undefined; | ||
platform?: "node" | "browser" | "neutral" | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
treeshake?: boolean | undefined; | ||
inject?: Record<string, string> | undefined; | ||
watch?: boolean | undefined; | ||
cwd?: string | undefined; | ||
shimMissingExports?: boolean | undefined; | ||
moduleTypes?: Record<string, "base64" | "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
dropLabels?: string[] | undefined; | ||
config?: string | boolean | undefined; | ||
help?: boolean | undefined; | ||
version?: boolean | undefined; | ||
}>; | ||
export type CliOptions = z.infer<typeof cliOptionsSchema>; | ||
export declare const schema: ObjectSchema; |
import { Plugin } from '../plugin'; | ||
export declare const ENUMERATED_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "augmentChunkHash", "buildEnd", "onLog", "resolveDynamicImport", "generateBundle", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "footer", "banner", "intro", "outro", "closeBundle", "watchChange", "closeWatcher"]; | ||
export declare const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange"]; | ||
export declare const ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES: readonly ["augmentChunkHash", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "generateBundle"]; | ||
export declare const ENUMERATED_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "buildEnd", "onLog", "resolveDynamicImport", "closeBundle", "closeWatcher", "watchChange", "augmentChunkHash", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "generateBundle", "footer", "banner", "intro", "outro"]; | ||
/** | ||
@@ -4,0 +6,0 @@ * Names of all properties in a `Plugin` object. Includes `name` and `api`. |
@@ -6,2 +6,5 @@ export { defineParallelPlugin } from './plugin/parallel-plugin'; | ||
export { composeJsPlugins as composePlugins } from './utils/compose-js-plugins'; | ||
export { modulePreloadPolyfillPlugin, dynamicImportVarsPlugin, wasmHelperPlugin, wasmFallbackPlugin, importGlobPlugin, manifestPlugin, loadFallbackPlugin, transformPlugin, aliasPlugin, jsonPlugin, buildImportAnalysisPlugin, replacePlugin, } from './plugin/builtin-plugin'; | ||
export { modulePreloadPolyfillPlugin, dynamicImportVarsPlugin, wasmHelperPlugin, wasmFallbackPlugin, importGlobPlugin, manifestPlugin, loadFallbackPlugin, jsonPlugin, buildImportAnalysisPlugin, viteResolvePlugin, } from './builtin-plugin/constructors'; | ||
export { transformPlugin } from './builtin-plugin/transform-plugin'; | ||
export { replacePlugin } from './builtin-plugin/replace-plugin'; | ||
export { aliasPlugin } from './builtin-plugin/alias-plugin'; |
import { RolldownOutput, RolldownOutputAsset, RolldownOutputChunk, SourceMap } from './types/rolldown-output'; | ||
import type { InputOptions, InputOption, ExternalOption, JsxOptions } from './types/input-options'; | ||
import type { ModuleFormat, OutputOptions } from './types/output-options'; | ||
import type { InputOptions, InputOption, ExternalOption, JsxOptions } from './options/input-options'; | ||
import type { ModuleFormat, OutputOptions } from './options/output-options'; | ||
import type { RolldownOptions } from './types/rolldown-options'; | ||
@@ -18,10 +18,11 @@ import type { AsyncPluginHooks, CustomPluginOptions, FunctionPluginHooks, ImportKind, LoadResult, ModuleOptions, ModuleType, ObjectHook, ParallelPluginHooks, PartialResolvedId, Plugin, RolldownPlugin, ResolveIdResult, ResolvedId, SourceDescription, TransformResult } from './plugin'; | ||
import { ModuleInfo } from './types/module-info'; | ||
import { MinimalPluginContext } from './log/logger'; | ||
import { MinimalPluginContext } from './plugin/minimal-plugin-context'; | ||
import { ExistingRawSourceMap, SourceMapInput } from './types/sourcemap'; | ||
import { OutputBundle } from './types/output-bundle'; | ||
import { WatchOptions } from './options/watch-option'; | ||
import { WatchOptions } from './options/watch-options'; | ||
import { Watcher } from './watcher'; | ||
export { defineConfig, rolldown, watch }; | ||
export declare const VERSION: string; | ||
export type { RolldownOutputAsset, RolldownOutputChunk, RolldownOptions, RolldownOutput, RolldownBuild, InputOptions, NormalizedInputOptions, OutputOptions, NormalizedOutputOptions, Plugin, RolldownPlugin, DefineParallelPluginResult, ConfigExport, ImportKind, InputOption, ExternalOption, ModuleFormat, ModuleType, InternalModuleFormat, LoadResult, TransformResult, ResolveIdResult, PluginContext, TransformPluginContext, ObjectHook, RenderedChunk, PreRenderedChunk, SourceMap, SourceDescription, PartialNull, PartialResolvedId, ResolvedId, ModuleOptions, ModuleInfo, MinimalPluginContext, EmittedFile, EmittedAsset, CustomPluginOptions, AsyncPluginHooks, ParallelPluginHooks, FunctionPluginHooks, ExistingRawSourceMap, SourceMapInput, OutputBundle, JsxOptions, WatchOptions, }; | ||
export type { RolldownOutputAsset, RolldownOutputChunk, RolldownOptions, RolldownOutput, RolldownBuild, InputOptions, NormalizedInputOptions, OutputOptions, NormalizedOutputOptions, Plugin, RolldownPlugin, DefineParallelPluginResult, ConfigExport, ImportKind, InputOption, ExternalOption, ModuleFormat, ModuleType, InternalModuleFormat, LoadResult, TransformResult, ResolveIdResult, PluginContext, TransformPluginContext, ObjectHook, RenderedChunk, PreRenderedChunk, SourceMap, SourceDescription, PartialNull, PartialResolvedId, ResolvedId, ModuleOptions, ModuleInfo, MinimalPluginContext, EmittedFile, EmittedAsset, CustomPluginOptions, AsyncPluginHooks, ParallelPluginHooks, FunctionPluginHooks, ExistingRawSourceMap, SourceMapInput, OutputBundle, JsxOptions, WatchOptions, Watcher, }; | ||
export type { RolldownOutput as RollupOutput, RolldownOptions as RollupOptions, RolldownBuild as RollupBuild, RolldownOutputChunk as OutputChunk, RolldownOutputAsset as OutputAsset, }; | ||
export type { RollupError, RollupLog, LoggingFunction } from './rollup'; |
@@ -1,20 +0,6 @@ | ||
import type { LoggingFunction, LogHandler, RollupError } from '../rollup'; | ||
import type { LogHandler } from '../rollup'; | ||
import type { Plugin } from '../plugin'; | ||
import { type LogLevelOption } from './logging'; | ||
import type { InputOptions } from '../types/input-options'; | ||
import type { NormalizedInputOptions } from '../options/normalized-input-options'; | ||
export interface PluginContextMeta { | ||
rollupVersion: string; | ||
rolldownVersion: string; | ||
watchMode: boolean; | ||
} | ||
export declare class MinimalPluginContext { | ||
debug: LoggingFunction; | ||
info: LoggingFunction; | ||
meta: PluginContextMeta; | ||
warn: LoggingFunction; | ||
readonly error: (error: RollupError | string) => never; | ||
constructor(options: NormalizedInputOptions, plugin: Plugin); | ||
} | ||
import type { InputOptions } from '../options/input-options'; | ||
export declare function getLogger(plugins: Plugin[], onLog: LogHandler, logLevel: LogLevelOption): LogHandler; | ||
export declare const getOnLog: (config: InputOptions, logLevel: LogLevelOption, printLog?: LogHandler) => NormalizedInputOptions["onLog"]; | ||
export declare const getOnLog: (config: InputOptions, logLevel: LogLevelOption, printLog?: LogHandler) => LogHandler; |
import type { RollupLog } from '../rollup'; | ||
export declare function logInvalidLogPosition(pluginName: string): RollupLog; | ||
export declare function logInputHookInOutputPlugin(pluginName: string, hookName: string): RollupLog; | ||
export declare function logCycleLoading(pluginName: string, moduleId: string): RollupLog; | ||
export declare function logPluginError(error: Omit<RollupLog, 'code'> & { | ||
@@ -4,0 +6,0 @@ code?: unknown; |
@@ -1,399 +0,102 @@ | ||
import { z } from 'zod'; | ||
import type { RolldownPluginRec } from '../plugin'; | ||
import type { TreeshakingOptions } from '../treeshake'; | ||
export declare const inputOptionsSchema: z.ZodObject<{ | ||
input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>; | ||
plugins: z.ZodOptional<z.ZodArray<z.ZodType<RolldownPluginRec, z.ZodTypeDef, RolldownPluginRec>, "many">>; | ||
external: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodString>, z.ZodBoolean], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodVoid, z.ZodNull]>, z.ZodUndefined]>, z.ZodBoolean]>>]>>; | ||
resolve: z.ZodOptional<z.ZodObject<{ | ||
alias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
aliasFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>; | ||
conditionNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
extensionAlias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>; | ||
exportsFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>; | ||
extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
mainFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
mainFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
modules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
symlinks: z.ZodOptional<z.ZodBoolean>; | ||
tsconfigFilename: z.ZodOptional<z.ZodString>; | ||
}, "strict", z.ZodTypeAny, { | ||
modules?: string[] | undefined; | ||
alias?: Record<string, string> | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
aliasFields?: string[][] | undefined; | ||
conditionNames?: string[] | undefined; | ||
exportsFields?: string[][] | undefined; | ||
extensions?: string[] | undefined; | ||
mainFields?: string[] | undefined; | ||
mainFiles?: string[] | undefined; | ||
symlinks?: boolean | undefined; | ||
tsconfigFilename?: string | undefined; | ||
}, { | ||
modules?: string[] | undefined; | ||
alias?: Record<string, string> | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
aliasFields?: string[][] | undefined; | ||
conditionNames?: string[] | undefined; | ||
exportsFields?: string[][] | undefined; | ||
extensions?: string[] | undefined; | ||
mainFields?: string[] | undefined; | ||
mainFiles?: string[] | undefined; | ||
symlinks?: boolean | undefined; | ||
tsconfigFilename?: string | undefined; | ||
}>>; | ||
cwd: z.ZodOptional<z.ZodString>; | ||
platform: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"node">, z.ZodLiteral<"browser">]>, z.ZodLiteral<"neutral">]>>; | ||
shimMissingExports: z.ZodOptional<z.ZodBoolean>; | ||
treeshake: z.ZodOptional<z.ZodType<boolean | TreeshakingOptions, z.ZodTypeDef, boolean | TreeshakingOptions>>; | ||
logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>; | ||
onLog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"error">]>, z.ZodUnion<[z.ZodAny, z.ZodString]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>; | ||
onwarn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodAny, z.ZodString]>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodAny, z.ZodString]>>]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>; | ||
moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>, z.ZodLiteral<"css">]>>>; | ||
experimental: z.ZodOptional<z.ZodObject<{ | ||
enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>; | ||
strictExecutionOrder: z.ZodOptional<z.ZodBoolean>; | ||
disableLiveBindings: z.ZodOptional<z.ZodBoolean>; | ||
}, "strict", z.ZodTypeAny, { | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
enableComposingJsPlugins?: boolean | undefined; | ||
}, { | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
enableComposingJsPlugins?: boolean | undefined; | ||
}>>; | ||
define: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>>>; | ||
profilerNames: z.ZodOptional<z.ZodBoolean>; | ||
jsx: z.ZodOptional<z.ZodObject<{ | ||
mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"automatic">]>>; | ||
factory: z.ZodOptional<z.ZodString>; | ||
fragment: z.ZodOptional<z.ZodString>; | ||
importSource: z.ZodOptional<z.ZodString>; | ||
jsxImportSource: z.ZodOptional<z.ZodString>; | ||
refresh: z.ZodOptional<z.ZodBoolean>; | ||
development: z.ZodOptional<z.ZodBoolean>; | ||
}, "strict", z.ZodTypeAny, { | ||
development?: boolean | undefined; | ||
refresh?: boolean | undefined; | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
}, { | ||
development?: boolean | undefined; | ||
refresh?: boolean | undefined; | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
}>>; | ||
watch: z.ZodOptional<z.ZodUnion<[z.ZodObject<{ | ||
skipWrite: z.ZodOptional<z.ZodBoolean>; | ||
notify: z.ZodOptional<z.ZodObject<{ | ||
pollInterval: z.ZodOptional<z.ZodNumber>; | ||
compareContents: z.ZodOptional<z.ZodBoolean>; | ||
}, "strict", z.ZodTypeAny, { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
}, { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
}>>; | ||
include: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>; | ||
exclude: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>; | ||
chokidar: z.ZodOptional<z.ZodAny>; | ||
}, "strict", z.ZodTypeAny, { | ||
include?: string | RegExp | (string | RegExp)[] | undefined; | ||
exclude?: string | RegExp | (string | RegExp)[] | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
skipWrite?: boolean | undefined; | ||
chokidar?: any; | ||
}, { | ||
include?: string | RegExp | (string | RegExp)[] | undefined; | ||
exclude?: string | RegExp | (string | RegExp)[] | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
skipWrite?: boolean | undefined; | ||
chokidar?: any; | ||
}>, z.ZodLiteral<false>]>>; | ||
}, "strict", z.ZodTypeAny, { | ||
treeshake?: boolean | TreeshakingOptions | undefined; | ||
input?: string | string[] | Record<string, string> | undefined; | ||
plugins?: RolldownPluginRec[] | undefined; | ||
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined; | ||
import { RolldownPluginOption } from '../plugin'; | ||
import { LogLevel, LogLevelOption, LogLevelWithError, RollupLog, RollupLogWithString } from '../log/logging'; | ||
import { TreeshakingOptions } from '../treeshake'; | ||
import { NullValue, StringOrRegExp } from '../types/utils'; | ||
export type InputOption = string | string[] | Record<string, string>; | ||
export type ExternalOption = StringOrRegExp | StringOrRegExp[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>); | ||
export type ModuleTypes = Record<string, 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | 'css'>; | ||
export interface JsxOptions { | ||
mode?: 'classic' | 'automatic'; | ||
factory?: string; | ||
fragment?: string; | ||
importSource?: string; | ||
jsxImportSource?: string; | ||
refresh?: boolean; | ||
development?: boolean; | ||
} | ||
export interface WatchOptions { | ||
skipWrite?: boolean; | ||
notify?: { | ||
pollInterval?: number; | ||
compareContents?: boolean; | ||
}; | ||
include?: StringOrRegExp | StringOrRegExp[]; | ||
exclude?: StringOrRegExp | StringOrRegExp[]; | ||
chokidar?: any; | ||
} | ||
export interface InputOptions { | ||
input?: InputOption; | ||
plugins?: RolldownPluginOption; | ||
external?: ExternalOption; | ||
resolve?: { | ||
modules?: string[] | undefined; | ||
alias?: Record<string, string> | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
aliasFields?: string[][] | undefined; | ||
conditionNames?: string[] | undefined; | ||
exportsFields?: string[][] | undefined; | ||
extensions?: string[] | undefined; | ||
mainFields?: string[] | undefined; | ||
mainFiles?: string[] | undefined; | ||
symlinks?: boolean | undefined; | ||
tsconfigFilename?: string | undefined; | ||
} | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | undefined; | ||
shimMissingExports?: boolean | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
onLog?: ((args_0: "info" | "debug" | "warn", args_1: any, args_2: (args_0: "info" | "debug" | "warn" | "error", args_1: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined; | ||
onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined; | ||
moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
alias?: Record<string, string>; | ||
aliasFields?: string[][]; | ||
conditionNames?: string[]; | ||
extensionAlias?: Record<string, string[]>; | ||
exportsFields?: string[][]; | ||
extensions?: string[]; | ||
mainFields?: string[]; | ||
mainFiles?: string[]; | ||
modules?: string[]; | ||
symlinks?: boolean; | ||
tsconfigFilename?: string; | ||
}; | ||
cwd?: string; | ||
/** | ||
* Expected platform where the code run. | ||
* | ||
* @default | ||
* - 'node' if the format is 'cjs' | ||
* - 'browser' for other formats | ||
*/ | ||
platform?: 'node' | 'browser' | 'neutral'; | ||
shimMissingExports?: boolean; | ||
treeshake?: boolean | TreeshakingOptions; | ||
logLevel?: LogLevelOption; | ||
onLog?: (level: LogLevel, log: RollupLog, defaultHandler: (level: LogLevelWithError, log: RollupLogWithString) => void) => void; | ||
onwarn?: (warning: RollupLog, defaultHandler: (warning: RollupLogWithString | (() => RollupLogWithString)) => void) => void; | ||
moduleTypes?: ModuleTypes; | ||
experimental?: { | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
enableComposingJsPlugins?: boolean | undefined; | ||
} | undefined; | ||
define?: Record<string, string> | undefined; | ||
inject?: Record<string, string | [string, string]> | undefined; | ||
profilerNames?: boolean | undefined; | ||
jsx?: { | ||
development?: boolean | undefined; | ||
refresh?: boolean | undefined; | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
} | undefined; | ||
watch?: false | { | ||
include?: string | RegExp | (string | RegExp)[] | undefined; | ||
exclude?: string | RegExp | (string | RegExp)[] | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
skipWrite?: boolean | undefined; | ||
chokidar?: any; | ||
} | undefined; | ||
}, { | ||
treeshake?: boolean | TreeshakingOptions | undefined; | ||
input?: string | string[] | Record<string, string> | undefined; | ||
plugins?: RolldownPluginRec[] | undefined; | ||
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined; | ||
resolve?: { | ||
modules?: string[] | undefined; | ||
alias?: Record<string, string> | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
aliasFields?: string[][] | undefined; | ||
conditionNames?: string[] | undefined; | ||
exportsFields?: string[][] | undefined; | ||
extensions?: string[] | undefined; | ||
mainFields?: string[] | undefined; | ||
mainFiles?: string[] | undefined; | ||
symlinks?: boolean | undefined; | ||
tsconfigFilename?: string | undefined; | ||
} | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | undefined; | ||
shimMissingExports?: boolean | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
onLog?: ((args_0: "info" | "debug" | "warn", args_1: any, args_2: (args_0: "info" | "debug" | "warn" | "error", args_1: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined; | ||
onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined; | ||
moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
experimental?: { | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
enableComposingJsPlugins?: boolean | undefined; | ||
} | undefined; | ||
define?: Record<string, string> | undefined; | ||
inject?: Record<string, string | [string, string]> | undefined; | ||
profilerNames?: boolean | undefined; | ||
jsx?: { | ||
development?: boolean | undefined; | ||
refresh?: boolean | undefined; | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
} | undefined; | ||
watch?: false | { | ||
include?: string | RegExp | (string | RegExp)[] | undefined; | ||
exclude?: string | RegExp | (string | RegExp)[] | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
skipWrite?: boolean | undefined; | ||
chokidar?: any; | ||
} | undefined; | ||
}>; | ||
export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{ | ||
input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>; | ||
plugins: z.ZodOptional<z.ZodArray<z.ZodType<RolldownPluginRec, z.ZodTypeDef, RolldownPluginRec>, "many">>; | ||
external: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodString>, z.ZodBoolean], z.ZodUnknown>, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodVoid, z.ZodNull]>, z.ZodUndefined]>, z.ZodBoolean]>>]>>; | ||
resolve: z.ZodOptional<z.ZodObject<{ | ||
alias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
aliasFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>; | ||
conditionNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
extensionAlias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>; | ||
exportsFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>; | ||
extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
mainFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
mainFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
modules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
symlinks: z.ZodOptional<z.ZodBoolean>; | ||
tsconfigFilename: z.ZodOptional<z.ZodString>; | ||
}, "strict", z.ZodTypeAny, { | ||
modules?: string[] | undefined; | ||
alias?: Record<string, string> | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
aliasFields?: string[][] | undefined; | ||
conditionNames?: string[] | undefined; | ||
exportsFields?: string[][] | undefined; | ||
extensions?: string[] | undefined; | ||
mainFields?: string[] | undefined; | ||
mainFiles?: string[] | undefined; | ||
symlinks?: boolean | undefined; | ||
tsconfigFilename?: string | undefined; | ||
}, { | ||
modules?: string[] | undefined; | ||
alias?: Record<string, string> | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
aliasFields?: string[][] | undefined; | ||
conditionNames?: string[] | undefined; | ||
exportsFields?: string[][] | undefined; | ||
extensions?: string[] | undefined; | ||
mainFields?: string[] | undefined; | ||
mainFiles?: string[] | undefined; | ||
symlinks?: boolean | undefined; | ||
tsconfigFilename?: string | undefined; | ||
}>>; | ||
cwd: z.ZodOptional<z.ZodString>; | ||
platform: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"node">, z.ZodLiteral<"browser">]>, z.ZodLiteral<"neutral">]>>; | ||
shimMissingExports: z.ZodOptional<z.ZodBoolean>; | ||
treeshake: z.ZodOptional<z.ZodType<boolean | TreeshakingOptions, z.ZodTypeDef, boolean | TreeshakingOptions>>; | ||
logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>; | ||
onLog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"error">]>, z.ZodUnion<[z.ZodAny, z.ZodString]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>; | ||
onwarn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodAny, z.ZodString]>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodAny, z.ZodString]>>]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>; | ||
moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>, z.ZodLiteral<"css">]>>>; | ||
experimental: z.ZodOptional<z.ZodObject<{ | ||
enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>; | ||
strictExecutionOrder: z.ZodOptional<z.ZodBoolean>; | ||
disableLiveBindings: z.ZodOptional<z.ZodBoolean>; | ||
}, "strict", z.ZodTypeAny, { | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
enableComposingJsPlugins?: boolean | undefined; | ||
}, { | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
enableComposingJsPlugins?: boolean | undefined; | ||
}>>; | ||
define: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>>>; | ||
profilerNames: z.ZodOptional<z.ZodBoolean>; | ||
jsx: z.ZodOptional<z.ZodObject<{ | ||
mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"automatic">]>>; | ||
factory: z.ZodOptional<z.ZodString>; | ||
fragment: z.ZodOptional<z.ZodString>; | ||
importSource: z.ZodOptional<z.ZodString>; | ||
jsxImportSource: z.ZodOptional<z.ZodString>; | ||
refresh: z.ZodOptional<z.ZodBoolean>; | ||
development: z.ZodOptional<z.ZodBoolean>; | ||
}, "strict", z.ZodTypeAny, { | ||
development?: boolean | undefined; | ||
refresh?: boolean | undefined; | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
}, { | ||
development?: boolean | undefined; | ||
refresh?: boolean | undefined; | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
}>>; | ||
watch: z.ZodOptional<z.ZodUnion<[z.ZodObject<{ | ||
skipWrite: z.ZodOptional<z.ZodBoolean>; | ||
notify: z.ZodOptional<z.ZodObject<{ | ||
pollInterval: z.ZodOptional<z.ZodNumber>; | ||
compareContents: z.ZodOptional<z.ZodBoolean>; | ||
}, "strict", z.ZodTypeAny, { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
}, { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
}>>; | ||
include: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>; | ||
exclude: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>; | ||
chokidar: z.ZodOptional<z.ZodAny>; | ||
}, "strict", z.ZodTypeAny, { | ||
include?: string | RegExp | (string | RegExp)[] | undefined; | ||
exclude?: string | RegExp | (string | RegExp)[] | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
skipWrite?: boolean | undefined; | ||
chokidar?: any; | ||
}, { | ||
include?: string | RegExp | (string | RegExp)[] | undefined; | ||
exclude?: string | RegExp | (string | RegExp)[] | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
skipWrite?: boolean | undefined; | ||
chokidar?: any; | ||
}>, z.ZodLiteral<false>]>>; | ||
}, { | ||
external: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames" | "watch">, "strict", z.ZodTypeAny, { | ||
treeshake?: boolean | undefined; | ||
external?: string[] | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | undefined; | ||
shimMissingExports?: boolean | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
inject?: Record<string, string> | undefined; | ||
jsx?: { | ||
development?: boolean | undefined; | ||
refresh?: boolean | undefined; | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
} | undefined; | ||
}, { | ||
treeshake?: boolean | undefined; | ||
external?: string[] | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | undefined; | ||
shimMissingExports?: boolean | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
moduleTypes?: Record<string, "jsx" | "js" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
inject?: Record<string, string> | undefined; | ||
jsx?: { | ||
development?: boolean | undefined; | ||
refresh?: boolean | undefined; | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
} | undefined; | ||
}>; | ||
enableComposingJsPlugins?: boolean; | ||
strictExecutionOrder?: boolean; | ||
disableLiveBindings?: boolean; | ||
viteMode?: boolean; | ||
resolveNewUrlToAsset?: boolean; | ||
}; | ||
define?: Record<string, string>; | ||
/** | ||
* Inject import statements on demand. | ||
* | ||
* ## Supported patterns | ||
* ```js | ||
* { | ||
* // import { Promise } from 'es6-promise' | ||
* Promise: ['es6-promise', 'Promise'], | ||
* | ||
* // import { Promise as P } from 'es6-promise' | ||
* P: ['es6-promise', 'Promise'], | ||
* | ||
* // import $ from 'jquery' | ||
* $: 'jquery', | ||
* | ||
* // import * as fs from 'node:fs' | ||
* fs: ['node:fs', '*'], | ||
* | ||
* // Inject shims for property access pattern | ||
* 'Object.assign': path.resolve( 'src/helpers/object-assign.js' ), | ||
* } | ||
* ``` | ||
*/ | ||
inject?: Record<string, string | [string, string]>; | ||
profilerNames?: boolean; | ||
jsx?: JsxOptions; | ||
watch?: WatchOptions | false; | ||
dropLabels?: string[]; | ||
} | ||
interface OverwriteInputOptionsForCli { | ||
external?: string[]; | ||
inject?: Record<string, string>; | ||
treeshake?: boolean; | ||
} | ||
export type InputCliOptions = Omit<InputOptions, keyof OverwriteInputOptionsForCli | 'input' | 'plugins' | 'onwarn' | 'onLog' | 'resolve' | 'experimental' | 'profilerNames' | 'watch'> & OverwriteInputOptionsForCli; | ||
export {}; |
@@ -1,12 +0,18 @@ | ||
import type { LogLevelOption, RollupLog, NormalizedInputOptions as RollupNormalizedInputOptions } from '../rollup'; | ||
import type { InputOptions } from '../types/input-options'; | ||
import type { RolldownPlugin } from '../plugin'; | ||
import type { LogLevel } from '../log/logging'; | ||
import { NormalizedTreeshakingOptions } from '../treeshake'; | ||
export interface NormalizedInputOptions extends Omit<InputOptions, 'treeshake'> { | ||
input: RollupNormalizedInputOptions['input']; | ||
plugins: RolldownPlugin[]; | ||
onLog: (level: LogLevel, log: RollupLog) => void; | ||
logLevel: LogLevelOption; | ||
treeshake?: NormalizedTreeshakingOptions; | ||
import type { LogHandler } from '../rollup'; | ||
import { BindingNormalizedOptions } from '../binding'; | ||
import { InputOptions } from '..'; | ||
export interface NormalizedInputOptions { | ||
input: string[] | Record<string, string>; | ||
cwd: string | undefined; | ||
platform: InputOptions['platform']; | ||
shimMissingExports: boolean; | ||
} | ||
export declare class NormalizedInputOptionsImpl implements NormalizedInputOptions { | ||
onLog: LogHandler; | ||
inner: BindingNormalizedOptions; | ||
constructor(inner: BindingNormalizedOptions, onLog: LogHandler); | ||
get shimMissingExports(): boolean; | ||
get input(): string[] | Record<string, string>; | ||
get cwd(): string | undefined; | ||
get platform(): "node" | "browser" | "neutral"; | ||
} |
@@ -1,18 +0,46 @@ | ||
import type { SourcemapIgnoreListOption } from '../rollup'; | ||
import type { AddonFunction, OutputOptions } from '../types/output-options'; | ||
import type { RolldownPlugin } from '../plugin'; | ||
export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'umd'; | ||
export interface NormalizedOutputOptions extends OutputOptions { | ||
plugins: RolldownPlugin[]; | ||
import type { BindingNormalizedOptions } from '../binding'; | ||
import { ChunkFileNamesFunction, OutputOptions } from './output-options'; | ||
export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'umd' | 'app'; | ||
export interface NormalizedOutputOptions { | ||
name: string | undefined; | ||
file: string | undefined; | ||
dir: string | undefined; | ||
entryFileNames: string | ChunkFileNamesFunction; | ||
chunkFileNames: string | ChunkFileNamesFunction; | ||
assetFileNames: string; | ||
format: InternalModuleFormat; | ||
exports: 'auto' | 'named' | 'default' | 'none'; | ||
exports: NonNullable<OutputOptions['exports']>; | ||
sourcemap: boolean | 'inline' | 'hidden'; | ||
sourcemapIgnoreList: SourcemapIgnoreListOption; | ||
banner: AddonFunction; | ||
footer: AddonFunction; | ||
intro: AddonFunction; | ||
outro: AddonFunction; | ||
cssEntryFileNames: string | ChunkFileNamesFunction; | ||
cssChunkFileNames: string | ChunkFileNamesFunction; | ||
inlineDynamicImports: boolean; | ||
externalLiveBindings: boolean; | ||
banner: OutputOptions['banner']; | ||
footer: OutputOptions['footer']; | ||
intro: OutputOptions['intro']; | ||
outro: OutputOptions['outro']; | ||
esModule: boolean | 'if-default-prop'; | ||
assetFileNames: string; | ||
inlineDynamicImports: boolean; | ||
} | ||
export declare class NormalizedOutputOptionsImpl implements NormalizedOutputOptions { | ||
inner: BindingNormalizedOptions; | ||
constructor(inner: BindingNormalizedOptions); | ||
get dir(): string | undefined; | ||
get entryFileNames(): string | (() => never); | ||
get chunkFileNames(): string | (() => never); | ||
get assetFileNames(): string; | ||
get format(): "es" | "cjs" | "iife" | "umd" | "app"; | ||
get exports(): "auto" | "named" | "default" | "none"; | ||
get sourcemap(): boolean | "inline" | "hidden"; | ||
get cssEntryFileNames(): string | (() => never); | ||
get cssChunkFileNames(): string | (() => never); | ||
get shimMissingExports(): boolean; | ||
get name(): string | undefined; | ||
get file(): string | undefined; | ||
get inlineDynamicImports(): boolean; | ||
get externalLiveBindings(): boolean; | ||
get banner(): string | (() => never) | undefined; | ||
get footer(): string | (() => never) | undefined; | ||
get intro(): string | (() => never) | undefined; | ||
get outro(): string | (() => never) | undefined; | ||
get esModule(): boolean | "if-default-prop"; | ||
} |
@@ -1,133 +0,76 @@ | ||
import { z } from 'zod'; | ||
import type { StringOrRegExp } from '../types/utils'; | ||
import type { RenderedChunk, PreRenderedChunk } from '../binding'; | ||
import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../rollup'; | ||
export declare const outputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{ | ||
dir: z.ZodOptional<z.ZodString>; | ||
file: z.ZodOptional<z.ZodString>; | ||
exports: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"named">]>, z.ZodLiteral<"default">]>, z.ZodLiteral<"none">]>>; | ||
format: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"cjs">]>, z.ZodLiteral<"esm">]>, z.ZodLiteral<"module">]>, z.ZodLiteral<"commonjs">]>, z.ZodLiteral<"iife">]>, z.ZodLiteral<"umd">]>>; | ||
sourcemap: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>, z.ZodLiteral<"hidden">]>>; | ||
sourcemapIgnoreList: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodType<SourcemapIgnoreListOption, z.ZodTypeDef, SourcemapIgnoreListOption>]>>; | ||
sourcemapPathTransform: z.ZodOptional<z.ZodType<SourcemapPathTransformOption, z.ZodTypeDef, SourcemapPathTransformOption>>; | ||
banner: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<RenderedChunk, z.ZodTypeDef, RenderedChunk>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>; | ||
footer: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<RenderedChunk, z.ZodTypeDef, RenderedChunk>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>; | ||
intro: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<RenderedChunk, z.ZodTypeDef, RenderedChunk>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>; | ||
outro: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<RenderedChunk, z.ZodTypeDef, RenderedChunk>], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodPromise<z.ZodString>]>>]>>; | ||
extend: z.ZodOptional<z.ZodBoolean>; | ||
esModule: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"if-default-prop">, z.ZodBoolean]>>; | ||
entryFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PreRenderedChunk, z.ZodTypeDef, PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>; | ||
chunkFileNames: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[z.ZodType<PreRenderedChunk, z.ZodTypeDef, PreRenderedChunk>], z.ZodUnknown>, z.ZodString>]>>; | ||
assetFileNames: z.ZodOptional<z.ZodString>; | ||
minify: z.ZodOptional<z.ZodBoolean>; | ||
name: z.ZodOptional<z.ZodString>; | ||
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
externalLiveBindings: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
inlineDynamicImports: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
advancedChunks: z.ZodOptional<z.ZodObject<{ | ||
minSize: z.ZodOptional<z.ZodNumber>; | ||
minShareCount: z.ZodOptional<z.ZodNumber>; | ||
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{ | ||
name: z.ZodString; | ||
test: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>>; | ||
priority: z.ZodOptional<z.ZodNumber>; | ||
minSize: z.ZodOptional<z.ZodNumber>; | ||
minShareCount: z.ZodOptional<z.ZodNumber>; | ||
}, "strict", z.ZodTypeAny, { | ||
name: string; | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
test?: string | RegExp | undefined; | ||
priority?: number | undefined; | ||
}, { | ||
name: string; | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
test?: string | RegExp | undefined; | ||
priority?: number | undefined; | ||
}>, "many">>; | ||
}, "strict", z.ZodTypeAny, { | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
import { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../rollup'; | ||
import { RolldownOutputPluginOption } from '../plugin'; | ||
export type ModuleFormat = 'es' | 'cjs' | 'esm' | 'module' | 'commonjs' | 'iife' | 'umd'; | ||
export type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>; | ||
export type ChunkFileNamesFunction = (chunkInfo: PreRenderedChunk) => string; | ||
export type GlobalsFunction = (name: string) => string; | ||
export interface OutputOptions { | ||
dir?: string; | ||
file?: string; | ||
exports?: 'auto' | 'named' | 'default' | 'none'; | ||
hashCharacters?: 'base64' | 'base36' | 'hex'; | ||
/** | ||
* Expected format of generated code. | ||
* - `'es'`, `'esm'` and `'module'` are the same format, all stand for ES module. | ||
* - `'cjs'` and `'commonjs'` are the same format, all stand for CommonJS module. | ||
* - `'iife'` stands for [Immediately Invoked Function Expression](https://developer.mozilla.org/en-US/docs/Glossary/IIFE). | ||
* - `'umd'` stands for [Universal Module Definition](https://github.com/umdjs/umd). | ||
* | ||
* @default 'esm' | ||
*/ | ||
format?: ModuleFormat; | ||
sourcemap?: boolean | 'inline' | 'hidden'; | ||
sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption; | ||
sourcemapPathTransform?: SourcemapPathTransformOption; | ||
banner?: string | AddonFunction; | ||
footer?: string | AddonFunction; | ||
intro?: string | AddonFunction; | ||
outro?: string | AddonFunction; | ||
extend?: boolean; | ||
esModule?: boolean | 'if-default-prop'; | ||
assetFileNames?: string; | ||
entryFileNames?: string | ChunkFileNamesFunction; | ||
chunkFileNames?: string | ChunkFileNamesFunction; | ||
cssEntryFileNames?: string | ChunkFileNamesFunction; | ||
cssChunkFileNames?: string | ChunkFileNamesFunction; | ||
minify?: boolean; | ||
name?: string; | ||
globals?: Record<string, string> | GlobalsFunction; | ||
externalLiveBindings?: boolean; | ||
inlineDynamicImports?: boolean; | ||
advancedChunks?: { | ||
minSize?: number; | ||
minShareCount?: number; | ||
groups?: { | ||
name: string; | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
test?: string | RegExp | undefined; | ||
priority?: number | undefined; | ||
}[] | undefined; | ||
}, { | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
groups?: { | ||
name: string; | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
test?: string | RegExp | undefined; | ||
priority?: number | undefined; | ||
}[] | undefined; | ||
}>>; | ||
}, { | ||
banner: z.ZodOptional<z.ZodString>; | ||
footer: z.ZodOptional<z.ZodString>; | ||
intro: z.ZodOptional<z.ZodString>; | ||
outro: z.ZodOptional<z.ZodString>; | ||
esModule: z.ZodOptional<z.ZodBoolean>; | ||
advancedChunks: z.ZodOptional<z.ZodObject<{ | ||
minSize: z.ZodOptional<z.ZodNumber>; | ||
minShareCount: z.ZodOptional<z.ZodNumber>; | ||
}, "strict", z.ZodTypeAny, { | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
}, { | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
}>>; | ||
}>, "sourcemapIgnoreList" | "sourcemapPathTransform">, "strict", z.ZodTypeAny, { | ||
footer?: string | undefined; | ||
banner?: string | undefined; | ||
intro?: string | undefined; | ||
outro?: string | undefined; | ||
file?: string | undefined; | ||
name?: string | undefined; | ||
exports?: "auto" | "named" | "default" | "none" | undefined; | ||
esModule?: boolean | undefined; | ||
test?: StringOrRegExp; | ||
priority?: number; | ||
minSize?: number; | ||
minShareCount?: number; | ||
}[]; | ||
}; | ||
/** | ||
* Control comments in the output. | ||
* | ||
* - `none`: no comments | ||
* - `preserve-legal`: preserve comments that contain `@license`, `@preserve` or starts with `//!` `/*!` | ||
*/ | ||
comments?: 'none' | 'preserve-legal'; | ||
plugins?: RolldownOutputPluginOption; | ||
} | ||
interface OverwriteOutputOptionsForCli { | ||
banner?: string; | ||
footer?: string; | ||
intro?: string; | ||
outro?: string; | ||
esModule?: boolean; | ||
globals?: Record<string, string>; | ||
advancedChunks?: { | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
} | undefined; | ||
dir?: string | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined; | ||
sourcemap?: boolean | "inline" | "hidden" | undefined; | ||
extend?: boolean | undefined; | ||
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
assetFileNames?: string | undefined; | ||
minify?: boolean | undefined; | ||
globals?: Record<string, string> | undefined; | ||
externalLiveBindings?: boolean | undefined; | ||
inlineDynamicImports?: boolean | undefined; | ||
}, { | ||
footer?: string | undefined; | ||
banner?: string | undefined; | ||
intro?: string | undefined; | ||
outro?: string | undefined; | ||
file?: string | undefined; | ||
name?: string | undefined; | ||
exports?: "auto" | "named" | "default" | "none" | undefined; | ||
esModule?: boolean | undefined; | ||
advancedChunks?: { | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
} | undefined; | ||
dir?: string | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined; | ||
sourcemap?: boolean | "inline" | "hidden" | undefined; | ||
extend?: boolean | undefined; | ||
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
assetFileNames?: string | undefined; | ||
minify?: boolean | undefined; | ||
globals?: Record<string, string> | undefined; | ||
externalLiveBindings?: boolean | undefined; | ||
inlineDynamicImports?: boolean | undefined; | ||
}>; | ||
minSize?: number; | ||
minShareCount?: number; | ||
}; | ||
} | ||
export type OutputCliOptions = Omit<OutputOptions, keyof OverwriteOutputOptionsForCli | 'sourcemapIgnoreList' | 'sourcemapPathTransform'> & OverwriteOutputOptionsForCli; | ||
export {}; |
import type { BindingPluginOptions } from '../binding'; | ||
import type { hookFilterExtension, Plugin } from './index'; | ||
import { NormalizedInputOptions } from '../options/normalized-input-options'; | ||
import { PluginContextData } from './plugin-context-data'; | ||
import type { hookFilterExtension } from './index'; | ||
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta'; | ||
export declare function bindingifyBuildStart(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['buildStart']>; | ||
export declare function bindingifyBuildEnd(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['buildEnd']>; | ||
export declare function bindingifyResolveId(plugin: Plugin, normalizedOptions: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['resolveId'], hookFilterExtension<'transform'>>; | ||
export declare function bindingifyResolveDynamicImport(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['resolveDynamicImport']>; | ||
export declare function bindingifyTransform(plugin: Plugin, normalizedOptions: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['transform']>; | ||
export declare function bindingifyLoad(plugin: Plugin, normalized_options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['load']>; | ||
export declare function bindingifyModuleParsed(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['moduleParsed']>; | ||
import type { BindingifyPluginArgs } from './bindingify-plugin'; | ||
export declare function bindingifyBuildStart(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['buildStart']>; | ||
export declare function bindingifyBuildEnd(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['buildEnd']>; | ||
export declare function bindingifyResolveId(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['resolveId'], hookFilterExtension<'transform'>>; | ||
export declare function bindingifyResolveDynamicImport(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['resolveDynamicImport']>; | ||
export declare function bindingifyTransform(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['transform']>; | ||
export declare function bindingifyLoad(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['load']>; | ||
export declare function bindingifyModuleParsed(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['moduleParsed']>; |
@@ -0,17 +1,14 @@ | ||
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta'; | ||
import type { BindingifyPluginArgs } from './bindingify-plugin'; | ||
import type { BindingPluginOptions } from '../binding'; | ||
import type { NormalizedInputOptions } from '../options/normalized-input-options'; | ||
import type { Plugin } from './index'; | ||
import { NormalizedOutputOptions } from '../options/normalized-output-options'; | ||
import { PluginContextData } from './plugin-context-data'; | ||
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta'; | ||
export declare function bindingifyRenderStart(plugin: Plugin, options: NormalizedInputOptions, outputOptions: NormalizedOutputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['renderStart']>; | ||
export declare function bindingifyRenderChunk(plugin: Plugin, options: NormalizedInputOptions, outputOptions: NormalizedOutputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['renderChunk']>; | ||
export declare function bindingifyAugmentChunkHash(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['augmentChunkHash']>; | ||
export declare function bindingifyRenderError(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['renderError']>; | ||
export declare function bindingifyGenerateBundle(plugin: Plugin, options: NormalizedInputOptions, outputOptions: NormalizedOutputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['generateBundle']>; | ||
export declare function bindingifyWriteBundle(plugin: Plugin, options: NormalizedInputOptions, outputOptions: NormalizedOutputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['writeBundle']>; | ||
export declare function bindingifyCloseBundle(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['closeBundle']>; | ||
export declare function bindingifyBanner(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['banner']>; | ||
export declare function bindingifyFooter(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['footer']>; | ||
export declare function bindingifyIntro(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['intro']>; | ||
export declare function bindingifyOutro(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['outro']>; | ||
export declare function bindingifyRenderStart(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['renderStart']>; | ||
export declare function bindingifyRenderChunk(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['renderChunk']>; | ||
export declare function bindingifyAugmentChunkHash(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['augmentChunkHash']>; | ||
export declare function bindingifyRenderError(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['renderError']>; | ||
export declare function bindingifyGenerateBundle(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['generateBundle']>; | ||
export declare function bindingifyWriteBundle(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['writeBundle']>; | ||
export declare function bindingifyCloseBundle(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['closeBundle']>; | ||
export declare function bindingifyBanner(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['banner']>; | ||
export declare function bindingifyFooter(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['footer']>; | ||
export declare function bindingifyIntro(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['intro']>; | ||
export declare function bindingifyOutro(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['outro']>; |
import type { BindingPluginOptions } from '../binding'; | ||
import type { Plugin } from './index'; | ||
import type { NormalizedInputOptions } from '../options/normalized-input-options'; | ||
import type { NormalizedOutputOptions } from '../options/normalized-output-options'; | ||
import type { OutputOptions } from '../options/output-options'; | ||
import { PluginContextData } from './plugin-context-data'; | ||
export declare function bindingifyPlugin(plugin: Plugin, options: NormalizedInputOptions, outputOptions: NormalizedOutputOptions, pluginContextData: PluginContextData): BindingPluginOptions; | ||
import type { LogHandler, LogLevelOption } from '../rollup'; | ||
import type { InputOptions } from '../options/input-options'; | ||
export interface BindingifyPluginArgs { | ||
plugin: Plugin; | ||
options: InputOptions; | ||
outputOptions: OutputOptions; | ||
pluginContextData: PluginContextData; | ||
onLog: LogHandler; | ||
logLevel: LogLevelOption; | ||
} | ||
export declare function bindingifyPlugin(plugin: Plugin, options: InputOptions, outputOptions: OutputOptions, pluginContextData: PluginContextData, onLog: LogHandler, logLevel: LogLevelOption): BindingPluginOptions; |
import type { BindingPluginOptions } from '../binding'; | ||
import type { NormalizedInputOptions } from '../options/normalized-input-options'; | ||
import type { Plugin } from './index'; | ||
import { PluginContextData } from './plugin-context-data'; | ||
import { PluginHookWithBindingExt } from './bindingify-plugin-hook-meta'; | ||
export declare function bindingifyWatchChange(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['watchChange']>; | ||
export declare function bindingifyCloseWatcher(plugin: Plugin, options: NormalizedInputOptions, pluginContextData: PluginContextData): PluginHookWithBindingExt<BindingPluginOptions['closeWatcher']>; | ||
import { BindingifyPluginArgs } from './bindingify-plugin'; | ||
export declare function bindingifyWatchChange(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['watchChange']>; | ||
export declare function bindingifyCloseWatcher(args: BindingifyPluginArgs): PluginHookWithBindingExt<BindingPluginOptions['closeWatcher']>; |
import type { MaybeArray } from '../types/utils'; | ||
import type { StringOrRegExp } from '../constants/types'; | ||
import type { StringOrRegExp } from '../types/utils'; | ||
import type { ModuleType } from '../index'; | ||
@@ -4,0 +4,0 @@ export type StringFilter = MaybeArray<StringOrRegExp> | { |
@@ -12,5 +12,5 @@ import type { BindingHookResolveIdExtraArgs, BindingTransformHookExtraArgs, RenderedChunk } from '../binding'; | ||
import type { RollupLog } from '../rollup'; | ||
import type { MinimalPluginContext } from '../log/logger'; | ||
import type { MinimalPluginContext } from './minimal-plugin-context'; | ||
import { InputOptions, OutputOptions } from '..'; | ||
import { BuiltinPlugin } from './builtin-plugin'; | ||
import { BuiltinPlugin } from '../builtin-plugin/constructors'; | ||
import { ParallelPlugin } from './parallel-plugin'; | ||
@@ -123,3 +123,5 @@ import type { DefinedHookNames } from '../constants/plugin'; | ||
export type RolldownPlugin<A = any> = Plugin<A> | BuiltinPlugin | ParallelPlugin; | ||
export type RolldownPluginRec<A = any> = RolldownPlugin<A> | RolldownPlugin<A>[]; | ||
export type RolldownPluginOption<A = any> = MaybePromise<NullValue<RolldownPlugin<A>> | false | RolldownPluginOption[]>; | ||
export type RolldownOutputPlugin = OutputPlugin | BuiltinPlugin; | ||
export type RolldownOutputPluginOption = MaybePromise<NullValue<RolldownOutputPlugin> | false | RolldownOutputPluginOption[]>; | ||
export {}; |
@@ -7,4 +7,5 @@ import { BindingPluginContext } from '../binding'; | ||
resolveOptionsMap: Map<number, PluginContextResolveOptions>; | ||
loadModulePromiseMap: Map<string, Promise<void>>; | ||
updateModuleOption(id: string, option: ModuleOptions): void; | ||
getModuleOption(id: string): ModuleOptions | undefined; | ||
getModuleOption(id: string): ModuleOptions; | ||
getModuleInfo(id: string, context: BindingPluginContext): import("..").ModuleInfo | null; | ||
@@ -11,0 +12,0 @@ getModuleIds(context: BindingPluginContext): ArrayIterator<string>; |
import type { BindingPluginContext } from '../binding'; | ||
import type { NormalizedInputOptions } from '../options/normalized-input-options'; | ||
import type { CustomPluginOptions, Plugin, ResolvedId } from './index'; | ||
import { MinimalPluginContext } from '../log/logger'; | ||
import type { CustomPluginOptions, ModuleOptions, Plugin, ResolvedId } from './index'; | ||
import { MinimalPluginContext } from '../plugin/minimal-plugin-context'; | ||
import { AssetSource } from '../utils/asset-source'; | ||
@@ -9,2 +8,4 @@ import { ModuleInfo } from '../types/module-info'; | ||
import { SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF } from '../constants/plugin-context'; | ||
import { PartialNull } from '../types/utils'; | ||
import type { LogHandler, LogLevelOption } from '../rollup'; | ||
export interface EmittedAsset { | ||
@@ -26,2 +27,6 @@ type: 'asset'; | ||
export declare class PluginContext extends MinimalPluginContext { | ||
readonly load: (options: { | ||
id: string; | ||
resolveDependencies?: boolean; | ||
} & Partial<PartialNull<ModuleOptions>>) => Promise<ModuleInfo>; | ||
readonly resolve: (source: string, importer?: string, options?: PluginContextResolveOptions) => Promise<ResolvedId | null>; | ||
@@ -37,3 +42,3 @@ readonly emitFile: (file: EmittedAsset) => string; | ||
readonly parse: (input: string, options?: any) => any; | ||
constructor(options: NormalizedInputOptions, context: BindingPluginContext, plugin: Plugin, data: PluginContextData); | ||
constructor(context: BindingPluginContext, plugin: Plugin, data: PluginContextData, onLog: LogHandler, logLevel: LogLevelOption, currentLoadingModule?: string); | ||
} |
@@ -1,9 +0,8 @@ | ||
import { Plugin, RolldownPluginRec } from './'; | ||
import { NormalizedInputOptions } from '../options/normalized-input-options'; | ||
import { InputOptions, OutputOptions } from '..'; | ||
import { Plugin } from './'; | ||
import { InputOptions, OutputOptions, RolldownPlugin } from '..'; | ||
export declare class PluginDriver { | ||
callOptionsHook(inputOptions: InputOptions): Promise<InputOptions>; | ||
callOutputOptionsHook(inputOptions: NormalizedInputOptions, outputOptions: OutputOptions): OutputOptions; | ||
callOutputOptionsHook(rawPlugins: RolldownPlugin[], outputOptions: OutputOptions): OutputOptions; | ||
} | ||
export declare function getObjectPlugins(plugins: RolldownPluginRec[]): Plugin[]; | ||
export declare function getObjectPlugins(plugins: RolldownPlugin[]): Plugin[]; | ||
export declare function getSortedPlugins(hookName: 'options' | 'outputOptions' | 'onLog', plugins: readonly Plugin[]): Plugin[]; |
import type { BindingPluginContext, BindingTransformPluginContext } from '../binding'; | ||
import type { RollupError } from '../rollup'; | ||
import type { LogHandler, LogLevelOption, RollupError } from '../rollup'; | ||
import { PluginContext } from './plugin-context'; | ||
import { PluginContextData } from './plugin-context-data'; | ||
import { NormalizedInputOptions } from '..'; | ||
import type { Plugin } from './index'; | ||
@@ -12,3 +11,3 @@ export declare class TransformPluginContext extends PluginContext { | ||
}) => never; | ||
constructor(options: NormalizedInputOptions, context: BindingPluginContext, plugin: Plugin, data: PluginContextData, inner: BindingTransformPluginContext, moduleId: string, moduleSource: string); | ||
constructor(context: BindingPluginContext, plugin: Plugin, data: PluginContextData, inner: BindingTransformPluginContext, moduleId: string, moduleSource: string, onLog: LogHandler, LogLevelOption: LogLevelOption); | ||
} |
@@ -1,3 +0,3 @@ | ||
import type { InputOptions } from './types/input-options'; | ||
import type { OutputOptions } from './types/output-options'; | ||
import type { InputOptions } from './options/input-options'; | ||
import type { OutputOptions } from './options/output-options'; | ||
import type { RolldownOutput } from './types/rolldown-output'; | ||
@@ -7,5 +7,7 @@ export declare class RolldownBuild { | ||
constructor(inputOptions: InputOptions); | ||
get closed(): boolean; | ||
generate(outputOptions?: OutputOptions): Promise<RolldownOutput>; | ||
write(outputOptions?: OutputOptions): Promise<RolldownOutput>; | ||
close(): Promise<void>; | ||
[Symbol.asyncDispose](): Promise<void>; | ||
} |
@@ -1,5 +0,5 @@ | ||
import type { InputOptions } from './types/input-options'; | ||
import type { InputOptions } from './options/input-options'; | ||
import { RolldownBuild } from './rolldown-build'; | ||
import { Watcher } from './watcher'; | ||
import { WatchOptions } from './options/watch-option'; | ||
import { WatchOptions } from './options/watch-options'; | ||
export declare const rolldown: (input: InputOptions) => Promise<RolldownBuild>; | ||
@@ -6,0 +6,0 @@ export declare const watch: (input: WatchOptions) => Promise<Watcher>; |
@@ -1,13 +0,1 @@ | ||
export declare const TreeshakingOptionsSchema: import("zod").ZodObject<import("zod").objectUtil.extendShape<{ | ||
moduleSideEffects: import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>; | ||
}, { | ||
moduleSideEffects: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodBoolean, import("zod").ZodString]>>; | ||
}>, "strict", import("zod").ZodTypeAny, { | ||
moduleSideEffects?: string | boolean | undefined; | ||
}, { | ||
moduleSideEffects?: string | boolean | undefined; | ||
}>; | ||
export interface TreeshakingOptions { | ||
moduleSideEffects?: boolean | RegExp; | ||
} | ||
export * from './module-side-effects'; |
import { z } from 'zod'; | ||
export declare const HasModuleSideEffectsSchema: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodBoolean], z.ZodUnknown>, z.ZodBoolean>; | ||
export type HasModuleSideEffects = z.infer<typeof HasModuleSideEffectsSchema>; | ||
export type ModuleSideEffectsOption = z.infer<typeof ModuleSideEffectsOptionSchema>; | ||
export declare const ModuleSideEffectsOptionSchema: z.ZodUnion<[z.ZodBoolean, z.ZodString]>; | ||
export declare const NormalizedTreeshakingOptionsSchema: z.ZodObject<{ | ||
moduleSideEffects: z.ZodUnion<[z.ZodBoolean, z.ZodString]>; | ||
}, "strict", z.ZodTypeAny, { | ||
moduleSideEffects: string | boolean; | ||
export declare const ModuleSideEffectsRuleSchema: z.ZodEffects<z.ZodObject<{ | ||
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>; | ||
external: z.ZodOptional<z.ZodBoolean>; | ||
sideEffects: z.ZodBoolean; | ||
}, "strip", z.ZodTypeAny, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
moduleSideEffects: string | boolean; | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>; | ||
export type NormalizedTreeshakingOptions = { | ||
moduleSideEffects: string; | ||
}; | ||
export declare const ModuleSideEffectsOptionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>; | ||
external: z.ZodOptional<z.ZodBoolean>; | ||
sideEffects: z.ZodBoolean; | ||
}, "strip", z.ZodTypeAny, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>; | ||
export declare const TreeshakingOptionsSchema: z.ZodUnion<[z.ZodObject<{ | ||
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>; | ||
external: z.ZodOptional<z.ZodBoolean>; | ||
sideEffects: z.ZodBoolean; | ||
}, "strip", z.ZodTypeAny, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ | ||
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>; | ||
external: z.ZodOptional<z.ZodBoolean>; | ||
sideEffects: z.ZodBoolean; | ||
}, "strip", z.ZodTypeAny, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ | ||
moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>; | ||
external: z.ZodOptional<z.ZodBoolean>; | ||
sideEffects: z.ZodBoolean; | ||
}, "strip", z.ZodTypeAny, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough">>, z.ZodBoolean]>; | ||
export type TreeshakingOptions = z.infer<typeof TreeshakingOptionsSchema>; |
@@ -1,5 +0,5 @@ | ||
import type { InputOptions } from '../types/input-options'; | ||
import type { OutputOptions } from '../types/output-options'; | ||
import type { InputOptions } from '../options/input-options'; | ||
import type { OutputOptions } from '../options/output-options'; | ||
export interface RolldownOptions extends InputOptions { | ||
output?: OutputOptions; | ||
} |
import { AssetSource } from '../utils/asset-source'; | ||
import type { RenderedModule } from './rendered-module'; | ||
import type { RenderedModule } from '../binding'; | ||
export interface RolldownOutputAsset { | ||
@@ -4,0 +4,0 @@ type: 'asset'; |
import { Bundler } from '../binding'; | ||
import type { InputOptions } from '../types/input-options'; | ||
import type { OutputOptions } from '../types/output-options'; | ||
import type { InputOptions } from '../options/input-options'; | ||
import type { OutputOptions } from '../options/output-options'; | ||
export declare function createBundler(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<BundlerWithStopWorker>; | ||
@@ -5,0 +5,0 @@ export interface BundlerWithStopWorker { |
@@ -0,2 +1,5 @@ | ||
import type { RolldownOptions } from '../types/rolldown-options'; | ||
import type { ConfigExport } from '../types/config-export'; | ||
export declare function defineConfig(config: RolldownOptions): RolldownOptions; | ||
export declare function defineConfig(config: RolldownOptions[]): RolldownOptions[]; | ||
export declare function defineConfig(config: ConfigExport): ConfigExport; |
@@ -1,8 +0,13 @@ | ||
import type { OutputOptions, OutputPlugin } from '../rollup-types'; | ||
import type { InputOptions } from '../types/input-options'; | ||
import type { RolldownPlugin } from '../plugin'; | ||
import type { RolldownPlugin, RolldownOutputPlugin } from '../plugin'; | ||
import type { InputOptions } from '../options/input-options'; | ||
import type { OutputOptions } from '../options/output-options'; | ||
import { LogHandler } from '../rollup'; | ||
export declare const normalizePluginOption: { | ||
(plugins: InputOptions['plugins']): Promise<RolldownPlugin[]>; | ||
(plugins: OutputOptions['plugins']): Promise<OutputPlugin[]>; | ||
(plugins: OutputOptions['plugins']): Promise<RolldownOutputPlugin[]>; | ||
(plugins: unknown): Promise<any[]>; | ||
}; | ||
export declare function checkOutputPluginOption(plugins: RolldownOutputPlugin[], onLog: LogHandler): RolldownOutputPlugin[]; | ||
export declare function normalizePlugins<T extends RolldownPlugin>(plugins: T[], anonymousPrefix: string): T[]; | ||
export declare const ANONYMOUS_PLUGIN_PREFIX = "at position "; | ||
export declare const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = "at output position "; |
@@ -0,1 +1,3 @@ | ||
import { ExistingRawSourceMap, SourceMapInput } from '../types/sourcemap'; | ||
export declare function isEmptySourcemapFiled(array: undefined | (string | null)[]): boolean; | ||
export declare function normalizeTransformHookSourcemap(id: string, originalCode: string, rawMap?: SourceMapInput): ExistingRawSourceMap | undefined; |
@@ -5,2 +5,3 @@ import type { RolldownOutput } from '../types/rolldown-output'; | ||
export declare function transformToRollupOutput(output: BindingOutputs, changed?: ChangedOutputs): RolldownOutput; | ||
export declare function handleOutputErrors(output: BindingOutputs): void; | ||
export declare function transformToOutputBundle(output: BindingOutputs, changed: ChangedOutputs): OutputBundle; | ||
@@ -7,0 +8,0 @@ export interface ChangedOutputs { |
@@ -8,2 +8,3 @@ import { BindingWatcher } from './binding'; | ||
stopWorkers?: () => Promise<void>; | ||
listeners: Map<WatcherEvent, Array<(...parameters: any[]) => MaybePromise<void>>>; | ||
constructor(inner: BindingWatcher, stopWorkers?: () => Promise<void>); | ||
@@ -31,3 +32,4 @@ close(): Promise<void>; | ||
} | { | ||
code: 'ERROR'; /** error: RollupError; result: RollupBuild | null **/ | ||
code: 'ERROR'; | ||
error: Error; | ||
}; |
{ | ||
"name": "rolldown", | ||
"version": "0.14.0-snapshot-18ee4d3-20241107003320", | ||
"version": "0.14.0-snapshot-1cfa47c-20241129015040", | ||
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.", | ||
@@ -47,3 +47,2 @@ "homepage": "https://rolldown.rs/", | ||
}, | ||
"./watcher-worker": "./dist/shared/watcher-worker.js", | ||
"./package.json": "./package.json" | ||
@@ -81,3 +80,3 @@ }, | ||
}, | ||
"dtsHeader": "type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\nexport type BindingStringOrRegex = string | RegExp\n\n" | ||
"dtsHeader": "type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\nexport type BindingStringOrRegex = string | RegExp\n\nexport interface RenderedModule {\n readonly code: string | null\n renderedLength: number\n}\n\n" | ||
}, | ||
@@ -87,9 +86,18 @@ "dependencies": { | ||
}, | ||
"peerDependencies": { | ||
"@babel/runtime": ">=7" | ||
}, | ||
"peerDependenciesMeta": { | ||
"@babel/runtime": { | ||
"optional": true | ||
} | ||
}, | ||
"devDependencies": { | ||
"@jridgewell/sourcemap-codec": "^1.5.0", | ||
"@napi-rs/cli": "^3.0.0-alpha.60", | ||
"@napi-rs/wasm-runtime": "^0.2.4", | ||
"@types/fs-extra": "^11.0.4", | ||
"@types/lodash-es": "^4.17.12", | ||
"colorette": "^2.0.20", | ||
"consola": "^3.2.3", | ||
"cross-env": "^7.0.3", | ||
"emnapi": "^1.2.0", | ||
@@ -104,24 +112,24 @@ "execa": "^9.2.0", | ||
"signal-exit": "4.1.0", | ||
"source-map": "^0.7.4", | ||
"tsx": "^4.19.2", | ||
"type-fest": "^4.20.0", | ||
"unbuild": "^2.0.0", | ||
"vite": "^5.2.13", | ||
"vitest": "^2.0.0", | ||
"why-is-node-running": "^3.0.0", | ||
"zod-to-json-schema": "^3.23.2", | ||
"@rolldown/testing": "0.0.1", | ||
"rolldown": "0.14.0-snapshot-18ee4d3-20241107003320" | ||
"rolldown": "0.14.0-snapshot-1cfa47c-20241129015040" | ||
}, | ||
"optionalDependencies": { | ||
"@rolldown/binding-darwin-x64": "0.14.0-snapshot-18ee4d3-20241107003320", | ||
"@rolldown/binding-darwin-arm64": "0.14.0-snapshot-18ee4d3-20241107003320", | ||
"@rolldown/binding-linux-arm-gnueabihf": "0.14.0-snapshot-18ee4d3-20241107003320", | ||
"@rolldown/binding-freebsd-x64": "0.14.0-snapshot-18ee4d3-20241107003320", | ||
"@rolldown/binding-linux-arm64-gnu": "0.14.0-snapshot-18ee4d3-20241107003320", | ||
"@rolldown/binding-linux-arm64-musl": "0.14.0-snapshot-18ee4d3-20241107003320", | ||
"@rolldown/binding-linux-x64-gnu": "0.14.0-snapshot-18ee4d3-20241107003320", | ||
"@rolldown/binding-linux-x64-musl": "0.14.0-snapshot-18ee4d3-20241107003320", | ||
"@rolldown/binding-win32-arm64-msvc": "0.14.0-snapshot-18ee4d3-20241107003320", | ||
"@rolldown/binding-wasm32-wasi": "0.14.0-snapshot-18ee4d3-20241107003320", | ||
"@rolldown/binding-win32-ia32-msvc": "0.14.0-snapshot-18ee4d3-20241107003320", | ||
"@rolldown/binding-win32-x64-msvc": "0.14.0-snapshot-18ee4d3-20241107003320" | ||
"@rolldown/binding-darwin-arm64": "0.14.0-snapshot-1cfa47c-20241129015040", | ||
"@rolldown/binding-darwin-x64": "0.14.0-snapshot-1cfa47c-20241129015040", | ||
"@rolldown/binding-linux-arm-gnueabihf": "0.14.0-snapshot-1cfa47c-20241129015040", | ||
"@rolldown/binding-freebsd-x64": "0.14.0-snapshot-1cfa47c-20241129015040", | ||
"@rolldown/binding-linux-arm64-gnu": "0.14.0-snapshot-1cfa47c-20241129015040", | ||
"@rolldown/binding-linux-arm64-musl": "0.14.0-snapshot-1cfa47c-20241129015040", | ||
"@rolldown/binding-linux-x64-gnu": "0.14.0-snapshot-1cfa47c-20241129015040", | ||
"@rolldown/binding-linux-x64-musl": "0.14.0-snapshot-1cfa47c-20241129015040", | ||
"@rolldown/binding-wasm32-wasi": "0.14.0-snapshot-1cfa47c-20241129015040", | ||
"@rolldown/binding-win32-ia32-msvc": "0.14.0-snapshot-1cfa47c-20241129015040", | ||
"@rolldown/binding-win32-arm64-msvc": "0.14.0-snapshot-1cfa47c-20241129015040", | ||
"@rolldown/binding-win32-x64-msvc": "0.14.0-snapshot-1cfa47c-20241129015040" | ||
}, | ||
@@ -137,3 +145,3 @@ "scripts": { | ||
"bak_build-node": "unbuild", | ||
"build-node": "node ../../node_modules/npm-rolldown/bin/cli.js -c ./rolldown.config.mjs", | ||
"build-node": "tsx ./build.ts", | ||
"build-types": "tsc -p ./tsconfig.dts.json", | ||
@@ -143,6 +151,6 @@ "build-types-check": "tsc -p ./tsconfig.check.json", | ||
"build-native:release": "run-s build-binding:release build-types build-node build-types-check", | ||
"build-wasi:debug": "run-s build-binding:wasi build-node", | ||
"build-wasi:release": "run-s build-binding:wasi:release build-node", | ||
"build-wasi:debug": "run-s build-binding build-binding:wasi build-node", | ||
"build-wasi:release": "run-s build-binding build-binding:wasi:release build-node", | ||
"# Scrips for checking #": "_", | ||
"test": "cross-env RUST_BACKTRACE=1 ROLLDOWN_TEST=1 vitest run --reporter verbose --hideSkippedTests", | ||
"test": "pnpm run --filter rolldown-tests go", | ||
"test:update": "vitest run -u", | ||
@@ -149,0 +157,0 @@ "type-check": "tsc" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
708723
17186
25
361
36
330
14
24
105
7