@rexeus/typeweaver-types 0.8.0 → 0.9.1
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 -467
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +327 -458
- package/dist/index.mjs.map +1 -1
- 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/RequestValidator.ejs +9 -15
- package/dist/templates/Response.ejs +2 -0
- package/dist/templates/ResponseValidator.ejs +12 -2
- package/package.json +7 -7
- package/dist/lib/assert.d.ts +0 -1
- package/dist/lib/assert.js +0 -11
package/dist/index.cjs
CHANGED
|
@@ -7,28 +7,20 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
8
|
var __exportAll = (all, no_symbols) => {
|
|
9
9
|
let target = {};
|
|
10
|
-
for (var name in all) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
if (!no_symbols) {
|
|
17
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
|
-
}
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
19
15
|
return target;
|
|
20
16
|
};
|
|
21
17
|
var __copyProps = (to, from, except, desc) => {
|
|
22
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
19
|
+
key = keys[i];
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
21
|
+
get: ((k) => from[k]).bind(null, key),
|
|
22
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
23
|
+
});
|
|
32
24
|
}
|
|
33
25
|
return to;
|
|
34
26
|
};
|
|
@@ -36,7 +28,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
28
|
value: mod,
|
|
37
29
|
enumerable: true
|
|
38
30
|
}) : target, mod));
|
|
39
|
-
|
|
40
31
|
//#endregion
|
|
41
32
|
let node_path = require("node:path");
|
|
42
33
|
node_path = __toESM(node_path);
|
|
@@ -46,30 +37,30 @@ let _rexeus_typeweaver_zod_to_ts = require("@rexeus/typeweaver-zod-to-ts");
|
|
|
46
37
|
let case$1 = require("case");
|
|
47
38
|
case$1 = __toESM(case$1);
|
|
48
39
|
let _rexeus_typeweaver_core = require("@rexeus/typeweaver-core");
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
40
|
+
//#region src/requestGenerator.ts
|
|
41
|
+
const moduleDir$4 = node_path.default.dirname((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
42
|
+
function generate$3(context) {
|
|
43
|
+
const templateFilePath = node_path.default.join(moduleDir$4, "templates", "Request.ejs");
|
|
44
|
+
for (const resource of context.normalizedSpec.resources) for (const operation of resource.operations) writeRequestType(templateFilePath, resource.name, operation, context);
|
|
45
|
+
}
|
|
46
|
+
function writeRequestType(templateFilePath, resourceName, operation, context) {
|
|
47
|
+
const { request, operationId, method } = operation;
|
|
48
|
+
const { header, query, param, body } = request ?? {};
|
|
49
|
+
const outputPaths = context.getOperationOutputPaths({
|
|
50
|
+
resourceName,
|
|
51
|
+
operationId
|
|
52
|
+
});
|
|
53
|
+
const content = context.renderTemplate(templateFilePath, {
|
|
54
|
+
pascalCaseOperationId: case$1.default.pascal(operationId),
|
|
55
|
+
method,
|
|
56
|
+
headerTsType: header ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(header)) : void 0,
|
|
57
|
+
queryTsType: query ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(query)) : void 0,
|
|
58
|
+
paramTsType: param ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(param)) : void 0,
|
|
59
|
+
bodyTsType: body ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(body)) : void 0
|
|
60
|
+
});
|
|
61
|
+
const relativePath = node_path.default.relative(context.outputDir, outputPaths.requestFile);
|
|
62
|
+
context.writeFile(relativePath, content);
|
|
63
|
+
}
|
|
73
64
|
//#endregion
|
|
74
65
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js
|
|
75
66
|
/** A special constant with type `never` */
|
|
@@ -130,7 +121,6 @@ function config(newConfig) {
|
|
|
130
121
|
if (newConfig) Object.assign(globalConfig, newConfig);
|
|
131
122
|
return globalConfig;
|
|
132
123
|
}
|
|
133
|
-
|
|
134
124
|
//#endregion
|
|
135
125
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js
|
|
136
126
|
var util_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -279,10 +269,7 @@ function assignProp(target, prop, value) {
|
|
|
279
269
|
}
|
|
280
270
|
function mergeDefs(...defs) {
|
|
281
271
|
const mergedDescriptors = {};
|
|
282
|
-
for (const def of defs)
|
|
283
|
-
const descriptors = Object.getOwnPropertyDescriptors(def);
|
|
284
|
-
Object.assign(mergedDescriptors, descriptors);
|
|
285
|
-
}
|
|
272
|
+
for (const def of defs) Object.assign(mergedDescriptors, Object.getOwnPropertyDescriptors(def));
|
|
286
273
|
return Object.defineProperties({}, mergedDescriptors);
|
|
287
274
|
}
|
|
288
275
|
function cloneDef(schema) {
|
|
@@ -679,7 +666,6 @@ function uint8ArrayToHex(bytes) {
|
|
|
679
666
|
var Class = class {
|
|
680
667
|
constructor(..._args) {}
|
|
681
668
|
};
|
|
682
|
-
|
|
683
669
|
//#endregion
|
|
684
670
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js
|
|
685
671
|
const initializer$1 = (inst, def) => {
|
|
@@ -825,7 +811,6 @@ function prettifyError(error) {
|
|
|
825
811
|
}
|
|
826
812
|
return lines.join("\n");
|
|
827
813
|
}
|
|
828
|
-
|
|
829
814
|
//#endregion
|
|
830
815
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js
|
|
831
816
|
const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
@@ -929,7 +914,6 @@ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
929
914
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
930
915
|
};
|
|
931
916
|
const safeDecodeAsync$1 = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
932
|
-
|
|
933
917
|
//#endregion
|
|
934
918
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js
|
|
935
919
|
var regexes_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1092,7 +1076,6 @@ const sha384_base64url = /* @__PURE__ */ fixedBase64url(64);
|
|
|
1092
1076
|
const sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
1093
1077
|
const sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
1094
1078
|
const sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
1095
|
-
|
|
1096
1079
|
//#endregion
|
|
1097
1080
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js
|
|
1098
1081
|
const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
@@ -1598,7 +1581,6 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
|
|
|
1598
1581
|
payload.value = def.tx(payload.value);
|
|
1599
1582
|
};
|
|
1600
1583
|
});
|
|
1601
|
-
|
|
1602
1584
|
//#endregion
|
|
1603
1585
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js
|
|
1604
1586
|
var Doc = class {
|
|
@@ -1630,7 +1612,6 @@ var Doc = class {
|
|
|
1630
1612
|
return new F(...args, lines.join("\n"));
|
|
1631
1613
|
}
|
|
1632
1614
|
};
|
|
1633
|
-
|
|
1634
1615
|
//#endregion
|
|
1635
1616
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js
|
|
1636
1617
|
const version = {
|
|
@@ -1638,7 +1619,6 @@ const version = {
|
|
|
1638
1619
|
minor: 3,
|
|
1639
1620
|
patch: 6
|
|
1640
1621
|
};
|
|
1641
|
-
|
|
1642
1622
|
//#endregion
|
|
1643
1623
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js
|
|
1644
1624
|
const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
@@ -2381,8 +2361,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
|
|
|
2381
2361
|
let fastpass;
|
|
2382
2362
|
const isObject$1 = isObject;
|
|
2383
2363
|
const jit = !globalConfig.jitless;
|
|
2384
|
-
const
|
|
2385
|
-
const fastEnabled = jit && allowsEval$1.value;
|
|
2364
|
+
const fastEnabled = jit && allowsEval.value;
|
|
2386
2365
|
const catchall = def.catchall;
|
|
2387
2366
|
let value;
|
|
2388
2367
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3370,7 +3349,6 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
3370
3349
|
payload.issues.push(issue(_iss));
|
|
3371
3350
|
}
|
|
3372
3351
|
}
|
|
3373
|
-
|
|
3374
3352
|
//#endregion
|
|
3375
3353
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ar.js
|
|
3376
3354
|
const error$46 = () => {
|
|
@@ -3470,7 +3448,6 @@ const error$46 = () => {
|
|
|
3470
3448
|
function ar_default() {
|
|
3471
3449
|
return { localeError: error$46() };
|
|
3472
3450
|
}
|
|
3473
|
-
|
|
3474
3451
|
//#endregion
|
|
3475
3452
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/az.js
|
|
3476
3453
|
const error$45 = () => {
|
|
@@ -3570,7 +3547,6 @@ const error$45 = () => {
|
|
|
3570
3547
|
function az_default() {
|
|
3571
3548
|
return { localeError: error$45() };
|
|
3572
3549
|
}
|
|
3573
|
-
|
|
3574
3550
|
//#endregion
|
|
3575
3551
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/be.js
|
|
3576
3552
|
function getBelarusianPlural(count, one, few, many) {
|
|
@@ -3705,7 +3681,6 @@ const error$44 = () => {
|
|
|
3705
3681
|
function be_default() {
|
|
3706
3682
|
return { localeError: error$44() };
|
|
3707
3683
|
}
|
|
3708
|
-
|
|
3709
3684
|
//#endregion
|
|
3710
3685
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/bg.js
|
|
3711
3686
|
const error$43 = () => {
|
|
@@ -3815,7 +3790,6 @@ const error$43 = () => {
|
|
|
3815
3790
|
function bg_default() {
|
|
3816
3791
|
return { localeError: error$43() };
|
|
3817
3792
|
}
|
|
3818
|
-
|
|
3819
3793
|
//#endregion
|
|
3820
3794
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ca.js
|
|
3821
3795
|
const error$42 = () => {
|
|
@@ -3915,7 +3889,6 @@ const error$42 = () => {
|
|
|
3915
3889
|
function ca_default() {
|
|
3916
3890
|
return { localeError: error$42() };
|
|
3917
3891
|
}
|
|
3918
|
-
|
|
3919
3892
|
//#endregion
|
|
3920
3893
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/cs.js
|
|
3921
3894
|
const error$41 = () => {
|
|
@@ -4021,7 +3994,6 @@ const error$41 = () => {
|
|
|
4021
3994
|
function cs_default() {
|
|
4022
3995
|
return { localeError: error$41() };
|
|
4023
3996
|
}
|
|
4024
|
-
|
|
4025
3997
|
//#endregion
|
|
4026
3998
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/da.js
|
|
4027
3999
|
const error$40 = () => {
|
|
@@ -4132,7 +4104,6 @@ const error$40 = () => {
|
|
|
4132
4104
|
function da_default() {
|
|
4133
4105
|
return { localeError: error$40() };
|
|
4134
4106
|
}
|
|
4135
|
-
|
|
4136
4107
|
//#endregion
|
|
4137
4108
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/de.js
|
|
4138
4109
|
const error$39 = () => {
|
|
@@ -4236,7 +4207,6 @@ const error$39 = () => {
|
|
|
4236
4207
|
function de_default() {
|
|
4237
4208
|
return { localeError: error$39() };
|
|
4238
4209
|
}
|
|
4239
|
-
|
|
4240
4210
|
//#endregion
|
|
4241
4211
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/en.js
|
|
4242
4212
|
const error$38 = () => {
|
|
@@ -4339,7 +4309,6 @@ const error$38 = () => {
|
|
|
4339
4309
|
function en_default() {
|
|
4340
4310
|
return { localeError: error$38() };
|
|
4341
4311
|
}
|
|
4342
|
-
|
|
4343
4312
|
//#endregion
|
|
4344
4313
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/eo.js
|
|
4345
4314
|
const error$37 = () => {
|
|
@@ -4444,7 +4413,6 @@ const error$37 = () => {
|
|
|
4444
4413
|
function eo_default() {
|
|
4445
4414
|
return { localeError: error$37() };
|
|
4446
4415
|
}
|
|
4447
|
-
|
|
4448
4416
|
//#endregion
|
|
4449
4417
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/es.js
|
|
4450
4418
|
const error$36 = () => {
|
|
@@ -4572,7 +4540,6 @@ const error$36 = () => {
|
|
|
4572
4540
|
function es_default() {
|
|
4573
4541
|
return { localeError: error$36() };
|
|
4574
4542
|
}
|
|
4575
|
-
|
|
4576
4543
|
//#endregion
|
|
4577
4544
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fa.js
|
|
4578
4545
|
const error$35 = () => {
|
|
@@ -4676,7 +4643,6 @@ const error$35 = () => {
|
|
|
4676
4643
|
function fa_default() {
|
|
4677
4644
|
return { localeError: error$35() };
|
|
4678
4645
|
}
|
|
4679
|
-
|
|
4680
4646
|
//#endregion
|
|
4681
4647
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fi.js
|
|
4682
4648
|
const error$34 = () => {
|
|
@@ -4792,7 +4758,6 @@ const error$34 = () => {
|
|
|
4792
4758
|
function fi_default() {
|
|
4793
4759
|
return { localeError: error$34() };
|
|
4794
4760
|
}
|
|
4795
|
-
|
|
4796
4761
|
//#endregion
|
|
4797
4762
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr.js
|
|
4798
4763
|
const error$33 = () => {
|
|
@@ -4896,7 +4861,6 @@ const error$33 = () => {
|
|
|
4896
4861
|
function fr_default() {
|
|
4897
4862
|
return { localeError: error$33() };
|
|
4898
4863
|
}
|
|
4899
|
-
|
|
4900
4864
|
//#endregion
|
|
4901
4865
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr-CA.js
|
|
4902
4866
|
const error$32 = () => {
|
|
@@ -4996,7 +4960,6 @@ const error$32 = () => {
|
|
|
4996
4960
|
function fr_CA_default() {
|
|
4997
4961
|
return { localeError: error$32() };
|
|
4998
4962
|
}
|
|
4999
|
-
|
|
5000
4963
|
//#endregion
|
|
5001
4964
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/he.js
|
|
5002
4965
|
const error$31 = () => {
|
|
@@ -5302,7 +5265,6 @@ const error$31 = () => {
|
|
|
5302
5265
|
function he_default() {
|
|
5303
5266
|
return { localeError: error$31() };
|
|
5304
5267
|
}
|
|
5305
|
-
|
|
5306
5268
|
//#endregion
|
|
5307
5269
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hu.js
|
|
5308
5270
|
const error$30 = () => {
|
|
@@ -5406,7 +5368,6 @@ const error$30 = () => {
|
|
|
5406
5368
|
function hu_default() {
|
|
5407
5369
|
return { localeError: error$30() };
|
|
5408
5370
|
}
|
|
5409
|
-
|
|
5410
5371
|
//#endregion
|
|
5411
5372
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hy.js
|
|
5412
5373
|
function getArmenianPlural(count, one, many) {
|
|
@@ -5545,7 +5506,6 @@ const error$29 = () => {
|
|
|
5545
5506
|
function hy_default() {
|
|
5546
5507
|
return { localeError: error$29() };
|
|
5547
5508
|
}
|
|
5548
|
-
|
|
5549
5509
|
//#endregion
|
|
5550
5510
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/id.js
|
|
5551
5511
|
const error$28 = () => {
|
|
@@ -5645,7 +5605,6 @@ const error$28 = () => {
|
|
|
5645
5605
|
function id_default() {
|
|
5646
5606
|
return { localeError: error$28() };
|
|
5647
5607
|
}
|
|
5648
|
-
|
|
5649
5608
|
//#endregion
|
|
5650
5609
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/is.js
|
|
5651
5610
|
const error$27 = () => {
|
|
@@ -5749,7 +5708,6 @@ const error$27 = () => {
|
|
|
5749
5708
|
function is_default() {
|
|
5750
5709
|
return { localeError: error$27() };
|
|
5751
5710
|
}
|
|
5752
|
-
|
|
5753
5711
|
//#endregion
|
|
5754
5712
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/it.js
|
|
5755
5713
|
const error$26 = () => {
|
|
@@ -5853,7 +5811,6 @@ const error$26 = () => {
|
|
|
5853
5811
|
function it_default() {
|
|
5854
5812
|
return { localeError: error$26() };
|
|
5855
5813
|
}
|
|
5856
|
-
|
|
5857
5814
|
//#endregion
|
|
5858
5815
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ja.js
|
|
5859
5816
|
const error$25 = () => {
|
|
@@ -5957,7 +5914,6 @@ const error$25 = () => {
|
|
|
5957
5914
|
function ja_default() {
|
|
5958
5915
|
return { localeError: error$25() };
|
|
5959
5916
|
}
|
|
5960
|
-
|
|
5961
5917
|
//#endregion
|
|
5962
5918
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ka.js
|
|
5963
5919
|
const error$24 = () => {
|
|
@@ -6064,7 +6020,6 @@ const error$24 = () => {
|
|
|
6064
6020
|
function ka_default() {
|
|
6065
6021
|
return { localeError: error$24() };
|
|
6066
6022
|
}
|
|
6067
|
-
|
|
6068
6023
|
//#endregion
|
|
6069
6024
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/km.js
|
|
6070
6025
|
const error$23 = () => {
|
|
@@ -6169,14 +6124,12 @@ const error$23 = () => {
|
|
|
6169
6124
|
function km_default() {
|
|
6170
6125
|
return { localeError: error$23() };
|
|
6171
6126
|
}
|
|
6172
|
-
|
|
6173
6127
|
//#endregion
|
|
6174
6128
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/kh.js
|
|
6175
6129
|
/** @deprecated Use `km` instead. */
|
|
6176
6130
|
function kh_default() {
|
|
6177
6131
|
return km_default();
|
|
6178
6132
|
}
|
|
6179
|
-
|
|
6180
6133
|
//#endregion
|
|
6181
6134
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ko.js
|
|
6182
6135
|
const error$22 = () => {
|
|
@@ -6280,7 +6233,6 @@ const error$22 = () => {
|
|
|
6280
6233
|
function ko_default() {
|
|
6281
6234
|
return { localeError: error$22() };
|
|
6282
6235
|
}
|
|
6283
|
-
|
|
6284
6236
|
//#endregion
|
|
6285
6237
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/lt.js
|
|
6286
6238
|
const capitalizeFirstCharacter = (text) => {
|
|
@@ -6462,7 +6414,6 @@ const error$21 = () => {
|
|
|
6462
6414
|
function lt_default() {
|
|
6463
6415
|
return { localeError: error$21() };
|
|
6464
6416
|
}
|
|
6465
|
-
|
|
6466
6417
|
//#endregion
|
|
6467
6418
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/mk.js
|
|
6468
6419
|
const error$20 = () => {
|
|
@@ -6566,7 +6517,6 @@ const error$20 = () => {
|
|
|
6566
6517
|
function mk_default() {
|
|
6567
6518
|
return { localeError: error$20() };
|
|
6568
6519
|
}
|
|
6569
|
-
|
|
6570
6520
|
//#endregion
|
|
6571
6521
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ms.js
|
|
6572
6522
|
const error$19 = () => {
|
|
@@ -6669,7 +6619,6 @@ const error$19 = () => {
|
|
|
6669
6619
|
function ms_default() {
|
|
6670
6620
|
return { localeError: error$19() };
|
|
6671
6621
|
}
|
|
6672
|
-
|
|
6673
6622
|
//#endregion
|
|
6674
6623
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/nl.js
|
|
6675
6624
|
const error$18 = () => {
|
|
@@ -6774,7 +6723,6 @@ const error$18 = () => {
|
|
|
6774
6723
|
function nl_default() {
|
|
6775
6724
|
return { localeError: error$18() };
|
|
6776
6725
|
}
|
|
6777
|
-
|
|
6778
6726
|
//#endregion
|
|
6779
6727
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/no.js
|
|
6780
6728
|
const error$17 = () => {
|
|
@@ -6878,7 +6826,6 @@ const error$17 = () => {
|
|
|
6878
6826
|
function no_default() {
|
|
6879
6827
|
return { localeError: error$17() };
|
|
6880
6828
|
}
|
|
6881
|
-
|
|
6882
6829
|
//#endregion
|
|
6883
6830
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ota.js
|
|
6884
6831
|
const error$16 = () => {
|
|
@@ -6983,7 +6930,6 @@ const error$16 = () => {
|
|
|
6983
6930
|
function ota_default() {
|
|
6984
6931
|
return { localeError: error$16() };
|
|
6985
6932
|
}
|
|
6986
|
-
|
|
6987
6933
|
//#endregion
|
|
6988
6934
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ps.js
|
|
6989
6935
|
const error$15 = () => {
|
|
@@ -7087,7 +7033,6 @@ const error$15 = () => {
|
|
|
7087
7033
|
function ps_default() {
|
|
7088
7034
|
return { localeError: error$15() };
|
|
7089
7035
|
}
|
|
7090
|
-
|
|
7091
7036
|
//#endregion
|
|
7092
7037
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pl.js
|
|
7093
7038
|
const error$14 = () => {
|
|
@@ -7191,7 +7136,6 @@ const error$14 = () => {
|
|
|
7191
7136
|
function pl_default() {
|
|
7192
7137
|
return { localeError: error$14() };
|
|
7193
7138
|
}
|
|
7194
|
-
|
|
7195
7139
|
//#endregion
|
|
7196
7140
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pt.js
|
|
7197
7141
|
const error$13 = () => {
|
|
@@ -7295,7 +7239,6 @@ const error$13 = () => {
|
|
|
7295
7239
|
function pt_default() {
|
|
7296
7240
|
return { localeError: error$13() };
|
|
7297
7241
|
}
|
|
7298
|
-
|
|
7299
7242
|
//#endregion
|
|
7300
7243
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ru.js
|
|
7301
7244
|
function getRussianPlural(count, one, few, many) {
|
|
@@ -7430,7 +7373,6 @@ const error$12 = () => {
|
|
|
7430
7373
|
function ru_default() {
|
|
7431
7374
|
return { localeError: error$12() };
|
|
7432
7375
|
}
|
|
7433
|
-
|
|
7434
7376
|
//#endregion
|
|
7435
7377
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sl.js
|
|
7436
7378
|
const error$11 = () => {
|
|
@@ -7534,7 +7476,6 @@ const error$11 = () => {
|
|
|
7534
7476
|
function sl_default() {
|
|
7535
7477
|
return { localeError: error$11() };
|
|
7536
7478
|
}
|
|
7537
|
-
|
|
7538
7479
|
//#endregion
|
|
7539
7480
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sv.js
|
|
7540
7481
|
const error$10 = () => {
|
|
@@ -7638,7 +7579,6 @@ const error$10 = () => {
|
|
|
7638
7579
|
function sv_default() {
|
|
7639
7580
|
return { localeError: error$10() };
|
|
7640
7581
|
}
|
|
7641
|
-
|
|
7642
7582
|
//#endregion
|
|
7643
7583
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ta.js
|
|
7644
7584
|
const error$9 = () => {
|
|
@@ -7743,7 +7683,6 @@ const error$9 = () => {
|
|
|
7743
7683
|
function ta_default() {
|
|
7744
7684
|
return { localeError: error$9() };
|
|
7745
7685
|
}
|
|
7746
|
-
|
|
7747
7686
|
//#endregion
|
|
7748
7687
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/th.js
|
|
7749
7688
|
const error$8 = () => {
|
|
@@ -7848,7 +7787,6 @@ const error$8 = () => {
|
|
|
7848
7787
|
function th_default() {
|
|
7849
7788
|
return { localeError: error$8() };
|
|
7850
7789
|
}
|
|
7851
|
-
|
|
7852
7790
|
//#endregion
|
|
7853
7791
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/tr.js
|
|
7854
7792
|
const error$7 = () => {
|
|
@@ -7948,7 +7886,6 @@ const error$7 = () => {
|
|
|
7948
7886
|
function tr_default() {
|
|
7949
7887
|
return { localeError: error$7() };
|
|
7950
7888
|
}
|
|
7951
|
-
|
|
7952
7889
|
//#endregion
|
|
7953
7890
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uk.js
|
|
7954
7891
|
const error$6 = () => {
|
|
@@ -8052,14 +7989,12 @@ const error$6 = () => {
|
|
|
8052
7989
|
function uk_default() {
|
|
8053
7990
|
return { localeError: error$6() };
|
|
8054
7991
|
}
|
|
8055
|
-
|
|
8056
7992
|
//#endregion
|
|
8057
7993
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ua.js
|
|
8058
7994
|
/** @deprecated Use `uk` instead. */
|
|
8059
7995
|
function ua_default() {
|
|
8060
7996
|
return uk_default();
|
|
8061
7997
|
}
|
|
8062
|
-
|
|
8063
7998
|
//#endregion
|
|
8064
7999
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ur.js
|
|
8065
8000
|
const error$5 = () => {
|
|
@@ -8164,7 +8099,6 @@ const error$5 = () => {
|
|
|
8164
8099
|
function ur_default() {
|
|
8165
8100
|
return { localeError: error$5() };
|
|
8166
8101
|
}
|
|
8167
|
-
|
|
8168
8102
|
//#endregion
|
|
8169
8103
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uz.js
|
|
8170
8104
|
const error$4 = () => {
|
|
@@ -8269,7 +8203,6 @@ const error$4 = () => {
|
|
|
8269
8203
|
function uz_default() {
|
|
8270
8204
|
return { localeError: error$4() };
|
|
8271
8205
|
}
|
|
8272
|
-
|
|
8273
8206
|
//#endregion
|
|
8274
8207
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/vi.js
|
|
8275
8208
|
const error$3 = () => {
|
|
@@ -8373,7 +8306,6 @@ const error$3 = () => {
|
|
|
8373
8306
|
function vi_default() {
|
|
8374
8307
|
return { localeError: error$3() };
|
|
8375
8308
|
}
|
|
8376
|
-
|
|
8377
8309
|
//#endregion
|
|
8378
8310
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-CN.js
|
|
8379
8311
|
const error$2 = () => {
|
|
@@ -8478,7 +8410,6 @@ const error$2 = () => {
|
|
|
8478
8410
|
function zh_CN_default() {
|
|
8479
8411
|
return { localeError: error$2() };
|
|
8480
8412
|
}
|
|
8481
|
-
|
|
8482
8413
|
//#endregion
|
|
8483
8414
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-TW.js
|
|
8484
8415
|
const error$1 = () => {
|
|
@@ -8578,7 +8509,6 @@ const error$1 = () => {
|
|
|
8578
8509
|
function zh_TW_default() {
|
|
8579
8510
|
return { localeError: error$1() };
|
|
8580
8511
|
}
|
|
8581
|
-
|
|
8582
8512
|
//#endregion
|
|
8583
8513
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/yo.js
|
|
8584
8514
|
const error = () => {
|
|
@@ -8682,7 +8612,6 @@ const error = () => {
|
|
|
8682
8612
|
function yo_default() {
|
|
8683
8613
|
return { localeError: error() };
|
|
8684
8614
|
}
|
|
8685
|
-
|
|
8686
8615
|
//#endregion
|
|
8687
8616
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/index.js
|
|
8688
8617
|
var locales_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -8736,7 +8665,6 @@ var locales_exports = /* @__PURE__ */ __exportAll({
|
|
|
8736
8665
|
zhCN: () => zh_CN_default,
|
|
8737
8666
|
zhTW: () => zh_TW_default
|
|
8738
8667
|
});
|
|
8739
|
-
|
|
8740
8668
|
//#endregion
|
|
8741
8669
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js
|
|
8742
8670
|
var _a;
|
|
@@ -8786,7 +8714,6 @@ function registry() {
|
|
|
8786
8714
|
}
|
|
8787
8715
|
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
8788
8716
|
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
8789
|
-
|
|
8790
8717
|
//#endregion
|
|
8791
8718
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js
|
|
8792
8719
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -9514,12 +9441,11 @@ function _intersection(Class, left, right) {
|
|
|
9514
9441
|
/* @__NO_SIDE_EFFECTS__ */
|
|
9515
9442
|
function _tuple(Class, items, _paramsOrRest, _params) {
|
|
9516
9443
|
const hasRest = _paramsOrRest instanceof $ZodType;
|
|
9517
|
-
const params = hasRest ? _params : _paramsOrRest;
|
|
9518
9444
|
return new Class({
|
|
9519
9445
|
type: "tuple",
|
|
9520
9446
|
items,
|
|
9521
9447
|
rest: hasRest ? _paramsOrRest : null,
|
|
9522
|
-
...normalizeParams(
|
|
9448
|
+
...normalizeParams(hasRest ? _params : _paramsOrRest)
|
|
9523
9449
|
});
|
|
9524
9450
|
}
|
|
9525
9451
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -9827,7 +9753,6 @@ function _stringFormat(Class, format, fnOrRegex, _params = {}) {
|
|
|
9827
9753
|
if (fnOrRegex instanceof RegExp) def.pattern = fnOrRegex;
|
|
9828
9754
|
return new Class(def);
|
|
9829
9755
|
}
|
|
9830
|
-
|
|
9831
9756
|
//#endregion
|
|
9832
9757
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js
|
|
9833
9758
|
function initializeContext(params) {
|
|
@@ -10113,7 +10038,6 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
10113
10038
|
extractDefs(ctx, schema);
|
|
10114
10039
|
return finalize(ctx, schema);
|
|
10115
10040
|
};
|
|
10116
|
-
|
|
10117
10041
|
//#endregion
|
|
10118
10042
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
|
|
10119
10043
|
const formatMap = {
|
|
@@ -10570,7 +10494,6 @@ function toJSONSchema(input, params) {
|
|
|
10570
10494
|
extractDefs(ctx, input);
|
|
10571
10495
|
return finalize(ctx, input);
|
|
10572
10496
|
}
|
|
10573
|
-
|
|
10574
10497
|
//#endregion
|
|
10575
10498
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-generator.js
|
|
10576
10499
|
/**
|
|
@@ -10660,11 +10583,9 @@ var JSONSchemaGenerator = class {
|
|
|
10660
10583
|
return plainResult;
|
|
10661
10584
|
}
|
|
10662
10585
|
};
|
|
10663
|
-
|
|
10664
10586
|
//#endregion
|
|
10665
10587
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.js
|
|
10666
10588
|
var json_schema_exports = /* @__PURE__ */ __exportAll({});
|
|
10667
|
-
|
|
10668
10589
|
//#endregion
|
|
10669
10590
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/index.js
|
|
10670
10591
|
var core_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -10942,7 +10863,6 @@ var core_exports = /* @__PURE__ */ __exportAll({
|
|
|
10942
10863
|
util: () => util_exports,
|
|
10943
10864
|
version: () => version
|
|
10944
10865
|
});
|
|
10945
|
-
|
|
10946
10866
|
//#endregion
|
|
10947
10867
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/checks.js
|
|
10948
10868
|
var checks_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -10976,7 +10896,6 @@ var checks_exports = /* @__PURE__ */ __exportAll({
|
|
|
10976
10896
|
trim: () => _trim,
|
|
10977
10897
|
uppercase: () => _uppercase
|
|
10978
10898
|
});
|
|
10979
|
-
|
|
10980
10899
|
//#endregion
|
|
10981
10900
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js
|
|
10982
10901
|
var iso_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -10994,30 +10913,29 @@ const ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def
|
|
|
10994
10913
|
ZodStringFormat.init(inst, def);
|
|
10995
10914
|
});
|
|
10996
10915
|
function datetime(params) {
|
|
10997
|
-
return _isoDateTime(ZodISODateTime, params);
|
|
10916
|
+
return /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);
|
|
10998
10917
|
}
|
|
10999
10918
|
const ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => {
|
|
11000
10919
|
$ZodISODate.init(inst, def);
|
|
11001
10920
|
ZodStringFormat.init(inst, def);
|
|
11002
10921
|
});
|
|
11003
10922
|
function date$2(params) {
|
|
11004
|
-
return _isoDate(ZodISODate, params);
|
|
10923
|
+
return /* @__PURE__ */ _isoDate(ZodISODate, params);
|
|
11005
10924
|
}
|
|
11006
10925
|
const ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => {
|
|
11007
10926
|
$ZodISOTime.init(inst, def);
|
|
11008
10927
|
ZodStringFormat.init(inst, def);
|
|
11009
10928
|
});
|
|
11010
10929
|
function time(params) {
|
|
11011
|
-
return _isoTime(ZodISOTime, params);
|
|
10930
|
+
return /* @__PURE__ */ _isoTime(ZodISOTime, params);
|
|
11012
10931
|
}
|
|
11013
10932
|
const ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => {
|
|
11014
10933
|
$ZodISODuration.init(inst, def);
|
|
11015
10934
|
ZodStringFormat.init(inst, def);
|
|
11016
10935
|
});
|
|
11017
10936
|
function duration(params) {
|
|
11018
|
-
return _isoDuration(ZodISODuration, params);
|
|
10937
|
+
return /* @__PURE__ */ _isoDuration(ZodISODuration, params);
|
|
11019
10938
|
}
|
|
11020
|
-
|
|
11021
10939
|
//#endregion
|
|
11022
10940
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js
|
|
11023
10941
|
const initializer = (inst, issues) => {
|
|
@@ -11041,7 +10959,6 @@ const initializer = (inst, issues) => {
|
|
|
11041
10959
|
};
|
|
11042
10960
|
const ZodError = $constructor("ZodError", initializer);
|
|
11043
10961
|
const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
|
|
11044
|
-
|
|
11045
10962
|
//#endregion
|
|
11046
10963
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js
|
|
11047
10964
|
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
@@ -11056,7 +10973,6 @@ const safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
|
|
|
11056
10973
|
const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
11057
10974
|
const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
11058
10975
|
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
11059
|
-
|
|
11060
10976
|
//#endregion
|
|
11061
10977
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
|
|
11062
10978
|
var schemas_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -11264,7 +11180,7 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
11264
11180
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params);
|
|
11265
11181
|
inst.refine = (check, params) => inst.check(refine(check, params));
|
|
11266
11182
|
inst.superRefine = (refinement) => inst.check(superRefine(refinement));
|
|
11267
|
-
inst.overwrite = (fn) => inst.check(_overwrite(fn));
|
|
11183
|
+
inst.overwrite = (fn) => inst.check(/* @__PURE__ */ _overwrite(fn));
|
|
11268
11184
|
inst.optional = () => optional(inst);
|
|
11269
11185
|
inst.exactOptional = () => exactOptional(inst);
|
|
11270
11186
|
inst.nullable = () => nullable(inst);
|
|
@@ -11310,55 +11226,55 @@ const _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
11310
11226
|
inst.format = bag.format ?? null;
|
|
11311
11227
|
inst.minLength = bag.minimum ?? null;
|
|
11312
11228
|
inst.maxLength = bag.maximum ?? null;
|
|
11313
|
-
inst.regex = (...args) => inst.check(_regex(...args));
|
|
11314
|
-
inst.includes = (...args) => inst.check(_includes(...args));
|
|
11315
|
-
inst.startsWith = (...args) => inst.check(_startsWith(...args));
|
|
11316
|
-
inst.endsWith = (...args) => inst.check(_endsWith(...args));
|
|
11317
|
-
inst.min = (...args) => inst.check(_minLength(...args));
|
|
11318
|
-
inst.max = (...args) => inst.check(_maxLength(...args));
|
|
11319
|
-
inst.length = (...args) => inst.check(_length(...args));
|
|
11320
|
-
inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
|
|
11321
|
-
inst.lowercase = (params) => inst.check(_lowercase(params));
|
|
11322
|
-
inst.uppercase = (params) => inst.check(_uppercase(params));
|
|
11323
|
-
inst.trim = () => inst.check(_trim());
|
|
11324
|
-
inst.normalize = (...args) => inst.check(_normalize(...args));
|
|
11325
|
-
inst.toLowerCase = () => inst.check(_toLowerCase());
|
|
11326
|
-
inst.toUpperCase = () => inst.check(_toUpperCase());
|
|
11327
|
-
inst.slugify = () => inst.check(_slugify());
|
|
11229
|
+
inst.regex = (...args) => inst.check(/* @__PURE__ */ _regex(...args));
|
|
11230
|
+
inst.includes = (...args) => inst.check(/* @__PURE__ */ _includes(...args));
|
|
11231
|
+
inst.startsWith = (...args) => inst.check(/* @__PURE__ */ _startsWith(...args));
|
|
11232
|
+
inst.endsWith = (...args) => inst.check(/* @__PURE__ */ _endsWith(...args));
|
|
11233
|
+
inst.min = (...args) => inst.check(/* @__PURE__ */ _minLength(...args));
|
|
11234
|
+
inst.max = (...args) => inst.check(/* @__PURE__ */ _maxLength(...args));
|
|
11235
|
+
inst.length = (...args) => inst.check(/* @__PURE__ */ _length(...args));
|
|
11236
|
+
inst.nonempty = (...args) => inst.check(/* @__PURE__ */ _minLength(1, ...args));
|
|
11237
|
+
inst.lowercase = (params) => inst.check(/* @__PURE__ */ _lowercase(params));
|
|
11238
|
+
inst.uppercase = (params) => inst.check(/* @__PURE__ */ _uppercase(params));
|
|
11239
|
+
inst.trim = () => inst.check(/* @__PURE__ */ _trim());
|
|
11240
|
+
inst.normalize = (...args) => inst.check(/* @__PURE__ */ _normalize(...args));
|
|
11241
|
+
inst.toLowerCase = () => inst.check(/* @__PURE__ */ _toLowerCase());
|
|
11242
|
+
inst.toUpperCase = () => inst.check(/* @__PURE__ */ _toUpperCase());
|
|
11243
|
+
inst.slugify = () => inst.check(/* @__PURE__ */ _slugify());
|
|
11328
11244
|
});
|
|
11329
11245
|
const ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
11330
11246
|
$ZodString.init(inst, def);
|
|
11331
11247
|
_ZodString.init(inst, def);
|
|
11332
|
-
inst.email = (params) => inst.check(_email(ZodEmail, params));
|
|
11333
|
-
inst.url = (params) => inst.check(_url(ZodURL, params));
|
|
11334
|
-
inst.jwt = (params) => inst.check(_jwt(ZodJWT, params));
|
|
11335
|
-
inst.emoji = (params) => inst.check(_emoji(ZodEmoji, params));
|
|
11336
|
-
inst.guid = (params) => inst.check(_guid(ZodGUID, params));
|
|
11337
|
-
inst.uuid = (params) => inst.check(_uuid(ZodUUID, params));
|
|
11338
|
-
inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params));
|
|
11339
|
-
inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params));
|
|
11340
|
-
inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params));
|
|
11341
|
-
inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params));
|
|
11342
|
-
inst.guid = (params) => inst.check(_guid(ZodGUID, params));
|
|
11343
|
-
inst.cuid = (params) => inst.check(_cuid(ZodCUID, params));
|
|
11344
|
-
inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params));
|
|
11345
|
-
inst.ulid = (params) => inst.check(_ulid(ZodULID, params));
|
|
11346
|
-
inst.base64 = (params) => inst.check(_base64(ZodBase64, params));
|
|
11347
|
-
inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params));
|
|
11348
|
-
inst.xid = (params) => inst.check(_xid(ZodXID, params));
|
|
11349
|
-
inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params));
|
|
11350
|
-
inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params));
|
|
11351
|
-
inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params));
|
|
11352
|
-
inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params));
|
|
11353
|
-
inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params));
|
|
11354
|
-
inst.e164 = (params) => inst.check(_e164(ZodE164, params));
|
|
11248
|
+
inst.email = (params) => inst.check(/* @__PURE__ */ _email(ZodEmail, params));
|
|
11249
|
+
inst.url = (params) => inst.check(/* @__PURE__ */ _url(ZodURL, params));
|
|
11250
|
+
inst.jwt = (params) => inst.check(/* @__PURE__ */ _jwt(ZodJWT, params));
|
|
11251
|
+
inst.emoji = (params) => inst.check(/* @__PURE__ */ _emoji(ZodEmoji, params));
|
|
11252
|
+
inst.guid = (params) => inst.check(/* @__PURE__ */ _guid(ZodGUID, params));
|
|
11253
|
+
inst.uuid = (params) => inst.check(/* @__PURE__ */ _uuid(ZodUUID, params));
|
|
11254
|
+
inst.uuidv4 = (params) => inst.check(/* @__PURE__ */ _uuidv4(ZodUUID, params));
|
|
11255
|
+
inst.uuidv6 = (params) => inst.check(/* @__PURE__ */ _uuidv6(ZodUUID, params));
|
|
11256
|
+
inst.uuidv7 = (params) => inst.check(/* @__PURE__ */ _uuidv7(ZodUUID, params));
|
|
11257
|
+
inst.nanoid = (params) => inst.check(/* @__PURE__ */ _nanoid(ZodNanoID, params));
|
|
11258
|
+
inst.guid = (params) => inst.check(/* @__PURE__ */ _guid(ZodGUID, params));
|
|
11259
|
+
inst.cuid = (params) => inst.check(/* @__PURE__ */ _cuid(ZodCUID, params));
|
|
11260
|
+
inst.cuid2 = (params) => inst.check(/* @__PURE__ */ _cuid2(ZodCUID2, params));
|
|
11261
|
+
inst.ulid = (params) => inst.check(/* @__PURE__ */ _ulid(ZodULID, params));
|
|
11262
|
+
inst.base64 = (params) => inst.check(/* @__PURE__ */ _base64(ZodBase64, params));
|
|
11263
|
+
inst.base64url = (params) => inst.check(/* @__PURE__ */ _base64url(ZodBase64URL, params));
|
|
11264
|
+
inst.xid = (params) => inst.check(/* @__PURE__ */ _xid(ZodXID, params));
|
|
11265
|
+
inst.ksuid = (params) => inst.check(/* @__PURE__ */ _ksuid(ZodKSUID, params));
|
|
11266
|
+
inst.ipv4 = (params) => inst.check(/* @__PURE__ */ _ipv4(ZodIPv4, params));
|
|
11267
|
+
inst.ipv6 = (params) => inst.check(/* @__PURE__ */ _ipv6(ZodIPv6, params));
|
|
11268
|
+
inst.cidrv4 = (params) => inst.check(/* @__PURE__ */ _cidrv4(ZodCIDRv4, params));
|
|
11269
|
+
inst.cidrv6 = (params) => inst.check(/* @__PURE__ */ _cidrv6(ZodCIDRv6, params));
|
|
11270
|
+
inst.e164 = (params) => inst.check(/* @__PURE__ */ _e164(ZodE164, params));
|
|
11355
11271
|
inst.datetime = (params) => inst.check(datetime(params));
|
|
11356
11272
|
inst.date = (params) => inst.check(date$2(params));
|
|
11357
11273
|
inst.time = (params) => inst.check(time(params));
|
|
11358
11274
|
inst.duration = (params) => inst.check(duration(params));
|
|
11359
11275
|
});
|
|
11360
11276
|
function string$1(params) {
|
|
11361
|
-
return _string(ZodString, params);
|
|
11277
|
+
return /* @__PURE__ */ _string(ZodString, params);
|
|
11362
11278
|
}
|
|
11363
11279
|
const ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
|
|
11364
11280
|
$ZodStringFormat.init(inst, def);
|
|
@@ -11369,40 +11285,40 @@ const ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
|
|
|
11369
11285
|
ZodStringFormat.init(inst, def);
|
|
11370
11286
|
});
|
|
11371
11287
|
function email(params) {
|
|
11372
|
-
return _email(ZodEmail, params);
|
|
11288
|
+
return /* @__PURE__ */ _email(ZodEmail, params);
|
|
11373
11289
|
}
|
|
11374
11290
|
const ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
|
|
11375
11291
|
$ZodGUID.init(inst, def);
|
|
11376
11292
|
ZodStringFormat.init(inst, def);
|
|
11377
11293
|
});
|
|
11378
11294
|
function guid(params) {
|
|
11379
|
-
return _guid(ZodGUID, params);
|
|
11295
|
+
return /* @__PURE__ */ _guid(ZodGUID, params);
|
|
11380
11296
|
}
|
|
11381
11297
|
const ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => {
|
|
11382
11298
|
$ZodUUID.init(inst, def);
|
|
11383
11299
|
ZodStringFormat.init(inst, def);
|
|
11384
11300
|
});
|
|
11385
11301
|
function uuid(params) {
|
|
11386
|
-
return _uuid(ZodUUID, params);
|
|
11302
|
+
return /* @__PURE__ */ _uuid(ZodUUID, params);
|
|
11387
11303
|
}
|
|
11388
11304
|
function uuidv4(params) {
|
|
11389
|
-
return _uuidv4(ZodUUID, params);
|
|
11305
|
+
return /* @__PURE__ */ _uuidv4(ZodUUID, params);
|
|
11390
11306
|
}
|
|
11391
11307
|
function uuidv6(params) {
|
|
11392
|
-
return _uuidv6(ZodUUID, params);
|
|
11308
|
+
return /* @__PURE__ */ _uuidv6(ZodUUID, params);
|
|
11393
11309
|
}
|
|
11394
11310
|
function uuidv7(params) {
|
|
11395
|
-
return _uuidv7(ZodUUID, params);
|
|
11311
|
+
return /* @__PURE__ */ _uuidv7(ZodUUID, params);
|
|
11396
11312
|
}
|
|
11397
11313
|
const ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
|
|
11398
11314
|
$ZodURL.init(inst, def);
|
|
11399
11315
|
ZodStringFormat.init(inst, def);
|
|
11400
11316
|
});
|
|
11401
11317
|
function url(params) {
|
|
11402
|
-
return _url(ZodURL, params);
|
|
11318
|
+
return /* @__PURE__ */ _url(ZodURL, params);
|
|
11403
11319
|
}
|
|
11404
11320
|
function httpUrl(params) {
|
|
11405
|
-
return _url(ZodURL, {
|
|
11321
|
+
return /* @__PURE__ */ _url(ZodURL, {
|
|
11406
11322
|
protocol: /^https?$/,
|
|
11407
11323
|
hostname: domain,
|
|
11408
11324
|
...normalizeParams(params)
|
|
@@ -11413,150 +11329,150 @@ const ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
|
|
|
11413
11329
|
ZodStringFormat.init(inst, def);
|
|
11414
11330
|
});
|
|
11415
11331
|
function emoji(params) {
|
|
11416
|
-
return _emoji(ZodEmoji, params);
|
|
11332
|
+
return /* @__PURE__ */ _emoji(ZodEmoji, params);
|
|
11417
11333
|
}
|
|
11418
11334
|
const ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
|
|
11419
11335
|
$ZodNanoID.init(inst, def);
|
|
11420
11336
|
ZodStringFormat.init(inst, def);
|
|
11421
11337
|
});
|
|
11422
11338
|
function nanoid(params) {
|
|
11423
|
-
return _nanoid(ZodNanoID, params);
|
|
11339
|
+
return /* @__PURE__ */ _nanoid(ZodNanoID, params);
|
|
11424
11340
|
}
|
|
11425
11341
|
const ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => {
|
|
11426
11342
|
$ZodCUID.init(inst, def);
|
|
11427
11343
|
ZodStringFormat.init(inst, def);
|
|
11428
11344
|
});
|
|
11429
11345
|
function cuid(params) {
|
|
11430
|
-
return _cuid(ZodCUID, params);
|
|
11346
|
+
return /* @__PURE__ */ _cuid(ZodCUID, params);
|
|
11431
11347
|
}
|
|
11432
11348
|
const ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => {
|
|
11433
11349
|
$ZodCUID2.init(inst, def);
|
|
11434
11350
|
ZodStringFormat.init(inst, def);
|
|
11435
11351
|
});
|
|
11436
11352
|
function cuid2(params) {
|
|
11437
|
-
return _cuid2(ZodCUID2, params);
|
|
11353
|
+
return /* @__PURE__ */ _cuid2(ZodCUID2, params);
|
|
11438
11354
|
}
|
|
11439
11355
|
const ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => {
|
|
11440
11356
|
$ZodULID.init(inst, def);
|
|
11441
11357
|
ZodStringFormat.init(inst, def);
|
|
11442
11358
|
});
|
|
11443
11359
|
function ulid(params) {
|
|
11444
|
-
return _ulid(ZodULID, params);
|
|
11360
|
+
return /* @__PURE__ */ _ulid(ZodULID, params);
|
|
11445
11361
|
}
|
|
11446
11362
|
const ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => {
|
|
11447
11363
|
$ZodXID.init(inst, def);
|
|
11448
11364
|
ZodStringFormat.init(inst, def);
|
|
11449
11365
|
});
|
|
11450
11366
|
function xid(params) {
|
|
11451
|
-
return _xid(ZodXID, params);
|
|
11367
|
+
return /* @__PURE__ */ _xid(ZodXID, params);
|
|
11452
11368
|
}
|
|
11453
11369
|
const ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => {
|
|
11454
11370
|
$ZodKSUID.init(inst, def);
|
|
11455
11371
|
ZodStringFormat.init(inst, def);
|
|
11456
11372
|
});
|
|
11457
11373
|
function ksuid(params) {
|
|
11458
|
-
return _ksuid(ZodKSUID, params);
|
|
11374
|
+
return /* @__PURE__ */ _ksuid(ZodKSUID, params);
|
|
11459
11375
|
}
|
|
11460
11376
|
const ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => {
|
|
11461
11377
|
$ZodIPv4.init(inst, def);
|
|
11462
11378
|
ZodStringFormat.init(inst, def);
|
|
11463
11379
|
});
|
|
11464
11380
|
function ipv4(params) {
|
|
11465
|
-
return _ipv4(ZodIPv4, params);
|
|
11381
|
+
return /* @__PURE__ */ _ipv4(ZodIPv4, params);
|
|
11466
11382
|
}
|
|
11467
11383
|
const ZodMAC = /* @__PURE__ */ $constructor("ZodMAC", (inst, def) => {
|
|
11468
11384
|
$ZodMAC.init(inst, def);
|
|
11469
11385
|
ZodStringFormat.init(inst, def);
|
|
11470
11386
|
});
|
|
11471
11387
|
function mac(params) {
|
|
11472
|
-
return _mac(ZodMAC, params);
|
|
11388
|
+
return /* @__PURE__ */ _mac(ZodMAC, params);
|
|
11473
11389
|
}
|
|
11474
11390
|
const ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
|
|
11475
11391
|
$ZodIPv6.init(inst, def);
|
|
11476
11392
|
ZodStringFormat.init(inst, def);
|
|
11477
11393
|
});
|
|
11478
11394
|
function ipv6(params) {
|
|
11479
|
-
return _ipv6(ZodIPv6, params);
|
|
11395
|
+
return /* @__PURE__ */ _ipv6(ZodIPv6, params);
|
|
11480
11396
|
}
|
|
11481
11397
|
const ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
|
|
11482
11398
|
$ZodCIDRv4.init(inst, def);
|
|
11483
11399
|
ZodStringFormat.init(inst, def);
|
|
11484
11400
|
});
|
|
11485
11401
|
function cidrv4(params) {
|
|
11486
|
-
return _cidrv4(ZodCIDRv4, params);
|
|
11402
|
+
return /* @__PURE__ */ _cidrv4(ZodCIDRv4, params);
|
|
11487
11403
|
}
|
|
11488
11404
|
const ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => {
|
|
11489
11405
|
$ZodCIDRv6.init(inst, def);
|
|
11490
11406
|
ZodStringFormat.init(inst, def);
|
|
11491
11407
|
});
|
|
11492
11408
|
function cidrv6(params) {
|
|
11493
|
-
return _cidrv6(ZodCIDRv6, params);
|
|
11409
|
+
return /* @__PURE__ */ _cidrv6(ZodCIDRv6, params);
|
|
11494
11410
|
}
|
|
11495
11411
|
const ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => {
|
|
11496
11412
|
$ZodBase64.init(inst, def);
|
|
11497
11413
|
ZodStringFormat.init(inst, def);
|
|
11498
11414
|
});
|
|
11499
11415
|
function base64(params) {
|
|
11500
|
-
return _base64(ZodBase64, params);
|
|
11416
|
+
return /* @__PURE__ */ _base64(ZodBase64, params);
|
|
11501
11417
|
}
|
|
11502
11418
|
const ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
|
|
11503
11419
|
$ZodBase64URL.init(inst, def);
|
|
11504
11420
|
ZodStringFormat.init(inst, def);
|
|
11505
11421
|
});
|
|
11506
11422
|
function base64url(params) {
|
|
11507
|
-
return _base64url(ZodBase64URL, params);
|
|
11423
|
+
return /* @__PURE__ */ _base64url(ZodBase64URL, params);
|
|
11508
11424
|
}
|
|
11509
11425
|
const ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => {
|
|
11510
11426
|
$ZodE164.init(inst, def);
|
|
11511
11427
|
ZodStringFormat.init(inst, def);
|
|
11512
11428
|
});
|
|
11513
11429
|
function e164(params) {
|
|
11514
|
-
return _e164(ZodE164, params);
|
|
11430
|
+
return /* @__PURE__ */ _e164(ZodE164, params);
|
|
11515
11431
|
}
|
|
11516
11432
|
const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
|
|
11517
11433
|
$ZodJWT.init(inst, def);
|
|
11518
11434
|
ZodStringFormat.init(inst, def);
|
|
11519
11435
|
});
|
|
11520
11436
|
function jwt(params) {
|
|
11521
|
-
return _jwt(ZodJWT, params);
|
|
11437
|
+
return /* @__PURE__ */ _jwt(ZodJWT, params);
|
|
11522
11438
|
}
|
|
11523
11439
|
const ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
|
|
11524
11440
|
$ZodCustomStringFormat.init(inst, def);
|
|
11525
11441
|
ZodStringFormat.init(inst, def);
|
|
11526
11442
|
});
|
|
11527
11443
|
function stringFormat(format, fnOrRegex, _params = {}) {
|
|
11528
|
-
return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
11444
|
+
return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
11529
11445
|
}
|
|
11530
11446
|
function hostname(_params) {
|
|
11531
|
-
return _stringFormat(ZodCustomStringFormat, "hostname", hostname$1, _params);
|
|
11447
|
+
return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "hostname", hostname$1, _params);
|
|
11532
11448
|
}
|
|
11533
11449
|
function hex(_params) {
|
|
11534
|
-
return _stringFormat(ZodCustomStringFormat, "hex", hex$1, _params);
|
|
11450
|
+
return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "hex", hex$1, _params);
|
|
11535
11451
|
}
|
|
11536
11452
|
function hash(alg, params) {
|
|
11537
11453
|
const format = `${alg}_${params?.enc ?? "hex"}`;
|
|
11538
11454
|
const regex = regexes_exports[format];
|
|
11539
11455
|
if (!regex) throw new Error(`Unrecognized hash format: ${format}`);
|
|
11540
|
-
return _stringFormat(ZodCustomStringFormat, format, regex, params);
|
|
11456
|
+
return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, format, regex, params);
|
|
11541
11457
|
}
|
|
11542
11458
|
const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
11543
11459
|
$ZodNumber.init(inst, def);
|
|
11544
11460
|
ZodType.init(inst, def);
|
|
11545
11461
|
inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
|
|
11546
|
-
inst.gt = (value, params) => inst.check(_gt(value, params));
|
|
11547
|
-
inst.gte = (value, params) => inst.check(_gte(value, params));
|
|
11548
|
-
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
11549
|
-
inst.lt = (value, params) => inst.check(_lt(value, params));
|
|
11550
|
-
inst.lte = (value, params) => inst.check(_lte(value, params));
|
|
11551
|
-
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
11462
|
+
inst.gt = (value, params) => inst.check(/* @__PURE__ */ _gt(value, params));
|
|
11463
|
+
inst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11464
|
+
inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11465
|
+
inst.lt = (value, params) => inst.check(/* @__PURE__ */ _lt(value, params));
|
|
11466
|
+
inst.lte = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
|
|
11467
|
+
inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
|
|
11552
11468
|
inst.int = (params) => inst.check(int(params));
|
|
11553
11469
|
inst.safe = (params) => inst.check(int(params));
|
|
11554
|
-
inst.positive = (params) => inst.check(_gt(0, params));
|
|
11555
|
-
inst.nonnegative = (params) => inst.check(_gte(0, params));
|
|
11556
|
-
inst.negative = (params) => inst.check(_lt(0, params));
|
|
11557
|
-
inst.nonpositive = (params) => inst.check(_lte(0, params));
|
|
11558
|
-
inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
|
|
11559
|
-
inst.step = (value, params) => inst.check(_multipleOf(value, params));
|
|
11470
|
+
inst.positive = (params) => inst.check(/* @__PURE__ */ _gt(0, params));
|
|
11471
|
+
inst.nonnegative = (params) => inst.check(/* @__PURE__ */ _gte(0, params));
|
|
11472
|
+
inst.negative = (params) => inst.check(/* @__PURE__ */ _lt(0, params));
|
|
11473
|
+
inst.nonpositive = (params) => inst.check(/* @__PURE__ */ _lte(0, params));
|
|
11474
|
+
inst.multipleOf = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));
|
|
11475
|
+
inst.step = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));
|
|
11560
11476
|
inst.finite = () => inst;
|
|
11561
11477
|
const bag = inst._zod.bag;
|
|
11562
11478
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
@@ -11566,26 +11482,26 @@ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
11566
11482
|
inst.format = bag.format ?? null;
|
|
11567
11483
|
});
|
|
11568
11484
|
function number$1(params) {
|
|
11569
|
-
return _number(ZodNumber, params);
|
|
11485
|
+
return /* @__PURE__ */ _number(ZodNumber, params);
|
|
11570
11486
|
}
|
|
11571
11487
|
const ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => {
|
|
11572
11488
|
$ZodNumberFormat.init(inst, def);
|
|
11573
11489
|
ZodNumber.init(inst, def);
|
|
11574
11490
|
});
|
|
11575
11491
|
function int(params) {
|
|
11576
|
-
return _int(ZodNumberFormat, params);
|
|
11492
|
+
return /* @__PURE__ */ _int(ZodNumberFormat, params);
|
|
11577
11493
|
}
|
|
11578
11494
|
function float32(params) {
|
|
11579
|
-
return _float32(ZodNumberFormat, params);
|
|
11495
|
+
return /* @__PURE__ */ _float32(ZodNumberFormat, params);
|
|
11580
11496
|
}
|
|
11581
11497
|
function float64(params) {
|
|
11582
|
-
return _float64(ZodNumberFormat, params);
|
|
11498
|
+
return /* @__PURE__ */ _float64(ZodNumberFormat, params);
|
|
11583
11499
|
}
|
|
11584
11500
|
function int32(params) {
|
|
11585
|
-
return _int32(ZodNumberFormat, params);
|
|
11501
|
+
return /* @__PURE__ */ _int32(ZodNumberFormat, params);
|
|
11586
11502
|
}
|
|
11587
11503
|
function uint32(params) {
|
|
11588
|
-
return _uint32(ZodNumberFormat, params);
|
|
11504
|
+
return /* @__PURE__ */ _uint32(ZodNumberFormat, params);
|
|
11589
11505
|
}
|
|
11590
11506
|
const ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
|
|
11591
11507
|
$ZodBoolean.init(inst, def);
|
|
@@ -11593,42 +11509,42 @@ const ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
|
|
|
11593
11509
|
inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
|
|
11594
11510
|
});
|
|
11595
11511
|
function boolean$1(params) {
|
|
11596
|
-
return _boolean(ZodBoolean, params);
|
|
11512
|
+
return /* @__PURE__ */ _boolean(ZodBoolean, params);
|
|
11597
11513
|
}
|
|
11598
11514
|
const ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
|
|
11599
11515
|
$ZodBigInt.init(inst, def);
|
|
11600
11516
|
ZodType.init(inst, def);
|
|
11601
11517
|
inst._zod.processJSONSchema = (ctx, json, params) => bigintProcessor(inst, ctx, json, params);
|
|
11602
|
-
inst.gte = (value, params) => inst.check(_gte(value, params));
|
|
11603
|
-
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
11604
|
-
inst.gt = (value, params) => inst.check(_gt(value, params));
|
|
11605
|
-
inst.gte = (value, params) => inst.check(_gte(value, params));
|
|
11606
|
-
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
11607
|
-
inst.lt = (value, params) => inst.check(_lt(value, params));
|
|
11608
|
-
inst.lte = (value, params) => inst.check(_lte(value, params));
|
|
11609
|
-
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
11610
|
-
inst.positive = (params) => inst.check(_gt(BigInt(0), params));
|
|
11611
|
-
inst.negative = (params) => inst.check(_lt(BigInt(0), params));
|
|
11612
|
-
inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params));
|
|
11613
|
-
inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params));
|
|
11614
|
-
inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
|
|
11518
|
+
inst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11519
|
+
inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11520
|
+
inst.gt = (value, params) => inst.check(/* @__PURE__ */ _gt(value, params));
|
|
11521
|
+
inst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11522
|
+
inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11523
|
+
inst.lt = (value, params) => inst.check(/* @__PURE__ */ _lt(value, params));
|
|
11524
|
+
inst.lte = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
|
|
11525
|
+
inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
|
|
11526
|
+
inst.positive = (params) => inst.check(/* @__PURE__ */ _gt(BigInt(0), params));
|
|
11527
|
+
inst.negative = (params) => inst.check(/* @__PURE__ */ _lt(BigInt(0), params));
|
|
11528
|
+
inst.nonpositive = (params) => inst.check(/* @__PURE__ */ _lte(BigInt(0), params));
|
|
11529
|
+
inst.nonnegative = (params) => inst.check(/* @__PURE__ */ _gte(BigInt(0), params));
|
|
11530
|
+
inst.multipleOf = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));
|
|
11615
11531
|
const bag = inst._zod.bag;
|
|
11616
11532
|
inst.minValue = bag.minimum ?? null;
|
|
11617
11533
|
inst.maxValue = bag.maximum ?? null;
|
|
11618
11534
|
inst.format = bag.format ?? null;
|
|
11619
11535
|
});
|
|
11620
11536
|
function bigint$1(params) {
|
|
11621
|
-
return _bigint(ZodBigInt, params);
|
|
11537
|
+
return /* @__PURE__ */ _bigint(ZodBigInt, params);
|
|
11622
11538
|
}
|
|
11623
11539
|
const ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => {
|
|
11624
11540
|
$ZodBigIntFormat.init(inst, def);
|
|
11625
11541
|
ZodBigInt.init(inst, def);
|
|
11626
11542
|
});
|
|
11627
11543
|
function int64(params) {
|
|
11628
|
-
return _int64(ZodBigIntFormat, params);
|
|
11544
|
+
return /* @__PURE__ */ _int64(ZodBigIntFormat, params);
|
|
11629
11545
|
}
|
|
11630
11546
|
function uint64(params) {
|
|
11631
|
-
return _uint64(ZodBigIntFormat, params);
|
|
11547
|
+
return /* @__PURE__ */ _uint64(ZodBigIntFormat, params);
|
|
11632
11548
|
}
|
|
11633
11549
|
const ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => {
|
|
11634
11550
|
$ZodSymbol.init(inst, def);
|
|
@@ -11636,7 +11552,7 @@ const ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => {
|
|
|
11636
11552
|
inst._zod.processJSONSchema = (ctx, json, params) => symbolProcessor(inst, ctx, json, params);
|
|
11637
11553
|
});
|
|
11638
11554
|
function symbol(params) {
|
|
11639
|
-
return _symbol(ZodSymbol, params);
|
|
11555
|
+
return /* @__PURE__ */ _symbol(ZodSymbol, params);
|
|
11640
11556
|
}
|
|
11641
11557
|
const ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => {
|
|
11642
11558
|
$ZodUndefined.init(inst, def);
|
|
@@ -11644,7 +11560,7 @@ const ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) =>
|
|
|
11644
11560
|
inst._zod.processJSONSchema = (ctx, json, params) => undefinedProcessor(inst, ctx, json, params);
|
|
11645
11561
|
});
|
|
11646
11562
|
function _undefined(params) {
|
|
11647
|
-
return _undefined$1(ZodUndefined, params);
|
|
11563
|
+
return /* @__PURE__ */ _undefined$1(ZodUndefined, params);
|
|
11648
11564
|
}
|
|
11649
11565
|
const ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
|
|
11650
11566
|
$ZodNull.init(inst, def);
|
|
@@ -11652,7 +11568,7 @@ const ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
|
|
|
11652
11568
|
inst._zod.processJSONSchema = (ctx, json, params) => nullProcessor(inst, ctx, json, params);
|
|
11653
11569
|
});
|
|
11654
11570
|
function _null(params) {
|
|
11655
|
-
return _null$1(ZodNull, params);
|
|
11571
|
+
return /* @__PURE__ */ _null$1(ZodNull, params);
|
|
11656
11572
|
}
|
|
11657
11573
|
const ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
|
|
11658
11574
|
$ZodAny.init(inst, def);
|
|
@@ -11660,7 +11576,7 @@ const ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
|
|
|
11660
11576
|
inst._zod.processJSONSchema = (ctx, json, params) => anyProcessor(inst, ctx, json, params);
|
|
11661
11577
|
});
|
|
11662
11578
|
function any() {
|
|
11663
|
-
return _any(ZodAny);
|
|
11579
|
+
return /* @__PURE__ */ _any(ZodAny);
|
|
11664
11580
|
}
|
|
11665
11581
|
const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
|
|
11666
11582
|
$ZodUnknown.init(inst, def);
|
|
@@ -11668,7 +11584,7 @@ const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
|
|
|
11668
11584
|
inst._zod.processJSONSchema = (ctx, json, params) => unknownProcessor(inst, ctx, json, params);
|
|
11669
11585
|
});
|
|
11670
11586
|
function unknown() {
|
|
11671
|
-
return _unknown(ZodUnknown);
|
|
11587
|
+
return /* @__PURE__ */ _unknown(ZodUnknown);
|
|
11672
11588
|
}
|
|
11673
11589
|
const ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
|
|
11674
11590
|
$ZodNever.init(inst, def);
|
|
@@ -11676,7 +11592,7 @@ const ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
|
|
|
11676
11592
|
inst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json, params);
|
|
11677
11593
|
});
|
|
11678
11594
|
function never(params) {
|
|
11679
|
-
return _never(ZodNever, params);
|
|
11595
|
+
return /* @__PURE__ */ _never(ZodNever, params);
|
|
11680
11596
|
}
|
|
11681
11597
|
const ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => {
|
|
11682
11598
|
$ZodVoid.init(inst, def);
|
|
@@ -11684,34 +11600,34 @@ const ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => {
|
|
|
11684
11600
|
inst._zod.processJSONSchema = (ctx, json, params) => voidProcessor(inst, ctx, json, params);
|
|
11685
11601
|
});
|
|
11686
11602
|
function _void(params) {
|
|
11687
|
-
return _void$1(ZodVoid, params);
|
|
11603
|
+
return /* @__PURE__ */ _void$1(ZodVoid, params);
|
|
11688
11604
|
}
|
|
11689
11605
|
const ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
|
|
11690
11606
|
$ZodDate.init(inst, def);
|
|
11691
11607
|
ZodType.init(inst, def);
|
|
11692
11608
|
inst._zod.processJSONSchema = (ctx, json, params) => dateProcessor(inst, ctx, json, params);
|
|
11693
|
-
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
11694
|
-
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
11609
|
+
inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
|
|
11610
|
+
inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
|
|
11695
11611
|
const c = inst._zod.bag;
|
|
11696
11612
|
inst.minDate = c.minimum ? new Date(c.minimum) : null;
|
|
11697
11613
|
inst.maxDate = c.maximum ? new Date(c.maximum) : null;
|
|
11698
11614
|
});
|
|
11699
11615
|
function date$1(params) {
|
|
11700
|
-
return _date(ZodDate, params);
|
|
11616
|
+
return /* @__PURE__ */ _date(ZodDate, params);
|
|
11701
11617
|
}
|
|
11702
11618
|
const ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
11703
11619
|
$ZodArray.init(inst, def);
|
|
11704
11620
|
ZodType.init(inst, def);
|
|
11705
11621
|
inst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);
|
|
11706
11622
|
inst.element = def.element;
|
|
11707
|
-
inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
|
|
11708
|
-
inst.nonempty = (params) => inst.check(_minLength(1, params));
|
|
11709
|
-
inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
|
|
11710
|
-
inst.length = (len, params) => inst.check(_length(len, params));
|
|
11623
|
+
inst.min = (minLength, params) => inst.check(/* @__PURE__ */ _minLength(minLength, params));
|
|
11624
|
+
inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minLength(1, params));
|
|
11625
|
+
inst.max = (maxLength, params) => inst.check(/* @__PURE__ */ _maxLength(maxLength, params));
|
|
11626
|
+
inst.length = (len, params) => inst.check(/* @__PURE__ */ _length(len, params));
|
|
11711
11627
|
inst.unwrap = () => inst.element;
|
|
11712
11628
|
});
|
|
11713
11629
|
function array(element, params) {
|
|
11714
|
-
return _array(ZodArray, element, params);
|
|
11630
|
+
return /* @__PURE__ */ _array(ZodArray, element, params);
|
|
11715
11631
|
}
|
|
11716
11632
|
function keyof(schema) {
|
|
11717
11633
|
const shape = schema._zod.def.shape;
|
|
@@ -11845,12 +11761,11 @@ const ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => {
|
|
|
11845
11761
|
});
|
|
11846
11762
|
function tuple(items, _paramsOrRest, _params) {
|
|
11847
11763
|
const hasRest = _paramsOrRest instanceof $ZodType;
|
|
11848
|
-
const params = hasRest ? _params : _paramsOrRest;
|
|
11849
11764
|
return new ZodTuple({
|
|
11850
11765
|
type: "tuple",
|
|
11851
11766
|
items,
|
|
11852
11767
|
rest: hasRest ? _paramsOrRest : null,
|
|
11853
|
-
...normalizeParams(
|
|
11768
|
+
...normalizeParams(hasRest ? _params : _paramsOrRest)
|
|
11854
11769
|
});
|
|
11855
11770
|
}
|
|
11856
11771
|
const ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
@@ -11893,10 +11808,10 @@ const ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => {
|
|
|
11893
11808
|
inst._zod.processJSONSchema = (ctx, json, params) => mapProcessor(inst, ctx, json, params);
|
|
11894
11809
|
inst.keyType = def.keyType;
|
|
11895
11810
|
inst.valueType = def.valueType;
|
|
11896
|
-
inst.min = (...args) => inst.check(_minSize(...args));
|
|
11897
|
-
inst.nonempty = (params) => inst.check(_minSize(1, params));
|
|
11898
|
-
inst.max = (...args) => inst.check(_maxSize(...args));
|
|
11899
|
-
inst.size = (...args) => inst.check(_size(...args));
|
|
11811
|
+
inst.min = (...args) => inst.check(/* @__PURE__ */ _minSize(...args));
|
|
11812
|
+
inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minSize(1, params));
|
|
11813
|
+
inst.max = (...args) => inst.check(/* @__PURE__ */ _maxSize(...args));
|
|
11814
|
+
inst.size = (...args) => inst.check(/* @__PURE__ */ _size(...args));
|
|
11900
11815
|
});
|
|
11901
11816
|
function map(keyType, valueType, params) {
|
|
11902
11817
|
return new ZodMap({
|
|
@@ -11910,10 +11825,10 @@ const ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => {
|
|
|
11910
11825
|
$ZodSet.init(inst, def);
|
|
11911
11826
|
ZodType.init(inst, def);
|
|
11912
11827
|
inst._zod.processJSONSchema = (ctx, json, params) => setProcessor(inst, ctx, json, params);
|
|
11913
|
-
inst.min = (...args) => inst.check(_minSize(...args));
|
|
11914
|
-
inst.nonempty = (params) => inst.check(_minSize(1, params));
|
|
11915
|
-
inst.max = (...args) => inst.check(_maxSize(...args));
|
|
11916
|
-
inst.size = (...args) => inst.check(_size(...args));
|
|
11828
|
+
inst.min = (...args) => inst.check(/* @__PURE__ */ _minSize(...args));
|
|
11829
|
+
inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minSize(1, params));
|
|
11830
|
+
inst.max = (...args) => inst.check(/* @__PURE__ */ _maxSize(...args));
|
|
11831
|
+
inst.size = (...args) => inst.check(/* @__PURE__ */ _size(...args));
|
|
11917
11832
|
});
|
|
11918
11833
|
function set(valueType, params) {
|
|
11919
11834
|
return new ZodSet({
|
|
@@ -11994,12 +11909,12 @@ const ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => {
|
|
|
11994
11909
|
$ZodFile.init(inst, def);
|
|
11995
11910
|
ZodType.init(inst, def);
|
|
11996
11911
|
inst._zod.processJSONSchema = (ctx, json, params) => fileProcessor(inst, ctx, json, params);
|
|
11997
|
-
inst.min = (size, params) => inst.check(_minSize(size, params));
|
|
11998
|
-
inst.max = (size, params) => inst.check(_maxSize(size, params));
|
|
11999
|
-
inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params));
|
|
11912
|
+
inst.min = (size, params) => inst.check(/* @__PURE__ */ _minSize(size, params));
|
|
11913
|
+
inst.max = (size, params) => inst.check(/* @__PURE__ */ _maxSize(size, params));
|
|
11914
|
+
inst.mime = (types, params) => inst.check(/* @__PURE__ */ _mime(Array.isArray(types) ? types : [types], params));
|
|
12000
11915
|
});
|
|
12001
11916
|
function file(params) {
|
|
12002
|
-
return _file(ZodFile, params);
|
|
11917
|
+
return /* @__PURE__ */ _file(ZodFile, params);
|
|
12003
11918
|
}
|
|
12004
11919
|
const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
12005
11920
|
$ZodTransform.init(inst, def);
|
|
@@ -12148,7 +12063,7 @@ const ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => {
|
|
|
12148
12063
|
inst._zod.processJSONSchema = (ctx, json, params) => nanProcessor(inst, ctx, json, params);
|
|
12149
12064
|
});
|
|
12150
12065
|
function nan(params) {
|
|
12151
|
-
return _nan(ZodNaN, params);
|
|
12066
|
+
return /* @__PURE__ */ _nan(ZodNaN, params);
|
|
12152
12067
|
}
|
|
12153
12068
|
const ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
|
|
12154
12069
|
$ZodPipe.init(inst, def);
|
|
@@ -12248,13 +12163,13 @@ function check(fn) {
|
|
|
12248
12163
|
return ch;
|
|
12249
12164
|
}
|
|
12250
12165
|
function custom(fn, _params) {
|
|
12251
|
-
return _custom(ZodCustom, fn ?? (() => true), _params);
|
|
12166
|
+
return /* @__PURE__ */ _custom(ZodCustom, fn ?? (() => true), _params);
|
|
12252
12167
|
}
|
|
12253
12168
|
function refine(fn, _params = {}) {
|
|
12254
|
-
return _refine(ZodCustom, fn, _params);
|
|
12169
|
+
return /* @__PURE__ */ _refine(ZodCustom, fn, _params);
|
|
12255
12170
|
}
|
|
12256
12171
|
function superRefine(fn) {
|
|
12257
|
-
return _superRefine(fn);
|
|
12172
|
+
return /* @__PURE__ */ _superRefine(fn);
|
|
12258
12173
|
}
|
|
12259
12174
|
const describe = describe$1;
|
|
12260
12175
|
const meta = meta$1;
|
|
@@ -12278,7 +12193,7 @@ function _instanceof(cls, params = {}) {
|
|
|
12278
12193
|
};
|
|
12279
12194
|
return inst;
|
|
12280
12195
|
}
|
|
12281
|
-
const stringbool = (...args) => _stringbool({
|
|
12196
|
+
const stringbool = (...args) => /* @__PURE__ */ _stringbool({
|
|
12282
12197
|
Codec: ZodCodec,
|
|
12283
12198
|
Boolean: ZodBoolean,
|
|
12284
12199
|
String: ZodString
|
|
@@ -12299,7 +12214,6 @@ function json(params) {
|
|
|
12299
12214
|
function preprocess(fn, schema) {
|
|
12300
12215
|
return pipe(transform(fn), schema);
|
|
12301
12216
|
}
|
|
12302
|
-
|
|
12303
12217
|
//#endregion
|
|
12304
12218
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/compat.js
|
|
12305
12219
|
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
|
|
@@ -12327,7 +12241,6 @@ function getErrorMap() {
|
|
|
12327
12241
|
/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
|
|
12328
12242
|
var ZodFirstPartyTypeKind;
|
|
12329
12243
|
(function(ZodFirstPartyTypeKind) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
12330
|
-
|
|
12331
12244
|
//#endregion
|
|
12332
12245
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js
|
|
12333
12246
|
const z = {
|
|
@@ -12652,7 +12565,6 @@ function fromJSONSchema(schema, params) {
|
|
|
12652
12565
|
registry: params?.registry ?? globalRegistry
|
|
12653
12566
|
});
|
|
12654
12567
|
}
|
|
12655
|
-
|
|
12656
12568
|
//#endregion
|
|
12657
12569
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/coerce.js
|
|
12658
12570
|
var coerce_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -12663,21 +12575,20 @@ var coerce_exports = /* @__PURE__ */ __exportAll({
|
|
|
12663
12575
|
string: () => string
|
|
12664
12576
|
});
|
|
12665
12577
|
function string(params) {
|
|
12666
|
-
return _coercedString(ZodString, params);
|
|
12578
|
+
return /* @__PURE__ */ _coercedString(ZodString, params);
|
|
12667
12579
|
}
|
|
12668
12580
|
function number(params) {
|
|
12669
|
-
return _coercedNumber(ZodNumber, params);
|
|
12581
|
+
return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
|
|
12670
12582
|
}
|
|
12671
12583
|
function boolean(params) {
|
|
12672
|
-
return _coercedBoolean(ZodBoolean, params);
|
|
12584
|
+
return /* @__PURE__ */ _coercedBoolean(ZodBoolean, params);
|
|
12673
12585
|
}
|
|
12674
12586
|
function bigint(params) {
|
|
12675
|
-
return _coercedBigint(ZodBigInt, params);
|
|
12587
|
+
return /* @__PURE__ */ _coercedBigint(ZodBigInt, params);
|
|
12676
12588
|
}
|
|
12677
12589
|
function date(params) {
|
|
12678
|
-
return _coercedDate(ZodDate, params);
|
|
12590
|
+
return /* @__PURE__ */ _coercedDate(ZodDate, params);
|
|
12679
12591
|
}
|
|
12680
|
-
|
|
12681
12592
|
//#endregion
|
|
12682
12593
|
//#region ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
12683
12594
|
var external_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -12919,204 +12830,159 @@ var external_exports = /* @__PURE__ */ __exportAll({
|
|
|
12919
12830
|
xor: () => xor
|
|
12920
12831
|
});
|
|
12921
12832
|
config(en_default());
|
|
12922
|
-
|
|
12923
12833
|
//#endregion
|
|
12924
|
-
//#region src/
|
|
12925
|
-
const moduleDir$4 = node_path.default.dirname((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
12926
|
-
var RequestValidationGenerator = class {
|
|
12927
|
-
static generate(context) {
|
|
12928
|
-
const templateFilePath = node_path.default.join(moduleDir$4, "templates", "RequestValidator.ejs");
|
|
12929
|
-
for (const [, entityResource] of Object.entries(context.resources.entityResources)) for (const definition of entityResource.operations) this.writeRequestValidator(templateFilePath, definition, context);
|
|
12930
|
-
}
|
|
12931
|
-
static writeRequestValidator(templateFilePath, operationResource, context) {
|
|
12932
|
-
const { outputDir, definition, outputRequestFileName } = operationResource;
|
|
12933
|
-
const { operationId, request } = definition;
|
|
12934
|
-
const { body, query, param, header } = request;
|
|
12935
|
-
const pascalCaseOperationId = case$1.default.pascal(operationId);
|
|
12936
|
-
const content = context.renderTemplate(templateFilePath, {
|
|
12937
|
-
pascalCaseOperationId,
|
|
12938
|
-
operationId,
|
|
12939
|
-
sourcePath: _rexeus_typeweaver_gen.Path.relative(outputDir, `${operationResource.sourceDir}/${node_path.default.relative(operationResource.sourceDir, operationResource.sourceFile).replace(/\.ts$/, "")}`),
|
|
12940
|
-
corePath: context.coreDir,
|
|
12941
|
-
requestFile: _rexeus_typeweaver_gen.Path.relative(outputDir, `${outputDir}/${node_path.default.basename(outputRequestFileName, ".ts")}`),
|
|
12942
|
-
body,
|
|
12943
|
-
query,
|
|
12944
|
-
param,
|
|
12945
|
-
header,
|
|
12946
|
-
z: external_exports
|
|
12947
|
-
});
|
|
12948
|
-
const relativePath = node_path.default.relative(context.outputDir, operationResource.outputRequestValidationFile);
|
|
12949
|
-
context.writeFile(relativePath, content);
|
|
12950
|
-
}
|
|
12951
|
-
};
|
|
12952
|
-
|
|
12953
|
-
//#endregion
|
|
12954
|
-
//#region src/ResponseGenerator.ts
|
|
12834
|
+
//#region src/requestValidationGenerator.ts
|
|
12955
12835
|
const moduleDir$3 = node_path.default.dirname((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
12956
|
-
|
|
12957
|
-
|
|
12958
|
-
|
|
12959
|
-
|
|
12960
|
-
|
|
12961
|
-
|
|
12962
|
-
|
|
12963
|
-
|
|
12964
|
-
}
|
|
12965
|
-
|
|
12966
|
-
|
|
12967
|
-
|
|
12968
|
-
|
|
12969
|
-
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
|
|
12985
|
-
|
|
12986
|
-
});
|
|
12987
|
-
}
|
|
12988
|
-
continue;
|
|
12989
|
-
}
|
|
12990
|
-
ownResponses.push({
|
|
12991
|
-
name,
|
|
12992
|
-
body: body ? _rexeus_typeweaver_zod_to_ts.TsTypePrinter.print(_rexeus_typeweaver_zod_to_ts.TsTypeNode.fromZod(body)) : void 0,
|
|
12993
|
-
header: header ? _rexeus_typeweaver_zod_to_ts.TsTypePrinter.print(_rexeus_typeweaver_zod_to_ts.TsTypeNode.fromZod(header)) : void 0,
|
|
12994
|
-
statusCode,
|
|
12995
|
-
statusCodeKey: _rexeus_typeweaver_core.HttpStatusCode[statusCode]
|
|
12996
|
-
});
|
|
12997
|
-
}
|
|
12998
|
-
const content = context.renderTemplate(templateFile, {
|
|
12999
|
-
operationId,
|
|
13000
|
-
pascalCaseOperationId,
|
|
13001
|
-
coreDir: context.coreDir,
|
|
13002
|
-
ownResponses,
|
|
13003
|
-
entityResponses,
|
|
13004
|
-
sharedResponses,
|
|
13005
|
-
responseFile: _rexeus_typeweaver_gen.Path.relative(outputDir, `${outputDir}/${node_path.default.basename(outputResponseFileName, ".ts")}`),
|
|
13006
|
-
sourcePath: _rexeus_typeweaver_gen.Path.relative(outputDir, `${sourceDir}/${node_path.default.relative(sourceDir, sourceFile).replace(/\.ts$/, "")}`)
|
|
13007
|
-
});
|
|
13008
|
-
const relativePath = node_path.default.relative(context.outputDir, outputResponseFile);
|
|
13009
|
-
context.writeFile(relativePath, content);
|
|
13010
|
-
}
|
|
13011
|
-
static writeEntityResponseType(templateFile, resource, context) {
|
|
13012
|
-
const { name, body, header, outputFile } = resource;
|
|
13013
|
-
const pascalCaseName = case$1.default.pascal(name);
|
|
13014
|
-
const headerTsType = header ? _rexeus_typeweaver_zod_to_ts.TsTypePrinter.print(_rexeus_typeweaver_zod_to_ts.TsTypeNode.fromZod(header)) : void 0;
|
|
13015
|
-
const bodyTsType = body ? _rexeus_typeweaver_zod_to_ts.TsTypePrinter.print(_rexeus_typeweaver_zod_to_ts.TsTypeNode.fromZod(body)) : void 0;
|
|
13016
|
-
const content = context.renderTemplate(templateFile, {
|
|
13017
|
-
coreDir: context.coreDir,
|
|
13018
|
-
httpStatusCode: _rexeus_typeweaver_core.HttpStatusCode,
|
|
13019
|
-
headerTsType,
|
|
13020
|
-
bodyTsType,
|
|
13021
|
-
pascalCaseName,
|
|
13022
|
-
sharedResponse: resource
|
|
13023
|
-
});
|
|
13024
|
-
const relativePath = node_path.default.relative(context.outputDir, outputFile);
|
|
13025
|
-
context.writeFile(relativePath, content);
|
|
13026
|
-
}
|
|
13027
|
-
};
|
|
13028
|
-
|
|
12836
|
+
function generate$2(context) {
|
|
12837
|
+
const templateFilePath = node_path.default.join(moduleDir$3, "templates", "RequestValidator.ejs");
|
|
12838
|
+
for (const resource of context.normalizedSpec.resources) resource.operations.forEach((operation) => {
|
|
12839
|
+
writeRequestValidator(templateFilePath, resource.name, operation, context);
|
|
12840
|
+
});
|
|
12841
|
+
}
|
|
12842
|
+
function writeRequestValidator(templateFilePath, resourceName, operation, context) {
|
|
12843
|
+
const { operationId, request } = operation;
|
|
12844
|
+
const { body, query, param, header } = request ?? {};
|
|
12845
|
+
const outputPaths = context.getOperationOutputPaths({
|
|
12846
|
+
resourceName,
|
|
12847
|
+
operationId
|
|
12848
|
+
});
|
|
12849
|
+
const pascalCaseOperationId = case$1.default.pascal(operationId);
|
|
12850
|
+
const content = context.renderTemplate(templateFilePath, {
|
|
12851
|
+
pascalCaseOperationId,
|
|
12852
|
+
operationId,
|
|
12853
|
+
resourceName,
|
|
12854
|
+
specPath: context.getSpecImportPath({ importerDir: outputPaths.outputDir }),
|
|
12855
|
+
corePath: context.coreDir,
|
|
12856
|
+
requestFile: `./${node_path.default.basename(outputPaths.requestFileName, ".ts")}`,
|
|
12857
|
+
body,
|
|
12858
|
+
query,
|
|
12859
|
+
param,
|
|
12860
|
+
header,
|
|
12861
|
+
z: external_exports
|
|
12862
|
+
});
|
|
12863
|
+
const relativePath = node_path.default.relative(context.outputDir, outputPaths.requestValidationFile);
|
|
12864
|
+
context.writeFile(relativePath, content);
|
|
12865
|
+
}
|
|
13029
12866
|
//#endregion
|
|
13030
|
-
//#region src/
|
|
12867
|
+
//#region src/responseGenerator.ts
|
|
13031
12868
|
const moduleDir$2 = node_path.default.dirname((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
|
|
13035
|
-
|
|
13036
|
-
|
|
13037
|
-
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
|
|
13049
|
-
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
const sharedResponse = context.resources.sharedResponseResources.find((resource) => resource.name === name);
|
|
13055
|
-
let importPath;
|
|
13056
|
-
if (!sharedResponse) {
|
|
13057
|
-
const entityResponse = (context.resources.entityResources[resource.entityName]?.responses)?.find((r) => r.name === name);
|
|
13058
|
-
if (entityResponse) importPath = _rexeus_typeweaver_gen.Path.relative(outputDir, `${entityResponse.outputDir}/${node_path.default.basename(entityResponse.outputFileName, ".ts")}`);
|
|
13059
|
-
else throw new Error(`Shared response '${response.name}' not found in shared or entity resources`);
|
|
13060
|
-
} else importPath = _rexeus_typeweaver_gen.Path.relative(outputDir, `${sharedResponse.outputDir}/${node_path.default.basename(sharedResponse.outputFileName, ".ts")}`);
|
|
13061
|
-
sharedResponses.push({
|
|
13062
|
-
name,
|
|
13063
|
-
importPath,
|
|
13064
|
-
hasBody: !!body,
|
|
13065
|
-
hasHeader: !!header,
|
|
13066
|
-
statusCode,
|
|
13067
|
-
index
|
|
13068
|
-
});
|
|
13069
|
-
continue;
|
|
13070
|
-
}
|
|
13071
|
-
ownResponses.push({
|
|
13072
|
-
name,
|
|
13073
|
-
hasBody: !!body,
|
|
13074
|
-
hasHeader: !!header,
|
|
13075
|
-
statusCode,
|
|
13076
|
-
statusCodeKey: _rexeus_typeweaver_core.HttpStatusCode[statusCode],
|
|
13077
|
-
index
|
|
12869
|
+
function generate$1(context) {
|
|
12870
|
+
const templateFile = node_path.default.join(moduleDir$2, "templates", "Response.ejs");
|
|
12871
|
+
const canonicalResponseTemplateFile = node_path.default.join(moduleDir$2, "templates", "SharedResponse.ejs");
|
|
12872
|
+
for (const response of context.normalizedSpec.responses) writeCanonicalResponseType(canonicalResponseTemplateFile, response, context);
|
|
12873
|
+
for (const resource of context.normalizedSpec.resources) for (const operation of resource.operations) writeResponseType(templateFile, resource, operation, context);
|
|
12874
|
+
}
|
|
12875
|
+
function writeResponseType(templateFile, resource, operation, context) {
|
|
12876
|
+
const outputPaths = context.getOperationOutputPaths({
|
|
12877
|
+
resourceName: resource.name,
|
|
12878
|
+
operationId: operation.operationId
|
|
12879
|
+
});
|
|
12880
|
+
const pascalCaseOperationId = case$1.default.pascal(operation.operationId);
|
|
12881
|
+
const ownResponses = [];
|
|
12882
|
+
const canonicalResponses = [];
|
|
12883
|
+
for (const responseUsage of operation.responses) {
|
|
12884
|
+
if (responseUsage.source === "canonical") {
|
|
12885
|
+
canonicalResponses.push({
|
|
12886
|
+
name: responseUsage.responseName,
|
|
12887
|
+
path: context.getCanonicalResponseImportPath({
|
|
12888
|
+
importerDir: outputPaths.outputDir,
|
|
12889
|
+
responseName: responseUsage.responseName
|
|
12890
|
+
})
|
|
13078
12891
|
});
|
|
12892
|
+
continue;
|
|
13079
12893
|
}
|
|
13080
|
-
|
|
13081
|
-
operationId,
|
|
13082
|
-
pascalCaseOperationId,
|
|
13083
|
-
coreDir: context.coreDir,
|
|
13084
|
-
responseFile: `./${node_path.default.basename(outputResponseFileName, ".ts")}`,
|
|
13085
|
-
sourcePath: _rexeus_typeweaver_gen.Path.relative(outputDir, `${sourceDir}/${node_path.default.relative(sourceDir, sourceFile).replace(/\.ts$/, "")}`),
|
|
13086
|
-
sharedResponses,
|
|
13087
|
-
ownResponses,
|
|
13088
|
-
allStatusCodes
|
|
13089
|
-
});
|
|
13090
|
-
const relativePath = node_path.default.relative(context.outputDir, outputResponseValidationFile);
|
|
13091
|
-
context.writeFile(relativePath, content);
|
|
12894
|
+
ownResponses.push(createOwnResponseTemplateData(responseUsage.response));
|
|
13092
12895
|
}
|
|
13093
|
-
|
|
13094
|
-
|
|
12896
|
+
const content = context.renderTemplate(templateFile, {
|
|
12897
|
+
operationId: operation.operationId,
|
|
12898
|
+
pascalCaseOperationId,
|
|
12899
|
+
coreDir: context.coreDir,
|
|
12900
|
+
ownResponses,
|
|
12901
|
+
entityResponses: [],
|
|
12902
|
+
sharedResponses: canonicalResponses,
|
|
12903
|
+
responseFile: `./${node_path.default.basename(outputPaths.responseFileName, ".ts")}`
|
|
12904
|
+
});
|
|
12905
|
+
const relativePath = node_path.default.relative(context.outputDir, outputPaths.responseFile);
|
|
12906
|
+
context.writeFile(relativePath, content);
|
|
12907
|
+
}
|
|
12908
|
+
function createOwnResponseTemplateData(response) {
|
|
12909
|
+
return {
|
|
12910
|
+
name: response.name,
|
|
12911
|
+
body: response.body ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(response.body)) : void 0,
|
|
12912
|
+
header: response.header ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(response.header)) : void 0,
|
|
12913
|
+
statusCode: response.statusCode,
|
|
12914
|
+
statusCodeKey: _rexeus_typeweaver_core.HttpStatusCode[response.statusCode]
|
|
12915
|
+
};
|
|
12916
|
+
}
|
|
12917
|
+
function writeCanonicalResponseType(templateFile, response, context) {
|
|
12918
|
+
const pascalCaseName = case$1.default.pascal(response.name);
|
|
12919
|
+
const headerTsType = response.header ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(response.header)) : void 0;
|
|
12920
|
+
const bodyTsType = response.body ? (0, _rexeus_typeweaver_zod_to_ts.print)((0, _rexeus_typeweaver_zod_to_ts.fromZod)(response.body)) : void 0;
|
|
12921
|
+
const content = context.renderTemplate(templateFile, {
|
|
12922
|
+
coreDir: context.coreDir,
|
|
12923
|
+
httpStatusCode: _rexeus_typeweaver_core.HttpStatusCode,
|
|
12924
|
+
headerTsType,
|
|
12925
|
+
bodyTsType,
|
|
12926
|
+
pascalCaseName,
|
|
12927
|
+
sharedResponse: response
|
|
12928
|
+
});
|
|
12929
|
+
const relativePath = node_path.default.relative(context.outputDir, context.getCanonicalResponseOutputFile(response.name));
|
|
12930
|
+
context.writeFile(relativePath, content);
|
|
12931
|
+
}
|
|
13095
12932
|
//#endregion
|
|
13096
|
-
//#region src/
|
|
12933
|
+
//#region src/responseValidationGenerator.ts
|
|
13097
12934
|
const moduleDir$1 = node_path.default.dirname((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
}
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
|
|
13112
|
-
|
|
13113
|
-
|
|
12935
|
+
function generate(context) {
|
|
12936
|
+
const templateFilePath = node_path.default.join(moduleDir$1, "templates", "ResponseValidator.ejs");
|
|
12937
|
+
for (const resource of context.normalizedSpec.resources) resource.operations.forEach((operation) => {
|
|
12938
|
+
writeResponseValidator(templateFilePath, resource, operation, context);
|
|
12939
|
+
});
|
|
12940
|
+
}
|
|
12941
|
+
function writeResponseValidator(templateFilePath, resource, operation, context) {
|
|
12942
|
+
const outputPaths = context.getOperationOutputPaths({
|
|
12943
|
+
resourceName: resource.name,
|
|
12944
|
+
operationId: operation.operationId
|
|
12945
|
+
});
|
|
12946
|
+
const pascalCaseOperationId = case$1.default.pascal(operation.operationId);
|
|
12947
|
+
const ownResponses = [];
|
|
12948
|
+
const sharedResponses = [];
|
|
12949
|
+
const allStatusCodes = /* @__PURE__ */ new Map();
|
|
12950
|
+
operation.responses.forEach((responseUsage) => {
|
|
12951
|
+
const response = responseUsage.source === "canonical" ? context.getCanonicalResponse(responseUsage.responseName) : responseUsage.response;
|
|
12952
|
+
allStatusCodes.set(response.statusCode, response.statusCodeName);
|
|
12953
|
+
const templateData = {
|
|
12954
|
+
definitionVariableName: `${case$1.default.camel(response.name)}Definition`,
|
|
12955
|
+
name: response.name,
|
|
12956
|
+
hasBody: response.body !== void 0,
|
|
12957
|
+
hasHeader: response.header !== void 0,
|
|
12958
|
+
statusCode: response.statusCode
|
|
12959
|
+
};
|
|
12960
|
+
if (responseUsage.source === "canonical") {
|
|
12961
|
+
sharedResponses.push(templateData);
|
|
12962
|
+
return;
|
|
12963
|
+
}
|
|
12964
|
+
ownResponses.push({
|
|
12965
|
+
...templateData,
|
|
12966
|
+
statusCodeKey: _rexeus_typeweaver_core.HttpStatusCode[response.statusCode]
|
|
13114
12967
|
});
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
12968
|
+
});
|
|
12969
|
+
const content = context.renderTemplate(templateFilePath, {
|
|
12970
|
+
resourceName: resource.name,
|
|
12971
|
+
operationId: operation.operationId,
|
|
12972
|
+
pascalCaseOperationId,
|
|
12973
|
+
coreDir: context.coreDir,
|
|
12974
|
+
responseFile: `./${node_path.default.basename(outputPaths.responseFileName, ".ts")}`,
|
|
12975
|
+
specPath: context.getSpecImportPath({ importerDir: outputPaths.outputDir }),
|
|
12976
|
+
sharedResponses,
|
|
12977
|
+
ownResponses,
|
|
12978
|
+
allStatusCodes: Array.from(allStatusCodes.entries()).map(([statusCode, name]) => ({
|
|
12979
|
+
statusCode,
|
|
12980
|
+
name
|
|
12981
|
+
}))
|
|
12982
|
+
});
|
|
12983
|
+
const relativePath = node_path.default.relative(context.outputDir, outputPaths.responseValidationFile);
|
|
12984
|
+
context.writeFile(relativePath, content);
|
|
12985
|
+
}
|
|
13120
12986
|
//#endregion
|
|
13121
12987
|
//#region src/index.ts
|
|
13122
12988
|
const moduleDir = node_path.default.dirname((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
@@ -13125,13 +12991,11 @@ var TypesPlugin = class extends _rexeus_typeweaver_gen.BasePlugin {
|
|
|
13125
12991
|
generate(context) {
|
|
13126
12992
|
const libDir = node_path.default.join(moduleDir, "lib");
|
|
13127
12993
|
this.copyLibFiles(context, libDir, this.name);
|
|
13128
|
-
|
|
13129
|
-
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
ResponseValidationGenerator.generate(context);
|
|
12994
|
+
generate$3(context);
|
|
12995
|
+
generate$2(context);
|
|
12996
|
+
generate$1(context);
|
|
12997
|
+
generate(context);
|
|
13133
12998
|
}
|
|
13134
12999
|
};
|
|
13135
|
-
|
|
13136
13000
|
//#endregion
|
|
13137
|
-
module.exports = TypesPlugin;
|
|
13001
|
+
module.exports = TypesPlugin;
|