diff --git a/packages/rspack/etc/api.md b/packages/rspack/etc/api.md index 5856be26100..53cfca15825 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; - commonjs2?: string | undefined; - root?: string | undefined; -}, { - commonjs?: string | undefined; - amd?: string | undefined; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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[]; @@ -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,568 +1871,35 @@ const EnableWasmLoadingPlugin: { // @public (undocumented) type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; +// @public +export type Entry = EntryStatic | EntryDynamic; + // @public (undocumented) -export type Entry = z.infer; - -// @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; - commonjs2?: string | undefined; - root?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; -} +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 +export type EntryDependOn = string | string[]; // @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; - commonjs2?: string | undefined; - root?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}>; +export type EntryDescription = { + import: EntryItem; + runtime?: EntryRuntime; + publicPath?: PublicPath; + baseUri?: BaseUri; + chunkLoading?: ChunkLoading; + asyncChunks?: AsyncChunks; + wasmLoading?: WasmLoading; + filename?: EntryFilename; + library?: LibraryOptions; + dependOn?: EntryDependOn; + layer?: Layer; +}; // @public (undocumented) export interface EntryDescriptionNormalized { @@ -2498,452 +1910,38 @@ export interface EntryDescriptionNormalized { // (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; - commonjs2?: string | undefined; - root?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}>]>>; + 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 { @@ -2989,151 +1987,11 @@ class Entrypoint extends ChunkGroup { 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 +export type EntryRuntime = false | string; -// @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; - commonjs2?: string | undefined; - root?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; - } | undefined; - dependOn?: string | string[] | undefined; -}>]>>, z.ZodUnion<[z.ZodString, z.ZodArray]>]>; +// @public +export type EntryStatic = EntryObject | EntryUnnamed; // @public (undocumented) export interface EntryStaticNormalized { @@ -3142,10 +2000,7 @@ export interface EntryStaticNormalized { } // @public (undocumented) -export type EntryUnnamed = z.infer; - -// @public (undocumented) -const entryUnnamed: z.ZodUnion<[z.ZodString, z.ZodArray]>; +export type EntryUnnamed = EntryItem; // @public (undocumented) export type Environment = z.infer; @@ -3667,10 +2522,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: { @@ -3684,16 +2536,10 @@ const FetchCompileAsyncWasmPlugin: { }; // @public (undocumented) -export type Filename = z.infer; - -// @public (undocumented) -const filename: z.ZodUnion<[z.ZodString, z.ZodFunction, z.ZodOptional>], z.ZodUnknown>, z.ZodString>]>; - -// @public (undocumented) -export type FilenameTemplate = z.infer; +export type Filename = FilenameTemplate | ((pathData: PathData, assetInfo?: JsAssetInfo) => string); // @public (undocumented) -const filenameTemplate: z.ZodString; +export type FilenameTemplate = string; // @public (undocumented) interface FileSystemInfoEntry { @@ -5100,11 +3946,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; @@ -5184,265 +4027,77 @@ const lazyCompilationOptions: z.ZodObject<{ backlog?: number | undefined; exclusive?: boolean | undefined; readableAll?: boolean | undefined; - writableAll?: boolean | undefined; - ipv6Only?: boolean | undefined; - } | undefined; - protocol?: "http" | "https" | undefined; - } | undefined; - imports?: boolean | undefined; -}, { - entries?: boolean | undefined; - test?: RegExp | ((args_0: Module, ...args_1: unknown[]) => boolean) | undefined; - backend?: { - client?: string | undefined; - listen?: number | { - path?: string | undefined; - port?: number | undefined; - host?: string | undefined; - backlog?: number | undefined; - exclusive?: boolean | undefined; - readableAll?: boolean | undefined; - writableAll?: boolean | undefined; - ipv6Only?: boolean | undefined; - } | undefined; - protocol?: "http" | "https" | undefined; - } | undefined; - imports?: boolean | undefined; -}>; - -// @public (undocumented) -export type Library = z.infer; - -// @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; - commonjs2?: string | undefined; - root?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: string | undefined; + writableAll?: boolean | undefined; + ipv6Only?: boolean | undefined; + } | undefined; + protocol?: "http" | "https" | 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; - commonjs2?: string | undefined; - root?: string | undefined; + imports?: boolean | undefined; }, { - commonjs?: string | undefined; - amd?: string | undefined; - commonjs2?: string | undefined; - root?: string | undefined; + entries?: boolean | undefined; + test?: RegExp | ((args_0: Module, ...args_1: unknown[]) => boolean) | undefined; + backend?: { + client?: string | undefined; + listen?: number | { + path?: string | undefined; + port?: number | undefined; + host?: string | undefined; + backlog?: number | undefined; + exclusive?: boolean | undefined; + readableAll?: boolean | undefined; + writableAll?: boolean | undefined; + ipv6Only?: boolean | undefined; + } | undefined; + protocol?: "http" | "https" | undefined; + } | undefined; + imports?: boolean | 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 +export type Library = LibraryName | LibraryOptions | undefined; // @public (undocumented) -export type LibraryExport = z.infer; +export const library: Library_2; // @public (undocumented) -const libraryExport: z.ZodUnion<[z.ZodString, z.ZodArray]>; +interface Library_2 { + // (undocumented) + EnableLibraryPlugin: typeof EnableLibraryPlugin; +} // @public (undocumented) -export type LibraryName = z.infer; +export type LibraryCustomUmdCommentObject = { + amd?: string; + commonjs?: string; + commonjs2?: string; + root?: string; +}; // @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; -}>]>; +export type LibraryCustomUmdObject = { + amd?: string; + commonjs?: string; + root?: string | string[]; +}; -// @public (undocumented) -export type LibraryOptions = z.infer; +// @public +export type LibraryExport = string | string[]; -// @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; - commonjs2?: string | undefined; - root?: string | undefined; - }, { - commonjs?: string | undefined; - amd?: string | undefined; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: 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; - commonjs2?: string | undefined; - root?: string | undefined; - } | undefined; - export?: string | string[] | undefined; - umdNamedDefine?: boolean | undefined; -}>; +// @public +export type LibraryName = string | string[] | LibraryCustomUmdObject; -// @public (undocumented) -export type LibraryType = z.infer; +// @public +export type LibraryOptions = { + amdContainer?: AmdContainer; + auxiliaryComment?: AuxiliaryComment; + export?: LibraryExport; + name?: LibraryName; + type: LibraryType; + umdNamedDefine?: UmdNamedDefine; +}; -// @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]>; +// @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 = { @@ -5867,11 +4522,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 { @@ -6952,11 +5604,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; @@ -8017,8 +6666,8 @@ 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; @@ -8112,8 +6761,8 @@ 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; @@ -9292,11 +7941,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; @@ -9775,42 +8421,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, @@ -9926,6 +8536,42 @@ declare namespace rspackExports { rspackOptions, RspackOptions, Configuration, + 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, ResolveAlias, ResolveTsConfig, ResolveOptions, @@ -10598,8 +9244,8 @@ 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; @@ -10693,8 +9339,8 @@ 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; @@ -12933,8 +11579,8 @@ 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; @@ -13061,7 +11707,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" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "jsonp" | "import" | "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; @@ -13075,7 +11721,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" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "jsonp" | "import" | "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; @@ -13083,7 +11729,7 @@ export const rspackOptions: z.ZodObject<{ issuer: string; } | undefined; }, ...args_1: unknown[]) => Promise>))[] | undefined; - externalsType?: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "jsonp" | "import" | "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; @@ -13515,8 +12161,8 @@ 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; @@ -13643,7 +12289,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" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "jsonp" | "import" | "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; @@ -13657,7 +12303,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" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "jsonp" | "import" | "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; @@ -13665,7 +12311,7 @@ export const rspackOptions: z.ZodObject<{ issuer: string; } | undefined; }, ...args_1: unknown[]) => Promise>))[] | undefined; - externalsType?: "module" | "global" | "system" | "promise" | "commonjs" | "umd" | "amd" | "var" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "jsonp" | "import" | "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; @@ -14207,10 +12853,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; @@ -15178,6 +13821,42 @@ interface SystemjsConfig { declare namespace t { export { + 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, ResolveAlias, ResolveTsConfig, ResolveOptions, @@ -15431,11 +14110,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; @@ -15466,17 +14142,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 87b27fcea8c..5dadd5b19e0 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 902b7868095..76e5559549b 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