From af3b73760b5fe39db61ea5f317dcc3a21ca1a8dd Mon Sep 17 00:00:00 2001 From: Cong-Cong Date: Mon, 23 Dec 2024 15:53:21 +0800 Subject: [PATCH] fix --- crates/node_binding/binding.d.ts | 1046 +------ .../rspack_binding_values/src/module_graph.rs | 4 +- packages/bench/ts-react.bench.ts | 28 + packages/rspack/etc/core.api.md | 2484 +++-------------- 4 files changed, 388 insertions(+), 3174 deletions(-) diff --git a/crates/node_binding/binding.d.ts b/crates/node_binding/binding.d.ts index 9444a16a355..aa3dc72f1e2 100644 --- a/crates/node_binding/binding.d.ts +++ b/crates/node_binding/binding.d.ts @@ -265,15 +265,9 @@ export declare class JsStats { getLogging(acceptedTypes: number): Array } -export declare class RawExternalItemFnCtx { - -} - export declare class RawExternalItemFnCtx { data(): RawExternalItemFnCtxData getResolver(): JsResolver - data(): RawExternalItemFnCtxData - getResolver(): JsResolver } export declare class Rspack { @@ -291,92 +285,6 @@ export interface BuiltinPlugin { canInherentFromParent?: boolean } -export interface BuiltinPlugin { - name: BuiltinPluginName - options: unknown - canInherentFromParent?: boolean -} - -export declare enum BuiltinPluginName { - DefinePlugin = 'DefinePlugin', - ProvidePlugin = 'ProvidePlugin', - BannerPlugin = 'BannerPlugin', - IgnorePlugin = 'IgnorePlugin', - ProgressPlugin = 'ProgressPlugin', - EntryPlugin = 'EntryPlugin', - DynamicEntryPlugin = 'DynamicEntryPlugin', - ExternalsPlugin = 'ExternalsPlugin', - NodeTargetPlugin = 'NodeTargetPlugin', - ElectronTargetPlugin = 'ElectronTargetPlugin', - EnableChunkLoadingPlugin = 'EnableChunkLoadingPlugin', - EnableLibraryPlugin = 'EnableLibraryPlugin', - EnableWasmLoadingPlugin = 'EnableWasmLoadingPlugin', - FetchCompileAsyncWasmPlugin = 'FetchCompileAsyncWasmPlugin', - ChunkPrefetchPreloadPlugin = 'ChunkPrefetchPreloadPlugin', - CommonJsChunkFormatPlugin = 'CommonJsChunkFormatPlugin', - ArrayPushCallbackChunkFormatPlugin = 'ArrayPushCallbackChunkFormatPlugin', - ModuleChunkFormatPlugin = 'ModuleChunkFormatPlugin', - HotModuleReplacementPlugin = 'HotModuleReplacementPlugin', - LimitChunkCountPlugin = 'LimitChunkCountPlugin', - WorkerPlugin = 'WorkerPlugin', - WebWorkerTemplatePlugin = 'WebWorkerTemplatePlugin', - MergeDuplicateChunksPlugin = 'MergeDuplicateChunksPlugin', - SplitChunksPlugin = 'SplitChunksPlugin', - RemoveDuplicateModulesPlugin = 'RemoveDuplicateModulesPlugin', - ShareRuntimePlugin = 'ShareRuntimePlugin', - ContainerPlugin = 'ContainerPlugin', - ContainerReferencePlugin = 'ContainerReferencePlugin', - ProvideSharedPlugin = 'ProvideSharedPlugin', - ConsumeSharedPlugin = 'ConsumeSharedPlugin', - ModuleFederationRuntimePlugin = 'ModuleFederationRuntimePlugin', - NamedModuleIdsPlugin = 'NamedModuleIdsPlugin', - NaturalModuleIdsPlugin = 'NaturalModuleIdsPlugin', - DeterministicModuleIdsPlugin = 'DeterministicModuleIdsPlugin', - NaturalChunkIdsPlugin = 'NaturalChunkIdsPlugin', - NamedChunkIdsPlugin = 'NamedChunkIdsPlugin', - DeterministicChunkIdsPlugin = 'DeterministicChunkIdsPlugin', - OccurrenceChunkIdsPlugin = 'OccurrenceChunkIdsPlugin', - RealContentHashPlugin = 'RealContentHashPlugin', - RemoveEmptyChunksPlugin = 'RemoveEmptyChunksPlugin', - EnsureChunkConditionsPlugin = 'EnsureChunkConditionsPlugin', - WarnCaseSensitiveModulesPlugin = 'WarnCaseSensitiveModulesPlugin', - DataUriPlugin = 'DataUriPlugin', - FileUriPlugin = 'FileUriPlugin', - RuntimePlugin = 'RuntimePlugin', - JsonModulesPlugin = 'JsonModulesPlugin', - InferAsyncModulesPlugin = 'InferAsyncModulesPlugin', - JavascriptModulesPlugin = 'JavascriptModulesPlugin', - AsyncWebAssemblyModulesPlugin = 'AsyncWebAssemblyModulesPlugin', - AssetModulesPlugin = 'AssetModulesPlugin', - SourceMapDevToolPlugin = 'SourceMapDevToolPlugin', - EvalSourceMapDevToolPlugin = 'EvalSourceMapDevToolPlugin', - EvalDevToolModulePlugin = 'EvalDevToolModulePlugin', - SideEffectsFlagPlugin = 'SideEffectsFlagPlugin', - FlagDependencyExportsPlugin = 'FlagDependencyExportsPlugin', - FlagDependencyUsagePlugin = 'FlagDependencyUsagePlugin', - MangleExportsPlugin = 'MangleExportsPlugin', - ModuleConcatenationPlugin = 'ModuleConcatenationPlugin', - CssModulesPlugin = 'CssModulesPlugin', - APIPlugin = 'APIPlugin', - RuntimeChunkPlugin = 'RuntimeChunkPlugin', - SizeLimitsPlugin = 'SizeLimitsPlugin', - NoEmitOnErrorsPlugin = 'NoEmitOnErrorsPlugin', - ContextReplacementPlugin = 'ContextReplacementPlugin', - DllEntryPlugin = 'DllEntryPlugin', - DllReferenceAgencyPlugin = 'DllReferenceAgencyPlugin', - LibManifestPlugin = 'LibManifestPlugin', - FlagAllModulesAsUsedPlugin = 'FlagAllModulesAsUsedPlugin', - HttpExternalsRspackPlugin = 'HttpExternalsRspackPlugin', - CopyRspackPlugin = 'CopyRspackPlugin', - HtmlRspackPlugin = 'HtmlRspackPlugin', - SwcJsMinimizerRspackPlugin = 'SwcJsMinimizerRspackPlugin', - LightningCssMinimizerRspackPlugin = 'LightningCssMinimizerRspackPlugin', - BundlerInfoRspackPlugin = 'BundlerInfoRspackPlugin', - CssExtractRspackPlugin = 'CssExtractRspackPlugin', - JsLoaderRspackPlugin = 'JsLoaderRspackPlugin', - LazyCompilationPlugin = 'LazyCompilationPlugin' -} - export declare enum BuiltinPluginName { DefinePlugin = 'DefinePlugin', ProvidePlugin = 'ProvidePlugin', @@ -463,10 +371,6 @@ export interface ContextInfo { issuer: string } -export interface ContextInfo { - issuer: string -} - export declare function formatDiagnostic(diagnostic: JsDiagnostic): ExternalObject<'Diagnostic'> export interface JsAddingRuntimeModule { @@ -583,12 +487,6 @@ export interface JsBannerContentFnCtx { filename: string } -export interface JsBannerContentFnCtx { - hash: string - chunk: JsChunk - filename: string -} - export interface JsBeforeAssetTagGenerationData { assets: JsHtmlPluginAssets outputName: string @@ -630,10 +528,6 @@ export interface JsCacheGroupTestCtx { module: JsModule } -export interface JsCacheGroupTestCtx { - module: JsModule -} - export interface JsChunkAssetArgs { chunk: JsChunk filename: string @@ -650,12 +544,6 @@ export interface JsChunkOptionNameCtx { cacheGroupKey: string } -export interface JsChunkOptionNameCtx { - module: JsModule - chunks: JsChunk[] - cacheGroupKey: string -} - /** * File clean options * @@ -846,36 +734,6 @@ export interface JsLoaderContext { __internal__error?: JsRspackError } -export interface JsLoaderContext { - resourceData: Readonly - /** Will be deprecated. Use module.module_identifier instead */ - _moduleIdentifier: Readonly - _module: JsModule - hot: Readonly - /** Content maybe empty in pitching stage */ - content: null | Buffer - additionalData?: any - __internal__parseMeta: Record - sourceMap?: Buffer - cacheable: boolean - fileDependencies: Array - contextDependencies: Array - missingDependencies: Array - buildDependencies: Array - loaderItems: Array - loaderIndex: number - loaderState: Readonly - __internal__error?: JsRspackError -} - -export interface JsLoaderItem { - request: string - type: string - data: any - normalExecuted: boolean - pitchExecuted: boolean -} - export interface JsLoaderItem { request: string type: string @@ -889,11 +747,6 @@ export declare enum JsLoaderState { Normal = 'Normal' } -export declare enum JsLoaderState { - Pitching = 'Pitching', - Normal = 'Normal' -} - export interface JsModuleDescriptor { identifier: string name: string @@ -1272,29 +1125,11 @@ export interface RawAssetGeneratorDataUrlFnCtx { module: JsModule } -export interface RawAssetGeneratorDataUrlFnCtx { - filename: string - module: JsModule -} - export interface RawAssetGeneratorDataUrlOptions { encoding?: "base64" | "false" | undefined mimetype?: string } -export interface RawAssetGeneratorDataUrlOptions { - encoding?: "base64" | "false" | undefined - mimetype?: string -} - -export interface RawAssetGeneratorOptions { - emit?: boolean - filename?: JsFilename - outputPath?: JsFilename - publicPath?: "auto" | JsFilename - dataUrl?: RawAssetGeneratorDataUrlOptions | ((source: Buffer, context: RawAssetGeneratorDataUrlFnCtx) => string) -} - export interface RawAssetGeneratorOptions { emit?: boolean filename?: JsFilename @@ -1307,15 +1142,6 @@ export interface RawAssetInlineGeneratorOptions { dataUrl?: RawAssetGeneratorDataUrlOptions | ((source: Buffer, context: RawAssetGeneratorDataUrlFnCtx) => string) } -export interface RawAssetInlineGeneratorOptions { - dataUrl?: RawAssetGeneratorDataUrlOptions | ((source: Buffer, context: RawAssetGeneratorDataUrlFnCtx) => string) -} - -export interface RawAssetParserDataUrl { - type: "options" - options?: RawAssetParserDataUrlOptions -} - export interface RawAssetParserDataUrl { type: "options" options?: RawAssetParserDataUrlOptions @@ -1325,14 +1151,6 @@ export interface RawAssetParserDataUrlOptions { maxSize?: number } -export interface RawAssetParserDataUrlOptions { - maxSize?: number -} - -export interface RawAssetParserOptions { - dataUrlCondition?: RawAssetParserDataUrl -} - export interface RawAssetParserOptions { dataUrlCondition?: RawAssetParserDataUrl } @@ -1344,24 +1162,6 @@ export interface RawAssetResourceGeneratorOptions { publicPath?: "auto" | JsFilename } -export interface RawAssetResourceGeneratorOptions { - emit?: boolean - filename?: JsFilename - outputPath?: JsFilename - publicPath?: "auto" | JsFilename -} - -export interface RawBannerPluginOptions { - banner: string | ((...args: any[]) => any) - entryOnly?: boolean - footer?: boolean - raw?: boolean - stage?: number - test?: string | RegExp | (string | RegExp)[] - include?: string | RegExp | (string | RegExp)[] - exclude?: string | RegExp | (string | RegExp)[] -} - export interface RawBannerPluginOptions { banner: string | ((...args: any[]) => any) entryOnly?: boolean @@ -1379,36 +1179,6 @@ export interface RawBundlerInfoPluginOptions { force: boolean | string[] } -export interface RawBundlerInfoPluginOptions { - version: string - bundler: string - force: boolean | string[] -} - -export interface RawCacheGroupOptions { - key: string - priority?: number - test?: RegExp | string | Function - filename?: string - idHint?: string - /** What kind of chunks should be selected. */ - chunks?: RegExp | 'async' | 'initial' | 'all' - type?: RegExp | string - layer?: RegExp | string - automaticNameDelimiter?: string - minChunks?: number - minSize?: number | RawSplitChunkSizes - maxSize?: number | RawSplitChunkSizes - maxAsyncSize?: number | RawSplitChunkSizes - maxInitialSize?: number | RawSplitChunkSizes - maxAsyncRequests?: number - maxInitialRequests?: number - name?: string | false | Function - reuseExistingChunk?: boolean - enforce?: boolean - usedExports?: boolean -} - export interface RawCacheGroupOptions { key: string priority?: number @@ -1437,31 +1207,6 @@ export interface RawCacheOptions { type: string } -export interface RawCacheOptions { - type: string - maxGenerations: number - maxAge: number - profile: boolean - buildDependencies: Array - cacheDirectory: string - cacheLocation: string - name: string - version: string -} - -export interface RawConsumeOptions { - key: string - import?: string - importResolved?: string - shareKey: string - shareScope: string - requiredVersion?: string | false | undefined - packageName?: string - strictVersion: boolean - singleton: boolean - eager: boolean -} - export interface RawConsumeOptions { key: string import?: string @@ -1480,11 +1225,6 @@ export interface RawConsumeSharedPluginOptions { enhanced: boolean } -export interface RawConsumeSharedPluginOptions { - consumes: Array - enhanced: boolean -} - export interface RawContainerPluginOptions { name: string shareScope: string @@ -1495,23 +1235,6 @@ export interface RawContainerPluginOptions { enhanced: boolean } -export interface RawContainerPluginOptions { - name: string - shareScope: string - library: JsLibraryOptions - runtime?: false | string - filename?: string - exposes: Array - enhanced: boolean -} - -export interface RawContainerReferencePluginOptions { - remoteType: string - remotes: Array - shareScope?: string - enhanced: boolean -} - export interface RawContainerReferencePluginOptions { remoteType: string remotes: Array @@ -1527,20 +1250,6 @@ export interface RawContextReplacementPluginOptions { newContentCreateContextMap?: Record } -export interface RawContextReplacementPluginOptions { - resourceRegExp: RegExp - newContentResource?: string - newContentRecursive?: boolean - newContentRegExp?: RegExp - newContentCreateContextMap?: Record -} - -export interface RawCopyGlobOptions { - caseSensitiveMatch?: boolean - dot?: boolean - ignore?: Array -} - export interface RawCopyGlobOptions { caseSensitiveMatch?: boolean dot?: boolean @@ -1560,39 +1269,10 @@ export interface RawCopyPattern { transform?: (input: Buffer, absoluteFilename: string) => string | Buffer | Promise | Promise } -export interface RawCopyPattern { - from: string - to?: string | ((pathData: { context: string; absoluteFilename?: string }) => string | Promise) - context?: string - toType?: string - noErrorOnMissing: boolean - force: boolean - priority: number - globOptions: RawCopyGlobOptions - info?: RawInfo - transform?: (input: Buffer, absoluteFilename: string) => string | Buffer | Promise | Promise -} - -export interface RawCopyRspackPluginOptions { - patterns: Array -} - export interface RawCopyRspackPluginOptions { patterns: Array } -export interface RawCrossOriginLoading { - type: "bool" | "string" - stringPayload?: string - boolPayload?: boolean -} - -export interface RawCrossOriginLoading { - type: "bool" | "string" - stringPayload?: string - boolPayload?: boolean -} - export interface RawCssAutoGeneratorOptions { exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only" exportsOnly?: boolean @@ -1600,17 +1280,6 @@ export interface RawCssAutoGeneratorOptions { esModule?: boolean } -export interface RawCssAutoGeneratorOptions { - exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only" - exportsOnly?: boolean - localIdentName?: string - esModule?: boolean -} - -export interface RawCssAutoParserOptions { - namedExports?: boolean -} - export interface RawCssAutoParserOptions { namedExports?: boolean } @@ -1626,22 +1295,6 @@ export interface RawCssExtractPluginOption { pathinfo: boolean } -export interface RawCssExtractPluginOption { - filename: JsFilename - chunkFilename: JsFilename - ignoreOrder: boolean - insert?: string - attributes: Record - linkType?: string - runtime: boolean - pathinfo: boolean -} - -export interface RawCssGeneratorOptions { - exportsOnly?: boolean - esModule?: boolean -} - export interface RawCssGeneratorOptions { exportsOnly?: boolean esModule?: boolean @@ -1654,17 +1307,6 @@ export interface RawCssModuleGeneratorOptions { esModule?: boolean } -export interface RawCssModuleGeneratorOptions { - exportsConvention?: "as-is" | "camel-case" | "camel-case-only" | "dashes" | "dashes-only" - exportsOnly?: boolean - localIdentName?: string - esModule?: boolean -} - -export interface RawCssModuleParserOptions { - namedExports?: boolean -} - export interface RawCssModuleParserOptions { namedExports?: boolean } @@ -1673,10 +1315,6 @@ export interface RawCssParserOptions { namedExports?: boolean } -export interface RawCssParserOptions { - namedExports?: boolean -} - export interface RawDependency { request: string } @@ -1687,18 +1325,6 @@ export interface RawDllEntryPluginOptions { name: string } -export interface RawDllEntryPluginOptions { - context: string - entries: Array - name: string -} - -export interface RawDllManifest { - content: Record - name?: string - type?: string -} - export interface RawDllManifest { content: Record name?: string @@ -1711,23 +1337,6 @@ export interface RawDllManifestContentItem { id?: string } -export interface RawDllManifestContentItem { - buildMeta?: JsBuildMeta - exports?: string[] | true - id?: string -} - -export interface RawDllReferenceAgencyPluginOptions { - context?: string - name?: string - extensions: Array - scope?: string - sourceType?: string - type: string - content?: Record - manifest?: RawDllManifest -} - export interface RawDllReferenceAgencyPluginOptions { context?: string name?: string @@ -1743,15 +1352,6 @@ export interface RawDraft { customMedia: boolean } -export interface RawDraft { - customMedia: boolean -} - -export interface RawDynamicEntryPluginOptions { - context: string - entry: () => Promise -} - export interface RawDynamicEntryPluginOptions { context: string entry: () => Promise @@ -1762,17 +1362,6 @@ export interface RawEntryDynamicResult { options: JsEntryOptions } -export interface RawEntryDynamicResult { - import: Array - options: JsEntryOptions -} - -export interface RawEnvironment { - const?: boolean - arrowFunction?: boolean - nodePrefixForCoreModules?: boolean -} - export interface RawEnvironment { const?: boolean arrowFunction?: boolean @@ -1785,26 +1374,8 @@ export interface RawEvalDevToolModulePluginOptions { sourceUrlComment?: string } -export interface RawEvalDevToolModulePluginOptions { - namespace?: string - moduleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string) - sourceUrlComment?: string -} - -export interface RawExperimentCacheOptionsCommon { - type: "disable"|"memory" -} - -export interface RawExperimentCacheOptionsCommon { - type: "disable"|"memory" -} - -export interface RawExperimentCacheOptionsPersistent { - type: "persistent" - buildDependencies: Array - version: string - snapshot: RawExperimentSnapshotOptions - storage: RawStorageOptions +export interface RawExperimentCacheOptionsMemory { + type: "memory" | "disable" } export interface RawExperimentCacheOptionsPersistent { @@ -1823,20 +1394,6 @@ rspackFuture?: RawRspackFuture cache: RawExperimentCacheOptionsPersistent | RawExperimentCacheOptionsMemory | boolean } -export interface RawExperiments { - layers: boolean - topLevelAwait: boolean - incremental?: RawIncremental - rspackFuture: RawRspackFuture - cache: RawExperimentCacheOptionsPersistent | RawExperimentCacheOptionsCommon -} - -export interface RawExperimentSnapshotOptions { - immutablePaths: Array - unmanagedPaths: Array - managedPaths: Array -} - export interface RawExperimentSnapshotOptions { immutablePaths: Array unmanagedPaths: Array @@ -1849,19 +1406,6 @@ export interface RawExposeOptions { import: Array } -export interface RawExposeOptions { - key: string - name?: string - import: Array -} - -export interface RawExternalItemFnCtxData { - request: string - context: string - dependencyType: string - contextInfo: ContextInfo -} - export interface RawExternalItemFnCtxData { request: string context: string @@ -1874,16 +1418,6 @@ export interface RawExternalItemFnResult { result?: string | boolean | string[] | Record } -export interface RawExternalItemFnResult { - externalType?: string - result?: string | boolean | string[] | Record -} - -export interface RawExternalsPluginOptions { - type: string - externals: (string | RegExp | Record> | ((...args: any[]) => any))[] -} - export interface RawExternalsPluginOptions { type: string externals: (string | RegExp | Record> | ((...args: any[]) => any))[] @@ -1898,20 +1432,6 @@ export interface RawExternalsPresets { electronRenderer: boolean } -export interface RawExternalsPresets { - node: boolean - web: boolean - electron: boolean - electronMain: boolean - electronPreload: boolean - electronRenderer: boolean -} - -export interface RawExtractComments { - banner?: string | boolean - condition?: string -} - export interface RawExtractComments { banner?: string | boolean condition?: string @@ -1926,19 +1446,6 @@ export interface RawFallbackCacheGroupOptions { automaticNameDelimiter?: string } -export interface RawFallbackCacheGroupOptions { - chunks?: RegExp | 'async' | 'initial' | 'all' - minSize?: number | RawSplitChunkSizes - maxSize?: number | RawSplitChunkSizes - maxAsyncSize?: number | RawSplitChunkSizes - maxInitialSize?: number | RawSplitChunkSizes - automaticNameDelimiter?: string -} - -export interface RawFlagAllModulesAsUsedPluginOptions { - explanation: string -} - export interface RawFlagAllModulesAsUsedPluginOptions { explanation: string } @@ -1950,13 +1457,6 @@ export interface RawFuncUseCtx { issuer?: string } -export interface RawFuncUseCtx { - resource?: string - realResource?: string - resourceQuery?: string - issuer?: string -} - export interface RawGeneratorOptions { type: "asset" | "asset/inline" | "asset/resource" | "css" | "css/auto" | "css/module" asset?: RawAssetGeneratorOptions @@ -1967,21 +1467,6 @@ export interface RawGeneratorOptions { cssModule?: RawCssModuleGeneratorOptions } -export interface RawGeneratorOptions { - type: "asset" | "asset/inline" | "asset/resource" | "css" | "css/auto" | "css/module" - asset?: RawAssetGeneratorOptions - assetInline?: RawAssetInlineGeneratorOptions - assetResource?: RawAssetResourceGeneratorOptions - css?: RawCssGeneratorOptions - cssAuto?: RawCssAutoGeneratorOptions - cssModule?: RawCssModuleGeneratorOptions -} - -export interface RawHtmlRspackPluginBaseOptions { - href?: string - target?: "_self" | "_blank" | "_parent" | "_top" -} - export interface RawHtmlRspackPluginBaseOptions { href?: string target?: "_self" | "_blank" | "_parent" | "_top" @@ -2014,38 +1499,6 @@ export interface RawHtmlRspackPluginOptions { base?: RawHtmlRspackPluginBaseOptions } -export interface RawHtmlRspackPluginOptions { - /** emitted file name in output path */ - filename?: string[] - /** template html file */ - template?: string - templateFn?: (data: string) => Promise - templateContent?: string - templateParameters?: boolean | Record | ((params: string) => Promise) - /** "head", "body" or "false" */ - inject: "head" | "body" | "false" - /** path or `auto` */ - publicPath?: string - /** `blocking`, `defer`, `module` or `systemjs-module` */ - scriptLoading: "blocking" | "defer" | "module" | "systemjs-module" - /** entry_chunk_name (only entry chunks are supported) */ - chunks?: Array - excludeChunks?: Array - chunksSortMode: "auto" | "manual" - sri?: "sha256" | "sha384" | "sha512" - minify?: boolean - title?: string - favicon?: string - meta?: Record> - hash?: boolean - base?: RawHtmlRspackPluginBaseOptions -} - -export interface RawHttpExternalsRspackPluginOptions { - css: boolean - webAsync: boolean -} - export interface RawHttpExternalsRspackPluginOptions { css: boolean webAsync: boolean @@ -2057,29 +1510,6 @@ export interface RawIgnorePluginOptions { checkResource?: (resource: string, context: string) => boolean } -export interface RawIgnorePluginOptions { - resourceRegExp?: RegExp - contextRegExp?: RegExp - checkResource?: (resource: string, context: string) => boolean -} - -export interface RawIncremental { - make: boolean - inferAsyncModules: boolean - providedExports: boolean - dependenciesDiagnostics: boolean - buildChunkGraph: boolean - moduleIds: boolean - chunkIds: boolean - modulesHashes: boolean - modulesCodegen: boolean - modulesRuntimeRequirements: boolean - chunksRuntimeRequirements: boolean - chunksHashes: boolean - chunksRender: boolean - emitAssets: boolean -} - export interface RawIncremental { make: boolean inferAsyncModules: boolean @@ -2108,17 +1538,6 @@ export interface RawInfo { version?: string } -export interface RawInfo { - immutable?: boolean - minimized?: boolean - chunkHash?: Array - contentHash?: Array - development?: boolean - hotModuleReplacement?: boolean - related?: RawRelated - version?: string -} - export interface RawJavascriptParserOptions { dynamicImportMode?: string dynamicImportPreload?: string @@ -2157,52 +1576,6 @@ export interface RawJavascriptParserOptions { importDynamic?: boolean } -export interface RawJavascriptParserOptions { - dynamicImportMode?: string - dynamicImportPreload?: string - dynamicImportPrefetch?: string - dynamicImportFetchPriority?: string - url?: string - exprContextCritical?: boolean - wrappedContextCritical?: boolean - wrappedContextRegExp?: RegExp - exportsPresence?: string - importExportsPresence?: string - reexportExportsPresence?: string - strictExportPresence?: boolean - worker?: Array - overrideStrict?: string - importMeta?: boolean - /** - * This option is experimental in Rspack only and subject to change or be removed anytime. - * @experimental - */ - requireAsExpression?: boolean - /** - * This option is experimental in Rspack only and subject to change or be removed anytime. - * @experimental - */ - requireDynamic?: boolean - /** - * This option is experimental in Rspack only and subject to change or be removed anytime. - * @experimental - */ - requireResolve?: boolean - /** - * This option is experimental in Rspack only and subject to change or be removed anytime. - * @experimental - */ - importDynamic?: boolean -} - -export interface RawLazyCompilationOption { - module: ((err: Error | null, arg: RawModuleArg) => RawModuleInfo) - test?: RawLazyCompilationTest - entries: boolean - imports: boolean - cacheable: boolean -} - export interface RawLazyCompilationOption { module: ((err: Error | null, arg: RawModuleArg) => RawModuleInfo) test?: RawLazyCompilationTest @@ -2220,27 +1593,6 @@ export interface RawLibManifestPluginOptions { type?: string } -export interface RawLibManifestPluginOptions { - context?: string - entryOnly?: boolean - name?: JsFilename - path: JsFilename - format?: boolean - type?: string -} - -export interface RawLightningCssBrowsers { - android?: number - chrome?: number - edge?: number - firefox?: number - ie?: number - ios_saf?: number - opera?: number - safari?: number - samsung?: number -} - export interface RawLightningCssBrowsers { android?: number chrome?: number @@ -2265,26 +1617,6 @@ export interface RawLightningCssMinimizerOptions { unusedSymbols: Array } -export interface RawLightningCssMinimizerOptions { - errorRecovery: boolean - targets?: Array - include?: number - exclude?: number - draft?: RawDraft - drafts?: RawDraft - nonStandard?: RawNonStandard - pseudoClasses?: RawLightningCssPseudoClasses - unusedSymbols: Array -} - -export interface RawLightningCssMinimizerRspackPluginOptions { - test?: string | RegExp | (string | RegExp)[] - include?: string | RegExp | (string | RegExp)[] - exclude?: string | RegExp | (string | RegExp)[] - removeUnusedLocalIdents: boolean - minimizerOptions: RawLightningCssMinimizerOptions -} - export interface RawLightningCssMinimizerRspackPluginOptions { test?: string | RegExp | (string | RegExp)[] include?: string | RegExp | (string | RegExp)[] @@ -2301,31 +1633,12 @@ export interface RawLightningCssPseudoClasses { focusWithin?: string } -export interface RawLightningCssPseudoClasses { - hover?: string - active?: string - focus?: string - focusVisible?: string - focusWithin?: string -} - export interface RawLimitChunkCountPluginOptions { chunkOverhead?: number entryChunkMultiplicator?: number maxChunks: number } -export interface RawLimitChunkCountPluginOptions { - chunkOverhead?: number - entryChunkMultiplicator?: number - maxChunks: number -} - -export interface RawModuleArg { - module: string - path: string -} - export interface RawModuleArg { module: string path: string @@ -2345,26 +1658,6 @@ export interface RawModuleFilenameTemplateFnCtx { namespace: string } -export interface RawModuleFilenameTemplateFnCtx { - identifier: string - shortIdentifier: string - resource: string - resourcePath: string - absoluteResourcePath: string - loaders: string - allLoaders: string - query: string - moduleId: string - hash: string - namespace: string -} - -export interface RawModuleInfo { - active: boolean - client: string - data: string -} - export interface RawModuleInfo { active: boolean client: string @@ -2378,50 +1671,6 @@ export interface RawModuleOptions { noParse?: string | RegExp | ((request: string) => boolean) | (string | RegExp | ((request: string) => boolean))[] } -export interface RawModuleOptions { - rules: Array - parser?: Record - generator?: Record - noParse?: string | RegExp | ((request: string) => boolean) | (string | RegExp | ((request: string) => boolean))[] -} - -export interface RawModuleRule { - /** - * A conditional match matching an absolute path + query + fragment. - * Note: - * This is a custom matching rule not initially designed by webpack. - * Only for single-threaded environment interoperation purpose. - */ - rspackResource?: RawRuleSetCondition - /** A condition matcher matching an absolute path. */ - test?: RawRuleSetCondition - include?: RawRuleSetCondition - exclude?: RawRuleSetCondition - /** A condition matcher matching an absolute path. */ - resource?: RawRuleSetCondition - /** A condition matcher against the resource query. */ - resourceQuery?: RawRuleSetCondition - resourceFragment?: RawRuleSetCondition - descriptionData?: Record - with?: Record - sideEffects?: boolean - use?: RawModuleRuleUse[] | ((arg: RawFuncUseCtx) => RawModuleRuleUse[]) - type?: string - layer?: string - parser?: RawParserOptions - generator?: RawGeneratorOptions - resolve?: RawResolveOptions - issuer?: RawRuleSetCondition - issuerLayer?: RawRuleSetCondition - dependency?: RawRuleSetCondition - scheme?: RawRuleSetCondition - mimetype?: RawRuleSetCondition - oneOf?: Array - rules?: Array - /** Specifies the category of the loader. No value means normal loader. */ - enforce?: 'pre' | 'post' -} - export interface RawModuleRule { /** * A conditional match matching an absolute path + query + fragment. @@ -2450,27 +1699,13 @@ export interface RawModuleRule { resolve?: RawResolveOptions issuer?: RawRuleSetCondition issuerLayer?: RawRuleSetCondition - dependency?: RawRuleSetCondition - scheme?: RawRuleSetCondition - mimetype?: RawRuleSetCondition - oneOf?: Array - rules?: Array - /** Specifies the category of the loader. No value means normal loader. */ - enforce?: 'pre' | 'post' -} - -/** - * `loader` is for both JS and Rust loaders. - * `options` is - * - a `None` on rust side and handled by js side `getOptions` when - * using with `loader`. - * - a `Some(string)` on rust side, deserialized by `serde_json::from_str` - * and passed to rust side loader in [get_builtin_loader] when using with - * `builtin_loader`. - */ -export interface RawModuleRuleUse { - loader: string - options?: string + dependency?: RawRuleSetCondition + scheme?: RawRuleSetCondition + mimetype?: RawRuleSetCondition + oneOf?: Array + rules?: Array + /** Specifies the category of the loader. No value means normal loader. */ + enforce?: 'pre' | 'post' } /** @@ -2493,16 +1728,6 @@ export interface RawNodeOption { global: string } -export interface RawNodeOption { - dirname: string - filename: string - global: string -} - -export interface RawNonStandard { - deepSelectorCombinator: boolean -} - export interface RawNonStandard { deepSelectorCombinator: boolean } @@ -2511,10 +1736,6 @@ export interface RawOccurrenceChunkIdsPluginOptions { prioritiseInitial?: boolean } -export interface RawOccurrenceChunkIdsPluginOptions { - prioritiseInitial?: boolean -} - export interface RawOptimizationOptions { removeAvailableModules: boolean sideEffects: boolean | string @@ -2525,37 +1746,6 @@ export interface RawOptimizationOptions { concatenateModules: boolean } -export interface RawOptimizationOptions { - removeAvailableModules: boolean - sideEffects: string - usedExports: string - providedExports: boolean - innerGraph: boolean - mangleExports: string - concatenateModules: boolean -} - -export interface RawOptions { - mode?: undefined | 'production' | 'development' | 'none' - target: Array - context: string - output: RawOutputOptions - resolve: RawResolveOptions - resolveLoader: RawResolveOptions - module: RawModuleOptions - devtool: string - optimization: RawOptimizationOptions - stats: RawStatsOptions - snapshot: RawSnapshotOptions - cache: RawCacheOptions - experiments: RawExperiments - node?: RawNodeOption - profile: boolean - amd?: string - bail: boolean - __references: Record -} - export interface RawOptions { mode?: undefined | 'production' | 'development' | 'none' context: string @@ -2620,61 +1810,6 @@ export interface RawOutputOptions { compareBeforeEmit: boolean } -export interface RawOutputOptions { - path: string - pathinfo: boolean | "verbose" - clean: boolean | JsCleanOptions - publicPath: "auto" | JsFilename - assetModuleFilename: JsFilename - wasmLoading: string - enabledWasmLoadingTypes: Array - webassemblyModuleFilename: string - filename: JsFilename - chunkFilename: JsFilename - crossOriginLoading: RawCrossOriginLoading - cssFilename: JsFilename - cssChunkFilename: JsFilename - hotUpdateMainFilename: string - hotUpdateChunkFilename: string - hotUpdateGlobal: string - uniqueName: string - chunkLoadingGlobal: string - library?: JsLibraryOptions - strictModuleErrorHandling: boolean - enabledLibraryTypes?: Array - globalObject: string - importFunctionName: string - importMetaName: string - iife: boolean - module: boolean - chunkLoading: string - chunkLoadTimeout: number - charset: boolean - enabledChunkLoadingTypes?: Array - trustedTypes?: RawTrustedTypes - sourceMapFilename: string - hashFunction: string - hashDigest: string - hashDigestLength: number - hashSalt?: string - asyncChunks: boolean - workerChunkLoading: string - workerWasmLoading: string - workerPublicPath: string - scriptType: "module" | "text/javascript" | "false" - environment: RawEnvironment - compareBeforeEmit: boolean -} - -export interface RawParserOptions { - type: "asset" | "css" | "css/auto" | "css/module" | "javascript" | "javascript/auto" | "javascript/dynamic" | "javascript/esm" - asset?: RawAssetParserOptions - css?: RawCssParserOptions - cssAuto?: RawCssAutoParserOptions - cssModule?: RawCssModuleParserOptions - javascript?: RawJavascriptParserOptions -} - export interface RawParserOptions { type: "asset" | "css" | "css/auto" | "css/module" | "javascript" | "javascript/auto" | "javascript/dynamic" | "javascript/esm" asset?: RawAssetParserOptions @@ -2690,21 +1825,6 @@ export interface RawPathData { url?: string } -export interface RawPathData { - filename?: string - contentHash?: string - url?: string -} - -export interface RawProgressPluginOptions { - prefix?: string - profile?: boolean - template?: string - tick?: string | Array - progressChars?: string - handler?: (percent: number, msg: string, items: string[]) => void -} - export interface RawProgressPluginOptions { prefix?: string profile?: boolean @@ -2725,21 +1845,6 @@ export interface RawProvideOptions { strictVersion?: boolean } -export interface RawProvideOptions { - key: string - shareKey: string - shareScope: string - version?: string | false | undefined - eager: boolean - singleton?: boolean - requiredVersion?: string | false | undefined - strictVersion?: boolean -} - -export interface RawRelated { - sourceMap?: string -} - export interface RawRelated { sourceMap?: string } @@ -2750,12 +1855,6 @@ export interface RawRemoteOptions { shareScope: string } -export interface RawRemoteOptions { - key: string - external: Array - shareScope: string -} - export interface RawResolveOptions { preferRelative?: boolean preferAbsolute?: boolean @@ -2816,19 +1915,6 @@ export interface RawRspackFuture { } -export interface RawRspackFuture { - -} - -export interface RawRuleSetCondition { - type: RawRuleSetConditionType - string?: string - regexp?: RegExp - logical?: Array - array?: Array - func?: (value: string) => boolean -} - export interface RawRuleSetCondition { type: RawRuleSetConditionType string?: string @@ -2846,30 +1932,12 @@ export declare enum RawRuleSetConditionType { func = 'func' } -export declare enum RawRuleSetConditionType { - string = 'string', - regexp = 'regexp', - logical = 'logical', - array = 'array', - func = 'func' -} - export interface RawRuleSetLogicalConditions { and?: Array or?: Array not?: RawRuleSetCondition } -export interface RawRuleSetLogicalConditions { - and?: Array - or?: Array - not?: RawRuleSetCondition -} - -export interface RawRuntimeChunkNameFnCtx { - name: string -} - export interface RawRuntimeChunkNameFnCtx { name: string } @@ -2878,17 +1946,6 @@ export interface RawRuntimeChunkOptions { name: string | ((entrypoint: { name: string }) => string) } -export interface RawRuntimeChunkOptions { - name: string | ((entrypoint: { name: string }) => string) -} - -export interface RawSizeLimitsPluginOptions { - assetFilter?: (assetFilename: string) => boolean - hints?: "error" | "warning" - maxAssetSize?: number - maxEntrypointSize?: number -} - export interface RawSizeLimitsPluginOptions { assetFilter?: (assetFilename: string) => boolean hints?: "error" | "warning" @@ -2896,31 +1953,6 @@ export interface RawSizeLimitsPluginOptions { maxEntrypointSize?: number } -export interface RawSnapshotOptions { - -} - -export interface RawSnapshotOptions { - -} - -export interface RawSourceMapDevToolPluginOptions { - append?: (false | null) | string | Function - columns?: boolean - fallbackModuleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string) - fileContext?: string - filename?: (false | null) | string - module?: boolean - moduleFilenameTemplate?: string | ((info: RawModuleFilenameTemplateFnCtx) => string) - namespace?: string - noSources?: boolean - publicPath?: string - sourceRoot?: string - test?: string | RegExp | (string | RegExp)[] - include?: string | RegExp | (string | RegExp)[] - exclude?: string | RegExp | (string | RegExp)[] -} - export interface RawSourceMapDevToolPluginOptions { append?: (false | null) | string | Function columns?: boolean @@ -2942,31 +1974,6 @@ export interface RawSplitChunkSizes { sizes: Record } -export interface RawSplitChunkSizes { - sizes: Record -} - -export interface RawSplitChunksOptions { - fallbackCacheGroup?: RawFallbackCacheGroupOptions - name?: string | false | Function - cacheGroups?: Array - /** What kind of chunks should be selected. */ - chunks?: RegExp | 'async' | 'initial' | 'all' | Function - usedExports?: boolean - automaticNameDelimiter?: string - maxAsyncRequests?: number - maxInitialRequests?: number - defaultSizeTypes: Array - minChunks?: number - hidePathInfo?: boolean - minSize?: number | RawSplitChunkSizes - enforceSizeThreshold?: number - minRemainingSize?: number | RawSplitChunkSizes - maxSize?: number | RawSplitChunkSizes - maxAsyncSize?: number | RawSplitChunkSizes - maxInitialSize?: number | RawSplitChunkSizes -} - export interface RawSplitChunksOptions { fallbackCacheGroup?: RawFallbackCacheGroupOptions name?: string | false | Function @@ -2992,15 +1999,6 @@ export interface RawStatsOptions { colors: boolean } -export interface RawStatsOptions { - colors: boolean -} - -export interface RawStorageOptions { - type: "filesystem" - directory: string -} - export interface RawStorageOptions { type: "filesystem" directory: string @@ -3014,22 +2012,6 @@ export interface RawSwcJsMinimizerOptions { minify?: boolean } -export interface RawSwcJsMinimizerOptions { - compress: any - mangle: any - format: any - module?: boolean - minify?: boolean -} - -export interface RawSwcJsMinimizerRspackPluginOptions { - test?: string | RegExp | (string | RegExp)[] - include?: string | RegExp | (string | RegExp)[] - exclude?: string | RegExp | (string | RegExp)[] - extractComments?: RawExtractComments - minimizerOptions: RawSwcJsMinimizerOptions -} - export interface RawSwcJsMinimizerRspackPluginOptions { test?: string | RegExp | (string | RegExp)[] include?: string | RegExp | (string | RegExp)[] @@ -3043,16 +2025,6 @@ export interface RawToOptions { absoluteFilename: string } -export interface RawToOptions { - context: string - absoluteFilename: string -} - -export interface RawTrustedTypes { - policyName?: string - onPolicyCreationFailure?: string -} - export interface RawTrustedTypes { policyName?: string onPolicyCreationFailure?: string diff --git a/crates/rspack_binding_values/src/module_graph.rs b/crates/rspack_binding_values/src/module_graph.rs index 272906baf06..c95986ae3b1 100644 --- a/crates/rspack_binding_values/src/module_graph.rs +++ b/crates/rspack_binding_values/src/module_graph.rs @@ -100,7 +100,7 @@ impl JsModuleGraph { module_graph .connection_by_dependency_id(&dependency.dependency_id) .map(|connection| { - JsModuleGraphConnectionWrapper::new(connection.dependency_id, &compilation) + JsModuleGraphConnectionWrapper::new(connection.dependency_id, compilation) }), ) } @@ -115,7 +115,7 @@ impl JsModuleGraph { module_graph .get_outgoing_connections(&module.identifier) .map(|connection| { - JsModuleGraphConnectionWrapper::new(connection.dependency_id, &compilation) + JsModuleGraphConnectionWrapper::new(connection.dependency_id, compilation) }) .collect::>(), ) diff --git a/packages/bench/ts-react.bench.ts b/packages/bench/ts-react.bench.ts index 8a124cb554a..5416b84520a 100644 --- a/packages/bench/ts-react.bench.ts +++ b/packages/bench/ts-react.bench.ts @@ -57,4 +57,32 @@ describe("TypeScript React project", () => { } } }); + + bench("Traverse module graph by connections", () => { + const entries = theCompilation.entries.values(); + + const visitedModules = new Set(); + + function traverse(connection) { + const module = connection ? connection.module : null; + if (module) { + if (visitedModules.has(module)) { + return; + } + const connections = + theCompilation.moduleGraph.getOutgoingConnections(module); + visitedModules.add(module); + for (const c of connections) { + traverse(c); + } + } + } + + for (const entry of entries) { + for (const dependency of entry.dependencies) { + const connection = theCompilation.moduleGraph.getConnection(dependency); + traverse(connection); + } + } + }); }); diff --git a/packages/rspack/etc/core.api.md b/packages/rspack/etc/core.api.md index 08a6d506693..c7a8a326a03 100644 --- a/packages/rspack/etc/core.api.md +++ b/packages/rspack/etc/core.api.md @@ -4,10 +4,7 @@ ```ts -/// - import type { Abortable } from 'node:events'; -import { Assumptions } from './assumptions'; import { AsyncParallelHook } from '@rspack/lite-tapable'; import { AsyncSeriesBailHook } from '@rspack/lite-tapable'; import * as binding from '@rspack/binding'; @@ -17,14 +14,16 @@ import { CacheFacade as CacheFacade_2 } from './lib/CacheFacade'; import type { Callback } from '@rspack/lite-tapable'; import { cleanupGlobalTrace } from '@rspack/binding'; import { Compiler as Compiler_2 } from '..'; +import type { Config as Config_2 } from '@swc/types'; import { default as default_2 } from './util/hash'; +import type { EnvConfig } from '@swc/types'; +import type { EsParserConfig } from '@swc/types'; import { RawEvalDevToolModulePluginOptions as EvalDevToolModulePluginOptions } from '@rspack/binding'; -import { EventEmitter } from 'events'; import { ExternalObject } from '@rspack/binding'; -import fs from 'graceful-fs'; -import { fs as fs_2 } from 'fs'; +import { fs } from 'fs'; import { HookMap } from '@rspack/lite-tapable'; import { inspect } from 'node:util'; +import { IssueData } from 'zod'; import type { JsAddingRuntimeModule } from '@rspack/binding'; import { JsAfterEmitData } from '@rspack/binding'; import { JsAfterTemplateExecutionData } from '@rspack/binding'; @@ -34,6 +33,7 @@ import type { JsAssetInfo } from '@rspack/binding'; import { JsBeforeAssetTagGenerationData } from '@rspack/binding'; import { JsBeforeEmitData } from '@rspack/binding'; import type { JsBuildMeta } from '@rspack/binding'; +import type { JscConfig } from '@swc/types'; import { JsChunk } from '@rspack/binding'; import type { JsChunkGraph } from '@rspack/binding'; import type { JsChunkGroup } from '@rspack/binding'; @@ -50,7 +50,7 @@ import { JsHtmlPluginTag } from '@rspack/binding'; import { JsLoaderItem } from '@rspack/binding'; import { JsModule } from '@rspack/binding'; import type { JsModuleGraph } from '@rspack/binding'; -import { JsModuleGraphConnection } from '@rspack/binding'; +import type { JsModuleGraphConnection } from '@rspack/binding'; import { JsRuntimeModule } from '@rspack/binding'; import type { JsStats } from '@rspack/binding'; import type { JsStatsCompilation } from '@rspack/binding'; @@ -58,6 +58,9 @@ import type { JsStatsError } from '@rspack/binding'; import type { JsStatsWarning } from '@rspack/binding'; import * as liteTapable from '@rspack/lite-tapable'; import { Logger as Logger_2 } from './logging/Logger'; +import type { ModuleConfig } from '@swc/types'; +import type { ParserConfig } from '@swc/types'; +import { ParseReturnType } from 'zod'; import { RawCopyPattern } from '@rspack/binding'; import { RawCssExtractPluginOption } from '@rspack/binding'; import type { RawFuncUseCtx } from '@rspack/binding'; @@ -67,13 +70,21 @@ import { RawProgressPluginOptions } from '@rspack/binding'; import { RawProvideOptions } from '@rspack/binding'; import { RawRuntimeChunkOptions } from '@rspack/binding'; import { registerGlobalTrace } from '@rspack/binding'; +import type { ResolveRequest } from 'enhanced-resolve'; import { RspackOptionsNormalized as RspackOptionsNormalized_2 } from '.'; +import type { Source } from 'webpack-sources'; import { RawSourceMapDevToolPluginOptions as SourceMapDevToolPluginOptions } from '@rspack/binding'; -import sources = require('../compiled/webpack-sources'); +import sources = require('webpack-sources'); import { SyncBailHook } from '@rspack/lite-tapable'; import { SyncHook } from '@rspack/lite-tapable'; import { SyncWaterfallHook } from '@rspack/lite-tapable'; +import type { TransformConfig } from '@swc/types'; +import type { TsParserConfig } from '@swc/types'; +import type Watchpack from 'watchpack'; import type * as webpackDevServer from 'webpack-dev-server'; +import { z } from 'zod'; +import { ZodType } from 'zod'; +import { ZodTypeDef } from 'zod'; // @public (undocumented) interface AdditionalData { @@ -84,23 +95,12 @@ interface AdditionalData { // @public (undocumented) type AffectedHooks = keyof Compiler["hooks"]; -// @public (undocumented) -type allKeys = T extends any ? keyof T : never; - // @public (undocumented) type AllowTarget = "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "node" | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | "electron-main" | `electron${number}-main` | `electron${number}.${number}-main` | "electron-renderer" | `electron${number}-renderer` | `electron${number}.${number}-renderer` | "electron-preload" | `electron${number}-preload` | `electron${number}.${number}-preload` | "nwjs" | `nwjs${number}` | `nwjs${number}.${number}` | "node-webkit" | `node-webkit${number}` | `node-webkit${number}.${number}` | "browserslist" | `browserslist:${string}`; // @public export type Amd = false | Record; -// @public (undocumented) -interface AmdConfig extends BaseModuleConfig { - // (undocumented) - moduleId?: string; - // (undocumented) - type: "amd"; -} - // @public export type AmdContainer = string; @@ -110,12 +110,6 @@ export const applyRspackOptionsBaseDefaults: (options: RspackOptionsNormalized) // @public (undocumented) export const applyRspackOptionsDefaults: (options: RspackOptionsNormalized) => void; -// @public (undocumented) -type ArrayCardinality = "many" | "atleastone"; - -// @public (undocumented) -type arrayOutputType = Cardinality extends "atleastone" ? [T["_output"], ...T["_output"][]] : T["_output"][]; - // @public const asRegExp: (test: string | RegExp) => RegExp; @@ -211,9 +205,6 @@ export type Assets = Record; // @public export type AsyncChunks = boolean; -// @public (undocumented) -type AsyncParseReturnType = Promise>; - // @public export type AuxiliaryComment = string | LibraryCustomUmdCommentObject; @@ -268,64 +259,12 @@ abstract class BaseCache { abstract storePromise(data: T): Promise; } -// @public (undocumented) -interface BaseModuleConfig { - // (undocumented) - allowTopLevelThis?: boolean; - exportInteropAnnotation?: boolean; - ignoreDynamic?: boolean; - importInterop?: "swc" | "babel" | "node" | "none"; - lazy?: boolean | string[]; - // @deprecated (undocumented) - noInterop?: boolean; - // (undocumented) - preserveImportMeta?: boolean; - strict?: boolean; - strictMode?: boolean; -} - -// @public (undocumented) -interface BaseResolveRequest { - // (undocumented) - __innerRequest?: string; - // (undocumented) - __innerRequest_relativePath?: string; - // (undocumented) - __innerRequest_request?: string; - // (undocumented) - context?: object; - // (undocumented) - descriptionFileData?: JsonObject; - // (undocumented) - descriptionFilePath?: string; - // (undocumented) - descriptionFileRoot?: string; - // (undocumented) - fullySpecified?: boolean; - // (undocumented) - ignoreSymlinks?: boolean; - // (undocumented) - path: string | false; - // (undocumented) - relativePath?: string; -} - // @public export type BaseUri = string; // @public (undocumented) type BigIntStatsCallback = (err: NodeJS.ErrnoException | null, stats?: IBigIntStats) => void; -// @public (undocumented) -const BRAND: unique symbol; - -// @public (undocumented) -type BRAND = { - [BRAND]: { - [k in T]: true; - }; -}; - // @public (undocumented) type BufferCallback = (err: NodeJS.ErrnoException | null, data?: Buffer) => void; @@ -334,11 +273,6 @@ type BufferEncodingOption = "buffer" | { encoding: "buffer"; }; -// @public (undocumented) -type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | { - readonly [Symbol.toStringTag]: string; -} | Date | Error | Generator | Promise | RegExp; - // @public (undocumented) class Cache_2 { constructor(); @@ -557,12 +491,6 @@ type CodeValue = RecursiveArrayOrRecord; // @public (undocumented) type CodeValuePrimitive = null | undefined | RegExp | Function | string | number | boolean | bigint | undefined; -// @public (undocumented) -interface CommonJsConfig extends BaseModuleConfig { - // (undocumented) - type: "commonjs"; -} - // @public (undocumented) export class Compilation { constructor(compiler: Compiler, inner: JsCompilation); @@ -698,7 +626,7 @@ export class Compilation { Iterable ], void>; finishModules: liteTapable.AsyncSeriesHook<[Iterable], void>; - chunkHash: liteTapable.SyncHook<[Chunk, Hash_2], void>; + chunkHash: liteTapable.SyncHook<[Chunk, Hash], void>; chunkAsset: liteTapable.SyncHook<[Chunk, string], void>; processWarnings: liteTapable.SyncWaterfallHook<[Error[]]>; succeedModule: liteTapable.SyncHook<[Module], void>; @@ -805,7 +733,7 @@ export class Compilation { // @public (undocumented) type CompilationHooks = { - chunkHash: liteTapable.SyncHook<[Chunk, Hash_2]>; + chunkHash: liteTapable.SyncHook<[Chunk, Hash]>; }; // @public (undocumented) @@ -957,36 +885,9 @@ type Config = { // @public (undocumented) export const config: Config; -// @public -interface Config_2 { - // (undocumented) - env?: EnvConfig; - exclude?: string | string[]; - // (undocumented) - inlineSourcesContent?: boolean; - // (undocumented) - jsc?: JscConfig; - // (undocumented) - minify?: boolean; - // (undocumented) - module?: ModuleConfig; - sourceMaps?: boolean | "inline"; - test?: string | string[]; -} - // @public export type Configuration = RspackOptions; -// @public -interface ConstModulesConfig { - // (undocumented) - globals?: { - [module: string]: { - [name: string]: string; - }; - }; -} - // @public (undocumented) export type Consumes = (ConsumesItem | ConsumesObject)[] | ConsumesObject; @@ -1311,9 +1212,6 @@ export type CssParserOptions = { namedExports?: CssParserNamedExports; }; -// @public (undocumented) -type CustomErrorParams = Partial>; - // @public (undocumented) export const DefinePlugin: { new (define: DefinePluginOptions): { @@ -1401,76 +1299,6 @@ interface DiagnosticLocation { text?: string; } -// @public (undocumented) -class DirectoryWatcher extends EventEmitter { - constructor(directoryPath: string, options: Watchpack.WatcherOptions); - // (undocumented) - close(): void; - // (undocumented) - createNestedWatcher(directoryPath: string): void; - // (undocumented) - directories: { - [path: string]: Watcher_2 | true; - }; - // (undocumented) - doInitialScan(): void; - // (undocumented) - files: { - [path: string]: [number, number]; - }; - // (undocumented) - getTimes(): { - [path: string]: number; - }; - // (undocumented) - initialScan: boolean; - // (undocumented) - initialScanRemoved: string[]; - // (undocumented) - nestedWatching: boolean; - // (undocumented) - onChange(filePath: string, stat: fs.Stats): void; - // (undocumented) - onDirectoryAdded(directoryPath: string): void; - // (undocumented) - onDirectoryUnlinked(directoryPath: string): void; - // (undocumented) - onFileAdded(filePath: string, stat: fs.Stats): void; - // (undocumented) - onFileUnlinked(filePath: string): void; - // (undocumented) - onWatcherError(): void; - // (undocumented) - options: Watchpack.WatcherOptions; - // (undocumented) - path: string; - // (undocumented) - refs: number; - // (undocumented) - setDirectory(directoryPath: string, exist: boolean, initial: boolean): void; - // (undocumented) - setFileTime(filePath: string, mtime: number, initial: boolean, type?: string | boolean): void; - // (undocumented) - setNestedWatching(flag: boolean): void; - // (undocumented) - watch(filePath: string, startTime: number): Watcher_2; - // (undocumented) - watcher: fs.FSWatcher; - // (undocumented) - watchers: { - [path: string]: Watcher_2[]; - }; -} - -// @public (undocumented) -type DIRTY = { - status: "dirty"; - value: T; -}; - -// @public (undocumented) -const DIRTY: (value: T) => DIRTY; - // @public (undocumented) export class DllPlugin { constructor(options: DllPluginOptions); @@ -1549,9 +1377,6 @@ export class DynamicEntryPlugin extends RspackBuiltinPlugin { raw(compiler: Compiler): BuiltinPlugin | undefined; } -// @public (undocumented) -type Effect = RefinementEffect | TransformEffect | PreprocessEffect; - // @public (undocumented) interface Electron { // (undocumented) @@ -1622,12 +1447,6 @@ type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; // @public export type Entry = EntryStatic | EntryDynamic; -// @public (undocumented) -interface Entry_2 { - safeTime: number; - timestamp: number; -} - // @public (undocumented) class EntryData { // (undocumented) @@ -1735,33 +1554,6 @@ export interface EntryStaticNormalized { // @public (undocumented) export type EntryUnnamed = EntryItem; -// @public -interface EnvConfig { - bugfixes?: boolean; - coreJs?: string; - // (undocumented) - debug?: boolean; - // (undocumented) - dynamicImport?: boolean; - // (undocumented) - exclude?: string[]; - forceAllTransforms?: boolean; - // (undocumented) - include?: string[]; - // (undocumented) - loose?: boolean; - // (undocumented) - mode?: "usage" | "entry"; - // (undocumented) - path?: string; - // (undocumented) - shippedProposals?: boolean; - // (undocumented) - skip?: string[]; - // (undocumented) - targets?: any; -} - // @public export type Environment = { arrowFunction?: boolean; @@ -1790,75 +1582,11 @@ export class EnvironmentPlugin { keys: string[]; } -// @public (undocumented) -type ErrorMapCtx = { - defaultError: string; - data: any; -}; - -// @public (undocumented) -namespace errorUtil { - // (undocumented) - type ErrMessage = string | { - message?: string; - }; - const // (undocumented) - errToObj: (message?: ErrMessage | undefined) => { - message?: string | undefined; - }; - const // (undocumented) - toString: (message?: ErrMessage | undefined) => string | undefined; -} - // @public (undocumented) type ErrorWithDetails = Error & { details?: string; }; -// @public (undocumented) -interface Es6Config extends BaseModuleConfig { - // (undocumented) - type: "es6"; -} - -// @public (undocumented) -interface EsParserConfig { - allowReturnOutsideFunction?: boolean; - allowSuperOutsideMethod?: boolean; - autoAccessors?: boolean; - // @deprecated (undocumented) - classPrivateProperty?: boolean; - // @deprecated (undocumented) - classProperty?: boolean; - decorators?: boolean; - decoratorsBeforeExport?: boolean; - // @deprecated (undocumented) - dynamicImport?: boolean; - explicitResourceManagement?: boolean; - exportDefaultFrom?: boolean; - // @deprecated (undocumented) - exportNamespaceFrom?: boolean; - functionBind?: boolean; - // @deprecated (undocumented) - importAssertions?: boolean; - importAttributes?: boolean; - // @deprecated (undocumented) - importMeta?: boolean; - jsx?: boolean; - // @deprecated (undocumented) - nullishCoalescing?: boolean; - // @deprecated (undocumented) - numericSeparator?: boolean; - // @deprecated (undocumented) - optionalChaining?: boolean; - // @deprecated (undocumented) - privateMethod?: boolean; - // (undocumented) - syntax: "ecmascript"; - // @deprecated (undocumented) - topLevelAwait?: boolean; -} - // @public (undocumented) interface Etag { // (undocumented) @@ -2196,13 +1924,6 @@ export function getRawResolve(resolve: Resolve): RawOptions["resolve"]; // @public export type GlobalObject = string; -// @public -interface GlobalPassOption { - envs?: string[] | Record; - typeofs?: Record; - vars?: Record; -} - // @public (undocumented) type GotHandler = (result: any | null, callback: (error: Error | null) => void) => void; @@ -2222,15 +1943,6 @@ type GroupOptions = { // @public (undocumented) class Hash { - constructor(); - - digest(encoding?: string): string | Buffer; - - update(data: string | Buffer, inputEncoding?: string): Hash; -} - -// @public (undocumented) -class Hash_2 { digest(encoding?: string): string | Buffer; update(data: string | Buffer, inputEncoding?: string): this; } @@ -2238,11 +1950,11 @@ class Hash_2 { // @public (undocumented) interface HashableObject { // (undocumented) - updateHash(hash: Hash_2): void; + updateHash(hash: Hash): void; } // @public (undocumented) -type HashConstructor = typeof Hash_2; +type HashConstructor = typeof Hash; // @public export type HashDigest = string; @@ -2455,9 +2167,6 @@ export type InfrastructureLogging = { stream?: NodeJS.WritableStream; }; -// @public (undocumented) -type input> = T["_input"]; - // @public (undocumented) type InputFileSystem = { readFile: ReadFile; @@ -2493,20 +2202,6 @@ type IntermediateFileSystemExtras = { close: (arg0: number, arg1: (arg0: null | NodeJS.ErrnoException) => void) => void; }; -// @public (undocumented) -type INVALID = { - status: "aborted"; -}; - -// @public (undocumented) -const INVALID: INVALID; - -// @public (undocumented) -type IssueData = stripPath & { - path?: (string | number)[]; - fatal?: boolean; -}; - // @public (undocumented) type IStats = IStatsBase; @@ -2608,45 +2303,6 @@ export type JavascriptParserOptions = { importDynamic?: boolean; }; -// @public (undocumented) -interface JscConfig { - // (undocumented) - assumptions?: Assumptions; - // (undocumented) - baseUrl?: string; - experimental?: { - optimizeHygiene?: boolean; - keepImportAttributes?: boolean; - emitAssertForImportAttributes?: boolean; - cacheRoot?: string; - plugins?: Array<[string, Record]>; - runPluginFirst?: boolean; - disableBuiltinTransformsForInternalTesting?: boolean; - emitIsolatedDts?: boolean; - disableAllLints?: boolean; - keepImportAssertions?: boolean; - }; - externalHelpers?: boolean; - keepClassNames?: boolean; - // (undocumented) - loose?: boolean; - // (undocumented) - minify?: JsMinifyOptions; - parser?: ParserConfig; - // (undocumented) - paths?: { - [from: string]: string[]; - }; - // (undocumented) - preserveAllComments?: boolean; - target?: JscTarget; - // (undocumented) - transform?: TransformConfig; -} - -// @public (undocumented) -type JscTarget = "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "es2023" | "es2024" | "esnext"; - // @public (undocumented) interface JsFormatOptions { asciiOnly?: boolean; @@ -2673,89 +2329,21 @@ interface JsFormatOptions { wrapIife?: boolean; } -// @public -interface JsFormatOptions_2 { - asciiOnly?: boolean; - beautify?: boolean; - braces?: boolean; - comments?: false | "some" | "all"; - ecma?: TerserEcmaVersion_2; - indentLevel?: number; - indentStart?: number; - inlineScript?: boolean; - keepNumbers?: number; - keepQuotedProps?: boolean; - maxLineLen?: number | false; - preamble?: string; - preserveAnnotations?: boolean; - quoteKeys?: boolean; - quoteStyle?: boolean; - safari10?: boolean; - semicolons?: boolean; - shebang?: boolean; - webkit?: boolean; - wrapFuncArgs?: boolean; - wrapIife?: boolean; -} - -// @public (undocumented) -interface JsMinifyOptions { - // (undocumented) - compress?: TerserCompressOptions_2 | boolean; - // (undocumented) - ecma?: TerserEcmaVersion_2; - // (undocumented) - format?: JsFormatOptions_2 & ToSnakeCaseProperties_2; - // (undocumented) - inlineSourcesContent?: boolean; - // (undocumented) - keep_classnames?: boolean; - // (undocumented) - keep_fnames?: boolean; - // (undocumented) - mangle?: TerserMangleOptions_2 | boolean; - // (undocumented) - module?: boolean | "unknown"; - // (undocumented) - outputPath?: string; - // (undocumented) - safari10?: boolean; - // (undocumented) - sourceMap?: boolean; - // (undocumented) - toplevel?: boolean; -} - // @public (undocumented) -type JsonArray = JsonValue_2[]; +type JsonArray = JsonValue[]; // @public (undocumented) -type JsonObject = { [index: string]: JsonValue } & { - [index: string]: - | undefined - | null - | string - | number - | boolean - | JsonObject - | JsonValue[]; -}; - -// @public (undocumented) -type JsonObject_2 = { - [Key in string]: JsonValue_2; +type JsonObject = { + [Key in string]: JsonValue; } & { - [Key in string]?: JsonValue_2 | undefined; + [Key in string]?: JsonValue | undefined; }; // @public (undocumented) type JsonPrimitive = string | number | boolean | null; // @public (undocumented) -type JsonValue = null | string | number | boolean | JsonObject | JsonValue[]; - -// @public (undocumented) -type JsonValue_2 = JsonPrimitive | JsonObject_2 | JsonArray; +type JsonValue = JsonPrimitive | JsonObject | JsonArray; // @public (undocumented) type KnownAssetInfo = { @@ -3395,7 +2983,7 @@ export interface LoaderContext { utils: { absolutify: (context: string, request: string) => string; contextify: (context: string, request: string) => string; - createHash: (algorithm?: string) => Hash_2; + createHash: (algorithm?: string) => Hash; }; // (undocumented) version: 2; @@ -3613,12 +3201,6 @@ type MakeDirectoryOptions = { mode?: string | number; }; -// @public (undocumented) -type MakeReadonly = T extends Map ? ReadonlyMap : T extends Set ? ReadonlySet : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array ? ReadonlyArray : T extends BuiltIn ? T : Readonly; - -// @public (undocumented) -type MapOptions = { columns?: boolean; module?: boolean }; - // @public type Matcher = string | RegExp | (string | RegExp)[]; @@ -3687,9 +3269,6 @@ export class Module { readonly useSourceMap: boolean; } -// @public (undocumented) -type ModuleConfig = Es6Config | CommonJsConfig | UmdConfig | AmdConfig | NodeNextConfig | SystemjsConfig; - // @public (undocumented) class ModuleFederationPlugin { constructor(_options: ModuleFederationPluginOptions); @@ -3839,8 +3418,8 @@ export class MultiCompiler { // (undocumented) _options: MultiCompilerOptions; // (undocumented) - get outputFileSystem(): fs_2; - set outputFileSystem(value: fs_2); + get outputFileSystem(): fs; + set outputFileSystem(value: fs); // (undocumented) get outputPath(): string; // (undocumented) @@ -3937,12 +3516,6 @@ interface NodeEnvironmentPluginOptions { infrastructureLogging: InfrastructureLogging; } -// @public (undocumented) -interface NodeNextConfig extends BaseModuleConfig { - // (undocumented) - type: "nodenext"; -} - // @public export type NodeOptions = { __dirname?: boolean | "warn-mock" | "mock" | "eval-only" | "node-module"; @@ -4045,62 +3618,6 @@ type ObjectEncodingOptions = { encoding?: BufferEncoding | null; }; -// @public (undocumented) -namespace objectUtil { - // (undocumented) - type addQuestionMarks = { - [K in requiredKeys]: T[K]; - } & { - [K in optionalKeys]?: T[K]; - } & { - [k in keyof T]?: unknown; - }; - // (undocumented) - type extendShape = { - [K in keyof A as K extends keyof B ? never : K]: A[K]; - } & { - [K in keyof B]: B[K]; - }; - // (undocumented) - type flatten = identity<{ - [k in keyof T]: T[k]; - }>; - // (undocumented) - type identity = T; - // (undocumented) - type MergeShapes = { - [k in Exclude]: U[k]; - } & V; - // (undocumented) - type noNever = identity<{ - [k in noNeverKeys]: k extends keyof T ? T[k] : never; - }>; - // (undocumented) - type noNeverKeys = { - [k in keyof T]: [T[k]] extends [never] ? never : k; - }[keyof T]; - // (undocumented) - type optionalKeys = { - [k in keyof T]: undefined extends T[k] ? k : never; - }[keyof T]; - const // (undocumented) - mergeShapes: (first: U, second: T) => T & U; - // (undocumented) - type requiredKeys = { - [k in keyof T]: undefined extends T[k] ? never : k; - }[keyof T]; - { }; -} - -// @public (undocumented) -type OK = { - status: "valid"; - value: T; -}; - -// @public (undocumented) -const OK: (value: T) => OK; - // @public (undocumented) type Open = (file: PathLike, flags: undefined | string | number, callback: (arg0: null | NodeJS.ErrnoException, arg1?: number) => void) => void; @@ -4190,18 +3707,6 @@ interface Optimize { // @public (undocumented) export const optimize: Optimize; -// @public (undocumented) -interface OptimizerConfig { - // (undocumented) - globals?: GlobalPassOption; - // (undocumented) - jsonify?: { - minCost: number; - }; - // (undocumented) - simplify?: boolean; -} - // @public const OriginEntryPlugin: { new (context: string, entry: string, options?: string | EntryOptions | undefined): { @@ -4270,9 +3775,6 @@ export type Output = { compareBeforeEmit?: boolean; }; -// @public (undocumented) -type output> = T["_output"]; - // @public (undocumented) export interface OutputFileSystem { // (undocumented) @@ -4400,70 +3902,6 @@ export interface OutputNormalized { workerWasmLoading?: WasmLoading; } -// @public (undocumented) -interface ParseContext { - // (undocumented) - readonly common: { - readonly issues: ZodIssue[]; - readonly contextualErrorMap?: ZodErrorMap; - readonly async: boolean; - }; - // (undocumented) - readonly data: any; - // (undocumented) - readonly parent: ParseContext | null; - // (undocumented) - readonly parsedType: ZodParsedType; - // (undocumented) - readonly path: ParsePath; - // (undocumented) - readonly schemaErrorMap?: ZodErrorMap; -} - -// @public (undocumented) -interface ParsedIdentifier { - // (undocumented) - directory: boolean; - // (undocumented) - file: boolean; - // (undocumented) - fragment: string; - // (undocumented) - internal: boolean; - // (undocumented) - module: boolean; - // (undocumented) - query: string; - // (undocumented) - request: string; -} - -// @public (undocumented) -type ParseInput = { - data: any; - path: (string | number)[]; - parent: ParseContext; -}; - -// @public (undocumented) -type ParseParams = { - path: (string | number)[]; - errorMap: ZodErrorMap; - async: boolean; -}; - -// @public (undocumented) -type ParsePath = ParsePathComponent[]; - -// @public (undocumented) -type ParsePathComponent = string | number; - -// @public (undocumented) -type ParserConfig = TsParserConfig | EsParserConfig; - -// @public (undocumented) -type ParseReturnType = SyncParseReturnType | AsyncParseReturnType; - // @public export type ParserOptionsByModuleType = ParserOptionsByModuleTypeKnown | ParserOptionsByModuleTypeUnknown; @@ -4484,29 +3922,6 @@ export type ParserOptionsByModuleTypeUnknown = { [x: string]: Record; }; -// @public (undocumented) -class ParseStatus { - // (undocumented) - abort(): void; - // (undocumented) - dirty(): void; - // (undocumented) - static mergeArray(status: ParseStatus, results: SyncParseReturnType[]): SyncParseReturnType; - // (undocumented) - static mergeObjectAsync(status: ParseStatus, pairs: { - key: ParseReturnType; - value: ParseReturnType; - }[]): Promise>; - // (undocumented) - static mergeObjectSync(status: ParseStatus, pairs: { - key: SyncParseReturnType; - value: SyncParseReturnType; - alwaysSet?: boolean; - }[]): SyncParseReturnType; - // (undocumented) - value: "aborted" | "dirty" | "valid"; -} - // @public export type Path = string; @@ -4575,15 +3990,6 @@ type PluginImportOptions = PluginImportConfig[] | undefined; // @public (undocumented) export type Plugins = Plugin_2[]; -// @public (undocumented) -type PreprocessEffect = { - type: "preprocess"; - transform: (arg: T, ctx: RefinementCtx) => any; -}; - -// @public (undocumented) -type Primitive = string | number | symbol | bigint | boolean | null | undefined; - // @public (undocumented) type PrintedElement = { element: string; @@ -4693,39 +4099,6 @@ export type PublicPath = "auto" | Filename; // @public (undocumented) type Purge = (files?: string | string[] | Set) => void; -// @public (undocumented) -type RawCreateParams = { - errorMap?: ZodErrorMap; - invalid_type_error?: string; - required_error?: string; - message?: string; - description?: string; -} | undefined; - -// @public (undocumented) -type RawSourceMap = { - version: number; - sources: string[]; - names: string[]; - sourceRoot?: string; - sourcesContent?: string[]; - mappings: string; - file: string; -}; - -// @public (undocumented) -interface ReactConfig { - development?: boolean; - importSource?: string; - pragma?: string; - pragmaFrag?: string; - refresh?: boolean; - runtime?: "automatic" | "classic"; - throwIfNamespace?: boolean; - // @deprecated - useBuiltins?: boolean; -} - // @public (undocumented) type Read = (fd: number, options: ReadAsyncOptions, callback: (err: null | NodeJS.ErrnoException, bytesRead: number, buffer: TBuffer) => void) => void; @@ -4829,10 +4202,10 @@ type ReadFileSync = { type ReadJson = (path: PathOrFileDescriptor, callback: ReadJsonCallback) => void; // @public (undocumented) -type ReadJsonCallback = (err: NodeJS.ErrnoException | Error | null, data?: JsonObject_2) => void; +type ReadJsonCallback = (err: NodeJS.ErrnoException | Error | null, data?: JsonObject) => void; // @public (undocumented) -type ReadJsonSync = (path: PathOrFileDescriptor) => JsonObject_2; +type ReadJsonSync = (path: PathOrFileDescriptor) => JsonObject; // @public (undocumented) type Readlink = { @@ -4869,29 +4242,6 @@ type RecursiveArrayOrRecord = { [index: string]: RecursiveArrayOrRecord; } | Array> | T; -// @public (undocumented) -type recursiveZodFormattedError = T extends [any, ...any[]] ? { - [K in keyof T]?: ZodFormattedError; -} : T extends any[] ? { - [k: number]: ZodFormattedError; -} : T extends object ? { - [K in keyof T]?: ZodFormattedError; -} : unknown; - -// @public (undocumented) -interface RefinementCtx { - // (undocumented) - addIssue: (arg: IssueData) => void; - // (undocumented) - path: (string | number)[]; -} - -// @public (undocumented) -type RefinementEffect = { - type: "refinement"; - refinement: (arg: T, ctx: RefinementCtx) => any; -}; - // @public (undocumented) export type Remotes = (RemotesItem | RemotesObject)[] | RemotesObject; @@ -4998,9 +4348,6 @@ class Resolver { withOptions({ dependencyCategory, resolveToContext, ...resolve }: ResolveOptionsWithDependencyType_2): Resolver; } -// @public (undocumented) -type ResolveRequest = BaseResolveRequest & Partial; - // @public (undocumented) class ResolverFactory { constructor(); @@ -8647,95 +7994,6 @@ export const rspackOptions: z.ZodObject<{ errorsSpace?: number | undefined; warningsSpace?: number | undefined; } | undefined; - loader?: Record | undefined; - externals?: string | RegExp | Record | ((args_0: t.ExternalItemFunctionData, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue | undefined, args_2: "module" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "promise" | "module-import" | "script" | "node-commonjs" | "commonjs-import" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: t.ExternalItemFunctionData, ...args: unknown[]) => Promise) | (string | RegExp | Record | ((args_0: t.ExternalItemFunctionData, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue | undefined, args_2: "module" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "promise" | "module-import" | "script" | "node-commonjs" | "commonjs-import" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: t.ExternalItemFunctionData, ...args: unknown[]) => Promise))[] | undefined; - target?: false | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | `electron${number}-main` | `electron${number}.${number}-main` | `electron${number}-renderer` | `electron${number}.${number}-renderer` | `electron${number}-preload` | `electron${number}.${number}-preload` | `nwjs${number}` | `nwjs${number}.${number}` | `node-webkit${number}` | `node-webkit${number}.${number}` | `browserslist:${string}` | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "node" | "electron-main" | "electron-renderer" | "electron-preload" | "nwjs" | "node-webkit" | "browserslist" | ("async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | `electron${number}-main` | `electron${number}.${number}-main` | `electron${number}-renderer` | `electron${number}.${number}-renderer` | `electron${number}-preload` | `electron${number}.${number}-preload` | `nwjs${number}` | `nwjs${number}.${number}` | `node-webkit${number}` | `node-webkit${number}.${number}` | `browserslist:${string}` | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "node" | "electron-main" | "electron-renderer" | "electron-preload" | "nwjs" | "node-webkit" | "browserslist")[] | undefined; - entry?: string | string[] | Record string) | undefined; - baseUri?: string | undefined; - filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined; - library?: { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - commonjs2?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - layer?: string | null | undefined; - wasmLoading?: string | false | undefined; - dependOn?: string | string[] | undefined; - }> | ((...args: unknown[]) => string | string[] | Record string) | undefined; - baseUri?: string | undefined; - filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined; - library?: { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - commonjs2?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - layer?: string | null | undefined; - wasmLoading?: string | false | undefined; - dependOn?: string | string[] | undefined; - }> | Promise string) | undefined; - baseUri?: string | undefined; - filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined; - library?: { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - commonjs2?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - layer?: string | null | undefined; - wasmLoading?: string | false | undefined; - dependOn?: string | string[] | undefined; - }>>) | undefined; - dependencies?: string[] | undefined; output?: { module?: boolean | undefined; chunkLoading?: string | false | undefined; @@ -8837,26 +8095,6 @@ export const rspackOptions: z.ZodObject<{ strictModuleExceptionHandling?: boolean | undefined; } | undefined; resolveLoader?: t.ResolveOptions | undefined; - externalsType?: "module" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "promise" | "module-import" | "script" | "node-commonjs" | "commonjs-import" | undefined; - externalsPresets?: { - web?: boolean | undefined; - node?: boolean | undefined; - nwjs?: boolean | undefined; - electron?: boolean | undefined; - electronMain?: boolean | undefined; - electronPreload?: boolean | undefined; - electronRenderer?: boolean | undefined; - webAsync?: boolean | undefined; - } | undefined; - infrastructureLogging?: { - debug?: string | boolean | RegExp | ((args_0: string, ...args: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args: unknown[]) => boolean))[] | undefined; - colors?: boolean | undefined; - stream?: NodeJS.WritableStream | undefined; - appendOnly?: boolean | undefined; - console?: Console | undefined; - level?: "error" | "warn" | "info" | "log" | "none" | "verbose" | undefined; - } | undefined; - snapshot?: {} | undefined; optimization?: { usedExports?: boolean | "global" | undefined; providedExports?: boolean | undefined; @@ -8924,47 +8162,156 @@ export const rspackOptions: z.ZodObject<{ nodeEnv?: string | false | undefined; emitOnErrors?: boolean | undefined; } | undefined; - plugins?: (false | "" | 0 | t.RspackPluginInstance | t.WebpackPluginInstance | t.RspackPluginFunction | t.WebpackPluginFunction | null | undefined)[] | undefined; - watch?: boolean | undefined; - watchOptions?: { - aggregateTimeout?: number | undefined; - followSymlinks?: boolean | undefined; - ignored?: string | RegExp | string[] | undefined; - poll?: number | boolean | undefined; - stdin?: boolean | undefined; - } | undefined; - devServer?: t.DevServer | undefined; - ignoreWarnings?: (RegExp | ((args_0: Error, args_1: Compilation, ...args: unknown[]) => boolean))[] | undefined; bail?: boolean | undefined; -}, { - module?: { - defaultRules?: (false | "" | 0 | t.RuleSetRule | "..." | null | undefined)[] | undefined; - rules?: (false | "" | 0 | t.RuleSetRule | "..." | null | undefined)[] | undefined; - parser?: { - css?: { - namedExports?: boolean | undefined; + loader?: Record | undefined; + externals?: string | RegExp | Record | ((args_0: t.ExternalItemFunctionData, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue | undefined, args_2: "module" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "promise" | "module-import" | "script" | "node-commonjs" | "commonjs-import" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: t.ExternalItemFunctionData, ...args: unknown[]) => Promise) | (string | RegExp | Record | ((args_0: t.ExternalItemFunctionData, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue | undefined, args_2: "module" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "promise" | "module-import" | "script" | "node-commonjs" | "commonjs-import" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: t.ExternalItemFunctionData, ...args: unknown[]) => Promise))[] | undefined; + target?: false | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | `electron${number}-main` | `electron${number}.${number}-main` | `electron${number}-renderer` | `electron${number}.${number}-renderer` | `electron${number}-preload` | `electron${number}.${number}-preload` | `nwjs${number}` | `nwjs${number}.${number}` | `node-webkit${number}` | `node-webkit${number}.${number}` | `browserslist:${string}` | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "node" | "electron-main" | "electron-renderer" | "electron-preload" | "nwjs" | "node-webkit" | "browserslist" | ("async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | `electron${number}-main` | `electron${number}.${number}-main` | `electron${number}-renderer` | `electron${number}.${number}-renderer` | `electron${number}-preload` | `electron${number}.${number}-preload` | `nwjs${number}` | `nwjs${number}.${number}` | `node-webkit${number}` | `node-webkit${number}.${number}` | `browserslist:${string}` | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "node" | "electron-main" | "electron-renderer" | "electron-preload" | "nwjs" | "node-webkit" | "browserslist")[] | undefined; + entry?: string | string[] | Record string) | undefined; + baseUri?: string | undefined; + filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined; + library?: { + type: string; + name?: string | string[] | { + commonjs?: string | undefined; + amd?: string | undefined; + root?: string | string[] | undefined; } | undefined; - asset?: { - dataUrlCondition?: { - maxSize?: number | undefined; - } | undefined; + amdContainer?: string | undefined; + auxiliaryComment?: string | { + commonjs?: string | undefined; + commonjs2?: string | undefined; + amd?: string | undefined; + root?: string | undefined; } | undefined; - "css/auto"?: { - namedExports?: boolean | undefined; + export?: string | string[] | undefined; + umdNamedDefine?: boolean | undefined; + } | undefined; + layer?: string | null | undefined; + wasmLoading?: string | false | undefined; + dependOn?: string | string[] | undefined; + }> | ((...args: unknown[]) => string | string[] | Record string) | undefined; + baseUri?: string | undefined; + filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined; + library?: { + type: string; + name?: string | string[] | { + commonjs?: string | undefined; + amd?: string | undefined; + root?: string | string[] | undefined; } | undefined; - "css/module"?: { - namedExports?: boolean | undefined; + amdContainer?: string | undefined; + auxiliaryComment?: string | { + commonjs?: string | undefined; + commonjs2?: string | undefined; + amd?: string | undefined; + root?: string | undefined; } | undefined; - javascript?: { - dynamicImportMode?: "eager" | "lazy" | "weak" | "lazy-once" | undefined; - dynamicImportPreload?: number | boolean | undefined; - dynamicImportPrefetch?: number | boolean | undefined; - dynamicImportFetchPriority?: "auto" | "low" | "high" | undefined; - importMeta?: boolean | undefined; - url?: boolean | "relative" | undefined; - exprContextCritical?: boolean | undefined; - wrappedContextCritical?: boolean | undefined; - wrappedContextRegExp?: RegExp | undefined; + export?: string | string[] | undefined; + umdNamedDefine?: boolean | undefined; + } | undefined; + layer?: string | null | undefined; + wasmLoading?: string | false | undefined; + dependOn?: string | string[] | undefined; + }> | Promise string) | undefined; + baseUri?: string | undefined; + filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined; + library?: { + type: string; + name?: string | string[] | { + commonjs?: string | undefined; + amd?: string | undefined; + root?: string | string[] | undefined; + } | undefined; + amdContainer?: string | undefined; + auxiliaryComment?: string | { + commonjs?: string | undefined; + commonjs2?: string | undefined; + amd?: string | undefined; + root?: string | undefined; + } | undefined; + export?: string | string[] | undefined; + umdNamedDefine?: boolean | undefined; + } | undefined; + layer?: string | null | undefined; + wasmLoading?: string | false | undefined; + dependOn?: string | string[] | undefined; + }>>) | undefined; + dependencies?: string[] | undefined; + externalsType?: "module" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "promise" | "module-import" | "script" | "node-commonjs" | "commonjs-import" | undefined; + externalsPresets?: { + web?: boolean | undefined; + node?: boolean | undefined; + nwjs?: boolean | undefined; + electron?: boolean | undefined; + electronMain?: boolean | undefined; + electronPreload?: boolean | undefined; + electronRenderer?: boolean | undefined; + webAsync?: boolean | undefined; + } | undefined; + infrastructureLogging?: { + debug?: string | boolean | RegExp | ((args_0: string, ...args: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args: unknown[]) => boolean))[] | undefined; + colors?: boolean | undefined; + stream?: NodeJS.WritableStream | undefined; + appendOnly?: boolean | undefined; + console?: Console | undefined; + level?: "error" | "warn" | "info" | "log" | "none" | "verbose" | undefined; + } | undefined; + snapshot?: {} | undefined; + plugins?: (false | "" | 0 | t.RspackPluginInstance | t.WebpackPluginInstance | t.RspackPluginFunction | t.WebpackPluginFunction | null | undefined)[] | undefined; + watch?: boolean | undefined; + watchOptions?: { + aggregateTimeout?: number | undefined; + followSymlinks?: boolean | undefined; + ignored?: string | RegExp | string[] | undefined; + poll?: number | boolean | undefined; + stdin?: boolean | undefined; + } | undefined; + devServer?: t.DevServer | undefined; + ignoreWarnings?: (RegExp | ((args_0: Error, args_1: Compilation, ...args: unknown[]) => boolean))[] | undefined; +}, { + module?: { + defaultRules?: (false | "" | 0 | t.RuleSetRule | "..." | null | undefined)[] | undefined; + rules?: (false | "" | 0 | t.RuleSetRule | "..." | null | undefined)[] | undefined; + parser?: { + css?: { + namedExports?: boolean | undefined; + } | undefined; + asset?: { + dataUrlCondition?: { + maxSize?: number | undefined; + } | undefined; + } | undefined; + "css/auto"?: { + namedExports?: boolean | undefined; + } | undefined; + "css/module"?: { + namedExports?: boolean | undefined; + } | undefined; + javascript?: { + dynamicImportMode?: "eager" | "lazy" | "weak" | "lazy-once" | undefined; + dynamicImportPreload?: number | boolean | undefined; + dynamicImportPrefetch?: number | boolean | undefined; + dynamicImportFetchPriority?: "auto" | "low" | "high" | undefined; + importMeta?: boolean | undefined; + url?: boolean | "relative" | undefined; + exprContextCritical?: boolean | undefined; + wrappedContextCritical?: boolean | undefined; + wrappedContextRegExp?: RegExp | undefined; exportsPresence?: false | "error" | "warn" | "auto" | undefined; importExportsPresence?: false | "error" | "warn" | "auto" | undefined; reexportExportsPresence?: false | "error" | "warn" | "auto" | undefined; @@ -9249,95 +8596,6 @@ export const rspackOptions: z.ZodObject<{ errorsSpace?: number | undefined; warningsSpace?: number | undefined; } | undefined; - loader?: Record | undefined; - externals?: string | RegExp | Record | ((args_0: t.ExternalItemFunctionData, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue | undefined, args_2: "module" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "promise" | "module-import" | "script" | "node-commonjs" | "commonjs-import" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: t.ExternalItemFunctionData, ...args: unknown[]) => Promise) | (string | RegExp | Record | ((args_0: t.ExternalItemFunctionData, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue | undefined, args_2: "module" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "promise" | "module-import" | "script" | "node-commonjs" | "commonjs-import" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: t.ExternalItemFunctionData, ...args: unknown[]) => Promise))[] | undefined; - target?: false | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | `electron${number}-main` | `electron${number}.${number}-main` | `electron${number}-renderer` | `electron${number}.${number}-renderer` | `electron${number}-preload` | `electron${number}.${number}-preload` | `nwjs${number}` | `nwjs${number}.${number}` | `node-webkit${number}` | `node-webkit${number}.${number}` | `browserslist:${string}` | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "node" | "electron-main" | "electron-renderer" | "electron-preload" | "nwjs" | "node-webkit" | "browserslist" | ("async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | `electron${number}-main` | `electron${number}.${number}-main` | `electron${number}-renderer` | `electron${number}.${number}-renderer` | `electron${number}-preload` | `electron${number}.${number}-preload` | `nwjs${number}` | `nwjs${number}.${number}` | `node-webkit${number}` | `node-webkit${number}.${number}` | `browserslist:${string}` | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "node" | "electron-main" | "electron-renderer" | "electron-preload" | "nwjs" | "node-webkit" | "browserslist")[] | undefined; - entry?: string | string[] | Record string) | undefined; - baseUri?: string | undefined; - filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined; - library?: { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - commonjs2?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - layer?: string | null | undefined; - wasmLoading?: string | false | undefined; - dependOn?: string | string[] | undefined; - }> | ((...args: unknown[]) => string | string[] | Record string) | undefined; - baseUri?: string | undefined; - filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined; - library?: { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - commonjs2?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - layer?: string | null | undefined; - wasmLoading?: string | false | undefined; - dependOn?: string | string[] | undefined; - }> | Promise string) | undefined; - baseUri?: string | undefined; - filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined; - library?: { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - commonjs2?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - layer?: string | null | undefined; - wasmLoading?: string | false | undefined; - dependOn?: string | string[] | undefined; - }>>) | undefined; - dependencies?: string[] | undefined; output?: { module?: boolean | undefined; chunkLoading?: string | false | undefined; @@ -9439,26 +8697,6 @@ export const rspackOptions: z.ZodObject<{ strictModuleExceptionHandling?: boolean | undefined; } | undefined; resolveLoader?: t.ResolveOptions | undefined; - externalsType?: "module" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "promise" | "module-import" | "script" | "node-commonjs" | "commonjs-import" | undefined; - externalsPresets?: { - web?: boolean | undefined; - node?: boolean | undefined; - nwjs?: boolean | undefined; - electron?: boolean | undefined; - electronMain?: boolean | undefined; - electronPreload?: boolean | undefined; - electronRenderer?: boolean | undefined; - webAsync?: boolean | undefined; - } | undefined; - infrastructureLogging?: { - debug?: string | boolean | RegExp | ((args_0: string, ...args: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args: unknown[]) => boolean))[] | undefined; - colors?: boolean | undefined; - stream?: NodeJS.WritableStream | undefined; - appendOnly?: boolean | undefined; - console?: Console | undefined; - level?: "error" | "warn" | "info" | "log" | "none" | "verbose" | undefined; - } | undefined; - snapshot?: {} | undefined; optimization?: { usedExports?: boolean | "global" | undefined; providedExports?: boolean | undefined; @@ -9526,58 +8764,167 @@ export const rspackOptions: z.ZodObject<{ nodeEnv?: string | false | undefined; emitOnErrors?: boolean | undefined; } | undefined; - plugins?: (false | "" | 0 | t.RspackPluginInstance | t.WebpackPluginInstance | t.RspackPluginFunction | t.WebpackPluginFunction | null | undefined)[] | undefined; - watch?: boolean | undefined; - watchOptions?: { - aggregateTimeout?: number | undefined; - followSymlinks?: boolean | undefined; - ignored?: string | RegExp | string[] | undefined; - poll?: number | boolean | undefined; - stdin?: boolean | undefined; - } | undefined; - devServer?: t.DevServer | undefined; - ignoreWarnings?: (RegExp | ((args_0: Error, args_1: Compilation, ...args: unknown[]) => boolean))[] | undefined; bail?: boolean | undefined; -}>; - -// @public (undocumented) -class RspackOptionsApply { - // (undocumented) - process(options: RspackOptionsNormalized, compiler: Compiler): void; -} -export { RspackOptionsApply } -export { RspackOptionsApply as WebpackOptionsApply } - -// @public (undocumented) -export interface RspackOptionsNormalized { - // (undocumented) - amd?: string; - // (undocumented) - bail?: Bail; - // (undocumented) - cache?: CacheOptions; - // (undocumented) - context?: Context; - // (undocumented) - dependencies?: Dependencies; - // (undocumented) - devServer?: DevServer; - // (undocumented) - devtool?: DevTool; - // (undocumented) - entry: EntryNormalized; - // (undocumented) - experiments: ExperimentsNormalized; - // (undocumented) - externals?: Externals; - // (undocumented) - externalsPresets: ExternalsPresets; - // (undocumented) - externalsType?: ExternalsType; - // (undocumented) - ignoreWarnings?: IgnoreWarningsNormalized; - // (undocumented) - infrastructureLogging: InfrastructureLogging; + loader?: Record | undefined; + externals?: string | RegExp | Record | ((args_0: t.ExternalItemFunctionData, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue | undefined, args_2: "module" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "promise" | "module-import" | "script" | "node-commonjs" | "commonjs-import" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: t.ExternalItemFunctionData, ...args: unknown[]) => Promise) | (string | RegExp | Record | ((args_0: t.ExternalItemFunctionData, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue | undefined, args_2: "module" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "promise" | "module-import" | "script" | "node-commonjs" | "commonjs-import" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: t.ExternalItemFunctionData, ...args: unknown[]) => Promise))[] | undefined; + target?: false | "async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | `electron${number}-main` | `electron${number}.${number}-main` | `electron${number}-renderer` | `electron${number}.${number}-renderer` | `electron${number}-preload` | `electron${number}.${number}-preload` | `nwjs${number}` | `nwjs${number}.${number}` | `node-webkit${number}` | `node-webkit${number}.${number}` | `browserslist:${string}` | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "node" | "electron-main" | "electron-renderer" | "electron-preload" | "nwjs" | "node-webkit" | "browserslist" | ("async-node" | `node${number}` | `async-node${number}` | `node${number}.${number}` | `async-node${number}.${number}` | `electron${number}-main` | `electron${number}.${number}-main` | `electron${number}-renderer` | `electron${number}.${number}-renderer` | `electron${number}-preload` | `electron${number}.${number}-preload` | `nwjs${number}` | `nwjs${number}.${number}` | `node-webkit${number}` | `node-webkit${number}.${number}` | `browserslist:${string}` | "web" | "webworker" | "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "node" | "electron-main" | "electron-renderer" | "electron-preload" | "nwjs" | "node-webkit" | "browserslist")[] | undefined; + entry?: string | string[] | Record string) | undefined; + baseUri?: string | undefined; + filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined; + library?: { + type: string; + name?: string | string[] | { + commonjs?: string | undefined; + amd?: string | undefined; + root?: string | string[] | undefined; + } | undefined; + amdContainer?: string | undefined; + auxiliaryComment?: string | { + commonjs?: string | undefined; + commonjs2?: string | undefined; + amd?: string | undefined; + root?: string | undefined; + } | undefined; + export?: string | string[] | undefined; + umdNamedDefine?: boolean | undefined; + } | undefined; + layer?: string | null | undefined; + wasmLoading?: string | false | undefined; + dependOn?: string | string[] | undefined; + }> | ((...args: unknown[]) => string | string[] | Record string) | undefined; + baseUri?: string | undefined; + filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined; + library?: { + type: string; + name?: string | string[] | { + commonjs?: string | undefined; + amd?: string | undefined; + root?: string | string[] | undefined; + } | undefined; + amdContainer?: string | undefined; + auxiliaryComment?: string | { + commonjs?: string | undefined; + commonjs2?: string | undefined; + amd?: string | undefined; + root?: string | undefined; + } | undefined; + export?: string | string[] | undefined; + umdNamedDefine?: boolean | undefined; + } | undefined; + layer?: string | null | undefined; + wasmLoading?: string | false | undefined; + dependOn?: string | string[] | undefined; + }> | Promise string) | undefined; + baseUri?: string | undefined; + filename?: string | ((args_0: PathData, args_1: JsAssetInfo | undefined, ...args: unknown[]) => string) | undefined; + library?: { + type: string; + name?: string | string[] | { + commonjs?: string | undefined; + amd?: string | undefined; + root?: string | string[] | undefined; + } | undefined; + amdContainer?: string | undefined; + auxiliaryComment?: string | { + commonjs?: string | undefined; + commonjs2?: string | undefined; + amd?: string | undefined; + root?: string | undefined; + } | undefined; + export?: string | string[] | undefined; + umdNamedDefine?: boolean | undefined; + } | undefined; + layer?: string | null | undefined; + wasmLoading?: string | false | undefined; + dependOn?: string | string[] | undefined; + }>>) | undefined; + dependencies?: string[] | undefined; + externalsType?: "module" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "system" | "promise" | "module-import" | "script" | "node-commonjs" | "commonjs-import" | undefined; + externalsPresets?: { + web?: boolean | undefined; + node?: boolean | undefined; + nwjs?: boolean | undefined; + electron?: boolean | undefined; + electronMain?: boolean | undefined; + electronPreload?: boolean | undefined; + electronRenderer?: boolean | undefined; + webAsync?: boolean | undefined; + } | undefined; + infrastructureLogging?: { + debug?: string | boolean | RegExp | ((args_0: string, ...args: unknown[]) => boolean) | (string | RegExp | ((args_0: string, ...args: unknown[]) => boolean))[] | undefined; + colors?: boolean | undefined; + stream?: NodeJS.WritableStream | undefined; + appendOnly?: boolean | undefined; + console?: Console | undefined; + level?: "error" | "warn" | "info" | "log" | "none" | "verbose" | undefined; + } | undefined; + snapshot?: {} | undefined; + plugins?: (false | "" | 0 | t.RspackPluginInstance | t.WebpackPluginInstance | t.RspackPluginFunction | t.WebpackPluginFunction | null | undefined)[] | undefined; + watch?: boolean | undefined; + watchOptions?: { + aggregateTimeout?: number | undefined; + followSymlinks?: boolean | undefined; + ignored?: string | RegExp | string[] | undefined; + poll?: number | boolean | undefined; + stdin?: boolean | undefined; + } | undefined; + devServer?: t.DevServer | undefined; + ignoreWarnings?: (RegExp | ((args_0: Error, args_1: Compilation, ...args: unknown[]) => boolean))[] | undefined; +}>; + +// @public (undocumented) +class RspackOptionsApply { + // (undocumented) + process(options: RspackOptionsNormalized, compiler: Compiler): void; +} +export { RspackOptionsApply } +export { RspackOptionsApply as WebpackOptionsApply } + +// @public (undocumented) +export interface RspackOptionsNormalized { + // (undocumented) + amd?: string; + // (undocumented) + bail?: Bail; + // (undocumented) + cache?: CacheOptions; + // (undocumented) + context?: Context; + // (undocumented) + dependencies?: Dependencies; + // (undocumented) + devServer?: DevServer; + // (undocumented) + devtool?: DevTool; + // (undocumented) + entry: EntryNormalized; + // (undocumented) + experiments: ExperimentsNormalized; + // (undocumented) + externals?: Externals; + // (undocumented) + externalsPresets: ExternalsPresets; + // (undocumented) + externalsType?: ExternalsType; + // (undocumented) + ignoreWarnings?: IgnoreWarningsNormalized; + // (undocumented) + infrastructureLogging: InfrastructureLogging; // (undocumented) loader: Loader; // (undocumented) @@ -9848,23 +9195,6 @@ type RuntimePlugins = string[]; // @public (undocumented) type RuntimeSpec = string | string[] | undefined; -// @public (undocumented) -type SafeParseError = { - success: false; - error: ZodError; - data?: never; -}; - -// @public (undocumented) -type SafeParseReturnType = SafeParseSuccess | SafeParseError; - -// @public (undocumented) -type SafeParseSuccess = { - success: true; - data: Output; - error?: never; -}; - // @public (undocumented) export type ScriptType = false | "text/javascript" | "module"; @@ -9961,30 +9291,6 @@ export const sharing: { // @public (undocumented) export type SnapshotOptions = {}; -// @public (undocumented) -abstract class Source { - // (undocumented) - buffer(): Buffer; - - // (undocumented) - map(options?: MapOptions): RawSourceMap | null; - - // (undocumented) - size(): number; - - // (undocumented) - source(): string | Buffer; - - // (undocumented) - sourceAndMap(options?: MapOptions): { - source: string | Buffer; - map: Object; - }; - - // (undocumented) - updateHash(hash: Hash): void; -} - // @public (undocumented) interface SourceMap { // (undocumented) @@ -10294,19 +9600,6 @@ type StringCallback = (err: NodeJS.ErrnoException | null, data?: string) => void // @public (undocumented) type StringOrBufferCallback = (err: NodeJS.ErrnoException | null, data?: string | Buffer) => void; -// @public (undocumented) -type StringValidation = "email" | "url" | "emoji" | "uuid" | "nanoid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "date" | "time" | "duration" | "ip" | "base64" | { - includes: string; - position?: number; -} | { - startsWith: string; -} | { - endsWith: string; -}; - -// @public (undocumented) -type stripPath = T extends any ? util_2.OmitKeys : never; - // @public (undocumented) export const SwcJsMinimizerRspackPlugin: { new (options?: SwcJsMinimizerRspackPluginOptions | undefined): { @@ -10362,17 +9655,6 @@ export type SwcLoaderTransformConfig = TransformConfig; // @public (undocumented) export type SwcLoaderTsParserConfig = TsParserConfig; -// @public (undocumented) -type SyncParseReturnType = OK | DIRTY | INVALID; - -// @public (undocumented) -interface SystemjsConfig { - // (undocumented) - allowTopLevelThis?: boolean; - // (undocumented) - type: "systemjs"; -} - declare namespace t { export { FilenameTemplate, @@ -10719,178 +10001,31 @@ interface TerserCompressOptions { } // @public (undocumented) -interface TerserCompressOptions_2 { - // (undocumented) - arguments?: boolean; - // (undocumented) - arrows?: boolean; - // (undocumented) - booleans?: boolean; - // (undocumented) - booleans_as_integers?: boolean; - // (undocumented) - collapse_vars?: boolean; - // (undocumented) - comparisons?: boolean; - // (undocumented) - computed_props?: boolean; - // (undocumented) - conditionals?: boolean; - // (undocumented) - const_to_let?: boolean; - // (undocumented) - dead_code?: boolean; - // (undocumented) - defaults?: boolean; - // (undocumented) - directives?: boolean; - // (undocumented) - drop_console?: boolean; - // (undocumented) - drop_debugger?: boolean; - // (undocumented) - ecma?: TerserEcmaVersion_2; - // (undocumented) - evaluate?: boolean; - // (undocumented) - expression?: boolean; - // (undocumented) - global_defs?: any; - // (undocumented) - hoist_funs?: boolean; - // (undocumented) - hoist_props?: boolean; - // (undocumented) - hoist_vars?: boolean; +type TerserEcmaVersion = 5 | 2015 | 2016 | string | number; + +// @public (undocumented) +interface TerserMangleOptions { // (undocumented) ie8?: boolean; // (undocumented) - if_return?: boolean; - // (undocumented) - inline?: 0 | 1 | 2 | 3; - // (undocumented) - join_vars?: boolean; - // (undocumented) keep_classnames?: boolean; // (undocumented) - keep_fargs?: boolean; - // (undocumented) keep_fnames?: boolean; // (undocumented) - keep_infinity?: boolean; - // (undocumented) - loops?: boolean; - // (undocumented) - module?: boolean; + keep_private_props?: boolean; // (undocumented) - negate_iife?: boolean; + props?: TerserManglePropertiesOptions; // (undocumented) - passes?: number; + reserved?: string[]; // (undocumented) - properties?: boolean; + safari10?: boolean; // (undocumented) - pure_funcs?: string[]; - // (undocumented) - pure_getters?: any; - // (undocumented) - reduce_funcs?: boolean; - // (undocumented) - reduce_vars?: boolean; - // (undocumented) - sequences?: any; - // (undocumented) - side_effects?: boolean; - // (undocumented) - switches?: boolean; - // (undocumented) - top_retain?: any; - // (undocumented) - toplevel?: any; - // (undocumented) - typeofs?: boolean; - // (undocumented) - unsafe?: boolean; - // (undocumented) - unsafe_arrows?: boolean; - // (undocumented) - unsafe_comps?: boolean; - // (undocumented) - unsafe_function?: boolean; - // (undocumented) - unsafe_math?: boolean; - // (undocumented) - unsafe_methods?: boolean; - // (undocumented) - unsafe_passes?: boolean; - // (undocumented) - unsafe_proto?: boolean; - // (undocumented) - unsafe_regexp?: boolean; - // (undocumented) - unsafe_symbols?: boolean; - // (undocumented) - unsafe_undefined?: boolean; - // (undocumented) - unused?: boolean; -} - -// @public (undocumented) -type TerserEcmaVersion = 5 | 2015 | 2016 | string | number; - -// @public (undocumented) -type TerserEcmaVersion_2 = 5 | 2015 | 2016 | string | number; - -// @public (undocumented) -interface TerserMangleOptions { - // (undocumented) - ie8?: boolean; - // (undocumented) - keep_classnames?: boolean; - // (undocumented) - keep_fnames?: boolean; - // (undocumented) - keep_private_props?: boolean; - // (undocumented) - props?: TerserManglePropertiesOptions; - // (undocumented) - reserved?: string[]; - // (undocumented) - safari10?: boolean; - // (undocumented) - toplevel?: boolean; -} - -// @public (undocumented) -interface TerserMangleOptions_2 { - // (undocumented) - ie8?: boolean; - // @deprecated (undocumented) - keep_classnames?: boolean; - // @deprecated (undocumented) - keep_fnames?: boolean; - // @deprecated (undocumented) - keep_private_props?: boolean; - keepClassNames?: boolean; - keepFnNames?: boolean; - keepPrivateProps?: boolean; - // (undocumented) - props?: TerserManglePropertiesOptions_2; - // (undocumented) - reserved?: string[]; - // (undocumented) - safari10?: boolean; - topLevel?: boolean; - // @deprecated (undocumented) toplevel?: boolean; } // @public (undocumented) type TerserManglePropertiesOptions = {}; -// @public (undocumented) -interface TerserManglePropertiesOptions_2 { -} - // @public (undocumented) const TIMERS_AGGREGATES_SYMBOL: unique symbol; @@ -10900,74 +10035,17 @@ const TIMERS_SYMBOL: unique symbol; // @public (undocumented) type ToSnakeCase = T extends `${infer A}${infer B}` ? `${A extends Lowercase ? A : `_${Lowercase}`}${ToSnakeCase}` : T; -// @public (undocumented) -type ToSnakeCase_2 = T extends `${infer A}${infer B}` ? `${A extends Lowercase ? A : `_${Lowercase}`}${ToSnakeCase_2}` : T; - // @public (undocumented) type ToSnakeCaseProperties = { [K in keyof T as K extends string ? ToSnakeCase : K]: T[K]; }; -// @public (undocumented) -type ToSnakeCaseProperties_2 = { - [K in keyof T as K extends string ? ToSnakeCase_2 : K]: T[K]; -}; - -// @public -interface TransformConfig { - // (undocumented) - constModules?: ConstModulesConfig; - decoratorMetadata?: boolean; - decoratorVersion?: "2021-12" | "2022-03"; - legacyDecorator?: boolean; - optimizer?: OptimizerConfig; - react?: ReactConfig; - // (undocumented) - treatConstEnumAsEnum?: boolean; - // (undocumented) - useDefineForClassFields?: boolean; -} - -// @public (undocumented) -type TransformEffect = { - type: "transform"; - transform: (arg: T, ctx: RefinementCtx) => any; -}; - // @public export type TrustedTypes = { policyName?: string; onPolicyCreationFailure?: "continue" | "stop"; }; -// @public (undocumented) -interface TsParserConfig { - decorators?: boolean; - // @deprecated (undocumented) - dynamicImport?: boolean; - // (undocumented) - syntax: "typescript"; - tsx?: boolean; -} - -// @public (undocumented) -type typeToFlattenedError = { - formErrors: U[]; - fieldErrors: { - [P in allKeys]?: U[]; - }; -}; - -// @public (undocumented) -interface UmdConfig extends BaseModuleConfig { - // (undocumented) - globals?: { - [key: string]: string; - }; - // (undocumented) - type: "umd"; -} - // @public export type UmdNamedDefine = boolean; @@ -10983,51 +10061,6 @@ export const util: { cleverMerge: (first: First, second: Second) => First | Second | (First & Second); }; -// @public (undocumented) -namespace util_2 { - // (undocumented) - type AssertEqual = (() => V extends T ? 1 : 2) extends () => V extends U ? 1 : 2 ? true : false; - // (undocumented) - function assertIs(_arg: T): void; - const // (undocumented) - assertEqual: (val: AssertEqual) => AssertEqual; - // (undocumented) - function assertNever(_x: never): never; - // (undocumented) - type Exactly = T & Record, never>; - // (undocumented) - type flatten = objectUtil.flatten; - // (undocumented) - type identity = objectUtil.identity; - // (undocumented) - type isAny = 0 extends 1 & T ? true : false; - // (undocumented) - function joinValues(array: T, separator?: string): string; - const // (undocumented) - arrayToEnum: (items: U) => { [k in U[number]]: k; }; - const // (undocumented) - getValidEnumValues: (obj: any) => any[]; - const // (undocumented) - objectValues: (obj: any) => any[]; - const // (undocumented) - objectKeys: ObjectConstructor["keys"]; - const // (undocumented) - find: (arr: T[], checker: (arg: T) => any) => T | undefined; - // (undocumented) - type MakePartial = Omit & Partial>; - // (undocumented) - type noUndefined = T extends undefined ? never : T; - // (undocumented) - type Omit = Pick>; - const // (undocumented) - isInteger: NumberConstructor["isInteger"]; - // (undocumented) - type OmitKeys = Pick>; - const // (undocumented) - jsonStringifyReplacer: (_: string, value: any) => any; - { }; -} - // @public (undocumented) export class ValidationError extends Error { constructor(message: string); @@ -11083,23 +10116,6 @@ interface Watcher { pause(): void; } -// @public (undocumented) -class Watcher_2 extends EventEmitter { - constructor(directoryWatcher: DirectoryWatcher, filePath: string, startTime: number); - // (undocumented) - checkStartTime(mtime: number, initial: boolean): boolean; - // (undocumented) - close(): void; - // (undocumented) - data: number; - // (undocumented) - directoryWatcher: DirectoryWatcher; - // (undocumented) - path: string; - // (undocumented) - startTime: number; -} - // @public (undocumented) interface WatcherInfo { // (undocumented) @@ -11174,99 +10190,6 @@ export type WatchOptions = { stdin?: boolean; }; -// @public (undocumented) -class Watchpack extends EventEmitter { - constructor(options: Watchpack.WatchOptions); - // (undocumented) - aggregatedChanges: Set; - // (undocumented) - aggregatedRemovals: Set; - // (undocumented) - aggregateTimeout: NodeJS.Timer; - close(): void; - collectTimeInfoEntries(fileInfoEntries: Map, directoryInfoEntries: Map): void; - // (undocumented) - _dirWatcher(item: string, watcher: Watcher_2): Watcher_2; - // (undocumented) - dirWatchers: Watcher_2[]; - // (undocumented) - _fileWatcher(file: string, watcher: Watcher_2): Watcher_2; - // (undocumented) - fileWatchers: Watcher_2[]; - getAggregated(): { - changes: Set; - removals: Set; - }; - getTimeInfoEntries(): Map; - // @deprecated - getTimes(): { - [path: string]: number; - }; - mtimes: { - [path: string]: number; - }; - // (undocumented) - on( - eventName: "change", - listener: ( - filePath: string, - modifiedTime: number, - explanation: string, - ) => void, - ): this; - // (undocumented) - on( - eventName: "remove", - listener: ( - filePath: string, - explanation: string, - ) => void, - ): this; - // (undocumented) - on( - eventName: "aggregated", - listener: ( - changes: Set, - removals: Set, - ) => void, - ): this; - // (undocumented) - _onChange(item: string, mtime: number, file?: string): void; - // (undocumented) - _onTimeout(): void; - // (undocumented) - options: Watchpack.WatchOptions; - pause(): void; - // (undocumented) - paused: boolean; - watch(options: { - files?: Iterable; - directories?: Iterable; - missing?: Iterable; - startTime?: number; - }): void; - // (undocumented) - watcherOptions: Watchpack.WatcherOptions; -} - -// @public (undocumented) -namespace Watchpack { - // (undocumented) - interface WatcherOptions { - // (undocumented) - followSymlinks?: boolean; - // (undocumented) - ignored?: string[] | string | RegExp | ((path: string) => boolean) | undefined; - // (undocumented) - poll?: boolean | number | undefined; - } - // (undocumented) - interface WatchOptions extends WatcherOptions { - // (undocumented) - aggregateTimeout?: number | undefined; - } -} - // @public (undocumented) interface Web { // (undocumented) @@ -11345,99 +10268,6 @@ type WriteAsyncOptions = { buffer?: TBuffer; }; -// @public (undocumented) -namespace z { - { type z_AnyZodObject as AnyZodObject, type z_AnyZodTuple as AnyZodTuple, type z_ArrayCardinality as ArrayCardinality, type z_ArrayKeys as ArrayKeys, type z_AssertArray as AssertArray, type z_AsyncParseReturnType as AsyncParseReturnType, type z_BRAND as BRAND, type z_CatchallInput as CatchallInput, type z_CatchallOutput as CatchallOutput, type z_CustomErrorParams as CustomErrorParams, z_DIRTY as DIRTY, type z_DenormalizedError as DenormalizedError, z_EMPTY_PATH as EMPTY_PATH, type z_Effect as Effect, type z_EnumLike as EnumLike, type z_EnumValues as EnumValues, type z_ErrorMapCtx as ErrorMapCtx, type z_FilterEnum as FilterEnum, z_INVALID as INVALID, type z_Indices as Indices, type z_InnerTypeOfFunction as InnerTypeOfFunction, type z_InputTypeOfTuple as InputTypeOfTuple, type z_InputTypeOfTupleWithRest as InputTypeOfTupleWithRest, type z_IpVersion as IpVersion, type z_IssueData as IssueData, type z_KeySchema as KeySchema, z_NEVER as NEVER, z_OK as OK, type z_ObjectPair as ObjectPair, type z_OuterTypeOfFunction as OuterTypeOfFunction, type z_OutputTypeOfTuple as OutputTypeOfTuple, type z_OutputTypeOfTupleWithRest as OutputTypeOfTupleWithRest, type z_ParseContext as ParseContext, type z_ParseInput as ParseInput, type z_ParseParams as ParseParams, type z_ParsePath as ParsePath, type z_ParsePathComponent as ParsePathComponent, type z_ParseResult as ParseResult, type z_ParseReturnType as ParseReturnType, z_ParseStatus as ParseStatus, type z_PassthroughType as PassthroughType, type z_PreprocessEffect as PreprocessEffect, type z_Primitive as Primitive, type z_ProcessedCreateParams as ProcessedCreateParams, type z_RawCreateParams as RawCreateParams, type z_RecordType as RecordType, type z_Refinement as Refinement, type z_RefinementCtx as RefinementCtx, type z_RefinementEffect as RefinementEffect, type z_SafeParseError as SafeParseError, type z_SafeParseReturnType as SafeParseReturnType, type z_SafeParseSuccess as SafeParseSuccess, type z_Scalars as Scalars, ZodType as Schema, type z_SomeZodObject as SomeZodObject, type z_StringValidation as StringValidation, type z_SuperRefinement as SuperRefinement, type z_SyncParseReturnType as SyncParseReturnType, type z_TransformEffect as TransformEffect, type z_TypeOf as TypeOf, type z_UnknownKeysParam as UnknownKeysParam, type z_Values as Values, type z_Writeable as Writeable, z_ZodAny as ZodAny, type z_ZodAnyDef as ZodAnyDef, z_ZodArray as ZodArray, type z_ZodArrayDef as ZodArrayDef, z_ZodBigInt as ZodBigInt, type z_ZodBigIntCheck as ZodBigIntCheck, type z_ZodBigIntDef as ZodBigIntDef, z_ZodBoolean as ZodBoolean, type z_ZodBooleanDef as ZodBooleanDef, z_ZodBranded as ZodBranded, type z_ZodBrandedDef as ZodBrandedDef, z_ZodCatch as ZodCatch, type z_ZodCatchDef as ZodCatchDef, type z_ZodCustomIssue as ZodCustomIssue, z_ZodDate as ZodDate, type z_ZodDateCheck as ZodDateCheck, type z_ZodDateDef as ZodDateDef, z_ZodDefault as ZodDefault, type z_ZodDefaultDef as ZodDefaultDef, z_ZodDiscriminatedUnion as ZodDiscriminatedUnion, type z_ZodDiscriminatedUnionDef as ZodDiscriminatedUnionDef, type z_ZodDiscriminatedUnionOption as ZodDiscriminatedUnionOption, z_ZodEffects as ZodEffects, type z_ZodEffectsDef as ZodEffectsDef, z_ZodEnum as ZodEnum, type z_ZodEnumDef as ZodEnumDef, z_ZodError as ZodError, type z_ZodErrorMap as ZodErrorMap, type z_ZodFirstPartySchemaTypes as ZodFirstPartySchemaTypes, z_ZodFirstPartyTypeKind as ZodFirstPartyTypeKind, type z_ZodFormattedError as ZodFormattedError, z_ZodFunction as ZodFunction, type z_ZodFunctionDef as ZodFunctionDef, z_ZodIntersection as ZodIntersection, type z_ZodIntersectionDef as ZodIntersectionDef, type z_ZodInvalidArgumentsIssue as ZodInvalidArgumentsIssue, type z_ZodInvalidDateIssue as ZodInvalidDateIssue, type z_ZodInvalidEnumValueIssue as ZodInvalidEnumValueIssue, type z_ZodInvalidIntersectionTypesIssue as ZodInvalidIntersectionTypesIssue, type z_ZodInvalidLiteralIssue as ZodInvalidLiteralIssue, type z_ZodInvalidReturnTypeIssue as ZodInvalidReturnTypeIssue, type z_ZodInvalidStringIssue as ZodInvalidStringIssue, type z_ZodInvalidTypeIssue as ZodInvalidTypeIssue, type z_ZodInvalidUnionDiscriminatorIssue as ZodInvalidUnionDiscriminatorIssue, type z_ZodInvalidUnionIssue as ZodInvalidUnionIssue, type z_ZodIssue as ZodIssue, type z_ZodIssueBase as ZodIssueBase, type z_ZodIssueCode as ZodIssueCode, type z_ZodIssueOptionalMessage as ZodIssueOptionalMessage, z_ZodLazy as ZodLazy, type z_ZodLazyDef as ZodLazyDef, z_ZodLiteral as ZodLiteral, type z_ZodLiteralDef as ZodLiteralDef, z_ZodMap as ZodMap, type z_ZodMapDef as ZodMapDef, z_ZodNaN as ZodNaN, type z_ZodNaNDef as ZodNaNDef, z_ZodNativeEnum as ZodNativeEnum, type z_ZodNativeEnumDef as ZodNativeEnumDef, z_ZodNever as ZodNever, type z_ZodNeverDef as ZodNeverDef, type z_ZodNonEmptyArray as ZodNonEmptyArray, type z_ZodNotFiniteIssue as ZodNotFiniteIssue, type z_ZodNotMultipleOfIssue as ZodNotMultipleOfIssue, z_ZodNull as ZodNull, type z_ZodNullDef as ZodNullDef, z_ZodNullable as ZodNullable, type z_ZodNullableDef as ZodNullableDef, type z_ZodNullableType as ZodNullableType, z_ZodNumber as ZodNumber, type z_ZodNumberCheck as ZodNumberCheck, type z_ZodNumberDef as ZodNumberDef, z_ZodObject as ZodObject, type z_ZodObjectDef as ZodObjectDef, z_ZodOptional as ZodOptional, type z_ZodOptionalDef as ZodOptionalDef, type z_ZodOptionalType as ZodOptionalType, type z_ZodParsedType as ZodParsedType, z_ZodPipeline as ZodPipeline, type z_ZodPipelineDef as ZodPipelineDef, z_ZodPromise as ZodPromise, type z_ZodPromiseDef as ZodPromiseDef, type z_ZodRawShape as ZodRawShape, z_ZodReadonly as ZodReadonly, type z_ZodReadonlyDef as ZodReadonlyDef, z_ZodRecord as ZodRecord, type z_ZodRecordDef as ZodRecordDef, ZodType as ZodSchema, z_ZodSet as ZodSet, type z_ZodSetDef as ZodSetDef, z_ZodString as ZodString, type z_ZodStringCheck as ZodStringCheck, type z_ZodStringDef as ZodStringDef, z_ZodSymbol as ZodSymbol, type z_ZodSymbolDef as ZodSymbolDef, type z_ZodTooBigIssue as ZodTooBigIssue, type z_ZodTooSmallIssue as ZodTooSmallIssue, ZodEffects as ZodTransformer, z_ZodTuple as ZodTuple, type z_ZodTupleDef as ZodTupleDef, type z_ZodTupleItems as ZodTupleItems, z_ZodType as ZodType, type z_ZodTypeAny as ZodTypeAny, type z_ZodTypeDef as ZodTypeDef, z_ZodUndefined as ZodUndefined, type z_ZodUndefinedDef as ZodUndefinedDef, z_ZodUnion as ZodUnion, type z_ZodUnionDef as ZodUnionDef, type z_ZodUnionOptions as ZodUnionOptions, z_ZodUnknown as ZodUnknown, type z_ZodUnknownDef as ZodUnknownDef, type z_ZodUnrecognizedKeysIssue as ZodUnrecognizedKeysIssue, z_ZodVoid as ZodVoid, type z_ZodVoidDef as ZodVoidDef, z_addIssueToContext as addIssueToContext, anyType as any, arrayType as array, type z_arrayOutputType as arrayOutputType, type z_baseObjectInputType as baseObjectInputType, type z_baseObjectOutputType as baseObjectOutputType, bigIntType as bigint, booleanType as boolean, z_coerce as coerce, z_custom as custom, dateType as date, z_datetimeRegex as datetimeRegex, errorMap as defaultErrorMap, type z_deoptional as deoptional, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, z_getErrorMap as getErrorMap, z_getParsedType as getParsedType, type TypeOf as infer, type z_inferFlattenedErrors as inferFlattenedErrors, type z_inferFormattedError as inferFormattedError, type z_input as input, instanceOfType as instanceof, intersectionType as intersection, z_isAborted as isAborted, z_isAsync as isAsync, z_isDirty as isDirty, z_isValid as isValid, z_late as late, lazyType as lazy, literalType as literal, z_makeIssue as makeIssue, mapType as map, type z_mergeTypes as mergeTypes, nanType as nan, nativeEnumType as nativeEnum, neverType as never, type z_noUnrecognized as noUnrecognized, nullType as null, nullableType as nullable, numberType as number, objectType as object, type z_objectInputType as objectInputType, type z_objectOutputType as objectOutputType, z_objectUtil as objectUtil, z_oboolean as oboolean, z_onumber as onumber, optionalType as optional, z_ostring as ostring, type z_output as output, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, z_quotelessJson as quotelessJson, recordType as record, setType as set, z_setErrorMap as setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, type z_typeToFlattenedError as typeToFlattenedError, type z_typecast as typecast, undefinedType as undefined, unionType as union, unknownType as unknown, z_util as util, voidType as void }; -} - -// @public (undocumented) -class ZodArray extends ZodType, ZodArrayDef, Cardinality extends "atleastone" ? [T["_input"], ...T["_input"][]] : T["_input"][]> { - // (undocumented) - static create: (schema: T_1, params?: RawCreateParams) => ZodArray; - // (undocumented) - get element(): T; - // (undocumented) - length(len: number, message?: errorUtil.ErrMessage): this; - // (undocumented) - max(maxLength: number, message?: errorUtil.ErrMessage): this; - // (undocumented) - min(minLength: number, message?: errorUtil.ErrMessage): this; - // (undocumented) - nonempty(message?: errorUtil.ErrMessage): ZodArray; - // (undocumented) - _parse(input: ParseInput): ParseReturnType; -} - -// @public (undocumented) -interface ZodArrayDef extends ZodTypeDef { - // (undocumented) - exactLength: { - value: number; - message?: string; - } | null; - // (undocumented) - maxLength: { - value: number; - message?: string; - } | null; - // (undocumented) - minLength: { - value: number; - message?: string; - } | null; - // (undocumented) - type: T; - // (undocumented) - typeName: ZodFirstPartyTypeKind.ZodArray; -} - -// @public (undocumented) -class ZodBranded extends ZodType, ZodBrandedDef, T["_input"]> { - // (undocumented) - _parse(input: ParseInput): ParseReturnType; - // (undocumented) - unwrap(): T; -} - -// @public (undocumented) -interface ZodBrandedDef extends ZodTypeDef { - // (undocumented) - type: T; - // (undocumented) - typeName: ZodFirstPartyTypeKind.ZodBranded; -} - -// @public (undocumented) -class ZodCatch extends ZodType, unknown> { - // (undocumented) - static create: (type: T_1, params: { - errorMap?: ZodErrorMap | undefined; - invalid_type_error?: string | undefined; - required_error?: string | undefined; - message?: string | undefined; - description?: string | undefined; - } & { - catch: T_1["_output"] | (() => T_1["_output"]); - }) => ZodCatch; - // (undocumented) - _parse(input: ParseInput): ParseReturnType; - // (undocumented) - removeCatch(): T; -} - -// @public (undocumented) -interface ZodCatchDef extends ZodTypeDef { - // (undocumented) - catchValue: (ctx: { - error: ZodError; - input: unknown; - }) => T["_input"]; - // (undocumented) - innerType: T; - // (undocumented) - typeName: ZodFirstPartyTypeKind.ZodCatch; -} - // @public (undocumented) type ZodCrossFieldsOptions = ZodTypeDef & { patterns: Array<{ @@ -11449,630 +10279,14 @@ type ZodCrossFieldsOptions = ZodTypeDef & { }; // @public (undocumented) -interface ZodCustomIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.custom; - // (undocumented) - params?: { - [k: string]: any; - }; -} - -// @public (undocumented) -class ZodDefault extends ZodType, ZodDefaultDef, T["_input"] | undefined> { - // (undocumented) - static create: (type: T_1, params: { - errorMap?: ZodErrorMap | undefined; - invalid_type_error?: string | undefined; - required_error?: string | undefined; - message?: string | undefined; - description?: string | undefined; - } & { - default: T_1["_input"] | (() => util_2.noUndefined); - }) => ZodDefault; - // (undocumented) - _parse(input: ParseInput): ParseReturnType; - // (undocumented) - removeDefault(): T; -} - -// @public (undocumented) -interface ZodDefaultDef extends ZodTypeDef { - // (undocumented) - defaultValue: () => util_2.noUndefined; - // (undocumented) - innerType: T; - // (undocumented) - typeName: ZodFirstPartyTypeKind.ZodDefault; -} - -// @public (undocumented) -class ZodEffects, Input = input> extends ZodType, Input> { - // (undocumented) - static create: (schema: I, effect: Effect, params?: RawCreateParams) => ZodEffects>; - // (undocumented) - static createWithPreprocess: (preprocess: (arg: unknown, ctx: RefinementCtx) => unknown, schema: I, params?: RawCreateParams) => ZodEffects; - // (undocumented) - innerType(): T; - // (undocumented) - _parse(input: ParseInput): ParseReturnType; - // (undocumented) - sourceType(): T; -} - -// @public (undocumented) -interface ZodEffectsDef extends ZodTypeDef { - // (undocumented) - effect: Effect; - // (undocumented) - schema: T; - // (undocumented) - typeName: ZodFirstPartyTypeKind.ZodEffects; -} - -// @public (undocumented) -class ZodError extends Error { - constructor(issues: ZodIssue[]); - // (undocumented) - addIssue: (sub: ZodIssue) => void; - // (undocumented) - addIssues: (subs?: ZodIssue[]) => void; - // (undocumented) - static assert(value: unknown): asserts value is ZodError; - // (undocumented) - static create: (issues: ZodIssue[]) => ZodError; - // (undocumented) - get errors(): ZodIssue[]; - // (undocumented) - flatten(): typeToFlattenedError; - // (undocumented) - flatten(mapper?: (issue: ZodIssue) => U): typeToFlattenedError; - // (undocumented) - format(): ZodFormattedError; - // (undocumented) - format(mapper: (issue: ZodIssue) => U): ZodFormattedError; - // (undocumented) - get formErrors(): typeToFlattenedError; - // (undocumented) - get isEmpty(): boolean; - // (undocumented) - issues: ZodIssue[]; +class ZodRspackCrossChecker extends ZodType { + constructor(params: ZodCrossFieldsOptions); // (undocumented) - get message(): string; - // (undocumented) - toString(): string; -} - -// @public (undocumented) -type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => { - message: string; -}; - -// @public (undocumented) -enum ZodFirstPartyTypeKind { - // (undocumented) - ZodAny = "ZodAny", - // (undocumented) - ZodArray = "ZodArray", - // (undocumented) - ZodBigInt = "ZodBigInt", - // (undocumented) - ZodBoolean = "ZodBoolean", - // (undocumented) - ZodBranded = "ZodBranded", - // (undocumented) - ZodCatch = "ZodCatch", - // (undocumented) - ZodDate = "ZodDate", - // (undocumented) - ZodDefault = "ZodDefault", - // (undocumented) - ZodDiscriminatedUnion = "ZodDiscriminatedUnion", - // (undocumented) - ZodEffects = "ZodEffects", - // (undocumented) - ZodEnum = "ZodEnum", - // (undocumented) - ZodFunction = "ZodFunction", - // (undocumented) - ZodIntersection = "ZodIntersection", - // (undocumented) - ZodLazy = "ZodLazy", - // (undocumented) - ZodLiteral = "ZodLiteral", - // (undocumented) - ZodMap = "ZodMap", - // (undocumented) - ZodNaN = "ZodNaN", - // (undocumented) - ZodNativeEnum = "ZodNativeEnum", - // (undocumented) - ZodNever = "ZodNever", - // (undocumented) - ZodNull = "ZodNull", - // (undocumented) - ZodNullable = "ZodNullable", - // (undocumented) - ZodNumber = "ZodNumber", - // (undocumented) - ZodObject = "ZodObject", - // (undocumented) - ZodOptional = "ZodOptional", - // (undocumented) - ZodPipeline = "ZodPipeline", - // (undocumented) - ZodPromise = "ZodPromise", - // (undocumented) - ZodReadonly = "ZodReadonly", - // (undocumented) - ZodRecord = "ZodRecord", - // (undocumented) - ZodSet = "ZodSet", - // (undocumented) - ZodString = "ZodString", - // (undocumented) - ZodSymbol = "ZodSymbol", - // (undocumented) - ZodTuple = "ZodTuple", - // (undocumented) - ZodUndefined = "ZodUndefined", - // (undocumented) - ZodUnion = "ZodUnion", - // (undocumented) - ZodUnknown = "ZodUnknown", - // (undocumented) - ZodVoid = "ZodVoid" -} - -// @public (undocumented) -type ZodFormattedError = { - _errors: U[]; -} & recursiveZodFormattedError>; - -// @public (undocumented) -class ZodIntersection extends ZodType, T["_input"] & U["_input"]> { - // (undocumented) - static create: (left: T_1, right: U_1, params?: RawCreateParams) => ZodIntersection; - // (undocumented) - _parse(input: ParseInput): ParseReturnType; -} - -// @public (undocumented) -interface ZodIntersectionDef extends ZodTypeDef { - // (undocumented) - left: T; - // (undocumented) - right: U; - // (undocumented) - typeName: ZodFirstPartyTypeKind.ZodIntersection; -} - -// @public (undocumented) -interface ZodInvalidArgumentsIssue extends ZodIssueBase { - // (undocumented) - argumentsError: ZodError; - // (undocumented) - code: typeof ZodIssueCode.invalid_arguments; -} - -// @public (undocumented) -interface ZodInvalidDateIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.invalid_date; -} - -// @public (undocumented) -interface ZodInvalidEnumValueIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.invalid_enum_value; - // (undocumented) - options: (string | number)[]; - // (undocumented) - received: string | number; -} - -// @public (undocumented) -interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.invalid_intersection_types; -} - -// @public (undocumented) -interface ZodInvalidLiteralIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.invalid_literal; - // (undocumented) - expected: unknown; - // (undocumented) - received: unknown; -} - -// @public (undocumented) -interface ZodInvalidReturnTypeIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.invalid_return_type; - // (undocumented) - returnTypeError: ZodError; -} - -// @public (undocumented) -interface ZodInvalidStringIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.invalid_string; - // (undocumented) - validation: StringValidation; -} - -// @public (undocumented) -interface ZodInvalidTypeIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.invalid_type; - // (undocumented) - expected: ZodParsedType; - // (undocumented) - received: ZodParsedType; -} - -// @public (undocumented) -interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.invalid_union_discriminator; - // (undocumented) - options: Primitive[]; -} - -// @public (undocumented) -interface ZodInvalidUnionIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.invalid_union; - // (undocumented) - unionErrors: ZodError[]; -} - -// @public (undocumented) -type ZodIssue = ZodIssueOptionalMessage & { - fatal?: boolean; - message: string; -}; - -// @public (undocumented) -type ZodIssueBase = { - path: (string | number)[]; - message?: string; -}; - -// @public (undocumented) -const ZodIssueCode: { - invalid_type: "invalid_type"; - invalid_literal: "invalid_literal"; - custom: "custom"; - invalid_union: "invalid_union"; - invalid_union_discriminator: "invalid_union_discriminator"; - invalid_enum_value: "invalid_enum_value"; - unrecognized_keys: "unrecognized_keys"; - invalid_arguments: "invalid_arguments"; - invalid_return_type: "invalid_return_type"; - invalid_date: "invalid_date"; - invalid_string: "invalid_string"; - too_small: "too_small"; - too_big: "too_big"; - invalid_intersection_types: "invalid_intersection_types"; - not_multiple_of: "not_multiple_of"; - not_finite: "not_finite"; -}; - -// @public (undocumented) -type ZodIssueCode = keyof typeof ZodIssueCode; - -// @public (undocumented) -type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue; - -// @public (undocumented) -interface ZodNotFiniteIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.not_finite; -} - -// @public (undocumented) -interface ZodNotMultipleOfIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.not_multiple_of; - // (undocumented) - multipleOf: number | bigint; -} - -// @public (undocumented) -class ZodNullable extends ZodType, T["_input"] | null> { - // (undocumented) - static create: (type: T_1, params?: RawCreateParams) => ZodNullable; - // (undocumented) - _parse(input: ParseInput): ParseReturnType; - // (undocumented) - unwrap(): T; -} - -// @public (undocumented) -interface ZodNullableDef extends ZodTypeDef { - // (undocumented) - innerType: T; - // (undocumented) - typeName: ZodFirstPartyTypeKind.ZodNullable; -} - -// @public (undocumented) -class ZodOptional extends ZodType, T["_input"] | undefined> { - // (undocumented) - static create: (type: T_1, params?: RawCreateParams) => ZodOptional; - // (undocumented) - _parse(input: ParseInput): ParseReturnType; - // (undocumented) - unwrap(): T; -} - -// @public (undocumented) -interface ZodOptionalDef extends ZodTypeDef { - // (undocumented) - innerType: T; - // (undocumented) - typeName: ZodFirstPartyTypeKind.ZodOptional; -} - -// @public (undocumented) -const ZodParsedType: { - function: "function"; - number: "number"; - string: "string"; - nan: "nan"; - integer: "integer"; - float: "float"; - boolean: "boolean"; - date: "date"; - bigint: "bigint"; - symbol: "symbol"; - undefined: "undefined"; - null: "null"; - array: "array"; - object: "object"; - unknown: "unknown"; - promise: "promise"; - void: "void"; - never: "never"; - map: "map"; - set: "set"; -}; - -// @public (undocumented) -type ZodParsedType = keyof typeof ZodParsedType; - -// @public (undocumented) -class ZodPipeline extends ZodType, A["_input"]> { - // (undocumented) - static create(a: A, b: B): ZodPipeline; - // (undocumented) - _parse(input: ParseInput): ParseReturnType; -} - -// @public (undocumented) -interface ZodPipelineDef extends ZodTypeDef { - // (undocumented) - in: A; - // (undocumented) - out: B; - // (undocumented) - typeName: ZodFirstPartyTypeKind.ZodPipeline; -} - -// @public (undocumented) -class ZodPromise extends ZodType, ZodPromiseDef, Promise> { - // (undocumented) - static create: (schema: T_1, params?: RawCreateParams) => ZodPromise; - // (undocumented) - _parse(input: ParseInput): ParseReturnType; - // (undocumented) - unwrap(): T; -} - -// @public (undocumented) -interface ZodPromiseDef extends ZodTypeDef { - // (undocumented) - type: T; - // (undocumented) - typeName: ZodFirstPartyTypeKind.ZodPromise; -} - -// @public (undocumented) -class ZodReadonly extends ZodType, ZodReadonlyDef, MakeReadonly> { - // (undocumented) - static create: (type: T_1, params?: RawCreateParams) => ZodReadonly; - // (undocumented) - _parse(input: ParseInput): ParseReturnType; - // (undocumented) - unwrap(): T; -} - -// @public (undocumented) -interface ZodReadonlyDef extends ZodTypeDef { - // (undocumented) - innerType: T; - // (undocumented) - typeName: ZodFirstPartyTypeKind.ZodReadonly; -} - -// @public (undocumented) -class ZodRspackCrossChecker extends ZodType { - constructor(params: ZodCrossFieldsOptions); - // (undocumented) - _getRootData(ctx: z.ParseContext): any; + _getRootData(ctx: z.ParseContext): any; // (undocumented) _parse(input: z.ParseInput): z.ParseReturnType; } -// @public (undocumented) -interface ZodTooBigIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.too_big; - // (undocumented) - exact?: boolean; - // (undocumented) - inclusive: boolean; - // (undocumented) - maximum: number | bigint; - // (undocumented) - type: "array" | "string" | "number" | "set" | "date" | "bigint"; -} - -// @public (undocumented) -interface ZodTooSmallIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.too_small; - // (undocumented) - exact?: boolean; - // (undocumented) - inclusive: boolean; - // (undocumented) - minimum: number | bigint; - // (undocumented) - type: "array" | "string" | "number" | "set" | "date" | "bigint"; -} - -// @public (undocumented) -abstract class ZodType { - constructor(def: Def); - // (undocumented) - and(incoming: T): ZodIntersection; - // (undocumented) - array(): ZodArray; - // (undocumented) - brand(brand?: B): ZodBranded; - // (undocumented) - catch(def: Output): ZodCatch; - // (undocumented) - catch(def: (ctx: { - error: ZodError; - input: Input; - }) => Output): ZodCatch; - // (undocumented) - readonly _def: Def; - // (undocumented) - default(def: util_2.noUndefined): ZodDefault; - // (undocumented) - default(def: () => util_2.noUndefined): ZodDefault; - // (undocumented) - describe(description: string): this; - // (undocumented) - get description(): string | undefined; - // (undocumented) - _getOrReturnCtx(input: ParseInput, ctx?: ParseContext | undefined): ParseContext; - // (undocumented) - _getType(input: ParseInput): string; - // (undocumented) - readonly _input: Input; - // (undocumented) - isNullable(): boolean; - // (undocumented) - isOptional(): boolean; - // (undocumented) - nullable(): ZodNullable; - // (undocumented) - nullish(): ZodOptional>; - // (undocumented) - optional(): ZodOptional; - // (undocumented) - or(option: T): ZodUnion<[this, T]>; - // (undocumented) - readonly _output: Output; - // (undocumented) - parse(data: unknown, params?: Partial): Output; - // (undocumented) - abstract _parse(input: ParseInput): ParseReturnType; - // (undocumented) - parseAsync(data: unknown, params?: Partial): Promise; - // (undocumented) - _parseAsync(input: ParseInput): AsyncParseReturnType; - // (undocumented) - _parseSync(input: ParseInput): SyncParseReturnType; - // (undocumented) - pipe(target: T): ZodPipeline; - // (undocumented) - _processInputParams(input: ParseInput): { - status: ParseStatus; - ctx: ParseContext; - }; - // (undocumented) - promise(): ZodPromise; - // (undocumented) - readonly(): ZodReadonly; - // (undocumented) - refine(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects; - // (undocumented) - refine(check: (arg: Output) => unknown | Promise, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects; - // (undocumented) - refinement(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects; - // (undocumented) - refinement(check: (arg: Output) => boolean, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects; - // (undocumented) - _refinement(refinement: RefinementEffect["refinement"]): ZodEffects; - // (undocumented) - safeParse(data: unknown, params?: Partial): SafeParseReturnType; - // (undocumented) - safeParseAsync(data: unknown, params?: Partial): Promise>; - spa: (data: unknown, params?: Partial | undefined) => Promise>; - // (undocumented) - superRefine(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects; - // (undocumented) - superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects; - // (undocumented) - superRefine(refinement: (arg: Output, ctx: RefinementCtx) => Promise): ZodEffects; - // (undocumented) - transform(transform: (arg: Output, ctx: RefinementCtx) => NewOut | Promise): ZodEffects; - // (undocumented) - readonly _type: Output; -} - -// @public (undocumented) -type ZodTypeAny = ZodType; - -// @public (undocumented) -interface ZodTypeDef { - // (undocumented) - description?: string; - // (undocumented) - errorMap?: ZodErrorMap; -} - -// @public (undocumented) -class ZodUnion extends ZodType, T[number]["_input"]> { - // (undocumented) - static create: (types: T_1, params?: RawCreateParams) => ZodUnion; - // (undocumented) - get options(): T; - // (undocumented) - _parse(input: ParseInput): ParseReturnType; -} - -// @public (undocumented) -interface ZodUnionDef> extends ZodTypeDef { - // (undocumented) - options: T; - // (undocumented) - typeName: ZodFirstPartyTypeKind.ZodUnion; -} - -// @public (undocumented) -type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>; - -// @public (undocumented) -interface ZodUnrecognizedKeysIssue extends ZodIssueBase { - // (undocumented) - code: typeof ZodIssueCode.unrecognized_keys; - // (undocumented) - keys: string[]; -} - // (No @packageDocumentation comment for this package) ```