@rspack-debug/core 1.3.14 → 1.4.0
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/README.md +1 -1
- package/compiled/@swc/types/index.d.ts +18 -2
- package/compiled/@swc/types/package.json +1 -1
- package/compiled/tinypool/README.md +4 -196
- package/compiled/tinypool/dist/common-Qw-RoVFD.js +28 -0
- package/compiled/tinypool/dist/entry/process.d.ts +1 -2
- package/compiled/tinypool/dist/entry/process.js +63 -83
- package/compiled/tinypool/dist/entry/utils.d.ts +3 -1
- package/compiled/tinypool/dist/entry/utils.js +3 -9
- package/compiled/tinypool/dist/entry/worker.d.ts +1 -2
- package/compiled/tinypool/dist/entry/worker.js +66 -94
- package/compiled/tinypool/dist/index.d.ts +132 -125
- package/compiled/tinypool/dist/index.js +771 -1035
- package/compiled/tinypool/dist/utils-B--2TaWv.js +38 -0
- package/compiled/tinypool/dist/utils-De75vAgL.js +10 -0
- package/compiled/tinypool/package.json +6 -22
- 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/dist/BuildInfo.d.ts +17 -0
- package/dist/FileSystem.d.ts +26 -3
- package/dist/Module.d.ts +1 -14
- package/dist/MultiCompiler.d.ts +4 -1
- package/dist/MultiWatching.d.ts +1 -0
- package/dist/Resolver.d.ts +2 -1
- package/dist/builtin-loader/swc/collectTypeScriptInfo.d.ts +8 -0
- package/dist/builtin-loader/swc/index.d.ts +2 -0
- package/dist/builtin-loader/swc/pluginImport.d.ts +1 -36
- package/dist/builtin-loader/swc/types.d.ts +163 -2000
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +4 -2
- package/dist/builtin-plugin/RslibPlugin.d.ts +11 -0
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +2 -1
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +3 -3
- package/dist/config/devServer.d.ts +10 -10
- package/dist/config/normalization.d.ts +4 -1
- package/dist/config/types.d.ts +31 -4
- package/dist/config/utils.d.ts +3 -16
- package/dist/config/zod.d.ts +689 -3924
- package/dist/cssExtractLoader.js +5 -5
- package/dist/exports.d.ts +9 -3
- package/dist/index.js +4751 -2034
- package/dist/loader-runner/index.d.ts +0 -9
- package/dist/swc.d.ts +2 -0
- package/dist/trace/index.d.ts +16 -18
- package/dist/util/validate.d.ts +3 -3
- package/dist/worker.js +2 -2
- package/module.d.ts +1 -1
- package/package.json +11 -11
- package/compiled/enhanced-resolve/CachedInputFileSystem.d.ts +0 -0
- package/compiled/enhanced-resolve/CachedInputFileSystem.js +0 -664
- package/compiled/enhanced-resolve/index.d.ts +0 -1124
- package/compiled/enhanced-resolve/license +0 -20
- package/compiled/enhanced-resolve/package.json +0 -1
- package/compiled/tinypool/dist/chunk-6LX4VMOV.js +0 -31
- package/compiled/tinypool/dist/chunk-ACQHDOFQ.js +0 -12
- package/compiled/tinypool/dist/chunk-E2J7JLFN.js +0 -53
- package/compiled/tinypool/dist/chunk-UBWFVGJX.js +0 -38
- package/compiled/zod/dist/types/index.d.ts +0 -3
- package/compiled/zod/dist/types/v3/ZodError.d.ts +0 -164
- package/compiled/zod/dist/types/v3/benchmarks/datetime.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/discriminatedUnion.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/index.d.ts +0 -1
- package/compiled/zod/dist/types/v3/benchmarks/ipv4.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/object.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/primitives.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/realworld.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/string.d.ts +0 -5
- package/compiled/zod/dist/types/v3/benchmarks/union.d.ts +0 -5
- package/compiled/zod/dist/types/v3/errors.d.ts +0 -5
- package/compiled/zod/dist/types/v3/external.d.ts +0 -6
- package/compiled/zod/dist/types/v3/helpers/enumUtil.d.ts +0 -8
- package/compiled/zod/dist/types/v3/helpers/errorUtil.d.ts +0 -9
- package/compiled/zod/dist/types/v3/helpers/parseUtil.d.ts +0 -78
- package/compiled/zod/dist/types/v3/helpers/partialUtil.d.ts +0 -8
- package/compiled/zod/dist/types/v3/helpers/typeAliases.d.ts +0 -2
- package/compiled/zod/dist/types/v3/helpers/util.d.ts +0 -85
- package/compiled/zod/dist/types/v3/index.d.ts +0 -4
- package/compiled/zod/dist/types/v3/locales/en.d.ts +0 -3
- package/compiled/zod/dist/types/v3/standard-schema.d.ts +0 -102
- package/compiled/zod/dist/types/v3/tests/Mocker.d.ts +0 -17
- package/compiled/zod/dist/types/v3/types.d.ts +0 -1031
- package/compiled/zod/dist/types/v4/classic/checks.d.ts +0 -1
- package/compiled/zod/dist/types/v4/classic/coerce.d.ts +0 -17
- package/compiled/zod/dist/types/v4/classic/compat.d.ts +0 -48
- package/compiled/zod/dist/types/v4/classic/errors.d.ts +0 -30
- package/compiled/zod/dist/types/v4/classic/external.d.ts +0 -13
- package/compiled/zod/dist/types/v4/classic/index.d.ts +0 -4
- package/compiled/zod/dist/types/v4/classic/iso.d.ts +0 -22
- package/compiled/zod/dist/types/v4/classic/parse.d.ts +0 -23
- package/compiled/zod/dist/types/v4/classic/schemas.d.ts +0 -619
- package/compiled/zod/dist/types/v4/core/api.d.ts +0 -273
- package/compiled/zod/dist/types/v4/core/checks.d.ts +0 -277
- package/compiled/zod/dist/types/v4/core/config.d.ts +0 -9
- package/compiled/zod/dist/types/v4/core/core.d.ts +0 -47
- package/compiled/zod/dist/types/v4/core/doc.d.ts +0 -14
- package/compiled/zod/dist/types/v4/core/errors.d.ts +0 -204
- package/compiled/zod/dist/types/v4/core/function.d.ts +0 -52
- package/compiled/zod/dist/types/v4/core/index.d.ts +0 -15
- package/compiled/zod/dist/types/v4/core/json-schema.d.ts +0 -100
- package/compiled/zod/dist/types/v4/core/parse.d.ts +0 -25
- package/compiled/zod/dist/types/v4/core/regexes.d.ts +0 -62
- package/compiled/zod/dist/types/v4/core/registries.d.ts +0 -37
- package/compiled/zod/dist/types/v4/core/schemas.d.ts +0 -1011
- package/compiled/zod/dist/types/v4/core/standard-schema.d.ts +0 -55
- package/compiled/zod/dist/types/v4/core/to-json-schema.d.ts +0 -84
- package/compiled/zod/dist/types/v4/core/util.d.ts +0 -182
- package/compiled/zod/dist/types/v4/core/versions.d.ts +0 -5
- package/compiled/zod/dist/types/v4/core/zsf.d.ts +0 -91
- package/compiled/zod/dist/types/v4/index.d.ts +0 -3
- package/compiled/zod/dist/types/v4/locales/ar.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/az.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/be.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ca.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/cs.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/de.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/en.d.ts +0 -5
- package/compiled/zod/dist/types/v4/locales/es.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/fa.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/fi.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/fr-CA.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/fr.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/he.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/hu.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/id.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/index.d.ts +0 -37
- package/compiled/zod/dist/types/v4/locales/it.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ja.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/kh.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ko.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/mk.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ms.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/nl.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/no.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ota.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/pl.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/pt.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ru.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/sl.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/sv.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ta.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/th.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/tr.d.ts +0 -5
- package/compiled/zod/dist/types/v4/locales/ua.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/ur.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/vi.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/zh-CN.d.ts +0 -4
- package/compiled/zod/dist/types/v4/locales/zh-TW.d.ts +0 -4
- package/compiled/zod/dist/types/v4/mini/checks.d.ts +0 -1
- package/compiled/zod/dist/types/v4/mini/coerce.d.ts +0 -7
- package/compiled/zod/dist/types/v4/mini/external.d.ts +0 -11
- package/compiled/zod/dist/types/v4/mini/index.d.ts +0 -3
- package/compiled/zod/dist/types/v4/mini/iso.d.ts +0 -22
- package/compiled/zod/dist/types/v4/mini/parse.d.ts +0 -1
- package/compiled/zod/dist/types/v4/mini/schemas.d.ts +0 -398
- package/compiled/zod/index.js +0 -4513
- package/compiled/zod/license +0 -21
- package/compiled/zod/package.json +0 -1
- package/compiled/zod/v3/index.d.ts +0 -3
- package/compiled/zod/v4/core/index.d.ts +0 -1
- package/compiled/zod/v4/index.d.ts +0 -3
- package/compiled/zod/v4/locales/en.d.ts +0 -2
- package/compiled/zod/v4/locales/index.d.ts +0 -1
- package/compiled/zod/v4-mini/index.d.ts +0 -1
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
Copyright JS Foundation and other contributors
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
-
a copy of this software and associated documentation files (the
|
|
5
|
-
'Software'), to deal in the Software without restriction, including
|
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
-
the following conditions:
|
|
10
|
-
|
|
11
|
-
The above copyright notice and this permission notice shall be
|
|
12
|
-
included in all copies or substantial portions of the Software.
|
|
13
|
-
|
|
14
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
17
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
18
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
19
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
20
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name":"enhanced-resolve","author":"Tobias Koppers @sokra","version":"5.18.1","license":"MIT","types":"index.d.ts","type":"commonjs"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
|
-
var __accessCheck = (obj, member, msg) => {
|
|
8
|
-
if (!member.has(obj))
|
|
9
|
-
throw TypeError("Cannot " + msg);
|
|
10
|
-
};
|
|
11
|
-
var __privateGet = (obj, member, getter) => {
|
|
12
|
-
__accessCheck(obj, member, "read from private field");
|
|
13
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
14
|
-
};
|
|
15
|
-
var __privateAdd = (obj, member, value) => {
|
|
16
|
-
if (member.has(obj))
|
|
17
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
18
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
19
|
-
};
|
|
20
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
21
|
-
__accessCheck(obj, member, "write to private field");
|
|
22
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
23
|
-
return value;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export {
|
|
27
|
-
__publicField,
|
|
28
|
-
__privateGet,
|
|
29
|
-
__privateAdd,
|
|
30
|
-
__privateSet
|
|
31
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
// src/entry/utils.ts
|
|
2
|
-
import { pathToFileURL } from "url";
|
|
3
|
-
var importESMCached;
|
|
4
|
-
function getImportESM() {
|
|
5
|
-
if (importESMCached === void 0) {
|
|
6
|
-
importESMCached = new Function(
|
|
7
|
-
"specifier",
|
|
8
|
-
"return import(specifier)"
|
|
9
|
-
);
|
|
10
|
-
}
|
|
11
|
-
return importESMCached;
|
|
12
|
-
}
|
|
13
|
-
var handlerCache = /* @__PURE__ */ new Map();
|
|
14
|
-
async function getHandler(filename, name) {
|
|
15
|
-
let handler = handlerCache.get(`${filename}/${name}`);
|
|
16
|
-
if (handler !== void 0) {
|
|
17
|
-
return handler;
|
|
18
|
-
}
|
|
19
|
-
try {
|
|
20
|
-
const handlerModule = await import(filename);
|
|
21
|
-
handler = typeof handlerModule.default !== "function" && handlerModule.default || handlerModule;
|
|
22
|
-
if (typeof handler !== "function") {
|
|
23
|
-
handler = await handler[name];
|
|
24
|
-
}
|
|
25
|
-
} catch {
|
|
26
|
-
}
|
|
27
|
-
if (typeof handler !== "function") {
|
|
28
|
-
handler = await getImportESM()(pathToFileURL(filename).href);
|
|
29
|
-
if (typeof handler !== "function") {
|
|
30
|
-
handler = await handler[name];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
if (typeof handler !== "function") {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
if (handlerCache.size > 1e3) {
|
|
37
|
-
const [handler2] = handlerCache;
|
|
38
|
-
const key = handler2[0];
|
|
39
|
-
handlerCache.delete(key);
|
|
40
|
-
}
|
|
41
|
-
handlerCache.set(`${filename}/${name}`, handler);
|
|
42
|
-
return handler;
|
|
43
|
-
}
|
|
44
|
-
function throwInNextTick(error) {
|
|
45
|
-
process.nextTick(() => {
|
|
46
|
-
throw error;
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export {
|
|
51
|
-
getHandler,
|
|
52
|
-
throwInNextTick
|
|
53
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// src/common.ts
|
|
2
|
-
var kMovable = Symbol("Tinypool.kMovable");
|
|
3
|
-
var kTransferable = Symbol.for("Tinypool.transferable");
|
|
4
|
-
var kValue = Symbol.for("Tinypool.valueOf");
|
|
5
|
-
var kQueueOptions = Symbol.for("Tinypool.queueOptions");
|
|
6
|
-
function isTransferable(value) {
|
|
7
|
-
return value != null && typeof value === "object" && kTransferable in value && kValue in value;
|
|
8
|
-
}
|
|
9
|
-
function isMovable(value) {
|
|
10
|
-
return isTransferable(value) && value[kMovable] === true;
|
|
11
|
-
}
|
|
12
|
-
function markMovable(value) {
|
|
13
|
-
Object.defineProperty(value, kMovable, {
|
|
14
|
-
enumerable: false,
|
|
15
|
-
configurable: true,
|
|
16
|
-
writable: true,
|
|
17
|
-
value: true
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
function isTaskQueue(value) {
|
|
21
|
-
return typeof value === "object" && value !== null && "size" in value && typeof value.shift === "function" && typeof value.remove === "function" && typeof value.push === "function";
|
|
22
|
-
}
|
|
23
|
-
var kRequestCountField = 0;
|
|
24
|
-
var kResponseCountField = 1;
|
|
25
|
-
var kFieldCount = 2;
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
kTransferable,
|
|
29
|
-
kValue,
|
|
30
|
-
kQueueOptions,
|
|
31
|
-
isTransferable,
|
|
32
|
-
isMovable,
|
|
33
|
-
markMovable,
|
|
34
|
-
isTaskQueue,
|
|
35
|
-
kRequestCountField,
|
|
36
|
-
kResponseCountField,
|
|
37
|
-
kFieldCount
|
|
38
|
-
};
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import type { Primitive } from "./helpers/typeAliases.js";
|
|
2
|
-
import { util, type ZodParsedType } from "./helpers/util.js";
|
|
3
|
-
import type { TypeOf, ZodType } from "./index.js";
|
|
4
|
-
type allKeys<T> = T extends any ? keyof T : never;
|
|
5
|
-
export type inferFlattenedErrors<T extends ZodType<any, any, any>, U = string> = typeToFlattenedError<TypeOf<T>, U>;
|
|
6
|
-
export type typeToFlattenedError<T, U = string> = {
|
|
7
|
-
formErrors: U[];
|
|
8
|
-
fieldErrors: {
|
|
9
|
-
[P in allKeys<T>]?: U[];
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export declare const ZodIssueCode: {
|
|
13
|
-
invalid_type: "invalid_type";
|
|
14
|
-
invalid_literal: "invalid_literal";
|
|
15
|
-
custom: "custom";
|
|
16
|
-
invalid_union: "invalid_union";
|
|
17
|
-
invalid_union_discriminator: "invalid_union_discriminator";
|
|
18
|
-
invalid_enum_value: "invalid_enum_value";
|
|
19
|
-
unrecognized_keys: "unrecognized_keys";
|
|
20
|
-
invalid_arguments: "invalid_arguments";
|
|
21
|
-
invalid_return_type: "invalid_return_type";
|
|
22
|
-
invalid_date: "invalid_date";
|
|
23
|
-
invalid_string: "invalid_string";
|
|
24
|
-
too_small: "too_small";
|
|
25
|
-
too_big: "too_big";
|
|
26
|
-
invalid_intersection_types: "invalid_intersection_types";
|
|
27
|
-
not_multiple_of: "not_multiple_of";
|
|
28
|
-
not_finite: "not_finite";
|
|
29
|
-
};
|
|
30
|
-
export type ZodIssueCode = keyof typeof ZodIssueCode;
|
|
31
|
-
export type ZodIssueBase = {
|
|
32
|
-
path: (string | number)[];
|
|
33
|
-
message?: string | undefined;
|
|
34
|
-
};
|
|
35
|
-
export interface ZodInvalidTypeIssue extends ZodIssueBase {
|
|
36
|
-
code: typeof ZodIssueCode.invalid_type;
|
|
37
|
-
expected: ZodParsedType;
|
|
38
|
-
received: ZodParsedType;
|
|
39
|
-
}
|
|
40
|
-
export interface ZodInvalidLiteralIssue extends ZodIssueBase {
|
|
41
|
-
code: typeof ZodIssueCode.invalid_literal;
|
|
42
|
-
expected: unknown;
|
|
43
|
-
received: unknown;
|
|
44
|
-
}
|
|
45
|
-
export interface ZodUnrecognizedKeysIssue extends ZodIssueBase {
|
|
46
|
-
code: typeof ZodIssueCode.unrecognized_keys;
|
|
47
|
-
keys: string[];
|
|
48
|
-
}
|
|
49
|
-
export interface ZodInvalidUnionIssue extends ZodIssueBase {
|
|
50
|
-
code: typeof ZodIssueCode.invalid_union;
|
|
51
|
-
unionErrors: ZodError[];
|
|
52
|
-
}
|
|
53
|
-
export interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
|
|
54
|
-
code: typeof ZodIssueCode.invalid_union_discriminator;
|
|
55
|
-
options: Primitive[];
|
|
56
|
-
}
|
|
57
|
-
export interface ZodInvalidEnumValueIssue extends ZodIssueBase {
|
|
58
|
-
received: string | number;
|
|
59
|
-
code: typeof ZodIssueCode.invalid_enum_value;
|
|
60
|
-
options: (string | number)[];
|
|
61
|
-
}
|
|
62
|
-
export interface ZodInvalidArgumentsIssue extends ZodIssueBase {
|
|
63
|
-
code: typeof ZodIssueCode.invalid_arguments;
|
|
64
|
-
argumentsError: ZodError;
|
|
65
|
-
}
|
|
66
|
-
export interface ZodInvalidReturnTypeIssue extends ZodIssueBase {
|
|
67
|
-
code: typeof ZodIssueCode.invalid_return_type;
|
|
68
|
-
returnTypeError: ZodError;
|
|
69
|
-
}
|
|
70
|
-
export interface ZodInvalidDateIssue extends ZodIssueBase {
|
|
71
|
-
code: typeof ZodIssueCode.invalid_date;
|
|
72
|
-
}
|
|
73
|
-
export type StringValidation = "email" | "url" | "emoji" | "uuid" | "nanoid" | "regex" | "cuid" | "cuid2" | "ulid" | "datetime" | "date" | "time" | "duration" | "ip" | "cidr" | "base64" | "jwt" | "base64url" | {
|
|
74
|
-
includes: string;
|
|
75
|
-
position?: number | undefined;
|
|
76
|
-
} | {
|
|
77
|
-
startsWith: string;
|
|
78
|
-
} | {
|
|
79
|
-
endsWith: string;
|
|
80
|
-
};
|
|
81
|
-
export interface ZodInvalidStringIssue extends ZodIssueBase {
|
|
82
|
-
code: typeof ZodIssueCode.invalid_string;
|
|
83
|
-
validation: StringValidation;
|
|
84
|
-
}
|
|
85
|
-
export interface ZodTooSmallIssue extends ZodIssueBase {
|
|
86
|
-
code: typeof ZodIssueCode.too_small;
|
|
87
|
-
minimum: number | bigint;
|
|
88
|
-
inclusive: boolean;
|
|
89
|
-
exact?: boolean;
|
|
90
|
-
type: "array" | "string" | "number" | "set" | "date" | "bigint";
|
|
91
|
-
}
|
|
92
|
-
export interface ZodTooBigIssue extends ZodIssueBase {
|
|
93
|
-
code: typeof ZodIssueCode.too_big;
|
|
94
|
-
maximum: number | bigint;
|
|
95
|
-
inclusive: boolean;
|
|
96
|
-
exact?: boolean;
|
|
97
|
-
type: "array" | "string" | "number" | "set" | "date" | "bigint";
|
|
98
|
-
}
|
|
99
|
-
export interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
|
|
100
|
-
code: typeof ZodIssueCode.invalid_intersection_types;
|
|
101
|
-
}
|
|
102
|
-
export interface ZodNotMultipleOfIssue extends ZodIssueBase {
|
|
103
|
-
code: typeof ZodIssueCode.not_multiple_of;
|
|
104
|
-
multipleOf: number | bigint;
|
|
105
|
-
}
|
|
106
|
-
export interface ZodNotFiniteIssue extends ZodIssueBase {
|
|
107
|
-
code: typeof ZodIssueCode.not_finite;
|
|
108
|
-
}
|
|
109
|
-
export interface ZodCustomIssue extends ZodIssueBase {
|
|
110
|
-
code: typeof ZodIssueCode.custom;
|
|
111
|
-
params?: {
|
|
112
|
-
[k: string]: any;
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
export type DenormalizedError = {
|
|
116
|
-
[k: string]: DenormalizedError | string[];
|
|
117
|
-
};
|
|
118
|
-
export type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodInvalidLiteralIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodNotFiniteIssue | ZodCustomIssue;
|
|
119
|
-
export type ZodIssue = ZodIssueOptionalMessage & {
|
|
120
|
-
fatal?: boolean | undefined;
|
|
121
|
-
message: string;
|
|
122
|
-
};
|
|
123
|
-
export declare const quotelessJson: (obj: any) => string;
|
|
124
|
-
type recursiveZodFormattedError<T> = T extends [any, ...any[]] ? {
|
|
125
|
-
[K in keyof T]?: ZodFormattedError<T[K]>;
|
|
126
|
-
} : T extends any[] ? {
|
|
127
|
-
[k: number]: ZodFormattedError<T[number]>;
|
|
128
|
-
} : T extends object ? {
|
|
129
|
-
[K in keyof T]?: ZodFormattedError<T[K]>;
|
|
130
|
-
} : unknown;
|
|
131
|
-
export type ZodFormattedError<T, U = string> = {
|
|
132
|
-
_errors: U[];
|
|
133
|
-
} & recursiveZodFormattedError<NonNullable<T>>;
|
|
134
|
-
export type inferFormattedError<T extends ZodType<any, any, any>, U = string> = ZodFormattedError<TypeOf<T>, U>;
|
|
135
|
-
export declare class ZodError<T = any> extends Error {
|
|
136
|
-
issues: ZodIssue[];
|
|
137
|
-
get errors(): ZodIssue[];
|
|
138
|
-
constructor(issues: ZodIssue[]);
|
|
139
|
-
format(): ZodFormattedError<T>;
|
|
140
|
-
format<U>(mapper: (issue: ZodIssue) => U): ZodFormattedError<T, U>;
|
|
141
|
-
static create: (issues: ZodIssue[]) => ZodError<any>;
|
|
142
|
-
static assert(value: unknown): asserts value is ZodError;
|
|
143
|
-
toString(): string;
|
|
144
|
-
get message(): string;
|
|
145
|
-
get isEmpty(): boolean;
|
|
146
|
-
addIssue: (sub: ZodIssue) => void;
|
|
147
|
-
addIssues: (subs?: ZodIssue[]) => void;
|
|
148
|
-
flatten(): typeToFlattenedError<T>;
|
|
149
|
-
flatten<U>(mapper?: (issue: ZodIssue) => U): typeToFlattenedError<T, U>;
|
|
150
|
-
get formErrors(): typeToFlattenedError<T, string>;
|
|
151
|
-
}
|
|
152
|
-
type stripPath<T extends object> = T extends any ? util.OmitKeys<T, "path"> : never;
|
|
153
|
-
export type IssueData = stripPath<ZodIssueOptionalMessage> & {
|
|
154
|
-
path?: (string | number)[];
|
|
155
|
-
fatal?: boolean | undefined;
|
|
156
|
-
};
|
|
157
|
-
export type ErrorMapCtx = {
|
|
158
|
-
defaultError: string;
|
|
159
|
-
data: any;
|
|
160
|
-
};
|
|
161
|
-
export type ZodErrorMap = (issue: ZodIssueOptionalMessage, _ctx: ErrorMapCtx) => {
|
|
162
|
-
message: string;
|
|
163
|
-
};
|
|
164
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare namespace enumUtil {
|
|
2
|
-
type UnionToIntersectionFn<T> = (T extends unknown ? (k: () => T) => void : never) extends (k: infer Intersection) => void ? Intersection : never;
|
|
3
|
-
type GetUnionLast<T> = UnionToIntersectionFn<T> extends () => infer Last ? Last : never;
|
|
4
|
-
type UnionToTuple<T, Tuple extends unknown[] = []> = [T] extends [never] ? Tuple : UnionToTuple<Exclude<T, GetUnionLast<T>>, [GetUnionLast<T>, ...Tuple]>;
|
|
5
|
-
type CastToStringTuple<T> = T extends [string, ...string[]] ? T : never;
|
|
6
|
-
export type UnionToTupleString<T> = CastToStringTuple<UnionToTuple<T>>;
|
|
7
|
-
export {};
|
|
8
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { IssueData, ZodErrorMap, ZodIssue } from "../ZodError.js";
|
|
2
|
-
import type { ZodParsedType } from "./util.js";
|
|
3
|
-
export declare const makeIssue: (params: {
|
|
4
|
-
data: any;
|
|
5
|
-
path: (string | number)[];
|
|
6
|
-
errorMaps: ZodErrorMap[];
|
|
7
|
-
issueData: IssueData;
|
|
8
|
-
}) => ZodIssue;
|
|
9
|
-
export type ParseParams = {
|
|
10
|
-
path: (string | number)[];
|
|
11
|
-
errorMap: ZodErrorMap;
|
|
12
|
-
async: boolean;
|
|
13
|
-
};
|
|
14
|
-
export type ParsePathComponent = string | number;
|
|
15
|
-
export type ParsePath = ParsePathComponent[];
|
|
16
|
-
export declare const EMPTY_PATH: ParsePath;
|
|
17
|
-
export interface ParseContext {
|
|
18
|
-
readonly common: {
|
|
19
|
-
readonly issues: ZodIssue[];
|
|
20
|
-
readonly contextualErrorMap?: ZodErrorMap | undefined;
|
|
21
|
-
readonly async: boolean;
|
|
22
|
-
};
|
|
23
|
-
readonly path: ParsePath;
|
|
24
|
-
readonly schemaErrorMap?: ZodErrorMap | undefined;
|
|
25
|
-
readonly parent: ParseContext | null;
|
|
26
|
-
readonly data: any;
|
|
27
|
-
readonly parsedType: ZodParsedType;
|
|
28
|
-
}
|
|
29
|
-
export type ParseInput = {
|
|
30
|
-
data: any;
|
|
31
|
-
path: (string | number)[];
|
|
32
|
-
parent: ParseContext;
|
|
33
|
-
};
|
|
34
|
-
export declare function addIssueToContext(ctx: ParseContext, issueData: IssueData): void;
|
|
35
|
-
export type ObjectPair = {
|
|
36
|
-
key: SyncParseReturnType<any>;
|
|
37
|
-
value: SyncParseReturnType<any>;
|
|
38
|
-
};
|
|
39
|
-
export declare class ParseStatus {
|
|
40
|
-
value: "aborted" | "dirty" | "valid";
|
|
41
|
-
dirty(): void;
|
|
42
|
-
abort(): void;
|
|
43
|
-
static mergeArray(status: ParseStatus, results: SyncParseReturnType<any>[]): SyncParseReturnType;
|
|
44
|
-
static mergeObjectAsync(status: ParseStatus, pairs: {
|
|
45
|
-
key: ParseReturnType<any>;
|
|
46
|
-
value: ParseReturnType<any>;
|
|
47
|
-
}[]): Promise<SyncParseReturnType<any>>;
|
|
48
|
-
static mergeObjectSync(status: ParseStatus, pairs: {
|
|
49
|
-
key: SyncParseReturnType<any>;
|
|
50
|
-
value: SyncParseReturnType<any>;
|
|
51
|
-
alwaysSet?: boolean;
|
|
52
|
-
}[]): SyncParseReturnType;
|
|
53
|
-
}
|
|
54
|
-
export interface ParseResult {
|
|
55
|
-
status: "aborted" | "dirty" | "valid";
|
|
56
|
-
data: any;
|
|
57
|
-
}
|
|
58
|
-
export type INVALID = {
|
|
59
|
-
status: "aborted";
|
|
60
|
-
};
|
|
61
|
-
export declare const INVALID: INVALID;
|
|
62
|
-
export type DIRTY<T> = {
|
|
63
|
-
status: "dirty";
|
|
64
|
-
value: T;
|
|
65
|
-
};
|
|
66
|
-
export declare const DIRTY: <T>(value: T) => DIRTY<T>;
|
|
67
|
-
export type OK<T> = {
|
|
68
|
-
status: "valid";
|
|
69
|
-
value: T;
|
|
70
|
-
};
|
|
71
|
-
export declare const OK: <T>(value: T) => OK<T>;
|
|
72
|
-
export type SyncParseReturnType<T = any> = OK<T> | DIRTY<T> | INVALID;
|
|
73
|
-
export type AsyncParseReturnType<T> = Promise<SyncParseReturnType<T>>;
|
|
74
|
-
export type ParseReturnType<T> = SyncParseReturnType<T> | AsyncParseReturnType<T>;
|
|
75
|
-
export declare const isAborted: (x: ParseReturnType<any>) => x is INVALID;
|
|
76
|
-
export declare const isDirty: <T>(x: ParseReturnType<T>) => x is OK<T> | DIRTY<T>;
|
|
77
|
-
export declare const isValid: <T>(x: ParseReturnType<T>) => x is OK<T>;
|
|
78
|
-
export declare const isAsync: <T>(x: ParseReturnType<T>) => x is AsyncParseReturnType<T>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ZodArray, ZodNullable, ZodObject, ZodOptional, ZodRawShape, ZodTuple, ZodTupleItems, ZodTypeAny } from "../types.js";
|
|
2
|
-
export declare namespace partialUtil {
|
|
3
|
-
type DeepPartial<T extends ZodTypeAny> = T extends ZodObject<ZodRawShape> ? ZodObject<{
|
|
4
|
-
[k in keyof T["shape"]]: ZodOptional<DeepPartial<T["shape"][k]>>;
|
|
5
|
-
}, T["_def"]["unknownKeys"], T["_def"]["catchall"]> : T extends ZodArray<infer Type, infer Card> ? ZodArray<DeepPartial<Type>, Card> : T extends ZodOptional<infer Type> ? ZodOptional<DeepPartial<Type>> : T extends ZodNullable<infer Type> ? ZodNullable<DeepPartial<Type>> : T extends ZodTuple<infer Items> ? {
|
|
6
|
-
[k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial<Items[k]> : never;
|
|
7
|
-
} extends infer PI ? PI extends ZodTupleItems ? ZodTuple<PI> : never : never : T;
|
|
8
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
export declare namespace util {
|
|
2
|
-
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
|
|
3
|
-
export type isAny<T> = 0 extends 1 & T ? true : false;
|
|
4
|
-
export const assertEqual: <A, B>(_: AssertEqual<A, B>) => void;
|
|
5
|
-
export function assertIs<T>(_arg: T): void;
|
|
6
|
-
export function assertNever(_x: never): never;
|
|
7
|
-
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
8
|
-
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
|
9
|
-
export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
10
|
-
export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
|
|
11
|
-
export type InexactPartial<T> = {
|
|
12
|
-
[k in keyof T]?: T[k] | undefined;
|
|
13
|
-
};
|
|
14
|
-
export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k; };
|
|
15
|
-
export const getValidEnumValues: (obj: any) => any[];
|
|
16
|
-
export const objectValues: (obj: any) => any[];
|
|
17
|
-
export const objectKeys: ObjectConstructor["keys"];
|
|
18
|
-
export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined;
|
|
19
|
-
export type identity<T> = objectUtil.identity<T>;
|
|
20
|
-
export type flatten<T> = objectUtil.flatten<T>;
|
|
21
|
-
export type noUndefined<T> = T extends undefined ? never : T;
|
|
22
|
-
export const isInteger: NumberConstructor["isInteger"];
|
|
23
|
-
export function joinValues<T extends any[]>(array: T, separator?: string): string;
|
|
24
|
-
export const jsonStringifyReplacer: (_: string, value: any) => any;
|
|
25
|
-
export {};
|
|
26
|
-
}
|
|
27
|
-
export declare namespace objectUtil {
|
|
28
|
-
export type MergeShapes<U, V> = keyof U & keyof V extends never ? U & V : {
|
|
29
|
-
[k in Exclude<keyof U, keyof V>]: U[k];
|
|
30
|
-
} & V;
|
|
31
|
-
type optionalKeys<T extends object> = {
|
|
32
|
-
[k in keyof T]: undefined extends T[k] ? k : never;
|
|
33
|
-
}[keyof T];
|
|
34
|
-
type requiredKeys<T extends object> = {
|
|
35
|
-
[k in keyof T]: undefined extends T[k] ? never : k;
|
|
36
|
-
}[keyof T];
|
|
37
|
-
export type addQuestionMarks<T extends object, _O = any> = {
|
|
38
|
-
[K in requiredKeys<T>]: T[K];
|
|
39
|
-
} & {
|
|
40
|
-
[K in optionalKeys<T>]?: T[K];
|
|
41
|
-
} & {
|
|
42
|
-
[k in keyof T]?: unknown;
|
|
43
|
-
};
|
|
44
|
-
export type identity<T> = T;
|
|
45
|
-
export type flatten<T> = identity<{
|
|
46
|
-
[k in keyof T]: T[k];
|
|
47
|
-
}>;
|
|
48
|
-
export type noNeverKeys<T> = {
|
|
49
|
-
[k in keyof T]: [T[k]] extends [never] ? never : k;
|
|
50
|
-
}[keyof T];
|
|
51
|
-
export type noNever<T> = identity<{
|
|
52
|
-
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
|
|
53
|
-
}>;
|
|
54
|
-
export const mergeShapes: <U, T>(first: U, second: T) => T & U;
|
|
55
|
-
export type extendShape<A extends object, B extends object> = keyof A & keyof B extends never ? A & B : {
|
|
56
|
-
[K in keyof A as K extends keyof B ? never : K]: A[K];
|
|
57
|
-
} & {
|
|
58
|
-
[K in keyof B]: B[K];
|
|
59
|
-
};
|
|
60
|
-
export {};
|
|
61
|
-
}
|
|
62
|
-
export declare const ZodParsedType: {
|
|
63
|
-
string: "string";
|
|
64
|
-
nan: "nan";
|
|
65
|
-
number: "number";
|
|
66
|
-
integer: "integer";
|
|
67
|
-
float: "float";
|
|
68
|
-
boolean: "boolean";
|
|
69
|
-
date: "date";
|
|
70
|
-
bigint: "bigint";
|
|
71
|
-
symbol: "symbol";
|
|
72
|
-
function: "function";
|
|
73
|
-
undefined: "undefined";
|
|
74
|
-
null: "null";
|
|
75
|
-
array: "array";
|
|
76
|
-
object: "object";
|
|
77
|
-
unknown: "unknown";
|
|
78
|
-
promise: "promise";
|
|
79
|
-
void: "void";
|
|
80
|
-
never: "never";
|
|
81
|
-
map: "map";
|
|
82
|
-
set: "set";
|
|
83
|
-
};
|
|
84
|
-
export type ZodParsedType = keyof typeof ZodParsedType;
|
|
85
|
-
export declare const getParsedType: (data: any) => ZodParsedType;
|