@rspack/core 1.3.13 → 1.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiled/webpack-sources/index.js +112 -132
- package/compiled/webpack-sources/package.json +1 -1
- package/compiled/webpack-sources/types.d.ts +8 -6
- package/compiled/zod/dist/types/v3/types.d.ts +2 -2
- package/compiled/zod/dist/types/v4/classic/coerce.d.ts +5 -5
- package/compiled/zod/dist/types/v4/classic/external.d.ts +6 -1
- package/compiled/zod/dist/types/v4/classic/schemas.d.ts +88 -130
- package/compiled/zod/dist/types/v4/core/api.d.ts +2 -2
- package/compiled/zod/dist/types/v4/core/core.d.ts +11 -7
- package/compiled/zod/dist/types/v4/core/errors.d.ts +0 -1
- package/compiled/zod/dist/types/v4/core/function.d.ts +16 -11
- package/compiled/zod/dist/types/v4/core/regexes.d.ts +0 -1
- package/compiled/zod/dist/types/v4/core/registries.d.ts +6 -1
- package/compiled/zod/dist/types/v4/core/schemas.d.ts +144 -116
- package/compiled/zod/dist/types/v4/core/util.d.ts +5 -9
- package/compiled/zod/dist/types/v4/locales/ar.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/az.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/be.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ca.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/cs.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/de.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/en.d.ts +0 -2
- package/compiled/zod/dist/types/v4/locales/es.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/fa.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/fi.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/{frCA.d.ts → fr-CA.d.ts} +0 -3
- package/compiled/zod/dist/types/v4/locales/fr.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/he.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/hu.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/id.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/index.d.ts +5 -2
- package/compiled/zod/dist/types/v4/locales/it.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ja.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/{zh-tw.d.ts → kh.d.ts} +0 -3
- package/compiled/zod/dist/types/v4/locales/ko.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/mk.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ms.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/nl.d.ts +4 -0
- package/compiled/zod/dist/types/v4/locales/no.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ota.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/pl.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/pt.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ru.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/sl.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/sv.d.ts +4 -0
- package/compiled/zod/dist/types/v4/locales/ta.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/th.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/tr.d.ts +0 -2
- package/compiled/zod/dist/types/v4/locales/ua.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ur.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/vi.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/zh-CN.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/zh-TW.d.ts +4 -0
- package/compiled/zod/dist/types/v4/mini/external.d.ts +5 -1
- package/compiled/zod/dist/types/v4/mini/schemas.d.ts +39 -48
- package/compiled/zod/index.js +41 -63
- package/compiled/zod/package.json +1 -1
- package/compiled/zod/v3/index.d.ts +3 -1
- package/compiled/zod/v4/core/index.d.ts +1 -1
- package/compiled/zod/v4/index.d.ts +3 -1
- package/compiled/zod/v4/locales/index.d.ts +1 -1
- package/compiled/zod/v4-mini/index.d.ts +1 -1
- package/dist/ErrorHelpers.d.ts +0 -15
- package/dist/Module.d.ts +5 -1
- package/dist/ModuleTypeConstants.d.ts +0 -85
- package/dist/Resolver.d.ts +2 -1
- package/dist/RspackError.d.ts +0 -3
- package/dist/builtin-loader/lightningcss/index.d.ts +23 -1
- package/dist/builtin-loader/swc/types.d.ts +289 -2426
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BannerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ContextReplacementPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DllReferenceAgencyPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagAllModulesAsUsedPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LibManifestPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LightningCssMinimizerRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleInfoHeaderPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/OccurrenceChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveDuplicateModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RstestPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SubresourceIntegrityPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/base.d.ts +1 -2
- package/dist/builtin-plugin/html-plugin/plugin.d.ts +1 -1
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.d.ts +1 -1
- package/dist/config/zod.d.ts +370 -370
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/index.js +57 -30
- package/dist/lib/AbstractMethodError.d.ts +0 -1
- package/dist/lib/CacheFacade.d.ts +0 -28
- package/dist/loader-runner/index.d.ts +1 -0
- package/dist/stats/statsFactoryUtils.d.ts +0 -4
- package/dist/util/cleverMerge.d.ts +0 -30
- package/dist/util/comparators.d.ts +0 -4
- package/dist/util/hash/wasm-hash.d.ts +0 -1
- package/dist/util/identifier.d.ts +0 -12
- package/dist/util/index.d.ts +1 -7
- package/dist/util/memoize.d.ts +0 -1
- package/dist/worker.js +5 -7
- package/package.json +5 -5
- package/dist/util/hash/BatchedHash.d.ts +0 -25
@@ -20,16 +20,20 @@ export type $brand<T extends string | number | symbol = string | number | symbol
|
|
20
20
|
[k in T]: true;
|
21
21
|
};
|
22
22
|
};
|
23
|
-
export type $ZodBranded<T extends schemas
|
23
|
+
export type $ZodBranded<T extends schemas._$ZodType, Brand extends string | number | symbol> = T & Record<"_zod", Record<"output", output<T> & $brand<Brand>>>;
|
24
24
|
export declare class $ZodAsyncError extends Error {
|
25
25
|
constructor();
|
26
26
|
}
|
27
|
-
export type input<T
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
27
|
+
export type input<T> = T extends {
|
28
|
+
_zod: {
|
29
|
+
input: any;
|
30
|
+
};
|
31
|
+
} ? Required<T["_zod"]>["input"] : unknown;
|
32
|
+
export type output<T> = T extends {
|
33
|
+
_zod: {
|
34
|
+
output: any;
|
35
|
+
};
|
36
|
+
} ? Required<T["_zod"]>["output"] : unknown;
|
33
37
|
export type { output as infer };
|
34
38
|
export interface $ZodConfig {
|
35
39
|
/** Custom error map. Overrides `config().localeError`. */
|
@@ -132,7 +132,6 @@ type _FlattenedError<T, U = string> = {
|
|
132
132
|
[P in keyof T]?: U[];
|
133
133
|
};
|
134
134
|
};
|
135
|
-
/** @deprecated Use `z.treeifyError()` instead. */
|
136
135
|
export declare function flattenError<T>(error: $ZodError<T>): _FlattenedError<T>;
|
137
136
|
export declare function flattenError<T, U>(error: $ZodError<T>, mapper?: (issue: $ZodIssue) => U): _FlattenedError<T, U>;
|
138
137
|
type _ZodFormattedError<T, U = string> = T extends [any, ...any[]] ? {
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type * as core from "./core.js";
|
1
2
|
import * as schemas from "./schemas.js";
|
2
3
|
import { $ZodTuple } from "./schemas.js";
|
3
4
|
import type * as util from "./util.js";
|
@@ -7,12 +8,12 @@ export interface $ZodFunctionDef<In extends $ZodFunctionIn = $ZodFunctionIn, Out
|
|
7
8
|
output: Out;
|
8
9
|
}
|
9
10
|
export type $ZodFunctionArgs = schemas.$ZodType<unknown[], unknown[]>;
|
10
|
-
export type $ZodFunctionIn = $ZodFunctionArgs
|
11
|
-
export type $ZodFunctionOut = schemas.$ZodType
|
12
|
-
export type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args:
|
13
|
-
export type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args:
|
14
|
-
export type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args:
|
15
|
-
export type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args:
|
11
|
+
export type $ZodFunctionIn = $ZodFunctionArgs;
|
12
|
+
export type $ZodFunctionOut = schemas.$ZodType;
|
13
|
+
export type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : core.output<Args>) => core.input<Returns>;
|
14
|
+
export type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : core.output<Args>) => util.MaybeAsync<core.input<Returns>>;
|
15
|
+
export type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : core.input<Args>) => core.output<Returns>;
|
16
|
+
export type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : core.input<Args>) => util.MaybeAsync<core.output<Returns>>;
|
16
17
|
export declare class $ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn, Returns extends $ZodFunctionOut = $ZodFunctionOut> {
|
17
18
|
def: $ZodFunctionDef<Args, Returns>;
|
18
19
|
/** @deprecated */
|
@@ -20,9 +21,9 @@ export declare class $ZodFunction<Args extends $ZodFunctionIn = $ZodFunctionIn,
|
|
20
21
|
_input: $InferInnerFunctionType<Args, Returns>;
|
21
22
|
_output: $InferOuterFunctionType<Args, Returns>;
|
22
23
|
constructor(def: $ZodFunctionDef<Args, Returns>);
|
23
|
-
implement<F extends $InferInnerFunctionType<Args, Returns>>(func: F): F extends this["_output"] ? F : this["_output"]
|
24
|
+
implement<F extends $InferInnerFunctionType<Args, Returns>>(func: F): (...args: Parameters<this["_output"]>) => ReturnType<F> extends ReturnType<this["_output"]> ? ReturnType<F> : ReturnType<this["_output"]>;
|
24
25
|
implementAsync<F extends $InferInnerFunctionTypeAsync<Args, Returns>>(func: F): F extends $InferOuterFunctionTypeAsync<Args, Returns> ? F : $InferOuterFunctionTypeAsync<Args, Returns>;
|
25
|
-
input<const Items extends util.TupleItems, const Rest extends $ZodFunctionOut =
|
26
|
+
input<const Items extends util.TupleItems, const Rest extends $ZodFunctionOut = $ZodFunctionOut>(args: Items, rest?: Rest): $ZodFunction<schemas.$ZodTuple<Items, Rest>, Returns>;
|
26
27
|
input<NewArgs extends $ZodFunctionIn>(args: NewArgs): $ZodFunction<NewArgs, Returns>;
|
27
28
|
output<NewReturns extends schemas.$ZodType>(output: NewReturns): $ZodFunction<Args, NewReturns>;
|
28
29
|
}
|
@@ -33,13 +34,17 @@ export interface $ZodFunctionParams<I extends $ZodFunctionIn, O extends schemas.
|
|
33
34
|
declare function _function(): $ZodFunction;
|
34
35
|
declare function _function<const In extends Array<schemas.$ZodType> = Array<schemas.$ZodType>>(params: {
|
35
36
|
input: In;
|
36
|
-
}): $ZodFunction<$ZodTuple<In, null>,
|
37
|
+
}): $ZodFunction<$ZodTuple<In, null>, $ZodFunctionOut>;
|
38
|
+
declare function _function<const In extends Array<schemas.$ZodType> = Array<schemas.$ZodType>, const Out extends $ZodFunctionOut = $ZodFunctionOut>(params: {
|
39
|
+
input: In;
|
40
|
+
output: Out;
|
41
|
+
}): $ZodFunction<$ZodTuple<In, null>, Out>;
|
37
42
|
declare function _function<const In extends $ZodFunctionIn = $ZodFunctionIn>(params: {
|
38
43
|
input: In;
|
39
|
-
}): $ZodFunction<In,
|
44
|
+
}): $ZodFunction<In, $ZodFunctionOut>;
|
40
45
|
declare function _function<const Out extends $ZodFunctionOut = $ZodFunctionOut>(params: {
|
41
46
|
output: Out;
|
42
|
-
}): $ZodFunction
|
47
|
+
}): $ZodFunction<$ZodFunctionIn, Out>;
|
43
48
|
declare function _function<In extends $ZodFunctionIn = $ZodFunctionIn, Out extends schemas.$ZodType = schemas.$ZodType>(params?: {
|
44
49
|
input: In;
|
45
50
|
output: Out;
|
@@ -32,7 +32,6 @@ export declare const ipv4: RegExp;
|
|
32
32
|
export declare const ipv6: RegExp;
|
33
33
|
export declare const cidrv4: RegExp;
|
34
34
|
export declare const cidrv6: RegExp;
|
35
|
-
export declare const ip: RegExp;
|
36
35
|
export declare const base64: RegExp;
|
37
36
|
export declare const base64url: RegExp;
|
38
37
|
export declare const hostname: RegExp;
|
@@ -22,7 +22,12 @@ export interface JSONSchemaMeta {
|
|
22
22
|
id?: string | undefined;
|
23
23
|
title?: string | undefined;
|
24
24
|
description?: string | undefined;
|
25
|
-
|
25
|
+
example?: unknown | undefined;
|
26
|
+
examples?: unknown[] | Record<string, {
|
27
|
+
value: unknown;
|
28
|
+
[k: string]: unknown;
|
29
|
+
}> | undefined;
|
30
|
+
deprecated?: boolean | undefined;
|
26
31
|
[k: string]: unknown;
|
27
32
|
}
|
28
33
|
export interface GlobalMeta extends JSONSchemaMeta {
|