From 10116d6dbdbbb411b943611cc80c52dd44d57d1c Mon Sep 17 00:00:00 2001 From: GiveMe-A-Name Date: Mon, 30 Sep 2024 15:15:36 +0800 Subject: [PATCH] refactor: add JSDoc to improve Rspack configuration.[entry | mode | context] types. --- packages/rspack/etc/api.md | 1988 +++++---------------------- packages/rspack/src/config/types.ts | 221 +++ packages/rspack/src/config/zod.ts | 141 +- 3 files changed, 616 insertions(+), 1734 deletions(-) diff --git a/packages/rspack/etc/api.md b/packages/rspack/etc/api.md index cff11fa9c64..36d8ef1a19a 100644 --- a/packages/rspack/etc/api.md +++ b/packages/rspack/etc/api.md @@ -89,11 +89,8 @@ interface AmdConfig extends BaseModuleConfig { type: "amd"; } -// @public (undocumented) -export type AmdContainer = z.infer; - -// @public (undocumented) -const amdContainer: z.ZodString; +// @public +export type AmdContainer = string; // @public (undocumented) export const applyRspackOptionsBaseDefaults: (options: RspackOptionsNormalized) => void; @@ -361,32 +358,11 @@ const assetResourceGeneratorOptions: z.ZodObject<{ // @public (undocumented) export type Assets = Record; -// @public (undocumented) -export type AsyncChunks = z.infer; - -// @public (undocumented) -const asyncChunks: z.ZodBoolean; - -// @public (undocumented) -export type AuxiliaryComment = z.infer; +// @public +export type AsyncChunks = boolean; -// @public (undocumented) -const auxiliaryComment: z.ZodUnion<[z.ZodString, z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - commonjs2: z.ZodOptional; - root: z.ZodOptional; -}, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; -}, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; -}>]>; +// @public +export type AuxiliaryComment = string | LibraryCustomUmdCommentObject; // @public (undocumented) export type Bail = z.infer; @@ -541,9 +517,9 @@ const baseRuleSetRule: z.ZodObject<{ sideEffects: z.ZodOptional; enforce: z.ZodOptional, z.ZodLiteral<"post">]>>; }, "strict", z.ZodTypeAny, { + layer?: string | undefined; options?: string | Record | undefined; type?: string | undefined; - layer?: string | undefined; test?: RuleSetCondition | undefined; enforce?: "pre" | "post" | undefined; sideEffects?: boolean | undefined; @@ -577,9 +553,9 @@ const baseRuleSetRule: z.ZodObject<{ generator?: Record | undefined; resolve?: t.ResolveOptions | undefined; }, { + layer?: string | undefined; options?: string | Record | undefined; type?: string | undefined; - layer?: string | undefined; test?: RuleSetCondition | undefined; enforce?: "pre" | "post" | undefined; sideEffects?: boolean | undefined; @@ -614,11 +590,8 @@ const baseRuleSetRule: z.ZodObject<{ resolve?: t.ResolveOptions | undefined; }>; -// @public (undocumented) -export type BaseUri = z.infer; - -// @public (undocumented) -const baseUri: z.ZodString; +// @public +export type BaseUri = string; // @public (undocumented) type BigIntStatsCallback = (err: NodeJS.ErrnoException | null, stats?: IBigIntStats) => void; @@ -822,11 +795,8 @@ export class ChunkGroup { get origins(): ReadonlyArray; } -// @public (undocumented) -export type ChunkLoading = z.infer; - -// @public (undocumented) -const chunkLoading: z.ZodUnion<[z.ZodLiteral, z.ZodUnion<[z.ZodEnum<["jsonp", "import-scripts", "require", "async-node", "import"]>, z.ZodString]>]>; +// @public +export type ChunkLoading = false | ChunkLoadingType; // @public (undocumented) export type ChunkLoadingGlobal = z.infer; @@ -834,11 +804,8 @@ export type ChunkLoadingGlobal = z.infer; // @public (undocumented) const chunkLoadingGlobal: z.ZodString; -// @public (undocumented) -export type ChunkLoadingType = z.infer; - -// @public (undocumented) -const chunkLoadingType: z.ZodUnion<[z.ZodEnum<["jsonp", "import-scripts", "require", "async-node", "import"]>, z.ZodString]>; +// @public +export type ChunkLoadingType = string | "jsonp" | "import-scripts" | "require" | "async-node" | "import"; // @public (undocumented) export type Clean = z.infer; @@ -1328,24 +1295,8 @@ class ContainerPlugin extends RspackBuiltinPlugin { _options: { name: string; shareScope: string; - 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }; - runtime: string | false | undefined; + library: LibraryOptions; + runtime: EntryRuntime | undefined; filename: string | undefined; exposes: [string, { import: string[]; @@ -1375,7 +1326,7 @@ class ContainerReferencePlugin extends RspackBuiltinPlugin { name: BuiltinPluginName; // (undocumented) _options: { - remoteType: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs"; + remoteType: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs"; remotes: [string, { external: string[]; shareScope: string; @@ -1394,11 +1345,8 @@ export type ContainerReferencePluginOptions = { enhanced?: boolean; }; -// @public (undocumented) -export type Context = z.infer; - -// @public (undocumented) -const context: z.ZodEffects; +// @public +export type Context = string; // @public (undocumented) type ContextInfo = { @@ -1693,11 +1641,8 @@ export const DefinePlugin: { // @public (undocumented) export type DefinePluginOptions = Record; -// @public (undocumented) -export type Dependencies = z.infer; - -// @public (undocumented) -const dependencies: z.ZodArray; +// @public +export type Dependencies = Name[]; // @public (undocumented) class DependenciesBlock { @@ -1926,1226 +1871,136 @@ const EnableWasmLoadingPlugin: { // @public (undocumented) type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; +// @public +export type Entry = EntryStatic | EntryDynamic; + // @public (undocumented) -export type Entry = z.infer; +interface Entry_2 { + safeTime: number; + timestamp: number; +} // @public (undocumented) -const entry: z.ZodUnion<[z.ZodUnion<[z.ZodRecord]>, z.ZodObject<{ - import: z.ZodUnion<[z.ZodString, z.ZodArray]>; - runtime: z.ZodOptional, z.ZodString]>>; - publicPath: z.ZodOptional, z.ZodUnion<[z.ZodString, z.ZodFunction, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>]>>; - baseUri: z.ZodOptional; - chunkLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["jsonp", "import-scripts", "require", "async-node", "import"]>, z.ZodString]>]>>; - asyncChunks: z.ZodOptional; - wasmLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["fetch-streaming", "fetch", "async-node"]>, z.ZodString]>]>>; - filename: z.ZodOptional, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>>; - library: z.ZodOptional; - auxiliaryComment: z.ZodOptional; - commonjs: z.ZodOptional; - commonjs2: z.ZodOptional; - root: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }>]>>; - export: z.ZodOptional]>>; - name: z.ZodOptional]>, z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - root: z.ZodOptional]>>; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }>]>>; - type: z.ZodUnion<[z.ZodEnum<["var", "module", "assign", "assign-properties", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system"]>, z.ZodString]>; - umdNamedDefine: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }>>; - dependOn: z.ZodOptional]>>; - layer: z.ZodOptional>; -}, "strict", z.ZodTypeAny, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}>]>>, z.ZodUnion<[z.ZodString, z.ZodArray]>]>, z.ZodFunction, z.ZodUnion<[z.ZodUnion<[z.ZodRecord]>, z.ZodObject<{ - import: z.ZodUnion<[z.ZodString, z.ZodArray]>; - runtime: z.ZodOptional, z.ZodString]>>; - publicPath: z.ZodOptional, z.ZodUnion<[z.ZodString, z.ZodFunction, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>]>>; - baseUri: z.ZodOptional; - chunkLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["jsonp", "import-scripts", "require", "async-node", "import"]>, z.ZodString]>]>>; - asyncChunks: z.ZodOptional; - wasmLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["fetch-streaming", "fetch", "async-node"]>, z.ZodString]>]>>; - filename: z.ZodOptional, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>>; - library: z.ZodOptional; - auxiliaryComment: z.ZodOptional; - commonjs: z.ZodOptional; - commonjs2: z.ZodOptional; - root: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }>]>>; - export: z.ZodOptional]>>; - name: z.ZodOptional]>, z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - root: z.ZodOptional]>>; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }>]>>; - type: z.ZodUnion<[z.ZodEnum<["var", "module", "assign", "assign-properties", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system"]>, z.ZodString]>; - umdNamedDefine: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }>>; - dependOn: z.ZodOptional]>>; - layer: z.ZodOptional>; -}, "strict", z.ZodTypeAny, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}>]>>, z.ZodUnion<[z.ZodString, z.ZodArray]>]>, z.ZodPromise]>, z.ZodObject<{ - import: z.ZodUnion<[z.ZodString, z.ZodArray]>; - runtime: z.ZodOptional, z.ZodString]>>; - publicPath: z.ZodOptional, z.ZodUnion<[z.ZodString, z.ZodFunction, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>]>>; - baseUri: z.ZodOptional; - chunkLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["jsonp", "import-scripts", "require", "async-node", "import"]>, z.ZodString]>]>>; - asyncChunks: z.ZodOptional; - wasmLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["fetch-streaming", "fetch", "async-node"]>, z.ZodString]>]>>; - filename: z.ZodOptional, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>>; - library: z.ZodOptional; - auxiliaryComment: z.ZodOptional; - commonjs: z.ZodOptional; - commonjs2: z.ZodOptional; - root: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }>]>>; - export: z.ZodOptional]>>; - name: z.ZodOptional]>, z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - root: z.ZodOptional]>>; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }>]>>; - type: z.ZodUnion<[z.ZodEnum<["var", "module", "assign", "assign-properties", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system"]>, z.ZodString]>; - umdNamedDefine: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }>>; - dependOn: z.ZodOptional]>>; - layer: z.ZodOptional>; -}, "strict", z.ZodTypeAny, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}>]>>, z.ZodUnion<[z.ZodString, z.ZodArray]>]>>]>>]>; - -// @public (undocumented) -interface Entry_2 { - safeTime: number; - timestamp: number; -} - -// @public (undocumented) -type EntryData = binding.JsEntryData; - -// @public (undocumented) -export type EntryDependOn = z.infer; - -// @public (undocumented) -const entryDependOn: z.ZodUnion<[z.ZodString, z.ZodArray]>; - -// @public (undocumented) -export type EntryDescription = z.infer; - -// @public (undocumented) -const entryDescription: z.ZodObject<{ - import: z.ZodUnion<[z.ZodString, z.ZodArray]>; - runtime: z.ZodOptional, z.ZodString]>>; - publicPath: z.ZodOptional, z.ZodUnion<[z.ZodString, z.ZodFunction, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>]>>; - baseUri: z.ZodOptional; - chunkLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["jsonp", "import-scripts", "require", "async-node", "import"]>, z.ZodString]>]>>; - asyncChunks: z.ZodOptional; - wasmLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["fetch-streaming", "fetch", "async-node"]>, z.ZodString]>]>>; - filename: z.ZodOptional, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>>; - library: z.ZodOptional; - auxiliaryComment: z.ZodOptional; - commonjs: z.ZodOptional; - commonjs2: z.ZodOptional; - root: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }>]>>; - export: z.ZodOptional]>>; - name: z.ZodOptional]>, z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - root: z.ZodOptional]>>; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }>]>>; - type: z.ZodUnion<[z.ZodEnum<["var", "module", "assign", "assign-properties", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system"]>, z.ZodString]>; - umdNamedDefine: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }>>; - dependOn: z.ZodOptional]>>; - layer: z.ZodOptional>; -}, "strict", z.ZodTypeAny, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}>; - -// @public (undocumented) -export interface EntryDescriptionNormalized { - // (undocumented) - asyncChunks?: AsyncChunks; - // (undocumented) - baseUri?: BaseUri; - // (undocumented) - chunkLoading?: ChunkLoading; - // (undocumented) - dependOn?: string[]; - // (undocumented) - filename?: EntryFilename; - // (undocumented) - import?: string[]; - // (undocumented) - layer?: Layer; - // (undocumented) - library?: LibraryOptions; - // (undocumented) - publicPath?: PublicPath; - // (undocumented) - runtime?: EntryRuntime; -} - -// @public (undocumented) -export type EntryDynamic = z.infer; - -// @public (undocumented) -const entryDynamic: z.ZodFunction, z.ZodUnion<[z.ZodUnion<[z.ZodRecord]>, z.ZodObject<{ - import: z.ZodUnion<[z.ZodString, z.ZodArray]>; - runtime: z.ZodOptional, z.ZodString]>>; - publicPath: z.ZodOptional, z.ZodUnion<[z.ZodString, z.ZodFunction, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>]>>; - baseUri: z.ZodOptional; - chunkLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["jsonp", "import-scripts", "require", "async-node", "import"]>, z.ZodString]>]>>; - asyncChunks: z.ZodOptional; - wasmLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["fetch-streaming", "fetch", "async-node"]>, z.ZodString]>]>>; - filename: z.ZodOptional, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>>; - library: z.ZodOptional; - auxiliaryComment: z.ZodOptional; - commonjs: z.ZodOptional; - commonjs2: z.ZodOptional; - root: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }>]>>; - export: z.ZodOptional]>>; - name: z.ZodOptional]>, z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - root: z.ZodOptional]>>; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }>]>>; - type: z.ZodUnion<[z.ZodEnum<["var", "module", "assign", "assign-properties", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system"]>, z.ZodString]>; - umdNamedDefine: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }>>; - dependOn: z.ZodOptional]>>; - layer: z.ZodOptional>; -}, "strict", z.ZodTypeAny, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}>]>>, z.ZodUnion<[z.ZodString, z.ZodArray]>]>, z.ZodPromise]>, z.ZodObject<{ - import: z.ZodUnion<[z.ZodString, z.ZodArray]>; - runtime: z.ZodOptional, z.ZodString]>>; - publicPath: z.ZodOptional, z.ZodUnion<[z.ZodString, z.ZodFunction, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>]>>; - baseUri: z.ZodOptional; - chunkLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["jsonp", "import-scripts", "require", "async-node", "import"]>, z.ZodString]>]>>; - asyncChunks: z.ZodOptional; - wasmLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["fetch-streaming", "fetch", "async-node"]>, z.ZodString]>]>>; - filename: z.ZodOptional, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>>; - library: z.ZodOptional; - auxiliaryComment: z.ZodOptional; - commonjs: z.ZodOptional; - commonjs2: z.ZodOptional; - root: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }>]>>; - export: z.ZodOptional]>>; - name: z.ZodOptional]>, z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - root: z.ZodOptional]>>; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }>]>>; - type: z.ZodUnion<[z.ZodEnum<["var", "module", "assign", "assign-properties", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system"]>, z.ZodString]>; - umdNamedDefine: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }>>; - dependOn: z.ZodOptional]>>; - layer: z.ZodOptional>; -}, "strict", z.ZodTypeAny, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}>]>>, z.ZodUnion<[z.ZodString, z.ZodArray]>]>>]>>; - -// @public (undocumented) -export type EntryDynamicNormalized = () => Promise; - -// @public (undocumented) -export type EntryFilename = z.infer; - -// @public (undocumented) -const entryFilename: z.ZodUnion<[z.ZodString, z.ZodFunction, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>; - -// @public (undocumented) -export type EntryItem = z.infer; - -// @public (undocumented) -const entryItem: z.ZodUnion<[z.ZodString, z.ZodArray]>; - -// @public (undocumented) -export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized; - -// @public (undocumented) -export type EntryObject = z.infer; - -// @public (undocumented) -const entryObject: z.ZodRecord]>, z.ZodObject<{ - import: z.ZodUnion<[z.ZodString, z.ZodArray]>; - runtime: z.ZodOptional, z.ZodString]>>; - publicPath: z.ZodOptional, z.ZodUnion<[z.ZodString, z.ZodFunction, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>]>>; - baseUri: z.ZodOptional; - chunkLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["jsonp", "import-scripts", "require", "async-node", "import"]>, z.ZodString]>]>>; - asyncChunks: z.ZodOptional; - wasmLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["fetch-streaming", "fetch", "async-node"]>, z.ZodString]>]>>; - filename: z.ZodOptional, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>>; - library: z.ZodOptional; - auxiliaryComment: z.ZodOptional; - commonjs: z.ZodOptional; - commonjs2: z.ZodOptional; - root: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }>]>>; - export: z.ZodOptional]>>; - name: z.ZodOptional]>, z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - root: z.ZodOptional]>>; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }>]>>; - type: z.ZodUnion<[z.ZodEnum<["var", "module", "assign", "assign-properties", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system"]>, z.ZodString]>; - umdNamedDefine: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }>>; - dependOn: z.ZodOptional]>>; - layer: z.ZodOptional>; -}, "strict", z.ZodTypeAny, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}>]>>; +type EntryData = binding.JsEntryData; -// @public (undocumented) -export class EntryOptionPlugin { - // (undocumented) - apply(compiler: Compiler): void; - // (undocumented) - static applyEntryOption(compiler: Compiler, context: string, entry: EntryNormalized): void; - // (undocumented) - static entryDescriptionToOptions(compiler: Compiler, name: string, desc: EntryDescriptionNormalized): EntryOptions; -} +// @public +export type EntryDependOn = string | string[]; // @public (undocumented) -export type EntryOptions = { - name?: string; +export type EntryDescription = { + import: EntryItem; runtime?: EntryRuntime; - chunkLoading?: ChunkLoading; - asyncChunks?: boolean; publicPath?: PublicPath; - baseUri?: string; - filename?: Filename; - library?: LibraryOptions; - layer?: Layer; - dependOn?: string[]; -}; - -// @public (undocumented) -export const EntryPlugin: { - new (context: string, entry: string, options?: string | EntryOptions | undefined): { - name: BuiltinPluginName; - _args: [context: string, entry: string, options?: string | EntryOptions | undefined]; - affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; - raw(compiler: Compiler_2): BuiltinPlugin; - apply(compiler: Compiler_2): void; - }; -}; - -// @public (undocumented) -class Entrypoint extends ChunkGroup { - protected constructor(inner: JsChunkGroup, compilation: JsCompilation); - // (undocumented) - static __from_binding(chunk: JsChunkGroup, compilation: JsCompilation): Entrypoint; - // (undocumented) - getRuntimeChunk(): Readonly; -} - -// @public (undocumented) -export type EntryRuntime = z.infer; - -// @public (undocumented) -const entryRuntime: z.ZodUnion<[z.ZodLiteral, z.ZodString]>; - -// @public (undocumented) -export type EntryStatic = z.infer; - -// @public (undocumented) -const entryStatic: z.ZodUnion<[z.ZodRecord]>, z.ZodObject<{ - import: z.ZodUnion<[z.ZodString, z.ZodArray]>; - runtime: z.ZodOptional, z.ZodString]>>; - publicPath: z.ZodOptional, z.ZodUnion<[z.ZodString, z.ZodFunction, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>]>>; - baseUri: z.ZodOptional; - chunkLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["jsonp", "import-scripts", "require", "async-node", "import"]>, z.ZodString]>]>>; - asyncChunks: z.ZodOptional; - wasmLoading: z.ZodOptional, z.ZodUnion<[z.ZodEnum<["fetch-streaming", "fetch", "async-node"]>, z.ZodString]>]>>; - filename: z.ZodOptional, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>>; - library: z.ZodOptional; - auxiliaryComment: z.ZodOptional; - commonjs: z.ZodOptional; - commonjs2: z.ZodOptional; - root: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }>]>>; - export: z.ZodOptional]>>; - name: z.ZodOptional]>, z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - root: z.ZodOptional]>>; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }>]>>; - type: z.ZodUnion<[z.ZodEnum<["var", "module", "assign", "assign-properties", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system"]>, z.ZodString]>; - umdNamedDefine: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - }>>; - dependOn: z.ZodOptional]>>; - layer: z.ZodOptional>; -}, "strict", z.ZodTypeAny, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}, { - import: string | string[]; - filename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - publicPath?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; - layer?: string | null | undefined; - runtime?: string | false | undefined; - baseUri?: string | undefined; - chunkLoading?: string | false | undefined; - asyncChunks?: boolean | undefined; - wasmLoading?: string | false | 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; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}>]>>, z.ZodUnion<[z.ZodString, z.ZodArray]>]>; + baseUri?: BaseUri; + chunkLoading?: ChunkLoading; + asyncChunks?: AsyncChunks; + wasmLoading?: WasmLoading; + filename?: EntryFilename; + library?: LibraryOptions; + dependOn?: EntryDependOn; + layer?: Layer; +}; // @public (undocumented) -export interface EntryStaticNormalized { +export interface EntryDescriptionNormalized { // (undocumented) - [k: string]: EntryDescriptionNormalized; + asyncChunks?: AsyncChunks; + // (undocumented) + baseUri?: BaseUri; + // (undocumented) + chunkLoading?: ChunkLoading; + // (undocumented) + dependOn?: string[]; + // (undocumented) + filename?: EntryFilename; + // (undocumented) + import?: string[]; + // (undocumented) + layer?: Layer; + // (undocumented) + library?: LibraryOptions; + // (undocumented) + publicPath?: PublicPath; + // (undocumented) + runtime?: EntryRuntime; +} + +// @public +export type EntryDynamic = () => EntryStatic | Promise; + +// @public (undocumented) +export type EntryDynamicNormalized = () => Promise; + +// @public +export type EntryFilename = Filename; + +// @public +export type EntryItem = string | string[]; + +// @public (undocumented) +export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized; + +// @public (undocumented) +export type EntryObject = Record; + +// @public (undocumented) +export class EntryOptionPlugin { + // (undocumented) + apply(compiler: Compiler): void; + // (undocumented) + static applyEntryOption(compiler: Compiler, context: string, entry: EntryNormalized): void; + // (undocumented) + static entryDescriptionToOptions(compiler: Compiler, name: string, desc: EntryDescriptionNormalized): EntryOptions; +} + +// @public (undocumented) +export type EntryOptions = { + name?: string; + runtime?: EntryRuntime; + chunkLoading?: ChunkLoading; + asyncChunks?: boolean; + publicPath?: PublicPath; + baseUri?: string; + filename?: Filename; + library?: LibraryOptions; + layer?: Layer; + dependOn?: string[]; +}; + +// @public (undocumented) +export const EntryPlugin: { + new (context: string, entry: string, options?: string | EntryOptions | undefined): { + name: BuiltinPluginName; + _args: [context: string, entry: string, options?: string | EntryOptions | undefined]; + affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; + raw(compiler: Compiler_2): BuiltinPlugin; + apply(compiler: Compiler_2): void; + }; +}; + +// @public (undocumented) +class Entrypoint extends ChunkGroup { + protected constructor(inner: JsChunkGroup, compilation: JsCompilation); + // (undocumented) + static __from_binding(chunk: JsChunkGroup, compilation: JsCompilation): Entrypoint; + // (undocumented) + getRuntimeChunk(): Readonly; } +// @public +export type EntryRuntime = false | string; + +// @public +export type EntryStatic = EntryObject | EntryUnnamed; + // @public (undocumented) -export type EntryUnnamed = z.infer; +export interface EntryStaticNormalized { + // (undocumented) + [k: string]: EntryDescriptionNormalized; +} // @public (undocumented) -const entryUnnamed: z.ZodUnion<[z.ZodString, z.ZodArray]>; +export type EntryUnnamed = EntryItem; // @public (undocumented) export type Environment = z.infer; @@ -3784,7 +2639,7 @@ export const ExternalsPlugin: { contextInfo?: { issuer: string; } | undefined; - }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { + }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { context?: string | undefined; dependencyType?: string | undefined; request?: string | undefined; @@ -3798,7 +2653,7 @@ export const ExternalsPlugin: { contextInfo?: { issuer: string; } | undefined; - }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { + }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { context?: string | undefined; dependencyType?: string | undefined; request?: string | undefined; @@ -3814,7 +2669,7 @@ export const ExternalsPlugin: { contextInfo?: { issuer: string; } | undefined; - }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { + }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { context?: string | undefined; dependencyType?: string | undefined; request?: string | undefined; @@ -3828,7 +2683,7 @@ export const ExternalsPlugin: { contextInfo?: { issuer: string; } | undefined; - }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { + }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { context?: string | undefined; dependencyType?: string | undefined; request?: string | undefined; @@ -3904,10 +2759,7 @@ type ExtraPluginHookData = { }; // @public (undocumented) -export type Falsy = z.infer; - -// @public (undocumented) -const falsy: z.ZodUnion<[z.ZodLiteral, z.ZodLiteral<0>, z.ZodLiteral<"">, z.ZodNull, z.ZodUndefined]>; +export type Falsy = false | "" | 0 | null | undefined; // @public (undocumented) const FetchCompileAsyncWasmPlugin: { @@ -3921,16 +2773,10 @@ const FetchCompileAsyncWasmPlugin: { }; // @public (undocumented) -export type Filename = z.infer; +export type Filename = FilenameTemplate | ((pathData: PathData, assetInfo?: JsAssetInfo) => string); // @public (undocumented) -const filename: z.ZodUnion<[z.ZodString, z.ZodFunction, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>; - -// @public (undocumented) -export type FilenameTemplate = z.infer; - -// @public (undocumented) -const filenameTemplate: z.ZodString; +export type FilenameTemplate = string; // @public (undocumented) interface FileSystemInfoEntry { @@ -5337,11 +4183,8 @@ type KnownStatsProfile = { building: number; }; -// @public (undocumented) -export type Layer = z.infer; - -// @public (undocumented) -const layer: z.ZodUnion<[z.ZodString, z.ZodNull]>; +// @public +export type Layer = string | null; // @public (undocumented) export type LazyCompilationOptions = z.infer; @@ -5447,239 +4290,51 @@ const lazyCompilationOptions: z.ZodObject<{ imports?: boolean | undefined; }>; -// @public (undocumented) -export type Library = z.infer; +// @public +export type Library = LibraryName | LibraryOptions | undefined; // @public (undocumented) export const library: Library_2; // @public (undocumented) -interface Library_2 { - // (undocumented) - EnableLibraryPlugin: typeof EnableLibraryPlugin; -} - -// @public (undocumented) -const library_2: z.ZodOptional]>, z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - root: z.ZodOptional]>>; -}, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; -}, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; -}>]>, z.ZodObject<{ - amdContainer: z.ZodOptional; - auxiliaryComment: z.ZodOptional; - commonjs: z.ZodOptional; - commonjs2: z.ZodOptional; - root: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }>]>>; - export: z.ZodOptional]>>; - name: z.ZodOptional]>, z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - root: z.ZodOptional]>>; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }>]>>; - type: z.ZodUnion<[z.ZodEnum<["var", "module", "assign", "assign-properties", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system"]>, z.ZodString]>; - umdNamedDefine: z.ZodOptional; -}, "strict", z.ZodTypeAny, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; -}, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; -}>]>>; - -// @public (undocumented) -export type LibraryCustomUmdCommentObject = z.infer; - -// @public (undocumented) -const libraryCustomUmdCommentObject: z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - commonjs2: z.ZodOptional; - root: z.ZodOptional; -}, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; -}, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; -}>; - -// @public (undocumented) -export type LibraryCustomUmdObject = z.infer; - -// @public (undocumented) -const libraryCustomUmdObject: z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - root: z.ZodOptional]>>; -}, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; -}, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; -}>; - -// @public (undocumented) -export type LibraryExport = z.infer; - -// @public (undocumented) -const libraryExport: z.ZodUnion<[z.ZodString, z.ZodArray]>; - -// @public (undocumented) -export type LibraryName = z.infer; - -// @public (undocumented) -const libraryName: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray]>, z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - root: z.ZodOptional]>>; -}, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; -}, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; -}>]>; - -// @public (undocumented) -export type LibraryOptions = z.infer; - -// @public (undocumented) -const libraryOptions: z.ZodObject<{ - amdContainer: z.ZodOptional; - auxiliaryComment: z.ZodOptional; - commonjs: z.ZodOptional; - commonjs2: z.ZodOptional; - root: z.ZodOptional; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - }>]>>; - export: z.ZodOptional]>>; - name: z.ZodOptional]>, z.ZodObject<{ - amd: z.ZodOptional; - commonjs: z.ZodOptional; - root: z.ZodOptional]>>; - }, "strict", z.ZodTypeAny, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - }>]>>; - type: z.ZodUnion<[z.ZodEnum<["var", "module", "assign", "assign-properties", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system"]>, z.ZodString]>; - umdNamedDefine: z.ZodOptional; -}, "strict", z.ZodTypeAny, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; -}, { - type: string; - name?: string | string[] | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | string[] | undefined; - } | undefined; - amdContainer?: string | undefined; - auxiliaryComment?: string | { - commonjs?: string | undefined; - amd?: string | undefined; - root?: string | undefined; - commonjs2?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; -}>; - -// @public (undocumented) -export type LibraryType = z.infer; +interface Library_2 { + // (undocumented) + EnableLibraryPlugin: typeof EnableLibraryPlugin; +} // @public (undocumented) -const libraryType: z.ZodUnion<[z.ZodEnum<["var", "module", "assign", "assign-properties", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system"]>, z.ZodString]>; +export type LibraryCustomUmdCommentObject = { + amd?: string; + commonjs?: string; + commonjs2?: string; + root?: string; +}; + +// @public (undocumented) +export type LibraryCustomUmdObject = { + amd?: string; + commonjs?: string; + root?: string | string[]; +}; + +// @public +export type LibraryExport = string | string[]; + +// @public +export type LibraryName = string | string[] | LibraryCustomUmdObject; + +// @public +export type LibraryOptions = { + amdContainer?: AmdContainer; + auxiliaryComment?: AuxiliaryComment; + export?: LibraryExport; + name?: LibraryName; + type: LibraryType; + umdNamedDefine?: UmdNamedDefine; +}; + +// @public +export type LibraryType = string | "var" | "module" | "assign" | "assign-properties" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "jsonp" | "system"; // @public (undocumented) export type LightningcssFeatureOptions = { @@ -6104,11 +4759,8 @@ const matchObject: (obj: MatchObject, str: string) => boolean; // @public (undocumented) const matchPart: (str: string, test: Matcher) => boolean; -// @public (undocumented) -export type Mode = z.infer; - -// @public (undocumented) -const mode: z.ZodEnum<["development", "production", "none"]>; +// @public +export type Mode = "development" | "production" | "none"; // @public (undocumented) export class Module { @@ -7189,11 +5841,8 @@ class MultiWatching { watchings: Watching[]; } -// @public (undocumented) -export type Name = z.infer; - -// @public (undocumented) -const name_2: z.ZodString; +// @public +export type Name = string; // @public (undocumented) export const node: Node_3; @@ -8077,13 +6726,13 @@ const output: z.ZodObject<{ }, "strict", z.ZodTypeAny, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }>]>>; export: z.ZodOptional]>>; name: z.ZodOptional]>, z.ZodObject<{ @@ -8112,8 +6761,8 @@ const output: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -8128,8 +6777,8 @@ const output: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -8145,13 +6794,13 @@ const output: z.ZodObject<{ }, "strict", z.ZodTypeAny, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }>]>>; module: z.ZodOptional; strictModuleExceptionHandling: z.ZodOptional; @@ -8254,13 +6903,13 @@ const output: z.ZodObject<{ optionalChaining?: boolean | undefined; templateLiteral?: boolean | undefined; } | undefined; - path?: string | undefined; chunkFilename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; + path?: string | undefined; auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; umdNamedDefine?: boolean | undefined; chunkLoading?: string | false | undefined; @@ -8281,8 +6930,8 @@ const output: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -8349,13 +6998,13 @@ const output: z.ZodObject<{ optionalChaining?: boolean | undefined; templateLiteral?: boolean | undefined; } | undefined; - path?: string | undefined; chunkFilename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; + path?: string | undefined; auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; umdNamedDefine?: boolean | undefined; chunkLoading?: string | false | undefined; @@ -8376,8 +7025,8 @@ const output: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -9529,11 +8178,8 @@ interface PseudoClasses { hover?: string; } -// @public (undocumented) -export type PublicPath = z.infer; - -// @public (undocumented) -const publicPath: z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodUnion<[z.ZodString, z.ZodFunction, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>]>; +// @public +export type PublicPath = "auto" | Filename; // @public (undocumented) type Purge = (files?: string | string[] | Set) => void; @@ -10012,42 +8658,6 @@ declare namespace rspackExports { IgnoreWarningsNormalized, OptimizationRuntimeChunkNormalized, RspackOptionsNormalized, - FilenameTemplate, - Filename, - Name, - Dependencies, - Context, - Mode, - Falsy, - PublicPath, - BaseUri, - ChunkLoadingType, - ChunkLoading, - AsyncChunks, - WasmLoadingType, - WasmLoading, - ScriptType, - LibraryCustomUmdObject, - LibraryName, - LibraryCustomUmdCommentObject, - AmdContainer, - AuxiliaryComment, - LibraryExport, - LibraryType, - UmdNamedDefine, - LibraryOptions, - Library, - Layer, - EntryFilename, - EntryRuntime, - EntryItem, - EntryDependOn, - EntryDescription, - EntryUnnamed, - EntryObject, - EntryStatic, - EntryDynamic, - Entry, Path, Pathinfo, AssetModuleFilename, @@ -10169,10 +8779,46 @@ declare namespace rspackExports { rspackOptions, RspackOptions, Configuration, + Name, + Dependencies, + Context, + Mode, + Falsy, + PublicPath, + BaseUri, + ChunkLoadingType, + ChunkLoading, + AsyncChunks, + WasmLoadingType, + WasmLoading, + ScriptType, + LibraryCustomUmdObject, + LibraryName, + LibraryCustomUmdCommentObject, + AmdContainer, + AuxiliaryComment, + LibraryExport, + LibraryType, + UmdNamedDefine, + LibraryOptions, + Library, + Layer, + EntryFilename, + EntryRuntime, + EntryItem, + EntryDependOn, + EntryDescription, + EntryUnnamed, + EntryObject, + EntryStatic, + EntryDynamic, + Entry, ResolveAlias, ResolveTsConfig, ResolveOptions, - Resolve + Resolve, + FilenameTemplate, + Filename } } @@ -10234,13 +8880,13 @@ export const rspackOptions: z.ZodObject<{ }, "strict", z.ZodTypeAny, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }>]>>; export: z.ZodOptional]>>; name: z.ZodOptional]>, z.ZodObject<{ @@ -10269,8 +8915,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10285,8 +8931,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10314,8 +8960,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10342,8 +8988,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10368,13 +9014,13 @@ export const rspackOptions: z.ZodObject<{ }, "strict", z.ZodTypeAny, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }>]>>; export: z.ZodOptional]>>; name: z.ZodOptional]>, z.ZodObject<{ @@ -10403,8 +9049,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10419,8 +9065,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10448,8 +9094,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10476,8 +9122,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10502,13 +9148,13 @@ export const rspackOptions: z.ZodObject<{ }, "strict", z.ZodTypeAny, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }>]>>; export: z.ZodOptional]>>; name: z.ZodOptional]>, z.ZodObject<{ @@ -10537,8 +9183,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10553,8 +9199,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10582,8 +9228,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10610,8 +9256,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10658,13 +9304,13 @@ export const rspackOptions: z.ZodObject<{ }, "strict", z.ZodTypeAny, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }>]>>; export: z.ZodOptional]>>; name: z.ZodOptional]>, z.ZodObject<{ @@ -10693,8 +9339,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10709,8 +9355,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10726,13 +9372,13 @@ export const rspackOptions: z.ZodObject<{ }, "strict", z.ZodTypeAny, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }, { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; }>]>>; module: z.ZodOptional; strictModuleExceptionHandling: z.ZodOptional; @@ -10835,13 +9481,13 @@ export const rspackOptions: z.ZodObject<{ optionalChaining?: boolean | undefined; templateLiteral?: boolean | undefined; } | undefined; - path?: string | undefined; chunkFilename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; + path?: string | undefined; auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; umdNamedDefine?: boolean | undefined; chunkLoading?: string | false | undefined; @@ -10862,8 +9508,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -10930,13 +9576,13 @@ export const rspackOptions: z.ZodObject<{ optionalChaining?: boolean | undefined; templateLiteral?: boolean | undefined; } | undefined; - path?: string | undefined; chunkFilename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; + path?: string | undefined; auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; umdNamedDefine?: boolean | undefined; chunkLoading?: string | false | undefined; @@ -10957,8 +9603,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -13077,8 +11723,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -13105,8 +11751,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -13133,8 +11779,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -13170,13 +11816,13 @@ export const rspackOptions: z.ZodObject<{ optionalChaining?: boolean | undefined; templateLiteral?: boolean | undefined; } | undefined; - path?: string | undefined; chunkFilename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; + path?: string | undefined; auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; umdNamedDefine?: boolean | undefined; chunkLoading?: string | false | undefined; @@ -13197,8 +11843,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -13298,7 +11944,7 @@ export const rspackOptions: z.ZodObject<{ contextInfo?: { issuer: string; } | undefined; - }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { + }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { context?: string | undefined; dependencyType?: string | undefined; request?: string | undefined; @@ -13312,7 +11958,7 @@ export const rspackOptions: z.ZodObject<{ contextInfo?: { issuer: string; } | undefined; - }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { + }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { context?: string | undefined; dependencyType?: string | undefined; request?: string | undefined; @@ -13320,7 +11966,7 @@ export const rspackOptions: z.ZodObject<{ issuer: string; } | undefined; }, ...args_1: unknown[]) => Promise>))[] | undefined; - externalsType?: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined; + externalsType?: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined; externalsPresets?: { node?: boolean | undefined; web?: boolean | undefined; @@ -13659,8 +12305,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -13687,8 +12333,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -13715,8 +12361,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -13752,13 +12398,13 @@ export const rspackOptions: z.ZodObject<{ optionalChaining?: boolean | undefined; templateLiteral?: boolean | undefined; } | undefined; - path?: string | undefined; chunkFilename?: string | ((args_0: JsPathData, args_1: JsAssetInfo | undefined, ...args_2: unknown[]) => string) | undefined; + path?: string | undefined; auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; umdNamedDefine?: boolean | undefined; chunkLoading?: string | false | undefined; @@ -13779,8 +12425,8 @@ export const rspackOptions: z.ZodObject<{ auxiliaryComment?: string | { commonjs?: string | undefined; amd?: string | undefined; - root?: string | undefined; commonjs2?: string | undefined; + root?: string | undefined; } | undefined; export?: string | string[] | undefined; umdNamedDefine?: boolean | undefined; @@ -13880,7 +12526,7 @@ export const rspackOptions: z.ZodObject<{ contextInfo?: { issuer: string; } | undefined; - }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { + }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { context?: string | undefined; dependencyType?: string | undefined; request?: string | undefined; @@ -13894,7 +12540,7 @@ export const rspackOptions: z.ZodObject<{ contextInfo?: { issuer: string; } | undefined; - }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { + }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record | undefined, args_2: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { context?: string | undefined; dependencyType?: string | undefined; request?: string | undefined; @@ -13902,7 +12548,7 @@ export const rspackOptions: z.ZodObject<{ issuer: string; } | undefined; }, ...args_1: unknown[]) => Promise>))[] | undefined; - externalsType?: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined; + externalsType?: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "module-import" | "script" | "node-commonjs" | undefined; externalsPresets?: { node?: boolean | undefined; web?: boolean | undefined; @@ -14444,10 +13090,7 @@ enum RuntimeModuleStage { type RuntimePlugins = string[]; // @public (undocumented) -export type ScriptType = z.infer; - -// @public (undocumented) -const scriptType: z.ZodUnion<[z.ZodEnum<["text/javascript", "module"]>, z.ZodLiteral]>; +export type ScriptType = false | "text/javascript" | "module"; // @public (undocumented) export type Shared = (SharedItem | SharedObject)[] | SharedObject; @@ -15415,10 +14058,46 @@ interface SystemjsConfig { declare namespace t { export { + Name, + Dependencies, + Context, + Mode, + Falsy, + PublicPath, + BaseUri, + ChunkLoadingType, + ChunkLoading, + AsyncChunks, + WasmLoadingType, + WasmLoading, + ScriptType, + LibraryCustomUmdObject, + LibraryName, + LibraryCustomUmdCommentObject, + AmdContainer, + AuxiliaryComment, + LibraryExport, + LibraryType, + UmdNamedDefine, + LibraryOptions, + Library, + Layer, + EntryFilename, + EntryRuntime, + EntryItem, + EntryDependOn, + EntryDescription, + EntryUnnamed, + EntryObject, + EntryStatic, + EntryDynamic, + Entry, ResolveAlias, ResolveTsConfig, ResolveOptions, - Resolve + Resolve, + FilenameTemplate, + Filename } } @@ -15662,11 +14341,8 @@ interface UmdConfig extends BaseModuleConfig { type: "umd"; } -// @public (undocumented) -export type UmdNamedDefine = z.infer; - -// @public (undocumented) -const umdNamedDefine: z.ZodBoolean; +// @public +export type UmdNamedDefine = boolean; // @public (undocumented) export type UniqueName = z.infer; @@ -15697,17 +14373,11 @@ interface Wasm { // @public (undocumented) export const wasm: Wasm; -// @public (undocumented) -export type WasmLoading = z.infer; - -// @public (undocumented) -const wasmLoading: z.ZodUnion<[z.ZodLiteral, z.ZodUnion<[z.ZodEnum<["fetch-streaming", "fetch", "async-node"]>, z.ZodString]>]>; - -// @public (undocumented) -export type WasmLoadingType = z.infer; +// @public +export type WasmLoading = false | WasmLoadingType; -// @public (undocumented) -const wasmLoadingType: z.ZodUnion<[z.ZodEnum<["fetch-streaming", "fetch", "async-node"]>, z.ZodString]>; +// @public +export type WasmLoadingType = string | "fetch-streaming" | "fetch" | "async-node"; // @public (undocumented) export type Watch = z.infer; diff --git a/packages/rspack/src/config/types.ts b/packages/rspack/src/config/types.ts index 7729f3267ed..82810c4d22f 100644 --- a/packages/rspack/src/config/types.ts +++ b/packages/rspack/src/config/types.ts @@ -1,3 +1,224 @@ +import type { JsAssetInfo } from "@rspack/binding"; +import type { PathData } from "../Compilation"; + +export type FilenameTemplate = string; + +export type Filename = + | FilenameTemplate + | ((pathData: PathData, assetInfo?: JsAssetInfo) => string); + +//#region Name +/** Name of the configuration. Used when loading multiple configurations. */ +export type Name = string; +//#endregion + +//#region Dependencies +/** A list of name defining all sibling configurations it depends on. Dependent configurations need to be compiled first. */ +export type Dependencies = Name[]; +//#endregion + +//#region Context +/** + * The context configuration is used to set the base directory for Rspack builds. + * @default process.cwd() + * */ +export type Context = string; +//#endregion + +//#region Mode +/** + * The mode configuration is used to set the build mode of Rspack to enable the default optimization strategy. + * @default 'production' + * */ +export type Mode = "development" | "production" | "none"; +//#endregion + +//#region Falsy +export type Falsy = false | "" | 0 | null | undefined; +//#endregion + +//#region Entry +/** The publicPath of the resource referenced by this entry. */ +export type PublicPath = "auto" | Filename; + +/** The baseURI of the resource referenced by this entry. */ +export type BaseUri = string; + +/** How this entry load other chunks. */ +export type ChunkLoadingType = + | string + | "jsonp" + | "import-scripts" + | "require" + | "async-node" + | "import"; + +/** How this entry load other chunks. */ +export type ChunkLoading = false | ChunkLoadingType; + +/** Whether to create a load-on-demand asynchronous chunk for entry. */ +export type AsyncChunks = boolean; + +/** Option to set the method of loading WebAssembly Modules. */ +export type WasmLoadingType = + | string + | "fetch-streaming" + | "fetch" + | "async-node"; + +/** Option to set the method of loading WebAssembly Modules. */ +export type WasmLoading = false | WasmLoadingType; + +export type ScriptType = false | "text/javascript" | "module"; + +export type LibraryCustomUmdObject = { + amd?: string; + commonjs?: string; + root?: string | string[]; +}; + +/** Specify a name for the library. */ +export type LibraryName = string | string[] | LibraryCustomUmdObject; + +export type LibraryCustomUmdCommentObject = { + amd?: string; + commonjs?: string; + commonjs2?: string; + root?: string; +}; + +/** Use a container(defined in global space) for calling define/require functions in an AMD module. */ +export type AmdContainer = string; + +/** Add a comment in the UMD wrapper. */ +export type AuxiliaryComment = string | LibraryCustomUmdCommentObject; + +/** Specify which export should be exposed as a library. */ +export type LibraryExport = string | string[]; + +/** Configure how the library will be exposed. */ +export type LibraryType = + | string + | "var" + | "module" + | "assign" + | "assign-properties" + | "this" + | "window" + | "self" + | "global" + | "commonjs" + | "commonjs2" + | "commonjs-module" + | "commonjs-static" + | "amd" + | "amd-require" + | "umd" + | "umd2" + | "jsonp" + | "system"; + +/** When using output.library.type: "umd", setting output.library.umdNamedDefine to true will name the AMD module of the UMD build. */ +export type UmdNamedDefine = boolean; + +/** Options for library. */ +export type LibraryOptions = { + /** Use a container(defined in global space) for calling define/require functions in an AMD module. */ + amdContainer?: AmdContainer; + + /** Add a comment in the UMD wrapper. */ + auxiliaryComment?: AuxiliaryComment; + + /** Specify which export should be exposed as a library. */ + export?: LibraryExport; + + /** Specify a name for the library. */ + name?: LibraryName; + + /** Configure how the library will be exposed. */ + type: LibraryType; + + /** + * When using output.library.type: "umd", setting output.library.umdNamedDefine to true will name the AMD module of the UMD build. + * Otherwise, an anonymous define is used. + * */ + umdNamedDefine?: UmdNamedDefine; +}; + +/** Options for library. */ +export type Library = LibraryName | LibraryOptions | undefined; + +/** The layer of this entry. */ +export type Layer = string | null; + +/** The filename of the entry chunk. */ +export type EntryFilename = Filename; + +/** The name of the runtime chunk. */ +export type EntryRuntime = false | string; + +/** The path to the entry module. */ +export type EntryItem = string | string[]; + +/** The entry that the current entry depends on. With dependOn option you can share the modules from one entry chunk to another. */ +export type EntryDependOn = string | string[]; + +export type EntryDescription = { + /** + * The path to the entry module. + * @default './src/index.js' + * */ + import: EntryItem; + + /** + * The name of the runtime chunk. + * When runtime is set, a new runtime chunk will be created. + * You can also set it to false to avoid a new runtime chunk. + * */ + runtime?: EntryRuntime; + + /** The publicPath of the resource referenced by this entry. */ + publicPath?: PublicPath; + + /** The baseURI of the resource referenced by this entry. */ + baseUri?: BaseUri; + + /** How this entry load other chunks. */ + chunkLoading?: ChunkLoading; + + /** Whether to create a load-on-demand asynchronous chunk for this entry. */ + asyncChunks?: AsyncChunks; + + /** Option to set the method of loading WebAssembly Modules. */ + wasmLoading?: WasmLoading; + + /** The filename of the entry chunk. */ + filename?: EntryFilename; + + /** The format of the chunk generated by this entry as a library. */ + library?: LibraryOptions; + + /** The entry that the current entry depends on. With dependOn option you can share the modules from one entry chunk to another. */ + dependOn?: EntryDependOn; + + /** The layer of this entry, make the corresponding configuration take effect through layer matching in SplitChunks, Rules, Stats, and Externals. */ + layer?: Layer; +}; + +export type EntryUnnamed = EntryItem; + +export type EntryObject = Record; + +/** A static entry. */ +export type EntryStatic = EntryObject | EntryUnnamed; + +/** A Function returning entry options. */ +export type EntryDynamic = () => EntryStatic | Promise; + +/** The entry options for building */ +export type Entry = EntryStatic | EntryDynamic; +//#endregion + //#region Resolve /** * Path alias diff --git a/packages/rspack/src/config/zod.ts b/packages/rspack/src/config/zod.ts index 664b0139a5c..2522f74462e 100644 --- a/packages/rspack/src/config/zod.ts +++ b/packages/rspack/src/config/zod.ts @@ -11,25 +11,21 @@ import type * as t from "./types"; export type * from "./types"; -const filenameTemplate = z.string(); -export type FilenameTemplate = z.infer; +const filenameTemplate = z.string() satisfies z.ZodType; const filename = filenameTemplate.or( z .function() .args(z.custom(), z.custom().optional()) .returns(z.string()) -); -export type Filename = z.infer; +) satisfies z.ZodType; //#region Name -const name = z.string(); -export type Name = z.infer; +const name = z.string() satisfies z.ZodType; //#endregion //#region Dependencies -const dependencies = z.array(name); -export type Dependencies = z.infer; +const dependencies = z.array(name) satisfies z.ZodType; //#endregion //#region Context @@ -38,13 +34,15 @@ const context = z.string().refine( val => ({ message: `The provided value ${JSON.stringify(val)} must be an absolute path.` }) -); -export type Context = z.infer; +) satisfies z.ZodType; //#endregion //#region Mode -const mode = z.enum(["development", "production", "none"]); -export type Mode = z.infer; +const mode = z.enum([ + "development", + "production", + "none" +]) satisfies z.ZodType; //#endregion //#region Falsy @@ -54,71 +52,65 @@ const falsy = z.union([ z.literal(""), z.null(), z.undefined() -]); - -export type Falsy = z.infer; +]) satisfies z.ZodType; //#endregion //#region Entry -const publicPath = z.literal("auto").or(filename); -export type PublicPath = z.infer; +const publicPath = z + .literal("auto") + .or(filename) satisfies z.ZodType; -const baseUri = z.string(); -export type BaseUri = z.infer; +const baseUri = z.string() satisfies z.ZodType; const chunkLoadingType = z .enum(["jsonp", "import-scripts", "require", "async-node", "import"]) - .or(z.string()); -export type ChunkLoadingType = z.infer; + .or(z.string()) satisfies z.ZodType; -const chunkLoading = z.literal(false).or(chunkLoadingType); -export type ChunkLoading = z.infer; +const chunkLoading = z + .literal(false) + .or(chunkLoadingType) satisfies z.ZodType; -const asyncChunks = z.boolean(); -export type AsyncChunks = z.infer; +const asyncChunks = z.boolean() satisfies z.ZodType; const wasmLoadingType = z .enum(["fetch-streaming", "fetch", "async-node"]) - .or(z.string()); -export type WasmLoadingType = z.infer; + .or(z.string()) satisfies z.ZodType; -const wasmLoading = z.literal(false).or(wasmLoadingType); -export type WasmLoading = z.infer; +const wasmLoading = z + .literal(false) + .or(wasmLoadingType) satisfies z.ZodType; -const scriptType = z.enum(["text/javascript", "module"]).or(z.literal(false)); -export type ScriptType = z.infer; +const scriptType = z + .enum(["text/javascript", "module"]) + .or(z.literal(false)) satisfies z.ZodType; const libraryCustomUmdObject = z.strictObject({ amd: z.string().optional(), commonjs: z.string().optional(), root: z.string().or(z.array(z.string())).optional() -}); -export type LibraryCustomUmdObject = z.infer; +}) satisfies z.ZodType; const libraryName = z .string() .or(z.array(z.string())) - .or(libraryCustomUmdObject); -export type LibraryName = z.infer; + .or(libraryCustomUmdObject) satisfies z.ZodType; const libraryCustomUmdCommentObject = z.strictObject({ amd: z.string().optional(), commonjs: z.string().optional(), commonjs2: z.string().optional(), root: z.string().optional() -}); -export type LibraryCustomUmdCommentObject = z.infer< - typeof libraryCustomUmdCommentObject ->; +}) satisfies z.ZodType; -const amdContainer = z.string(); -export type AmdContainer = z.infer; +const amdContainer = z.string() satisfies z.ZodType; -const auxiliaryComment = z.string().or(libraryCustomUmdCommentObject); -export type AuxiliaryComment = z.infer; +const auxiliaryComment = z + .string() + .or(libraryCustomUmdCommentObject) satisfies z.ZodType; -const libraryExport = z.string().or(z.array(z.string())); -export type LibraryExport = z.infer; +const libraryExport = z + .string() + .or(z.array(z.string())) satisfies z.ZodType; const libraryType = z .enum([ @@ -141,11 +133,9 @@ const libraryType = z "jsonp", "system" ]) - .or(z.string()); -export type LibraryType = z.infer; + .or(z.string()) satisfies z.ZodType; -const umdNamedDefine = z.boolean(); -export type UmdNamedDefine = z.infer; +const umdNamedDefine = z.boolean() satisfies z.ZodType; const libraryOptions = z.strictObject({ amdContainer: amdContainer.optional(), @@ -154,26 +144,27 @@ const libraryOptions = z.strictObject({ name: libraryName.optional(), type: libraryType, umdNamedDefine: umdNamedDefine.optional() -}); -export type LibraryOptions = z.infer; +}) satisfies z.ZodType; -const library = libraryName.or(libraryOptions).optional(); -export type Library = z.infer; +const library = libraryName + .or(libraryOptions) + .optional() satisfies z.ZodType; -const layer = z.string().or(z.null()); -export type Layer = z.infer; +const layer = z.string().or(z.null()) satisfies z.ZodType; -const entryFilename = filename; -export type EntryFilename = z.infer; +const entryFilename = filename satisfies z.ZodType; -const entryRuntime = z.literal(false).or(z.string()); -export type EntryRuntime = z.infer; +const entryRuntime = z + .literal(false) + .or(z.string()) satisfies z.ZodType; -const entryItem = z.string().or(z.array(z.string())); -export type EntryItem = z.infer; +const entryItem = z + .string() + .or(z.array(z.string())) satisfies z.ZodType; -const entryDependOn = z.string().or(z.array(z.string())); -export type EntryDependOn = z.infer; +const entryDependOn = z + .string() + .or(z.array(z.string())) satisfies z.ZodType; const entryDescription = z.strictObject({ import: entryItem, @@ -187,25 +178,25 @@ const entryDescription = z.strictObject({ library: libraryOptions.optional(), dependOn: entryDependOn.optional(), layer: layer.optional() -}); -export type EntryDescription = z.infer; +}) satisfies z.ZodType; -const entryUnnamed = entryItem; -export type EntryUnnamed = z.infer; +const entryUnnamed = entryItem satisfies z.ZodType; -const entryObject = z.record(entryItem.or(entryDescription)); -export type EntryObject = z.infer; +const entryObject = z.record( + entryItem.or(entryDescription) +) satisfies z.ZodType; -const entryStatic = entryObject.or(entryUnnamed); -export type EntryStatic = z.infer; +const entryStatic = entryObject.or( + entryUnnamed +) satisfies z.ZodType; const entryDynamic = z .function() - .returns(entryStatic.or(z.promise(entryStatic))); -export type EntryDynamic = z.infer; + .returns( + entryStatic.or(z.promise(entryStatic)) + ) satisfies z.ZodType; -const entry = entryStatic.or(entryDynamic); -export type Entry = z.infer; +const entry = entryStatic.or(entryDynamic) satisfies z.ZodType; //#endregion //#region Output