@rexeus/typeweaver-types 0.7.0 → 0.9.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 +18 -21
- package/dist/index.cjs +331 -524
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +327 -515
- package/dist/index.mjs.map +1 -1
- package/dist/lib/ResponseValidator.d.ts +21 -7
- package/dist/lib/ResponseValidator.js +40 -2
- package/dist/lib/definitionLookup.d.ts +29 -0
- package/dist/lib/definitionLookup.js +14 -0
- package/dist/lib/index.ts +1 -1
- package/dist/templates/Request.ejs +0 -24
- package/dist/templates/RequestValidator.ejs +9 -15
- package/dist/templates/Response.ejs +20 -60
- package/dist/templates/ResponseValidator.ejs +23 -85
- package/dist/templates/SharedResponse.ejs +16 -28
- package/package.json +8 -8
- package/dist/lib/assert.d.ts +0 -1
- package/dist/lib/assert.js +0 -11
package/dist/index.mjs
CHANGED
|
@@ -1,107 +1,45 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
import { BasePlugin
|
|
4
|
-
import {
|
|
3
|
+
import { BasePlugin } from "@rexeus/typeweaver-gen";
|
|
4
|
+
import { fromZod, print } from "@rexeus/typeweaver-zod-to-ts";
|
|
5
5
|
import Case from "case";
|
|
6
6
|
import { HttpStatusCode } from "@rexeus/typeweaver-core";
|
|
7
|
-
|
|
8
7
|
//#region \0rolldown/runtime.js
|
|
9
8
|
var __defProp = Object.defineProperty;
|
|
10
9
|
var __exportAll = (all, no_symbols) => {
|
|
11
10
|
let target = {};
|
|
12
|
-
for (var name in all) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
if (!no_symbols) {
|
|
19
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
20
|
-
}
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
21
16
|
return target;
|
|
22
17
|
};
|
|
23
|
-
|
|
24
18
|
//#endregion
|
|
25
|
-
//#region src/
|
|
26
|
-
const moduleDir$
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (isReference) {
|
|
50
|
-
const sharedResponse = context.resources.sharedResponseResources.find((resource) => resource.name === name);
|
|
51
|
-
if (sharedResponse) {
|
|
52
|
-
const responsePath = Path.relative(outputDir, `${sharedResponse.outputDir}/${path.basename(sharedResponse.outputFileName, ".ts")}`);
|
|
53
|
-
if (statusCode >= 200 && statusCode < 300) sharedSuccessResponses.push({
|
|
54
|
-
name,
|
|
55
|
-
path: responsePath
|
|
56
|
-
});
|
|
57
|
-
else sharedErrorResponses.push({
|
|
58
|
-
name,
|
|
59
|
-
path: responsePath
|
|
60
|
-
});
|
|
61
|
-
} else {
|
|
62
|
-
const entityResponse = (context.resources.entityResources[operationResource.entityName]?.responses)?.find((r) => r.name === name);
|
|
63
|
-
if (!entityResponse) throw new Error(`Shared response '${response.name}' not found in shared or entity resources`);
|
|
64
|
-
const responsePath = Path.relative(outputDir, `${entityResponse.outputDir}/${path.basename(entityResponse.outputFileName, ".ts")}`);
|
|
65
|
-
if (statusCode >= 200 && statusCode < 300) sharedSuccessResponses.push({
|
|
66
|
-
name,
|
|
67
|
-
path: responsePath
|
|
68
|
-
});
|
|
69
|
-
else entityErrorResponses.push({
|
|
70
|
-
name,
|
|
71
|
-
path: responsePath
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
const assembledResponse = { name };
|
|
77
|
-
if (statusCode >= 200 && statusCode < 300) ownSuccessResponses.push(assembledResponse);
|
|
78
|
-
else ownErrorResponses.push(assembledResponse);
|
|
79
|
-
}
|
|
80
|
-
const content = context.renderTemplate(templateFilePath, {
|
|
81
|
-
pascalCaseOperationId,
|
|
82
|
-
operationId,
|
|
83
|
-
coreDir: context.coreDir,
|
|
84
|
-
sourcePath,
|
|
85
|
-
headerTsType,
|
|
86
|
-
queryTsType,
|
|
87
|
-
paramTsType,
|
|
88
|
-
bodyTsType,
|
|
89
|
-
method,
|
|
90
|
-
ownSuccessResponses,
|
|
91
|
-
ownErrorResponses,
|
|
92
|
-
sharedSuccessResponses,
|
|
93
|
-
sharedErrorResponses,
|
|
94
|
-
entityErrorResponses,
|
|
95
|
-
responseFile: Path.relative(outputDir, `${outputDir}/${path.basename(outputResponseFileName, ".ts")}`),
|
|
96
|
-
responseValidationFile: Path.relative(outputDir, `${outputDir}/${path.basename(outputResponseValidationFileName, ".ts")}`),
|
|
97
|
-
hasErrorResponses: ownErrorResponses.length > 0 || entityErrorResponses.length > 0 || sharedErrorResponses.length > 0,
|
|
98
|
-
hasSuccessResponses: ownSuccessResponses.length > 0 || sharedSuccessResponses.length > 0
|
|
99
|
-
});
|
|
100
|
-
const relativePath = path.relative(context.outputDir, operationResource.outputRequestFile);
|
|
101
|
-
context.writeFile(relativePath, content);
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
|
|
19
|
+
//#region src/requestGenerator.ts
|
|
20
|
+
const moduleDir$4 = path.dirname(fileURLToPath(import.meta.url));
|
|
21
|
+
function generate$3(context) {
|
|
22
|
+
const templateFilePath = path.join(moduleDir$4, "templates", "Request.ejs");
|
|
23
|
+
for (const resource of context.normalizedSpec.resources) for (const operation of resource.operations) writeRequestType(templateFilePath, resource.name, operation, context);
|
|
24
|
+
}
|
|
25
|
+
function writeRequestType(templateFilePath, resourceName, operation, context) {
|
|
26
|
+
const { request, operationId, method } = operation;
|
|
27
|
+
const { header, query, param, body } = request ?? {};
|
|
28
|
+
const outputPaths = context.getOperationOutputPaths({
|
|
29
|
+
resourceName,
|
|
30
|
+
operationId
|
|
31
|
+
});
|
|
32
|
+
const content = context.renderTemplate(templateFilePath, {
|
|
33
|
+
pascalCaseOperationId: Case.pascal(operationId),
|
|
34
|
+
method,
|
|
35
|
+
headerTsType: header ? print(fromZod(header)) : void 0,
|
|
36
|
+
queryTsType: query ? print(fromZod(query)) : void 0,
|
|
37
|
+
paramTsType: param ? print(fromZod(param)) : void 0,
|
|
38
|
+
bodyTsType: body ? print(fromZod(body)) : void 0
|
|
39
|
+
});
|
|
40
|
+
const relativePath = path.relative(context.outputDir, outputPaths.requestFile);
|
|
41
|
+
context.writeFile(relativePath, content);
|
|
42
|
+
}
|
|
105
43
|
//#endregion
|
|
106
44
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js
|
|
107
45
|
/** A special constant with type `never` */
|
|
@@ -162,7 +100,6 @@ function config(newConfig) {
|
|
|
162
100
|
if (newConfig) Object.assign(globalConfig, newConfig);
|
|
163
101
|
return globalConfig;
|
|
164
102
|
}
|
|
165
|
-
|
|
166
103
|
//#endregion
|
|
167
104
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js
|
|
168
105
|
var util_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -311,10 +248,7 @@ function assignProp(target, prop, value) {
|
|
|
311
248
|
}
|
|
312
249
|
function mergeDefs(...defs) {
|
|
313
250
|
const mergedDescriptors = {};
|
|
314
|
-
for (const def of defs)
|
|
315
|
-
const descriptors = Object.getOwnPropertyDescriptors(def);
|
|
316
|
-
Object.assign(mergedDescriptors, descriptors);
|
|
317
|
-
}
|
|
251
|
+
for (const def of defs) Object.assign(mergedDescriptors, Object.getOwnPropertyDescriptors(def));
|
|
318
252
|
return Object.defineProperties({}, mergedDescriptors);
|
|
319
253
|
}
|
|
320
254
|
function cloneDef(schema) {
|
|
@@ -711,7 +645,6 @@ function uint8ArrayToHex(bytes) {
|
|
|
711
645
|
var Class = class {
|
|
712
646
|
constructor(..._args) {}
|
|
713
647
|
};
|
|
714
|
-
|
|
715
648
|
//#endregion
|
|
716
649
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js
|
|
717
650
|
const initializer$1 = (inst, def) => {
|
|
@@ -857,7 +790,6 @@ function prettifyError(error) {
|
|
|
857
790
|
}
|
|
858
791
|
return lines.join("\n");
|
|
859
792
|
}
|
|
860
|
-
|
|
861
793
|
//#endregion
|
|
862
794
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js
|
|
863
795
|
const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
@@ -961,7 +893,6 @@ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
961
893
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
962
894
|
};
|
|
963
895
|
const safeDecodeAsync$1 = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
964
|
-
|
|
965
896
|
//#endregion
|
|
966
897
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js
|
|
967
898
|
var regexes_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1124,7 +1055,6 @@ const sha384_base64url = /* @__PURE__ */ fixedBase64url(64);
|
|
|
1124
1055
|
const sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
1125
1056
|
const sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
1126
1057
|
const sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
1127
|
-
|
|
1128
1058
|
//#endregion
|
|
1129
1059
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js
|
|
1130
1060
|
const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
@@ -1630,7 +1560,6 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
|
|
|
1630
1560
|
payload.value = def.tx(payload.value);
|
|
1631
1561
|
};
|
|
1632
1562
|
});
|
|
1633
|
-
|
|
1634
1563
|
//#endregion
|
|
1635
1564
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js
|
|
1636
1565
|
var Doc = class {
|
|
@@ -1662,7 +1591,6 @@ var Doc = class {
|
|
|
1662
1591
|
return new F(...args, lines.join("\n"));
|
|
1663
1592
|
}
|
|
1664
1593
|
};
|
|
1665
|
-
|
|
1666
1594
|
//#endregion
|
|
1667
1595
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js
|
|
1668
1596
|
const version = {
|
|
@@ -1670,7 +1598,6 @@ const version = {
|
|
|
1670
1598
|
minor: 3,
|
|
1671
1599
|
patch: 6
|
|
1672
1600
|
};
|
|
1673
|
-
|
|
1674
1601
|
//#endregion
|
|
1675
1602
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js
|
|
1676
1603
|
const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
@@ -2413,8 +2340,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
|
|
|
2413
2340
|
let fastpass;
|
|
2414
2341
|
const isObject$1 = isObject;
|
|
2415
2342
|
const jit = !globalConfig.jitless;
|
|
2416
|
-
const
|
|
2417
|
-
const fastEnabled = jit && allowsEval$1.value;
|
|
2343
|
+
const fastEnabled = jit && allowsEval.value;
|
|
2418
2344
|
const catchall = def.catchall;
|
|
2419
2345
|
let value;
|
|
2420
2346
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3402,7 +3328,6 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
3402
3328
|
payload.issues.push(issue(_iss));
|
|
3403
3329
|
}
|
|
3404
3330
|
}
|
|
3405
|
-
|
|
3406
3331
|
//#endregion
|
|
3407
3332
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ar.js
|
|
3408
3333
|
const error$46 = () => {
|
|
@@ -3502,7 +3427,6 @@ const error$46 = () => {
|
|
|
3502
3427
|
function ar_default() {
|
|
3503
3428
|
return { localeError: error$46() };
|
|
3504
3429
|
}
|
|
3505
|
-
|
|
3506
3430
|
//#endregion
|
|
3507
3431
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/az.js
|
|
3508
3432
|
const error$45 = () => {
|
|
@@ -3602,7 +3526,6 @@ const error$45 = () => {
|
|
|
3602
3526
|
function az_default() {
|
|
3603
3527
|
return { localeError: error$45() };
|
|
3604
3528
|
}
|
|
3605
|
-
|
|
3606
3529
|
//#endregion
|
|
3607
3530
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/be.js
|
|
3608
3531
|
function getBelarusianPlural(count, one, few, many) {
|
|
@@ -3737,7 +3660,6 @@ const error$44 = () => {
|
|
|
3737
3660
|
function be_default() {
|
|
3738
3661
|
return { localeError: error$44() };
|
|
3739
3662
|
}
|
|
3740
|
-
|
|
3741
3663
|
//#endregion
|
|
3742
3664
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/bg.js
|
|
3743
3665
|
const error$43 = () => {
|
|
@@ -3847,7 +3769,6 @@ const error$43 = () => {
|
|
|
3847
3769
|
function bg_default() {
|
|
3848
3770
|
return { localeError: error$43() };
|
|
3849
3771
|
}
|
|
3850
|
-
|
|
3851
3772
|
//#endregion
|
|
3852
3773
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ca.js
|
|
3853
3774
|
const error$42 = () => {
|
|
@@ -3947,7 +3868,6 @@ const error$42 = () => {
|
|
|
3947
3868
|
function ca_default() {
|
|
3948
3869
|
return { localeError: error$42() };
|
|
3949
3870
|
}
|
|
3950
|
-
|
|
3951
3871
|
//#endregion
|
|
3952
3872
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/cs.js
|
|
3953
3873
|
const error$41 = () => {
|
|
@@ -4053,7 +3973,6 @@ const error$41 = () => {
|
|
|
4053
3973
|
function cs_default() {
|
|
4054
3974
|
return { localeError: error$41() };
|
|
4055
3975
|
}
|
|
4056
|
-
|
|
4057
3976
|
//#endregion
|
|
4058
3977
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/da.js
|
|
4059
3978
|
const error$40 = () => {
|
|
@@ -4164,7 +4083,6 @@ const error$40 = () => {
|
|
|
4164
4083
|
function da_default() {
|
|
4165
4084
|
return { localeError: error$40() };
|
|
4166
4085
|
}
|
|
4167
|
-
|
|
4168
4086
|
//#endregion
|
|
4169
4087
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/de.js
|
|
4170
4088
|
const error$39 = () => {
|
|
@@ -4268,7 +4186,6 @@ const error$39 = () => {
|
|
|
4268
4186
|
function de_default() {
|
|
4269
4187
|
return { localeError: error$39() };
|
|
4270
4188
|
}
|
|
4271
|
-
|
|
4272
4189
|
//#endregion
|
|
4273
4190
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/en.js
|
|
4274
4191
|
const error$38 = () => {
|
|
@@ -4371,7 +4288,6 @@ const error$38 = () => {
|
|
|
4371
4288
|
function en_default() {
|
|
4372
4289
|
return { localeError: error$38() };
|
|
4373
4290
|
}
|
|
4374
|
-
|
|
4375
4291
|
//#endregion
|
|
4376
4292
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/eo.js
|
|
4377
4293
|
const error$37 = () => {
|
|
@@ -4476,7 +4392,6 @@ const error$37 = () => {
|
|
|
4476
4392
|
function eo_default() {
|
|
4477
4393
|
return { localeError: error$37() };
|
|
4478
4394
|
}
|
|
4479
|
-
|
|
4480
4395
|
//#endregion
|
|
4481
4396
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/es.js
|
|
4482
4397
|
const error$36 = () => {
|
|
@@ -4604,7 +4519,6 @@ const error$36 = () => {
|
|
|
4604
4519
|
function es_default() {
|
|
4605
4520
|
return { localeError: error$36() };
|
|
4606
4521
|
}
|
|
4607
|
-
|
|
4608
4522
|
//#endregion
|
|
4609
4523
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fa.js
|
|
4610
4524
|
const error$35 = () => {
|
|
@@ -4708,7 +4622,6 @@ const error$35 = () => {
|
|
|
4708
4622
|
function fa_default() {
|
|
4709
4623
|
return { localeError: error$35() };
|
|
4710
4624
|
}
|
|
4711
|
-
|
|
4712
4625
|
//#endregion
|
|
4713
4626
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fi.js
|
|
4714
4627
|
const error$34 = () => {
|
|
@@ -4824,7 +4737,6 @@ const error$34 = () => {
|
|
|
4824
4737
|
function fi_default() {
|
|
4825
4738
|
return { localeError: error$34() };
|
|
4826
4739
|
}
|
|
4827
|
-
|
|
4828
4740
|
//#endregion
|
|
4829
4741
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr.js
|
|
4830
4742
|
const error$33 = () => {
|
|
@@ -4928,7 +4840,6 @@ const error$33 = () => {
|
|
|
4928
4840
|
function fr_default() {
|
|
4929
4841
|
return { localeError: error$33() };
|
|
4930
4842
|
}
|
|
4931
|
-
|
|
4932
4843
|
//#endregion
|
|
4933
4844
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr-CA.js
|
|
4934
4845
|
const error$32 = () => {
|
|
@@ -5028,7 +4939,6 @@ const error$32 = () => {
|
|
|
5028
4939
|
function fr_CA_default() {
|
|
5029
4940
|
return { localeError: error$32() };
|
|
5030
4941
|
}
|
|
5031
|
-
|
|
5032
4942
|
//#endregion
|
|
5033
4943
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/he.js
|
|
5034
4944
|
const error$31 = () => {
|
|
@@ -5334,7 +5244,6 @@ const error$31 = () => {
|
|
|
5334
5244
|
function he_default() {
|
|
5335
5245
|
return { localeError: error$31() };
|
|
5336
5246
|
}
|
|
5337
|
-
|
|
5338
5247
|
//#endregion
|
|
5339
5248
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hu.js
|
|
5340
5249
|
const error$30 = () => {
|
|
@@ -5438,7 +5347,6 @@ const error$30 = () => {
|
|
|
5438
5347
|
function hu_default() {
|
|
5439
5348
|
return { localeError: error$30() };
|
|
5440
5349
|
}
|
|
5441
|
-
|
|
5442
5350
|
//#endregion
|
|
5443
5351
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hy.js
|
|
5444
5352
|
function getArmenianPlural(count, one, many) {
|
|
@@ -5577,7 +5485,6 @@ const error$29 = () => {
|
|
|
5577
5485
|
function hy_default() {
|
|
5578
5486
|
return { localeError: error$29() };
|
|
5579
5487
|
}
|
|
5580
|
-
|
|
5581
5488
|
//#endregion
|
|
5582
5489
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/id.js
|
|
5583
5490
|
const error$28 = () => {
|
|
@@ -5677,7 +5584,6 @@ const error$28 = () => {
|
|
|
5677
5584
|
function id_default() {
|
|
5678
5585
|
return { localeError: error$28() };
|
|
5679
5586
|
}
|
|
5680
|
-
|
|
5681
5587
|
//#endregion
|
|
5682
5588
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/is.js
|
|
5683
5589
|
const error$27 = () => {
|
|
@@ -5781,7 +5687,6 @@ const error$27 = () => {
|
|
|
5781
5687
|
function is_default() {
|
|
5782
5688
|
return { localeError: error$27() };
|
|
5783
5689
|
}
|
|
5784
|
-
|
|
5785
5690
|
//#endregion
|
|
5786
5691
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/it.js
|
|
5787
5692
|
const error$26 = () => {
|
|
@@ -5885,7 +5790,6 @@ const error$26 = () => {
|
|
|
5885
5790
|
function it_default() {
|
|
5886
5791
|
return { localeError: error$26() };
|
|
5887
5792
|
}
|
|
5888
|
-
|
|
5889
5793
|
//#endregion
|
|
5890
5794
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ja.js
|
|
5891
5795
|
const error$25 = () => {
|
|
@@ -5989,7 +5893,6 @@ const error$25 = () => {
|
|
|
5989
5893
|
function ja_default() {
|
|
5990
5894
|
return { localeError: error$25() };
|
|
5991
5895
|
}
|
|
5992
|
-
|
|
5993
5896
|
//#endregion
|
|
5994
5897
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ka.js
|
|
5995
5898
|
const error$24 = () => {
|
|
@@ -6096,7 +5999,6 @@ const error$24 = () => {
|
|
|
6096
5999
|
function ka_default() {
|
|
6097
6000
|
return { localeError: error$24() };
|
|
6098
6001
|
}
|
|
6099
|
-
|
|
6100
6002
|
//#endregion
|
|
6101
6003
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/km.js
|
|
6102
6004
|
const error$23 = () => {
|
|
@@ -6201,14 +6103,12 @@ const error$23 = () => {
|
|
|
6201
6103
|
function km_default() {
|
|
6202
6104
|
return { localeError: error$23() };
|
|
6203
6105
|
}
|
|
6204
|
-
|
|
6205
6106
|
//#endregion
|
|
6206
6107
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/kh.js
|
|
6207
6108
|
/** @deprecated Use `km` instead. */
|
|
6208
6109
|
function kh_default() {
|
|
6209
6110
|
return km_default();
|
|
6210
6111
|
}
|
|
6211
|
-
|
|
6212
6112
|
//#endregion
|
|
6213
6113
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ko.js
|
|
6214
6114
|
const error$22 = () => {
|
|
@@ -6312,7 +6212,6 @@ const error$22 = () => {
|
|
|
6312
6212
|
function ko_default() {
|
|
6313
6213
|
return { localeError: error$22() };
|
|
6314
6214
|
}
|
|
6315
|
-
|
|
6316
6215
|
//#endregion
|
|
6317
6216
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/lt.js
|
|
6318
6217
|
const capitalizeFirstCharacter = (text) => {
|
|
@@ -6494,7 +6393,6 @@ const error$21 = () => {
|
|
|
6494
6393
|
function lt_default() {
|
|
6495
6394
|
return { localeError: error$21() };
|
|
6496
6395
|
}
|
|
6497
|
-
|
|
6498
6396
|
//#endregion
|
|
6499
6397
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/mk.js
|
|
6500
6398
|
const error$20 = () => {
|
|
@@ -6598,7 +6496,6 @@ const error$20 = () => {
|
|
|
6598
6496
|
function mk_default() {
|
|
6599
6497
|
return { localeError: error$20() };
|
|
6600
6498
|
}
|
|
6601
|
-
|
|
6602
6499
|
//#endregion
|
|
6603
6500
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ms.js
|
|
6604
6501
|
const error$19 = () => {
|
|
@@ -6701,7 +6598,6 @@ const error$19 = () => {
|
|
|
6701
6598
|
function ms_default() {
|
|
6702
6599
|
return { localeError: error$19() };
|
|
6703
6600
|
}
|
|
6704
|
-
|
|
6705
6601
|
//#endregion
|
|
6706
6602
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/nl.js
|
|
6707
6603
|
const error$18 = () => {
|
|
@@ -6806,7 +6702,6 @@ const error$18 = () => {
|
|
|
6806
6702
|
function nl_default() {
|
|
6807
6703
|
return { localeError: error$18() };
|
|
6808
6704
|
}
|
|
6809
|
-
|
|
6810
6705
|
//#endregion
|
|
6811
6706
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/no.js
|
|
6812
6707
|
const error$17 = () => {
|
|
@@ -6910,7 +6805,6 @@ const error$17 = () => {
|
|
|
6910
6805
|
function no_default() {
|
|
6911
6806
|
return { localeError: error$17() };
|
|
6912
6807
|
}
|
|
6913
|
-
|
|
6914
6808
|
//#endregion
|
|
6915
6809
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ota.js
|
|
6916
6810
|
const error$16 = () => {
|
|
@@ -7015,7 +6909,6 @@ const error$16 = () => {
|
|
|
7015
6909
|
function ota_default() {
|
|
7016
6910
|
return { localeError: error$16() };
|
|
7017
6911
|
}
|
|
7018
|
-
|
|
7019
6912
|
//#endregion
|
|
7020
6913
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ps.js
|
|
7021
6914
|
const error$15 = () => {
|
|
@@ -7119,7 +7012,6 @@ const error$15 = () => {
|
|
|
7119
7012
|
function ps_default() {
|
|
7120
7013
|
return { localeError: error$15() };
|
|
7121
7014
|
}
|
|
7122
|
-
|
|
7123
7015
|
//#endregion
|
|
7124
7016
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pl.js
|
|
7125
7017
|
const error$14 = () => {
|
|
@@ -7223,7 +7115,6 @@ const error$14 = () => {
|
|
|
7223
7115
|
function pl_default() {
|
|
7224
7116
|
return { localeError: error$14() };
|
|
7225
7117
|
}
|
|
7226
|
-
|
|
7227
7118
|
//#endregion
|
|
7228
7119
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pt.js
|
|
7229
7120
|
const error$13 = () => {
|
|
@@ -7327,7 +7218,6 @@ const error$13 = () => {
|
|
|
7327
7218
|
function pt_default() {
|
|
7328
7219
|
return { localeError: error$13() };
|
|
7329
7220
|
}
|
|
7330
|
-
|
|
7331
7221
|
//#endregion
|
|
7332
7222
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ru.js
|
|
7333
7223
|
function getRussianPlural(count, one, few, many) {
|
|
@@ -7462,7 +7352,6 @@ const error$12 = () => {
|
|
|
7462
7352
|
function ru_default() {
|
|
7463
7353
|
return { localeError: error$12() };
|
|
7464
7354
|
}
|
|
7465
|
-
|
|
7466
7355
|
//#endregion
|
|
7467
7356
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sl.js
|
|
7468
7357
|
const error$11 = () => {
|
|
@@ -7566,7 +7455,6 @@ const error$11 = () => {
|
|
|
7566
7455
|
function sl_default() {
|
|
7567
7456
|
return { localeError: error$11() };
|
|
7568
7457
|
}
|
|
7569
|
-
|
|
7570
7458
|
//#endregion
|
|
7571
7459
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sv.js
|
|
7572
7460
|
const error$10 = () => {
|
|
@@ -7670,7 +7558,6 @@ const error$10 = () => {
|
|
|
7670
7558
|
function sv_default() {
|
|
7671
7559
|
return { localeError: error$10() };
|
|
7672
7560
|
}
|
|
7673
|
-
|
|
7674
7561
|
//#endregion
|
|
7675
7562
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ta.js
|
|
7676
7563
|
const error$9 = () => {
|
|
@@ -7775,7 +7662,6 @@ const error$9 = () => {
|
|
|
7775
7662
|
function ta_default() {
|
|
7776
7663
|
return { localeError: error$9() };
|
|
7777
7664
|
}
|
|
7778
|
-
|
|
7779
7665
|
//#endregion
|
|
7780
7666
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/th.js
|
|
7781
7667
|
const error$8 = () => {
|
|
@@ -7880,7 +7766,6 @@ const error$8 = () => {
|
|
|
7880
7766
|
function th_default() {
|
|
7881
7767
|
return { localeError: error$8() };
|
|
7882
7768
|
}
|
|
7883
|
-
|
|
7884
7769
|
//#endregion
|
|
7885
7770
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/tr.js
|
|
7886
7771
|
const error$7 = () => {
|
|
@@ -7980,7 +7865,6 @@ const error$7 = () => {
|
|
|
7980
7865
|
function tr_default() {
|
|
7981
7866
|
return { localeError: error$7() };
|
|
7982
7867
|
}
|
|
7983
|
-
|
|
7984
7868
|
//#endregion
|
|
7985
7869
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uk.js
|
|
7986
7870
|
const error$6 = () => {
|
|
@@ -8084,14 +7968,12 @@ const error$6 = () => {
|
|
|
8084
7968
|
function uk_default() {
|
|
8085
7969
|
return { localeError: error$6() };
|
|
8086
7970
|
}
|
|
8087
|
-
|
|
8088
7971
|
//#endregion
|
|
8089
7972
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ua.js
|
|
8090
7973
|
/** @deprecated Use `uk` instead. */
|
|
8091
7974
|
function ua_default() {
|
|
8092
7975
|
return uk_default();
|
|
8093
7976
|
}
|
|
8094
|
-
|
|
8095
7977
|
//#endregion
|
|
8096
7978
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ur.js
|
|
8097
7979
|
const error$5 = () => {
|
|
@@ -8196,7 +8078,6 @@ const error$5 = () => {
|
|
|
8196
8078
|
function ur_default() {
|
|
8197
8079
|
return { localeError: error$5() };
|
|
8198
8080
|
}
|
|
8199
|
-
|
|
8200
8081
|
//#endregion
|
|
8201
8082
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uz.js
|
|
8202
8083
|
const error$4 = () => {
|
|
@@ -8301,7 +8182,6 @@ const error$4 = () => {
|
|
|
8301
8182
|
function uz_default() {
|
|
8302
8183
|
return { localeError: error$4() };
|
|
8303
8184
|
}
|
|
8304
|
-
|
|
8305
8185
|
//#endregion
|
|
8306
8186
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/vi.js
|
|
8307
8187
|
const error$3 = () => {
|
|
@@ -8405,7 +8285,6 @@ const error$3 = () => {
|
|
|
8405
8285
|
function vi_default() {
|
|
8406
8286
|
return { localeError: error$3() };
|
|
8407
8287
|
}
|
|
8408
|
-
|
|
8409
8288
|
//#endregion
|
|
8410
8289
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-CN.js
|
|
8411
8290
|
const error$2 = () => {
|
|
@@ -8510,7 +8389,6 @@ const error$2 = () => {
|
|
|
8510
8389
|
function zh_CN_default() {
|
|
8511
8390
|
return { localeError: error$2() };
|
|
8512
8391
|
}
|
|
8513
|
-
|
|
8514
8392
|
//#endregion
|
|
8515
8393
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-TW.js
|
|
8516
8394
|
const error$1 = () => {
|
|
@@ -8610,7 +8488,6 @@ const error$1 = () => {
|
|
|
8610
8488
|
function zh_TW_default() {
|
|
8611
8489
|
return { localeError: error$1() };
|
|
8612
8490
|
}
|
|
8613
|
-
|
|
8614
8491
|
//#endregion
|
|
8615
8492
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/yo.js
|
|
8616
8493
|
const error = () => {
|
|
@@ -8714,7 +8591,6 @@ const error = () => {
|
|
|
8714
8591
|
function yo_default() {
|
|
8715
8592
|
return { localeError: error() };
|
|
8716
8593
|
}
|
|
8717
|
-
|
|
8718
8594
|
//#endregion
|
|
8719
8595
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/index.js
|
|
8720
8596
|
var locales_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -8768,7 +8644,6 @@ var locales_exports = /* @__PURE__ */ __exportAll({
|
|
|
8768
8644
|
zhCN: () => zh_CN_default,
|
|
8769
8645
|
zhTW: () => zh_TW_default
|
|
8770
8646
|
});
|
|
8771
|
-
|
|
8772
8647
|
//#endregion
|
|
8773
8648
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js
|
|
8774
8649
|
var _a;
|
|
@@ -8818,7 +8693,6 @@ function registry() {
|
|
|
8818
8693
|
}
|
|
8819
8694
|
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
8820
8695
|
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
8821
|
-
|
|
8822
8696
|
//#endregion
|
|
8823
8697
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js
|
|
8824
8698
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -9546,12 +9420,11 @@ function _intersection(Class, left, right) {
|
|
|
9546
9420
|
/* @__NO_SIDE_EFFECTS__ */
|
|
9547
9421
|
function _tuple(Class, items, _paramsOrRest, _params) {
|
|
9548
9422
|
const hasRest = _paramsOrRest instanceof $ZodType;
|
|
9549
|
-
const params = hasRest ? _params : _paramsOrRest;
|
|
9550
9423
|
return new Class({
|
|
9551
9424
|
type: "tuple",
|
|
9552
9425
|
items,
|
|
9553
9426
|
rest: hasRest ? _paramsOrRest : null,
|
|
9554
|
-
...normalizeParams(
|
|
9427
|
+
...normalizeParams(hasRest ? _params : _paramsOrRest)
|
|
9555
9428
|
});
|
|
9556
9429
|
}
|
|
9557
9430
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -9859,7 +9732,6 @@ function _stringFormat(Class, format, fnOrRegex, _params = {}) {
|
|
|
9859
9732
|
if (fnOrRegex instanceof RegExp) def.pattern = fnOrRegex;
|
|
9860
9733
|
return new Class(def);
|
|
9861
9734
|
}
|
|
9862
|
-
|
|
9863
9735
|
//#endregion
|
|
9864
9736
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js
|
|
9865
9737
|
function initializeContext(params) {
|
|
@@ -10145,7 +10017,6 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
10145
10017
|
extractDefs(ctx, schema);
|
|
10146
10018
|
return finalize(ctx, schema);
|
|
10147
10019
|
};
|
|
10148
|
-
|
|
10149
10020
|
//#endregion
|
|
10150
10021
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
|
|
10151
10022
|
const formatMap = {
|
|
@@ -10602,7 +10473,6 @@ function toJSONSchema(input, params) {
|
|
|
10602
10473
|
extractDefs(ctx, input);
|
|
10603
10474
|
return finalize(ctx, input);
|
|
10604
10475
|
}
|
|
10605
|
-
|
|
10606
10476
|
//#endregion
|
|
10607
10477
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-generator.js
|
|
10608
10478
|
/**
|
|
@@ -10692,11 +10562,9 @@ var JSONSchemaGenerator = class {
|
|
|
10692
10562
|
return plainResult;
|
|
10693
10563
|
}
|
|
10694
10564
|
};
|
|
10695
|
-
|
|
10696
10565
|
//#endregion
|
|
10697
10566
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.js
|
|
10698
10567
|
var json_schema_exports = /* @__PURE__ */ __exportAll({});
|
|
10699
|
-
|
|
10700
10568
|
//#endregion
|
|
10701
10569
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/index.js
|
|
10702
10570
|
var core_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -10974,7 +10842,6 @@ var core_exports = /* @__PURE__ */ __exportAll({
|
|
|
10974
10842
|
util: () => util_exports,
|
|
10975
10843
|
version: () => version
|
|
10976
10844
|
});
|
|
10977
|
-
|
|
10978
10845
|
//#endregion
|
|
10979
10846
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/checks.js
|
|
10980
10847
|
var checks_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -11008,7 +10875,6 @@ var checks_exports = /* @__PURE__ */ __exportAll({
|
|
|
11008
10875
|
trim: () => _trim,
|
|
11009
10876
|
uppercase: () => _uppercase
|
|
11010
10877
|
});
|
|
11011
|
-
|
|
11012
10878
|
//#endregion
|
|
11013
10879
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js
|
|
11014
10880
|
var iso_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -11026,30 +10892,29 @@ const ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def
|
|
|
11026
10892
|
ZodStringFormat.init(inst, def);
|
|
11027
10893
|
});
|
|
11028
10894
|
function datetime(params) {
|
|
11029
|
-
return _isoDateTime(ZodISODateTime, params);
|
|
10895
|
+
return /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);
|
|
11030
10896
|
}
|
|
11031
10897
|
const ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => {
|
|
11032
10898
|
$ZodISODate.init(inst, def);
|
|
11033
10899
|
ZodStringFormat.init(inst, def);
|
|
11034
10900
|
});
|
|
11035
10901
|
function date$2(params) {
|
|
11036
|
-
return _isoDate(ZodISODate, params);
|
|
10902
|
+
return /* @__PURE__ */ _isoDate(ZodISODate, params);
|
|
11037
10903
|
}
|
|
11038
10904
|
const ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => {
|
|
11039
10905
|
$ZodISOTime.init(inst, def);
|
|
11040
10906
|
ZodStringFormat.init(inst, def);
|
|
11041
10907
|
});
|
|
11042
10908
|
function time(params) {
|
|
11043
|
-
return _isoTime(ZodISOTime, params);
|
|
10909
|
+
return /* @__PURE__ */ _isoTime(ZodISOTime, params);
|
|
11044
10910
|
}
|
|
11045
10911
|
const ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => {
|
|
11046
10912
|
$ZodISODuration.init(inst, def);
|
|
11047
10913
|
ZodStringFormat.init(inst, def);
|
|
11048
10914
|
});
|
|
11049
10915
|
function duration(params) {
|
|
11050
|
-
return _isoDuration(ZodISODuration, params);
|
|
10916
|
+
return /* @__PURE__ */ _isoDuration(ZodISODuration, params);
|
|
11051
10917
|
}
|
|
11052
|
-
|
|
11053
10918
|
//#endregion
|
|
11054
10919
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js
|
|
11055
10920
|
const initializer = (inst, issues) => {
|
|
@@ -11073,7 +10938,6 @@ const initializer = (inst, issues) => {
|
|
|
11073
10938
|
};
|
|
11074
10939
|
const ZodError = $constructor("ZodError", initializer);
|
|
11075
10940
|
const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
|
|
11076
|
-
|
|
11077
10941
|
//#endregion
|
|
11078
10942
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js
|
|
11079
10943
|
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
@@ -11088,7 +10952,6 @@ const safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
|
|
|
11088
10952
|
const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
11089
10953
|
const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
11090
10954
|
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
11091
|
-
|
|
11092
10955
|
//#endregion
|
|
11093
10956
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
|
|
11094
10957
|
var schemas_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -11296,7 +11159,7 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
11296
11159
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params);
|
|
11297
11160
|
inst.refine = (check, params) => inst.check(refine(check, params));
|
|
11298
11161
|
inst.superRefine = (refinement) => inst.check(superRefine(refinement));
|
|
11299
|
-
inst.overwrite = (fn) => inst.check(_overwrite(fn));
|
|
11162
|
+
inst.overwrite = (fn) => inst.check(/* @__PURE__ */ _overwrite(fn));
|
|
11300
11163
|
inst.optional = () => optional(inst);
|
|
11301
11164
|
inst.exactOptional = () => exactOptional(inst);
|
|
11302
11165
|
inst.nullable = () => nullable(inst);
|
|
@@ -11342,55 +11205,55 @@ const _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
11342
11205
|
inst.format = bag.format ?? null;
|
|
11343
11206
|
inst.minLength = bag.minimum ?? null;
|
|
11344
11207
|
inst.maxLength = bag.maximum ?? null;
|
|
11345
|
-
inst.regex = (...args) => inst.check(_regex(...args));
|
|
11346
|
-
inst.includes = (...args) => inst.check(_includes(...args));
|
|
11347
|
-
inst.startsWith = (...args) => inst.check(_startsWith(...args));
|
|
11348
|
-
inst.endsWith = (...args) => inst.check(_endsWith(...args));
|
|
11349
|
-
inst.min = (...args) => inst.check(_minLength(...args));
|
|
11350
|
-
inst.max = (...args) => inst.check(_maxLength(...args));
|
|
11351
|
-
inst.length = (...args) => inst.check(_length(...args));
|
|
11352
|
-
inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
|
|
11353
|
-
inst.lowercase = (params) => inst.check(_lowercase(params));
|
|
11354
|
-
inst.uppercase = (params) => inst.check(_uppercase(params));
|
|
11355
|
-
inst.trim = () => inst.check(_trim());
|
|
11356
|
-
inst.normalize = (...args) => inst.check(_normalize(...args));
|
|
11357
|
-
inst.toLowerCase = () => inst.check(_toLowerCase());
|
|
11358
|
-
inst.toUpperCase = () => inst.check(_toUpperCase());
|
|
11359
|
-
inst.slugify = () => inst.check(_slugify());
|
|
11208
|
+
inst.regex = (...args) => inst.check(/* @__PURE__ */ _regex(...args));
|
|
11209
|
+
inst.includes = (...args) => inst.check(/* @__PURE__ */ _includes(...args));
|
|
11210
|
+
inst.startsWith = (...args) => inst.check(/* @__PURE__ */ _startsWith(...args));
|
|
11211
|
+
inst.endsWith = (...args) => inst.check(/* @__PURE__ */ _endsWith(...args));
|
|
11212
|
+
inst.min = (...args) => inst.check(/* @__PURE__ */ _minLength(...args));
|
|
11213
|
+
inst.max = (...args) => inst.check(/* @__PURE__ */ _maxLength(...args));
|
|
11214
|
+
inst.length = (...args) => inst.check(/* @__PURE__ */ _length(...args));
|
|
11215
|
+
inst.nonempty = (...args) => inst.check(/* @__PURE__ */ _minLength(1, ...args));
|
|
11216
|
+
inst.lowercase = (params) => inst.check(/* @__PURE__ */ _lowercase(params));
|
|
11217
|
+
inst.uppercase = (params) => inst.check(/* @__PURE__ */ _uppercase(params));
|
|
11218
|
+
inst.trim = () => inst.check(/* @__PURE__ */ _trim());
|
|
11219
|
+
inst.normalize = (...args) => inst.check(/* @__PURE__ */ _normalize(...args));
|
|
11220
|
+
inst.toLowerCase = () => inst.check(/* @__PURE__ */ _toLowerCase());
|
|
11221
|
+
inst.toUpperCase = () => inst.check(/* @__PURE__ */ _toUpperCase());
|
|
11222
|
+
inst.slugify = () => inst.check(/* @__PURE__ */ _slugify());
|
|
11360
11223
|
});
|
|
11361
11224
|
const ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
11362
11225
|
$ZodString.init(inst, def);
|
|
11363
11226
|
_ZodString.init(inst, def);
|
|
11364
|
-
inst.email = (params) => inst.check(_email(ZodEmail, params));
|
|
11365
|
-
inst.url = (params) => inst.check(_url(ZodURL, params));
|
|
11366
|
-
inst.jwt = (params) => inst.check(_jwt(ZodJWT, params));
|
|
11367
|
-
inst.emoji = (params) => inst.check(_emoji(ZodEmoji, params));
|
|
11368
|
-
inst.guid = (params) => inst.check(_guid(ZodGUID, params));
|
|
11369
|
-
inst.uuid = (params) => inst.check(_uuid(ZodUUID, params));
|
|
11370
|
-
inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params));
|
|
11371
|
-
inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params));
|
|
11372
|
-
inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params));
|
|
11373
|
-
inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params));
|
|
11374
|
-
inst.guid = (params) => inst.check(_guid(ZodGUID, params));
|
|
11375
|
-
inst.cuid = (params) => inst.check(_cuid(ZodCUID, params));
|
|
11376
|
-
inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params));
|
|
11377
|
-
inst.ulid = (params) => inst.check(_ulid(ZodULID, params));
|
|
11378
|
-
inst.base64 = (params) => inst.check(_base64(ZodBase64, params));
|
|
11379
|
-
inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params));
|
|
11380
|
-
inst.xid = (params) => inst.check(_xid(ZodXID, params));
|
|
11381
|
-
inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params));
|
|
11382
|
-
inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params));
|
|
11383
|
-
inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params));
|
|
11384
|
-
inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params));
|
|
11385
|
-
inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params));
|
|
11386
|
-
inst.e164 = (params) => inst.check(_e164(ZodE164, params));
|
|
11227
|
+
inst.email = (params) => inst.check(/* @__PURE__ */ _email(ZodEmail, params));
|
|
11228
|
+
inst.url = (params) => inst.check(/* @__PURE__ */ _url(ZodURL, params));
|
|
11229
|
+
inst.jwt = (params) => inst.check(/* @__PURE__ */ _jwt(ZodJWT, params));
|
|
11230
|
+
inst.emoji = (params) => inst.check(/* @__PURE__ */ _emoji(ZodEmoji, params));
|
|
11231
|
+
inst.guid = (params) => inst.check(/* @__PURE__ */ _guid(ZodGUID, params));
|
|
11232
|
+
inst.uuid = (params) => inst.check(/* @__PURE__ */ _uuid(ZodUUID, params));
|
|
11233
|
+
inst.uuidv4 = (params) => inst.check(/* @__PURE__ */ _uuidv4(ZodUUID, params));
|
|
11234
|
+
inst.uuidv6 = (params) => inst.check(/* @__PURE__ */ _uuidv6(ZodUUID, params));
|
|
11235
|
+
inst.uuidv7 = (params) => inst.check(/* @__PURE__ */ _uuidv7(ZodUUID, params));
|
|
11236
|
+
inst.nanoid = (params) => inst.check(/* @__PURE__ */ _nanoid(ZodNanoID, params));
|
|
11237
|
+
inst.guid = (params) => inst.check(/* @__PURE__ */ _guid(ZodGUID, params));
|
|
11238
|
+
inst.cuid = (params) => inst.check(/* @__PURE__ */ _cuid(ZodCUID, params));
|
|
11239
|
+
inst.cuid2 = (params) => inst.check(/* @__PURE__ */ _cuid2(ZodCUID2, params));
|
|
11240
|
+
inst.ulid = (params) => inst.check(/* @__PURE__ */ _ulid(ZodULID, params));
|
|
11241
|
+
inst.base64 = (params) => inst.check(/* @__PURE__ */ _base64(ZodBase64, params));
|
|
11242
|
+
inst.base64url = (params) => inst.check(/* @__PURE__ */ _base64url(ZodBase64URL, params));
|
|
11243
|
+
inst.xid = (params) => inst.check(/* @__PURE__ */ _xid(ZodXID, params));
|
|
11244
|
+
inst.ksuid = (params) => inst.check(/* @__PURE__ */ _ksuid(ZodKSUID, params));
|
|
11245
|
+
inst.ipv4 = (params) => inst.check(/* @__PURE__ */ _ipv4(ZodIPv4, params));
|
|
11246
|
+
inst.ipv6 = (params) => inst.check(/* @__PURE__ */ _ipv6(ZodIPv6, params));
|
|
11247
|
+
inst.cidrv4 = (params) => inst.check(/* @__PURE__ */ _cidrv4(ZodCIDRv4, params));
|
|
11248
|
+
inst.cidrv6 = (params) => inst.check(/* @__PURE__ */ _cidrv6(ZodCIDRv6, params));
|
|
11249
|
+
inst.e164 = (params) => inst.check(/* @__PURE__ */ _e164(ZodE164, params));
|
|
11387
11250
|
inst.datetime = (params) => inst.check(datetime(params));
|
|
11388
11251
|
inst.date = (params) => inst.check(date$2(params));
|
|
11389
11252
|
inst.time = (params) => inst.check(time(params));
|
|
11390
11253
|
inst.duration = (params) => inst.check(duration(params));
|
|
11391
11254
|
});
|
|
11392
11255
|
function string$1(params) {
|
|
11393
|
-
return _string(ZodString, params);
|
|
11256
|
+
return /* @__PURE__ */ _string(ZodString, params);
|
|
11394
11257
|
}
|
|
11395
11258
|
const ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
|
|
11396
11259
|
$ZodStringFormat.init(inst, def);
|
|
@@ -11401,40 +11264,40 @@ const ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
|
|
|
11401
11264
|
ZodStringFormat.init(inst, def);
|
|
11402
11265
|
});
|
|
11403
11266
|
function email(params) {
|
|
11404
|
-
return _email(ZodEmail, params);
|
|
11267
|
+
return /* @__PURE__ */ _email(ZodEmail, params);
|
|
11405
11268
|
}
|
|
11406
11269
|
const ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
|
|
11407
11270
|
$ZodGUID.init(inst, def);
|
|
11408
11271
|
ZodStringFormat.init(inst, def);
|
|
11409
11272
|
});
|
|
11410
11273
|
function guid(params) {
|
|
11411
|
-
return _guid(ZodGUID, params);
|
|
11274
|
+
return /* @__PURE__ */ _guid(ZodGUID, params);
|
|
11412
11275
|
}
|
|
11413
11276
|
const ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => {
|
|
11414
11277
|
$ZodUUID.init(inst, def);
|
|
11415
11278
|
ZodStringFormat.init(inst, def);
|
|
11416
11279
|
});
|
|
11417
11280
|
function uuid(params) {
|
|
11418
|
-
return _uuid(ZodUUID, params);
|
|
11281
|
+
return /* @__PURE__ */ _uuid(ZodUUID, params);
|
|
11419
11282
|
}
|
|
11420
11283
|
function uuidv4(params) {
|
|
11421
|
-
return _uuidv4(ZodUUID, params);
|
|
11284
|
+
return /* @__PURE__ */ _uuidv4(ZodUUID, params);
|
|
11422
11285
|
}
|
|
11423
11286
|
function uuidv6(params) {
|
|
11424
|
-
return _uuidv6(ZodUUID, params);
|
|
11287
|
+
return /* @__PURE__ */ _uuidv6(ZodUUID, params);
|
|
11425
11288
|
}
|
|
11426
11289
|
function uuidv7(params) {
|
|
11427
|
-
return _uuidv7(ZodUUID, params);
|
|
11290
|
+
return /* @__PURE__ */ _uuidv7(ZodUUID, params);
|
|
11428
11291
|
}
|
|
11429
11292
|
const ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
|
|
11430
11293
|
$ZodURL.init(inst, def);
|
|
11431
11294
|
ZodStringFormat.init(inst, def);
|
|
11432
11295
|
});
|
|
11433
11296
|
function url(params) {
|
|
11434
|
-
return _url(ZodURL, params);
|
|
11297
|
+
return /* @__PURE__ */ _url(ZodURL, params);
|
|
11435
11298
|
}
|
|
11436
11299
|
function httpUrl(params) {
|
|
11437
|
-
return _url(ZodURL, {
|
|
11300
|
+
return /* @__PURE__ */ _url(ZodURL, {
|
|
11438
11301
|
protocol: /^https?$/,
|
|
11439
11302
|
hostname: domain,
|
|
11440
11303
|
...normalizeParams(params)
|
|
@@ -11445,150 +11308,150 @@ const ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
|
|
|
11445
11308
|
ZodStringFormat.init(inst, def);
|
|
11446
11309
|
});
|
|
11447
11310
|
function emoji(params) {
|
|
11448
|
-
return _emoji(ZodEmoji, params);
|
|
11311
|
+
return /* @__PURE__ */ _emoji(ZodEmoji, params);
|
|
11449
11312
|
}
|
|
11450
11313
|
const ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
|
|
11451
11314
|
$ZodNanoID.init(inst, def);
|
|
11452
11315
|
ZodStringFormat.init(inst, def);
|
|
11453
11316
|
});
|
|
11454
11317
|
function nanoid(params) {
|
|
11455
|
-
return _nanoid(ZodNanoID, params);
|
|
11318
|
+
return /* @__PURE__ */ _nanoid(ZodNanoID, params);
|
|
11456
11319
|
}
|
|
11457
11320
|
const ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => {
|
|
11458
11321
|
$ZodCUID.init(inst, def);
|
|
11459
11322
|
ZodStringFormat.init(inst, def);
|
|
11460
11323
|
});
|
|
11461
11324
|
function cuid(params) {
|
|
11462
|
-
return _cuid(ZodCUID, params);
|
|
11325
|
+
return /* @__PURE__ */ _cuid(ZodCUID, params);
|
|
11463
11326
|
}
|
|
11464
11327
|
const ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => {
|
|
11465
11328
|
$ZodCUID2.init(inst, def);
|
|
11466
11329
|
ZodStringFormat.init(inst, def);
|
|
11467
11330
|
});
|
|
11468
11331
|
function cuid2(params) {
|
|
11469
|
-
return _cuid2(ZodCUID2, params);
|
|
11332
|
+
return /* @__PURE__ */ _cuid2(ZodCUID2, params);
|
|
11470
11333
|
}
|
|
11471
11334
|
const ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => {
|
|
11472
11335
|
$ZodULID.init(inst, def);
|
|
11473
11336
|
ZodStringFormat.init(inst, def);
|
|
11474
11337
|
});
|
|
11475
11338
|
function ulid(params) {
|
|
11476
|
-
return _ulid(ZodULID, params);
|
|
11339
|
+
return /* @__PURE__ */ _ulid(ZodULID, params);
|
|
11477
11340
|
}
|
|
11478
11341
|
const ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => {
|
|
11479
11342
|
$ZodXID.init(inst, def);
|
|
11480
11343
|
ZodStringFormat.init(inst, def);
|
|
11481
11344
|
});
|
|
11482
11345
|
function xid(params) {
|
|
11483
|
-
return _xid(ZodXID, params);
|
|
11346
|
+
return /* @__PURE__ */ _xid(ZodXID, params);
|
|
11484
11347
|
}
|
|
11485
11348
|
const ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => {
|
|
11486
11349
|
$ZodKSUID.init(inst, def);
|
|
11487
11350
|
ZodStringFormat.init(inst, def);
|
|
11488
11351
|
});
|
|
11489
11352
|
function ksuid(params) {
|
|
11490
|
-
return _ksuid(ZodKSUID, params);
|
|
11353
|
+
return /* @__PURE__ */ _ksuid(ZodKSUID, params);
|
|
11491
11354
|
}
|
|
11492
11355
|
const ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => {
|
|
11493
11356
|
$ZodIPv4.init(inst, def);
|
|
11494
11357
|
ZodStringFormat.init(inst, def);
|
|
11495
11358
|
});
|
|
11496
11359
|
function ipv4(params) {
|
|
11497
|
-
return _ipv4(ZodIPv4, params);
|
|
11360
|
+
return /* @__PURE__ */ _ipv4(ZodIPv4, params);
|
|
11498
11361
|
}
|
|
11499
11362
|
const ZodMAC = /* @__PURE__ */ $constructor("ZodMAC", (inst, def) => {
|
|
11500
11363
|
$ZodMAC.init(inst, def);
|
|
11501
11364
|
ZodStringFormat.init(inst, def);
|
|
11502
11365
|
});
|
|
11503
11366
|
function mac(params) {
|
|
11504
|
-
return _mac(ZodMAC, params);
|
|
11367
|
+
return /* @__PURE__ */ _mac(ZodMAC, params);
|
|
11505
11368
|
}
|
|
11506
11369
|
const ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
|
|
11507
11370
|
$ZodIPv6.init(inst, def);
|
|
11508
11371
|
ZodStringFormat.init(inst, def);
|
|
11509
11372
|
});
|
|
11510
11373
|
function ipv6(params) {
|
|
11511
|
-
return _ipv6(ZodIPv6, params);
|
|
11374
|
+
return /* @__PURE__ */ _ipv6(ZodIPv6, params);
|
|
11512
11375
|
}
|
|
11513
11376
|
const ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
|
|
11514
11377
|
$ZodCIDRv4.init(inst, def);
|
|
11515
11378
|
ZodStringFormat.init(inst, def);
|
|
11516
11379
|
});
|
|
11517
11380
|
function cidrv4(params) {
|
|
11518
|
-
return _cidrv4(ZodCIDRv4, params);
|
|
11381
|
+
return /* @__PURE__ */ _cidrv4(ZodCIDRv4, params);
|
|
11519
11382
|
}
|
|
11520
11383
|
const ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => {
|
|
11521
11384
|
$ZodCIDRv6.init(inst, def);
|
|
11522
11385
|
ZodStringFormat.init(inst, def);
|
|
11523
11386
|
});
|
|
11524
11387
|
function cidrv6(params) {
|
|
11525
|
-
return _cidrv6(ZodCIDRv6, params);
|
|
11388
|
+
return /* @__PURE__ */ _cidrv6(ZodCIDRv6, params);
|
|
11526
11389
|
}
|
|
11527
11390
|
const ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => {
|
|
11528
11391
|
$ZodBase64.init(inst, def);
|
|
11529
11392
|
ZodStringFormat.init(inst, def);
|
|
11530
11393
|
});
|
|
11531
11394
|
function base64(params) {
|
|
11532
|
-
return _base64(ZodBase64, params);
|
|
11395
|
+
return /* @__PURE__ */ _base64(ZodBase64, params);
|
|
11533
11396
|
}
|
|
11534
11397
|
const ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
|
|
11535
11398
|
$ZodBase64URL.init(inst, def);
|
|
11536
11399
|
ZodStringFormat.init(inst, def);
|
|
11537
11400
|
});
|
|
11538
11401
|
function base64url(params) {
|
|
11539
|
-
return _base64url(ZodBase64URL, params);
|
|
11402
|
+
return /* @__PURE__ */ _base64url(ZodBase64URL, params);
|
|
11540
11403
|
}
|
|
11541
11404
|
const ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => {
|
|
11542
11405
|
$ZodE164.init(inst, def);
|
|
11543
11406
|
ZodStringFormat.init(inst, def);
|
|
11544
11407
|
});
|
|
11545
11408
|
function e164(params) {
|
|
11546
|
-
return _e164(ZodE164, params);
|
|
11409
|
+
return /* @__PURE__ */ _e164(ZodE164, params);
|
|
11547
11410
|
}
|
|
11548
11411
|
const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
|
|
11549
11412
|
$ZodJWT.init(inst, def);
|
|
11550
11413
|
ZodStringFormat.init(inst, def);
|
|
11551
11414
|
});
|
|
11552
11415
|
function jwt(params) {
|
|
11553
|
-
return _jwt(ZodJWT, params);
|
|
11416
|
+
return /* @__PURE__ */ _jwt(ZodJWT, params);
|
|
11554
11417
|
}
|
|
11555
11418
|
const ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
|
|
11556
11419
|
$ZodCustomStringFormat.init(inst, def);
|
|
11557
11420
|
ZodStringFormat.init(inst, def);
|
|
11558
11421
|
});
|
|
11559
11422
|
function stringFormat(format, fnOrRegex, _params = {}) {
|
|
11560
|
-
return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
11423
|
+
return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
11561
11424
|
}
|
|
11562
11425
|
function hostname(_params) {
|
|
11563
|
-
return _stringFormat(ZodCustomStringFormat, "hostname", hostname$1, _params);
|
|
11426
|
+
return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "hostname", hostname$1, _params);
|
|
11564
11427
|
}
|
|
11565
11428
|
function hex(_params) {
|
|
11566
|
-
return _stringFormat(ZodCustomStringFormat, "hex", hex$1, _params);
|
|
11429
|
+
return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "hex", hex$1, _params);
|
|
11567
11430
|
}
|
|
11568
11431
|
function hash(alg, params) {
|
|
11569
11432
|
const format = `${alg}_${params?.enc ?? "hex"}`;
|
|
11570
11433
|
const regex = regexes_exports[format];
|
|
11571
11434
|
if (!regex) throw new Error(`Unrecognized hash format: ${format}`);
|
|
11572
|
-
return _stringFormat(ZodCustomStringFormat, format, regex, params);
|
|
11435
|
+
return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, format, regex, params);
|
|
11573
11436
|
}
|
|
11574
11437
|
const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
11575
11438
|
$ZodNumber.init(inst, def);
|
|
11576
11439
|
ZodType.init(inst, def);
|
|
11577
11440
|
inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
|
|
11578
|
-
inst.gt = (value, params) => inst.check(_gt(value, params));
|
|
11579
|
-
inst.gte = (value, params) => inst.check(_gte(value, params));
|
|
11580
|
-
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
11581
|
-
inst.lt = (value, params) => inst.check(_lt(value, params));
|
|
11582
|
-
inst.lte = (value, params) => inst.check(_lte(value, params));
|
|
11583
|
-
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
11441
|
+
inst.gt = (value, params) => inst.check(/* @__PURE__ */ _gt(value, params));
|
|
11442
|
+
inst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11443
|
+
inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11444
|
+
inst.lt = (value, params) => inst.check(/* @__PURE__ */ _lt(value, params));
|
|
11445
|
+
inst.lte = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
|
|
11446
|
+
inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
|
|
11584
11447
|
inst.int = (params) => inst.check(int(params));
|
|
11585
11448
|
inst.safe = (params) => inst.check(int(params));
|
|
11586
|
-
inst.positive = (params) => inst.check(_gt(0, params));
|
|
11587
|
-
inst.nonnegative = (params) => inst.check(_gte(0, params));
|
|
11588
|
-
inst.negative = (params) => inst.check(_lt(0, params));
|
|
11589
|
-
inst.nonpositive = (params) => inst.check(_lte(0, params));
|
|
11590
|
-
inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
|
|
11591
|
-
inst.step = (value, params) => inst.check(_multipleOf(value, params));
|
|
11449
|
+
inst.positive = (params) => inst.check(/* @__PURE__ */ _gt(0, params));
|
|
11450
|
+
inst.nonnegative = (params) => inst.check(/* @__PURE__ */ _gte(0, params));
|
|
11451
|
+
inst.negative = (params) => inst.check(/* @__PURE__ */ _lt(0, params));
|
|
11452
|
+
inst.nonpositive = (params) => inst.check(/* @__PURE__ */ _lte(0, params));
|
|
11453
|
+
inst.multipleOf = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));
|
|
11454
|
+
inst.step = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));
|
|
11592
11455
|
inst.finite = () => inst;
|
|
11593
11456
|
const bag = inst._zod.bag;
|
|
11594
11457
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
@@ -11598,26 +11461,26 @@ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
11598
11461
|
inst.format = bag.format ?? null;
|
|
11599
11462
|
});
|
|
11600
11463
|
function number$1(params) {
|
|
11601
|
-
return _number(ZodNumber, params);
|
|
11464
|
+
return /* @__PURE__ */ _number(ZodNumber, params);
|
|
11602
11465
|
}
|
|
11603
11466
|
const ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => {
|
|
11604
11467
|
$ZodNumberFormat.init(inst, def);
|
|
11605
11468
|
ZodNumber.init(inst, def);
|
|
11606
11469
|
});
|
|
11607
11470
|
function int(params) {
|
|
11608
|
-
return _int(ZodNumberFormat, params);
|
|
11471
|
+
return /* @__PURE__ */ _int(ZodNumberFormat, params);
|
|
11609
11472
|
}
|
|
11610
11473
|
function float32(params) {
|
|
11611
|
-
return _float32(ZodNumberFormat, params);
|
|
11474
|
+
return /* @__PURE__ */ _float32(ZodNumberFormat, params);
|
|
11612
11475
|
}
|
|
11613
11476
|
function float64(params) {
|
|
11614
|
-
return _float64(ZodNumberFormat, params);
|
|
11477
|
+
return /* @__PURE__ */ _float64(ZodNumberFormat, params);
|
|
11615
11478
|
}
|
|
11616
11479
|
function int32(params) {
|
|
11617
|
-
return _int32(ZodNumberFormat, params);
|
|
11480
|
+
return /* @__PURE__ */ _int32(ZodNumberFormat, params);
|
|
11618
11481
|
}
|
|
11619
11482
|
function uint32(params) {
|
|
11620
|
-
return _uint32(ZodNumberFormat, params);
|
|
11483
|
+
return /* @__PURE__ */ _uint32(ZodNumberFormat, params);
|
|
11621
11484
|
}
|
|
11622
11485
|
const ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
|
|
11623
11486
|
$ZodBoolean.init(inst, def);
|
|
@@ -11625,42 +11488,42 @@ const ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
|
|
|
11625
11488
|
inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
|
|
11626
11489
|
});
|
|
11627
11490
|
function boolean$1(params) {
|
|
11628
|
-
return _boolean(ZodBoolean, params);
|
|
11491
|
+
return /* @__PURE__ */ _boolean(ZodBoolean, params);
|
|
11629
11492
|
}
|
|
11630
11493
|
const ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
|
|
11631
11494
|
$ZodBigInt.init(inst, def);
|
|
11632
11495
|
ZodType.init(inst, def);
|
|
11633
11496
|
inst._zod.processJSONSchema = (ctx, json, params) => bigintProcessor(inst, ctx, json, params);
|
|
11634
|
-
inst.gte = (value, params) => inst.check(_gte(value, params));
|
|
11635
|
-
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
11636
|
-
inst.gt = (value, params) => inst.check(_gt(value, params));
|
|
11637
|
-
inst.gte = (value, params) => inst.check(_gte(value, params));
|
|
11638
|
-
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
11639
|
-
inst.lt = (value, params) => inst.check(_lt(value, params));
|
|
11640
|
-
inst.lte = (value, params) => inst.check(_lte(value, params));
|
|
11641
|
-
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
11642
|
-
inst.positive = (params) => inst.check(_gt(BigInt(0), params));
|
|
11643
|
-
inst.negative = (params) => inst.check(_lt(BigInt(0), params));
|
|
11644
|
-
inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params));
|
|
11645
|
-
inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params));
|
|
11646
|
-
inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
|
|
11497
|
+
inst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11498
|
+
inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11499
|
+
inst.gt = (value, params) => inst.check(/* @__PURE__ */ _gt(value, params));
|
|
11500
|
+
inst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11501
|
+
inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11502
|
+
inst.lt = (value, params) => inst.check(/* @__PURE__ */ _lt(value, params));
|
|
11503
|
+
inst.lte = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
|
|
11504
|
+
inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
|
|
11505
|
+
inst.positive = (params) => inst.check(/* @__PURE__ */ _gt(BigInt(0), params));
|
|
11506
|
+
inst.negative = (params) => inst.check(/* @__PURE__ */ _lt(BigInt(0), params));
|
|
11507
|
+
inst.nonpositive = (params) => inst.check(/* @__PURE__ */ _lte(BigInt(0), params));
|
|
11508
|
+
inst.nonnegative = (params) => inst.check(/* @__PURE__ */ _gte(BigInt(0), params));
|
|
11509
|
+
inst.multipleOf = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));
|
|
11647
11510
|
const bag = inst._zod.bag;
|
|
11648
11511
|
inst.minValue = bag.minimum ?? null;
|
|
11649
11512
|
inst.maxValue = bag.maximum ?? null;
|
|
11650
11513
|
inst.format = bag.format ?? null;
|
|
11651
11514
|
});
|
|
11652
11515
|
function bigint$1(params) {
|
|
11653
|
-
return _bigint(ZodBigInt, params);
|
|
11516
|
+
return /* @__PURE__ */ _bigint(ZodBigInt, params);
|
|
11654
11517
|
}
|
|
11655
11518
|
const ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => {
|
|
11656
11519
|
$ZodBigIntFormat.init(inst, def);
|
|
11657
11520
|
ZodBigInt.init(inst, def);
|
|
11658
11521
|
});
|
|
11659
11522
|
function int64(params) {
|
|
11660
|
-
return _int64(ZodBigIntFormat, params);
|
|
11523
|
+
return /* @__PURE__ */ _int64(ZodBigIntFormat, params);
|
|
11661
11524
|
}
|
|
11662
11525
|
function uint64(params) {
|
|
11663
|
-
return _uint64(ZodBigIntFormat, params);
|
|
11526
|
+
return /* @__PURE__ */ _uint64(ZodBigIntFormat, params);
|
|
11664
11527
|
}
|
|
11665
11528
|
const ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => {
|
|
11666
11529
|
$ZodSymbol.init(inst, def);
|
|
@@ -11668,7 +11531,7 @@ const ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => {
|
|
|
11668
11531
|
inst._zod.processJSONSchema = (ctx, json, params) => symbolProcessor(inst, ctx, json, params);
|
|
11669
11532
|
});
|
|
11670
11533
|
function symbol(params) {
|
|
11671
|
-
return _symbol(ZodSymbol, params);
|
|
11534
|
+
return /* @__PURE__ */ _symbol(ZodSymbol, params);
|
|
11672
11535
|
}
|
|
11673
11536
|
const ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => {
|
|
11674
11537
|
$ZodUndefined.init(inst, def);
|
|
@@ -11676,7 +11539,7 @@ const ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) =>
|
|
|
11676
11539
|
inst._zod.processJSONSchema = (ctx, json, params) => undefinedProcessor(inst, ctx, json, params);
|
|
11677
11540
|
});
|
|
11678
11541
|
function _undefined(params) {
|
|
11679
|
-
return _undefined$1(ZodUndefined, params);
|
|
11542
|
+
return /* @__PURE__ */ _undefined$1(ZodUndefined, params);
|
|
11680
11543
|
}
|
|
11681
11544
|
const ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
|
|
11682
11545
|
$ZodNull.init(inst, def);
|
|
@@ -11684,7 +11547,7 @@ const ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
|
|
|
11684
11547
|
inst._zod.processJSONSchema = (ctx, json, params) => nullProcessor(inst, ctx, json, params);
|
|
11685
11548
|
});
|
|
11686
11549
|
function _null(params) {
|
|
11687
|
-
return _null$1(ZodNull, params);
|
|
11550
|
+
return /* @__PURE__ */ _null$1(ZodNull, params);
|
|
11688
11551
|
}
|
|
11689
11552
|
const ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
|
|
11690
11553
|
$ZodAny.init(inst, def);
|
|
@@ -11692,7 +11555,7 @@ const ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
|
|
|
11692
11555
|
inst._zod.processJSONSchema = (ctx, json, params) => anyProcessor(inst, ctx, json, params);
|
|
11693
11556
|
});
|
|
11694
11557
|
function any() {
|
|
11695
|
-
return _any(ZodAny);
|
|
11558
|
+
return /* @__PURE__ */ _any(ZodAny);
|
|
11696
11559
|
}
|
|
11697
11560
|
const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
|
|
11698
11561
|
$ZodUnknown.init(inst, def);
|
|
@@ -11700,7 +11563,7 @@ const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
|
|
|
11700
11563
|
inst._zod.processJSONSchema = (ctx, json, params) => unknownProcessor(inst, ctx, json, params);
|
|
11701
11564
|
});
|
|
11702
11565
|
function unknown() {
|
|
11703
|
-
return _unknown(ZodUnknown);
|
|
11566
|
+
return /* @__PURE__ */ _unknown(ZodUnknown);
|
|
11704
11567
|
}
|
|
11705
11568
|
const ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
|
|
11706
11569
|
$ZodNever.init(inst, def);
|
|
@@ -11708,7 +11571,7 @@ const ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
|
|
|
11708
11571
|
inst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json, params);
|
|
11709
11572
|
});
|
|
11710
11573
|
function never(params) {
|
|
11711
|
-
return _never(ZodNever, params);
|
|
11574
|
+
return /* @__PURE__ */ _never(ZodNever, params);
|
|
11712
11575
|
}
|
|
11713
11576
|
const ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => {
|
|
11714
11577
|
$ZodVoid.init(inst, def);
|
|
@@ -11716,34 +11579,34 @@ const ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => {
|
|
|
11716
11579
|
inst._zod.processJSONSchema = (ctx, json, params) => voidProcessor(inst, ctx, json, params);
|
|
11717
11580
|
});
|
|
11718
11581
|
function _void(params) {
|
|
11719
|
-
return _void$1(ZodVoid, params);
|
|
11582
|
+
return /* @__PURE__ */ _void$1(ZodVoid, params);
|
|
11720
11583
|
}
|
|
11721
11584
|
const ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
|
|
11722
11585
|
$ZodDate.init(inst, def);
|
|
11723
11586
|
ZodType.init(inst, def);
|
|
11724
11587
|
inst._zod.processJSONSchema = (ctx, json, params) => dateProcessor(inst, ctx, json, params);
|
|
11725
|
-
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
11726
|
-
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
11588
|
+
inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11589
|
+
inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
|
|
11727
11590
|
const c = inst._zod.bag;
|
|
11728
11591
|
inst.minDate = c.minimum ? new Date(c.minimum) : null;
|
|
11729
11592
|
inst.maxDate = c.maximum ? new Date(c.maximum) : null;
|
|
11730
11593
|
});
|
|
11731
11594
|
function date$1(params) {
|
|
11732
|
-
return _date(ZodDate, params);
|
|
11595
|
+
return /* @__PURE__ */ _date(ZodDate, params);
|
|
11733
11596
|
}
|
|
11734
11597
|
const ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
11735
11598
|
$ZodArray.init(inst, def);
|
|
11736
11599
|
ZodType.init(inst, def);
|
|
11737
11600
|
inst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);
|
|
11738
11601
|
inst.element = def.element;
|
|
11739
|
-
inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
|
|
11740
|
-
inst.nonempty = (params) => inst.check(_minLength(1, params));
|
|
11741
|
-
inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
|
|
11742
|
-
inst.length = (len, params) => inst.check(_length(len, params));
|
|
11602
|
+
inst.min = (minLength, params) => inst.check(/* @__PURE__ */ _minLength(minLength, params));
|
|
11603
|
+
inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minLength(1, params));
|
|
11604
|
+
inst.max = (maxLength, params) => inst.check(/* @__PURE__ */ _maxLength(maxLength, params));
|
|
11605
|
+
inst.length = (len, params) => inst.check(/* @__PURE__ */ _length(len, params));
|
|
11743
11606
|
inst.unwrap = () => inst.element;
|
|
11744
11607
|
});
|
|
11745
11608
|
function array(element, params) {
|
|
11746
|
-
return _array(ZodArray, element, params);
|
|
11609
|
+
return /* @__PURE__ */ _array(ZodArray, element, params);
|
|
11747
11610
|
}
|
|
11748
11611
|
function keyof(schema) {
|
|
11749
11612
|
const shape = schema._zod.def.shape;
|
|
@@ -11877,12 +11740,11 @@ const ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => {
|
|
|
11877
11740
|
});
|
|
11878
11741
|
function tuple(items, _paramsOrRest, _params) {
|
|
11879
11742
|
const hasRest = _paramsOrRest instanceof $ZodType;
|
|
11880
|
-
const params = hasRest ? _params : _paramsOrRest;
|
|
11881
11743
|
return new ZodTuple({
|
|
11882
11744
|
type: "tuple",
|
|
11883
11745
|
items,
|
|
11884
11746
|
rest: hasRest ? _paramsOrRest : null,
|
|
11885
|
-
...normalizeParams(
|
|
11747
|
+
...normalizeParams(hasRest ? _params : _paramsOrRest)
|
|
11886
11748
|
});
|
|
11887
11749
|
}
|
|
11888
11750
|
const ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
@@ -11925,10 +11787,10 @@ const ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => {
|
|
|
11925
11787
|
inst._zod.processJSONSchema = (ctx, json, params) => mapProcessor(inst, ctx, json, params);
|
|
11926
11788
|
inst.keyType = def.keyType;
|
|
11927
11789
|
inst.valueType = def.valueType;
|
|
11928
|
-
inst.min = (...args) => inst.check(_minSize(...args));
|
|
11929
|
-
inst.nonempty = (params) => inst.check(_minSize(1, params));
|
|
11930
|
-
inst.max = (...args) => inst.check(_maxSize(...args));
|
|
11931
|
-
inst.size = (...args) => inst.check(_size(...args));
|
|
11790
|
+
inst.min = (...args) => inst.check(/* @__PURE__ */ _minSize(...args));
|
|
11791
|
+
inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minSize(1, params));
|
|
11792
|
+
inst.max = (...args) => inst.check(/* @__PURE__ */ _maxSize(...args));
|
|
11793
|
+
inst.size = (...args) => inst.check(/* @__PURE__ */ _size(...args));
|
|
11932
11794
|
});
|
|
11933
11795
|
function map(keyType, valueType, params) {
|
|
11934
11796
|
return new ZodMap({
|
|
@@ -11942,10 +11804,10 @@ const ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => {
|
|
|
11942
11804
|
$ZodSet.init(inst, def);
|
|
11943
11805
|
ZodType.init(inst, def);
|
|
11944
11806
|
inst._zod.processJSONSchema = (ctx, json, params) => setProcessor(inst, ctx, json, params);
|
|
11945
|
-
inst.min = (...args) => inst.check(_minSize(...args));
|
|
11946
|
-
inst.nonempty = (params) => inst.check(_minSize(1, params));
|
|
11947
|
-
inst.max = (...args) => inst.check(_maxSize(...args));
|
|
11948
|
-
inst.size = (...args) => inst.check(_size(...args));
|
|
11807
|
+
inst.min = (...args) => inst.check(/* @__PURE__ */ _minSize(...args));
|
|
11808
|
+
inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minSize(1, params));
|
|
11809
|
+
inst.max = (...args) => inst.check(/* @__PURE__ */ _maxSize(...args));
|
|
11810
|
+
inst.size = (...args) => inst.check(/* @__PURE__ */ _size(...args));
|
|
11949
11811
|
});
|
|
11950
11812
|
function set(valueType, params) {
|
|
11951
11813
|
return new ZodSet({
|
|
@@ -12026,12 +11888,12 @@ const ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
|
|
|
12026
11888
|
$ZodFile.init(inst, def);
|
|
12027
11889
|
ZodType.init(inst, def);
|
|
12028
11890
|
inst._zod.processJSONSchema = (ctx, json, params) => fileProcessor(inst, ctx, json, params);
|
|
12029
|
-
inst.min = (size, params) => inst.check(_minSize(size, params));
|
|
12030
|
-
inst.max = (size, params) => inst.check(_maxSize(size, params));
|
|
12031
|
-
inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params));
|
|
11891
|
+
inst.min = (size, params) => inst.check(/* @__PURE__ */ _minSize(size, params));
|
|
11892
|
+
inst.max = (size, params) => inst.check(/* @__PURE__ */ _maxSize(size, params));
|
|
11893
|
+
inst.mime = (types, params) => inst.check(/* @__PURE__ */ _mime(Array.isArray(types) ? types : [types], params));
|
|
12032
11894
|
});
|
|
12033
11895
|
function file(params) {
|
|
12034
|
-
return _file(ZodFile, params);
|
|
11896
|
+
return /* @__PURE__ */ _file(ZodFile, params);
|
|
12035
11897
|
}
|
|
12036
11898
|
const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
12037
11899
|
$ZodTransform.init(inst, def);
|
|
@@ -12180,7 +12042,7 @@ const ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => {
|
|
|
12180
12042
|
inst._zod.processJSONSchema = (ctx, json, params) => nanProcessor(inst, ctx, json, params);
|
|
12181
12043
|
});
|
|
12182
12044
|
function nan(params) {
|
|
12183
|
-
return _nan(ZodNaN, params);
|
|
12045
|
+
return /* @__PURE__ */ _nan(ZodNaN, params);
|
|
12184
12046
|
}
|
|
12185
12047
|
const ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
|
|
12186
12048
|
$ZodPipe.init(inst, def);
|
|
@@ -12280,13 +12142,13 @@ function check(fn) {
|
|
|
12280
12142
|
return ch;
|
|
12281
12143
|
}
|
|
12282
12144
|
function custom(fn, _params) {
|
|
12283
|
-
return _custom(ZodCustom, fn ?? (() => true), _params);
|
|
12145
|
+
return /* @__PURE__ */ _custom(ZodCustom, fn ?? (() => true), _params);
|
|
12284
12146
|
}
|
|
12285
12147
|
function refine(fn, _params = {}) {
|
|
12286
|
-
return _refine(ZodCustom, fn, _params);
|
|
12148
|
+
return /* @__PURE__ */ _refine(ZodCustom, fn, _params);
|
|
12287
12149
|
}
|
|
12288
12150
|
function superRefine(fn) {
|
|
12289
|
-
return _superRefine(fn);
|
|
12151
|
+
return /* @__PURE__ */ _superRefine(fn);
|
|
12290
12152
|
}
|
|
12291
12153
|
const describe = describe$1;
|
|
12292
12154
|
const meta = meta$1;
|
|
@@ -12310,7 +12172,7 @@ function _instanceof(cls, params = {}) {
|
|
|
12310
12172
|
};
|
|
12311
12173
|
return inst;
|
|
12312
12174
|
}
|
|
12313
|
-
const stringbool = (...args) => _stringbool({
|
|
12175
|
+
const stringbool = (...args) => /* @__PURE__ */ _stringbool({
|
|
12314
12176
|
Codec: ZodCodec,
|
|
12315
12177
|
Boolean: ZodBoolean,
|
|
12316
12178
|
String: ZodString
|
|
@@ -12331,7 +12193,6 @@ function json(params) {
|
|
|
12331
12193
|
function preprocess(fn, schema) {
|
|
12332
12194
|
return pipe(transform(fn), schema);
|
|
12333
12195
|
}
|
|
12334
|
-
|
|
12335
12196
|
//#endregion
|
|
12336
12197
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/compat.js
|
|
12337
12198
|
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
@@ -12359,7 +12220,6 @@ function getErrorMap() {
|
|
|
12359
12220
|
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
12360
12221
|
var ZodFirstPartyTypeKind;
|
|
12361
12222
|
(function(ZodFirstPartyTypeKind) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
12362
|
-
|
|
12363
12223
|
//#endregion
|
|
12364
12224
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js
|
|
12365
12225
|
const z = {
|
|
@@ -12684,7 +12544,6 @@ function fromJSONSchema(schema, params) {
|
|
|
12684
12544
|
registry: params?.registry ?? globalRegistry
|
|
12685
12545
|
});
|
|
12686
12546
|
}
|
|
12687
|
-
|
|
12688
12547
|
//#endregion
|
|
12689
12548
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/coerce.js
|
|
12690
12549
|
var coerce_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -12695,21 +12554,20 @@ var coerce_exports = /* @__PURE__ */ __exportAll({
|
|
|
12695
12554
|
string: () => string
|
|
12696
12555
|
});
|
|
12697
12556
|
function string(params) {
|
|
12698
|
-
return _coercedString(ZodString, params);
|
|
12557
|
+
return /* @__PURE__ */ _coercedString(ZodString, params);
|
|
12699
12558
|
}
|
|
12700
12559
|
function number(params) {
|
|
12701
|
-
return _coercedNumber(ZodNumber, params);
|
|
12560
|
+
return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
|
|
12702
12561
|
}
|
|
12703
12562
|
function boolean(params) {
|
|
12704
|
-
return _coercedBoolean(ZodBoolean, params);
|
|
12563
|
+
return /* @__PURE__ */ _coercedBoolean(ZodBoolean, params);
|
|
12705
12564
|
}
|
|
12706
12565
|
function bigint(params) {
|
|
12707
|
-
return _coercedBigint(ZodBigInt, params);
|
|
12566
|
+
return /* @__PURE__ */ _coercedBigint(ZodBigInt, params);
|
|
12708
12567
|
}
|
|
12709
12568
|
function date(params) {
|
|
12710
|
-
return _coercedDate(ZodDate, params);
|
|
12569
|
+
return /* @__PURE__ */ _coercedDate(ZodDate, params);
|
|
12711
12570
|
}
|
|
12712
|
-
|
|
12713
12571
|
//#endregion
|
|
12714
12572
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
12715
12573
|
var external_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -12951,204 +12809,159 @@ var external_exports = /* @__PURE__ */ __exportAll({
|
|
|
12951
12809
|
xor: () => xor
|
|
12952
12810
|
});
|
|
12953
12811
|
config(en_default());
|
|
12954
|
-
|
|
12955
|
-
//#endregion
|
|
12956
|
-
//#region src/RequestValidationGenerator.ts
|
|
12957
|
-
const moduleDir$4 = path.dirname(fileURLToPath(import.meta.url));
|
|
12958
|
-
var RequestValidationGenerator = class {
|
|
12959
|
-
static generate(context) {
|
|
12960
|
-
const templateFilePath = path.join(moduleDir$4, "templates", "RequestValidator.ejs");
|
|
12961
|
-
for (const [, entityResource] of Object.entries(context.resources.entityResources)) for (const definition of entityResource.operations) this.writeRequestValidator(templateFilePath, definition, context);
|
|
12962
|
-
}
|
|
12963
|
-
static writeRequestValidator(templateFilePath, operationResource, context) {
|
|
12964
|
-
const { outputDir, definition, outputRequestFileName } = operationResource;
|
|
12965
|
-
const { operationId, request } = definition;
|
|
12966
|
-
const { body, query, param, header } = request;
|
|
12967
|
-
const pascalCaseOperationId = Case.pascal(operationId);
|
|
12968
|
-
const content = context.renderTemplate(templateFilePath, {
|
|
12969
|
-
pascalCaseOperationId,
|
|
12970
|
-
operationId,
|
|
12971
|
-
sourcePath: Path.relative(outputDir, `${operationResource.sourceDir}/${path.relative(operationResource.sourceDir, operationResource.sourceFile).replace(/\.ts$/, "")}`),
|
|
12972
|
-
corePath: context.coreDir,
|
|
12973
|
-
requestFile: Path.relative(outputDir, `${outputDir}/${path.basename(outputRequestFileName, ".ts")}`),
|
|
12974
|
-
body,
|
|
12975
|
-
query,
|
|
12976
|
-
param,
|
|
12977
|
-
header,
|
|
12978
|
-
z: external_exports
|
|
12979
|
-
});
|
|
12980
|
-
const relativePath = path.relative(context.outputDir, operationResource.outputRequestValidationFile);
|
|
12981
|
-
context.writeFile(relativePath, content);
|
|
12982
|
-
}
|
|
12983
|
-
};
|
|
12984
|
-
|
|
12985
12812
|
//#endregion
|
|
12986
|
-
//#region src/
|
|
12813
|
+
//#region src/requestValidationGenerator.ts
|
|
12987
12814
|
const moduleDir$3 = path.dirname(fileURLToPath(import.meta.url));
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
|
|
12994
|
-
|
|
12995
|
-
|
|
12996
|
-
}
|
|
12997
|
-
|
|
12998
|
-
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13002
|
-
|
|
13003
|
-
|
|
13004
|
-
|
|
13005
|
-
|
|
13006
|
-
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
});
|
|
13019
|
-
}
|
|
13020
|
-
continue;
|
|
13021
|
-
}
|
|
13022
|
-
ownResponses.push({
|
|
13023
|
-
name,
|
|
13024
|
-
body: body ? TsTypePrinter.print(TsTypeNode.fromZod(body)) : void 0,
|
|
13025
|
-
header: header ? TsTypePrinter.print(TsTypeNode.fromZod(header)) : void 0,
|
|
13026
|
-
statusCode,
|
|
13027
|
-
statusCodeKey: HttpStatusCode[statusCode]
|
|
13028
|
-
});
|
|
13029
|
-
}
|
|
13030
|
-
const content = context.renderTemplate(templateFile, {
|
|
13031
|
-
operationId,
|
|
13032
|
-
pascalCaseOperationId,
|
|
13033
|
-
coreDir: context.coreDir,
|
|
13034
|
-
ownResponses,
|
|
13035
|
-
entityResponses,
|
|
13036
|
-
sharedResponses,
|
|
13037
|
-
responseFile: Path.relative(outputDir, `${outputDir}/${path.basename(outputResponseFileName, ".ts")}`),
|
|
13038
|
-
sourcePath: Path.relative(outputDir, `${sourceDir}/${path.relative(sourceDir, sourceFile).replace(/\.ts$/, "")}`)
|
|
13039
|
-
});
|
|
13040
|
-
const relativePath = path.relative(context.outputDir, outputResponseFile);
|
|
13041
|
-
context.writeFile(relativePath, content);
|
|
13042
|
-
}
|
|
13043
|
-
static writeEntityResponseType(templateFile, resource, context) {
|
|
13044
|
-
const { name, body, header, outputFile } = resource;
|
|
13045
|
-
const pascalCaseName = Case.pascal(name);
|
|
13046
|
-
const headerTsType = header ? TsTypePrinter.print(TsTypeNode.fromZod(header)) : void 0;
|
|
13047
|
-
const bodyTsType = body ? TsTypePrinter.print(TsTypeNode.fromZod(body)) : void 0;
|
|
13048
|
-
const content = context.renderTemplate(templateFile, {
|
|
13049
|
-
coreDir: context.coreDir,
|
|
13050
|
-
httpStatusCode: HttpStatusCode,
|
|
13051
|
-
headerTsType,
|
|
13052
|
-
bodyTsType,
|
|
13053
|
-
pascalCaseName,
|
|
13054
|
-
sharedResponse: resource
|
|
13055
|
-
});
|
|
13056
|
-
const relativePath = path.relative(context.outputDir, outputFile);
|
|
13057
|
-
context.writeFile(relativePath, content);
|
|
13058
|
-
}
|
|
13059
|
-
};
|
|
13060
|
-
|
|
12815
|
+
function generate$2(context) {
|
|
12816
|
+
const templateFilePath = path.join(moduleDir$3, "templates", "RequestValidator.ejs");
|
|
12817
|
+
for (const resource of context.normalizedSpec.resources) resource.operations.forEach((operation) => {
|
|
12818
|
+
writeRequestValidator(templateFilePath, resource.name, operation, context);
|
|
12819
|
+
});
|
|
12820
|
+
}
|
|
12821
|
+
function writeRequestValidator(templateFilePath, resourceName, operation, context) {
|
|
12822
|
+
const { operationId, request } = operation;
|
|
12823
|
+
const { body, query, param, header } = request ?? {};
|
|
12824
|
+
const outputPaths = context.getOperationOutputPaths({
|
|
12825
|
+
resourceName,
|
|
12826
|
+
operationId
|
|
12827
|
+
});
|
|
12828
|
+
const pascalCaseOperationId = Case.pascal(operationId);
|
|
12829
|
+
const content = context.renderTemplate(templateFilePath, {
|
|
12830
|
+
pascalCaseOperationId,
|
|
12831
|
+
operationId,
|
|
12832
|
+
resourceName,
|
|
12833
|
+
specPath: context.getSpecImportPath({ importerDir: outputPaths.outputDir }),
|
|
12834
|
+
corePath: context.coreDir,
|
|
12835
|
+
requestFile: `./${path.basename(outputPaths.requestFileName, ".ts")}`,
|
|
12836
|
+
body,
|
|
12837
|
+
query,
|
|
12838
|
+
param,
|
|
12839
|
+
header,
|
|
12840
|
+
z: external_exports
|
|
12841
|
+
});
|
|
12842
|
+
const relativePath = path.relative(context.outputDir, outputPaths.requestValidationFile);
|
|
12843
|
+
context.writeFile(relativePath, content);
|
|
12844
|
+
}
|
|
13061
12845
|
//#endregion
|
|
13062
|
-
//#region src/
|
|
12846
|
+
//#region src/responseGenerator.ts
|
|
13063
12847
|
const moduleDir$2 = path.dirname(fileURLToPath(import.meta.url));
|
|
13064
|
-
|
|
13065
|
-
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
|
|
13069
|
-
|
|
13070
|
-
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
const sharedResponse = context.resources.sharedResponseResources.find((resource) => resource.name === name);
|
|
13087
|
-
let importPath;
|
|
13088
|
-
if (!sharedResponse) {
|
|
13089
|
-
const entityResponse = (context.resources.entityResources[resource.entityName]?.responses)?.find((r) => r.name === name);
|
|
13090
|
-
if (entityResponse) importPath = Path.relative(outputDir, `${entityResponse.outputDir}/${path.basename(entityResponse.outputFileName, ".ts")}`);
|
|
13091
|
-
else throw new Error(`Shared response '${response.name}' not found in shared or entity resources`);
|
|
13092
|
-
} else importPath = Path.relative(outputDir, `${sharedResponse.outputDir}/${path.basename(sharedResponse.outputFileName, ".ts")}`);
|
|
13093
|
-
sharedResponses.push({
|
|
13094
|
-
name,
|
|
13095
|
-
importPath,
|
|
13096
|
-
hasBody: !!body,
|
|
13097
|
-
hasHeader: !!header,
|
|
13098
|
-
statusCode,
|
|
13099
|
-
index
|
|
13100
|
-
});
|
|
13101
|
-
continue;
|
|
13102
|
-
}
|
|
13103
|
-
ownResponses.push({
|
|
13104
|
-
name,
|
|
13105
|
-
hasBody: !!body,
|
|
13106
|
-
hasHeader: !!header,
|
|
13107
|
-
statusCode,
|
|
13108
|
-
statusCodeKey: HttpStatusCode[statusCode],
|
|
13109
|
-
index
|
|
12848
|
+
function generate$1(context) {
|
|
12849
|
+
const templateFile = path.join(moduleDir$2, "templates", "Response.ejs");
|
|
12850
|
+
const canonicalResponseTemplateFile = path.join(moduleDir$2, "templates", "SharedResponse.ejs");
|
|
12851
|
+
for (const response of context.normalizedSpec.responses) writeCanonicalResponseType(canonicalResponseTemplateFile, response, context);
|
|
12852
|
+
for (const resource of context.normalizedSpec.resources) for (const operation of resource.operations) writeResponseType(templateFile, resource, operation, context);
|
|
12853
|
+
}
|
|
12854
|
+
function writeResponseType(templateFile, resource, operation, context) {
|
|
12855
|
+
const outputPaths = context.getOperationOutputPaths({
|
|
12856
|
+
resourceName: resource.name,
|
|
12857
|
+
operationId: operation.operationId
|
|
12858
|
+
});
|
|
12859
|
+
const pascalCaseOperationId = Case.pascal(operation.operationId);
|
|
12860
|
+
const ownResponses = [];
|
|
12861
|
+
const canonicalResponses = [];
|
|
12862
|
+
for (const responseUsage of operation.responses) {
|
|
12863
|
+
if (responseUsage.source === "canonical") {
|
|
12864
|
+
canonicalResponses.push({
|
|
12865
|
+
name: responseUsage.responseName,
|
|
12866
|
+
path: context.getCanonicalResponseImportPath({
|
|
12867
|
+
importerDir: outputPaths.outputDir,
|
|
12868
|
+
responseName: responseUsage.responseName
|
|
12869
|
+
})
|
|
13110
12870
|
});
|
|
12871
|
+
continue;
|
|
13111
12872
|
}
|
|
13112
|
-
|
|
13113
|
-
operationId,
|
|
13114
|
-
pascalCaseOperationId,
|
|
13115
|
-
coreDir: context.coreDir,
|
|
13116
|
-
responseFile: `./${path.basename(outputResponseFileName, ".ts")}`,
|
|
13117
|
-
sourcePath: Path.relative(outputDir, `${sourceDir}/${path.relative(sourceDir, sourceFile).replace(/\.ts$/, "")}`),
|
|
13118
|
-
sharedResponses,
|
|
13119
|
-
ownResponses,
|
|
13120
|
-
allStatusCodes
|
|
13121
|
-
});
|
|
13122
|
-
const relativePath = path.relative(context.outputDir, outputResponseValidationFile);
|
|
13123
|
-
context.writeFile(relativePath, content);
|
|
12873
|
+
ownResponses.push(createOwnResponseTemplateData(responseUsage.response));
|
|
13124
12874
|
}
|
|
13125
|
-
|
|
13126
|
-
|
|
12875
|
+
const content = context.renderTemplate(templateFile, {
|
|
12876
|
+
operationId: operation.operationId,
|
|
12877
|
+
pascalCaseOperationId,
|
|
12878
|
+
coreDir: context.coreDir,
|
|
12879
|
+
ownResponses,
|
|
12880
|
+
entityResponses: [],
|
|
12881
|
+
sharedResponses: canonicalResponses,
|
|
12882
|
+
responseFile: `./${path.basename(outputPaths.responseFileName, ".ts")}`
|
|
12883
|
+
});
|
|
12884
|
+
const relativePath = path.relative(context.outputDir, outputPaths.responseFile);
|
|
12885
|
+
context.writeFile(relativePath, content);
|
|
12886
|
+
}
|
|
12887
|
+
function createOwnResponseTemplateData(response) {
|
|
12888
|
+
return {
|
|
12889
|
+
name: response.name,
|
|
12890
|
+
body: response.body ? print(fromZod(response.body)) : void 0,
|
|
12891
|
+
header: response.header ? print(fromZod(response.header)) : void 0,
|
|
12892
|
+
statusCode: response.statusCode,
|
|
12893
|
+
statusCodeKey: HttpStatusCode[response.statusCode]
|
|
12894
|
+
};
|
|
12895
|
+
}
|
|
12896
|
+
function writeCanonicalResponseType(templateFile, response, context) {
|
|
12897
|
+
const pascalCaseName = Case.pascal(response.name);
|
|
12898
|
+
const headerTsType = response.header ? print(fromZod(response.header)) : void 0;
|
|
12899
|
+
const bodyTsType = response.body ? print(fromZod(response.body)) : void 0;
|
|
12900
|
+
const content = context.renderTemplate(templateFile, {
|
|
12901
|
+
coreDir: context.coreDir,
|
|
12902
|
+
httpStatusCode: HttpStatusCode,
|
|
12903
|
+
headerTsType,
|
|
12904
|
+
bodyTsType,
|
|
12905
|
+
pascalCaseName,
|
|
12906
|
+
sharedResponse: response
|
|
12907
|
+
});
|
|
12908
|
+
const relativePath = path.relative(context.outputDir, context.getCanonicalResponseOutputFile(response.name));
|
|
12909
|
+
context.writeFile(relativePath, content);
|
|
12910
|
+
}
|
|
13127
12911
|
//#endregion
|
|
13128
|
-
//#region src/
|
|
12912
|
+
//#region src/responseValidationGenerator.ts
|
|
13129
12913
|
const moduleDir$1 = path.dirname(fileURLToPath(import.meta.url));
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
|
|
13134
|
-
}
|
|
13135
|
-
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
13140
|
-
|
|
13141
|
-
|
|
13142
|
-
|
|
13143
|
-
|
|
13144
|
-
|
|
13145
|
-
|
|
12914
|
+
function generate(context) {
|
|
12915
|
+
const templateFilePath = path.join(moduleDir$1, "templates", "ResponseValidator.ejs");
|
|
12916
|
+
for (const resource of context.normalizedSpec.resources) resource.operations.forEach((operation) => {
|
|
12917
|
+
writeResponseValidator(templateFilePath, resource, operation, context);
|
|
12918
|
+
});
|
|
12919
|
+
}
|
|
12920
|
+
function writeResponseValidator(templateFilePath, resource, operation, context) {
|
|
12921
|
+
const outputPaths = context.getOperationOutputPaths({
|
|
12922
|
+
resourceName: resource.name,
|
|
12923
|
+
operationId: operation.operationId
|
|
12924
|
+
});
|
|
12925
|
+
const pascalCaseOperationId = Case.pascal(operation.operationId);
|
|
12926
|
+
const ownResponses = [];
|
|
12927
|
+
const sharedResponses = [];
|
|
12928
|
+
const allStatusCodes = /* @__PURE__ */ new Map();
|
|
12929
|
+
operation.responses.forEach((responseUsage) => {
|
|
12930
|
+
const response = responseUsage.source === "canonical" ? context.getCanonicalResponse(responseUsage.responseName) : responseUsage.response;
|
|
12931
|
+
allStatusCodes.set(response.statusCode, response.statusCodeName);
|
|
12932
|
+
const templateData = {
|
|
12933
|
+
definitionVariableName: `${Case.camel(response.name)}Definition`,
|
|
12934
|
+
name: response.name,
|
|
12935
|
+
hasBody: response.body !== void 0,
|
|
12936
|
+
hasHeader: response.header !== void 0,
|
|
12937
|
+
statusCode: response.statusCode
|
|
12938
|
+
};
|
|
12939
|
+
if (responseUsage.source === "canonical") {
|
|
12940
|
+
sharedResponses.push(templateData);
|
|
12941
|
+
return;
|
|
12942
|
+
}
|
|
12943
|
+
ownResponses.push({
|
|
12944
|
+
...templateData,
|
|
12945
|
+
statusCodeKey: HttpStatusCode[response.statusCode]
|
|
13146
12946
|
});
|
|
13147
|
-
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
|
|
13151
|
-
|
|
12947
|
+
});
|
|
12948
|
+
const content = context.renderTemplate(templateFilePath, {
|
|
12949
|
+
resourceName: resource.name,
|
|
12950
|
+
operationId: operation.operationId,
|
|
12951
|
+
pascalCaseOperationId,
|
|
12952
|
+
coreDir: context.coreDir,
|
|
12953
|
+
responseFile: `./${path.basename(outputPaths.responseFileName, ".ts")}`,
|
|
12954
|
+
specPath: context.getSpecImportPath({ importerDir: outputPaths.outputDir }),
|
|
12955
|
+
sharedResponses,
|
|
12956
|
+
ownResponses,
|
|
12957
|
+
allStatusCodes: Array.from(allStatusCodes.entries()).map(([statusCode, name]) => ({
|
|
12958
|
+
statusCode,
|
|
12959
|
+
name
|
|
12960
|
+
}))
|
|
12961
|
+
});
|
|
12962
|
+
const relativePath = path.relative(context.outputDir, outputPaths.responseValidationFile);
|
|
12963
|
+
context.writeFile(relativePath, content);
|
|
12964
|
+
}
|
|
13152
12965
|
//#endregion
|
|
13153
12966
|
//#region src/index.ts
|
|
13154
12967
|
const moduleDir = path.dirname(fileURLToPath(import.meta.url));
|
|
@@ -13157,14 +12970,13 @@ var TypesPlugin = class extends BasePlugin {
|
|
|
13157
12970
|
generate(context) {
|
|
13158
12971
|
const libDir = path.join(moduleDir, "lib");
|
|
13159
12972
|
this.copyLibFiles(context, libDir, this.name);
|
|
13160
|
-
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
ResponseValidationGenerator.generate(context);
|
|
12973
|
+
generate$3(context);
|
|
12974
|
+
generate$2(context);
|
|
12975
|
+
generate$1(context);
|
|
12976
|
+
generate(context);
|
|
13165
12977
|
}
|
|
13166
12978
|
};
|
|
13167
|
-
|
|
13168
12979
|
//#endregion
|
|
13169
12980
|
export { TypesPlugin as default };
|
|
12981
|
+
|
|
13170
12982
|
//# sourceMappingURL=index.mjs.map
|