Comparing version 0.14.0-snapshot-d5e797b-20241114003621 to 0.14.0-snapshot-db4090b-20241123003628
@@ -6,2 +6,20 @@ 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 { | ||
name: string | ||
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 { | ||
@@ -36,3 +54,3 @@ code: string | ||
get fileName(): string | ||
get modules(): Record<string, BindingRenderedModule> | ||
get modules(): Record<string, RenderedModule> | ||
get imports(): Array<string> | ||
@@ -50,6 +68,7 @@ get dynamicImports(): Array<string> | ||
get assets(): Array<BindingOutputAsset> | ||
get errors(): Array<unknown> | ||
} | ||
export declare class BindingPluginContext { | ||
load(specifier: string, fn: () => void): Promise<void> | ||
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 +82,6 @@ emitFile(file: BindingEmittedAsset): string | ||
export declare class BindingRenderedModule { | ||
get code(): string | null | ||
} | ||
export declare class BindingTransformPluginContext { | ||
@@ -70,5 +93,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 +114,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 | ||
} | ||
@@ -151,3 +188,4 @@ | ||
BuildImportAnalysisPlugin = 10, | ||
ReplacePlugin = 11 | ||
ReplacePlugin = 11, | ||
ViteResolvePlugin = 12 | ||
} | ||
@@ -165,2 +203,3 @@ | ||
disableLiveBindings?: boolean | ||
viteMode?: boolean | ||
} | ||
@@ -178,2 +217,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 +296,3 @@ code: string | ||
platform?: 'node' | 'browser' | 'neutral' | ||
logLevel?: BindingLogLevel | ||
logLevel: BindingLogLevel | ||
onLog: (logLevel: 'debug' | 'warn' | 'info', log: BindingLog) => void | ||
@@ -270,2 +325,6 @@ cwd: string | ||
export interface BindingJsWatchChangeEvent { | ||
event: string | ||
} | ||
export declare enum BindingLogLevel { | ||
@@ -322,3 +381,3 @@ Silent = 0, | ||
format?: 'es' | 'cjs' | 'iife' | 'umd' | ||
globals?: Record<string, string> | ||
globals?: Record<string, string> | ((name: string) => string) | ||
hashCharacters?: 'base64' | 'base36' | 'hex' | ||
@@ -410,6 +469,2 @@ inlineDynamicImports?: boolean | ||
export interface BindingRenderedModule { | ||
code?: string | ||
} | ||
export interface BindingReplacePluginConfig { | ||
@@ -460,11 +515,33 @@ values: Record<string, 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 { | ||
@@ -487,2 +564,4 @@ skipWrite?: boolean | ||
export declare function isCallableCompatibleBuiltinPlugin(plugin: BindingBuiltinPlugin): boolean | ||
/** TypeScript Isolated Declarations for Standalone DTS Emit */ | ||
@@ -531,3 +610,3 @@ export declare function isolatedDeclaration(filename: string, sourceText: string, options?: IsolatedDeclarationsOptions | undefined | null): IsolatedDeclarationsResult | ||
filename: string | ||
modules: Record<string, BindingRenderedModule> | ||
modules: Record<string, RenderedModule> | ||
imports: Array<string> | ||
@@ -629,3 +708,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} | ||
* | ||
@@ -672,3 +751,3 @@ * @default false | ||
fileName: string | ||
modules: Record<string, BindingRenderedModule> | ||
modules: Record<string, RenderedModule> | ||
imports: Array<string> | ||
@@ -675,0 +754,0 @@ dynamicImports: Array<string> |
@@ -59,17 +59,18 @@ import type { ObjectSchema } from './types'; | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ | ||
@@ -82,17 +83,18 @@ moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ | ||
@@ -105,17 +107,18 @@ moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough">>, z.ZodBoolean]>>; | ||
@@ -206,3 +209,3 @@ logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>; | ||
treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames" | "watch">>, Omit<z.objectUtil.extendShape<{ | ||
}>, "onLog" | "onwarn" | "input" | "resolve" | "watch" | "plugins" | "experimental" | "profilerNames">>, Omit<z.objectUtil.extendShape<{ | ||
dir: z.ZodOptional<z.ZodString>; | ||
@@ -229,3 +232,3 @@ file: z.ZodOptional<z.ZodString>; | ||
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>>; | ||
@@ -283,2 +286,3 @@ inlineDynamicImports: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
esModule: z.ZodOptional<z.ZodBoolean>; | ||
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
advancedChunks: z.ZodOptional<z.ZodObject<{ | ||
@@ -295,30 +299,11 @@ minSize: z.ZodOptional<z.ZodNumber>; | ||
}>, "sourcemapIgnoreList" | "sourcemapPathTransform">>, "strict", z.ZodTypeAny, { | ||
external?: string[] | undefined; | ||
treeshake?: boolean | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | undefined; | ||
shimMissingExports?: boolean | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
moduleTypes?: Record<string, "jsx" | "base64" | "js" | "ts" | "tsx" | "json" | "text" | "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; | ||
dropLabels?: string[] | undefined; | ||
file?: string | 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?: { | ||
@@ -339,19 +324,6 @@ minSize?: number | undefined; | ||
minify?: boolean | undefined; | ||
globals?: Record<string, string> | undefined; | ||
externalLiveBindings?: boolean | undefined; | ||
inlineDynamicImports?: boolean | undefined; | ||
comments?: "none" | "preserve-legal" | undefined; | ||
version?: boolean | undefined; | ||
config?: string | boolean | undefined; | ||
help?: boolean | undefined; | ||
}, { | ||
external?: string[] | undefined; | ||
treeshake?: boolean | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | undefined; | ||
shimMissingExports?: boolean | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
moduleTypes?: Record<string, "jsx" | "base64" | "js" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
inject?: Record<string, string> | undefined; | ||
jsx?: { | ||
@@ -366,12 +338,25 @@ development?: boolean | undefined; | ||
} | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
treeshake?: boolean | undefined; | ||
inject?: Record<string, string> | undefined; | ||
watch?: boolean | undefined; | ||
version?: boolean | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | 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; | ||
}, { | ||
file?: string | 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?: { | ||
@@ -392,7 +377,26 @@ minSize?: number | undefined; | ||
minify?: boolean | undefined; | ||
globals?: Record<string, string> | undefined; | ||
externalLiveBindings?: boolean | undefined; | ||
inlineDynamicImports?: 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; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
treeshake?: boolean | undefined; | ||
inject?: Record<string, string> | undefined; | ||
watch?: boolean | undefined; | ||
version?: boolean | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | 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; | ||
@@ -399,0 +403,0 @@ help?: boolean | undefined; |
@@ -6,2 +6,2 @@ 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, transformPlugin, aliasPlugin, jsonPlugin, buildImportAnalysisPlugin, replacePlugin, viteResolvePlugin, isCallableCompatibleBuiltinPlugin, makeBuiltinPluginCallable, isCallableBuiltinPlugin, } from './plugin/builtin-plugin'; |
@@ -22,6 +22,7 @@ import { RolldownOutput, RolldownOutputAsset, RolldownOutputChunk, SourceMap } from './types/rolldown-output'; | ||
import { WatchOptions } from './options/watch-option'; | ||
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'; |
@@ -12,6 +12,6 @@ import type { LoggingFunction, LogHandler, RollupError } from '../rollup'; | ||
export declare class MinimalPluginContext { | ||
info: LoggingFunction; | ||
warn: LoggingFunction; | ||
debug: LoggingFunction; | ||
info: LoggingFunction; | ||
meta: PluginContextMeta; | ||
warn: LoggingFunction; | ||
readonly error: (error: RollupError | string) => never; | ||
@@ -21,2 +21,2 @@ constructor(options: NormalizedInputOptions, plugin: Plugin); | ||
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; |
@@ -1,4 +0,5 @@ | ||
import { BindingInputOptions } from '../binding'; | ||
import type { RolldownPlugin } from '..'; | ||
import type { NormalizedInputOptions } from './normalized-input-options'; | ||
import type { NormalizedOutputOptions } from './normalized-output-options'; | ||
export declare function bindingifyInputOptions(options: NormalizedInputOptions, outputOptions: NormalizedOutputOptions): BindingInputOptions; | ||
import type { BindingInputOptions } from '../binding'; | ||
export declare function bindingifyInputOptions(rawPlugins: RolldownPlugin[], inputOptions: NormalizedInputOptions, outputOptions: NormalizedOutputOptions): BindingInputOptions; |
@@ -54,17 +54,18 @@ import { z } from 'zod'; | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ | ||
@@ -77,17 +78,18 @@ moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ | ||
@@ -100,17 +102,18 @@ moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough">>, z.ZodBoolean]>>; | ||
@@ -198,3 +201,29 @@ logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>; | ||
}, "strict", z.ZodTypeAny, { | ||
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; | ||
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | 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; | ||
input?: string | string[] | Record<string, string> | 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; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
treeshake?: boolean | z.objectOutputType<{ | ||
@@ -207,48 +236,47 @@ moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough"> | undefined; | ||
input?: string | string[] | Record<string, string> | undefined; | ||
inject?: Record<string, string | [string, string]> | 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; | ||
plugins?: RolldownPluginRec[] | 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; | ||
experimental?: { | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
enableComposingJsPlugins?: boolean | undefined; | ||
} | undefined; | ||
profilerNames?: boolean | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | undefined; | ||
shimMissingExports?: boolean | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
moduleTypes?: Record<string, "base64" | "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
dropLabels?: string[] | 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" | "base64" | "js" | "ts" | "tsx" | "json" | "text" | "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; | ||
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined; | ||
jsx?: { | ||
@@ -263,15 +291,17 @@ development?: boolean | 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; | ||
input?: string | string[] | Record<string, string> | 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; | ||
dropLabels?: string[] | undefined; | ||
}, { | ||
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
treeshake?: boolean | z.objectInputType<{ | ||
@@ -284,57 +314,20 @@ moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough"> | undefined; | ||
input?: string | string[] | Record<string, string> | undefined; | ||
plugins?: RolldownPluginRec[] | 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" | "base64" | "js" | "ts" | "tsx" | "json" | "text" | "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 | { | ||
@@ -350,2 +343,14 @@ include?: string | RegExp | (string | RegExp)[] | undefined; | ||
} | undefined; | ||
plugins?: RolldownPluginRec[] | undefined; | ||
experimental?: { | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
enableComposingJsPlugins?: boolean | undefined; | ||
} | undefined; | ||
profilerNames?: boolean | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | 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; | ||
@@ -404,17 +409,18 @@ }>; | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ | ||
@@ -427,17 +433,18 @@ moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ | ||
@@ -450,17 +457,18 @@ moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough">>, z.ZodBoolean]>>; | ||
@@ -551,12 +559,4 @@ logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>; | ||
treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames" | "watch">, "strict", z.ZodTypeAny, { | ||
}>, "onLog" | "onwarn" | "input" | "resolve" | "watch" | "plugins" | "experimental" | "profilerNames">, "strict", z.ZodTypeAny, { | ||
external?: string[] | undefined; | ||
treeshake?: boolean | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | undefined; | ||
shimMissingExports?: boolean | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
moduleTypes?: Record<string, "jsx" | "base64" | "js" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
inject?: Record<string, string> | undefined; | ||
jsx?: { | ||
@@ -571,13 +571,13 @@ development?: boolean | undefined; | ||
} | undefined; | ||
dropLabels?: string[] | undefined; | ||
}, { | ||
external?: string[] | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
treeshake?: boolean | undefined; | ||
inject?: Record<string, string> | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | undefined; | ||
shimMissingExports?: boolean | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
moduleTypes?: Record<string, "jsx" | "base64" | "js" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
moduleTypes?: Record<string, "base64" | "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
inject?: Record<string, string> | undefined; | ||
dropLabels?: string[] | undefined; | ||
}, { | ||
external?: string[] | undefined; | ||
jsx?: { | ||
@@ -592,3 +592,11 @@ development?: boolean | undefined; | ||
} | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
treeshake?: boolean | undefined; | ||
inject?: Record<string, string> | undefined; | ||
cwd?: string | undefined; | ||
platform?: "node" | "browser" | "neutral" | 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; | ||
}>; |
@@ -1,12 +0,3 @@ | ||
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; | ||
export interface NormalizedInputOptions extends InputOptions { | ||
} |
@@ -1,18 +0,4 @@ | ||
import type { SourcemapIgnoreListOption } from '../rollup'; | ||
import type { AddonFunction, OutputOptions } from '../types/output-options'; | ||
import type { RolldownPlugin } from '../plugin'; | ||
import type { OutputOptions } from '../types/output-options'; | ||
export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'umd'; | ||
export interface NormalizedOutputOptions extends OutputOptions { | ||
plugins: RolldownPlugin[]; | ||
format: InternalModuleFormat; | ||
exports: 'auto' | 'named' | 'default' | 'none'; | ||
sourcemap: boolean | 'inline' | 'hidden'; | ||
sourcemapIgnoreList: SourcemapIgnoreListOption; | ||
banner: AddonFunction; | ||
footer: AddonFunction; | ||
intro: AddonFunction; | ||
outro: AddonFunction; | ||
esModule: boolean | 'if-default-prop'; | ||
assetFileNames: string; | ||
inlineDynamicImports: boolean; | ||
} |
@@ -26,3 +26,3 @@ import { z } from 'zod'; | ||
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>>; | ||
@@ -80,2 +80,3 @@ inlineDynamicImports: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
esModule: z.ZodOptional<z.ZodBoolean>; | ||
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; | ||
advancedChunks: z.ZodOptional<z.ZodObject<{ | ||
@@ -92,10 +93,11 @@ minSize: z.ZodOptional<z.ZodNumber>; | ||
}>, "sourcemapIgnoreList" | "sourcemapPathTransform">, "strict", z.ZodTypeAny, { | ||
file?: string | 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?: { | ||
@@ -116,3 +118,2 @@ minSize?: number | undefined; | ||
minify?: boolean | undefined; | ||
globals?: Record<string, string> | undefined; | ||
externalLiveBindings?: boolean | undefined; | ||
@@ -122,10 +123,11 @@ inlineDynamicImports?: boolean | undefined; | ||
}, { | ||
file?: string | 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?: { | ||
@@ -146,3 +148,2 @@ minSize?: number | undefined; | ||
minify?: boolean | undefined; | ||
globals?: Record<string, string> | undefined; | ||
externalLiveBindings?: boolean | undefined; | ||
@@ -149,0 +150,0 @@ inlineDynamicImports?: boolean | undefined; |
import { TransformPluginConfig } from '../options/normalized-ecma-transform-plugin-config'; | ||
import { AliasPluginConfig } from '../options/normalized-alias-plugin-config'; | ||
import { BindingBuiltinPluginName, BindingGlobImportPluginConfig, BindingBuiltinPlugin, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingJsonPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingReplacePluginConfig } from '../binding'; | ||
import { BindingBuiltinPluginName, BindingGlobImportPluginConfig, BindingBuiltinPlugin, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingJsonPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingReplacePluginConfig, type BindingViteResolvePluginConfig, BindingCallableBuiltinPlugin } from '../binding'; | ||
export declare class BuiltinPlugin { | ||
@@ -45,2 +45,5 @@ name: BindingBuiltinPluginName; | ||
} | ||
export declare class ViteResolvePlugin extends BuiltinPlugin { | ||
constructor(config?: BindingViteResolvePluginConfig); | ||
} | ||
export declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): ModulePreloadPolyfillPlugin; | ||
@@ -57,2 +60,3 @@ export declare function dynamicImportVarsPlugin(): DynamicImportVarsPlugin; | ||
export declare function buildImportAnalysisPlugin(config: BindingBuildImportAnalysisPluginConfig): BuildImportAnalysisPlugin; | ||
export declare function viteResolvePlugin(config: Omit<BindingViteResolvePluginConfig, 'runtime'>): ViteResolvePlugin; | ||
/** | ||
@@ -83,2 +87,11 @@ * ## Usage | ||
export declare function replacePlugin(values?: BindingReplacePluginConfig['values'], options?: Omit<BindingReplacePluginConfig, 'values'>): ReplacePlugin; | ||
export declare function isCallableCompatibleBuiltinPlugin(plugin: any): plugin is BuiltinPlugin; | ||
type BindingCallableBuiltinPluginLike = { | ||
[K in keyof BindingCallableBuiltinPlugin]: BindingCallableBuiltinPlugin[K]; | ||
}; | ||
export declare function makeBuiltinPluginCallable(plugin: BuiltinPlugin): BindingCallableBuiltinPluginLike & { | ||
_original: BindingCallableBuiltinPlugin; | ||
}; | ||
export declare function isCallableBuiltinPlugin(plugin: any): boolean; | ||
export declare function bindingifyBuiltInPlugin(plugin: BuiltinPlugin): BindingBuiltinPlugin; | ||
export {}; |
@@ -7,2 +7,3 @@ import { BindingPluginContext } from '../binding'; | ||
resolveOptionsMap: Map<number, PluginContextResolveOptions>; | ||
loadModulePromiseMap: Map<string, Promise<void>>; | ||
updateModuleOption(id: string, option: ModuleOptions): void; | ||
@@ -9,0 +10,0 @@ getModuleOption(id: string): ModuleOptions | undefined; |
import { Plugin, RolldownPluginRec } from './'; | ||
import { NormalizedInputOptions } from '../options/normalized-input-options'; | ||
import { InputOptions, OutputOptions } 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 getSortedPlugins(hookName: 'options' | 'outputOptions' | 'onLog', plugins: readonly Plugin[]): Plugin[]; |
@@ -7,5 +7,7 @@ import type { InputOptions } from './types/input-options'; | ||
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,1 @@ | ||
import { ModuleSideEffectsRule } from './module-side-effects'; | ||
export interface NormalizedTreeshakingOptions { | ||
moduleSideEffects: boolean | ModuleSideEffectsRule[]; | ||
} | ||
export * from './module-side-effects'; |
@@ -9,18 +9,17 @@ import { z } from 'zod'; | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>; | ||
export type ModuleSideEffectsRule = z.infer<typeof ModuleSideEffectsRuleSchema>; | ||
export declare const ModuleSideEffectsOptionSchema: z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
@@ -32,16 +31,16 @@ test: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>; | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>; | ||
@@ -55,17 +54,18 @@ export declare const TreeshakingOptionsSchema: z.ZodUnion<[z.ZodObject<{ | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{ | ||
@@ -78,17 +78,18 @@ moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{ | ||
@@ -101,18 +102,19 @@ moduleSideEffects: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEffects<z.ZodObject<{ | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}, { | ||
sideEffects: boolean; | ||
external?: boolean | undefined; | ||
test?: RegExp | undefined; | ||
external?: boolean | undefined; | ||
}>, "many">]>, z.ZodLiteral<"no-external">]>>; | ||
annotations: z.ZodOptional<z.ZodBoolean>; | ||
}, z.ZodTypeAny, "passthrough">>, z.ZodBoolean]>; | ||
export type TreeshakingOptions = z.infer<typeof TreeshakingOptionsSchema>; |
@@ -45,2 +45,9 @@ import { RolldownPluginRec } from '../plugin'; | ||
cwd?: string; | ||
/** | ||
* Expected platform where the code run. | ||
* | ||
* @default | ||
* - 'node' if the format is 'cjs' | ||
* - 'browser' for other formats | ||
*/ | ||
platform?: 'node' | 'browser' | 'neutral'; | ||
@@ -57,2 +64,3 @@ shimMissingExports?: boolean; | ||
disableLiveBindings?: boolean; | ||
viteMode?: boolean; | ||
}; | ||
@@ -59,0 +67,0 @@ define?: Record<string, string>; |
@@ -7,2 +7,3 @@ import type { StringOrRegExp } from './utils'; | ||
export type ChunkFileNamesFunction = (chunkInfo: PreRenderedChunk) => string; | ||
export type GlobalsFunction = (name: string) => string; | ||
export interface OutputOptions { | ||
@@ -13,2 +14,11 @@ dir?: string; | ||
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; | ||
@@ -31,3 +41,3 @@ sourcemap?: boolean | 'inline' | 'hidden'; | ||
name?: string; | ||
globals?: Record<string, string>; | ||
globals?: Record<string, string> | GlobalsFunction; | ||
externalLiveBindings?: boolean; | ||
@@ -60,2 +70,3 @@ inlineDynamicImports?: boolean; | ||
esModule?: boolean; | ||
globals?: Record<string, string>; | ||
advancedChunks?: { | ||
@@ -62,0 +73,0 @@ minSize?: number; |
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'; |
@@ -0,4 +1,4 @@ | ||
import type { RolldownPlugin } from '../plugin'; | ||
import type { InputOptions } from '../types/input-options'; | ||
import type { OutputOptions, OutputPlugin } from '../rollup-types'; | ||
import type { InputOptions } from '../types/input-options'; | ||
import type { RolldownPlugin } from '../plugin'; | ||
export declare const normalizePluginOption: { | ||
@@ -5,0 +5,0 @@ (plugins: InputOptions['plugins']): Promise<RolldownPlugin[]>; |
@@ -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>); | ||
@@ -32,5 +33,3 @@ close(): Promise<void>; | ||
code: 'ERROR'; | ||
error: { | ||
message: string; | ||
}; | ||
error: Error; | ||
}; |
{ | ||
"name": "rolldown", | ||
"version": "0.14.0-snapshot-d5e797b-20241114003621", | ||
"version": "0.14.0-snapshot-db4090b-20241123003628", | ||
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.", | ||
@@ -79,3 +79,3 @@ "homepage": "https://rolldown.rs/", | ||
}, | ||
"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" | ||
}, | ||
@@ -108,18 +108,18 @@ "dependencies": { | ||
"zod-to-json-schema": "^3.23.2", | ||
"@rolldown/testing": "0.0.1", | ||
"rolldown": "0.14.0-snapshot-d5e797b-20241114003621" | ||
"rolldown": "0.14.0-snapshot-db4090b-20241123003628", | ||
"@rolldown/testing": "0.0.1" | ||
}, | ||
"optionalDependencies": { | ||
"@rolldown/binding-darwin-arm64": "0.14.0-snapshot-d5e797b-20241114003621", | ||
"@rolldown/binding-linux-arm-gnueabihf": "0.14.0-snapshot-d5e797b-20241114003621", | ||
"@rolldown/binding-darwin-x64": "0.14.0-snapshot-d5e797b-20241114003621", | ||
"@rolldown/binding-freebsd-x64": "0.14.0-snapshot-d5e797b-20241114003621", | ||
"@rolldown/binding-linux-arm64-musl": "0.14.0-snapshot-d5e797b-20241114003621", | ||
"@rolldown/binding-linux-x64-gnu": "0.14.0-snapshot-d5e797b-20241114003621", | ||
"@rolldown/binding-linux-x64-musl": "0.14.0-snapshot-d5e797b-20241114003621", | ||
"@rolldown/binding-linux-arm64-gnu": "0.14.0-snapshot-d5e797b-20241114003621", | ||
"@rolldown/binding-wasm32-wasi": "0.14.0-snapshot-d5e797b-20241114003621", | ||
"@rolldown/binding-win32-arm64-msvc": "0.14.0-snapshot-d5e797b-20241114003621", | ||
"@rolldown/binding-win32-x64-msvc": "0.14.0-snapshot-d5e797b-20241114003621", | ||
"@rolldown/binding-win32-ia32-msvc": "0.14.0-snapshot-d5e797b-20241114003621" | ||
"@rolldown/binding-darwin-arm64": "0.14.0-snapshot-db4090b-20241123003628", | ||
"@rolldown/binding-darwin-x64": "0.14.0-snapshot-db4090b-20241123003628", | ||
"@rolldown/binding-linux-arm64-gnu": "0.14.0-snapshot-db4090b-20241123003628", | ||
"@rolldown/binding-linux-arm64-musl": "0.14.0-snapshot-db4090b-20241123003628", | ||
"@rolldown/binding-freebsd-x64": "0.14.0-snapshot-db4090b-20241123003628", | ||
"@rolldown/binding-linux-arm-gnueabihf": "0.14.0-snapshot-db4090b-20241123003628", | ||
"@rolldown/binding-linux-x64-gnu": "0.14.0-snapshot-db4090b-20241123003628", | ||
"@rolldown/binding-wasm32-wasi": "0.14.0-snapshot-db4090b-20241123003628", | ||
"@rolldown/binding-win32-arm64-msvc": "0.14.0-snapshot-db4090b-20241123003628", | ||
"@rolldown/binding-win32-ia32-msvc": "0.14.0-snapshot-db4090b-20241123003628", | ||
"@rolldown/binding-win32-x64-msvc": "0.14.0-snapshot-db4090b-20241123003628", | ||
"@rolldown/binding-linux-x64-musl": "0.14.0-snapshot-db4090b-20241123003628" | ||
}, | ||
@@ -126,0 +126,0 @@ "scripts": { |
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
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
721804
18079
104