Comparing version 0.13.2-snapshot-1daf8e4-20241014003453 to 0.13.2-snapshot-22bf6b5-20241023003702
@@ -54,2 +54,3 @@ type MaybePromise<T> = T | Promise<T> | ||
getModuleIds(): Array<string> | null | ||
addWatchFile(file: string): void | ||
} | ||
@@ -61,2 +62,7 @@ | ||
export declare class BindingWatcher { | ||
close(): Promise<void> | ||
on(event: BindingWatcherEvent, listener: (data?: Record<string, string>) => void): void | ||
} | ||
export declare class Bundler { | ||
@@ -68,3 +74,3 @@ constructor(inputOptions: BindingInputOptions, outputOptions: BindingOutputOptions, parallelPluginsRegistry?: ParallelJsPluginRegistry | undefined | null) | ||
close(): Promise<void> | ||
watch(): Promise<void> | ||
watch(): Promise<BindingWatcher> | ||
} | ||
@@ -235,2 +241,4 @@ | ||
profilerNames?: boolean | ||
jsx?: JsxOptions | ||
watch?: BindingWatchOption | ||
} | ||
@@ -276,2 +284,7 @@ | ||
export interface BindingNotifyOption { | ||
pollInterval?: number | ||
compareContents?: boolean | ||
} | ||
export interface BindingOutputOptions { | ||
@@ -352,2 +365,4 @@ name?: string | ||
watchChangeMeta?: BindingPluginHookMeta | ||
closeWatcher?: (ctx: BindingPluginContext) => MaybePromise<VoidNullable> | ||
closeWatcherMeta?: BindingPluginHookMeta | ||
banner?: (ctx: BindingPluginContext, chunk: RenderedChunk) => void | ||
@@ -437,2 +452,14 @@ bannerMeta?: BindingPluginHookMeta | ||
export declare enum BindingWatcherEvent { | ||
Close = 0, | ||
Event = 1, | ||
ReStart = 2, | ||
Change = 3 | ||
} | ||
export interface BindingWatchOption { | ||
skipWrite?: boolean | ||
notify?: BindingNotifyOption | ||
} | ||
export interface Es2015Options { | ||
@@ -764,2 +791,1 @@ /** Transform arrow functions into function expressions. */ | ||
} | ||
@@ -56,3 +56,3 @@ import type { ObjectSchema } from './types'; | ||
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.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">]>>>; | ||
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<{ | ||
@@ -74,2 +74,55 @@ enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>; | ||
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, { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | undefined; | ||
}, { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | 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; | ||
}>>; | ||
chokidar: z.ZodOptional<z.ZodAny>; | ||
}, "strict", z.ZodTypeAny, { | ||
skipWrite?: boolean | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
chokidar?: any; | ||
}, { | ||
skipWrite?: boolean | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
chokidar?: any; | ||
}>, z.ZodLiteral<false>]>>; | ||
}, { | ||
@@ -79,3 +132,3 @@ external: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames">>, Omit<z.objectUtil.extendShape<{ | ||
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames" | "watch">>, Omit<z.objectUtil.extendShape<{ | ||
dir: z.ZodOptional<z.ZodString>; | ||
@@ -167,5 +220,15 @@ exports: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"named">]>, z.ZodLiteral<"default">]>, z.ZodLiteral<"none">]>>; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined; | ||
jsx?: { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | undefined; | ||
} | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
inject?: Record<string, string> | undefined; | ||
watch?: boolean | undefined; | ||
footer?: string | undefined; | ||
@@ -194,3 +257,2 @@ banner?: string | undefined; | ||
version?: boolean | undefined; | ||
watch?: boolean | undefined; | ||
config?: string | boolean | undefined; | ||
@@ -205,5 +267,15 @@ help?: boolean | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined; | ||
jsx?: { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | undefined; | ||
} | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
inject?: Record<string, string> | undefined; | ||
watch?: boolean | undefined; | ||
footer?: string | undefined; | ||
@@ -232,3 +304,2 @@ banner?: string | undefined; | ||
version?: boolean | undefined; | ||
watch?: boolean | undefined; | ||
config?: string | boolean | undefined; | ||
@@ -235,0 +306,0 @@ help?: boolean | undefined; |
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"]; | ||
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"]; | ||
/** | ||
@@ -4,0 +4,0 @@ * Names of all properties in a `Plugin` object. Includes `name` and `api`. |
import { RolldownOutput, RolldownOutputAsset, RolldownOutputChunk, SourceMap } from './types/rolldown-output'; | ||
import type { ExternalOption, InputOption, InputOptions } from './options/input-options'; | ||
import type { ExternalOption, InputOption, InputOptions, JsxOptions } from './options/input-options'; | ||
import type { ModuleFormat, OutputOptions } from './options/output-options'; | ||
@@ -21,6 +21,7 @@ import type { RolldownOptions } from './types/rolldown-options'; | ||
import { OutputBundle } from './types/output-bundle'; | ||
import { WatchOptions } from './options/watch-option'; | ||
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, }; | ||
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 { RolldownOutput as RollupOutput, RolldownOptions as RollupOptions, RolldownBuild as RollupBuild, RolldownOutputChunk as OutputChunk, RolldownOutputAsset as OutputAsset, }; | ||
export type { RollupError, RollupLog, LoggingFunction } from './rollup'; |
@@ -6,2 +6,27 @@ import type { RolldownPluginRec } from '../plugin'; | ||
declare const externalSchema: 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]>>]>; | ||
declare const jsxOptionsSchema: 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, { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | undefined; | ||
}, { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | undefined; | ||
}>; | ||
export declare const inputOptionsSchema: z.ZodObject<{ | ||
@@ -55,3 +80,3 @@ input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>; | ||
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.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">]>>>; | ||
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<{ | ||
@@ -73,2 +98,55 @@ enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>; | ||
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, { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | undefined; | ||
}, { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | 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; | ||
}>>; | ||
chokidar: z.ZodOptional<z.ZodAny>; | ||
}, "strict", z.ZodTypeAny, { | ||
skipWrite?: boolean | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
chokidar?: any; | ||
}, { | ||
skipWrite?: boolean | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
chokidar?: any; | ||
}>, z.ZodLiteral<false>]>>; | ||
}, "strict", z.ZodTypeAny, { | ||
@@ -98,3 +176,12 @@ input?: string | string[] | Record<string, string> | undefined; | ||
onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined; | ||
jsx?: { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | undefined; | ||
} | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
experimental?: { | ||
@@ -108,2 +195,10 @@ enableComposingJsPlugins?: boolean | undefined; | ||
profilerNames?: boolean | undefined; | ||
watch?: false | { | ||
skipWrite?: boolean | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
chokidar?: any; | ||
} | undefined; | ||
}, { | ||
@@ -133,3 +228,12 @@ input?: string | string[] | Record<string, string> | undefined; | ||
onwarn?: ((args_0: any, args_1: (args_0: any, ...args: unknown[]) => unknown, ...args: unknown[]) => unknown) | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined; | ||
jsx?: { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | undefined; | ||
} | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
experimental?: { | ||
@@ -143,2 +247,10 @@ enableComposingJsPlugins?: boolean | undefined; | ||
profilerNames?: boolean | undefined; | ||
watch?: false | { | ||
skipWrite?: boolean | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
chokidar?: any; | ||
} | undefined; | ||
}>; | ||
@@ -193,3 +305,3 @@ export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{ | ||
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.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">]>>>; | ||
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<{ | ||
@@ -211,2 +323,55 @@ enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>; | ||
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, { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | undefined; | ||
}, { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | 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; | ||
}>>; | ||
chokidar: z.ZodOptional<z.ZodAny>; | ||
}, "strict", z.ZodTypeAny, { | ||
skipWrite?: boolean | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
chokidar?: any; | ||
}, { | ||
skipWrite?: boolean | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
chokidar?: any; | ||
}>, z.ZodLiteral<false>]>>; | ||
}, { | ||
@@ -216,3 +381,3 @@ external: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames">, "strict", z.ZodTypeAny, { | ||
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames" | "watch">, "strict", z.ZodTypeAny, { | ||
external?: string[] | undefined; | ||
@@ -224,3 +389,12 @@ cwd?: string | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined; | ||
jsx?: { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | undefined; | ||
} | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
@@ -235,3 +409,12 @@ inject?: Record<string, string> | undefined; | ||
logLevel?: "info" | "debug" | "warn" | "silent" | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | undefined; | ||
jsx?: { | ||
mode?: "classic" | "automatic" | undefined; | ||
factory?: string | undefined; | ||
fragment?: string | undefined; | ||
importSource?: string | undefined; | ||
jsxImportSource?: string | undefined; | ||
refresh?: boolean | undefined; | ||
development?: boolean | undefined; | ||
} | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined; | ||
define?: Record<string, string> | undefined; | ||
@@ -270,2 +453,3 @@ inject?: Record<string, string> | undefined; | ||
export type ExternalOption = z.infer<typeof externalSchema>; | ||
export type JsxOptions = z.infer<typeof jsxOptionsSchema>; | ||
export {}; |
@@ -7,1 +7,2 @@ import type { BindingPluginOptions } from '../binding'; | ||
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']>; |
@@ -83,2 +83,3 @@ import type { BindingHookResolveIdExtraArgs, BindingTransformHookExtraArgs, RenderedChunk } from '../binding'; | ||
}) => void; | ||
[DEFINED_HOOK_NAMES.closeWatcher]: (this: PluginContext) => void; | ||
} | ||
@@ -85,0 +86,0 @@ export type ChangeEvent = 'create' | 'update' | 'delete'; |
import type { OutputOptions } from './options/output-options'; | ||
import type { RolldownOutput } from './types/rolldown-output'; | ||
import type { InputOptions } from './options/input-options'; | ||
import { Watcher } from './watcher'; | ||
export declare class RolldownBuild { | ||
@@ -10,3 +11,3 @@ #private; | ||
close(): Promise<void>; | ||
watch(): Promise<void>; | ||
watch(outputOptions?: OutputOptions): Promise<Watcher>; | ||
} |
import type { InputOptions } from './options/input-options'; | ||
import { RolldownBuild } from './rolldown-build'; | ||
import { Watcher } from './watcher'; | ||
import { WatchOptions } from './options/watch-option'; | ||
export declare const rolldown: (input: InputOptions) => Promise<RolldownBuild>; | ||
export declare const watch: (input: InputOptions) => Promise<void>; | ||
export declare const watch: (input: WatchOptions) => Promise<Watcher>; | ||
/** | ||
@@ -6,0 +8,0 @@ * @description |
{ | ||
"name": "rolldown", | ||
"version": "0.13.2-snapshot-1daf8e4-20241014003453", | ||
"version": "0.13.2-snapshot-22bf6b5-20241023003702", | ||
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.", | ||
@@ -47,2 +47,3 @@ "homepage": "https://rolldown.rs/", | ||
}, | ||
"./watcher-worker": "./dist/shared/watcher-worker.js", | ||
"./package.json": "./package.json" | ||
@@ -107,17 +108,17 @@ }, | ||
"@rolldown/testing": "0.0.1", | ||
"rolldown": "0.13.2-snapshot-1daf8e4-20241014003453" | ||
"rolldown": "0.13.2-snapshot-22bf6b5-20241023003702" | ||
}, | ||
"optionalDependencies": { | ||
"@rolldown/binding-darwin-arm64": "0.13.2-snapshot-1daf8e4-20241014003453", | ||
"@rolldown/binding-darwin-x64": "0.13.2-snapshot-1daf8e4-20241014003453", | ||
"@rolldown/binding-freebsd-x64": "0.13.2-snapshot-1daf8e4-20241014003453", | ||
"@rolldown/binding-linux-arm-gnueabihf": "0.13.2-snapshot-1daf8e4-20241014003453", | ||
"@rolldown/binding-linux-arm64-gnu": "0.13.2-snapshot-1daf8e4-20241014003453", | ||
"@rolldown/binding-linux-arm64-musl": "0.13.2-snapshot-1daf8e4-20241014003453", | ||
"@rolldown/binding-linux-x64-gnu": "0.13.2-snapshot-1daf8e4-20241014003453", | ||
"@rolldown/binding-linux-x64-musl": "0.13.2-snapshot-1daf8e4-20241014003453", | ||
"@rolldown/binding-win32-arm64-msvc": "0.13.2-snapshot-1daf8e4-20241014003453", | ||
"@rolldown/binding-wasm32-wasi": "0.13.2-snapshot-1daf8e4-20241014003453", | ||
"@rolldown/binding-win32-ia32-msvc": "0.13.2-snapshot-1daf8e4-20241014003453", | ||
"@rolldown/binding-win32-x64-msvc": "0.13.2-snapshot-1daf8e4-20241014003453" | ||
"@rolldown/binding-darwin-arm64": "0.13.2-snapshot-22bf6b5-20241023003702", | ||
"@rolldown/binding-darwin-x64": "0.13.2-snapshot-22bf6b5-20241023003702", | ||
"@rolldown/binding-freebsd-x64": "0.13.2-snapshot-22bf6b5-20241023003702", | ||
"@rolldown/binding-linux-arm64-gnu": "0.13.2-snapshot-22bf6b5-20241023003702", | ||
"@rolldown/binding-linux-arm-gnueabihf": "0.13.2-snapshot-22bf6b5-20241023003702", | ||
"@rolldown/binding-linux-arm64-musl": "0.13.2-snapshot-22bf6b5-20241023003702", | ||
"@rolldown/binding-linux-x64-gnu": "0.13.2-snapshot-22bf6b5-20241023003702", | ||
"@rolldown/binding-linux-x64-musl": "0.13.2-snapshot-22bf6b5-20241023003702", | ||
"@rolldown/binding-wasm32-wasi": "0.13.2-snapshot-22bf6b5-20241023003702", | ||
"@rolldown/binding-win32-arm64-msvc": "0.13.2-snapshot-22bf6b5-20241023003702", | ||
"@rolldown/binding-win32-ia32-msvc": "0.13.2-snapshot-22bf6b5-20241023003702", | ||
"@rolldown/binding-win32-x64-msvc": "0.13.2-snapshot-22bf6b5-20241023003702" | ||
}, | ||
@@ -124,0 +125,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
673752
104
16802