@elysiajs/openapi 1.4.10 → 1.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bun.lock +79 -144
- package/dist/cjs/gen/index.js +1021 -344
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1308 -392
- package/dist/cjs/openapi.d.ts +1 -1
- package/dist/cjs/openapi.js +213 -9
- package/dist/cjs/scalar/index.js +9 -2
- package/dist/cjs/types.d.ts +8 -0
- package/dist/gen/index.mjs +1021 -344
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1308 -392
- package/dist/openapi.d.ts +1 -1
- package/dist/openapi.mjs +213 -9
- package/dist/scalar/index.d.ts +1 -1
- package/dist/scalar/index.mjs +9 -2
- package/dist/types.d.ts +8 -0
- package/package.json +3 -3
package/dist/gen/index.mjs
CHANGED
|
@@ -250,11 +250,11 @@ function CreateType(schema, options) {
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
// node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.mjs
|
|
253
|
-
var TransformKind = Symbol.for("TypeBox.Transform");
|
|
254
|
-
var ReadonlyKind = Symbol.for("TypeBox.Readonly");
|
|
255
|
-
var OptionalKind = Symbol.for("TypeBox.Optional");
|
|
256
|
-
var Hint = Symbol.for("TypeBox.Hint");
|
|
257
|
-
var Kind = Symbol.for("TypeBox.Kind");
|
|
253
|
+
var TransformKind = /* @__PURE__ */ Symbol.for("TypeBox.Transform");
|
|
254
|
+
var ReadonlyKind = /* @__PURE__ */ Symbol.for("TypeBox.Readonly");
|
|
255
|
+
var OptionalKind = /* @__PURE__ */ Symbol.for("TypeBox.Optional");
|
|
256
|
+
var Hint = /* @__PURE__ */ Symbol.for("TypeBox.Hint");
|
|
257
|
+
var Kind = /* @__PURE__ */ Symbol.for("TypeBox.Kind");
|
|
258
258
|
|
|
259
259
|
// node_modules/@sinclair/typebox/build/esm/type/error/error.mjs
|
|
260
260
|
var TypeBoxError = class extends Error {
|
|
@@ -3158,47 +3158,41 @@ function TypeBoxFromTypeBox(type) {
|
|
|
3158
3158
|
return CloneType(type);
|
|
3159
3159
|
}
|
|
3160
3160
|
|
|
3161
|
-
// node_modules/valibot/dist/index.
|
|
3162
|
-
var store;
|
|
3161
|
+
// node_modules/valibot/dist/index.mjs
|
|
3162
|
+
var store$4;
|
|
3163
3163
|
// @__NO_SIDE_EFFECTS__
|
|
3164
|
-
function getGlobalConfig(
|
|
3164
|
+
function getGlobalConfig(config$1) {
|
|
3165
3165
|
return {
|
|
3166
|
-
lang:
|
|
3167
|
-
message:
|
|
3168
|
-
abortEarly:
|
|
3169
|
-
abortPipeEarly:
|
|
3166
|
+
lang: config$1?.lang ?? store$4?.lang,
|
|
3167
|
+
message: config$1?.message,
|
|
3168
|
+
abortEarly: config$1?.abortEarly ?? store$4?.abortEarly,
|
|
3169
|
+
abortPipeEarly: config$1?.abortPipeEarly ?? store$4?.abortPipeEarly
|
|
3170
3170
|
};
|
|
3171
3171
|
}
|
|
3172
|
-
var
|
|
3172
|
+
var store$3;
|
|
3173
3173
|
// @__NO_SIDE_EFFECTS__
|
|
3174
3174
|
function getGlobalMessage(lang) {
|
|
3175
|
-
return
|
|
3175
|
+
return store$3?.get(lang);
|
|
3176
3176
|
}
|
|
3177
|
-
var
|
|
3177
|
+
var store$2;
|
|
3178
3178
|
// @__NO_SIDE_EFFECTS__
|
|
3179
3179
|
function getSchemaMessage(lang) {
|
|
3180
|
-
return
|
|
3180
|
+
return store$2?.get(lang);
|
|
3181
3181
|
}
|
|
3182
|
-
var
|
|
3182
|
+
var store$1;
|
|
3183
3183
|
// @__NO_SIDE_EFFECTS__
|
|
3184
3184
|
function getSpecificMessage(reference, lang) {
|
|
3185
|
-
return
|
|
3185
|
+
return store$1?.get(reference)?.get(lang);
|
|
3186
3186
|
}
|
|
3187
3187
|
// @__NO_SIDE_EFFECTS__
|
|
3188
3188
|
function _stringify(input) {
|
|
3189
3189
|
const type = typeof input;
|
|
3190
|
-
if (type === "string") {
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
if (type === "number" || type === "bigint" || type === "boolean") {
|
|
3194
|
-
return `${input}`;
|
|
3195
|
-
}
|
|
3196
|
-
if (type === "object" || type === "function") {
|
|
3197
|
-
return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? "null";
|
|
3198
|
-
}
|
|
3190
|
+
if (type === "string") return `"${input}"`;
|
|
3191
|
+
if (type === "number" || type === "bigint" || type === "boolean") return `${input}`;
|
|
3192
|
+
if (type === "object" || type === "function") return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? "null";
|
|
3199
3193
|
return type;
|
|
3200
3194
|
}
|
|
3201
|
-
function _addIssue(context, label, dataset,
|
|
3195
|
+
function _addIssue(context, label, dataset, config$1, other) {
|
|
3202
3196
|
const input = other && "input" in other ? other.input : dataset.value;
|
|
3203
3197
|
const expected = other?.expected ?? context.expects ?? null;
|
|
3204
3198
|
const received = other?.received ?? /* @__PURE__ */ _stringify(input);
|
|
@@ -3212,48 +3206,49 @@ function _addIssue(context, label, dataset, config2, other) {
|
|
|
3212
3206
|
requirement: context.requirement,
|
|
3213
3207
|
path: other?.path,
|
|
3214
3208
|
issues: other?.issues,
|
|
3215
|
-
lang:
|
|
3216
|
-
abortEarly:
|
|
3217
|
-
abortPipeEarly:
|
|
3209
|
+
lang: config$1.lang,
|
|
3210
|
+
abortEarly: config$1.abortEarly,
|
|
3211
|
+
abortPipeEarly: config$1.abortPipeEarly
|
|
3218
3212
|
};
|
|
3219
3213
|
const isSchema = context.kind === "schema";
|
|
3220
|
-
const
|
|
3221
|
-
if (
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
) : message2;
|
|
3226
|
-
}
|
|
3227
|
-
if (isSchema) {
|
|
3228
|
-
dataset.typed = false;
|
|
3229
|
-
}
|
|
3230
|
-
if (dataset.issues) {
|
|
3231
|
-
dataset.issues.push(issue2);
|
|
3232
|
-
} else {
|
|
3233
|
-
dataset.issues = [issue2];
|
|
3234
|
-
}
|
|
3214
|
+
const message$1 = other?.message ?? context.message ?? /* @__PURE__ */ getSpecificMessage(context.reference, issue2.lang) ?? (isSchema ? /* @__PURE__ */ getSchemaMessage(issue2.lang) : null) ?? config$1.message ?? /* @__PURE__ */ getGlobalMessage(issue2.lang);
|
|
3215
|
+
if (message$1 !== void 0) issue2.message = typeof message$1 === "function" ? message$1(issue2) : message$1;
|
|
3216
|
+
if (isSchema) dataset.typed = false;
|
|
3217
|
+
if (dataset.issues) dataset.issues.push(issue2);
|
|
3218
|
+
else dataset.issues = [issue2];
|
|
3235
3219
|
}
|
|
3236
3220
|
// @__NO_SIDE_EFFECTS__
|
|
3237
3221
|
function _getStandardProps(context) {
|
|
3238
3222
|
return {
|
|
3239
3223
|
version: 1,
|
|
3240
3224
|
vendor: "valibot",
|
|
3241
|
-
validate(
|
|
3242
|
-
return context["~run"]({ value:
|
|
3225
|
+
validate(value$1) {
|
|
3226
|
+
return context["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig());
|
|
3243
3227
|
}
|
|
3244
3228
|
};
|
|
3245
3229
|
}
|
|
3246
3230
|
var NON_DIGIT_REGEX = /\D/gu;
|
|
3247
3231
|
// @__NO_SIDE_EFFECTS__
|
|
3248
3232
|
function _isLuhnAlgo(input) {
|
|
3249
|
-
const
|
|
3250
|
-
let
|
|
3233
|
+
const number$1 = input.replace(NON_DIGIT_REGEX, "");
|
|
3234
|
+
let length$1 = number$1.length;
|
|
3251
3235
|
let bit = 1;
|
|
3252
3236
|
let sum = 0;
|
|
3253
|
-
while (
|
|
3254
|
-
const
|
|
3237
|
+
while (length$1) {
|
|
3238
|
+
const value$1 = +number$1[--length$1];
|
|
3255
3239
|
bit ^= 1;
|
|
3256
|
-
sum += bit ? [
|
|
3240
|
+
sum += bit ? [
|
|
3241
|
+
0,
|
|
3242
|
+
2,
|
|
3243
|
+
4,
|
|
3244
|
+
6,
|
|
3245
|
+
8,
|
|
3246
|
+
1,
|
|
3247
|
+
3,
|
|
3248
|
+
5,
|
|
3249
|
+
7,
|
|
3250
|
+
9
|
|
3251
|
+
][value$1] : value$1;
|
|
3257
3252
|
}
|
|
3258
3253
|
return sum % 10 === 0;
|
|
3259
3254
|
}
|
|
@@ -3263,14 +3258,8 @@ var CUID2_REGEX = /^[a-z][\da-z]*$/u;
|
|
|
3263
3258
|
var DECIMAL_REGEX = /^[+-]?(?:\d*\.)?\d+$/u;
|
|
3264
3259
|
var DIGITS_REGEX = /^\d+$/u;
|
|
3265
3260
|
var EMAIL_REGEX = /^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;
|
|
3266
|
-
var EMOJI_REGEX = (
|
|
3267
|
-
|
|
3268
|
-
new RegExp("^(?:[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}))*)+$", "u")
|
|
3269
|
-
);
|
|
3270
|
-
var IPV4_REGEX = (
|
|
3271
|
-
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive
|
|
3272
|
-
/^(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])(?:\.(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])){3}$/u
|
|
3273
|
-
);
|
|
3261
|
+
var EMOJI_REGEX = new RegExp("^(?:[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|(?![\\p{Emoji_Modifier_Base}\\u{1F1E6}-\\u{1F1FF}])\\p{Emoji_Presentation}))*)+$", "u");
|
|
3262
|
+
var IPV4_REGEX = /^(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])(?:\.(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])){3}$/u;
|
|
3274
3263
|
var IPV6_REGEX = /^(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:|(?:[\da-f]{1,4}:){1,6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,5}(?::[\da-f]{1,4}){1,2}|(?:[\da-f]{1,4}:){1,4}(?::[\da-f]{1,4}){1,3}|(?:[\da-f]{1,4}:){1,3}(?::[\da-f]{1,4}){1,4}|(?:[\da-f]{1,4}:){1,2}(?::[\da-f]{1,4}){1,5}|[\da-f]{1,4}:(?::[\da-f]{1,4}){1,6}|:(?:(?::[\da-f]{1,4}){1,7}|:)|fe80:(?::[\da-f]{0,4}){0,4}%[\da-z]+|::(?:f{4}(?::0{1,4})?:)?(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d)|(?:[\da-f]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d))$/iu;
|
|
3275
3264
|
var IP_REGEX = /^(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])(?:\.(?:(?:[1-9]|1\d|2[0-4])?\d|25[0-5])){3}$|^(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:|(?:[\da-f]{1,4}:){1,6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,5}(?::[\da-f]{1,4}){1,2}|(?:[\da-f]{1,4}:){1,4}(?::[\da-f]{1,4}){1,3}|(?:[\da-f]{1,4}:){1,3}(?::[\da-f]{1,4}){1,4}|(?:[\da-f]{1,4}:){1,2}(?::[\da-f]{1,4}){1,5}|[\da-f]{1,4}:(?::[\da-f]{1,4}){1,6}|:(?:(?::[\da-f]{1,4}){1,7}|:)|fe80:(?::[\da-f]{0,4}){0,4}%[\da-z]+|::(?:f{4}(?::0{1,4})?:)?(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d)|(?:[\da-f]{1,4}:){1,4}:(?:(?:25[0-5]|(?:2[0-4]|1?\d)?\d)\.){3}(?:25[0-5]|(?:2[0-4]|1?\d)?\d))$/iu;
|
|
3276
3265
|
var ISO_DATE_REGEX = /^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])$/u;
|
|
@@ -3287,7 +3276,7 @@ var OCTAL_REGEX = /^(?:0o)?[0-7]+$/u;
|
|
|
3287
3276
|
var ULID_REGEX = /^[\da-hjkmnp-tv-zA-HJKMNP-TV-Z]{26}$/u;
|
|
3288
3277
|
var UUID_REGEX = /^[\da-f]{8}(?:-[\da-f]{4}){3}-[\da-f]{12}$/iu;
|
|
3289
3278
|
// @__NO_SIDE_EFFECTS__
|
|
3290
|
-
function base64(
|
|
3279
|
+
function base64(message$1) {
|
|
3291
3280
|
return {
|
|
3292
3281
|
kind: "validation",
|
|
3293
3282
|
type: "base64",
|
|
@@ -3295,17 +3284,15 @@ function base64(message2) {
|
|
|
3295
3284
|
async: false,
|
|
3296
3285
|
expects: null,
|
|
3297
3286
|
requirement: BASE64_REGEX,
|
|
3298
|
-
message:
|
|
3299
|
-
"~run"(dataset,
|
|
3300
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3301
|
-
_addIssue(this, "Base64", dataset, config2);
|
|
3302
|
-
}
|
|
3287
|
+
message: message$1,
|
|
3288
|
+
"~run"(dataset, config$1) {
|
|
3289
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "Base64", dataset, config$1);
|
|
3303
3290
|
return dataset;
|
|
3304
3291
|
}
|
|
3305
3292
|
};
|
|
3306
3293
|
}
|
|
3307
3294
|
// @__NO_SIDE_EFFECTS__
|
|
3308
|
-
function bic(
|
|
3295
|
+
function bic(message$1) {
|
|
3309
3296
|
return {
|
|
3310
3297
|
kind: "validation",
|
|
3311
3298
|
type: "bic",
|
|
@@ -3313,11 +3300,9 @@ function bic(message2) {
|
|
|
3313
3300
|
async: false,
|
|
3314
3301
|
expects: null,
|
|
3315
3302
|
requirement: BIC_REGEX,
|
|
3316
|
-
message:
|
|
3317
|
-
"~run"(dataset,
|
|
3318
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3319
|
-
_addIssue(this, "BIC", dataset, config2);
|
|
3320
|
-
}
|
|
3303
|
+
message: message$1,
|
|
3304
|
+
"~run"(dataset, config$1) {
|
|
3305
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "BIC", dataset, config$1);
|
|
3321
3306
|
return dataset;
|
|
3322
3307
|
}
|
|
3323
3308
|
};
|
|
@@ -3325,24 +3310,16 @@ function bic(message2) {
|
|
|
3325
3310
|
var CREDIT_CARD_REGEX = /^(?:\d{14,19}|\d{4}(?: \d{3,6}){2,4}|\d{4}(?:-\d{3,6}){2,4})$/u;
|
|
3326
3311
|
var SANITIZE_REGEX = /[- ]/gu;
|
|
3327
3312
|
var PROVIDER_REGEX_LIST = [
|
|
3328
|
-
// American Express
|
|
3329
3313
|
/^3[47]\d{13}$/u,
|
|
3330
|
-
// Diners Club
|
|
3331
3314
|
/^3(?:0[0-5]|[68]\d)\d{11,13}$/u,
|
|
3332
|
-
// Discover
|
|
3333
3315
|
/^6(?:011|5\d{2})\d{12,15}$/u,
|
|
3334
|
-
// JCB
|
|
3335
3316
|
/^(?:2131|1800|35\d{3})\d{11}$/u,
|
|
3336
|
-
// Mastercard
|
|
3337
|
-
// eslint-disable-next-line redos-detector/no-unsafe-regex
|
|
3338
3317
|
/^5[1-5]\d{2}|(?:222\d|22[3-9]\d|2[3-6]\d{2}|27[01]\d|2720)\d{12}$/u,
|
|
3339
|
-
// UnionPay
|
|
3340
3318
|
/^(?:6[27]\d{14,17}|81\d{14,17})$/u,
|
|
3341
|
-
// Visa
|
|
3342
3319
|
/^4\d{12}(?:\d{3,6})?$/u
|
|
3343
3320
|
];
|
|
3344
3321
|
// @__NO_SIDE_EFFECTS__
|
|
3345
|
-
function creditCard(
|
|
3322
|
+
function creditCard(message$1) {
|
|
3346
3323
|
return {
|
|
3347
3324
|
kind: "validation",
|
|
3348
3325
|
type: "credit_card",
|
|
@@ -3351,22 +3328,17 @@ function creditCard(message2) {
|
|
|
3351
3328
|
expects: null,
|
|
3352
3329
|
requirement(input) {
|
|
3353
3330
|
let sanitized;
|
|
3354
|
-
return CREDIT_CARD_REGEX.test(input) &&
|
|
3355
|
-
(sanitized = input.replace(SANITIZE_REGEX, "")) && // Check if it matches a provider
|
|
3356
|
-
PROVIDER_REGEX_LIST.some((regex2) => regex2.test(sanitized)) && // Check if passes luhn algorithm
|
|
3357
|
-
/* @__PURE__ */ _isLuhnAlgo(sanitized);
|
|
3331
|
+
return CREDIT_CARD_REGEX.test(input) && (sanitized = input.replace(SANITIZE_REGEX, "")) && PROVIDER_REGEX_LIST.some((regex$1) => regex$1.test(sanitized)) && /* @__PURE__ */ _isLuhnAlgo(sanitized);
|
|
3358
3332
|
},
|
|
3359
|
-
message:
|
|
3360
|
-
"~run"(dataset,
|
|
3361
|
-
if (dataset.typed && !this.requirement(dataset.value))
|
|
3362
|
-
_addIssue(this, "credit card", dataset, config2);
|
|
3363
|
-
}
|
|
3333
|
+
message: message$1,
|
|
3334
|
+
"~run"(dataset, config$1) {
|
|
3335
|
+
if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "credit card", dataset, config$1);
|
|
3364
3336
|
return dataset;
|
|
3365
3337
|
}
|
|
3366
3338
|
};
|
|
3367
3339
|
}
|
|
3368
3340
|
// @__NO_SIDE_EFFECTS__
|
|
3369
|
-
function cuid2(
|
|
3341
|
+
function cuid2(message$1) {
|
|
3370
3342
|
return {
|
|
3371
3343
|
kind: "validation",
|
|
3372
3344
|
type: "cuid2",
|
|
@@ -3374,17 +3346,15 @@ function cuid2(message2) {
|
|
|
3374
3346
|
async: false,
|
|
3375
3347
|
expects: null,
|
|
3376
3348
|
requirement: CUID2_REGEX,
|
|
3377
|
-
message:
|
|
3378
|
-
"~run"(dataset,
|
|
3379
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3380
|
-
_addIssue(this, "Cuid2", dataset, config2);
|
|
3381
|
-
}
|
|
3349
|
+
message: message$1,
|
|
3350
|
+
"~run"(dataset, config$1) {
|
|
3351
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "Cuid2", dataset, config$1);
|
|
3382
3352
|
return dataset;
|
|
3383
3353
|
}
|
|
3384
3354
|
};
|
|
3385
3355
|
}
|
|
3386
3356
|
// @__NO_SIDE_EFFECTS__
|
|
3387
|
-
function decimal(
|
|
3357
|
+
function decimal(message$1) {
|
|
3388
3358
|
return {
|
|
3389
3359
|
kind: "validation",
|
|
3390
3360
|
type: "decimal",
|
|
@@ -3392,17 +3362,15 @@ function decimal(message2) {
|
|
|
3392
3362
|
async: false,
|
|
3393
3363
|
expects: null,
|
|
3394
3364
|
requirement: DECIMAL_REGEX,
|
|
3395
|
-
message:
|
|
3396
|
-
"~run"(dataset,
|
|
3397
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3398
|
-
_addIssue(this, "decimal", dataset, config2);
|
|
3399
|
-
}
|
|
3365
|
+
message: message$1,
|
|
3366
|
+
"~run"(dataset, config$1) {
|
|
3367
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "decimal", dataset, config$1);
|
|
3400
3368
|
return dataset;
|
|
3401
3369
|
}
|
|
3402
3370
|
};
|
|
3403
3371
|
}
|
|
3404
3372
|
// @__NO_SIDE_EFFECTS__
|
|
3405
|
-
function digits(
|
|
3373
|
+
function digits(message$1) {
|
|
3406
3374
|
return {
|
|
3407
3375
|
kind: "validation",
|
|
3408
3376
|
type: "digits",
|
|
@@ -3410,17 +3378,15 @@ function digits(message2) {
|
|
|
3410
3378
|
async: false,
|
|
3411
3379
|
expects: null,
|
|
3412
3380
|
requirement: DIGITS_REGEX,
|
|
3413
|
-
message:
|
|
3414
|
-
"~run"(dataset,
|
|
3415
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3416
|
-
_addIssue(this, "digits", dataset, config2);
|
|
3417
|
-
}
|
|
3381
|
+
message: message$1,
|
|
3382
|
+
"~run"(dataset, config$1) {
|
|
3383
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "digits", dataset, config$1);
|
|
3418
3384
|
return dataset;
|
|
3419
3385
|
}
|
|
3420
3386
|
};
|
|
3421
3387
|
}
|
|
3422
3388
|
// @__NO_SIDE_EFFECTS__
|
|
3423
|
-
function email(
|
|
3389
|
+
function email(message$1) {
|
|
3424
3390
|
return {
|
|
3425
3391
|
kind: "validation",
|
|
3426
3392
|
type: "email",
|
|
@@ -3428,17 +3394,15 @@ function email(message2) {
|
|
|
3428
3394
|
expects: null,
|
|
3429
3395
|
async: false,
|
|
3430
3396
|
requirement: EMAIL_REGEX,
|
|
3431
|
-
message:
|
|
3432
|
-
"~run"(dataset,
|
|
3433
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3434
|
-
_addIssue(this, "email", dataset, config2);
|
|
3435
|
-
}
|
|
3397
|
+
message: message$1,
|
|
3398
|
+
"~run"(dataset, config$1) {
|
|
3399
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "email", dataset, config$1);
|
|
3436
3400
|
return dataset;
|
|
3437
3401
|
}
|
|
3438
3402
|
};
|
|
3439
3403
|
}
|
|
3440
3404
|
// @__NO_SIDE_EFFECTS__
|
|
3441
|
-
function emoji(
|
|
3405
|
+
function emoji(message$1) {
|
|
3442
3406
|
return {
|
|
3443
3407
|
kind: "validation",
|
|
3444
3408
|
type: "emoji",
|
|
@@ -3446,17 +3410,15 @@ function emoji(message2) {
|
|
|
3446
3410
|
async: false,
|
|
3447
3411
|
expects: null,
|
|
3448
3412
|
requirement: EMOJI_REGEX,
|
|
3449
|
-
message:
|
|
3450
|
-
"~run"(dataset,
|
|
3451
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3452
|
-
_addIssue(this, "emoji", dataset, config2);
|
|
3453
|
-
}
|
|
3413
|
+
message: message$1,
|
|
3414
|
+
"~run"(dataset, config$1) {
|
|
3415
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "emoji", dataset, config$1);
|
|
3454
3416
|
return dataset;
|
|
3455
3417
|
}
|
|
3456
3418
|
};
|
|
3457
3419
|
}
|
|
3458
3420
|
// @__NO_SIDE_EFFECTS__
|
|
3459
|
-
function ip(
|
|
3421
|
+
function ip(message$1) {
|
|
3460
3422
|
return {
|
|
3461
3423
|
kind: "validation",
|
|
3462
3424
|
type: "ip",
|
|
@@ -3464,17 +3426,15 @@ function ip(message2) {
|
|
|
3464
3426
|
async: false,
|
|
3465
3427
|
expects: null,
|
|
3466
3428
|
requirement: IP_REGEX,
|
|
3467
|
-
message:
|
|
3468
|
-
"~run"(dataset,
|
|
3469
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3470
|
-
_addIssue(this, "IP", dataset, config2);
|
|
3471
|
-
}
|
|
3429
|
+
message: message$1,
|
|
3430
|
+
"~run"(dataset, config$1) {
|
|
3431
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "IP", dataset, config$1);
|
|
3472
3432
|
return dataset;
|
|
3473
3433
|
}
|
|
3474
3434
|
};
|
|
3475
3435
|
}
|
|
3476
3436
|
// @__NO_SIDE_EFFECTS__
|
|
3477
|
-
function ipv4(
|
|
3437
|
+
function ipv4(message$1) {
|
|
3478
3438
|
return {
|
|
3479
3439
|
kind: "validation",
|
|
3480
3440
|
type: "ipv4",
|
|
@@ -3482,17 +3442,15 @@ function ipv4(message2) {
|
|
|
3482
3442
|
async: false,
|
|
3483
3443
|
expects: null,
|
|
3484
3444
|
requirement: IPV4_REGEX,
|
|
3485
|
-
message:
|
|
3486
|
-
"~run"(dataset,
|
|
3487
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3488
|
-
_addIssue(this, "IPv4", dataset, config2);
|
|
3489
|
-
}
|
|
3445
|
+
message: message$1,
|
|
3446
|
+
"~run"(dataset, config$1) {
|
|
3447
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "IPv4", dataset, config$1);
|
|
3490
3448
|
return dataset;
|
|
3491
3449
|
}
|
|
3492
3450
|
};
|
|
3493
3451
|
}
|
|
3494
3452
|
// @__NO_SIDE_EFFECTS__
|
|
3495
|
-
function ipv6(
|
|
3453
|
+
function ipv6(message$1) {
|
|
3496
3454
|
return {
|
|
3497
3455
|
kind: "validation",
|
|
3498
3456
|
type: "ipv6",
|
|
@@ -3500,17 +3458,15 @@ function ipv6(message2) {
|
|
|
3500
3458
|
async: false,
|
|
3501
3459
|
expects: null,
|
|
3502
3460
|
requirement: IPV6_REGEX,
|
|
3503
|
-
message:
|
|
3504
|
-
"~run"(dataset,
|
|
3505
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3506
|
-
_addIssue(this, "IPv6", dataset, config2);
|
|
3507
|
-
}
|
|
3461
|
+
message: message$1,
|
|
3462
|
+
"~run"(dataset, config$1) {
|
|
3463
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "IPv6", dataset, config$1);
|
|
3508
3464
|
return dataset;
|
|
3509
3465
|
}
|
|
3510
3466
|
};
|
|
3511
3467
|
}
|
|
3512
3468
|
// @__NO_SIDE_EFFECTS__
|
|
3513
|
-
function isoDate(
|
|
3469
|
+
function isoDate(message$1) {
|
|
3514
3470
|
return {
|
|
3515
3471
|
kind: "validation",
|
|
3516
3472
|
type: "iso_date",
|
|
@@ -3518,17 +3474,15 @@ function isoDate(message2) {
|
|
|
3518
3474
|
async: false,
|
|
3519
3475
|
expects: null,
|
|
3520
3476
|
requirement: ISO_DATE_REGEX,
|
|
3521
|
-
message:
|
|
3522
|
-
"~run"(dataset,
|
|
3523
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3524
|
-
_addIssue(this, "date", dataset, config2);
|
|
3525
|
-
}
|
|
3477
|
+
message: message$1,
|
|
3478
|
+
"~run"(dataset, config$1) {
|
|
3479
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "date", dataset, config$1);
|
|
3526
3480
|
return dataset;
|
|
3527
3481
|
}
|
|
3528
3482
|
};
|
|
3529
3483
|
}
|
|
3530
3484
|
// @__NO_SIDE_EFFECTS__
|
|
3531
|
-
function isoDateTime(
|
|
3485
|
+
function isoDateTime(message$1) {
|
|
3532
3486
|
return {
|
|
3533
3487
|
kind: "validation",
|
|
3534
3488
|
type: "iso_date_time",
|
|
@@ -3536,17 +3490,15 @@ function isoDateTime(message2) {
|
|
|
3536
3490
|
async: false,
|
|
3537
3491
|
expects: null,
|
|
3538
3492
|
requirement: ISO_DATE_TIME_REGEX,
|
|
3539
|
-
message:
|
|
3540
|
-
"~run"(dataset,
|
|
3541
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3542
|
-
_addIssue(this, "date-time", dataset, config2);
|
|
3543
|
-
}
|
|
3493
|
+
message: message$1,
|
|
3494
|
+
"~run"(dataset, config$1) {
|
|
3495
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "date-time", dataset, config$1);
|
|
3544
3496
|
return dataset;
|
|
3545
3497
|
}
|
|
3546
3498
|
};
|
|
3547
3499
|
}
|
|
3548
3500
|
// @__NO_SIDE_EFFECTS__
|
|
3549
|
-
function isoTime(
|
|
3501
|
+
function isoTime(message$1) {
|
|
3550
3502
|
return {
|
|
3551
3503
|
kind: "validation",
|
|
3552
3504
|
type: "iso_time",
|
|
@@ -3554,17 +3506,15 @@ function isoTime(message2) {
|
|
|
3554
3506
|
async: false,
|
|
3555
3507
|
expects: null,
|
|
3556
3508
|
requirement: ISO_TIME_REGEX,
|
|
3557
|
-
message:
|
|
3558
|
-
"~run"(dataset,
|
|
3559
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3560
|
-
_addIssue(this, "time", dataset, config2);
|
|
3561
|
-
}
|
|
3509
|
+
message: message$1,
|
|
3510
|
+
"~run"(dataset, config$1) {
|
|
3511
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "time", dataset, config$1);
|
|
3562
3512
|
return dataset;
|
|
3563
3513
|
}
|
|
3564
3514
|
};
|
|
3565
3515
|
}
|
|
3566
3516
|
// @__NO_SIDE_EFFECTS__
|
|
3567
|
-
function isoTimeSecond(
|
|
3517
|
+
function isoTimeSecond(message$1) {
|
|
3568
3518
|
return {
|
|
3569
3519
|
kind: "validation",
|
|
3570
3520
|
type: "iso_time_second",
|
|
@@ -3572,17 +3522,15 @@ function isoTimeSecond(message2) {
|
|
|
3572
3522
|
async: false,
|
|
3573
3523
|
expects: null,
|
|
3574
3524
|
requirement: ISO_TIME_SECOND_REGEX,
|
|
3575
|
-
message:
|
|
3576
|
-
"~run"(dataset,
|
|
3577
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3578
|
-
_addIssue(this, "time-second", dataset, config2);
|
|
3579
|
-
}
|
|
3525
|
+
message: message$1,
|
|
3526
|
+
"~run"(dataset, config$1) {
|
|
3527
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "time-second", dataset, config$1);
|
|
3580
3528
|
return dataset;
|
|
3581
3529
|
}
|
|
3582
3530
|
};
|
|
3583
3531
|
}
|
|
3584
3532
|
// @__NO_SIDE_EFFECTS__
|
|
3585
|
-
function isoTimestamp(
|
|
3533
|
+
function isoTimestamp(message$1) {
|
|
3586
3534
|
return {
|
|
3587
3535
|
kind: "validation",
|
|
3588
3536
|
type: "iso_timestamp",
|
|
@@ -3590,17 +3538,15 @@ function isoTimestamp(message2) {
|
|
|
3590
3538
|
async: false,
|
|
3591
3539
|
expects: null,
|
|
3592
3540
|
requirement: ISO_TIMESTAMP_REGEX,
|
|
3593
|
-
message:
|
|
3594
|
-
"~run"(dataset,
|
|
3595
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3596
|
-
_addIssue(this, "timestamp", dataset, config2);
|
|
3597
|
-
}
|
|
3541
|
+
message: message$1,
|
|
3542
|
+
"~run"(dataset, config$1) {
|
|
3543
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "timestamp", dataset, config$1);
|
|
3598
3544
|
return dataset;
|
|
3599
3545
|
}
|
|
3600
3546
|
};
|
|
3601
3547
|
}
|
|
3602
3548
|
// @__NO_SIDE_EFFECTS__
|
|
3603
|
-
function isoWeek(
|
|
3549
|
+
function isoWeek(message$1) {
|
|
3604
3550
|
return {
|
|
3605
3551
|
kind: "validation",
|
|
3606
3552
|
type: "iso_week",
|
|
@@ -3608,17 +3554,15 @@ function isoWeek(message2) {
|
|
|
3608
3554
|
async: false,
|
|
3609
3555
|
expects: null,
|
|
3610
3556
|
requirement: ISO_WEEK_REGEX,
|
|
3611
|
-
message:
|
|
3612
|
-
"~run"(dataset,
|
|
3613
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3614
|
-
_addIssue(this, "week", dataset, config2);
|
|
3615
|
-
}
|
|
3557
|
+
message: message$1,
|
|
3558
|
+
"~run"(dataset, config$1) {
|
|
3559
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "week", dataset, config$1);
|
|
3616
3560
|
return dataset;
|
|
3617
3561
|
}
|
|
3618
3562
|
};
|
|
3619
3563
|
}
|
|
3620
3564
|
// @__NO_SIDE_EFFECTS__
|
|
3621
|
-
function mac(
|
|
3565
|
+
function mac(message$1) {
|
|
3622
3566
|
return {
|
|
3623
3567
|
kind: "validation",
|
|
3624
3568
|
type: "mac",
|
|
@@ -3626,17 +3570,15 @@ function mac(message2) {
|
|
|
3626
3570
|
async: false,
|
|
3627
3571
|
expects: null,
|
|
3628
3572
|
requirement: MAC_REGEX,
|
|
3629
|
-
message:
|
|
3630
|
-
"~run"(dataset,
|
|
3631
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3632
|
-
_addIssue(this, "MAC", dataset, config2);
|
|
3633
|
-
}
|
|
3573
|
+
message: message$1,
|
|
3574
|
+
"~run"(dataset, config$1) {
|
|
3575
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "MAC", dataset, config$1);
|
|
3634
3576
|
return dataset;
|
|
3635
3577
|
}
|
|
3636
3578
|
};
|
|
3637
3579
|
}
|
|
3638
3580
|
// @__NO_SIDE_EFFECTS__
|
|
3639
|
-
function mac48(
|
|
3581
|
+
function mac48(message$1) {
|
|
3640
3582
|
return {
|
|
3641
3583
|
kind: "validation",
|
|
3642
3584
|
type: "mac48",
|
|
@@ -3644,17 +3586,15 @@ function mac48(message2) {
|
|
|
3644
3586
|
async: false,
|
|
3645
3587
|
expects: null,
|
|
3646
3588
|
requirement: MAC48_REGEX,
|
|
3647
|
-
message:
|
|
3648
|
-
"~run"(dataset,
|
|
3649
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3650
|
-
_addIssue(this, "48-bit MAC", dataset, config2);
|
|
3651
|
-
}
|
|
3589
|
+
message: message$1,
|
|
3590
|
+
"~run"(dataset, config$1) {
|
|
3591
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "48-bit MAC", dataset, config$1);
|
|
3652
3592
|
return dataset;
|
|
3653
3593
|
}
|
|
3654
3594
|
};
|
|
3655
3595
|
}
|
|
3656
3596
|
// @__NO_SIDE_EFFECTS__
|
|
3657
|
-
function mac64(
|
|
3597
|
+
function mac64(message$1) {
|
|
3658
3598
|
return {
|
|
3659
3599
|
kind: "validation",
|
|
3660
3600
|
type: "mac64",
|
|
@@ -3662,17 +3602,15 @@ function mac64(message2) {
|
|
|
3662
3602
|
async: false,
|
|
3663
3603
|
expects: null,
|
|
3664
3604
|
requirement: MAC64_REGEX,
|
|
3665
|
-
message:
|
|
3666
|
-
"~run"(dataset,
|
|
3667
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3668
|
-
_addIssue(this, "64-bit MAC", dataset, config2);
|
|
3669
|
-
}
|
|
3605
|
+
message: message$1,
|
|
3606
|
+
"~run"(dataset, config$1) {
|
|
3607
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "64-bit MAC", dataset, config$1);
|
|
3670
3608
|
return dataset;
|
|
3671
3609
|
}
|
|
3672
3610
|
};
|
|
3673
3611
|
}
|
|
3674
3612
|
// @__NO_SIDE_EFFECTS__
|
|
3675
|
-
function nanoid(
|
|
3613
|
+
function nanoid(message$1) {
|
|
3676
3614
|
return {
|
|
3677
3615
|
kind: "validation",
|
|
3678
3616
|
type: "nanoid",
|
|
@@ -3680,17 +3618,15 @@ function nanoid(message2) {
|
|
|
3680
3618
|
async: false,
|
|
3681
3619
|
expects: null,
|
|
3682
3620
|
requirement: NANO_ID_REGEX,
|
|
3683
|
-
message:
|
|
3684
|
-
"~run"(dataset,
|
|
3685
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3686
|
-
_addIssue(this, "Nano ID", dataset, config2);
|
|
3687
|
-
}
|
|
3621
|
+
message: message$1,
|
|
3622
|
+
"~run"(dataset, config$1) {
|
|
3623
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "Nano ID", dataset, config$1);
|
|
3688
3624
|
return dataset;
|
|
3689
3625
|
}
|
|
3690
3626
|
};
|
|
3691
3627
|
}
|
|
3692
3628
|
// @__NO_SIDE_EFFECTS__
|
|
3693
|
-
function octal(
|
|
3629
|
+
function octal(message$1) {
|
|
3694
3630
|
return {
|
|
3695
3631
|
kind: "validation",
|
|
3696
3632
|
type: "octal",
|
|
@@ -3698,17 +3634,15 @@ function octal(message2) {
|
|
|
3698
3634
|
async: false,
|
|
3699
3635
|
expects: null,
|
|
3700
3636
|
requirement: OCTAL_REGEX,
|
|
3701
|
-
message:
|
|
3702
|
-
"~run"(dataset,
|
|
3703
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3704
|
-
_addIssue(this, "octal", dataset, config2);
|
|
3705
|
-
}
|
|
3637
|
+
message: message$1,
|
|
3638
|
+
"~run"(dataset, config$1) {
|
|
3639
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "octal", dataset, config$1);
|
|
3706
3640
|
return dataset;
|
|
3707
3641
|
}
|
|
3708
3642
|
};
|
|
3709
3643
|
}
|
|
3710
3644
|
// @__NO_SIDE_EFFECTS__
|
|
3711
|
-
function ulid(
|
|
3645
|
+
function ulid(message$1) {
|
|
3712
3646
|
return {
|
|
3713
3647
|
kind: "validation",
|
|
3714
3648
|
type: "ulid",
|
|
@@ -3716,17 +3650,15 @@ function ulid(message2) {
|
|
|
3716
3650
|
async: false,
|
|
3717
3651
|
expects: null,
|
|
3718
3652
|
requirement: ULID_REGEX,
|
|
3719
|
-
message:
|
|
3720
|
-
"~run"(dataset,
|
|
3721
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3722
|
-
_addIssue(this, "ULID", dataset, config2);
|
|
3723
|
-
}
|
|
3653
|
+
message: message$1,
|
|
3654
|
+
"~run"(dataset, config$1) {
|
|
3655
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "ULID", dataset, config$1);
|
|
3724
3656
|
return dataset;
|
|
3725
3657
|
}
|
|
3726
3658
|
};
|
|
3727
3659
|
}
|
|
3728
3660
|
// @__NO_SIDE_EFFECTS__
|
|
3729
|
-
function url(
|
|
3661
|
+
function url(message$1) {
|
|
3730
3662
|
return {
|
|
3731
3663
|
kind: "validation",
|
|
3732
3664
|
type: "url",
|
|
@@ -3741,17 +3673,15 @@ function url(message2) {
|
|
|
3741
3673
|
return false;
|
|
3742
3674
|
}
|
|
3743
3675
|
},
|
|
3744
|
-
message:
|
|
3745
|
-
"~run"(dataset,
|
|
3746
|
-
if (dataset.typed && !this.requirement(dataset.value))
|
|
3747
|
-
_addIssue(this, "URL", dataset, config2);
|
|
3748
|
-
}
|
|
3676
|
+
message: message$1,
|
|
3677
|
+
"~run"(dataset, config$1) {
|
|
3678
|
+
if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "URL", dataset, config$1);
|
|
3749
3679
|
return dataset;
|
|
3750
3680
|
}
|
|
3751
3681
|
};
|
|
3752
3682
|
}
|
|
3753
3683
|
// @__NO_SIDE_EFFECTS__
|
|
3754
|
-
function uuid(
|
|
3684
|
+
function uuid(message$1) {
|
|
3755
3685
|
return {
|
|
3756
3686
|
kind: "validation",
|
|
3757
3687
|
type: "uuid",
|
|
@@ -3759,64 +3689,55 @@ function uuid(message2) {
|
|
|
3759
3689
|
async: false,
|
|
3760
3690
|
expects: null,
|
|
3761
3691
|
requirement: UUID_REGEX,
|
|
3762
|
-
message:
|
|
3763
|
-
"~run"(dataset,
|
|
3764
|
-
if (dataset.typed && !this.requirement.test(dataset.value))
|
|
3765
|
-
_addIssue(this, "UUID", dataset, config2);
|
|
3766
|
-
}
|
|
3692
|
+
message: message$1,
|
|
3693
|
+
"~run"(dataset, config$1) {
|
|
3694
|
+
if (dataset.typed && !this.requirement.test(dataset.value)) _addIssue(this, "UUID", dataset, config$1);
|
|
3767
3695
|
return dataset;
|
|
3768
3696
|
}
|
|
3769
3697
|
};
|
|
3770
3698
|
}
|
|
3771
3699
|
// @__NO_SIDE_EFFECTS__
|
|
3772
|
-
function string(
|
|
3700
|
+
function string(message$1) {
|
|
3773
3701
|
return {
|
|
3774
3702
|
kind: "schema",
|
|
3775
3703
|
type: "string",
|
|
3776
3704
|
reference: string,
|
|
3777
3705
|
expects: "string",
|
|
3778
3706
|
async: false,
|
|
3779
|
-
message:
|
|
3707
|
+
message: message$1,
|
|
3780
3708
|
get "~standard"() {
|
|
3781
3709
|
return /* @__PURE__ */ _getStandardProps(this);
|
|
3782
3710
|
},
|
|
3783
|
-
"~run"(dataset,
|
|
3784
|
-
if (typeof dataset.value === "string")
|
|
3785
|
-
|
|
3786
|
-
} else {
|
|
3787
|
-
_addIssue(this, "type", dataset, config2);
|
|
3788
|
-
}
|
|
3711
|
+
"~run"(dataset, config$1) {
|
|
3712
|
+
if (typeof dataset.value === "string") dataset.typed = true;
|
|
3713
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
3789
3714
|
return dataset;
|
|
3790
3715
|
}
|
|
3791
3716
|
};
|
|
3792
3717
|
}
|
|
3793
3718
|
// @__NO_SIDE_EFFECTS__
|
|
3794
|
-
function pipe(...
|
|
3719
|
+
function pipe(...pipe$1) {
|
|
3795
3720
|
return {
|
|
3796
|
-
...
|
|
3797
|
-
pipe:
|
|
3721
|
+
...pipe$1[0],
|
|
3722
|
+
pipe: pipe$1,
|
|
3798
3723
|
get "~standard"() {
|
|
3799
3724
|
return /* @__PURE__ */ _getStandardProps(this);
|
|
3800
3725
|
},
|
|
3801
|
-
"~run"(dataset,
|
|
3802
|
-
for (const item of
|
|
3803
|
-
if (item.kind
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
break;
|
|
3807
|
-
}
|
|
3808
|
-
if (!dataset.issues || !config2.abortEarly && !config2.abortPipeEarly) {
|
|
3809
|
-
dataset = item["~run"](dataset, config2);
|
|
3810
|
-
}
|
|
3726
|
+
"~run"(dataset, config$1) {
|
|
3727
|
+
for (const item of pipe$1) if (item.kind !== "metadata") {
|
|
3728
|
+
if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
|
|
3729
|
+
dataset.typed = false;
|
|
3730
|
+
break;
|
|
3811
3731
|
}
|
|
3732
|
+
if (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = item["~run"](dataset, config$1);
|
|
3812
3733
|
}
|
|
3813
3734
|
return dataset;
|
|
3814
3735
|
}
|
|
3815
3736
|
};
|
|
3816
3737
|
}
|
|
3817
3738
|
// @__NO_SIDE_EFFECTS__
|
|
3818
|
-
function safeParse(schema, input,
|
|
3819
|
-
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(
|
|
3739
|
+
function safeParse(schema, input, config$1) {
|
|
3740
|
+
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));
|
|
3820
3741
|
return {
|
|
3821
3742
|
typed: dataset.typed,
|
|
3822
3743
|
success: !dataset.issues,
|
|
@@ -4121,30 +4042,39 @@ var NEVER = Object.freeze({
|
|
|
4121
4042
|
// @__NO_SIDE_EFFECTS__
|
|
4122
4043
|
function $constructor(name, initializer3, params) {
|
|
4123
4044
|
function init(inst, def) {
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4045
|
+
if (!inst._zod) {
|
|
4046
|
+
Object.defineProperty(inst, "_zod", {
|
|
4047
|
+
value: {
|
|
4048
|
+
def,
|
|
4049
|
+
constr: _,
|
|
4050
|
+
traits: /* @__PURE__ */ new Set()
|
|
4051
|
+
},
|
|
4052
|
+
enumerable: false
|
|
4053
|
+
});
|
|
4054
|
+
}
|
|
4055
|
+
if (inst._zod.traits.has(name)) {
|
|
4056
|
+
return;
|
|
4057
|
+
}
|
|
4130
4058
|
inst._zod.traits.add(name);
|
|
4131
4059
|
initializer3(inst, def);
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4060
|
+
const proto = _.prototype;
|
|
4061
|
+
const keys = Object.keys(proto);
|
|
4062
|
+
for (let i = 0; i < keys.length; i++) {
|
|
4063
|
+
const k = keys[i];
|
|
4064
|
+
if (!(k in inst)) {
|
|
4065
|
+
inst[k] = proto[k].bind(inst);
|
|
4066
|
+
}
|
|
4135
4067
|
}
|
|
4136
|
-
inst._zod.constr = _;
|
|
4137
|
-
inst._zod.def = def;
|
|
4138
4068
|
}
|
|
4139
4069
|
const Parent = params?.Parent ?? Object;
|
|
4140
4070
|
class Definition extends Parent {
|
|
4141
4071
|
}
|
|
4142
4072
|
Object.defineProperty(Definition, "name", { value: name });
|
|
4143
4073
|
function _(def) {
|
|
4144
|
-
var
|
|
4074
|
+
var _a2;
|
|
4145
4075
|
const inst = params?.Parent ? new Definition() : this;
|
|
4146
4076
|
init(inst, def);
|
|
4147
|
-
(
|
|
4077
|
+
(_a2 = inst._zod).deferred ?? (_a2.deferred = []);
|
|
4148
4078
|
for (const fn of inst._zod.deferred) {
|
|
4149
4079
|
fn();
|
|
4150
4080
|
}
|
|
@@ -4161,7 +4091,6 @@ function $constructor(name, initializer3, params) {
|
|
|
4161
4091
|
Object.defineProperty(_, "name", { value: name });
|
|
4162
4092
|
return _;
|
|
4163
4093
|
}
|
|
4164
|
-
var $brand = Symbol("zod_brand");
|
|
4165
4094
|
var $ZodAsyncError = class extends Error {
|
|
4166
4095
|
constructor() {
|
|
4167
4096
|
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
@@ -4238,6 +4167,7 @@ __export(util_exports, {
|
|
|
4238
4167
|
required: () => required,
|
|
4239
4168
|
safeExtend: () => safeExtend,
|
|
4240
4169
|
shallowClone: () => shallowClone,
|
|
4170
|
+
slugify: () => slugify,
|
|
4241
4171
|
stringifyPrimitive: () => stringifyPrimitive,
|
|
4242
4172
|
uint8ArrayToBase64: () => uint8ArrayToBase64,
|
|
4243
4173
|
uint8ArrayToBase64url: () => uint8ArrayToBase64url,
|
|
@@ -4253,7 +4183,7 @@ function assertNotEqual(val) {
|
|
|
4253
4183
|
function assertIs(_arg) {
|
|
4254
4184
|
}
|
|
4255
4185
|
function assertNever(_x) {
|
|
4256
|
-
throw new Error();
|
|
4186
|
+
throw new Error("Unexpected value in exhaustive check");
|
|
4257
4187
|
}
|
|
4258
4188
|
function assert(_) {
|
|
4259
4189
|
}
|
|
@@ -4306,7 +4236,7 @@ function floatSafeRemainder(val, step) {
|
|
|
4306
4236
|
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
4307
4237
|
return valInt % stepInt / 10 ** decCount;
|
|
4308
4238
|
}
|
|
4309
|
-
var EVALUATING = Symbol("evaluating");
|
|
4239
|
+
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
4310
4240
|
function defineLazy(object, key, getter) {
|
|
4311
4241
|
let value = void 0;
|
|
4312
4242
|
Object.defineProperty(object, key, {
|
|
@@ -4378,6 +4308,9 @@ function randomString(length = 10) {
|
|
|
4378
4308
|
function esc(str) {
|
|
4379
4309
|
return JSON.stringify(str);
|
|
4380
4310
|
}
|
|
4311
|
+
function slugify(input) {
|
|
4312
|
+
return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
4313
|
+
}
|
|
4381
4314
|
var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
|
|
4382
4315
|
};
|
|
4383
4316
|
function isObject(data) {
|
|
@@ -4401,6 +4334,8 @@ function isPlainObject(o) {
|
|
|
4401
4334
|
const ctor = o.constructor;
|
|
4402
4335
|
if (ctor === void 0)
|
|
4403
4336
|
return true;
|
|
4337
|
+
if (typeof ctor !== "function")
|
|
4338
|
+
return true;
|
|
4404
4339
|
const prot = ctor.prototype;
|
|
4405
4340
|
if (isObject(prot) === false)
|
|
4406
4341
|
return false;
|
|
@@ -4717,8 +4652,8 @@ function aborted(x, startIndex = 0) {
|
|
|
4717
4652
|
}
|
|
4718
4653
|
function prefixIssues(path, issues) {
|
|
4719
4654
|
return issues.map((iss) => {
|
|
4720
|
-
var
|
|
4721
|
-
(
|
|
4655
|
+
var _a2;
|
|
4656
|
+
(_a2 = iss).path ?? (_a2.path = []);
|
|
4722
4657
|
iss.path.unshift(path);
|
|
4723
4658
|
return iss;
|
|
4724
4659
|
});
|
|
@@ -4846,10 +4781,7 @@ function flattenError(error, mapper = (issue2) => issue2.message) {
|
|
|
4846
4781
|
}
|
|
4847
4782
|
return { formErrors, fieldErrors };
|
|
4848
4783
|
}
|
|
4849
|
-
function formatError(error,
|
|
4850
|
-
const mapper = _mapper || function(issue2) {
|
|
4851
|
-
return issue2.message;
|
|
4852
|
-
};
|
|
4784
|
+
function formatError(error, mapper = (issue2) => issue2.message) {
|
|
4853
4785
|
const fieldErrors = { _errors: [] };
|
|
4854
4786
|
const processError = (error2) => {
|
|
4855
4787
|
for (const issue2 of error2.issues) {
|
|
@@ -4986,7 +4918,6 @@ var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]
|
|
|
4986
4918
|
var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
4987
4919
|
var base642 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
4988
4920
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
4989
|
-
var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
|
|
4990
4921
|
var e164 = /^\+(?:[0-9]){6,14}[0-9]$/;
|
|
4991
4922
|
var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
|
|
4992
4923
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -5023,10 +4954,10 @@ var uppercase = /^[^a-z]*$/;
|
|
|
5023
4954
|
|
|
5024
4955
|
// node_modules/zod/v4/core/checks.js
|
|
5025
4956
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
5026
|
-
var
|
|
4957
|
+
var _a2;
|
|
5027
4958
|
inst._zod ?? (inst._zod = {});
|
|
5028
4959
|
inst._zod.def = def;
|
|
5029
|
-
(
|
|
4960
|
+
(_a2 = inst._zod).onattach ?? (_a2.onattach = []);
|
|
5030
4961
|
});
|
|
5031
4962
|
var numericOriginMap = {
|
|
5032
4963
|
number: "number",
|
|
@@ -5092,8 +5023,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
5092
5023
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
5093
5024
|
$ZodCheck.init(inst, def);
|
|
5094
5025
|
inst._zod.onattach.push((inst2) => {
|
|
5095
|
-
var
|
|
5096
|
-
(
|
|
5026
|
+
var _a2;
|
|
5027
|
+
(_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
|
|
5097
5028
|
});
|
|
5098
5029
|
inst._zod.check = (payload) => {
|
|
5099
5030
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -5187,9 +5118,9 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
5187
5118
|
};
|
|
5188
5119
|
});
|
|
5189
5120
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
5190
|
-
var
|
|
5121
|
+
var _a2;
|
|
5191
5122
|
$ZodCheck.init(inst, def);
|
|
5192
|
-
(
|
|
5123
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
5193
5124
|
const val = payload.value;
|
|
5194
5125
|
return !nullish(val) && val.length !== void 0;
|
|
5195
5126
|
});
|
|
@@ -5216,9 +5147,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
5216
5147
|
};
|
|
5217
5148
|
});
|
|
5218
5149
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
5219
|
-
var
|
|
5150
|
+
var _a2;
|
|
5220
5151
|
$ZodCheck.init(inst, def);
|
|
5221
|
-
(
|
|
5152
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
5222
5153
|
const val = payload.value;
|
|
5223
5154
|
return !nullish(val) && val.length !== void 0;
|
|
5224
5155
|
});
|
|
@@ -5245,9 +5176,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
5245
5176
|
};
|
|
5246
5177
|
});
|
|
5247
5178
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
5248
|
-
var
|
|
5179
|
+
var _a2;
|
|
5249
5180
|
$ZodCheck.init(inst, def);
|
|
5250
|
-
(
|
|
5181
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
5251
5182
|
const val = payload.value;
|
|
5252
5183
|
return !nullish(val) && val.length !== void 0;
|
|
5253
5184
|
});
|
|
@@ -5276,7 +5207,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
5276
5207
|
};
|
|
5277
5208
|
});
|
|
5278
5209
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
5279
|
-
var
|
|
5210
|
+
var _a2, _b;
|
|
5280
5211
|
$ZodCheck.init(inst, def);
|
|
5281
5212
|
inst._zod.onattach.push((inst2) => {
|
|
5282
5213
|
const bag = inst2._zod.bag;
|
|
@@ -5287,7 +5218,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
5287
5218
|
}
|
|
5288
5219
|
});
|
|
5289
5220
|
if (def.pattern)
|
|
5290
|
-
(
|
|
5221
|
+
(_a2 = inst._zod).check ?? (_a2.check = (payload) => {
|
|
5291
5222
|
def.pattern.lastIndex = 0;
|
|
5292
5223
|
if (def.pattern.test(payload.value))
|
|
5293
5224
|
return;
|
|
@@ -5446,13 +5377,13 @@ var Doc = class {
|
|
|
5446
5377
|
// node_modules/zod/v4/core/versions.js
|
|
5447
5378
|
var version = {
|
|
5448
5379
|
major: 4,
|
|
5449
|
-
minor:
|
|
5450
|
-
patch:
|
|
5380
|
+
minor: 2,
|
|
5381
|
+
patch: 1
|
|
5451
5382
|
};
|
|
5452
5383
|
|
|
5453
5384
|
// node_modules/zod/v4/core/schemas.js
|
|
5454
5385
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
5455
|
-
var
|
|
5386
|
+
var _a2;
|
|
5456
5387
|
inst ?? (inst = {});
|
|
5457
5388
|
inst._zod.def = def;
|
|
5458
5389
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -5467,7 +5398,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
5467
5398
|
}
|
|
5468
5399
|
}
|
|
5469
5400
|
if (checks.length === 0) {
|
|
5470
|
-
(
|
|
5401
|
+
(_a2 = inst._zod).deferred ?? (_a2.deferred = []);
|
|
5471
5402
|
inst._zod.deferred?.push(() => {
|
|
5472
5403
|
inst._zod.run = inst._zod.parse;
|
|
5473
5404
|
});
|
|
@@ -5625,7 +5556,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
5625
5556
|
code: "invalid_format",
|
|
5626
5557
|
format: "url",
|
|
5627
5558
|
note: "Invalid hostname",
|
|
5628
|
-
pattern: hostname.source,
|
|
5559
|
+
pattern: def.hostname.source,
|
|
5629
5560
|
input: payload.value,
|
|
5630
5561
|
inst,
|
|
5631
5562
|
continue: !def.abort
|
|
@@ -5710,18 +5641,12 @@ var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def
|
|
|
5710
5641
|
var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
|
|
5711
5642
|
def.pattern ?? (def.pattern = ipv42);
|
|
5712
5643
|
$ZodStringFormat.init(inst, def);
|
|
5713
|
-
inst._zod.
|
|
5714
|
-
const bag = inst2._zod.bag;
|
|
5715
|
-
bag.format = `ipv4`;
|
|
5716
|
-
});
|
|
5644
|
+
inst._zod.bag.format = `ipv4`;
|
|
5717
5645
|
});
|
|
5718
5646
|
var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
5719
5647
|
def.pattern ?? (def.pattern = ipv62);
|
|
5720
5648
|
$ZodStringFormat.init(inst, def);
|
|
5721
|
-
inst._zod.
|
|
5722
|
-
const bag = inst2._zod.bag;
|
|
5723
|
-
bag.format = `ipv6`;
|
|
5724
|
-
});
|
|
5649
|
+
inst._zod.bag.format = `ipv6`;
|
|
5725
5650
|
inst._zod.check = (payload) => {
|
|
5726
5651
|
try {
|
|
5727
5652
|
new URL(`http://[${payload.value}]`);
|
|
@@ -5783,9 +5708,7 @@ function isValidBase64(data) {
|
|
|
5783
5708
|
var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
|
|
5784
5709
|
def.pattern ?? (def.pattern = base642);
|
|
5785
5710
|
$ZodStringFormat.init(inst, def);
|
|
5786
|
-
inst._zod.
|
|
5787
|
-
inst2._zod.bag.contentEncoding = "base64";
|
|
5788
|
-
});
|
|
5711
|
+
inst._zod.bag.contentEncoding = "base64";
|
|
5789
5712
|
inst._zod.check = (payload) => {
|
|
5790
5713
|
if (isValidBase64(payload.value))
|
|
5791
5714
|
return;
|
|
@@ -5808,9 +5731,7 @@ function isValidBase64URL(data) {
|
|
|
5808
5731
|
var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
|
|
5809
5732
|
def.pattern ?? (def.pattern = base64url);
|
|
5810
5733
|
$ZodStringFormat.init(inst, def);
|
|
5811
|
-
inst._zod.
|
|
5812
|
-
inst2._zod.bag.contentEncoding = "base64url";
|
|
5813
|
-
});
|
|
5734
|
+
inst._zod.bag.contentEncoding = "base64url";
|
|
5814
5735
|
inst._zod.check = (payload) => {
|
|
5815
5736
|
if (isValidBase64URL(payload.value))
|
|
5816
5737
|
return;
|
|
@@ -5885,7 +5806,7 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
|
5885
5806
|
return payload;
|
|
5886
5807
|
};
|
|
5887
5808
|
});
|
|
5888
|
-
var $ZodNumberFormat = /* @__PURE__ */ $constructor("$
|
|
5809
|
+
var $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => {
|
|
5889
5810
|
$ZodCheckNumberFormat.init(inst, def);
|
|
5890
5811
|
$ZodNumber.init(inst, def);
|
|
5891
5812
|
});
|
|
@@ -6112,7 +6033,7 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
6112
6033
|
const keySet = def.keySet;
|
|
6113
6034
|
const _catchall = def.catchall._zod;
|
|
6114
6035
|
const t = _catchall.def.type;
|
|
6115
|
-
for (const key
|
|
6036
|
+
for (const key in input) {
|
|
6116
6037
|
if (keySet.has(key))
|
|
6117
6038
|
continue;
|
|
6118
6039
|
if (t === "never") {
|
|
@@ -6142,6 +6063,19 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
6142
6063
|
}
|
|
6143
6064
|
var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
6144
6065
|
$ZodType.init(inst, def);
|
|
6066
|
+
const desc = Object.getOwnPropertyDescriptor(def, "shape");
|
|
6067
|
+
if (!desc?.get) {
|
|
6068
|
+
const sh = def.shape;
|
|
6069
|
+
Object.defineProperty(def, "shape", {
|
|
6070
|
+
get: () => {
|
|
6071
|
+
const newSh = { ...sh };
|
|
6072
|
+
Object.defineProperty(def, "shape", {
|
|
6073
|
+
value: newSh
|
|
6074
|
+
});
|
|
6075
|
+
return newSh;
|
|
6076
|
+
}
|
|
6077
|
+
});
|
|
6078
|
+
}
|
|
6145
6079
|
const _normalized = cached(() => normalizeDef(def));
|
|
6146
6080
|
defineLazy(inst._zod, "propValues", () => {
|
|
6147
6081
|
const shape = def.shape;
|
|
@@ -6332,6 +6266,7 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
6332
6266
|
};
|
|
6333
6267
|
});
|
|
6334
6268
|
var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
|
|
6269
|
+
def.inclusive = false;
|
|
6335
6270
|
$ZodUnion.init(inst, def);
|
|
6336
6271
|
const _super = inst._zod.parse;
|
|
6337
6272
|
defineLazy(inst._zod, "propValues", () => {
|
|
@@ -6474,7 +6409,6 @@ function handleIntersectionResults(result, left, right) {
|
|
|
6474
6409
|
var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
6475
6410
|
$ZodType.init(inst, def);
|
|
6476
6411
|
const items = def.items;
|
|
6477
|
-
const optStart = items.length - [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
|
|
6478
6412
|
inst._zod.parse = (payload, ctx) => {
|
|
6479
6413
|
const input = payload.value;
|
|
6480
6414
|
if (!Array.isArray(input)) {
|
|
@@ -6488,6 +6422,8 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
6488
6422
|
}
|
|
6489
6423
|
payload.value = [];
|
|
6490
6424
|
const proms = [];
|
|
6425
|
+
const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
|
|
6426
|
+
const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
|
|
6491
6427
|
if (!def.rest) {
|
|
6492
6428
|
const tooBig = input.length > items.length;
|
|
6493
6429
|
const tooSmall = input.length < optStart - 1;
|
|
@@ -6558,11 +6494,13 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
6558
6494
|
return payload;
|
|
6559
6495
|
}
|
|
6560
6496
|
const proms = [];
|
|
6561
|
-
|
|
6562
|
-
|
|
6497
|
+
const values = def.keyType._zod.values;
|
|
6498
|
+
if (values) {
|
|
6563
6499
|
payload.value = {};
|
|
6500
|
+
const recordKeys = /* @__PURE__ */ new Set();
|
|
6564
6501
|
for (const key of values) {
|
|
6565
6502
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
6503
|
+
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
6566
6504
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
6567
6505
|
if (result instanceof Promise) {
|
|
6568
6506
|
proms.push(result.then((result2) => {
|
|
@@ -6581,7 +6519,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
6581
6519
|
}
|
|
6582
6520
|
let unrecognized;
|
|
6583
6521
|
for (const key in input) {
|
|
6584
|
-
if (!
|
|
6522
|
+
if (!recordKeys.has(key)) {
|
|
6585
6523
|
unrecognized = unrecognized ?? [];
|
|
6586
6524
|
unrecognized.push(key);
|
|
6587
6525
|
}
|
|
@@ -6604,15 +6542,18 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
6604
6542
|
throw new Error("Async schemas not supported in object keys currently");
|
|
6605
6543
|
}
|
|
6606
6544
|
if (keyResult.issues.length) {
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6545
|
+
if (def.mode === "loose") {
|
|
6546
|
+
payload.value[key] = input[key];
|
|
6547
|
+
} else {
|
|
6548
|
+
payload.issues.push({
|
|
6549
|
+
code: "invalid_key",
|
|
6550
|
+
origin: "record",
|
|
6551
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
6552
|
+
input: key,
|
|
6553
|
+
path: [key],
|
|
6554
|
+
inst
|
|
6555
|
+
});
|
|
6556
|
+
}
|
|
6616
6557
|
continue;
|
|
6617
6558
|
}
|
|
6618
6559
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
@@ -6662,11 +6603,12 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
|
6662
6603
|
if (def.values.length === 0) {
|
|
6663
6604
|
throw new Error("Cannot create literal schema with no valid values");
|
|
6664
6605
|
}
|
|
6665
|
-
|
|
6606
|
+
const values = new Set(def.values);
|
|
6607
|
+
inst._zod.values = values;
|
|
6666
6608
|
inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
|
|
6667
6609
|
inst._zod.parse = (payload, _ctx) => {
|
|
6668
6610
|
const input = payload.value;
|
|
6669
|
-
if (
|
|
6611
|
+
if (values.has(input)) {
|
|
6670
6612
|
return payload;
|
|
6671
6613
|
}
|
|
6672
6614
|
payload.issues.push({
|
|
@@ -6882,8 +6824,8 @@ var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
|
6882
6824
|
$ZodType.init(inst, def);
|
|
6883
6825
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
6884
6826
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
6885
|
-
defineLazy(inst._zod, "optin", () => def.innerType
|
|
6886
|
-
defineLazy(inst._zod, "optout", () => def.innerType
|
|
6827
|
+
defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin);
|
|
6828
|
+
defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout);
|
|
6887
6829
|
inst._zod.parse = (payload, ctx) => {
|
|
6888
6830
|
if (ctx.direction === "backward") {
|
|
6889
6831
|
return def.innerType._zod.run(payload, ctx);
|
|
@@ -6940,21 +6882,20 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
6940
6882
|
}
|
|
6941
6883
|
|
|
6942
6884
|
// node_modules/zod/v4/core/registries.js
|
|
6943
|
-
var
|
|
6944
|
-
var $input = Symbol("ZodInput");
|
|
6885
|
+
var _a;
|
|
6945
6886
|
var $ZodRegistry = class {
|
|
6946
6887
|
constructor() {
|
|
6947
6888
|
this._map = /* @__PURE__ */ new WeakMap();
|
|
6948
6889
|
this._idmap = /* @__PURE__ */ new Map();
|
|
6949
6890
|
}
|
|
6950
6891
|
add(schema, ..._meta) {
|
|
6951
|
-
const
|
|
6952
|
-
this._map.set(schema,
|
|
6953
|
-
if (
|
|
6954
|
-
if (this._idmap.has(
|
|
6955
|
-
throw new Error(`ID ${
|
|
6892
|
+
const meta2 = _meta[0];
|
|
6893
|
+
this._map.set(schema, meta2);
|
|
6894
|
+
if (meta2 && typeof meta2 === "object" && "id" in meta2) {
|
|
6895
|
+
if (this._idmap.has(meta2.id)) {
|
|
6896
|
+
throw new Error(`ID ${meta2.id} already exists in the registry`);
|
|
6956
6897
|
}
|
|
6957
|
-
this._idmap.set(
|
|
6898
|
+
this._idmap.set(meta2.id, schema);
|
|
6958
6899
|
}
|
|
6959
6900
|
return this;
|
|
6960
6901
|
}
|
|
@@ -6964,9 +6905,9 @@ var $ZodRegistry = class {
|
|
|
6964
6905
|
return this;
|
|
6965
6906
|
}
|
|
6966
6907
|
remove(schema) {
|
|
6967
|
-
const
|
|
6968
|
-
if (
|
|
6969
|
-
this._idmap.delete(
|
|
6908
|
+
const meta2 = this._map.get(schema);
|
|
6909
|
+
if (meta2 && typeof meta2 === "object" && "id" in meta2) {
|
|
6910
|
+
this._idmap.delete(meta2.id);
|
|
6970
6911
|
}
|
|
6971
6912
|
this._map.delete(schema);
|
|
6972
6913
|
return this;
|
|
@@ -6988,7 +6929,8 @@ var $ZodRegistry = class {
|
|
|
6988
6929
|
function registry() {
|
|
6989
6930
|
return new $ZodRegistry();
|
|
6990
6931
|
}
|
|
6991
|
-
|
|
6932
|
+
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
6933
|
+
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
6992
6934
|
|
|
6993
6935
|
// node_modules/zod/v4/core/api.js
|
|
6994
6936
|
function _string(Class2, params) {
|
|
@@ -7379,6 +7321,9 @@ function _toLowerCase() {
|
|
|
7379
7321
|
function _toUpperCase() {
|
|
7380
7322
|
return _overwrite((input) => input.toUpperCase());
|
|
7381
7323
|
}
|
|
7324
|
+
function _slugify() {
|
|
7325
|
+
return _overwrite((input) => slugify(input));
|
|
7326
|
+
}
|
|
7382
7327
|
function _array(Class2, element, params) {
|
|
7383
7328
|
return new Class2({
|
|
7384
7329
|
type: "array",
|
|
@@ -7427,6 +7372,701 @@ function _check(fn, params) {
|
|
|
7427
7372
|
return ch;
|
|
7428
7373
|
}
|
|
7429
7374
|
|
|
7375
|
+
// node_modules/zod/v4/core/to-json-schema.js
|
|
7376
|
+
function initializeContext(params) {
|
|
7377
|
+
let target = params?.target ?? "draft-2020-12";
|
|
7378
|
+
if (target === "draft-4")
|
|
7379
|
+
target = "draft-04";
|
|
7380
|
+
if (target === "draft-7")
|
|
7381
|
+
target = "draft-07";
|
|
7382
|
+
return {
|
|
7383
|
+
processors: params.processors ?? {},
|
|
7384
|
+
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
7385
|
+
target,
|
|
7386
|
+
unrepresentable: params?.unrepresentable ?? "throw",
|
|
7387
|
+
override: params?.override ?? (() => {
|
|
7388
|
+
}),
|
|
7389
|
+
io: params?.io ?? "output",
|
|
7390
|
+
counter: 0,
|
|
7391
|
+
seen: /* @__PURE__ */ new Map(),
|
|
7392
|
+
cycles: params?.cycles ?? "ref",
|
|
7393
|
+
reused: params?.reused ?? "inline",
|
|
7394
|
+
external: params?.external ?? void 0
|
|
7395
|
+
};
|
|
7396
|
+
}
|
|
7397
|
+
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
7398
|
+
var _a2;
|
|
7399
|
+
const def = schema._zod.def;
|
|
7400
|
+
const seen = ctx.seen.get(schema);
|
|
7401
|
+
if (seen) {
|
|
7402
|
+
seen.count++;
|
|
7403
|
+
const isCycle = _params.schemaPath.includes(schema);
|
|
7404
|
+
if (isCycle) {
|
|
7405
|
+
seen.cycle = _params.path;
|
|
7406
|
+
}
|
|
7407
|
+
return seen.schema;
|
|
7408
|
+
}
|
|
7409
|
+
const result = { schema: {}, count: 1, cycle: void 0, path: _params.path };
|
|
7410
|
+
ctx.seen.set(schema, result);
|
|
7411
|
+
const overrideSchema = schema._zod.toJSONSchema?.();
|
|
7412
|
+
if (overrideSchema) {
|
|
7413
|
+
result.schema = overrideSchema;
|
|
7414
|
+
} else {
|
|
7415
|
+
const params = {
|
|
7416
|
+
..._params,
|
|
7417
|
+
schemaPath: [..._params.schemaPath, schema],
|
|
7418
|
+
path: _params.path
|
|
7419
|
+
};
|
|
7420
|
+
const parent = schema._zod.parent;
|
|
7421
|
+
if (parent) {
|
|
7422
|
+
result.ref = parent;
|
|
7423
|
+
process2(parent, ctx, params);
|
|
7424
|
+
ctx.seen.get(parent).isParent = true;
|
|
7425
|
+
} else if (schema._zod.processJSONSchema) {
|
|
7426
|
+
schema._zod.processJSONSchema(ctx, result.schema, params);
|
|
7427
|
+
} else {
|
|
7428
|
+
const _json = result.schema;
|
|
7429
|
+
const processor = ctx.processors[def.type];
|
|
7430
|
+
if (!processor) {
|
|
7431
|
+
throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);
|
|
7432
|
+
}
|
|
7433
|
+
processor(schema, ctx, _json, params);
|
|
7434
|
+
}
|
|
7435
|
+
}
|
|
7436
|
+
const meta2 = ctx.metadataRegistry.get(schema);
|
|
7437
|
+
if (meta2)
|
|
7438
|
+
Object.assign(result.schema, meta2);
|
|
7439
|
+
if (ctx.io === "input" && isTransforming(schema)) {
|
|
7440
|
+
delete result.schema.examples;
|
|
7441
|
+
delete result.schema.default;
|
|
7442
|
+
}
|
|
7443
|
+
if (ctx.io === "input" && result.schema._prefault)
|
|
7444
|
+
(_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
|
|
7445
|
+
delete result.schema._prefault;
|
|
7446
|
+
const _result = ctx.seen.get(schema);
|
|
7447
|
+
return _result.schema;
|
|
7448
|
+
}
|
|
7449
|
+
function extractDefs(ctx, schema) {
|
|
7450
|
+
const root = ctx.seen.get(schema);
|
|
7451
|
+
if (!root)
|
|
7452
|
+
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
7453
|
+
const makeURI = (entry) => {
|
|
7454
|
+
const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
7455
|
+
if (ctx.external) {
|
|
7456
|
+
const externalId = ctx.external.registry.get(entry[0])?.id;
|
|
7457
|
+
const uriGenerator = ctx.external.uri ?? ((id2) => id2);
|
|
7458
|
+
if (externalId) {
|
|
7459
|
+
return { ref: uriGenerator(externalId) };
|
|
7460
|
+
}
|
|
7461
|
+
const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
|
|
7462
|
+
entry[1].defId = id;
|
|
7463
|
+
return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` };
|
|
7464
|
+
}
|
|
7465
|
+
if (entry[1] === root) {
|
|
7466
|
+
return { ref: "#" };
|
|
7467
|
+
}
|
|
7468
|
+
const uriPrefix = `#`;
|
|
7469
|
+
const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
|
|
7470
|
+
const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;
|
|
7471
|
+
return { defId, ref: defUriPrefix + defId };
|
|
7472
|
+
};
|
|
7473
|
+
const extractToDef = (entry) => {
|
|
7474
|
+
if (entry[1].schema.$ref) {
|
|
7475
|
+
return;
|
|
7476
|
+
}
|
|
7477
|
+
const seen = entry[1];
|
|
7478
|
+
const { ref, defId } = makeURI(entry);
|
|
7479
|
+
seen.def = { ...seen.schema };
|
|
7480
|
+
if (defId)
|
|
7481
|
+
seen.defId = defId;
|
|
7482
|
+
const schema2 = seen.schema;
|
|
7483
|
+
for (const key in schema2) {
|
|
7484
|
+
delete schema2[key];
|
|
7485
|
+
}
|
|
7486
|
+
schema2.$ref = ref;
|
|
7487
|
+
};
|
|
7488
|
+
if (ctx.cycles === "throw") {
|
|
7489
|
+
for (const entry of ctx.seen.entries()) {
|
|
7490
|
+
const seen = entry[1];
|
|
7491
|
+
if (seen.cycle) {
|
|
7492
|
+
throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/<root>
|
|
7493
|
+
|
|
7494
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
|
|
7495
|
+
}
|
|
7496
|
+
}
|
|
7497
|
+
}
|
|
7498
|
+
for (const entry of ctx.seen.entries()) {
|
|
7499
|
+
const seen = entry[1];
|
|
7500
|
+
if (schema === entry[0]) {
|
|
7501
|
+
extractToDef(entry);
|
|
7502
|
+
continue;
|
|
7503
|
+
}
|
|
7504
|
+
if (ctx.external) {
|
|
7505
|
+
const ext = ctx.external.registry.get(entry[0])?.id;
|
|
7506
|
+
if (schema !== entry[0] && ext) {
|
|
7507
|
+
extractToDef(entry);
|
|
7508
|
+
continue;
|
|
7509
|
+
}
|
|
7510
|
+
}
|
|
7511
|
+
const id = ctx.metadataRegistry.get(entry[0])?.id;
|
|
7512
|
+
if (id) {
|
|
7513
|
+
extractToDef(entry);
|
|
7514
|
+
continue;
|
|
7515
|
+
}
|
|
7516
|
+
if (seen.cycle) {
|
|
7517
|
+
extractToDef(entry);
|
|
7518
|
+
continue;
|
|
7519
|
+
}
|
|
7520
|
+
if (seen.count > 1) {
|
|
7521
|
+
if (ctx.reused === "ref") {
|
|
7522
|
+
extractToDef(entry);
|
|
7523
|
+
continue;
|
|
7524
|
+
}
|
|
7525
|
+
}
|
|
7526
|
+
}
|
|
7527
|
+
}
|
|
7528
|
+
function finalize(ctx, schema) {
|
|
7529
|
+
const root = ctx.seen.get(schema);
|
|
7530
|
+
if (!root)
|
|
7531
|
+
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
7532
|
+
const flattenRef = (zodSchema) => {
|
|
7533
|
+
const seen = ctx.seen.get(zodSchema);
|
|
7534
|
+
const schema2 = seen.def ?? seen.schema;
|
|
7535
|
+
const _cached = { ...schema2 };
|
|
7536
|
+
if (seen.ref === null) {
|
|
7537
|
+
return;
|
|
7538
|
+
}
|
|
7539
|
+
const ref = seen.ref;
|
|
7540
|
+
seen.ref = null;
|
|
7541
|
+
if (ref) {
|
|
7542
|
+
flattenRef(ref);
|
|
7543
|
+
const refSchema = ctx.seen.get(ref).schema;
|
|
7544
|
+
if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) {
|
|
7545
|
+
schema2.allOf = schema2.allOf ?? [];
|
|
7546
|
+
schema2.allOf.push(refSchema);
|
|
7547
|
+
} else {
|
|
7548
|
+
Object.assign(schema2, refSchema);
|
|
7549
|
+
Object.assign(schema2, _cached);
|
|
7550
|
+
}
|
|
7551
|
+
}
|
|
7552
|
+
if (!seen.isParent)
|
|
7553
|
+
ctx.override({
|
|
7554
|
+
zodSchema,
|
|
7555
|
+
jsonSchema: schema2,
|
|
7556
|
+
path: seen.path ?? []
|
|
7557
|
+
});
|
|
7558
|
+
};
|
|
7559
|
+
for (const entry of [...ctx.seen.entries()].reverse()) {
|
|
7560
|
+
flattenRef(entry[0]);
|
|
7561
|
+
}
|
|
7562
|
+
const result = {};
|
|
7563
|
+
if (ctx.target === "draft-2020-12") {
|
|
7564
|
+
result.$schema = "https://json-schema.org/draft/2020-12/schema";
|
|
7565
|
+
} else if (ctx.target === "draft-07") {
|
|
7566
|
+
result.$schema = "http://json-schema.org/draft-07/schema#";
|
|
7567
|
+
} else if (ctx.target === "draft-04") {
|
|
7568
|
+
result.$schema = "http://json-schema.org/draft-04/schema#";
|
|
7569
|
+
} else if (ctx.target === "openapi-3.0") {
|
|
7570
|
+
} else {
|
|
7571
|
+
}
|
|
7572
|
+
if (ctx.external?.uri) {
|
|
7573
|
+
const id = ctx.external.registry.get(schema)?.id;
|
|
7574
|
+
if (!id)
|
|
7575
|
+
throw new Error("Schema is missing an `id` property");
|
|
7576
|
+
result.$id = ctx.external.uri(id);
|
|
7577
|
+
}
|
|
7578
|
+
Object.assign(result, root.def ?? root.schema);
|
|
7579
|
+
const defs = ctx.external?.defs ?? {};
|
|
7580
|
+
for (const entry of ctx.seen.entries()) {
|
|
7581
|
+
const seen = entry[1];
|
|
7582
|
+
if (seen.def && seen.defId) {
|
|
7583
|
+
defs[seen.defId] = seen.def;
|
|
7584
|
+
}
|
|
7585
|
+
}
|
|
7586
|
+
if (ctx.external) {
|
|
7587
|
+
} else {
|
|
7588
|
+
if (Object.keys(defs).length > 0) {
|
|
7589
|
+
if (ctx.target === "draft-2020-12") {
|
|
7590
|
+
result.$defs = defs;
|
|
7591
|
+
} else {
|
|
7592
|
+
result.definitions = defs;
|
|
7593
|
+
}
|
|
7594
|
+
}
|
|
7595
|
+
}
|
|
7596
|
+
try {
|
|
7597
|
+
const finalized = JSON.parse(JSON.stringify(result));
|
|
7598
|
+
Object.defineProperty(finalized, "~standard", {
|
|
7599
|
+
value: {
|
|
7600
|
+
...schema["~standard"],
|
|
7601
|
+
jsonSchema: {
|
|
7602
|
+
input: createStandardJSONSchemaMethod(schema, "input"),
|
|
7603
|
+
output: createStandardJSONSchemaMethod(schema, "output")
|
|
7604
|
+
}
|
|
7605
|
+
},
|
|
7606
|
+
enumerable: false,
|
|
7607
|
+
writable: false
|
|
7608
|
+
});
|
|
7609
|
+
return finalized;
|
|
7610
|
+
} catch (_err) {
|
|
7611
|
+
throw new Error("Error converting schema to JSON.");
|
|
7612
|
+
}
|
|
7613
|
+
}
|
|
7614
|
+
function isTransforming(_schema, _ctx) {
|
|
7615
|
+
const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() };
|
|
7616
|
+
if (ctx.seen.has(_schema))
|
|
7617
|
+
return false;
|
|
7618
|
+
ctx.seen.add(_schema);
|
|
7619
|
+
const def = _schema._zod.def;
|
|
7620
|
+
if (def.type === "transform")
|
|
7621
|
+
return true;
|
|
7622
|
+
if (def.type === "array")
|
|
7623
|
+
return isTransforming(def.element, ctx);
|
|
7624
|
+
if (def.type === "set")
|
|
7625
|
+
return isTransforming(def.valueType, ctx);
|
|
7626
|
+
if (def.type === "lazy")
|
|
7627
|
+
return isTransforming(def.getter(), ctx);
|
|
7628
|
+
if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") {
|
|
7629
|
+
return isTransforming(def.innerType, ctx);
|
|
7630
|
+
}
|
|
7631
|
+
if (def.type === "intersection") {
|
|
7632
|
+
return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
|
|
7633
|
+
}
|
|
7634
|
+
if (def.type === "record" || def.type === "map") {
|
|
7635
|
+
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
7636
|
+
}
|
|
7637
|
+
if (def.type === "pipe") {
|
|
7638
|
+
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
7639
|
+
}
|
|
7640
|
+
if (def.type === "object") {
|
|
7641
|
+
for (const key in def.shape) {
|
|
7642
|
+
if (isTransforming(def.shape[key], ctx))
|
|
7643
|
+
return true;
|
|
7644
|
+
}
|
|
7645
|
+
return false;
|
|
7646
|
+
}
|
|
7647
|
+
if (def.type === "union") {
|
|
7648
|
+
for (const option of def.options) {
|
|
7649
|
+
if (isTransforming(option, ctx))
|
|
7650
|
+
return true;
|
|
7651
|
+
}
|
|
7652
|
+
return false;
|
|
7653
|
+
}
|
|
7654
|
+
if (def.type === "tuple") {
|
|
7655
|
+
for (const item of def.items) {
|
|
7656
|
+
if (isTransforming(item, ctx))
|
|
7657
|
+
return true;
|
|
7658
|
+
}
|
|
7659
|
+
if (def.rest && isTransforming(def.rest, ctx))
|
|
7660
|
+
return true;
|
|
7661
|
+
return false;
|
|
7662
|
+
}
|
|
7663
|
+
return false;
|
|
7664
|
+
}
|
|
7665
|
+
var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
7666
|
+
const ctx = initializeContext({ ...params, processors });
|
|
7667
|
+
process2(schema, ctx);
|
|
7668
|
+
extractDefs(ctx, schema);
|
|
7669
|
+
return finalize(ctx, schema);
|
|
7670
|
+
};
|
|
7671
|
+
var createStandardJSONSchemaMethod = (schema, io) => (params) => {
|
|
7672
|
+
const { libraryOptions, target } = params ?? {};
|
|
7673
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors: {} });
|
|
7674
|
+
process2(schema, ctx);
|
|
7675
|
+
extractDefs(ctx, schema);
|
|
7676
|
+
return finalize(ctx, schema);
|
|
7677
|
+
};
|
|
7678
|
+
|
|
7679
|
+
// node_modules/zod/v4/core/json-schema-processors.js
|
|
7680
|
+
var formatMap = {
|
|
7681
|
+
guid: "uuid",
|
|
7682
|
+
url: "uri",
|
|
7683
|
+
datetime: "date-time",
|
|
7684
|
+
json_string: "json-string",
|
|
7685
|
+
regex: ""
|
|
7686
|
+
// do not set
|
|
7687
|
+
};
|
|
7688
|
+
var stringProcessor = (schema, ctx, _json, _params) => {
|
|
7689
|
+
const json = _json;
|
|
7690
|
+
json.type = "string";
|
|
7691
|
+
const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
|
|
7692
|
+
if (typeof minimum === "number")
|
|
7693
|
+
json.minLength = minimum;
|
|
7694
|
+
if (typeof maximum === "number")
|
|
7695
|
+
json.maxLength = maximum;
|
|
7696
|
+
if (format) {
|
|
7697
|
+
json.format = formatMap[format] ?? format;
|
|
7698
|
+
if (json.format === "")
|
|
7699
|
+
delete json.format;
|
|
7700
|
+
}
|
|
7701
|
+
if (contentEncoding)
|
|
7702
|
+
json.contentEncoding = contentEncoding;
|
|
7703
|
+
if (patterns && patterns.size > 0) {
|
|
7704
|
+
const regexes = [...patterns];
|
|
7705
|
+
if (regexes.length === 1)
|
|
7706
|
+
json.pattern = regexes[0].source;
|
|
7707
|
+
else if (regexes.length > 1) {
|
|
7708
|
+
json.allOf = [
|
|
7709
|
+
...regexes.map((regex) => ({
|
|
7710
|
+
...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
|
|
7711
|
+
pattern: regex.source
|
|
7712
|
+
}))
|
|
7713
|
+
];
|
|
7714
|
+
}
|
|
7715
|
+
}
|
|
7716
|
+
};
|
|
7717
|
+
var numberProcessor = (schema, ctx, _json, _params) => {
|
|
7718
|
+
const json = _json;
|
|
7719
|
+
const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
|
|
7720
|
+
if (typeof format === "string" && format.includes("int"))
|
|
7721
|
+
json.type = "integer";
|
|
7722
|
+
else
|
|
7723
|
+
json.type = "number";
|
|
7724
|
+
if (typeof exclusiveMinimum === "number") {
|
|
7725
|
+
if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
|
|
7726
|
+
json.minimum = exclusiveMinimum;
|
|
7727
|
+
json.exclusiveMinimum = true;
|
|
7728
|
+
} else {
|
|
7729
|
+
json.exclusiveMinimum = exclusiveMinimum;
|
|
7730
|
+
}
|
|
7731
|
+
}
|
|
7732
|
+
if (typeof minimum === "number") {
|
|
7733
|
+
json.minimum = minimum;
|
|
7734
|
+
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
7735
|
+
if (exclusiveMinimum >= minimum)
|
|
7736
|
+
delete json.minimum;
|
|
7737
|
+
else
|
|
7738
|
+
delete json.exclusiveMinimum;
|
|
7739
|
+
}
|
|
7740
|
+
}
|
|
7741
|
+
if (typeof exclusiveMaximum === "number") {
|
|
7742
|
+
if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
|
|
7743
|
+
json.maximum = exclusiveMaximum;
|
|
7744
|
+
json.exclusiveMaximum = true;
|
|
7745
|
+
} else {
|
|
7746
|
+
json.exclusiveMaximum = exclusiveMaximum;
|
|
7747
|
+
}
|
|
7748
|
+
}
|
|
7749
|
+
if (typeof maximum === "number") {
|
|
7750
|
+
json.maximum = maximum;
|
|
7751
|
+
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
7752
|
+
if (exclusiveMaximum <= maximum)
|
|
7753
|
+
delete json.maximum;
|
|
7754
|
+
else
|
|
7755
|
+
delete json.exclusiveMaximum;
|
|
7756
|
+
}
|
|
7757
|
+
}
|
|
7758
|
+
if (typeof multipleOf === "number")
|
|
7759
|
+
json.multipleOf = multipleOf;
|
|
7760
|
+
};
|
|
7761
|
+
var booleanProcessor = (_schema, _ctx, json, _params) => {
|
|
7762
|
+
json.type = "boolean";
|
|
7763
|
+
};
|
|
7764
|
+
var bigintProcessor = (_schema, ctx, _json, _params) => {
|
|
7765
|
+
if (ctx.unrepresentable === "throw") {
|
|
7766
|
+
throw new Error("BigInt cannot be represented in JSON Schema");
|
|
7767
|
+
}
|
|
7768
|
+
};
|
|
7769
|
+
var symbolProcessor = (_schema, ctx, _json, _params) => {
|
|
7770
|
+
if (ctx.unrepresentable === "throw") {
|
|
7771
|
+
throw new Error("Symbols cannot be represented in JSON Schema");
|
|
7772
|
+
}
|
|
7773
|
+
};
|
|
7774
|
+
var nullProcessor = (_schema, ctx, json, _params) => {
|
|
7775
|
+
if (ctx.target === "openapi-3.0") {
|
|
7776
|
+
json.type = "string";
|
|
7777
|
+
json.nullable = true;
|
|
7778
|
+
json.enum = [null];
|
|
7779
|
+
} else {
|
|
7780
|
+
json.type = "null";
|
|
7781
|
+
}
|
|
7782
|
+
};
|
|
7783
|
+
var undefinedProcessor = (_schema, ctx, _json, _params) => {
|
|
7784
|
+
if (ctx.unrepresentable === "throw") {
|
|
7785
|
+
throw new Error("Undefined cannot be represented in JSON Schema");
|
|
7786
|
+
}
|
|
7787
|
+
};
|
|
7788
|
+
var voidProcessor = (_schema, ctx, _json, _params) => {
|
|
7789
|
+
if (ctx.unrepresentable === "throw") {
|
|
7790
|
+
throw new Error("Void cannot be represented in JSON Schema");
|
|
7791
|
+
}
|
|
7792
|
+
};
|
|
7793
|
+
var neverProcessor = (_schema, _ctx, json, _params) => {
|
|
7794
|
+
json.not = {};
|
|
7795
|
+
};
|
|
7796
|
+
var anyProcessor = (_schema, _ctx, _json, _params) => {
|
|
7797
|
+
};
|
|
7798
|
+
var unknownProcessor = (_schema, _ctx, _json, _params) => {
|
|
7799
|
+
};
|
|
7800
|
+
var dateProcessor = (_schema, ctx, _json, _params) => {
|
|
7801
|
+
if (ctx.unrepresentable === "throw") {
|
|
7802
|
+
throw new Error("Date cannot be represented in JSON Schema");
|
|
7803
|
+
}
|
|
7804
|
+
};
|
|
7805
|
+
var enumProcessor = (schema, _ctx, json, _params) => {
|
|
7806
|
+
const def = schema._zod.def;
|
|
7807
|
+
const values = getEnumValues(def.entries);
|
|
7808
|
+
if (values.every((v) => typeof v === "number"))
|
|
7809
|
+
json.type = "number";
|
|
7810
|
+
if (values.every((v) => typeof v === "string"))
|
|
7811
|
+
json.type = "string";
|
|
7812
|
+
json.enum = values;
|
|
7813
|
+
};
|
|
7814
|
+
var literalProcessor = (schema, ctx, json, _params) => {
|
|
7815
|
+
const def = schema._zod.def;
|
|
7816
|
+
const vals = [];
|
|
7817
|
+
for (const val of def.values) {
|
|
7818
|
+
if (val === void 0) {
|
|
7819
|
+
if (ctx.unrepresentable === "throw") {
|
|
7820
|
+
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
7821
|
+
} else {
|
|
7822
|
+
}
|
|
7823
|
+
} else if (typeof val === "bigint") {
|
|
7824
|
+
if (ctx.unrepresentable === "throw") {
|
|
7825
|
+
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
7826
|
+
} else {
|
|
7827
|
+
vals.push(Number(val));
|
|
7828
|
+
}
|
|
7829
|
+
} else {
|
|
7830
|
+
vals.push(val);
|
|
7831
|
+
}
|
|
7832
|
+
}
|
|
7833
|
+
if (vals.length === 0) {
|
|
7834
|
+
} else if (vals.length === 1) {
|
|
7835
|
+
const val = vals[0];
|
|
7836
|
+
json.type = val === null ? "null" : typeof val;
|
|
7837
|
+
if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
|
|
7838
|
+
json.enum = [val];
|
|
7839
|
+
} else {
|
|
7840
|
+
json.const = val;
|
|
7841
|
+
}
|
|
7842
|
+
} else {
|
|
7843
|
+
if (vals.every((v) => typeof v === "number"))
|
|
7844
|
+
json.type = "number";
|
|
7845
|
+
if (vals.every((v) => typeof v === "string"))
|
|
7846
|
+
json.type = "string";
|
|
7847
|
+
if (vals.every((v) => typeof v === "boolean"))
|
|
7848
|
+
json.type = "boolean";
|
|
7849
|
+
if (vals.every((v) => v === null))
|
|
7850
|
+
json.type = "null";
|
|
7851
|
+
json.enum = vals;
|
|
7852
|
+
}
|
|
7853
|
+
};
|
|
7854
|
+
var customProcessor = (_schema, ctx, _json, _params) => {
|
|
7855
|
+
if (ctx.unrepresentable === "throw") {
|
|
7856
|
+
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
7857
|
+
}
|
|
7858
|
+
};
|
|
7859
|
+
var transformProcessor = (_schema, ctx, _json, _params) => {
|
|
7860
|
+
if (ctx.unrepresentable === "throw") {
|
|
7861
|
+
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
7862
|
+
}
|
|
7863
|
+
};
|
|
7864
|
+
var arrayProcessor = (schema, ctx, _json, params) => {
|
|
7865
|
+
const json = _json;
|
|
7866
|
+
const def = schema._zod.def;
|
|
7867
|
+
const { minimum, maximum } = schema._zod.bag;
|
|
7868
|
+
if (typeof minimum === "number")
|
|
7869
|
+
json.minItems = minimum;
|
|
7870
|
+
if (typeof maximum === "number")
|
|
7871
|
+
json.maxItems = maximum;
|
|
7872
|
+
json.type = "array";
|
|
7873
|
+
json.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] });
|
|
7874
|
+
};
|
|
7875
|
+
var objectProcessor = (schema, ctx, _json, params) => {
|
|
7876
|
+
const json = _json;
|
|
7877
|
+
const def = schema._zod.def;
|
|
7878
|
+
json.type = "object";
|
|
7879
|
+
json.properties = {};
|
|
7880
|
+
const shape = def.shape;
|
|
7881
|
+
for (const key in shape) {
|
|
7882
|
+
json.properties[key] = process2(shape[key], ctx, {
|
|
7883
|
+
...params,
|
|
7884
|
+
path: [...params.path, "properties", key]
|
|
7885
|
+
});
|
|
7886
|
+
}
|
|
7887
|
+
const allKeys = new Set(Object.keys(shape));
|
|
7888
|
+
const requiredKeys = new Set([...allKeys].filter((key) => {
|
|
7889
|
+
const v = def.shape[key]._zod;
|
|
7890
|
+
if (ctx.io === "input") {
|
|
7891
|
+
return v.optin === void 0;
|
|
7892
|
+
} else {
|
|
7893
|
+
return v.optout === void 0;
|
|
7894
|
+
}
|
|
7895
|
+
}));
|
|
7896
|
+
if (requiredKeys.size > 0) {
|
|
7897
|
+
json.required = Array.from(requiredKeys);
|
|
7898
|
+
}
|
|
7899
|
+
if (def.catchall?._zod.def.type === "never") {
|
|
7900
|
+
json.additionalProperties = false;
|
|
7901
|
+
} else if (!def.catchall) {
|
|
7902
|
+
if (ctx.io === "output")
|
|
7903
|
+
json.additionalProperties = false;
|
|
7904
|
+
} else if (def.catchall) {
|
|
7905
|
+
json.additionalProperties = process2(def.catchall, ctx, {
|
|
7906
|
+
...params,
|
|
7907
|
+
path: [...params.path, "additionalProperties"]
|
|
7908
|
+
});
|
|
7909
|
+
}
|
|
7910
|
+
};
|
|
7911
|
+
var unionProcessor = (schema, ctx, json, params) => {
|
|
7912
|
+
const def = schema._zod.def;
|
|
7913
|
+
const isExclusive = def.inclusive === false;
|
|
7914
|
+
const options = def.options.map((x, i) => process2(x, ctx, {
|
|
7915
|
+
...params,
|
|
7916
|
+
path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
|
|
7917
|
+
}));
|
|
7918
|
+
if (isExclusive) {
|
|
7919
|
+
json.oneOf = options;
|
|
7920
|
+
} else {
|
|
7921
|
+
json.anyOf = options;
|
|
7922
|
+
}
|
|
7923
|
+
};
|
|
7924
|
+
var intersectionProcessor = (schema, ctx, json, params) => {
|
|
7925
|
+
const def = schema._zod.def;
|
|
7926
|
+
const a = process2(def.left, ctx, {
|
|
7927
|
+
...params,
|
|
7928
|
+
path: [...params.path, "allOf", 0]
|
|
7929
|
+
});
|
|
7930
|
+
const b = process2(def.right, ctx, {
|
|
7931
|
+
...params,
|
|
7932
|
+
path: [...params.path, "allOf", 1]
|
|
7933
|
+
});
|
|
7934
|
+
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
7935
|
+
const allOf = [
|
|
7936
|
+
...isSimpleIntersection(a) ? a.allOf : [a],
|
|
7937
|
+
...isSimpleIntersection(b) ? b.allOf : [b]
|
|
7938
|
+
];
|
|
7939
|
+
json.allOf = allOf;
|
|
7940
|
+
};
|
|
7941
|
+
var tupleProcessor = (schema, ctx, _json, params) => {
|
|
7942
|
+
const json = _json;
|
|
7943
|
+
const def = schema._zod.def;
|
|
7944
|
+
json.type = "array";
|
|
7945
|
+
const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
|
|
7946
|
+
const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
|
|
7947
|
+
const prefixItems = def.items.map((x, i) => process2(x, ctx, {
|
|
7948
|
+
...params,
|
|
7949
|
+
path: [...params.path, prefixPath, i]
|
|
7950
|
+
}));
|
|
7951
|
+
const rest = def.rest ? process2(def.rest, ctx, {
|
|
7952
|
+
...params,
|
|
7953
|
+
path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
|
|
7954
|
+
}) : null;
|
|
7955
|
+
if (ctx.target === "draft-2020-12") {
|
|
7956
|
+
json.prefixItems = prefixItems;
|
|
7957
|
+
if (rest) {
|
|
7958
|
+
json.items = rest;
|
|
7959
|
+
}
|
|
7960
|
+
} else if (ctx.target === "openapi-3.0") {
|
|
7961
|
+
json.items = {
|
|
7962
|
+
anyOf: prefixItems
|
|
7963
|
+
};
|
|
7964
|
+
if (rest) {
|
|
7965
|
+
json.items.anyOf.push(rest);
|
|
7966
|
+
}
|
|
7967
|
+
json.minItems = prefixItems.length;
|
|
7968
|
+
if (!rest) {
|
|
7969
|
+
json.maxItems = prefixItems.length;
|
|
7970
|
+
}
|
|
7971
|
+
} else {
|
|
7972
|
+
json.items = prefixItems;
|
|
7973
|
+
if (rest) {
|
|
7974
|
+
json.additionalItems = rest;
|
|
7975
|
+
}
|
|
7976
|
+
}
|
|
7977
|
+
const { minimum, maximum } = schema._zod.bag;
|
|
7978
|
+
if (typeof minimum === "number")
|
|
7979
|
+
json.minItems = minimum;
|
|
7980
|
+
if (typeof maximum === "number")
|
|
7981
|
+
json.maxItems = maximum;
|
|
7982
|
+
};
|
|
7983
|
+
var recordProcessor = (schema, ctx, _json, params) => {
|
|
7984
|
+
const json = _json;
|
|
7985
|
+
const def = schema._zod.def;
|
|
7986
|
+
json.type = "object";
|
|
7987
|
+
if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") {
|
|
7988
|
+
json.propertyNames = process2(def.keyType, ctx, {
|
|
7989
|
+
...params,
|
|
7990
|
+
path: [...params.path, "propertyNames"]
|
|
7991
|
+
});
|
|
7992
|
+
}
|
|
7993
|
+
json.additionalProperties = process2(def.valueType, ctx, {
|
|
7994
|
+
...params,
|
|
7995
|
+
path: [...params.path, "additionalProperties"]
|
|
7996
|
+
});
|
|
7997
|
+
};
|
|
7998
|
+
var nullableProcessor = (schema, ctx, json, params) => {
|
|
7999
|
+
const def = schema._zod.def;
|
|
8000
|
+
const inner = process2(def.innerType, ctx, params);
|
|
8001
|
+
const seen = ctx.seen.get(schema);
|
|
8002
|
+
if (ctx.target === "openapi-3.0") {
|
|
8003
|
+
seen.ref = def.innerType;
|
|
8004
|
+
json.nullable = true;
|
|
8005
|
+
} else {
|
|
8006
|
+
json.anyOf = [inner, { type: "null" }];
|
|
8007
|
+
}
|
|
8008
|
+
};
|
|
8009
|
+
var nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
8010
|
+
const def = schema._zod.def;
|
|
8011
|
+
process2(def.innerType, ctx, params);
|
|
8012
|
+
const seen = ctx.seen.get(schema);
|
|
8013
|
+
seen.ref = def.innerType;
|
|
8014
|
+
};
|
|
8015
|
+
var defaultProcessor = (schema, ctx, json, params) => {
|
|
8016
|
+
const def = schema._zod.def;
|
|
8017
|
+
process2(def.innerType, ctx, params);
|
|
8018
|
+
const seen = ctx.seen.get(schema);
|
|
8019
|
+
seen.ref = def.innerType;
|
|
8020
|
+
json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
8021
|
+
};
|
|
8022
|
+
var prefaultProcessor = (schema, ctx, json, params) => {
|
|
8023
|
+
const def = schema._zod.def;
|
|
8024
|
+
process2(def.innerType, ctx, params);
|
|
8025
|
+
const seen = ctx.seen.get(schema);
|
|
8026
|
+
seen.ref = def.innerType;
|
|
8027
|
+
if (ctx.io === "input")
|
|
8028
|
+
json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
8029
|
+
};
|
|
8030
|
+
var catchProcessor = (schema, ctx, json, params) => {
|
|
8031
|
+
const def = schema._zod.def;
|
|
8032
|
+
process2(def.innerType, ctx, params);
|
|
8033
|
+
const seen = ctx.seen.get(schema);
|
|
8034
|
+
seen.ref = def.innerType;
|
|
8035
|
+
let catchValue;
|
|
8036
|
+
try {
|
|
8037
|
+
catchValue = def.catchValue(void 0);
|
|
8038
|
+
} catch {
|
|
8039
|
+
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
8040
|
+
}
|
|
8041
|
+
json.default = catchValue;
|
|
8042
|
+
};
|
|
8043
|
+
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
8044
|
+
const def = schema._zod.def;
|
|
8045
|
+
const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
8046
|
+
process2(innerType, ctx, params);
|
|
8047
|
+
const seen = ctx.seen.get(schema);
|
|
8048
|
+
seen.ref = innerType;
|
|
8049
|
+
};
|
|
8050
|
+
var readonlyProcessor = (schema, ctx, json, params) => {
|
|
8051
|
+
const def = schema._zod.def;
|
|
8052
|
+
process2(def.innerType, ctx, params);
|
|
8053
|
+
const seen = ctx.seen.get(schema);
|
|
8054
|
+
seen.ref = def.innerType;
|
|
8055
|
+
json.readOnly = true;
|
|
8056
|
+
};
|
|
8057
|
+
var promiseProcessor = (schema, ctx, _json, params) => {
|
|
8058
|
+
const def = schema._zod.def;
|
|
8059
|
+
process2(def.innerType, ctx, params);
|
|
8060
|
+
const seen = ctx.seen.get(schema);
|
|
8061
|
+
seen.ref = def.innerType;
|
|
8062
|
+
};
|
|
8063
|
+
var optionalProcessor = (schema, ctx, _json, params) => {
|
|
8064
|
+
const def = schema._zod.def;
|
|
8065
|
+
process2(def.innerType, ctx, params);
|
|
8066
|
+
const seen = ctx.seen.get(schema);
|
|
8067
|
+
seen.ref = def.innerType;
|
|
8068
|
+
};
|
|
8069
|
+
|
|
7430
8070
|
// node_modules/zod/v4/classic/iso.js
|
|
7431
8071
|
var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
|
|
7432
8072
|
$ZodISODateTime.init(inst, def);
|
|
@@ -7514,25 +8154,28 @@ var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
|
7514
8154
|
// node_modules/zod/v4/classic/schemas.js
|
|
7515
8155
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
7516
8156
|
$ZodType.init(inst, def);
|
|
8157
|
+
Object.assign(inst["~standard"], {
|
|
8158
|
+
jsonSchema: {
|
|
8159
|
+
input: createStandardJSONSchemaMethod(inst, "input"),
|
|
8160
|
+
output: createStandardJSONSchemaMethod(inst, "output")
|
|
8161
|
+
}
|
|
8162
|
+
});
|
|
8163
|
+
inst.toJSONSchema = createToJSONSchemaMethod(inst, {});
|
|
7517
8164
|
inst.def = def;
|
|
7518
8165
|
inst.type = def.type;
|
|
7519
8166
|
Object.defineProperty(inst, "_def", { value: def });
|
|
7520
8167
|
inst.check = (...checks) => {
|
|
7521
|
-
return inst.clone(
|
|
7522
|
-
|
|
7523
|
-
...def,
|
|
7524
|
-
checks: [
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
]
|
|
7528
|
-
}
|
|
7529
|
-
// { parent: true }
|
|
7530
|
-
);
|
|
8168
|
+
return inst.clone(util_exports.mergeDefs(def, {
|
|
8169
|
+
checks: [
|
|
8170
|
+
...def.checks ?? [],
|
|
8171
|
+
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
8172
|
+
]
|
|
8173
|
+
}));
|
|
7531
8174
|
};
|
|
7532
8175
|
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
7533
8176
|
inst.brand = () => inst;
|
|
7534
|
-
inst.register = ((reg,
|
|
7535
|
-
reg.add(inst,
|
|
8177
|
+
inst.register = ((reg, meta2) => {
|
|
8178
|
+
reg.add(inst, meta2);
|
|
7536
8179
|
return inst;
|
|
7537
8180
|
});
|
|
7538
8181
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
@@ -7590,6 +8233,7 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
7590
8233
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
7591
8234
|
$ZodString.init(inst, def);
|
|
7592
8235
|
ZodType.init(inst, def);
|
|
8236
|
+
inst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json, params);
|
|
7593
8237
|
const bag = inst._zod.bag;
|
|
7594
8238
|
inst.format = bag.format ?? null;
|
|
7595
8239
|
inst.minLength = bag.minimum ?? null;
|
|
@@ -7608,6 +8252,7 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
7608
8252
|
inst.normalize = (...args) => inst.check(_normalize(...args));
|
|
7609
8253
|
inst.toLowerCase = () => inst.check(_toLowerCase());
|
|
7610
8254
|
inst.toUpperCase = () => inst.check(_toUpperCase());
|
|
8255
|
+
inst.slugify = () => inst.check(_slugify());
|
|
7611
8256
|
});
|
|
7612
8257
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
7613
8258
|
$ZodString.init(inst, def);
|
|
@@ -7726,6 +8371,7 @@ var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
|
|
|
7726
8371
|
var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
7727
8372
|
$ZodNumber.init(inst, def);
|
|
7728
8373
|
ZodType.init(inst, def);
|
|
8374
|
+
inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
|
|
7729
8375
|
inst.gt = (value, params) => inst.check(_gt(value, params));
|
|
7730
8376
|
inst.gte = (value, params) => inst.check(_gte(value, params));
|
|
7731
8377
|
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
@@ -7758,10 +8404,12 @@ function int(params) {
|
|
|
7758
8404
|
var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
|
|
7759
8405
|
$ZodBoolean.init(inst, def);
|
|
7760
8406
|
ZodType.init(inst, def);
|
|
8407
|
+
inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
|
|
7761
8408
|
});
|
|
7762
8409
|
var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
|
|
7763
8410
|
$ZodBigInt.init(inst, def);
|
|
7764
8411
|
ZodType.init(inst, def);
|
|
8412
|
+
inst._zod.processJSONSchema = (ctx, json, params) => bigintProcessor(inst, ctx, json, params);
|
|
7765
8413
|
inst.gte = (value, params) => inst.check(_gte(value, params));
|
|
7766
8414
|
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
7767
8415
|
inst.gt = (value, params) => inst.check(_gt(value, params));
|
|
@@ -7783,22 +8431,27 @@ var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
|
|
|
7783
8431
|
var ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => {
|
|
7784
8432
|
$ZodSymbol.init(inst, def);
|
|
7785
8433
|
ZodType.init(inst, def);
|
|
8434
|
+
inst._zod.processJSONSchema = (ctx, json, params) => symbolProcessor(inst, ctx, json, params);
|
|
7786
8435
|
});
|
|
7787
8436
|
var ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => {
|
|
7788
8437
|
$ZodUndefined.init(inst, def);
|
|
7789
8438
|
ZodType.init(inst, def);
|
|
8439
|
+
inst._zod.processJSONSchema = (ctx, json, params) => undefinedProcessor(inst, ctx, json, params);
|
|
7790
8440
|
});
|
|
7791
8441
|
var ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => {
|
|
7792
8442
|
$ZodNull.init(inst, def);
|
|
7793
8443
|
ZodType.init(inst, def);
|
|
8444
|
+
inst._zod.processJSONSchema = (ctx, json, params) => nullProcessor(inst, ctx, json, params);
|
|
7794
8445
|
});
|
|
7795
8446
|
var ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
|
|
7796
8447
|
$ZodAny.init(inst, def);
|
|
7797
8448
|
ZodType.init(inst, def);
|
|
8449
|
+
inst._zod.processJSONSchema = (ctx, json, params) => anyProcessor(inst, ctx, json, params);
|
|
7798
8450
|
});
|
|
7799
8451
|
var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
|
|
7800
8452
|
$ZodUnknown.init(inst, def);
|
|
7801
8453
|
ZodType.init(inst, def);
|
|
8454
|
+
inst._zod.processJSONSchema = (ctx, json, params) => unknownProcessor(inst, ctx, json, params);
|
|
7802
8455
|
});
|
|
7803
8456
|
function unknown() {
|
|
7804
8457
|
return _unknown(ZodUnknown);
|
|
@@ -7806,6 +8459,7 @@ function unknown() {
|
|
|
7806
8459
|
var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
|
|
7807
8460
|
$ZodNever.init(inst, def);
|
|
7808
8461
|
ZodType.init(inst, def);
|
|
8462
|
+
inst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json, params);
|
|
7809
8463
|
});
|
|
7810
8464
|
function never(params) {
|
|
7811
8465
|
return _never(ZodNever, params);
|
|
@@ -7813,10 +8467,12 @@ function never(params) {
|
|
|
7813
8467
|
var ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => {
|
|
7814
8468
|
$ZodVoid.init(inst, def);
|
|
7815
8469
|
ZodType.init(inst, def);
|
|
8470
|
+
inst._zod.processJSONSchema = (ctx, json, params) => voidProcessor(inst, ctx, json, params);
|
|
7816
8471
|
});
|
|
7817
8472
|
var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
|
|
7818
8473
|
$ZodDate.init(inst, def);
|
|
7819
8474
|
ZodType.init(inst, def);
|
|
8475
|
+
inst._zod.processJSONSchema = (ctx, json, params) => dateProcessor(inst, ctx, json, params);
|
|
7820
8476
|
inst.min = (value, params) => inst.check(_gte(value, params));
|
|
7821
8477
|
inst.max = (value, params) => inst.check(_lte(value, params));
|
|
7822
8478
|
const c = inst._zod.bag;
|
|
@@ -7826,6 +8482,7 @@ var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
|
|
|
7826
8482
|
var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
7827
8483
|
$ZodArray.init(inst, def);
|
|
7828
8484
|
ZodType.init(inst, def);
|
|
8485
|
+
inst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);
|
|
7829
8486
|
inst.element = def.element;
|
|
7830
8487
|
inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
|
|
7831
8488
|
inst.nonempty = (params) => inst.check(_minLength(1, params));
|
|
@@ -7839,7 +8496,10 @@ function array(element, params) {
|
|
|
7839
8496
|
var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
7840
8497
|
$ZodObjectJIT.init(inst, def);
|
|
7841
8498
|
ZodType.init(inst, def);
|
|
7842
|
-
|
|
8499
|
+
inst._zod.processJSONSchema = (ctx, json, params) => objectProcessor(inst, ctx, json, params);
|
|
8500
|
+
util_exports.defineLazy(inst, "shape", () => {
|
|
8501
|
+
return def.shape;
|
|
8502
|
+
});
|
|
7843
8503
|
inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
|
|
7844
8504
|
inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
|
|
7845
8505
|
inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
|
|
@@ -7861,6 +8521,7 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
7861
8521
|
var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
|
|
7862
8522
|
$ZodUnion.init(inst, def);
|
|
7863
8523
|
ZodType.init(inst, def);
|
|
8524
|
+
inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
|
|
7864
8525
|
inst.options = def.options;
|
|
7865
8526
|
});
|
|
7866
8527
|
function union(options, params) {
|
|
@@ -7877,6 +8538,7 @@ var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion"
|
|
|
7877
8538
|
var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
|
|
7878
8539
|
$ZodIntersection.init(inst, def);
|
|
7879
8540
|
ZodType.init(inst, def);
|
|
8541
|
+
inst._zod.processJSONSchema = (ctx, json, params) => intersectionProcessor(inst, ctx, json, params);
|
|
7880
8542
|
});
|
|
7881
8543
|
function intersection(left, right) {
|
|
7882
8544
|
return new ZodIntersection({
|
|
@@ -7888,6 +8550,7 @@ function intersection(left, right) {
|
|
|
7888
8550
|
var ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => {
|
|
7889
8551
|
$ZodTuple.init(inst, def);
|
|
7890
8552
|
ZodType.init(inst, def);
|
|
8553
|
+
inst._zod.processJSONSchema = (ctx, json, params) => tupleProcessor(inst, ctx, json, params);
|
|
7891
8554
|
inst.rest = (rest) => inst.clone({
|
|
7892
8555
|
...inst._zod.def,
|
|
7893
8556
|
rest
|
|
@@ -7896,12 +8559,14 @@ var ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => {
|
|
|
7896
8559
|
var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
7897
8560
|
$ZodRecord.init(inst, def);
|
|
7898
8561
|
ZodType.init(inst, def);
|
|
8562
|
+
inst._zod.processJSONSchema = (ctx, json, params) => recordProcessor(inst, ctx, json, params);
|
|
7899
8563
|
inst.keyType = def.keyType;
|
|
7900
8564
|
inst.valueType = def.valueType;
|
|
7901
8565
|
});
|
|
7902
8566
|
var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
|
|
7903
8567
|
$ZodEnum.init(inst, def);
|
|
7904
8568
|
ZodType.init(inst, def);
|
|
8569
|
+
inst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json, params);
|
|
7905
8570
|
inst.enum = def.entries;
|
|
7906
8571
|
inst.options = Object.values(def.entries);
|
|
7907
8572
|
const keys = new Set(Object.keys(def.entries));
|
|
@@ -7947,6 +8612,7 @@ function _enum(values, params) {
|
|
|
7947
8612
|
var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
|
|
7948
8613
|
$ZodLiteral.init(inst, def);
|
|
7949
8614
|
ZodType.init(inst, def);
|
|
8615
|
+
inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);
|
|
7950
8616
|
inst.values = new Set(def.values);
|
|
7951
8617
|
Object.defineProperty(inst, "value", {
|
|
7952
8618
|
get() {
|
|
@@ -7960,6 +8626,7 @@ var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
|
|
|
7960
8626
|
var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
7961
8627
|
$ZodTransform.init(inst, def);
|
|
7962
8628
|
ZodType.init(inst, def);
|
|
8629
|
+
inst._zod.processJSONSchema = (ctx, json, params) => transformProcessor(inst, ctx, json, params);
|
|
7963
8630
|
inst._zod.parse = (payload, _ctx) => {
|
|
7964
8631
|
if (_ctx.direction === "backward") {
|
|
7965
8632
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -7997,6 +8664,7 @@ function transform(fn) {
|
|
|
7997
8664
|
var ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
|
|
7998
8665
|
$ZodOptional.init(inst, def);
|
|
7999
8666
|
ZodType.init(inst, def);
|
|
8667
|
+
inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
|
|
8000
8668
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
8001
8669
|
});
|
|
8002
8670
|
function optional(innerType) {
|
|
@@ -8008,6 +8676,7 @@ function optional(innerType) {
|
|
|
8008
8676
|
var ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
|
|
8009
8677
|
$ZodNullable.init(inst, def);
|
|
8010
8678
|
ZodType.init(inst, def);
|
|
8679
|
+
inst._zod.processJSONSchema = (ctx, json, params) => nullableProcessor(inst, ctx, json, params);
|
|
8011
8680
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
8012
8681
|
});
|
|
8013
8682
|
function nullable(innerType) {
|
|
@@ -8019,6 +8688,7 @@ function nullable(innerType) {
|
|
|
8019
8688
|
var ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
|
|
8020
8689
|
$ZodDefault.init(inst, def);
|
|
8021
8690
|
ZodType.init(inst, def);
|
|
8691
|
+
inst._zod.processJSONSchema = (ctx, json, params) => defaultProcessor(inst, ctx, json, params);
|
|
8022
8692
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
8023
8693
|
inst.removeDefault = inst.unwrap;
|
|
8024
8694
|
});
|
|
@@ -8034,6 +8704,7 @@ function _default(innerType, defaultValue) {
|
|
|
8034
8704
|
var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
|
|
8035
8705
|
$ZodPrefault.init(inst, def);
|
|
8036
8706
|
ZodType.init(inst, def);
|
|
8707
|
+
inst._zod.processJSONSchema = (ctx, json, params) => prefaultProcessor(inst, ctx, json, params);
|
|
8037
8708
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
8038
8709
|
});
|
|
8039
8710
|
function prefault(innerType, defaultValue) {
|
|
@@ -8048,6 +8719,7 @@ function prefault(innerType, defaultValue) {
|
|
|
8048
8719
|
var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
|
|
8049
8720
|
$ZodNonOptional.init(inst, def);
|
|
8050
8721
|
ZodType.init(inst, def);
|
|
8722
|
+
inst._zod.processJSONSchema = (ctx, json, params) => nonoptionalProcessor(inst, ctx, json, params);
|
|
8051
8723
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
8052
8724
|
});
|
|
8053
8725
|
function nonoptional(innerType, params) {
|
|
@@ -8060,6 +8732,7 @@ function nonoptional(innerType, params) {
|
|
|
8060
8732
|
var ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
|
|
8061
8733
|
$ZodCatch.init(inst, def);
|
|
8062
8734
|
ZodType.init(inst, def);
|
|
8735
|
+
inst._zod.processJSONSchema = (ctx, json, params) => catchProcessor(inst, ctx, json, params);
|
|
8063
8736
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
8064
8737
|
inst.removeCatch = inst.unwrap;
|
|
8065
8738
|
});
|
|
@@ -8073,6 +8746,7 @@ function _catch(innerType, catchValue) {
|
|
|
8073
8746
|
var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
|
|
8074
8747
|
$ZodPipe.init(inst, def);
|
|
8075
8748
|
ZodType.init(inst, def);
|
|
8749
|
+
inst._zod.processJSONSchema = (ctx, json, params) => pipeProcessor(inst, ctx, json, params);
|
|
8076
8750
|
inst.in = def.in;
|
|
8077
8751
|
inst.out = def.out;
|
|
8078
8752
|
});
|
|
@@ -8087,6 +8761,7 @@ function pipe2(in_, out) {
|
|
|
8087
8761
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
8088
8762
|
$ZodReadonly.init(inst, def);
|
|
8089
8763
|
ZodType.init(inst, def);
|
|
8764
|
+
inst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);
|
|
8090
8765
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
8091
8766
|
});
|
|
8092
8767
|
function readonly(innerType) {
|
|
@@ -8098,11 +8773,13 @@ function readonly(innerType) {
|
|
|
8098
8773
|
var ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => {
|
|
8099
8774
|
$ZodPromise.init(inst, def);
|
|
8100
8775
|
ZodType.init(inst, def);
|
|
8776
|
+
inst._zod.processJSONSchema = (ctx, json, params) => promiseProcessor(inst, ctx, json, params);
|
|
8101
8777
|
inst.unwrap = () => inst._zod.def.innerType;
|
|
8102
8778
|
});
|
|
8103
8779
|
var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
8104
8780
|
$ZodCustom.init(inst, def);
|
|
8105
8781
|
ZodType.init(inst, def);
|
|
8782
|
+
inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
|
|
8106
8783
|
});
|
|
8107
8784
|
function refine(fn, _params = {}) {
|
|
8108
8785
|
return _refine(ZodCustom, fn, _params);
|