Comparing version 0.13.2-snapshot-41476e0-20240923032058 to 0.13.2-snapshot-450b502-20241024003307
@@ -23,3 +23,2 @@ type MaybePromise<T> = T | Promise<T> | ||
get source(): BindingAssetSource | ||
set source(source: BindingAssetSource) | ||
get name(): string | null | ||
@@ -37,8 +36,5 @@ } | ||
get imports(): Array<string> | ||
set imports(imports: Array<string>) | ||
get dynamicImports(): Array<string> | ||
get code(): string | ||
set code(code: string) | ||
get map(): string | null | ||
set map(map: string) | ||
get sourcemapFileName(): string | null | ||
@@ -49,7 +45,5 @@ get preliminaryFileName(): string | ||
/** The `BindingOutputs` owner `Vec<Output>` the mutable reference, it avoid `Clone` at call `writeBundle/generateBundle` hook, and make it mutable. */ | ||
export declare class BindingOutputs { | ||
get chunks(): Array<BindingOutputChunk> | ||
get assets(): Array<BindingOutputAsset> | ||
delete(fileName: string): void | ||
} | ||
@@ -63,2 +57,3 @@ | ||
getModuleIds(): Array<string> | null | ||
addWatchFile(file: string): void | ||
} | ||
@@ -70,20 +65,16 @@ | ||
export declare class BindingWatcher { | ||
close(): Promise<void> | ||
on(event: BindingWatcherEvent, listener: (data?: Record<string, string>) => void): void | ||
} | ||
export declare class Bundler { | ||
constructor(inputOptions: BindingInputOptions, outputOptions: BindingOutputOptions, parallelPluginsRegistry?: ParallelJsPluginRegistry | undefined | null) | ||
write(): Promise<FinalBindingOutputs> | ||
generate(): Promise<FinalBindingOutputs> | ||
write(): Promise<BindingOutputs> | ||
generate(): Promise<BindingOutputs> | ||
scan(): Promise<void> | ||
hmrRebuild(changedFiles: Array<string>): Promise<FinalBindingOutputs> | ||
close(): Promise<void> | ||
watch(): Promise<BindingWatcher> | ||
} | ||
/** | ||
* The `FinalBindingOutputs` is used at `write()` or `generate()`, it is similar to `BindingOutputs`, if using `BindingOutputs` has unexpected behavior. | ||
* TODO find a way to export it gracefully. | ||
*/ | ||
export declare class FinalBindingOutputs { | ||
get chunks(): Array<BindingOutputChunk> | ||
get assets(): Array<BindingOutputAsset> | ||
} | ||
export declare class ParallelJsPluginRegistry { | ||
@@ -100,3 +91,3 @@ id: number | ||
export interface ArrowFunctionsBindingOptions { | ||
export interface ArrowFunctionsOptions { | ||
/** | ||
@@ -157,4 +148,3 @@ * This option enables the following: | ||
BuildImportAnalysisPlugin = 10, | ||
ReplacePlugin = 11, | ||
ReactPlugin = 12 | ||
ReplacePlugin = 11 | ||
} | ||
@@ -169,2 +159,7 @@ | ||
export interface BindingExperimentalOptions { | ||
strictExecutionOrder?: boolean | ||
disableLiveBindings?: boolean | ||
} | ||
export interface BindingGeneralHookFilter { | ||
@@ -249,2 +244,6 @@ include?: Array<BindingStringOrRegex> | ||
inject?: Array<BindingInjectImportNamed | BindingInjectImportNamespace> | ||
experimental?: BindingExperimentalOptions | ||
profilerNames?: boolean | ||
jsx?: JsxOptions | ||
watch?: BindingWatchOption | ||
} | ||
@@ -290,2 +289,7 @@ | ||
export interface BindingNotifyOption { | ||
pollInterval?: number | ||
compareContents?: boolean | ||
} | ||
export interface BindingOutputOptions { | ||
@@ -303,3 +307,3 @@ name?: string | ||
footer?: (chunk: RenderedChunk) => MaybePromise<VoidNullable<string>> | ||
format?: 'es' | 'cjs' | 'iife' | 'app' | ||
format?: 'es' | 'cjs' | 'iife' | ||
globals?: Record<string, string> | ||
@@ -359,8 +363,12 @@ inlineDynamicImports?: boolean | ||
renderErrorMeta?: BindingPluginHookMeta | ||
generateBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs, isWrite: boolean) => MaybePromise<VoidNullable> | ||
generateBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs, isWrite: boolean) => MaybePromise<VoidNullable<JsChangedOutputs>> | ||
generateBundleMeta?: BindingPluginHookMeta | ||
writeBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs) => MaybePromise<VoidNullable> | ||
writeBundle?: (ctx: BindingPluginContext, bundle: BindingOutputs) => MaybePromise<VoidNullable<JsChangedOutputs>> | ||
writeBundleMeta?: BindingPluginHookMeta | ||
closeBundle?: (ctx: BindingPluginContext) => MaybePromise<VoidNullable> | ||
closeBundleMeta?: BindingPluginHookMeta | ||
watchChange?: (ctx: BindingPluginContext, path: string, event: string) => MaybePromise<VoidNullable> | ||
watchChangeMeta?: BindingPluginHookMeta | ||
closeWatcher?: (ctx: BindingPluginContext) => MaybePromise<VoidNullable> | ||
closeWatcherMeta?: BindingPluginHookMeta | ||
banner?: (ctx: BindingPluginContext, chunk: RenderedChunk) => void | ||
@@ -403,2 +411,3 @@ bannerMeta?: BindingPluginHookMeta | ||
extensions?: Array<string> | ||
extensionAlias?: Array<ExtensionAliasItem> | ||
mainFields?: Array<string> | ||
@@ -443,3 +452,3 @@ mainFiles?: Array<string> | ||
jsxInject?: string | ||
reactRefresh?: boolean | ||
targets?: string | ||
} | ||
@@ -451,12 +460,38 @@ | ||
export interface Es2015BindingOptions { | ||
export declare enum BindingWatcherEvent { | ||
Close = 0, | ||
Event = 1, | ||
ReStart = 2, | ||
Change = 3 | ||
} | ||
export interface BindingWatchOption { | ||
skipWrite?: boolean | ||
notify?: BindingNotifyOption | ||
} | ||
export interface Es2015Options { | ||
/** Transform arrow functions into function expressions. */ | ||
arrowFunction?: ArrowFunctionsBindingOptions | ||
arrowFunction?: ArrowFunctionsOptions | ||
} | ||
export interface ExtensionAliasItem { | ||
target: string | ||
replacements: Array<string> | ||
} | ||
/** TypeScript Isolated Declarations for Standalone DTS Emit */ | ||
export declare function isolatedDeclaration(filename: string, sourceText: string, options: IsolatedDeclarationsOptions): IsolatedDeclarationsResult | ||
export declare function isolatedDeclaration(filename: string, sourceText: string, options?: IsolatedDeclarationsOptions | undefined | null): IsolatedDeclarationsResult | ||
export interface IsolatedDeclarationsOptions { | ||
sourcemap: boolean | ||
/** | ||
* Do not emit declarations for code that has an @internal annotation in its JSDoc comment. | ||
* This is an internal compiler option; use at your own risk, because the compiler does not check that the result is valid. | ||
* | ||
* Default: `false` | ||
* | ||
* See <https://www.typescriptlang.org/tsconfig/#stripInternal> | ||
*/ | ||
stripInternal?: boolean | ||
sourcemap?: boolean | ||
} | ||
@@ -470,3 +505,16 @@ | ||
export interface PreRenderedChunk { | ||
export interface JsChangedOutputs { | ||
chunks: Array<JsOutputChunk> | ||
assets: Array<JsOutputAsset> | ||
deleted: Array<string> | ||
} | ||
export interface JsOutputAsset { | ||
name?: string | ||
originalFileName?: string | ||
filename: string | ||
source: BindingAssetSource | ||
} | ||
export interface JsOutputChunk { | ||
name: string | ||
@@ -478,2 +526,10 @@ isEntry: boolean | ||
exports: Array<string> | ||
filename: string | ||
modules: Record<string, BindingRenderedModule> | ||
imports: Array<string> | ||
dynamicImports: Array<string> | ||
code: string | ||
map?: BindingSourcemap | ||
sourcemapFilename?: string | ||
preliminaryFilename: string | ||
} | ||
@@ -484,5 +540,5 @@ | ||
* | ||
* @see [@babel/plugin-transform-react-jsx](https://babeljs.io/docs/babel-plugin-transform-react-jsx#options) | ||
* @see {@link https://babeljs.io/docs/babel-plugin-transform-react-jsx#options} | ||
*/ | ||
export interface ReactBindingOptions { | ||
export interface JsxOptions { | ||
/** | ||
@@ -502,3 +558,3 @@ * Decides which runtime to use. | ||
* | ||
* @see [@babel/plugin-transform-react-jsx-development](https://babeljs.io/docs/babel-plugin-transform-react-jsx-development) | ||
* @see {@link https://babeljs.io/docs/babel-plugin-transform-react-jsx-development} | ||
*/ | ||
@@ -517,6 +573,8 @@ development?: boolean | ||
/** | ||
* Enables [@babel/plugin-transform-react-pure-annotations](https://babeljs.io/docs/en/babel-plugin-transform-react-pure-annotations). | ||
* Enables `@babel/plugin-transform-react-pure-annotations`. | ||
* | ||
* It will mark top-level React method calls as pure for tree shaking. | ||
* | ||
* @see {@link https://babeljs.io/docs/en/babel-plugin-transform-react-pure-annotations} | ||
* | ||
* @default true | ||
@@ -567,7 +625,22 @@ */ | ||
useSpread?: boolean | ||
/** Enable react fast refresh transform */ | ||
refresh?: ReactRefreshBindingOptions | ||
/** | ||
* Enable React Fast Refresh . | ||
* | ||
* Conforms to the implementation in {@link https://github.com/facebook/react/tree/main/packages/react-refresh} | ||
* | ||
* @default false | ||
*/ | ||
refresh?: boolean | ReactRefreshOptions | ||
} | ||
export interface ReactRefreshBindingOptions { | ||
export interface PreRenderedChunk { | ||
name: string | ||
isEntry: boolean | ||
isDynamicEntry: boolean | ||
facadeModuleId?: string | ||
moduleIds: Array<string> | ||
exports: Array<string> | ||
} | ||
export interface ReactRefreshOptions { | ||
/** | ||
@@ -605,7 +678,7 @@ * Specify the identifier of the refresh registration variable. | ||
file?: string | ||
mappings?: string | ||
names?: Array<string> | ||
mappings: string | ||
names: Array<string> | ||
sourceRoot?: string | ||
sources?: Array<string | undefined | null> | ||
sourcesContent?: Array<string | undefined | null> | ||
sources: Array<string> | ||
sourcesContent?: Array<string> | ||
version: number | ||
@@ -636,2 +709,4 @@ x_google_ignoreList?: Array<number> | ||
sourceType?: 'script' | 'module' | 'unambiguous' | undefined | ||
/** Treat the source text as `js`, `jsx`, `ts`, or `tsx`. */ | ||
lang?: 'js' | 'jsx' | 'ts' | 'tsx' | ||
/** | ||
@@ -643,14 +718,2 @@ * The current working directory. Used to resolve relative paths in other | ||
/** | ||
* Force jsx parsing, | ||
* | ||
* @default false | ||
*/ | ||
jsx?: boolean | ||
/** Configure how TypeScript is transformed. */ | ||
typescript?: TypeScriptBindingOptions | ||
/** Configure how TSX and JSX are transformed. */ | ||
react?: ReactBindingOptions | ||
/** Enable ES2015 transformations. */ | ||
es2015?: Es2015BindingOptions | ||
/** | ||
* Enable source map generation. | ||
@@ -665,2 +728,12 @@ * | ||
sourcemap?: boolean | ||
/** Configure how TypeScript is transformed. */ | ||
typescript?: TypeScriptOptions | ||
/** Configure how TSX and JSX are transformed. */ | ||
jsx?: JsxOptions | ||
/** Enable ES2015 transformations. */ | ||
es2015?: Es2015Options | ||
/** Define Plugin */ | ||
define?: Record<string, string> | ||
/** Inject Plugin */ | ||
inject?: Record<string, string | [string, string]> | ||
} | ||
@@ -688,3 +761,3 @@ | ||
* | ||
* @see {@link TypeScriptBindingOptions#declaration} | ||
* @see {@link TypeScriptOptions#declaration} | ||
* @see [declaration tsconfig option](https://www.typescriptlang.org/tsconfig/#declaration) | ||
@@ -695,3 +768,3 @@ */ | ||
* Declaration source map. Only generated if both | ||
* {@link TypeScriptBindingOptions#declaration declaration} and | ||
* {@link TypeScriptOptions#declaration declaration} and | ||
* {@link TransformOptions#sourcemap sourcemap} are set to `true`. | ||
@@ -710,3 +783,3 @@ */ | ||
export interface TypeScriptBindingOptions { | ||
export interface TypeScriptOptions { | ||
jsxPragma?: string | ||
@@ -726,3 +799,3 @@ jsxPragmaFrag?: string | ||
*/ | ||
declaration?: boolean | ||
declaration?: IsolatedDeclarationsOptions | ||
/** | ||
@@ -740,2 +813,1 @@ * Rewrite or remove TypeScript import/export declaration extensions. | ||
} | ||
@@ -14,3 +14,4 @@ /** | ||
version: boolean; | ||
watch: boolean; | ||
} | ||
export declare function normalizeCliOptions(cliOptions: CliOptions, positionals: string[]): NormalizedCliOptions; |
@@ -7,2 +7,3 @@ import type { ObjectSchema } from './types'; | ||
version: z.ZodOptional<z.ZodBoolean>; | ||
watch: z.ZodOptional<z.ZodBoolean>; | ||
}, Omit<z.objectUtil.extendShape<{ | ||
@@ -16,2 +17,3 @@ input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>; | ||
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">>; | ||
@@ -28,2 +30,3 @@ extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
conditionNames?: string[] | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
exportsFields?: string[][] | undefined; | ||
@@ -40,2 +43,3 @@ extensions?: string[] | undefined; | ||
conditionNames?: string[] | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
exportsFields?: string[][] | undefined; | ||
@@ -56,13 +60,72 @@ extensions?: string[] | undefined; | ||
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<{ | ||
enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>; | ||
strictExecutionOrder: z.ZodOptional<z.ZodBoolean>; | ||
disableLiveBindings: z.ZodOptional<z.ZodBoolean>; | ||
}, "strict", z.ZodTypeAny, { | ||
enableComposingJsPlugins?: boolean | undefined; | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
}, { | ||
enableComposingJsPlugins?: boolean | undefined; | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: 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>]>>>; | ||
dev: 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>]>>; | ||
}, { | ||
@@ -72,6 +135,6 @@ external: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental">>, Omit<z.objectUtil.extendShape<{ | ||
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames" | "watch">>, Omit<z.objectUtil.extendShape<{ | ||
dir: 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<"app">]>>; | ||
format: z.ZodOptional<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">]>>; | ||
sourcemap: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>, z.ZodLiteral<"hidden">]>>; | ||
@@ -143,5 +206,13 @@ sourcemapIgnoreList: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodType<import("../../options/output-options").SourcemapIgnoreListOption, z.ZodTypeDef, import("../../options/output-options").SourcemapIgnoreListOption>]>>; | ||
esModule: z.ZodOptional<z.ZodBoolean>; | ||
sourcemapIgnoreList: z.ZodOptional<z.ZodBoolean>; | ||
sourcemapPathTransform: z.ZodOptional<z.ZodUndefined>; | ||
}>, "sourcemapPathTransform">>, "strict", z.ZodTypeAny, { | ||
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, { | ||
external?: string[] | undefined; | ||
@@ -153,6 +224,15 @@ 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; | ||
inject?: Record<string, string> | undefined; | ||
dev?: boolean | undefined; | ||
watch?: boolean | undefined; | ||
footer?: string | undefined; | ||
@@ -165,9 +245,8 @@ banner?: string | undefined; | ||
dir?: string | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "app" | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined; | ||
sourcemap?: boolean | "inline" | "hidden" | undefined; | ||
sourcemapIgnoreList?: boolean | undefined; | ||
extend?: boolean | undefined; | ||
esModule?: boolean | undefined; | ||
entryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args_1: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args_1: unknown[]) => 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; | ||
@@ -181,9 +260,2 @@ minify?: boolean | undefined; | ||
minShareCount?: number | undefined; | ||
groups?: { | ||
name: string; | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
test?: string | undefined; | ||
priority?: number | undefined; | ||
}[] | undefined; | ||
} | undefined; | ||
@@ -200,6 +272,15 @@ version?: 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; | ||
dev?: boolean | undefined; | ||
watch?: boolean | undefined; | ||
footer?: string | undefined; | ||
@@ -212,9 +293,8 @@ banner?: string | undefined; | ||
dir?: string | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "app" | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined; | ||
sourcemap?: boolean | "inline" | "hidden" | undefined; | ||
sourcemapIgnoreList?: boolean | undefined; | ||
extend?: boolean | undefined; | ||
esModule?: boolean | undefined; | ||
entryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args_1: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args_1: unknown[]) => 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; | ||
@@ -228,9 +308,2 @@ minify?: boolean | undefined; | ||
minShareCount?: number | undefined; | ||
groups?: { | ||
name: string; | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
test?: string | undefined; | ||
priority?: number | undefined; | ||
}[] | undefined; | ||
} | undefined; | ||
@@ -237,0 +310,0 @@ version?: 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"]; | ||
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`. |
export { defineParallelPlugin } from './plugin/parallel-plugin'; | ||
export { experimental_scan as scan } from './rolldown'; | ||
export { transform } from './binding'; | ||
export type { TransformOptions, TransformResult } from './binding'; | ||
export { composeJsPlugins as composePlugins } from './utils/compose-js-plugins'; | ||
export { modulePreloadPolyfillPlugin, dynamicImportVarsPlugin, wasmHelperPlugin, wasmFallbackPlugin, importGlobPlugin, manifestPlugin, loadFallbackPlugin, transformPlugin, aliasPlugin, jsonPlugin, buildImportAnalysisPlugin, replacePlugin, reactPlugin, } from './plugin/builtin-plugin'; | ||
export { modulePreloadPolyfillPlugin, dynamicImportVarsPlugin, wasmHelperPlugin, wasmFallbackPlugin, importGlobPlugin, manifestPlugin, loadFallbackPlugin, transformPlugin, aliasPlugin, jsonPlugin, buildImportAnalysisPlugin, replacePlugin, } from './plugin/builtin-plugin'; |
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'; | ||
@@ -8,3 +8,3 @@ import type { RolldownOptions } from './types/rolldown-options'; | ||
import { defineConfig } from './utils/define-config'; | ||
import { rolldown } from './rolldown'; | ||
import { rolldown, watch } from './rolldown'; | ||
import { ConfigExport } from './types/config-export'; | ||
@@ -22,6 +22,7 @@ import { RolldownBuild } from './rolldown-build'; | ||
import { OutputBundle } from './types/output-bundle'; | ||
export { defineConfig, rolldown }; | ||
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,9 +6,16 @@ import type { LoggingFunction, LogHandler, RollupError } from '../rollup'; | ||
import type { NormalizedInputOptions } from '../options/normalized-input-options'; | ||
export interface MinimalPluginContext { | ||
export interface PluginContextMeta { | ||
rollupVersion: string; | ||
rolldownVersion: string; | ||
watchMode: boolean; | ||
} | ||
export declare class MinimalPluginContext { | ||
debug: LoggingFunction; | ||
error: (error: RollupError | string) => never; | ||
info: LoggingFunction; | ||
meta: PluginContextMeta; | ||
warn: LoggingFunction; | ||
readonly error: (error: RollupError | string) => never; | ||
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"]; |
@@ -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<{ | ||
@@ -15,2 +40,3 @@ input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>; | ||
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">>; | ||
@@ -27,2 +53,3 @@ extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
conditionNames?: string[] | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
exportsFields?: string[][] | undefined; | ||
@@ -39,2 +66,3 @@ extensions?: string[] | undefined; | ||
conditionNames?: string[] | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
exportsFields?: string[][] | undefined; | ||
@@ -55,17 +83,76 @@ extensions?: string[] | undefined; | ||
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<{ | ||
enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>; | ||
strictExecutionOrder: z.ZodOptional<z.ZodBoolean>; | ||
disableLiveBindings: z.ZodOptional<z.ZodBoolean>; | ||
}, "strict", z.ZodTypeAny, { | ||
enableComposingJsPlugins?: boolean | undefined; | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
}, { | ||
enableComposingJsPlugins?: boolean | undefined; | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: 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>]>>>; | ||
dev: 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, { | ||
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_3: unknown[]) => boolean | void | null | undefined) | undefined; | ||
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined; | ||
resolve?: { | ||
@@ -75,2 +162,3 @@ alias?: Record<string, string> | undefined; | ||
conditionNames?: string[] | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
exportsFields?: string[][] | undefined; | ||
@@ -89,15 +177,34 @@ extensions?: string[] | 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_2: unknown[]) => unknown, ...args_3: unknown[]) => unknown) | undefined; | ||
onwarn?: ((args_0: any, args_1: (args_0: any, ...args_1: unknown[]) => unknown, ...args_2: unknown[]) => unknown) | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | 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; | ||
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?: { | ||
enableComposingJsPlugins?: boolean | undefined; | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
} | undefined; | ||
define?: Record<string, string> | undefined; | ||
inject?: Record<string, string | [string, string]> | undefined; | ||
dev?: boolean | undefined; | ||
profilerNames?: boolean | undefined; | ||
watch?: false | { | ||
skipWrite?: boolean | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
chokidar?: any; | ||
} | 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_3: unknown[]) => boolean | void | null | undefined) | undefined; | ||
external?: string | RegExp | (string | RegExp)[] | ((args_0: string, args_1: string | undefined, args_2: boolean, ...args: unknown[]) => boolean | void | null | undefined) | undefined; | ||
resolve?: { | ||
@@ -107,2 +214,3 @@ alias?: Record<string, string> | undefined; | ||
conditionNames?: string[] | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
exportsFields?: string[][] | undefined; | ||
@@ -121,11 +229,30 @@ extensions?: string[] | 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_2: unknown[]) => unknown, ...args_3: unknown[]) => unknown) | undefined; | ||
onwarn?: ((args_0: any, args_1: (args_0: any, ...args_1: unknown[]) => unknown, ...args_2: unknown[]) => unknown) | undefined; | ||
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty"> | 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; | ||
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?: { | ||
enableComposingJsPlugins?: boolean | undefined; | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
} | undefined; | ||
define?: Record<string, string> | undefined; | ||
inject?: Record<string, string | [string, string]> | undefined; | ||
dev?: boolean | undefined; | ||
profilerNames?: boolean | undefined; | ||
watch?: false | { | ||
skipWrite?: boolean | undefined; | ||
notify?: { | ||
pollInterval?: number | undefined; | ||
compareContents?: boolean | undefined; | ||
} | undefined; | ||
chokidar?: any; | ||
} | undefined; | ||
}>; | ||
@@ -140,2 +267,3 @@ export declare const inputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{ | ||
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">>; | ||
@@ -152,2 +280,3 @@ extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
conditionNames?: string[] | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
exportsFields?: string[][] | undefined; | ||
@@ -164,2 +293,3 @@ extensions?: string[] | undefined; | ||
conditionNames?: string[] | undefined; | ||
extensionAlias?: Record<string, string[]> | undefined; | ||
exportsFields?: string[][] | undefined; | ||
@@ -180,13 +310,72 @@ extensions?: string[] | undefined; | ||
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<{ | ||
enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>; | ||
strictExecutionOrder: z.ZodOptional<z.ZodBoolean>; | ||
disableLiveBindings: z.ZodOptional<z.ZodBoolean>; | ||
}, "strict", z.ZodTypeAny, { | ||
enableComposingJsPlugins?: boolean | undefined; | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: boolean | undefined; | ||
}, { | ||
enableComposingJsPlugins?: boolean | undefined; | ||
strictExecutionOrder?: boolean | undefined; | ||
disableLiveBindings?: 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>]>>>; | ||
dev: 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>]>>; | ||
}, { | ||
@@ -196,3 +385,3 @@ external: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; | ||
treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>; | ||
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental">, "strict", z.ZodTypeAny, { | ||
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames" | "watch">, "strict", z.ZodTypeAny, { | ||
external?: string[] | undefined; | ||
@@ -204,6 +393,14 @@ 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; | ||
inject?: Record<string, string> | undefined; | ||
dev?: boolean | undefined; | ||
}, { | ||
@@ -216,6 +413,14 @@ external?: 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; | ||
inject?: Record<string, string> | undefined; | ||
dev?: boolean | undefined; | ||
}>; | ||
@@ -252,2 +457,3 @@ type RawInputOptions = z.infer<typeof inputOptionsSchema>; | ||
export type ExternalOption = z.infer<typeof externalSchema>; | ||
export type JsxOptions = z.infer<typeof jsxOptionsSchema>; | ||
export {}; |
@@ -5,3 +5,3 @@ import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../rollup'; | ||
import type { PreRenderedChunk, RenderedChunk } from '../binding'; | ||
export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'app'; | ||
export type InternalModuleFormat = 'es' | 'cjs' | 'iife'; | ||
type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>; | ||
@@ -8,0 +8,0 @@ type ChunkFileNamesOption = string | ((chunk: PreRenderedChunk) => string) | undefined; |
import type { PreRenderedChunk, RenderedChunk } from '../binding'; | ||
import { z } from 'zod'; | ||
declare const ModuleFormatSchema: 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<"app">]>>; | ||
declare const ModuleFormatSchema: z.ZodOptional<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">]>>; | ||
declare const outputOptionsSchema: z.ZodObject<{ | ||
dir: 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<"app">]>>; | ||
format: z.ZodOptional<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">]>>; | ||
sourcemap: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>, z.ZodLiteral<"hidden">]>>; | ||
@@ -69,10 +69,10 @@ sourcemapIgnoreList: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodType<SourcemapIgnoreListOption, z.ZodTypeDef, SourcemapIgnoreListOption>]>>; | ||
}, "strict", z.ZodTypeAny, { | ||
footer?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined; | ||
banner?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined; | ||
intro?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined; | ||
outro?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined; | ||
footer?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined; | ||
banner?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined; | ||
intro?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined; | ||
outro?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined; | ||
name?: string | undefined; | ||
exports?: "auto" | "named" | "default" | "none" | undefined; | ||
dir?: string | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "app" | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined; | ||
sourcemap?: boolean | "inline" | "hidden" | undefined; | ||
@@ -83,4 +83,4 @@ sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption | undefined; | ||
esModule?: boolean | "if-default-prop" | undefined; | ||
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args_1: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args_1: unknown[]) => string) | undefined; | ||
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
assetFileNames?: string | undefined; | ||
@@ -103,10 +103,10 @@ minify?: boolean | undefined; | ||
}, { | ||
footer?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined; | ||
banner?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined; | ||
intro?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined; | ||
outro?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined; | ||
footer?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined; | ||
banner?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined; | ||
intro?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined; | ||
outro?: string | ((args_0: RenderedChunk, ...args: unknown[]) => string | Promise<string>) | undefined; | ||
name?: string | undefined; | ||
exports?: "auto" | "named" | "default" | "none" | undefined; | ||
dir?: string | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "app" | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined; | ||
sourcemap?: boolean | "inline" | "hidden" | undefined; | ||
@@ -117,4 +117,4 @@ sourcemapIgnoreList?: boolean | SourcemapIgnoreListOption | undefined; | ||
esModule?: boolean | "if-default-prop" | undefined; | ||
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args_1: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args_1: unknown[]) => string) | undefined; | ||
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
assetFileNames?: string | undefined; | ||
@@ -140,3 +140,3 @@ minify?: boolean | undefined; | ||
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<"app">]>>; | ||
format: z.ZodOptional<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">]>>; | ||
sourcemap: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>, z.ZodLiteral<"hidden">]>>; | ||
@@ -208,5 +208,13 @@ sourcemapIgnoreList: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodType<SourcemapIgnoreListOption, z.ZodTypeDef, SourcemapIgnoreListOption>]>>; | ||
esModule: z.ZodOptional<z.ZodBoolean>; | ||
sourcemapIgnoreList: z.ZodOptional<z.ZodBoolean>; | ||
sourcemapPathTransform: z.ZodOptional<z.ZodUndefined>; | ||
}>, "sourcemapPathTransform">, "strict", z.ZodTypeAny, { | ||
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; | ||
@@ -219,9 +227,8 @@ banner?: string | undefined; | ||
dir?: string | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "app" | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined; | ||
sourcemap?: boolean | "inline" | "hidden" | undefined; | ||
sourcemapIgnoreList?: boolean | undefined; | ||
extend?: boolean | undefined; | ||
esModule?: boolean | undefined; | ||
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args_1: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args_1: unknown[]) => string) | undefined; | ||
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
assetFileNames?: string | undefined; | ||
@@ -235,9 +242,2 @@ minify?: boolean | undefined; | ||
minShareCount?: number | undefined; | ||
groups?: { | ||
name: string; | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
test?: string | undefined; | ||
priority?: number | undefined; | ||
}[] | undefined; | ||
} | undefined; | ||
@@ -252,9 +252,8 @@ }, { | ||
dir?: string | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "app" | undefined; | ||
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined; | ||
sourcemap?: boolean | "inline" | "hidden" | undefined; | ||
sourcemapIgnoreList?: boolean | undefined; | ||
extend?: boolean | undefined; | ||
esModule?: boolean | undefined; | ||
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args_1: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args_1: unknown[]) => string) | undefined; | ||
entryFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
chunkFileNames?: string | ((args_0: PreRenderedChunk, ...args: unknown[]) => string) | undefined; | ||
assetFileNames?: string | undefined; | ||
@@ -268,9 +267,2 @@ minify?: boolean | undefined; | ||
minShareCount?: number | undefined; | ||
groups?: { | ||
name: string; | ||
minSize?: number | undefined; | ||
minShareCount?: number | undefined; | ||
test?: string | undefined; | ||
priority?: number | undefined; | ||
}[] | undefined; | ||
} | undefined; | ||
@@ -277,0 +269,0 @@ }>; |
@@ -45,5 +45,2 @@ import { TransformPluginConfig } from '../options/normalized-ecma-transform-plugin-config'; | ||
} | ||
export declare class ReactPlugin extends BuiltinPlugin { | ||
constructor(); | ||
} | ||
export declare function modulePreloadPolyfillPlugin(config?: BindingModulePreloadPolyfillPluginConfig): ModulePreloadPolyfillPlugin; | ||
@@ -86,2 +83,1 @@ export declare function dynamicImportVarsPlugin(): DynamicImportVarsPlugin; | ||
export declare function bindingifyBuiltInPlugin(plugin: BuiltinPlugin): BindingBuiltinPlugin; | ||
export declare function reactPlugin(): ReactPlugin; |
@@ -80,3 +80,8 @@ import type { BindingHookResolveIdExtraArgs, BindingTransformHookExtraArgs, RenderedChunk } from '../binding'; | ||
[DEFINED_HOOK_NAMES.closeBundle]: (this: PluginContext) => void; | ||
[DEFINED_HOOK_NAMES.watchChange]: (this: PluginContext, id: string, event: { | ||
event: ChangeEvent; | ||
}) => void; | ||
[DEFINED_HOOK_NAMES.closeWatcher]: (this: PluginContext) => void; | ||
} | ||
export type ChangeEvent = 'create' | 'update' | 'delete'; | ||
export type PluginOrder = 'pre' | 'post' | null; | ||
@@ -83,0 +88,0 @@ export type ObjectHookMeta<O = {}> = { |
@@ -12,3 +12,3 @@ import { BindingPluginContext } from '../binding'; | ||
getModuleInfo(id: string, context: BindingPluginContext): ModuleInfo | null; | ||
getModuleIds(context: BindingPluginContext): IterableIterator<string>; | ||
getModuleIds(context: BindingPluginContext): ArrayIterator<string>; | ||
saveResolveOptions(options: PluginContextResolveOptions): number; | ||
@@ -15,0 +15,0 @@ getSavedResolveOptions(receipt: number): PluginContextResolveOptions | undefined; |
@@ -1,5 +0,5 @@ | ||
import type { RollupError, LoggingFunction } from '../rollup'; | ||
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 { AssetSource } from '../utils/asset-source'; | ||
@@ -24,7 +24,3 @@ import { ModuleInfo } from '../types/module-info'; | ||
} | ||
export declare class PluginContext { | ||
debug: LoggingFunction; | ||
info: LoggingFunction; | ||
warn: LoggingFunction; | ||
readonly error: (error: RollupError | string) => never; | ||
export declare class PluginContext extends MinimalPluginContext { | ||
readonly resolve: (source: string, importer?: string, options?: PluginContextResolveOptions) => Promise<ResolvedId | null>; | ||
@@ -31,0 +27,0 @@ readonly emitFile: (file: EmittedAsset) => string; |
import type { OutputOptions } from './options/output-options'; | ||
import type { RolldownOutput } from './types/rolldown-output'; | ||
import type { InputOptions } from './options/input-options'; | ||
import { AssetSource } from './utils/asset-source'; | ||
import { Watcher } from './watcher'; | ||
export declare class RolldownBuild { | ||
@@ -10,4 +10,4 @@ #private; | ||
write(outputOptions?: OutputOptions): Promise<RolldownOutput>; | ||
experimental_hmr_rebuild(changedFiles: string[]): Promise<[string, AssetSource]>; | ||
close(): 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: WatchOptions) => Promise<Watcher>; | ||
/** | ||
@@ -5,0 +8,0 @@ * @description |
import type { RolldownOutput } from '../types/rolldown-output'; | ||
import type { OutputBundle } from '../types/output-bundle'; | ||
import type { BindingOutputs, FinalBindingOutputs } from '../binding'; | ||
export declare function transformToRollupOutput(output: BindingOutputs | FinalBindingOutputs): RolldownOutput; | ||
export declare function transformToOutputBundle(output: BindingOutputs): OutputBundle; | ||
import type { BindingOutputs, JsChangedOutputs } from '../binding'; | ||
export declare function transformToRollupOutput(output: BindingOutputs, changed?: ChangedOutputs): RolldownOutput; | ||
export declare function transformToOutputBundle(output: BindingOutputs, changed: ChangedOutputs): OutputBundle; | ||
export interface ChangedOutputs { | ||
updated: Set<string>; | ||
deleted: Set<string>; | ||
} | ||
export declare function collectChangedBundle(changed: ChangedOutputs, bundle: OutputBundle): JsChangedOutputs; |
{ | ||
"name": "rolldown", | ||
"version": "0.13.2-snapshot-41476e0-20240923032058", | ||
"version": "0.13.2-snapshot-450b502-20241024003307", | ||
"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" | ||
@@ -83,7 +84,2 @@ }, | ||
"dependencies": { | ||
"@parcel/watcher": "2.4.1", | ||
"chokidar": "3.6.0", | ||
"connect": "3.7.0", | ||
"watchpack": "2.4.2", | ||
"ws": "8.18.0", | ||
"zod": "^3.23.8" | ||
@@ -94,7 +90,3 @@ }, | ||
"@napi-rs/wasm-runtime": "^0.2.4", | ||
"@types/connect": "3.4.38", | ||
"@types/lodash-es": "^4.17.12", | ||
"@types/serve-static": "1.13.6", | ||
"@types/watchpack": "2.4.2", | ||
"@types/ws": "8.5.12", | ||
"colorette": "^2.0.20", | ||
@@ -118,17 +110,17 @@ "consola": "^3.2.3", | ||
"@rolldown/testing": "0.0.1", | ||
"rolldown": "0.13.2-snapshot-41476e0-20240923032058" | ||
"rolldown": "0.13.2-snapshot-450b502-20241024003307" | ||
}, | ||
"optionalDependencies": { | ||
"@rolldown/binding-darwin-arm64": "0.13.2-snapshot-41476e0-20240923032058", | ||
"@rolldown/binding-darwin-x64": "0.13.2-snapshot-41476e0-20240923032058", | ||
"@rolldown/binding-freebsd-x64": "0.13.2-snapshot-41476e0-20240923032058", | ||
"@rolldown/binding-linux-arm-gnueabihf": "0.13.2-snapshot-41476e0-20240923032058", | ||
"@rolldown/binding-linux-arm64-gnu": "0.13.2-snapshot-41476e0-20240923032058", | ||
"@rolldown/binding-linux-arm64-musl": "0.13.2-snapshot-41476e0-20240923032058", | ||
"@rolldown/binding-linux-x64-gnu": "0.13.2-snapshot-41476e0-20240923032058", | ||
"@rolldown/binding-linux-x64-musl": "0.13.2-snapshot-41476e0-20240923032058", | ||
"@rolldown/binding-win32-arm64-msvc": "0.13.2-snapshot-41476e0-20240923032058", | ||
"@rolldown/binding-wasm32-wasi": "0.13.2-snapshot-41476e0-20240923032058", | ||
"@rolldown/binding-win32-ia32-msvc": "0.13.2-snapshot-41476e0-20240923032058", | ||
"@rolldown/binding-win32-x64-msvc": "0.13.2-snapshot-41476e0-20240923032058" | ||
"@rolldown/binding-darwin-arm64": "0.13.2-snapshot-450b502-20241024003307", | ||
"@rolldown/binding-freebsd-x64": "0.13.2-snapshot-450b502-20241024003307", | ||
"@rolldown/binding-linux-arm-gnueabihf": "0.13.2-snapshot-450b502-20241024003307", | ||
"@rolldown/binding-darwin-x64": "0.13.2-snapshot-450b502-20241024003307", | ||
"@rolldown/binding-linux-arm64-gnu": "0.13.2-snapshot-450b502-20241024003307", | ||
"@rolldown/binding-linux-arm64-musl": "0.13.2-snapshot-450b502-20241024003307", | ||
"@rolldown/binding-linux-x64-gnu": "0.13.2-snapshot-450b502-20241024003307", | ||
"@rolldown/binding-linux-x64-musl": "0.13.2-snapshot-450b502-20241024003307", | ||
"@rolldown/binding-win32-arm64-msvc": "0.13.2-snapshot-450b502-20241024003307", | ||
"@rolldown/binding-wasm32-wasi": "0.13.2-snapshot-450b502-20241024003307", | ||
"@rolldown/binding-win32-x64-msvc": "0.13.2-snapshot-450b502-20241024003307", | ||
"@rolldown/binding-win32-ia32-msvc": "0.13.2-snapshot-450b502-20241024003307" | ||
}, | ||
@@ -152,3 +144,3 @@ "scripts": { | ||
"# Scrips for checking #": "_", | ||
"test": "cross-env ROLLDOWN_TEST=1 vitest run --reporter verbose --hideSkippedTests", | ||
"test": "cross-env RUST_BACKTRACE=1 ROLLDOWN_TEST=1 vitest run --reporter verbose --hideSkippedTests", | ||
"test:update": "vitest run -u", | ||
@@ -155,0 +147,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
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
13
22
16802
2
+ Added@rolldown/binding-darwin-arm64@0.13.2-snapshot-450b502-20241024003307(transitive)
+ Added@rolldown/binding-darwin-x64@0.13.2-snapshot-450b502-20241024003307(transitive)
+ Added@rolldown/binding-freebsd-x64@0.13.2-snapshot-450b502-20241024003307(transitive)
+ Added@rolldown/binding-linux-arm-gnueabihf@0.13.2-snapshot-450b502-20241024003307(transitive)
+ Added@rolldown/binding-linux-arm64-gnu@0.13.2-snapshot-450b502-20241024003307(transitive)
+ Added@rolldown/binding-linux-arm64-musl@0.13.2-snapshot-450b502-20241024003307(transitive)
+ Added@rolldown/binding-linux-x64-gnu@0.13.2-snapshot-450b502-20241024003307(transitive)
+ Added@rolldown/binding-linux-x64-musl@0.13.2-snapshot-450b502-20241024003307(transitive)
+ Added@rolldown/binding-wasm32-wasi@0.13.2-snapshot-450b502-20241024003307(transitive)
+ Added@rolldown/binding-win32-arm64-msvc@0.13.2-snapshot-450b502-20241024003307(transitive)
+ Added@rolldown/binding-win32-ia32-msvc@0.13.2-snapshot-450b502-20241024003307(transitive)
+ Added@rolldown/binding-win32-x64-msvc@0.13.2-snapshot-450b502-20241024003307(transitive)
- Removed@parcel/watcher@2.4.1
- Removedchokidar@3.6.0
- Removedconnect@3.7.0
- Removedwatchpack@2.4.2
- Removedws@8.18.0
- Removed@parcel/watcher@2.4.1(transitive)
- Removed@parcel/watcher-android-arm64@2.4.1(transitive)
- Removed@parcel/watcher-darwin-arm64@2.4.1(transitive)
- Removed@parcel/watcher-darwin-x64@2.4.1(transitive)
- Removed@parcel/watcher-freebsd-x64@2.4.1(transitive)
- Removed@parcel/watcher-linux-arm-glibc@2.4.1(transitive)
- Removed@parcel/watcher-linux-arm64-glibc@2.4.1(transitive)
- Removed@parcel/watcher-linux-arm64-musl@2.4.1(transitive)
- Removed@parcel/watcher-linux-x64-glibc@2.4.1(transitive)
- Removed@parcel/watcher-linux-x64-musl@2.4.1(transitive)
- Removed@parcel/watcher-win32-arm64@2.4.1(transitive)
- Removed@parcel/watcher-win32-ia32@2.4.1(transitive)
- Removed@parcel/watcher-win32-x64@2.4.1(transitive)
- Removed@rolldown/binding-darwin-arm64@0.13.2-snapshot-41476e0-20240923032058(transitive)
- Removed@rolldown/binding-darwin-x64@0.13.2-snapshot-41476e0-20240923032058(transitive)
- Removed@rolldown/binding-freebsd-x64@0.13.2-snapshot-41476e0-20240923032058(transitive)
- Removed@rolldown/binding-linux-arm-gnueabihf@0.13.2-snapshot-41476e0-20240923032058(transitive)
- Removed@rolldown/binding-linux-arm64-gnu@0.13.2-snapshot-41476e0-20240923032058(transitive)
- Removed@rolldown/binding-linux-arm64-musl@0.13.2-snapshot-41476e0-20240923032058(transitive)
- Removed@rolldown/binding-linux-x64-gnu@0.13.2-snapshot-41476e0-20240923032058(transitive)
- Removed@rolldown/binding-linux-x64-musl@0.13.2-snapshot-41476e0-20240923032058(transitive)
- Removed@rolldown/binding-wasm32-wasi@0.13.2-snapshot-41476e0-20240923032058(transitive)
- Removed@rolldown/binding-win32-arm64-msvc@0.13.2-snapshot-41476e0-20240923032058(transitive)
- Removed@rolldown/binding-win32-ia32-msvc@0.13.2-snapshot-41476e0-20240923032058(transitive)
- Removed@rolldown/binding-win32-x64-msvc@0.13.2-snapshot-41476e0-20240923032058(transitive)
- Removedanymatch@3.1.3(transitive)
- Removedbinary-extensions@2.3.0(transitive)
- Removedbraces@3.0.3(transitive)
- Removedchokidar@3.6.0(transitive)
- Removedconnect@3.7.0(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddetect-libc@1.0.3(transitive)
- Removedee-first@1.1.1(transitive)
- Removedencodeurl@1.0.2(transitive)
- Removedescape-html@1.0.3(transitive)
- Removedfill-range@7.1.1(transitive)
- Removedfinalhandler@1.1.2(transitive)
- Removedfsevents@2.3.3(transitive)
- Removedglob-parent@5.1.2(transitive)
- Removedglob-to-regexp@0.4.1(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedis-binary-path@2.1.0(transitive)
- Removedis-extglob@2.1.1(transitive)
- Removedis-glob@4.0.3(transitive)
- Removedis-number@7.0.0(transitive)
- Removedmicromatch@4.0.8(transitive)
- Removedms@2.0.0(transitive)
- Removednode-addon-api@7.1.1(transitive)
- Removednormalize-path@3.0.0(transitive)
- Removedon-finished@2.3.0(transitive)
- Removedparseurl@1.3.3(transitive)
- Removedpicomatch@2.3.1(transitive)
- Removedreaddirp@3.6.0(transitive)
- Removedstatuses@1.5.0(transitive)
- Removedto-regex-range@5.0.1(transitive)
- Removedunpipe@1.0.0(transitive)
- Removedutils-merge@1.0.1(transitive)
- Removedwatchpack@2.4.2(transitive)
- Removedws@8.18.0(transitive)