@shepherdjerred/helm-types 1.2.1 → 1.3.0-dev.3011
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/dist/cli.js +1189 -445
- package/package.json +10 -8
- package/src/chart-fetcher.ts +1 -0
package/dist/cli.js
CHANGED
|
@@ -333,8 +333,8 @@ var require_directives = __commonJS((exports) => {
|
|
|
333
333
|
if (prefix) {
|
|
334
334
|
try {
|
|
335
335
|
return prefix + decodeURIComponent(suffix);
|
|
336
|
-
} catch (
|
|
337
|
-
onError(String(
|
|
336
|
+
} catch (error51) {
|
|
337
|
+
onError(String(error51));
|
|
338
338
|
return null;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
@@ -425,9 +425,9 @@ var require_anchors = __commonJS((exports) => {
|
|
|
425
425
|
if (typeof ref === "object" && ref.anchor && (identity.isScalar(ref.node) || identity.isCollection(ref.node))) {
|
|
426
426
|
ref.node.anchor = ref.anchor;
|
|
427
427
|
} else {
|
|
428
|
-
const
|
|
429
|
-
|
|
430
|
-
throw
|
|
428
|
+
const error51 = new Error("Failed to resolve repeated object (this should not happen)");
|
|
429
|
+
error51.source = source;
|
|
430
|
+
throw error51;
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
},
|
|
@@ -3433,12 +3433,12 @@ var require_errors = __commonJS((exports) => {
|
|
|
3433
3433
|
super("YAMLWarning", pos, code, message);
|
|
3434
3434
|
}
|
|
3435
3435
|
}
|
|
3436
|
-
var prettifyError2 = (src, lc) => (
|
|
3437
|
-
if (
|
|
3436
|
+
var prettifyError2 = (src, lc) => (error51) => {
|
|
3437
|
+
if (error51.pos[0] === -1)
|
|
3438
3438
|
return;
|
|
3439
|
-
|
|
3440
|
-
const { line, col } =
|
|
3441
|
-
|
|
3439
|
+
error51.linePos = error51.pos.map((pos) => lc.linePos(pos));
|
|
3440
|
+
const { line, col } = error51.linePos[0];
|
|
3441
|
+
error51.message += ` at line ${line}, column ${col}`;
|
|
3442
3442
|
let ci = col - 1;
|
|
3443
3443
|
let lineStr = src.substring(lc.lineStarts[line - 1], lc.lineStarts[line]).replace(/[\n\r]+$/, "");
|
|
3444
3444
|
if (ci >= 60 && lineStr.length > 80) {
|
|
@@ -3457,12 +3457,12 @@ var require_errors = __commonJS((exports) => {
|
|
|
3457
3457
|
}
|
|
3458
3458
|
if (/[^ ]/.test(lineStr)) {
|
|
3459
3459
|
let count = 1;
|
|
3460
|
-
const end =
|
|
3460
|
+
const end = error51.linePos[1];
|
|
3461
3461
|
if (end?.line === line && end.col > col) {
|
|
3462
3462
|
count = Math.max(1, Math.min(end.col - col, 80 - ci));
|
|
3463
3463
|
}
|
|
3464
3464
|
const pointer = " ".repeat(ci) + "^".repeat(count);
|
|
3465
|
-
|
|
3465
|
+
error51.message += `:
|
|
3466
3466
|
|
|
3467
3467
|
${lineStr}
|
|
3468
3468
|
${pointer}
|
|
@@ -4252,7 +4252,7 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
4252
4252
|
const mode = source[0];
|
|
4253
4253
|
let indent = 0;
|
|
4254
4254
|
let chomp = "";
|
|
4255
|
-
let
|
|
4255
|
+
let error51 = -1;
|
|
4256
4256
|
for (let i = 1;i < source.length; ++i) {
|
|
4257
4257
|
const ch = source[i];
|
|
4258
4258
|
if (!chomp && (ch === "-" || ch === "+"))
|
|
@@ -4261,12 +4261,12 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
4261
4261
|
const n = Number(ch);
|
|
4262
4262
|
if (!indent && n)
|
|
4263
4263
|
indent = n;
|
|
4264
|
-
else if (
|
|
4265
|
-
|
|
4264
|
+
else if (error51 === -1)
|
|
4265
|
+
error51 = offset + i;
|
|
4266
4266
|
}
|
|
4267
4267
|
}
|
|
4268
|
-
if (
|
|
4269
|
-
onError(
|
|
4268
|
+
if (error51 !== -1)
|
|
4269
|
+
onError(error51, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${source}`);
|
|
4270
4270
|
let hasSpace = false;
|
|
4271
4271
|
let comment = "";
|
|
4272
4272
|
let length = source.length;
|
|
@@ -4552,8 +4552,8 @@ var require_compose_scalar = __commonJS((exports) => {
|
|
|
4552
4552
|
try {
|
|
4553
4553
|
const res = tag.resolve(value, (msg) => onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg), ctx.options);
|
|
4554
4554
|
scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res);
|
|
4555
|
-
} catch (
|
|
4556
|
-
const msg =
|
|
4555
|
+
} catch (error51) {
|
|
4556
|
+
const msg = error51 instanceof Error ? error51.message : String(error51);
|
|
4557
4557
|
onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg);
|
|
4558
4558
|
scalar = new Scalar.Scalar(value);
|
|
4559
4559
|
}
|
|
@@ -4670,8 +4670,8 @@ var require_compose_node = __commonJS((exports) => {
|
|
|
4670
4670
|
node = composeCollection.composeCollection(CN, ctx, token, props, onError);
|
|
4671
4671
|
if (anchor)
|
|
4672
4672
|
node.anchor = anchor.source.substring(1);
|
|
4673
|
-
} catch (
|
|
4674
|
-
const message =
|
|
4673
|
+
} catch (error51) {
|
|
4674
|
+
const message = error51 instanceof Error ? error51.message : String(error51);
|
|
4675
4675
|
onError(token, "RESOURCE_EXHAUSTION", message);
|
|
4676
4676
|
}
|
|
4677
4677
|
break;
|
|
@@ -4920,11 +4920,11 @@ ${cb}` : comment;
|
|
|
4920
4920
|
break;
|
|
4921
4921
|
case "error": {
|
|
4922
4922
|
const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
|
|
4923
|
-
const
|
|
4923
|
+
const error51 = new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
|
|
4924
4924
|
if (this.atDirectives || !this.doc)
|
|
4925
|
-
this.errors.push(
|
|
4925
|
+
this.errors.push(error51);
|
|
4926
4926
|
else
|
|
4927
|
-
this.doc.errors.push(
|
|
4927
|
+
this.doc.errors.push(error51);
|
|
4928
4928
|
break;
|
|
4929
4929
|
}
|
|
4930
4930
|
case "doc-end": {
|
|
@@ -6197,8 +6197,8 @@ var require_parser = __commonJS((exports) => {
|
|
|
6197
6197
|
peek(n) {
|
|
6198
6198
|
return this.stack[this.stack.length - n];
|
|
6199
6199
|
}
|
|
6200
|
-
*pop(
|
|
6201
|
-
const token =
|
|
6200
|
+
*pop(error51) {
|
|
6201
|
+
const token = error51 ?? this.stack.pop();
|
|
6202
6202
|
if (!token) {
|
|
6203
6203
|
const message = "Tried to pop an empty stack";
|
|
6204
6204
|
yield { type: "error", offset: this.offset, source: "", message };
|
|
@@ -7034,6 +7034,7 @@ __export(exports_external, {
|
|
|
7034
7034
|
iso: () => exports_iso,
|
|
7035
7035
|
ipv6: () => ipv62,
|
|
7036
7036
|
ipv4: () => ipv42,
|
|
7037
|
+
invertCodec: () => invertCodec,
|
|
7037
7038
|
intersection: () => intersection,
|
|
7038
7039
|
int64: () => int64,
|
|
7039
7040
|
int32: () => int32,
|
|
@@ -7112,6 +7113,7 @@ __export(exports_external, {
|
|
|
7112
7113
|
ZodRealError: () => ZodRealError,
|
|
7113
7114
|
ZodReadonly: () => ZodReadonly,
|
|
7114
7115
|
ZodPromise: () => ZodPromise,
|
|
7116
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
7115
7117
|
ZodPrefault: () => ZodPrefault,
|
|
7116
7118
|
ZodPipe: () => ZodPipe,
|
|
7117
7119
|
ZodOptional: () => ZodOptional,
|
|
@@ -7372,6 +7374,7 @@ __export(exports_core2, {
|
|
|
7372
7374
|
$ZodRealError: () => $ZodRealError,
|
|
7373
7375
|
$ZodReadonly: () => $ZodReadonly,
|
|
7374
7376
|
$ZodPromise: () => $ZodPromise,
|
|
7377
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
7375
7378
|
$ZodPrefault: () => $ZodPrefault,
|
|
7376
7379
|
$ZodPipe: () => $ZodPipe,
|
|
7377
7380
|
$ZodOptional: () => $ZodOptional,
|
|
@@ -7452,7 +7455,8 @@ __export(exports_core2, {
|
|
|
7452
7455
|
});
|
|
7453
7456
|
|
|
7454
7457
|
// node_modules/zod/v4/core/core.js
|
|
7455
|
-
var
|
|
7458
|
+
var _a;
|
|
7459
|
+
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
7456
7460
|
status: "aborted"
|
|
7457
7461
|
});
|
|
7458
7462
|
function $constructor(name, initializer, params) {
|
|
@@ -7487,10 +7491,10 @@ function $constructor(name, initializer, params) {
|
|
|
7487
7491
|
}
|
|
7488
7492
|
Object.defineProperty(Definition, "name", { value: name });
|
|
7489
7493
|
function _(def) {
|
|
7490
|
-
var
|
|
7494
|
+
var _a2;
|
|
7491
7495
|
const inst = params?.Parent ? new Definition : this;
|
|
7492
7496
|
init(inst, def);
|
|
7493
|
-
(
|
|
7497
|
+
(_a2 = inst._zod).deferred ?? (_a2.deferred = []);
|
|
7494
7498
|
for (const fn of inst._zod.deferred) {
|
|
7495
7499
|
fn();
|
|
7496
7500
|
}
|
|
@@ -7521,7 +7525,8 @@ class $ZodEncodeError extends Error {
|
|
|
7521
7525
|
this.name = "ZodEncodeError";
|
|
7522
7526
|
}
|
|
7523
7527
|
}
|
|
7524
|
-
|
|
7528
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
7529
|
+
var globalConfig = globalThis.__zod_globalConfig;
|
|
7525
7530
|
function config(newConfig) {
|
|
7526
7531
|
if (newConfig)
|
|
7527
7532
|
Object.assign(globalConfig, newConfig);
|
|
@@ -7569,6 +7574,7 @@ __export(exports_util, {
|
|
|
7569
7574
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
7570
7575
|
finalizeIssue: () => finalizeIssue,
|
|
7571
7576
|
extend: () => extend,
|
|
7577
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
7572
7578
|
escapeRegex: () => escapeRegex,
|
|
7573
7579
|
esc: () => esc,
|
|
7574
7580
|
defineLazy: () => defineLazy,
|
|
@@ -7639,21 +7645,14 @@ function cleanRegex(source) {
|
|
|
7639
7645
|
return source.slice(start, end);
|
|
7640
7646
|
}
|
|
7641
7647
|
function floatSafeRemainder(val, step) {
|
|
7642
|
-
const
|
|
7643
|
-
const
|
|
7644
|
-
|
|
7645
|
-
if (
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
7649
|
-
}
|
|
7650
|
-
}
|
|
7651
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
7652
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
7653
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
7654
|
-
return valInt % stepInt / 10 ** decCount;
|
|
7648
|
+
const ratio = val / step;
|
|
7649
|
+
const roundedRatio = Math.round(ratio);
|
|
7650
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
7651
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
7652
|
+
return 0;
|
|
7653
|
+
return ratio - roundedRatio;
|
|
7655
7654
|
}
|
|
7656
|
-
var EVALUATING = Symbol("evaluating");
|
|
7655
|
+
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
7657
7656
|
function defineLazy(object, key, getter) {
|
|
7658
7657
|
let value = undefined;
|
|
7659
7658
|
Object.defineProperty(object, key, {
|
|
@@ -7731,7 +7730,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
|
|
|
7731
7730
|
function isObject(data) {
|
|
7732
7731
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
7733
7732
|
}
|
|
7734
|
-
var allowsEval = cached(() => {
|
|
7733
|
+
var allowsEval = /* @__PURE__ */ cached(() => {
|
|
7734
|
+
if (globalConfig.jitless) {
|
|
7735
|
+
return false;
|
|
7736
|
+
}
|
|
7735
7737
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
7736
7738
|
return false;
|
|
7737
7739
|
}
|
|
@@ -7764,6 +7766,10 @@ function shallowClone(o) {
|
|
|
7764
7766
|
return { ...o };
|
|
7765
7767
|
if (Array.isArray(o))
|
|
7766
7768
|
return [...o];
|
|
7769
|
+
if (o instanceof Map)
|
|
7770
|
+
return new Map(o);
|
|
7771
|
+
if (o instanceof Set)
|
|
7772
|
+
return new Set(o);
|
|
7767
7773
|
return o;
|
|
7768
7774
|
}
|
|
7769
7775
|
function numKeys(data) {
|
|
@@ -7819,8 +7825,15 @@ var getParsedType = (data) => {
|
|
|
7819
7825
|
throw new Error(`Unknown data type: ${t}`);
|
|
7820
7826
|
}
|
|
7821
7827
|
};
|
|
7822
|
-
var propertyKeyTypes = new Set(["string", "number", "symbol"]);
|
|
7823
|
-
var primitiveTypes = new Set([
|
|
7828
|
+
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
7829
|
+
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
7830
|
+
"string",
|
|
7831
|
+
"number",
|
|
7832
|
+
"bigint",
|
|
7833
|
+
"boolean",
|
|
7834
|
+
"symbol",
|
|
7835
|
+
"undefined"
|
|
7836
|
+
]);
|
|
7824
7837
|
function escapeRegex(str) {
|
|
7825
7838
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
7826
7839
|
}
|
|
@@ -7989,6 +8002,9 @@ function safeExtend(schema, shape) {
|
|
|
7989
8002
|
return clone(schema, def);
|
|
7990
8003
|
}
|
|
7991
8004
|
function merge(a, b) {
|
|
8005
|
+
if (a._zod.def.checks?.length) {
|
|
8006
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
8007
|
+
}
|
|
7992
8008
|
const def = mergeDefs(a._zod.def, {
|
|
7993
8009
|
get shape() {
|
|
7994
8010
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -7998,7 +8014,7 @@ function merge(a, b) {
|
|
|
7998
8014
|
get catchall() {
|
|
7999
8015
|
return b._zod.def.catchall;
|
|
8000
8016
|
},
|
|
8001
|
-
checks: []
|
|
8017
|
+
checks: b._zod.def.checks ?? []
|
|
8002
8018
|
});
|
|
8003
8019
|
return clone(a, def);
|
|
8004
8020
|
}
|
|
@@ -8081,10 +8097,20 @@ function aborted(x, startIndex = 0) {
|
|
|
8081
8097
|
}
|
|
8082
8098
|
return false;
|
|
8083
8099
|
}
|
|
8100
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
8101
|
+
if (x.aborted === true)
|
|
8102
|
+
return true;
|
|
8103
|
+
for (let i = startIndex;i < x.issues.length; i++) {
|
|
8104
|
+
if (x.issues[i]?.continue === false) {
|
|
8105
|
+
return true;
|
|
8106
|
+
}
|
|
8107
|
+
}
|
|
8108
|
+
return false;
|
|
8109
|
+
}
|
|
8084
8110
|
function prefixIssues(path, issues) {
|
|
8085
8111
|
return issues.map((iss) => {
|
|
8086
|
-
var
|
|
8087
|
-
(
|
|
8112
|
+
var _a2;
|
|
8113
|
+
(_a2 = iss).path ?? (_a2.path = []);
|
|
8088
8114
|
iss.path.unshift(path);
|
|
8089
8115
|
return iss;
|
|
8090
8116
|
});
|
|
@@ -8093,17 +8119,14 @@ function unwrapMessage(message) {
|
|
|
8093
8119
|
return typeof message === "string" ? message : message?.message;
|
|
8094
8120
|
}
|
|
8095
8121
|
function finalizeIssue(iss, ctx, config2) {
|
|
8096
|
-
const
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
delete full.continue;
|
|
8103
|
-
if (!ctx?.reportInput) {
|
|
8104
|
-
delete full.input;
|
|
8122
|
+
const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
|
|
8123
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
8124
|
+
rest.path ?? (rest.path = []);
|
|
8125
|
+
rest.message = message;
|
|
8126
|
+
if (ctx?.reportInput) {
|
|
8127
|
+
rest.input = _input;
|
|
8105
8128
|
}
|
|
8106
|
-
return
|
|
8129
|
+
return rest;
|
|
8107
8130
|
}
|
|
8108
8131
|
function getSizableOrigin(input) {
|
|
8109
8132
|
if (input instanceof Set)
|
|
@@ -8235,30 +8258,33 @@ function flattenError(error, mapper = (issue2) => issue2.message) {
|
|
|
8235
8258
|
}
|
|
8236
8259
|
function formatError(error, mapper = (issue2) => issue2.message) {
|
|
8237
8260
|
const fieldErrors = { _errors: [] };
|
|
8238
|
-
const processError = (error2) => {
|
|
8261
|
+
const processError = (error2, path = []) => {
|
|
8239
8262
|
for (const issue2 of error2.issues) {
|
|
8240
8263
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
8241
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
8264
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
8242
8265
|
} else if (issue2.code === "invalid_key") {
|
|
8243
|
-
processError({ issues: issue2.issues });
|
|
8266
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
8244
8267
|
} else if (issue2.code === "invalid_element") {
|
|
8245
|
-
processError({ issues: issue2.issues });
|
|
8246
|
-
} else if (issue2.path.length === 0) {
|
|
8247
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
8268
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
8248
8269
|
} else {
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8270
|
+
const fullpath = [...path, ...issue2.path];
|
|
8271
|
+
if (fullpath.length === 0) {
|
|
8272
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
8273
|
+
} else {
|
|
8274
|
+
let curr = fieldErrors;
|
|
8275
|
+
let i = 0;
|
|
8276
|
+
while (i < fullpath.length) {
|
|
8277
|
+
const el = fullpath[i];
|
|
8278
|
+
const terminal = i === fullpath.length - 1;
|
|
8279
|
+
if (!terminal) {
|
|
8280
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
8281
|
+
} else {
|
|
8282
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
8283
|
+
curr[el]._errors.push(mapper(issue2));
|
|
8284
|
+
}
|
|
8285
|
+
curr = curr[el];
|
|
8286
|
+
i++;
|
|
8259
8287
|
}
|
|
8260
|
-
curr = curr[el];
|
|
8261
|
-
i++;
|
|
8262
8288
|
}
|
|
8263
8289
|
}
|
|
8264
8290
|
}
|
|
@@ -8269,14 +8295,14 @@ function formatError(error, mapper = (issue2) => issue2.message) {
|
|
|
8269
8295
|
function treeifyError(error, mapper = (issue2) => issue2.message) {
|
|
8270
8296
|
const result = { errors: [] };
|
|
8271
8297
|
const processError = (error2, path = []) => {
|
|
8272
|
-
var
|
|
8298
|
+
var _a2, _b;
|
|
8273
8299
|
for (const issue2 of error2.issues) {
|
|
8274
8300
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
8275
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
8301
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
8276
8302
|
} else if (issue2.code === "invalid_key") {
|
|
8277
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
8303
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
8278
8304
|
} else if (issue2.code === "invalid_element") {
|
|
8279
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
8305
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
8280
8306
|
} else {
|
|
8281
8307
|
const fullpath = [...path, ...issue2.path];
|
|
8282
8308
|
if (fullpath.length === 0) {
|
|
@@ -8290,7 +8316,7 @@ function treeifyError(error, mapper = (issue2) => issue2.message) {
|
|
|
8290
8316
|
const terminal = i === fullpath.length - 1;
|
|
8291
8317
|
if (typeof el === "string") {
|
|
8292
8318
|
curr.properties ?? (curr.properties = {});
|
|
8293
|
-
(
|
|
8319
|
+
(_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] });
|
|
8294
8320
|
curr = curr.properties[el];
|
|
8295
8321
|
} else {
|
|
8296
8322
|
curr.items ?? (curr.items = []);
|
|
@@ -8340,7 +8366,7 @@ function prettifyError(error) {
|
|
|
8340
8366
|
|
|
8341
8367
|
// node_modules/zod/v4/core/parse.js
|
|
8342
8368
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
8343
|
-
const ctx = _ctx ?
|
|
8369
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
8344
8370
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
8345
8371
|
if (result instanceof Promise) {
|
|
8346
8372
|
throw new $ZodAsyncError;
|
|
@@ -8354,7 +8380,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
8354
8380
|
};
|
|
8355
8381
|
var parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
8356
8382
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
8357
|
-
const ctx = _ctx ?
|
|
8383
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
8358
8384
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
8359
8385
|
if (result instanceof Promise)
|
|
8360
8386
|
result = await result;
|
|
@@ -8379,7 +8405,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
|
8379
8405
|
};
|
|
8380
8406
|
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
8381
8407
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
8382
|
-
const ctx = _ctx ?
|
|
8408
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
8383
8409
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
8384
8410
|
if (result instanceof Promise)
|
|
8385
8411
|
result = await result;
|
|
@@ -8390,7 +8416,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
8390
8416
|
};
|
|
8391
8417
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
8392
8418
|
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
8393
|
-
const ctx = _ctx ?
|
|
8419
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
8394
8420
|
return _parse(_Err)(schema, value, ctx);
|
|
8395
8421
|
};
|
|
8396
8422
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -8399,7 +8425,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
|
|
|
8399
8425
|
};
|
|
8400
8426
|
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
8401
8427
|
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
8402
|
-
const ctx = _ctx ?
|
|
8428
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
8403
8429
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
8404
8430
|
};
|
|
8405
8431
|
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -8408,7 +8434,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
8408
8434
|
};
|
|
8409
8435
|
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
8410
8436
|
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
8411
|
-
const ctx = _ctx ?
|
|
8437
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
8412
8438
|
return _safeParse(_Err)(schema, value, ctx);
|
|
8413
8439
|
};
|
|
8414
8440
|
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -8417,7 +8443,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
|
8417
8443
|
};
|
|
8418
8444
|
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
8419
8445
|
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
8420
|
-
const ctx = _ctx ?
|
|
8446
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
8421
8447
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
8422
8448
|
};
|
|
8423
8449
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -8465,6 +8491,7 @@ __export(exports_regexes, {
|
|
|
8465
8491
|
ipv4: () => ipv4,
|
|
8466
8492
|
integer: () => integer,
|
|
8467
8493
|
idnEmail: () => idnEmail,
|
|
8494
|
+
httpProtocol: () => httpProtocol,
|
|
8468
8495
|
html5Email: () => html5Email,
|
|
8469
8496
|
hostname: () => hostname,
|
|
8470
8497
|
hex: () => hex,
|
|
@@ -8487,7 +8514,7 @@ __export(exports_regexes, {
|
|
|
8487
8514
|
base64url: () => base64url,
|
|
8488
8515
|
base64: () => base64
|
|
8489
8516
|
});
|
|
8490
|
-
var cuid = /^[cC][
|
|
8517
|
+
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
8491
8518
|
var cuid2 = /^[0-9a-z]+$/;
|
|
8492
8519
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
8493
8520
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -8526,6 +8553,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
|
|
|
8526
8553
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
8527
8554
|
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])?)*\.?$/;
|
|
8528
8555
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
8556
|
+
var httpProtocol = /^https?$/;
|
|
8529
8557
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
8530
8558
|
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])))`;
|
|
8531
8559
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -8584,10 +8612,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
8584
8612
|
|
|
8585
8613
|
// node_modules/zod/v4/core/checks.js
|
|
8586
8614
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
8587
|
-
var
|
|
8615
|
+
var _a2;
|
|
8588
8616
|
inst._zod ?? (inst._zod = {});
|
|
8589
8617
|
inst._zod.def = def;
|
|
8590
|
-
(
|
|
8618
|
+
(_a2 = inst._zod).onattach ?? (_a2.onattach = []);
|
|
8591
8619
|
});
|
|
8592
8620
|
var numericOriginMap = {
|
|
8593
8621
|
number: "number",
|
|
@@ -8653,8 +8681,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
8653
8681
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
8654
8682
|
$ZodCheck.init(inst, def);
|
|
8655
8683
|
inst._zod.onattach.push((inst2) => {
|
|
8656
|
-
var
|
|
8657
|
-
(
|
|
8684
|
+
var _a2;
|
|
8685
|
+
(_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
|
|
8658
8686
|
});
|
|
8659
8687
|
inst._zod.check = (payload) => {
|
|
8660
8688
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -8787,9 +8815,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
8787
8815
|
};
|
|
8788
8816
|
});
|
|
8789
8817
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
8790
|
-
var
|
|
8818
|
+
var _a2;
|
|
8791
8819
|
$ZodCheck.init(inst, def);
|
|
8792
|
-
(
|
|
8820
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
8793
8821
|
const val = payload.value;
|
|
8794
8822
|
return !nullish(val) && val.size !== undefined;
|
|
8795
8823
|
});
|
|
@@ -8815,9 +8843,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
8815
8843
|
};
|
|
8816
8844
|
});
|
|
8817
8845
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
8818
|
-
var
|
|
8846
|
+
var _a2;
|
|
8819
8847
|
$ZodCheck.init(inst, def);
|
|
8820
|
-
(
|
|
8848
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
8821
8849
|
const val = payload.value;
|
|
8822
8850
|
return !nullish(val) && val.size !== undefined;
|
|
8823
8851
|
});
|
|
@@ -8843,9 +8871,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
8843
8871
|
};
|
|
8844
8872
|
});
|
|
8845
8873
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
8846
|
-
var
|
|
8874
|
+
var _a2;
|
|
8847
8875
|
$ZodCheck.init(inst, def);
|
|
8848
|
-
(
|
|
8876
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
8849
8877
|
const val = payload.value;
|
|
8850
8878
|
return !nullish(val) && val.size !== undefined;
|
|
8851
8879
|
});
|
|
@@ -8873,9 +8901,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
8873
8901
|
};
|
|
8874
8902
|
});
|
|
8875
8903
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
8876
|
-
var
|
|
8904
|
+
var _a2;
|
|
8877
8905
|
$ZodCheck.init(inst, def);
|
|
8878
|
-
(
|
|
8906
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
8879
8907
|
const val = payload.value;
|
|
8880
8908
|
return !nullish(val) && val.length !== undefined;
|
|
8881
8909
|
});
|
|
@@ -8902,9 +8930,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
8902
8930
|
};
|
|
8903
8931
|
});
|
|
8904
8932
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
8905
|
-
var
|
|
8933
|
+
var _a2;
|
|
8906
8934
|
$ZodCheck.init(inst, def);
|
|
8907
|
-
(
|
|
8935
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
8908
8936
|
const val = payload.value;
|
|
8909
8937
|
return !nullish(val) && val.length !== undefined;
|
|
8910
8938
|
});
|
|
@@ -8931,9 +8959,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
8931
8959
|
};
|
|
8932
8960
|
});
|
|
8933
8961
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
8934
|
-
var
|
|
8962
|
+
var _a2;
|
|
8935
8963
|
$ZodCheck.init(inst, def);
|
|
8936
|
-
(
|
|
8964
|
+
(_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
|
|
8937
8965
|
const val = payload.value;
|
|
8938
8966
|
return !nullish(val) && val.length !== undefined;
|
|
8939
8967
|
});
|
|
@@ -8962,7 +8990,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
8962
8990
|
};
|
|
8963
8991
|
});
|
|
8964
8992
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
8965
|
-
var
|
|
8993
|
+
var _a2, _b;
|
|
8966
8994
|
$ZodCheck.init(inst, def);
|
|
8967
8995
|
inst._zod.onattach.push((inst2) => {
|
|
8968
8996
|
const bag = inst2._zod.bag;
|
|
@@ -8973,7 +9001,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
8973
9001
|
}
|
|
8974
9002
|
});
|
|
8975
9003
|
if (def.pattern)
|
|
8976
|
-
(
|
|
9004
|
+
(_a2 = inst._zod).check ?? (_a2.check = (payload) => {
|
|
8977
9005
|
def.pattern.lastIndex = 0;
|
|
8978
9006
|
if (def.pattern.test(payload.value))
|
|
8979
9007
|
return;
|
|
@@ -9170,13 +9198,13 @@ class Doc {
|
|
|
9170
9198
|
// node_modules/zod/v4/core/versions.js
|
|
9171
9199
|
var version = {
|
|
9172
9200
|
major: 4,
|
|
9173
|
-
minor:
|
|
9174
|
-
patch:
|
|
9201
|
+
minor: 4,
|
|
9202
|
+
patch: 3
|
|
9175
9203
|
};
|
|
9176
9204
|
|
|
9177
9205
|
// node_modules/zod/v4/core/schemas.js
|
|
9178
9206
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
9179
|
-
var
|
|
9207
|
+
var _a2;
|
|
9180
9208
|
inst ?? (inst = {});
|
|
9181
9209
|
inst._zod.def = def;
|
|
9182
9210
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -9191,7 +9219,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
9191
9219
|
}
|
|
9192
9220
|
}
|
|
9193
9221
|
if (checks.length === 0) {
|
|
9194
|
-
(
|
|
9222
|
+
(_a2 = inst._zod).deferred ?? (_a2.deferred = []);
|
|
9195
9223
|
inst._zod.deferred?.push(() => {
|
|
9196
9224
|
inst._zod.run = inst._zod.parse;
|
|
9197
9225
|
});
|
|
@@ -9201,6 +9229,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
9201
9229
|
let asyncResult;
|
|
9202
9230
|
for (const ch of checks2) {
|
|
9203
9231
|
if (ch._zod.def.when) {
|
|
9232
|
+
if (explicitlyAborted(payload))
|
|
9233
|
+
continue;
|
|
9204
9234
|
const shouldRun = ch._zod.def.when(payload);
|
|
9205
9235
|
if (!shouldRun)
|
|
9206
9236
|
continue;
|
|
@@ -9340,6 +9370,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
9340
9370
|
inst._zod.check = (payload) => {
|
|
9341
9371
|
try {
|
|
9342
9372
|
const trimmed = payload.value.trim();
|
|
9373
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
9374
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
9375
|
+
payload.issues.push({
|
|
9376
|
+
code: "invalid_format",
|
|
9377
|
+
format: "url",
|
|
9378
|
+
note: "Invalid URL format",
|
|
9379
|
+
input: payload.value,
|
|
9380
|
+
inst,
|
|
9381
|
+
continue: !def.abort
|
|
9382
|
+
});
|
|
9383
|
+
return;
|
|
9384
|
+
}
|
|
9385
|
+
}
|
|
9343
9386
|
const url = new URL(trimmed);
|
|
9344
9387
|
if (def.hostname) {
|
|
9345
9388
|
def.hostname.lastIndex = 0;
|
|
@@ -9493,6 +9536,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
|
9493
9536
|
function isValidBase64(data) {
|
|
9494
9537
|
if (data === "")
|
|
9495
9538
|
return true;
|
|
9539
|
+
if (/\s/.test(data))
|
|
9540
|
+
return false;
|
|
9496
9541
|
if (data.length % 4 !== 0)
|
|
9497
9542
|
return false;
|
|
9498
9543
|
try {
|
|
@@ -9682,8 +9727,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
|
|
|
9682
9727
|
$ZodType.init(inst, def);
|
|
9683
9728
|
inst._zod.pattern = _undefined;
|
|
9684
9729
|
inst._zod.values = new Set([undefined]);
|
|
9685
|
-
inst._zod.optin = "optional";
|
|
9686
|
-
inst._zod.optout = "optional";
|
|
9687
9730
|
inst._zod.parse = (payload, _ctx) => {
|
|
9688
9731
|
const input = payload.value;
|
|
9689
9732
|
if (typeof input === "undefined")
|
|
@@ -9811,15 +9854,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
9811
9854
|
return payload;
|
|
9812
9855
|
};
|
|
9813
9856
|
});
|
|
9814
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
9857
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
9858
|
+
const isPresent = key in input;
|
|
9815
9859
|
if (result.issues.length) {
|
|
9816
|
-
if (isOptionalOut && !
|
|
9860
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
9817
9861
|
return;
|
|
9818
9862
|
}
|
|
9819
9863
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
9820
9864
|
}
|
|
9865
|
+
if (!isPresent && !isOptionalIn) {
|
|
9866
|
+
if (!result.issues.length) {
|
|
9867
|
+
final.issues.push({
|
|
9868
|
+
code: "invalid_type",
|
|
9869
|
+
expected: "nonoptional",
|
|
9870
|
+
input: undefined,
|
|
9871
|
+
path: [key]
|
|
9872
|
+
});
|
|
9873
|
+
}
|
|
9874
|
+
return;
|
|
9875
|
+
}
|
|
9821
9876
|
if (result.value === undefined) {
|
|
9822
|
-
if (
|
|
9877
|
+
if (isPresent) {
|
|
9823
9878
|
final.value[key] = undefined;
|
|
9824
9879
|
}
|
|
9825
9880
|
} else {
|
|
@@ -9847,8 +9902,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
9847
9902
|
const keySet = def.keySet;
|
|
9848
9903
|
const _catchall = def.catchall._zod;
|
|
9849
9904
|
const t = _catchall.def.type;
|
|
9905
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
9850
9906
|
const isOptionalOut = _catchall.optout === "optional";
|
|
9851
9907
|
for (const key in input) {
|
|
9908
|
+
if (key === "__proto__")
|
|
9909
|
+
continue;
|
|
9852
9910
|
if (keySet.has(key))
|
|
9853
9911
|
continue;
|
|
9854
9912
|
if (t === "never") {
|
|
@@ -9857,9 +9915,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
9857
9915
|
}
|
|
9858
9916
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
9859
9917
|
if (r instanceof Promise) {
|
|
9860
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
9918
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
9861
9919
|
} else {
|
|
9862
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
9920
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
9863
9921
|
}
|
|
9864
9922
|
}
|
|
9865
9923
|
if (unrecognized.length) {
|
|
@@ -9925,12 +9983,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
9925
9983
|
const shape = value.shape;
|
|
9926
9984
|
for (const key of value.keys) {
|
|
9927
9985
|
const el = shape[key];
|
|
9986
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
9928
9987
|
const isOptionalOut = el._zod.optout === "optional";
|
|
9929
9988
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
9930
9989
|
if (r instanceof Promise) {
|
|
9931
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
9990
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
9932
9991
|
} else {
|
|
9933
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
9992
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
9934
9993
|
}
|
|
9935
9994
|
}
|
|
9936
9995
|
if (!catchall) {
|
|
@@ -9961,9 +10020,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
9961
10020
|
const id = ids[key];
|
|
9962
10021
|
const k = esc(key);
|
|
9963
10022
|
const schema = shape[key];
|
|
10023
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
9964
10024
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
9965
10025
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
9966
|
-
if (isOptionalOut) {
|
|
10026
|
+
if (isOptionalIn && isOptionalOut) {
|
|
9967
10027
|
doc.write(`
|
|
9968
10028
|
if (${id}.issues.length) {
|
|
9969
10029
|
if (${k} in input) {
|
|
@@ -9982,6 +10042,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
9982
10042
|
newResult[${k}] = ${id}.value;
|
|
9983
10043
|
}
|
|
9984
10044
|
|
|
10045
|
+
`);
|
|
10046
|
+
} else if (!isOptionalIn) {
|
|
10047
|
+
doc.write(`
|
|
10048
|
+
const ${id}_present = ${k} in input;
|
|
10049
|
+
if (${id}.issues.length) {
|
|
10050
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
10051
|
+
...iss,
|
|
10052
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
10053
|
+
})));
|
|
10054
|
+
}
|
|
10055
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
10056
|
+
payload.issues.push({
|
|
10057
|
+
code: "invalid_type",
|
|
10058
|
+
expected: "nonoptional",
|
|
10059
|
+
input: undefined,
|
|
10060
|
+
path: [${k}]
|
|
10061
|
+
});
|
|
10062
|
+
}
|
|
10063
|
+
|
|
10064
|
+
if (${id}_present) {
|
|
10065
|
+
if (${id}.value === undefined) {
|
|
10066
|
+
newResult[${k}] = undefined;
|
|
10067
|
+
} else {
|
|
10068
|
+
newResult[${k}] = ${id}.value;
|
|
10069
|
+
}
|
|
10070
|
+
}
|
|
10071
|
+
|
|
9985
10072
|
`);
|
|
9986
10073
|
} else {
|
|
9987
10074
|
doc.write(`
|
|
@@ -10075,10 +10162,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
10075
10162
|
}
|
|
10076
10163
|
return;
|
|
10077
10164
|
});
|
|
10078
|
-
const
|
|
10079
|
-
const first = def.options[0]._zod.run;
|
|
10165
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
10080
10166
|
inst._zod.parse = (payload, ctx) => {
|
|
10081
|
-
if (
|
|
10167
|
+
if (first) {
|
|
10082
10168
|
return first(payload, ctx);
|
|
10083
10169
|
}
|
|
10084
10170
|
let async = false;
|
|
@@ -10131,10 +10217,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
|
|
|
10131
10217
|
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
10132
10218
|
$ZodUnion.init(inst, def);
|
|
10133
10219
|
def.inclusive = false;
|
|
10134
|
-
const
|
|
10135
|
-
const first = def.options[0]._zod.run;
|
|
10220
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
10136
10221
|
inst._zod.parse = (payload, ctx) => {
|
|
10137
|
-
if (
|
|
10222
|
+
if (first) {
|
|
10138
10223
|
return first(payload, ctx);
|
|
10139
10224
|
}
|
|
10140
10225
|
let async = false;
|
|
@@ -10209,7 +10294,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
10209
10294
|
if (opt) {
|
|
10210
10295
|
return opt._zod.run(payload, ctx);
|
|
10211
10296
|
}
|
|
10212
|
-
if (def.unionFallback) {
|
|
10297
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
10213
10298
|
return _super(payload, ctx);
|
|
10214
10299
|
}
|
|
10215
10300
|
payload.issues.push({
|
|
@@ -10217,6 +10302,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
10217
10302
|
errors: [],
|
|
10218
10303
|
note: "No matching discriminator",
|
|
10219
10304
|
discriminator: def.discriminator,
|
|
10305
|
+
options: Array.from(disc.value.keys()),
|
|
10220
10306
|
input,
|
|
10221
10307
|
path: [def.discriminator],
|
|
10222
10308
|
inst
|
|
@@ -10338,64 +10424,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
10338
10424
|
}
|
|
10339
10425
|
payload.value = [];
|
|
10340
10426
|
const proms = [];
|
|
10341
|
-
const
|
|
10342
|
-
const
|
|
10427
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
10428
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
10343
10429
|
if (!def.rest) {
|
|
10344
|
-
|
|
10345
|
-
const tooSmall = input.length < optStart - 1;
|
|
10346
|
-
if (tooBig || tooSmall) {
|
|
10430
|
+
if (input.length < optinStart) {
|
|
10347
10431
|
payload.issues.push({
|
|
10348
|
-
|
|
10432
|
+
code: "too_small",
|
|
10433
|
+
minimum: optinStart,
|
|
10434
|
+
inclusive: true,
|
|
10349
10435
|
input,
|
|
10350
10436
|
inst,
|
|
10351
10437
|
origin: "array"
|
|
10352
10438
|
});
|
|
10353
10439
|
return payload;
|
|
10354
10440
|
}
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10441
|
+
if (input.length > items.length) {
|
|
10442
|
+
payload.issues.push({
|
|
10443
|
+
code: "too_big",
|
|
10444
|
+
maximum: items.length,
|
|
10445
|
+
inclusive: true,
|
|
10446
|
+
input,
|
|
10447
|
+
inst,
|
|
10448
|
+
origin: "array"
|
|
10449
|
+
});
|
|
10362
10450
|
}
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
}, ctx);
|
|
10367
|
-
if (
|
|
10368
|
-
proms.push(
|
|
10451
|
+
}
|
|
10452
|
+
const itemResults = new Array(items.length);
|
|
10453
|
+
for (let i = 0;i < items.length; i++) {
|
|
10454
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
10455
|
+
if (r instanceof Promise) {
|
|
10456
|
+
proms.push(r.then((rr) => {
|
|
10457
|
+
itemResults[i] = rr;
|
|
10458
|
+
}));
|
|
10369
10459
|
} else {
|
|
10370
|
-
|
|
10460
|
+
itemResults[i] = r;
|
|
10371
10461
|
}
|
|
10372
10462
|
}
|
|
10373
10463
|
if (def.rest) {
|
|
10464
|
+
let i = items.length - 1;
|
|
10374
10465
|
const rest = input.slice(items.length);
|
|
10375
10466
|
for (const el of rest) {
|
|
10376
10467
|
i++;
|
|
10377
|
-
const result = def.rest._zod.run({
|
|
10378
|
-
value: el,
|
|
10379
|
-
issues: []
|
|
10380
|
-
}, ctx);
|
|
10468
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
10381
10469
|
if (result instanceof Promise) {
|
|
10382
|
-
proms.push(result.then((
|
|
10470
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
10383
10471
|
} else {
|
|
10384
10472
|
handleTupleResult(result, payload, i);
|
|
10385
10473
|
}
|
|
10386
10474
|
}
|
|
10387
10475
|
}
|
|
10388
|
-
if (proms.length)
|
|
10389
|
-
return Promise.all(proms).then(() => payload);
|
|
10390
|
-
|
|
10476
|
+
if (proms.length) {
|
|
10477
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
10478
|
+
}
|
|
10479
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
10391
10480
|
};
|
|
10392
10481
|
});
|
|
10482
|
+
function getTupleOptStart(items, key) {
|
|
10483
|
+
for (let i = items.length - 1;i >= 0; i--) {
|
|
10484
|
+
if (items[i]._zod[key] !== "optional")
|
|
10485
|
+
return i + 1;
|
|
10486
|
+
}
|
|
10487
|
+
return 0;
|
|
10488
|
+
}
|
|
10393
10489
|
function handleTupleResult(result, final, index) {
|
|
10394
10490
|
if (result.issues.length) {
|
|
10395
10491
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
10396
10492
|
}
|
|
10397
10493
|
final.value[index] = result.value;
|
|
10398
10494
|
}
|
|
10495
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
10496
|
+
for (let i = 0;i < items.length; i++) {
|
|
10497
|
+
const r = itemResults[i];
|
|
10498
|
+
const isPresent = i < input.length;
|
|
10499
|
+
if (r.issues.length) {
|
|
10500
|
+
if (!isPresent && i >= optoutStart) {
|
|
10501
|
+
final.value.length = i;
|
|
10502
|
+
break;
|
|
10503
|
+
}
|
|
10504
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
10505
|
+
}
|
|
10506
|
+
final.value[i] = r.value;
|
|
10507
|
+
}
|
|
10508
|
+
for (let i = final.value.length - 1;i >= input.length; i--) {
|
|
10509
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === undefined) {
|
|
10510
|
+
final.value.length = i;
|
|
10511
|
+
} else {
|
|
10512
|
+
break;
|
|
10513
|
+
}
|
|
10514
|
+
}
|
|
10515
|
+
return final;
|
|
10516
|
+
}
|
|
10399
10517
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
10400
10518
|
$ZodType.init(inst, def);
|
|
10401
10519
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -10417,19 +10535,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
10417
10535
|
for (const key of values) {
|
|
10418
10536
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
10419
10537
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
10538
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
10539
|
+
if (keyResult instanceof Promise) {
|
|
10540
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
10541
|
+
}
|
|
10542
|
+
if (keyResult.issues.length) {
|
|
10543
|
+
payload.issues.push({
|
|
10544
|
+
code: "invalid_key",
|
|
10545
|
+
origin: "record",
|
|
10546
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
10547
|
+
input: key,
|
|
10548
|
+
path: [key],
|
|
10549
|
+
inst
|
|
10550
|
+
});
|
|
10551
|
+
continue;
|
|
10552
|
+
}
|
|
10553
|
+
const outKey = keyResult.value;
|
|
10420
10554
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
10421
10555
|
if (result instanceof Promise) {
|
|
10422
10556
|
proms.push(result.then((result2) => {
|
|
10423
10557
|
if (result2.issues.length) {
|
|
10424
10558
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
10425
10559
|
}
|
|
10426
|
-
payload.value[
|
|
10560
|
+
payload.value[outKey] = result2.value;
|
|
10427
10561
|
}));
|
|
10428
10562
|
} else {
|
|
10429
10563
|
if (result.issues.length) {
|
|
10430
10564
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
10431
10565
|
}
|
|
10432
|
-
payload.value[
|
|
10566
|
+
payload.value[outKey] = result.value;
|
|
10433
10567
|
}
|
|
10434
10568
|
}
|
|
10435
10569
|
}
|
|
@@ -10453,6 +10587,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
10453
10587
|
for (const key of Reflect.ownKeys(input)) {
|
|
10454
10588
|
if (key === "__proto__")
|
|
10455
10589
|
continue;
|
|
10590
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
10591
|
+
continue;
|
|
10456
10592
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
10457
10593
|
if (keyResult instanceof Promise) {
|
|
10458
10594
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -10657,6 +10793,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
|
|
|
10657
10793
|
});
|
|
10658
10794
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
10659
10795
|
$ZodType.init(inst, def);
|
|
10796
|
+
inst._zod.optin = "optional";
|
|
10660
10797
|
inst._zod.parse = (payload, ctx) => {
|
|
10661
10798
|
if (ctx.direction === "backward") {
|
|
10662
10799
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -10666,6 +10803,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
10666
10803
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
10667
10804
|
return output.then((output2) => {
|
|
10668
10805
|
payload.value = output2;
|
|
10806
|
+
payload.fallback = true;
|
|
10669
10807
|
return payload;
|
|
10670
10808
|
});
|
|
10671
10809
|
}
|
|
@@ -10673,11 +10811,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
10673
10811
|
throw new $ZodAsyncError;
|
|
10674
10812
|
}
|
|
10675
10813
|
payload.value = _out;
|
|
10814
|
+
payload.fallback = true;
|
|
10676
10815
|
return payload;
|
|
10677
10816
|
};
|
|
10678
10817
|
});
|
|
10679
10818
|
function handleOptionalResult(result, input) {
|
|
10680
|
-
if (result.issues.length
|
|
10819
|
+
if (input === undefined && (result.issues.length || result.fallback)) {
|
|
10681
10820
|
return { issues: [], value: undefined };
|
|
10682
10821
|
}
|
|
10683
10822
|
return result;
|
|
@@ -10695,10 +10834,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
|
10695
10834
|
});
|
|
10696
10835
|
inst._zod.parse = (payload, ctx) => {
|
|
10697
10836
|
if (def.innerType._zod.optin === "optional") {
|
|
10837
|
+
const input = payload.value;
|
|
10698
10838
|
const result = def.innerType._zod.run(payload, ctx);
|
|
10699
10839
|
if (result instanceof Promise)
|
|
10700
|
-
return result.then((r) => handleOptionalResult(r,
|
|
10701
|
-
return handleOptionalResult(result,
|
|
10840
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
10841
|
+
return handleOptionalResult(result, input);
|
|
10702
10842
|
}
|
|
10703
10843
|
if (payload.value === undefined) {
|
|
10704
10844
|
return payload;
|
|
@@ -10814,7 +10954,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
|
10814
10954
|
});
|
|
10815
10955
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
10816
10956
|
$ZodType.init(inst, def);
|
|
10817
|
-
|
|
10957
|
+
inst._zod.optin = "optional";
|
|
10818
10958
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
10819
10959
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
10820
10960
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -10834,6 +10974,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
10834
10974
|
input: payload.value
|
|
10835
10975
|
});
|
|
10836
10976
|
payload.issues = [];
|
|
10977
|
+
payload.fallback = true;
|
|
10837
10978
|
}
|
|
10838
10979
|
return payload;
|
|
10839
10980
|
});
|
|
@@ -10848,6 +10989,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
10848
10989
|
input: payload.value
|
|
10849
10990
|
});
|
|
10850
10991
|
payload.issues = [];
|
|
10992
|
+
payload.fallback = true;
|
|
10851
10993
|
}
|
|
10852
10994
|
return payload;
|
|
10853
10995
|
};
|
|
@@ -10893,7 +11035,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
10893
11035
|
left.aborted = true;
|
|
10894
11036
|
return left;
|
|
10895
11037
|
}
|
|
10896
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
11038
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
10897
11039
|
}
|
|
10898
11040
|
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
10899
11041
|
$ZodType.init(inst, def);
|
|
@@ -10945,6 +11087,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
|
|
|
10945
11087
|
}
|
|
10946
11088
|
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
10947
11089
|
}
|
|
11090
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
11091
|
+
$ZodPipe.init(inst, def);
|
|
11092
|
+
});
|
|
10948
11093
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
10949
11094
|
$ZodType.init(inst, def);
|
|
10950
11095
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -11096,7 +11241,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
|
|
|
11096
11241
|
});
|
|
11097
11242
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
11098
11243
|
$ZodType.init(inst, def);
|
|
11099
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
11244
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
11245
|
+
const d = def;
|
|
11246
|
+
if (!d._cachedInner)
|
|
11247
|
+
d._cachedInner = def.getter();
|
|
11248
|
+
return d._cachedInner;
|
|
11249
|
+
});
|
|
11100
11250
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
11101
11251
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
11102
11252
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? undefined);
|
|
@@ -11153,6 +11303,7 @@ __export(exports_locales, {
|
|
|
11153
11303
|
sv: () => sv_default,
|
|
11154
11304
|
sl: () => sl_default,
|
|
11155
11305
|
ru: () => ru_default,
|
|
11306
|
+
ro: () => ro_default,
|
|
11156
11307
|
pt: () => pt_default,
|
|
11157
11308
|
ps: () => ps_default,
|
|
11158
11309
|
pl: () => pl_default,
|
|
@@ -11172,6 +11323,7 @@ __export(exports_locales, {
|
|
|
11172
11323
|
id: () => id_default,
|
|
11173
11324
|
hy: () => hy_default,
|
|
11174
11325
|
hu: () => hu_default,
|
|
11326
|
+
hr: () => hr_default,
|
|
11175
11327
|
he: () => he_default,
|
|
11176
11328
|
frCA: () => fr_CA_default,
|
|
11177
11329
|
fr: () => fr_default,
|
|
@@ -11180,6 +11332,7 @@ __export(exports_locales, {
|
|
|
11180
11332
|
es: () => es_default,
|
|
11181
11333
|
eo: () => eo_default,
|
|
11182
11334
|
en: () => en_default,
|
|
11335
|
+
el: () => el_default,
|
|
11183
11336
|
de: () => de_default,
|
|
11184
11337
|
da: () => da_default,
|
|
11185
11338
|
cs: () => cs_default,
|
|
@@ -12118,8 +12271,117 @@ function de_default() {
|
|
|
12118
12271
|
localeError: error8()
|
|
12119
12272
|
};
|
|
12120
12273
|
}
|
|
12121
|
-
// node_modules/zod/v4/locales/
|
|
12274
|
+
// node_modules/zod/v4/locales/el.js
|
|
12122
12275
|
var error9 = () => {
|
|
12276
|
+
const Sizable = {
|
|
12277
|
+
string: { unit: "χαρακτήρες", verb: "να έχει" },
|
|
12278
|
+
file: { unit: "bytes", verb: "να έχει" },
|
|
12279
|
+
array: { unit: "στοιχεία", verb: "να έχει" },
|
|
12280
|
+
set: { unit: "στοιχεία", verb: "να έχει" },
|
|
12281
|
+
map: { unit: "καταχωρήσεις", verb: "να έχει" }
|
|
12282
|
+
};
|
|
12283
|
+
function getSizing(origin) {
|
|
12284
|
+
return Sizable[origin] ?? null;
|
|
12285
|
+
}
|
|
12286
|
+
const FormatDictionary = {
|
|
12287
|
+
regex: "είσοδος",
|
|
12288
|
+
email: "διεύθυνση email",
|
|
12289
|
+
url: "URL",
|
|
12290
|
+
emoji: "emoji",
|
|
12291
|
+
uuid: "UUID",
|
|
12292
|
+
uuidv4: "UUIDv4",
|
|
12293
|
+
uuidv6: "UUIDv6",
|
|
12294
|
+
nanoid: "nanoid",
|
|
12295
|
+
guid: "GUID",
|
|
12296
|
+
cuid: "cuid",
|
|
12297
|
+
cuid2: "cuid2",
|
|
12298
|
+
ulid: "ULID",
|
|
12299
|
+
xid: "XID",
|
|
12300
|
+
ksuid: "KSUID",
|
|
12301
|
+
datetime: "ISO ημερομηνία και ώρα",
|
|
12302
|
+
date: "ISO ημερομηνία",
|
|
12303
|
+
time: "ISO ώρα",
|
|
12304
|
+
duration: "ISO διάρκεια",
|
|
12305
|
+
ipv4: "διεύθυνση IPv4",
|
|
12306
|
+
ipv6: "διεύθυνση IPv6",
|
|
12307
|
+
mac: "διεύθυνση MAC",
|
|
12308
|
+
cidrv4: "εύρος IPv4",
|
|
12309
|
+
cidrv6: "εύρος IPv6",
|
|
12310
|
+
base64: "συμβολοσειρά κωδικοποιημένη σε base64",
|
|
12311
|
+
base64url: "συμβολοσειρά κωδικοποιημένη σε base64url",
|
|
12312
|
+
json_string: "συμβολοσειρά JSON",
|
|
12313
|
+
e164: "αριθμός E.164",
|
|
12314
|
+
jwt: "JWT",
|
|
12315
|
+
template_literal: "είσοδος"
|
|
12316
|
+
};
|
|
12317
|
+
const TypeDictionary = {
|
|
12318
|
+
nan: "NaN"
|
|
12319
|
+
};
|
|
12320
|
+
return (issue2) => {
|
|
12321
|
+
switch (issue2.code) {
|
|
12322
|
+
case "invalid_type": {
|
|
12323
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
12324
|
+
const receivedType = parsedType(issue2.input);
|
|
12325
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
12326
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
12327
|
+
return `Μη έγκυρη είσοδος: αναμενόταν instanceof ${issue2.expected}, λήφθηκε ${received}`;
|
|
12328
|
+
}
|
|
12329
|
+
return `Μη έγκυρη είσοδος: αναμενόταν ${expected}, λήφθηκε ${received}`;
|
|
12330
|
+
}
|
|
12331
|
+
case "invalid_value":
|
|
12332
|
+
if (issue2.values.length === 1)
|
|
12333
|
+
return `Μη έγκυρη είσοδος: αναμενόταν ${stringifyPrimitive(issue2.values[0])}`;
|
|
12334
|
+
return `Μη έγκυρη επιλογή: αναμενόταν ένα από ${joinValues(issue2.values, "|")}`;
|
|
12335
|
+
case "too_big": {
|
|
12336
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
12337
|
+
const sizing = getSizing(issue2.origin);
|
|
12338
|
+
if (sizing)
|
|
12339
|
+
return `Πολύ μεγάλο: αναμενόταν ${issue2.origin ?? "τιμή"} να έχει ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "στοιχεία"}`;
|
|
12340
|
+
return `Πολύ μεγάλο: αναμενόταν ${issue2.origin ?? "τιμή"} να είναι ${adj}${issue2.maximum.toString()}`;
|
|
12341
|
+
}
|
|
12342
|
+
case "too_small": {
|
|
12343
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
12344
|
+
const sizing = getSizing(issue2.origin);
|
|
12345
|
+
if (sizing) {
|
|
12346
|
+
return `Πολύ μικρό: αναμενόταν ${issue2.origin} να έχει ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
12347
|
+
}
|
|
12348
|
+
return `Πολύ μικρό: αναμενόταν ${issue2.origin} να είναι ${adj}${issue2.minimum.toString()}`;
|
|
12349
|
+
}
|
|
12350
|
+
case "invalid_format": {
|
|
12351
|
+
const _issue = issue2;
|
|
12352
|
+
if (_issue.format === "starts_with") {
|
|
12353
|
+
return `Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${_issue.prefix}"`;
|
|
12354
|
+
}
|
|
12355
|
+
if (_issue.format === "ends_with")
|
|
12356
|
+
return `Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${_issue.suffix}"`;
|
|
12357
|
+
if (_issue.format === "includes")
|
|
12358
|
+
return `Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${_issue.includes}"`;
|
|
12359
|
+
if (_issue.format === "regex")
|
|
12360
|
+
return `Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${_issue.pattern}`;
|
|
12361
|
+
return `Μη έγκυρο: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
12362
|
+
}
|
|
12363
|
+
case "not_multiple_of":
|
|
12364
|
+
return `Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${issue2.divisor}`;
|
|
12365
|
+
case "unrecognized_keys":
|
|
12366
|
+
return `Άγνωστ${issue2.keys.length > 1 ? "α" : "ο"} κλειδ${issue2.keys.length > 1 ? "ιά" : "ί"}: ${joinValues(issue2.keys, ", ")}`;
|
|
12367
|
+
case "invalid_key":
|
|
12368
|
+
return `Μη έγκυρο κλειδί στο ${issue2.origin}`;
|
|
12369
|
+
case "invalid_union":
|
|
12370
|
+
return "Μη έγκυρη είσοδος";
|
|
12371
|
+
case "invalid_element":
|
|
12372
|
+
return `Μη έγκυρη τιμή στο ${issue2.origin}`;
|
|
12373
|
+
default:
|
|
12374
|
+
return `Μη έγκυρη είσοδος`;
|
|
12375
|
+
}
|
|
12376
|
+
};
|
|
12377
|
+
};
|
|
12378
|
+
function el_default() {
|
|
12379
|
+
return {
|
|
12380
|
+
localeError: error9()
|
|
12381
|
+
};
|
|
12382
|
+
}
|
|
12383
|
+
// node_modules/zod/v4/locales/en.js
|
|
12384
|
+
var error10 = () => {
|
|
12123
12385
|
const Sizable = {
|
|
12124
12386
|
string: { unit: "characters", verb: "to have" },
|
|
12125
12387
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -12211,6 +12473,10 @@ var error9 = () => {
|
|
|
12211
12473
|
case "invalid_key":
|
|
12212
12474
|
return `Invalid key in ${issue2.origin}`;
|
|
12213
12475
|
case "invalid_union":
|
|
12476
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
12477
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
12478
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
12479
|
+
}
|
|
12214
12480
|
return "Invalid input";
|
|
12215
12481
|
case "invalid_element":
|
|
12216
12482
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -12221,11 +12487,11 @@ var error9 = () => {
|
|
|
12221
12487
|
};
|
|
12222
12488
|
function en_default() {
|
|
12223
12489
|
return {
|
|
12224
|
-
localeError:
|
|
12490
|
+
localeError: error10()
|
|
12225
12491
|
};
|
|
12226
12492
|
}
|
|
12227
12493
|
// node_modules/zod/v4/locales/eo.js
|
|
12228
|
-
var
|
|
12494
|
+
var error11 = () => {
|
|
12229
12495
|
const Sizable = {
|
|
12230
12496
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
12231
12497
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -12330,11 +12596,11 @@ var error10 = () => {
|
|
|
12330
12596
|
};
|
|
12331
12597
|
function eo_default() {
|
|
12332
12598
|
return {
|
|
12333
|
-
localeError:
|
|
12599
|
+
localeError: error11()
|
|
12334
12600
|
};
|
|
12335
12601
|
}
|
|
12336
12602
|
// node_modules/zod/v4/locales/es.js
|
|
12337
|
-
var
|
|
12603
|
+
var error12 = () => {
|
|
12338
12604
|
const Sizable = {
|
|
12339
12605
|
string: { unit: "caracteres", verb: "tener" },
|
|
12340
12606
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -12462,11 +12728,11 @@ var error11 = () => {
|
|
|
12462
12728
|
};
|
|
12463
12729
|
function es_default() {
|
|
12464
12730
|
return {
|
|
12465
|
-
localeError:
|
|
12731
|
+
localeError: error12()
|
|
12466
12732
|
};
|
|
12467
12733
|
}
|
|
12468
12734
|
// node_modules/zod/v4/locales/fa.js
|
|
12469
|
-
var
|
|
12735
|
+
var error13 = () => {
|
|
12470
12736
|
const Sizable = {
|
|
12471
12737
|
string: { unit: "کاراکتر", verb: "داشته باشد" },
|
|
12472
12738
|
file: { unit: "بایت", verb: "داشته باشد" },
|
|
@@ -12576,11 +12842,11 @@ var error12 = () => {
|
|
|
12576
12842
|
};
|
|
12577
12843
|
function fa_default() {
|
|
12578
12844
|
return {
|
|
12579
|
-
localeError:
|
|
12845
|
+
localeError: error13()
|
|
12580
12846
|
};
|
|
12581
12847
|
}
|
|
12582
12848
|
// node_modules/zod/v4/locales/fi.js
|
|
12583
|
-
var
|
|
12849
|
+
var error14 = () => {
|
|
12584
12850
|
const Sizable = {
|
|
12585
12851
|
string: { unit: "merkkiä", subject: "merkkijonon" },
|
|
12586
12852
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -12688,11 +12954,11 @@ var error13 = () => {
|
|
|
12688
12954
|
};
|
|
12689
12955
|
function fi_default() {
|
|
12690
12956
|
return {
|
|
12691
|
-
localeError:
|
|
12957
|
+
localeError: error14()
|
|
12692
12958
|
};
|
|
12693
12959
|
}
|
|
12694
12960
|
// node_modules/zod/v4/locales/fr.js
|
|
12695
|
-
var
|
|
12961
|
+
var error15 = () => {
|
|
12696
12962
|
const Sizable = {
|
|
12697
12963
|
string: { unit: "caractères", verb: "avoir" },
|
|
12698
12964
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -12733,9 +12999,27 @@ var error14 = () => {
|
|
|
12733
12999
|
template_literal: "entrée"
|
|
12734
13000
|
};
|
|
12735
13001
|
const TypeDictionary = {
|
|
12736
|
-
|
|
13002
|
+
string: "chaîne",
|
|
12737
13003
|
number: "nombre",
|
|
12738
|
-
|
|
13004
|
+
int: "entier",
|
|
13005
|
+
boolean: "booléen",
|
|
13006
|
+
bigint: "grand entier",
|
|
13007
|
+
symbol: "symbole",
|
|
13008
|
+
undefined: "indéfini",
|
|
13009
|
+
null: "null",
|
|
13010
|
+
never: "jamais",
|
|
13011
|
+
void: "vide",
|
|
13012
|
+
date: "date",
|
|
13013
|
+
array: "tableau",
|
|
13014
|
+
object: "objet",
|
|
13015
|
+
tuple: "tuple",
|
|
13016
|
+
record: "enregistrement",
|
|
13017
|
+
map: "carte",
|
|
13018
|
+
set: "ensemble",
|
|
13019
|
+
file: "fichier",
|
|
13020
|
+
nonoptional: "non-optionnel",
|
|
13021
|
+
nan: "NaN",
|
|
13022
|
+
function: "fonction"
|
|
12739
13023
|
};
|
|
12740
13024
|
return (issue2) => {
|
|
12741
13025
|
switch (issue2.code) {
|
|
@@ -12756,16 +13040,15 @@ var error14 = () => {
|
|
|
12756
13040
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
12757
13041
|
const sizing = getSizing(issue2.origin);
|
|
12758
13042
|
if (sizing)
|
|
12759
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
|
|
12760
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit être ${adj}${issue2.maximum.toString()}`;
|
|
13043
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
|
|
13044
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit être ${adj}${issue2.maximum.toString()}`;
|
|
12761
13045
|
}
|
|
12762
13046
|
case "too_small": {
|
|
12763
13047
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
12764
13048
|
const sizing = getSizing(issue2.origin);
|
|
12765
|
-
if (sizing)
|
|
12766
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
12767
|
-
}
|
|
12768
|
-
return `Trop petit : ${issue2.origin} doit être ${adj}${issue2.minimum.toString()}`;
|
|
13049
|
+
if (sizing)
|
|
13050
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
13051
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit être ${adj}${issue2.minimum.toString()}`;
|
|
12769
13052
|
}
|
|
12770
13053
|
case "invalid_format": {
|
|
12771
13054
|
const _issue = issue2;
|
|
@@ -12796,11 +13079,11 @@ var error14 = () => {
|
|
|
12796
13079
|
};
|
|
12797
13080
|
function fr_default() {
|
|
12798
13081
|
return {
|
|
12799
|
-
localeError:
|
|
13082
|
+
localeError: error15()
|
|
12800
13083
|
};
|
|
12801
13084
|
}
|
|
12802
13085
|
// node_modules/zod/v4/locales/fr-CA.js
|
|
12803
|
-
var
|
|
13086
|
+
var error16 = () => {
|
|
12804
13087
|
const Sizable = {
|
|
12805
13088
|
string: { unit: "caractères", verb: "avoir" },
|
|
12806
13089
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -12903,11 +13186,11 @@ var error15 = () => {
|
|
|
12903
13186
|
};
|
|
12904
13187
|
function fr_CA_default() {
|
|
12905
13188
|
return {
|
|
12906
|
-
localeError:
|
|
13189
|
+
localeError: error16()
|
|
12907
13190
|
};
|
|
12908
13191
|
}
|
|
12909
13192
|
// node_modules/zod/v4/locales/he.js
|
|
12910
|
-
var
|
|
13193
|
+
var error17 = () => {
|
|
12911
13194
|
const TypeNames = {
|
|
12912
13195
|
string: { label: "מחרוזת", gender: "f" },
|
|
12913
13196
|
number: { label: "מספר", gender: "m" },
|
|
@@ -13096,23 +13379,23 @@ var error16 = () => {
|
|
|
13096
13379
|
};
|
|
13097
13380
|
function he_default() {
|
|
13098
13381
|
return {
|
|
13099
|
-
localeError:
|
|
13382
|
+
localeError: error17()
|
|
13100
13383
|
};
|
|
13101
13384
|
}
|
|
13102
|
-
// node_modules/zod/v4/locales/
|
|
13103
|
-
var
|
|
13385
|
+
// node_modules/zod/v4/locales/hr.js
|
|
13386
|
+
var error18 = () => {
|
|
13104
13387
|
const Sizable = {
|
|
13105
|
-
string: { unit: "
|
|
13106
|
-
file: { unit: "
|
|
13107
|
-
array: { unit: "
|
|
13108
|
-
set: { unit: "
|
|
13388
|
+
string: { unit: "znakova", verb: "imati" },
|
|
13389
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
13390
|
+
array: { unit: "stavki", verb: "imati" },
|
|
13391
|
+
set: { unit: "stavki", verb: "imati" }
|
|
13109
13392
|
};
|
|
13110
13393
|
function getSizing(origin) {
|
|
13111
13394
|
return Sizable[origin] ?? null;
|
|
13112
13395
|
}
|
|
13113
13396
|
const FormatDictionary = {
|
|
13114
|
-
regex: "
|
|
13115
|
-
email: "email
|
|
13397
|
+
regex: "unos",
|
|
13398
|
+
email: "email adresa",
|
|
13116
13399
|
url: "URL",
|
|
13117
13400
|
emoji: "emoji",
|
|
13118
13401
|
uuid: "UUID",
|
|
@@ -13125,25 +13408,147 @@ var error17 = () => {
|
|
|
13125
13408
|
ulid: "ULID",
|
|
13126
13409
|
xid: "XID",
|
|
13127
13410
|
ksuid: "KSUID",
|
|
13128
|
-
datetime: "ISO
|
|
13129
|
-
date: "ISO
|
|
13130
|
-
time: "ISO
|
|
13131
|
-
duration: "ISO
|
|
13132
|
-
ipv4: "IPv4
|
|
13133
|
-
ipv6: "IPv6
|
|
13134
|
-
cidrv4: "IPv4
|
|
13135
|
-
cidrv6: "IPv6
|
|
13136
|
-
base64: "base64
|
|
13137
|
-
base64url: "base64url
|
|
13138
|
-
json_string: "JSON
|
|
13139
|
-
e164: "E.164
|
|
13411
|
+
datetime: "ISO datum i vrijeme",
|
|
13412
|
+
date: "ISO datum",
|
|
13413
|
+
time: "ISO vrijeme",
|
|
13414
|
+
duration: "ISO trajanje",
|
|
13415
|
+
ipv4: "IPv4 adresa",
|
|
13416
|
+
ipv6: "IPv6 adresa",
|
|
13417
|
+
cidrv4: "IPv4 raspon",
|
|
13418
|
+
cidrv6: "IPv6 raspon",
|
|
13419
|
+
base64: "base64 kodirani tekst",
|
|
13420
|
+
base64url: "base64url kodirani tekst",
|
|
13421
|
+
json_string: "JSON tekst",
|
|
13422
|
+
e164: "E.164 broj",
|
|
13140
13423
|
jwt: "JWT",
|
|
13141
|
-
template_literal: "
|
|
13424
|
+
template_literal: "unos"
|
|
13142
13425
|
};
|
|
13143
13426
|
const TypeDictionary = {
|
|
13144
13427
|
nan: "NaN",
|
|
13145
|
-
|
|
13146
|
-
|
|
13428
|
+
string: "tekst",
|
|
13429
|
+
number: "broj",
|
|
13430
|
+
boolean: "boolean",
|
|
13431
|
+
array: "niz",
|
|
13432
|
+
object: "objekt",
|
|
13433
|
+
set: "skup",
|
|
13434
|
+
file: "datoteka",
|
|
13435
|
+
date: "datum",
|
|
13436
|
+
bigint: "bigint",
|
|
13437
|
+
symbol: "simbol",
|
|
13438
|
+
undefined: "undefined",
|
|
13439
|
+
null: "null",
|
|
13440
|
+
function: "funkcija",
|
|
13441
|
+
map: "mapa"
|
|
13442
|
+
};
|
|
13443
|
+
return (issue2) => {
|
|
13444
|
+
switch (issue2.code) {
|
|
13445
|
+
case "invalid_type": {
|
|
13446
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
13447
|
+
const receivedType = parsedType(issue2.input);
|
|
13448
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
13449
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
13450
|
+
return `Neispravan unos: očekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
13451
|
+
}
|
|
13452
|
+
return `Neispravan unos: očekuje se ${expected}, a primljeno je ${received}`;
|
|
13453
|
+
}
|
|
13454
|
+
case "invalid_value":
|
|
13455
|
+
if (issue2.values.length === 1)
|
|
13456
|
+
return `Neispravna vrijednost: očekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
13457
|
+
return `Neispravna opcija: očekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
13458
|
+
case "too_big": {
|
|
13459
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
13460
|
+
const sizing = getSizing(issue2.origin);
|
|
13461
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
13462
|
+
if (sizing)
|
|
13463
|
+
return `Preveliko: očekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
13464
|
+
return `Preveliko: očekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
13465
|
+
}
|
|
13466
|
+
case "too_small": {
|
|
13467
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
13468
|
+
const sizing = getSizing(issue2.origin);
|
|
13469
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
13470
|
+
if (sizing) {
|
|
13471
|
+
return `Premalo: očekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
13472
|
+
}
|
|
13473
|
+
return `Premalo: očekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
13474
|
+
}
|
|
13475
|
+
case "invalid_format": {
|
|
13476
|
+
const _issue = issue2;
|
|
13477
|
+
if (_issue.format === "starts_with")
|
|
13478
|
+
return `Neispravan tekst: mora započinjati s "${_issue.prefix}"`;
|
|
13479
|
+
if (_issue.format === "ends_with")
|
|
13480
|
+
return `Neispravan tekst: mora završavati s "${_issue.suffix}"`;
|
|
13481
|
+
if (_issue.format === "includes")
|
|
13482
|
+
return `Neispravan tekst: mora sadržavati "${_issue.includes}"`;
|
|
13483
|
+
if (_issue.format === "regex")
|
|
13484
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
13485
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
13486
|
+
}
|
|
13487
|
+
case "not_multiple_of":
|
|
13488
|
+
return `Neispravan broj: mora biti višekratnik od ${issue2.divisor}`;
|
|
13489
|
+
case "unrecognized_keys":
|
|
13490
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i ključevi" : " ključ"}: ${joinValues(issue2.keys, ", ")}`;
|
|
13491
|
+
case "invalid_key":
|
|
13492
|
+
return `Neispravan ključ u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
13493
|
+
case "invalid_union":
|
|
13494
|
+
return "Neispravan unos";
|
|
13495
|
+
case "invalid_element":
|
|
13496
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
13497
|
+
default:
|
|
13498
|
+
return `Neispravan unos`;
|
|
13499
|
+
}
|
|
13500
|
+
};
|
|
13501
|
+
};
|
|
13502
|
+
function hr_default() {
|
|
13503
|
+
return {
|
|
13504
|
+
localeError: error18()
|
|
13505
|
+
};
|
|
13506
|
+
}
|
|
13507
|
+
// node_modules/zod/v4/locales/hu.js
|
|
13508
|
+
var error19 = () => {
|
|
13509
|
+
const Sizable = {
|
|
13510
|
+
string: { unit: "karakter", verb: "legyen" },
|
|
13511
|
+
file: { unit: "byte", verb: "legyen" },
|
|
13512
|
+
array: { unit: "elem", verb: "legyen" },
|
|
13513
|
+
set: { unit: "elem", verb: "legyen" }
|
|
13514
|
+
};
|
|
13515
|
+
function getSizing(origin) {
|
|
13516
|
+
return Sizable[origin] ?? null;
|
|
13517
|
+
}
|
|
13518
|
+
const FormatDictionary = {
|
|
13519
|
+
regex: "bemenet",
|
|
13520
|
+
email: "email cím",
|
|
13521
|
+
url: "URL",
|
|
13522
|
+
emoji: "emoji",
|
|
13523
|
+
uuid: "UUID",
|
|
13524
|
+
uuidv4: "UUIDv4",
|
|
13525
|
+
uuidv6: "UUIDv6",
|
|
13526
|
+
nanoid: "nanoid",
|
|
13527
|
+
guid: "GUID",
|
|
13528
|
+
cuid: "cuid",
|
|
13529
|
+
cuid2: "cuid2",
|
|
13530
|
+
ulid: "ULID",
|
|
13531
|
+
xid: "XID",
|
|
13532
|
+
ksuid: "KSUID",
|
|
13533
|
+
datetime: "ISO időbélyeg",
|
|
13534
|
+
date: "ISO dátum",
|
|
13535
|
+
time: "ISO idő",
|
|
13536
|
+
duration: "ISO időintervallum",
|
|
13537
|
+
ipv4: "IPv4 cím",
|
|
13538
|
+
ipv6: "IPv6 cím",
|
|
13539
|
+
cidrv4: "IPv4 tartomány",
|
|
13540
|
+
cidrv6: "IPv6 tartomány",
|
|
13541
|
+
base64: "base64-kódolt string",
|
|
13542
|
+
base64url: "base64url-kódolt string",
|
|
13543
|
+
json_string: "JSON string",
|
|
13544
|
+
e164: "E.164 szám",
|
|
13545
|
+
jwt: "JWT",
|
|
13546
|
+
template_literal: "bemenet"
|
|
13547
|
+
};
|
|
13548
|
+
const TypeDictionary = {
|
|
13549
|
+
nan: "NaN",
|
|
13550
|
+
number: "szám",
|
|
13551
|
+
array: "tömb"
|
|
13147
13552
|
};
|
|
13148
13553
|
return (issue2) => {
|
|
13149
13554
|
switch (issue2.code) {
|
|
@@ -13204,7 +13609,7 @@ var error17 = () => {
|
|
|
13204
13609
|
};
|
|
13205
13610
|
function hu_default() {
|
|
13206
13611
|
return {
|
|
13207
|
-
localeError:
|
|
13612
|
+
localeError: error19()
|
|
13208
13613
|
};
|
|
13209
13614
|
}
|
|
13210
13615
|
// node_modules/zod/v4/locales/hy.js
|
|
@@ -13218,7 +13623,7 @@ function withDefiniteArticle(word) {
|
|
|
13218
13623
|
const lastChar = word[word.length - 1];
|
|
13219
13624
|
return word + (vowels.includes(lastChar) ? "ն" : "ը");
|
|
13220
13625
|
}
|
|
13221
|
-
var
|
|
13626
|
+
var error20 = () => {
|
|
13222
13627
|
const Sizable = {
|
|
13223
13628
|
string: {
|
|
13224
13629
|
unit: {
|
|
@@ -13351,11 +13756,11 @@ var error18 = () => {
|
|
|
13351
13756
|
};
|
|
13352
13757
|
function hy_default() {
|
|
13353
13758
|
return {
|
|
13354
|
-
localeError:
|
|
13759
|
+
localeError: error20()
|
|
13355
13760
|
};
|
|
13356
13761
|
}
|
|
13357
13762
|
// node_modules/zod/v4/locales/id.js
|
|
13358
|
-
var
|
|
13763
|
+
var error21 = () => {
|
|
13359
13764
|
const Sizable = {
|
|
13360
13765
|
string: { unit: "karakter", verb: "memiliki" },
|
|
13361
13766
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -13457,11 +13862,11 @@ var error19 = () => {
|
|
|
13457
13862
|
};
|
|
13458
13863
|
function id_default() {
|
|
13459
13864
|
return {
|
|
13460
|
-
localeError:
|
|
13865
|
+
localeError: error21()
|
|
13461
13866
|
};
|
|
13462
13867
|
}
|
|
13463
13868
|
// node_modules/zod/v4/locales/is.js
|
|
13464
|
-
var
|
|
13869
|
+
var error22 = () => {
|
|
13465
13870
|
const Sizable = {
|
|
13466
13871
|
string: { unit: "stafi", verb: "að hafa" },
|
|
13467
13872
|
file: { unit: "bæti", verb: "að hafa" },
|
|
@@ -13566,11 +13971,11 @@ var error20 = () => {
|
|
|
13566
13971
|
};
|
|
13567
13972
|
function is_default() {
|
|
13568
13973
|
return {
|
|
13569
|
-
localeError:
|
|
13974
|
+
localeError: error22()
|
|
13570
13975
|
};
|
|
13571
13976
|
}
|
|
13572
13977
|
// node_modules/zod/v4/locales/it.js
|
|
13573
|
-
var
|
|
13978
|
+
var error23 = () => {
|
|
13574
13979
|
const Sizable = {
|
|
13575
13980
|
string: { unit: "caratteri", verb: "avere" },
|
|
13576
13981
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -13655,7 +14060,7 @@ var error21 = () => {
|
|
|
13655
14060
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
13656
14061
|
if (_issue.format === "regex")
|
|
13657
14062
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
13658
|
-
return `
|
|
14063
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
13659
14064
|
}
|
|
13660
14065
|
case "not_multiple_of":
|
|
13661
14066
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -13674,11 +14079,11 @@ var error21 = () => {
|
|
|
13674
14079
|
};
|
|
13675
14080
|
function it_default() {
|
|
13676
14081
|
return {
|
|
13677
|
-
localeError:
|
|
14082
|
+
localeError: error23()
|
|
13678
14083
|
};
|
|
13679
14084
|
}
|
|
13680
14085
|
// node_modules/zod/v4/locales/ja.js
|
|
13681
|
-
var
|
|
14086
|
+
var error24 = () => {
|
|
13682
14087
|
const Sizable = {
|
|
13683
14088
|
string: { unit: "文字", verb: "である" },
|
|
13684
14089
|
file: { unit: "バイト", verb: "である" },
|
|
@@ -13781,11 +14186,11 @@ var error22 = () => {
|
|
|
13781
14186
|
};
|
|
13782
14187
|
function ja_default() {
|
|
13783
14188
|
return {
|
|
13784
|
-
localeError:
|
|
14189
|
+
localeError: error24()
|
|
13785
14190
|
};
|
|
13786
14191
|
}
|
|
13787
14192
|
// node_modules/zod/v4/locales/ka.js
|
|
13788
|
-
var
|
|
14193
|
+
var error25 = () => {
|
|
13789
14194
|
const Sizable = {
|
|
13790
14195
|
string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
|
|
13791
14196
|
file: { unit: "ბაიტი", verb: "უნდა შეიცავდეს" },
|
|
@@ -13818,9 +14223,9 @@ var error23 = () => {
|
|
|
13818
14223
|
ipv6: "IPv6 მისამართი",
|
|
13819
14224
|
cidrv4: "IPv4 დიაპაზონი",
|
|
13820
14225
|
cidrv6: "IPv6 დიაპაზონი",
|
|
13821
|
-
base64: "base64-კოდირებული
|
|
13822
|
-
base64url: "base64url-კოდირებული
|
|
13823
|
-
json_string: "JSON
|
|
14226
|
+
base64: "base64-კოდირებული ველი",
|
|
14227
|
+
base64url: "base64url-კოდირებული ველი",
|
|
14228
|
+
json_string: "JSON ველი",
|
|
13824
14229
|
e164: "E.164 ნომერი",
|
|
13825
14230
|
jwt: "JWT",
|
|
13826
14231
|
template_literal: "შეყვანა"
|
|
@@ -13828,7 +14233,7 @@ var error23 = () => {
|
|
|
13828
14233
|
const TypeDictionary = {
|
|
13829
14234
|
nan: "NaN",
|
|
13830
14235
|
number: "რიცხვი",
|
|
13831
|
-
string: "
|
|
14236
|
+
string: "ველი",
|
|
13832
14237
|
boolean: "ბულეანი",
|
|
13833
14238
|
function: "ფუნქცია",
|
|
13834
14239
|
array: "მასივი"
|
|
@@ -13866,14 +14271,14 @@ var error23 = () => {
|
|
|
13866
14271
|
case "invalid_format": {
|
|
13867
14272
|
const _issue = issue2;
|
|
13868
14273
|
if (_issue.format === "starts_with") {
|
|
13869
|
-
return `არასწორი
|
|
14274
|
+
return `არასწორი ველი: უნდა იწყებოდეს "${_issue.prefix}"-ით`;
|
|
13870
14275
|
}
|
|
13871
14276
|
if (_issue.format === "ends_with")
|
|
13872
|
-
return `არასწორი
|
|
14277
|
+
return `არასწორი ველი: უნდა მთავრდებოდეს "${_issue.suffix}"-ით`;
|
|
13873
14278
|
if (_issue.format === "includes")
|
|
13874
|
-
return `არასწორი
|
|
14279
|
+
return `არასწორი ველი: უნდა შეიცავდეს "${_issue.includes}"-ს`;
|
|
13875
14280
|
if (_issue.format === "regex")
|
|
13876
|
-
return `არასწორი
|
|
14281
|
+
return `არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${_issue.pattern}`;
|
|
13877
14282
|
return `არასწორი ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
13878
14283
|
}
|
|
13879
14284
|
case "not_multiple_of":
|
|
@@ -13893,11 +14298,11 @@ var error23 = () => {
|
|
|
13893
14298
|
};
|
|
13894
14299
|
function ka_default() {
|
|
13895
14300
|
return {
|
|
13896
|
-
localeError:
|
|
14301
|
+
localeError: error25()
|
|
13897
14302
|
};
|
|
13898
14303
|
}
|
|
13899
14304
|
// node_modules/zod/v4/locales/km.js
|
|
13900
|
-
var
|
|
14305
|
+
var error26 = () => {
|
|
13901
14306
|
const Sizable = {
|
|
13902
14307
|
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
|
|
13903
14308
|
file: { unit: "បៃ", verb: "គួរមាន" },
|
|
@@ -14003,7 +14408,7 @@ var error24 = () => {
|
|
|
14003
14408
|
};
|
|
14004
14409
|
function km_default() {
|
|
14005
14410
|
return {
|
|
14006
|
-
localeError:
|
|
14411
|
+
localeError: error26()
|
|
14007
14412
|
};
|
|
14008
14413
|
}
|
|
14009
14414
|
|
|
@@ -14012,7 +14417,7 @@ function kh_default() {
|
|
|
14012
14417
|
return km_default();
|
|
14013
14418
|
}
|
|
14014
14419
|
// node_modules/zod/v4/locales/ko.js
|
|
14015
|
-
var
|
|
14420
|
+
var error27 = () => {
|
|
14016
14421
|
const Sizable = {
|
|
14017
14422
|
string: { unit: "문자", verb: "to have" },
|
|
14018
14423
|
file: { unit: "바이트", verb: "to have" },
|
|
@@ -14119,7 +14524,7 @@ var error25 = () => {
|
|
|
14119
14524
|
};
|
|
14120
14525
|
function ko_default() {
|
|
14121
14526
|
return {
|
|
14122
|
-
localeError:
|
|
14527
|
+
localeError: error27()
|
|
14123
14528
|
};
|
|
14124
14529
|
}
|
|
14125
14530
|
// node_modules/zod/v4/locales/lt.js
|
|
@@ -14136,7 +14541,7 @@ function getUnitTypeFromNumber(number2) {
|
|
|
14136
14541
|
return "one";
|
|
14137
14542
|
return "few";
|
|
14138
14543
|
}
|
|
14139
|
-
var
|
|
14544
|
+
var error28 = () => {
|
|
14140
14545
|
const Sizable = {
|
|
14141
14546
|
string: {
|
|
14142
14547
|
unit: {
|
|
@@ -14322,11 +14727,11 @@ var error26 = () => {
|
|
|
14322
14727
|
};
|
|
14323
14728
|
function lt_default() {
|
|
14324
14729
|
return {
|
|
14325
|
-
localeError:
|
|
14730
|
+
localeError: error28()
|
|
14326
14731
|
};
|
|
14327
14732
|
}
|
|
14328
14733
|
// node_modules/zod/v4/locales/mk.js
|
|
14329
|
-
var
|
|
14734
|
+
var error29 = () => {
|
|
14330
14735
|
const Sizable = {
|
|
14331
14736
|
string: { unit: "знаци", verb: "да имаат" },
|
|
14332
14737
|
file: { unit: "бајти", verb: "да имаат" },
|
|
@@ -14431,11 +14836,11 @@ var error27 = () => {
|
|
|
14431
14836
|
};
|
|
14432
14837
|
function mk_default() {
|
|
14433
14838
|
return {
|
|
14434
|
-
localeError:
|
|
14839
|
+
localeError: error29()
|
|
14435
14840
|
};
|
|
14436
14841
|
}
|
|
14437
14842
|
// node_modules/zod/v4/locales/ms.js
|
|
14438
|
-
var
|
|
14843
|
+
var error30 = () => {
|
|
14439
14844
|
const Sizable = {
|
|
14440
14845
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
14441
14846
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -14538,11 +14943,11 @@ var error28 = () => {
|
|
|
14538
14943
|
};
|
|
14539
14944
|
function ms_default() {
|
|
14540
14945
|
return {
|
|
14541
|
-
localeError:
|
|
14946
|
+
localeError: error30()
|
|
14542
14947
|
};
|
|
14543
14948
|
}
|
|
14544
14949
|
// node_modules/zod/v4/locales/nl.js
|
|
14545
|
-
var
|
|
14950
|
+
var error31 = () => {
|
|
14546
14951
|
const Sizable = {
|
|
14547
14952
|
string: { unit: "tekens", verb: "heeft" },
|
|
14548
14953
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -14648,11 +15053,11 @@ var error29 = () => {
|
|
|
14648
15053
|
};
|
|
14649
15054
|
function nl_default() {
|
|
14650
15055
|
return {
|
|
14651
|
-
localeError:
|
|
15056
|
+
localeError: error31()
|
|
14652
15057
|
};
|
|
14653
15058
|
}
|
|
14654
15059
|
// node_modules/zod/v4/locales/no.js
|
|
14655
|
-
var
|
|
15060
|
+
var error32 = () => {
|
|
14656
15061
|
const Sizable = {
|
|
14657
15062
|
string: { unit: "tegn", verb: "å ha" },
|
|
14658
15063
|
file: { unit: "bytes", verb: "å ha" },
|
|
@@ -14756,11 +15161,11 @@ var error30 = () => {
|
|
|
14756
15161
|
};
|
|
14757
15162
|
function no_default() {
|
|
14758
15163
|
return {
|
|
14759
|
-
localeError:
|
|
15164
|
+
localeError: error32()
|
|
14760
15165
|
};
|
|
14761
15166
|
}
|
|
14762
15167
|
// node_modules/zod/v4/locales/ota.js
|
|
14763
|
-
var
|
|
15168
|
+
var error33 = () => {
|
|
14764
15169
|
const Sizable = {
|
|
14765
15170
|
string: { unit: "harf", verb: "olmalıdır" },
|
|
14766
15171
|
file: { unit: "bayt", verb: "olmalıdır" },
|
|
@@ -14865,11 +15270,11 @@ var error31 = () => {
|
|
|
14865
15270
|
};
|
|
14866
15271
|
function ota_default() {
|
|
14867
15272
|
return {
|
|
14868
|
-
localeError:
|
|
15273
|
+
localeError: error33()
|
|
14869
15274
|
};
|
|
14870
15275
|
}
|
|
14871
15276
|
// node_modules/zod/v4/locales/ps.js
|
|
14872
|
-
var
|
|
15277
|
+
var error34 = () => {
|
|
14873
15278
|
const Sizable = {
|
|
14874
15279
|
string: { unit: "توکي", verb: "ولري" },
|
|
14875
15280
|
file: { unit: "بایټس", verb: "ولري" },
|
|
@@ -14979,11 +15384,11 @@ var error32 = () => {
|
|
|
14979
15384
|
};
|
|
14980
15385
|
function ps_default() {
|
|
14981
15386
|
return {
|
|
14982
|
-
localeError:
|
|
15387
|
+
localeError: error34()
|
|
14983
15388
|
};
|
|
14984
15389
|
}
|
|
14985
15390
|
// node_modules/zod/v4/locales/pl.js
|
|
14986
|
-
var
|
|
15391
|
+
var error35 = () => {
|
|
14987
15392
|
const Sizable = {
|
|
14988
15393
|
string: { unit: "znaków", verb: "mieć" },
|
|
14989
15394
|
file: { unit: "bajtów", verb: "mieć" },
|
|
@@ -15088,11 +15493,11 @@ var error33 = () => {
|
|
|
15088
15493
|
};
|
|
15089
15494
|
function pl_default() {
|
|
15090
15495
|
return {
|
|
15091
|
-
localeError:
|
|
15496
|
+
localeError: error35()
|
|
15092
15497
|
};
|
|
15093
15498
|
}
|
|
15094
15499
|
// node_modules/zod/v4/locales/pt.js
|
|
15095
|
-
var
|
|
15500
|
+
var error36 = () => {
|
|
15096
15501
|
const Sizable = {
|
|
15097
15502
|
string: { unit: "caracteres", verb: "ter" },
|
|
15098
15503
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -15196,7 +15601,126 @@ var error34 = () => {
|
|
|
15196
15601
|
};
|
|
15197
15602
|
function pt_default() {
|
|
15198
15603
|
return {
|
|
15199
|
-
localeError:
|
|
15604
|
+
localeError: error36()
|
|
15605
|
+
};
|
|
15606
|
+
}
|
|
15607
|
+
// node_modules/zod/v4/locales/ro.js
|
|
15608
|
+
var error37 = () => {
|
|
15609
|
+
const Sizable = {
|
|
15610
|
+
string: { unit: "caractere", verb: "să aibă" },
|
|
15611
|
+
file: { unit: "octeți", verb: "să aibă" },
|
|
15612
|
+
array: { unit: "elemente", verb: "să aibă" },
|
|
15613
|
+
set: { unit: "elemente", verb: "să aibă" },
|
|
15614
|
+
map: { unit: "intrări", verb: "să aibă" }
|
|
15615
|
+
};
|
|
15616
|
+
function getSizing(origin) {
|
|
15617
|
+
return Sizable[origin] ?? null;
|
|
15618
|
+
}
|
|
15619
|
+
const FormatDictionary = {
|
|
15620
|
+
regex: "intrare",
|
|
15621
|
+
email: "adresă de email",
|
|
15622
|
+
url: "URL",
|
|
15623
|
+
emoji: "emoji",
|
|
15624
|
+
uuid: "UUID",
|
|
15625
|
+
uuidv4: "UUIDv4",
|
|
15626
|
+
uuidv6: "UUIDv6",
|
|
15627
|
+
nanoid: "nanoid",
|
|
15628
|
+
guid: "GUID",
|
|
15629
|
+
cuid: "cuid",
|
|
15630
|
+
cuid2: "cuid2",
|
|
15631
|
+
ulid: "ULID",
|
|
15632
|
+
xid: "XID",
|
|
15633
|
+
ksuid: "KSUID",
|
|
15634
|
+
datetime: "dată și oră ISO",
|
|
15635
|
+
date: "dată ISO",
|
|
15636
|
+
time: "oră ISO",
|
|
15637
|
+
duration: "durată ISO",
|
|
15638
|
+
ipv4: "adresă IPv4",
|
|
15639
|
+
ipv6: "adresă IPv6",
|
|
15640
|
+
mac: "adresă MAC",
|
|
15641
|
+
cidrv4: "interval IPv4",
|
|
15642
|
+
cidrv6: "interval IPv6",
|
|
15643
|
+
base64: "șir codat base64",
|
|
15644
|
+
base64url: "șir codat base64url",
|
|
15645
|
+
json_string: "șir JSON",
|
|
15646
|
+
e164: "număr E.164",
|
|
15647
|
+
jwt: "JWT",
|
|
15648
|
+
template_literal: "intrare"
|
|
15649
|
+
};
|
|
15650
|
+
const TypeDictionary = {
|
|
15651
|
+
nan: "NaN",
|
|
15652
|
+
string: "șir",
|
|
15653
|
+
number: "număr",
|
|
15654
|
+
boolean: "boolean",
|
|
15655
|
+
function: "funcție",
|
|
15656
|
+
array: "matrice",
|
|
15657
|
+
object: "obiect",
|
|
15658
|
+
undefined: "nedefinit",
|
|
15659
|
+
symbol: "simbol",
|
|
15660
|
+
bigint: "număr mare",
|
|
15661
|
+
void: "void",
|
|
15662
|
+
never: "never",
|
|
15663
|
+
map: "hartă",
|
|
15664
|
+
set: "set"
|
|
15665
|
+
};
|
|
15666
|
+
return (issue2) => {
|
|
15667
|
+
switch (issue2.code) {
|
|
15668
|
+
case "invalid_type": {
|
|
15669
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
15670
|
+
const receivedType = parsedType(issue2.input);
|
|
15671
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
15672
|
+
return `Intrare invalidă: așteptat ${expected}, primit ${received}`;
|
|
15673
|
+
}
|
|
15674
|
+
case "invalid_value":
|
|
15675
|
+
if (issue2.values.length === 1)
|
|
15676
|
+
return `Intrare invalidă: așteptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
15677
|
+
return `Opțiune invalidă: așteptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
15678
|
+
case "too_big": {
|
|
15679
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
15680
|
+
const sizing = getSizing(issue2.origin);
|
|
15681
|
+
if (sizing)
|
|
15682
|
+
return `Prea mare: așteptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
15683
|
+
return `Prea mare: așteptat ca ${issue2.origin ?? "valoarea"} să fie ${adj}${issue2.maximum.toString()}`;
|
|
15684
|
+
}
|
|
15685
|
+
case "too_small": {
|
|
15686
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
15687
|
+
const sizing = getSizing(issue2.origin);
|
|
15688
|
+
if (sizing) {
|
|
15689
|
+
return `Prea mic: așteptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
15690
|
+
}
|
|
15691
|
+
return `Prea mic: așteptat ca ${issue2.origin} să fie ${adj}${issue2.minimum.toString()}`;
|
|
15692
|
+
}
|
|
15693
|
+
case "invalid_format": {
|
|
15694
|
+
const _issue = issue2;
|
|
15695
|
+
if (_issue.format === "starts_with") {
|
|
15696
|
+
return `Șir invalid: trebuie să înceapă cu "${_issue.prefix}"`;
|
|
15697
|
+
}
|
|
15698
|
+
if (_issue.format === "ends_with")
|
|
15699
|
+
return `Șir invalid: trebuie să se termine cu "${_issue.suffix}"`;
|
|
15700
|
+
if (_issue.format === "includes")
|
|
15701
|
+
return `Șir invalid: trebuie să includă "${_issue.includes}"`;
|
|
15702
|
+
if (_issue.format === "regex")
|
|
15703
|
+
return `Șir invalid: trebuie să se potrivească cu modelul ${_issue.pattern}`;
|
|
15704
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
15705
|
+
}
|
|
15706
|
+
case "not_multiple_of":
|
|
15707
|
+
return `Număr invalid: trebuie să fie multiplu de ${issue2.divisor}`;
|
|
15708
|
+
case "unrecognized_keys":
|
|
15709
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
15710
|
+
case "invalid_key":
|
|
15711
|
+
return `Cheie invalidă în ${issue2.origin}`;
|
|
15712
|
+
case "invalid_union":
|
|
15713
|
+
return "Intrare invalidă";
|
|
15714
|
+
case "invalid_element":
|
|
15715
|
+
return `Valoare invalidă în ${issue2.origin}`;
|
|
15716
|
+
default:
|
|
15717
|
+
return `Intrare invalidă`;
|
|
15718
|
+
}
|
|
15719
|
+
};
|
|
15720
|
+
};
|
|
15721
|
+
function ro_default() {
|
|
15722
|
+
return {
|
|
15723
|
+
localeError: error37()
|
|
15200
15724
|
};
|
|
15201
15725
|
}
|
|
15202
15726
|
// node_modules/zod/v4/locales/ru.js
|
|
@@ -15215,7 +15739,7 @@ function getRussianPlural(count, one, few, many) {
|
|
|
15215
15739
|
}
|
|
15216
15740
|
return many;
|
|
15217
15741
|
}
|
|
15218
|
-
var
|
|
15742
|
+
var error38 = () => {
|
|
15219
15743
|
const Sizable = {
|
|
15220
15744
|
string: {
|
|
15221
15745
|
unit: {
|
|
@@ -15352,11 +15876,11 @@ var error35 = () => {
|
|
|
15352
15876
|
};
|
|
15353
15877
|
function ru_default() {
|
|
15354
15878
|
return {
|
|
15355
|
-
localeError:
|
|
15879
|
+
localeError: error38()
|
|
15356
15880
|
};
|
|
15357
15881
|
}
|
|
15358
15882
|
// node_modules/zod/v4/locales/sl.js
|
|
15359
|
-
var
|
|
15883
|
+
var error39 = () => {
|
|
15360
15884
|
const Sizable = {
|
|
15361
15885
|
string: { unit: "znakov", verb: "imeti" },
|
|
15362
15886
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -15461,11 +15985,11 @@ var error36 = () => {
|
|
|
15461
15985
|
};
|
|
15462
15986
|
function sl_default() {
|
|
15463
15987
|
return {
|
|
15464
|
-
localeError:
|
|
15988
|
+
localeError: error39()
|
|
15465
15989
|
};
|
|
15466
15990
|
}
|
|
15467
15991
|
// node_modules/zod/v4/locales/sv.js
|
|
15468
|
-
var
|
|
15992
|
+
var error40 = () => {
|
|
15469
15993
|
const Sizable = {
|
|
15470
15994
|
string: { unit: "tecken", verb: "att ha" },
|
|
15471
15995
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -15571,11 +16095,11 @@ var error37 = () => {
|
|
|
15571
16095
|
};
|
|
15572
16096
|
function sv_default() {
|
|
15573
16097
|
return {
|
|
15574
|
-
localeError:
|
|
16098
|
+
localeError: error40()
|
|
15575
16099
|
};
|
|
15576
16100
|
}
|
|
15577
16101
|
// node_modules/zod/v4/locales/ta.js
|
|
15578
|
-
var
|
|
16102
|
+
var error41 = () => {
|
|
15579
16103
|
const Sizable = {
|
|
15580
16104
|
string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
15581
16105
|
file: { unit: "பைட்டுகள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
@@ -15681,11 +16205,11 @@ var error38 = () => {
|
|
|
15681
16205
|
};
|
|
15682
16206
|
function ta_default() {
|
|
15683
16207
|
return {
|
|
15684
|
-
localeError:
|
|
16208
|
+
localeError: error41()
|
|
15685
16209
|
};
|
|
15686
16210
|
}
|
|
15687
16211
|
// node_modules/zod/v4/locales/th.js
|
|
15688
|
-
var
|
|
16212
|
+
var error42 = () => {
|
|
15689
16213
|
const Sizable = {
|
|
15690
16214
|
string: { unit: "ตัวอักษร", verb: "ควรมี" },
|
|
15691
16215
|
file: { unit: "ไบต์", verb: "ควรมี" },
|
|
@@ -15791,11 +16315,11 @@ var error39 = () => {
|
|
|
15791
16315
|
};
|
|
15792
16316
|
function th_default() {
|
|
15793
16317
|
return {
|
|
15794
|
-
localeError:
|
|
16318
|
+
localeError: error42()
|
|
15795
16319
|
};
|
|
15796
16320
|
}
|
|
15797
16321
|
// node_modules/zod/v4/locales/tr.js
|
|
15798
|
-
var
|
|
16322
|
+
var error43 = () => {
|
|
15799
16323
|
const Sizable = {
|
|
15800
16324
|
string: { unit: "karakter", verb: "olmalı" },
|
|
15801
16325
|
file: { unit: "bayt", verb: "olmalı" },
|
|
@@ -15896,11 +16420,11 @@ var error40 = () => {
|
|
|
15896
16420
|
};
|
|
15897
16421
|
function tr_default() {
|
|
15898
16422
|
return {
|
|
15899
|
-
localeError:
|
|
16423
|
+
localeError: error43()
|
|
15900
16424
|
};
|
|
15901
16425
|
}
|
|
15902
16426
|
// node_modules/zod/v4/locales/uk.js
|
|
15903
|
-
var
|
|
16427
|
+
var error44 = () => {
|
|
15904
16428
|
const Sizable = {
|
|
15905
16429
|
string: { unit: "символів", verb: "матиме" },
|
|
15906
16430
|
file: { unit: "байтів", verb: "матиме" },
|
|
@@ -16004,7 +16528,7 @@ var error41 = () => {
|
|
|
16004
16528
|
};
|
|
16005
16529
|
function uk_default() {
|
|
16006
16530
|
return {
|
|
16007
|
-
localeError:
|
|
16531
|
+
localeError: error44()
|
|
16008
16532
|
};
|
|
16009
16533
|
}
|
|
16010
16534
|
|
|
@@ -16013,7 +16537,7 @@ function ua_default() {
|
|
|
16013
16537
|
return uk_default();
|
|
16014
16538
|
}
|
|
16015
16539
|
// node_modules/zod/v4/locales/ur.js
|
|
16016
|
-
var
|
|
16540
|
+
var error45 = () => {
|
|
16017
16541
|
const Sizable = {
|
|
16018
16542
|
string: { unit: "حروف", verb: "ہونا" },
|
|
16019
16543
|
file: { unit: "بائٹس", verb: "ہونا" },
|
|
@@ -16119,16 +16643,17 @@ var error42 = () => {
|
|
|
16119
16643
|
};
|
|
16120
16644
|
function ur_default() {
|
|
16121
16645
|
return {
|
|
16122
|
-
localeError:
|
|
16646
|
+
localeError: error45()
|
|
16123
16647
|
};
|
|
16124
16648
|
}
|
|
16125
16649
|
// node_modules/zod/v4/locales/uz.js
|
|
16126
|
-
var
|
|
16650
|
+
var error46 = () => {
|
|
16127
16651
|
const Sizable = {
|
|
16128
16652
|
string: { unit: "belgi", verb: "bo‘lishi kerak" },
|
|
16129
16653
|
file: { unit: "bayt", verb: "bo‘lishi kerak" },
|
|
16130
16654
|
array: { unit: "element", verb: "bo‘lishi kerak" },
|
|
16131
|
-
set: { unit: "element", verb: "bo‘lishi kerak" }
|
|
16655
|
+
set: { unit: "element", verb: "bo‘lishi kerak" },
|
|
16656
|
+
map: { unit: "yozuv", verb: "bo‘lishi kerak" }
|
|
16132
16657
|
};
|
|
16133
16658
|
function getSizing(origin) {
|
|
16134
16659
|
return Sizable[origin] ?? null;
|
|
@@ -16228,11 +16753,11 @@ var error43 = () => {
|
|
|
16228
16753
|
};
|
|
16229
16754
|
function uz_default() {
|
|
16230
16755
|
return {
|
|
16231
|
-
localeError:
|
|
16756
|
+
localeError: error46()
|
|
16232
16757
|
};
|
|
16233
16758
|
}
|
|
16234
16759
|
// node_modules/zod/v4/locales/vi.js
|
|
16235
|
-
var
|
|
16760
|
+
var error47 = () => {
|
|
16236
16761
|
const Sizable = {
|
|
16237
16762
|
string: { unit: "ký tự", verb: "có" },
|
|
16238
16763
|
file: { unit: "byte", verb: "có" },
|
|
@@ -16336,11 +16861,11 @@ var error44 = () => {
|
|
|
16336
16861
|
};
|
|
16337
16862
|
function vi_default() {
|
|
16338
16863
|
return {
|
|
16339
|
-
localeError:
|
|
16864
|
+
localeError: error47()
|
|
16340
16865
|
};
|
|
16341
16866
|
}
|
|
16342
16867
|
// node_modules/zod/v4/locales/zh-CN.js
|
|
16343
|
-
var
|
|
16868
|
+
var error48 = () => {
|
|
16344
16869
|
const Sizable = {
|
|
16345
16870
|
string: { unit: "字符", verb: "包含" },
|
|
16346
16871
|
file: { unit: "字节", verb: "包含" },
|
|
@@ -16445,11 +16970,11 @@ var error45 = () => {
|
|
|
16445
16970
|
};
|
|
16446
16971
|
function zh_CN_default() {
|
|
16447
16972
|
return {
|
|
16448
|
-
localeError:
|
|
16973
|
+
localeError: error48()
|
|
16449
16974
|
};
|
|
16450
16975
|
}
|
|
16451
16976
|
// node_modules/zod/v4/locales/zh-TW.js
|
|
16452
|
-
var
|
|
16977
|
+
var error49 = () => {
|
|
16453
16978
|
const Sizable = {
|
|
16454
16979
|
string: { unit: "字元", verb: "擁有" },
|
|
16455
16980
|
file: { unit: "位元組", verb: "擁有" },
|
|
@@ -16552,11 +17077,11 @@ var error46 = () => {
|
|
|
16552
17077
|
};
|
|
16553
17078
|
function zh_TW_default() {
|
|
16554
17079
|
return {
|
|
16555
|
-
localeError:
|
|
17080
|
+
localeError: error49()
|
|
16556
17081
|
};
|
|
16557
17082
|
}
|
|
16558
17083
|
// node_modules/zod/v4/locales/yo.js
|
|
16559
|
-
var
|
|
17084
|
+
var error50 = () => {
|
|
16560
17085
|
const Sizable = {
|
|
16561
17086
|
string: { unit: "àmi", verb: "ní" },
|
|
16562
17087
|
file: { unit: "bytes", verb: "ní" },
|
|
@@ -16659,11 +17184,11 @@ var error47 = () => {
|
|
|
16659
17184
|
};
|
|
16660
17185
|
function yo_default() {
|
|
16661
17186
|
return {
|
|
16662
|
-
localeError:
|
|
17187
|
+
localeError: error50()
|
|
16663
17188
|
};
|
|
16664
17189
|
}
|
|
16665
17190
|
// node_modules/zod/v4/core/registries.js
|
|
16666
|
-
var
|
|
17191
|
+
var _a2;
|
|
16667
17192
|
var $output = Symbol("ZodOutput");
|
|
16668
17193
|
var $input = Symbol("ZodInput");
|
|
16669
17194
|
|
|
@@ -16710,7 +17235,7 @@ class $ZodRegistry {
|
|
|
16710
17235
|
function registry() {
|
|
16711
17236
|
return new $ZodRegistry;
|
|
16712
17237
|
}
|
|
16713
|
-
(
|
|
17238
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
16714
17239
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
16715
17240
|
// node_modules/zod/v4/core/api.js
|
|
16716
17241
|
function _string(Class2, params) {
|
|
@@ -17516,7 +18041,7 @@ function _refine(Class2, fn, _params) {
|
|
|
17516
18041
|
});
|
|
17517
18042
|
return schema;
|
|
17518
18043
|
}
|
|
17519
|
-
function _superRefine(fn) {
|
|
18044
|
+
function _superRefine(fn, params) {
|
|
17520
18045
|
const ch = _check((payload) => {
|
|
17521
18046
|
payload.addIssue = (issue2) => {
|
|
17522
18047
|
if (typeof issue2 === "string") {
|
|
@@ -17533,7 +18058,7 @@ function _superRefine(fn) {
|
|
|
17533
18058
|
}
|
|
17534
18059
|
};
|
|
17535
18060
|
return fn(payload.value, payload);
|
|
17536
|
-
});
|
|
18061
|
+
}, params);
|
|
17537
18062
|
return ch;
|
|
17538
18063
|
}
|
|
17539
18064
|
function _check(fn, params) {
|
|
@@ -17654,7 +18179,7 @@ function initializeContext(params) {
|
|
|
17654
18179
|
};
|
|
17655
18180
|
}
|
|
17656
18181
|
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
17657
|
-
var
|
|
18182
|
+
var _a3;
|
|
17658
18183
|
const def = schema._zod.def;
|
|
17659
18184
|
const seen = ctx.seen.get(schema);
|
|
17660
18185
|
if (seen) {
|
|
@@ -17701,8 +18226,8 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
17701
18226
|
delete result.schema.examples;
|
|
17702
18227
|
delete result.schema.default;
|
|
17703
18228
|
}
|
|
17704
|
-
if (ctx.io === "input" && result.schema
|
|
17705
|
-
(
|
|
18229
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
18230
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
17706
18231
|
delete result.schema._prefault;
|
|
17707
18232
|
const _result = ctx.seen.get(schema);
|
|
17708
18233
|
return _result.schema;
|
|
@@ -17871,7 +18396,7 @@ function finalize(ctx, schema) {
|
|
|
17871
18396
|
result.$schema = "http://json-schema.org/draft-07/schema#";
|
|
17872
18397
|
} else if (ctx.target === "draft-04") {
|
|
17873
18398
|
result.$schema = "http://json-schema.org/draft-04/schema#";
|
|
17874
|
-
} else if (ctx.target === "openapi-3.0") {}
|
|
18399
|
+
} else if (ctx.target === "openapi-3.0") {}
|
|
17875
18400
|
if (ctx.external?.uri) {
|
|
17876
18401
|
const id = ctx.external.registry.get(schema)?.id;
|
|
17877
18402
|
if (!id)
|
|
@@ -17879,10 +18404,15 @@ function finalize(ctx, schema) {
|
|
|
17879
18404
|
result.$id = ctx.external.uri(id);
|
|
17880
18405
|
}
|
|
17881
18406
|
Object.assign(result, root.def ?? root.schema);
|
|
18407
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
18408
|
+
if (rootMetaId !== undefined && result.id === rootMetaId)
|
|
18409
|
+
delete result.id;
|
|
17882
18410
|
const defs = ctx.external?.defs ?? {};
|
|
17883
18411
|
for (const entry of ctx.seen.entries()) {
|
|
17884
18412
|
const seen = entry[1];
|
|
17885
18413
|
if (seen.def && seen.defId) {
|
|
18414
|
+
if (seen.def.id === seen.defId)
|
|
18415
|
+
delete seen.def.id;
|
|
17886
18416
|
defs[seen.defId] = seen.def;
|
|
17887
18417
|
}
|
|
17888
18418
|
}
|
|
@@ -17937,6 +18467,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
17937
18467
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
17938
18468
|
}
|
|
17939
18469
|
if (def.type === "pipe") {
|
|
18470
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
18471
|
+
return true;
|
|
17940
18472
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
17941
18473
|
}
|
|
17942
18474
|
if (def.type === "object") {
|
|
@@ -18024,39 +18556,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
18024
18556
|
json.type = "integer";
|
|
18025
18557
|
else
|
|
18026
18558
|
json.type = "number";
|
|
18027
|
-
|
|
18028
|
-
|
|
18559
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
18560
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
18561
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
18562
|
+
if (exMin) {
|
|
18563
|
+
if (legacy) {
|
|
18029
18564
|
json.minimum = exclusiveMinimum;
|
|
18030
18565
|
json.exclusiveMinimum = true;
|
|
18031
18566
|
} else {
|
|
18032
18567
|
json.exclusiveMinimum = exclusiveMinimum;
|
|
18033
18568
|
}
|
|
18034
|
-
}
|
|
18035
|
-
if (typeof minimum === "number") {
|
|
18569
|
+
} else if (typeof minimum === "number") {
|
|
18036
18570
|
json.minimum = minimum;
|
|
18037
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
18038
|
-
if (exclusiveMinimum >= minimum)
|
|
18039
|
-
delete json.minimum;
|
|
18040
|
-
else
|
|
18041
|
-
delete json.exclusiveMinimum;
|
|
18042
|
-
}
|
|
18043
18571
|
}
|
|
18044
|
-
if (
|
|
18045
|
-
if (
|
|
18572
|
+
if (exMax) {
|
|
18573
|
+
if (legacy) {
|
|
18046
18574
|
json.maximum = exclusiveMaximum;
|
|
18047
18575
|
json.exclusiveMaximum = true;
|
|
18048
18576
|
} else {
|
|
18049
18577
|
json.exclusiveMaximum = exclusiveMaximum;
|
|
18050
18578
|
}
|
|
18051
|
-
}
|
|
18052
|
-
if (typeof maximum === "number") {
|
|
18579
|
+
} else if (typeof maximum === "number") {
|
|
18053
18580
|
json.maximum = maximum;
|
|
18054
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
18055
|
-
if (exclusiveMaximum <= maximum)
|
|
18056
|
-
delete json.maximum;
|
|
18057
|
-
else
|
|
18058
|
-
delete json.exclusiveMaximum;
|
|
18059
|
-
}
|
|
18060
18581
|
}
|
|
18061
18582
|
if (typeof multipleOf === "number")
|
|
18062
18583
|
json.multipleOf = multipleOf;
|
|
@@ -18119,7 +18640,7 @@ var literalProcessor = (schema, ctx, json, _params) => {
|
|
|
18119
18640
|
if (val === undefined) {
|
|
18120
18641
|
if (ctx.unrepresentable === "throw") {
|
|
18121
18642
|
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
18122
|
-
}
|
|
18643
|
+
}
|
|
18123
18644
|
} else if (typeof val === "bigint") {
|
|
18124
18645
|
if (ctx.unrepresentable === "throw") {
|
|
18125
18646
|
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
@@ -18224,7 +18745,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
18224
18745
|
if (typeof maximum === "number")
|
|
18225
18746
|
json.maxItems = maximum;
|
|
18226
18747
|
json.type = "array";
|
|
18227
|
-
json.items = process2(def.element, ctx, {
|
|
18748
|
+
json.items = process2(def.element, ctx, {
|
|
18749
|
+
...params,
|
|
18750
|
+
path: [...params.path, "items"]
|
|
18751
|
+
});
|
|
18228
18752
|
};
|
|
18229
18753
|
var objectProcessor = (schema, ctx, _json, params) => {
|
|
18230
18754
|
const json = _json;
|
|
@@ -18417,7 +18941,8 @@ var catchProcessor = (schema, ctx, json, params) => {
|
|
|
18417
18941
|
};
|
|
18418
18942
|
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
18419
18943
|
const def = schema._zod.def;
|
|
18420
|
-
const
|
|
18944
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
18945
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
18421
18946
|
process2(innerType, ctx, params);
|
|
18422
18947
|
const seen = ctx.seen.get(schema);
|
|
18423
18948
|
seen.ref = innerType;
|
|
@@ -18643,6 +19168,7 @@ __export(exports_schemas2, {
|
|
|
18643
19168
|
json: () => json,
|
|
18644
19169
|
ipv6: () => ipv62,
|
|
18645
19170
|
ipv4: () => ipv42,
|
|
19171
|
+
invertCodec: () => invertCodec,
|
|
18646
19172
|
intersection: () => intersection,
|
|
18647
19173
|
int64: () => int64,
|
|
18648
19174
|
int32: () => int32,
|
|
@@ -18703,6 +19229,7 @@ __export(exports_schemas2, {
|
|
|
18703
19229
|
ZodRecord: () => ZodRecord,
|
|
18704
19230
|
ZodReadonly: () => ZodReadonly,
|
|
18705
19231
|
ZodPromise: () => ZodPromise,
|
|
19232
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
18706
19233
|
ZodPrefault: () => ZodPrefault,
|
|
18707
19234
|
ZodPipe: () => ZodPipe,
|
|
18708
19235
|
ZodOptional: () => ZodOptional,
|
|
@@ -18857,8 +19384,8 @@ var initializer2 = (inst, issues) => {
|
|
|
18857
19384
|
}
|
|
18858
19385
|
});
|
|
18859
19386
|
};
|
|
18860
|
-
var ZodError = $constructor("ZodError", initializer2);
|
|
18861
|
-
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
19387
|
+
var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
19388
|
+
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
18862
19389
|
Parent: Error
|
|
18863
19390
|
});
|
|
18864
19391
|
|
|
@@ -18877,6 +19404,43 @@ var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
|
18877
19404
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
18878
19405
|
|
|
18879
19406
|
// node_modules/zod/v4/classic/schemas.js
|
|
19407
|
+
var _installedGroups = /* @__PURE__ */ new WeakMap;
|
|
19408
|
+
function _installLazyMethods(inst, group, methods) {
|
|
19409
|
+
const proto = Object.getPrototypeOf(inst);
|
|
19410
|
+
let installed = _installedGroups.get(proto);
|
|
19411
|
+
if (!installed) {
|
|
19412
|
+
installed = new Set;
|
|
19413
|
+
_installedGroups.set(proto, installed);
|
|
19414
|
+
}
|
|
19415
|
+
if (installed.has(group))
|
|
19416
|
+
return;
|
|
19417
|
+
installed.add(group);
|
|
19418
|
+
for (const key in methods) {
|
|
19419
|
+
const fn = methods[key];
|
|
19420
|
+
Object.defineProperty(proto, key, {
|
|
19421
|
+
configurable: true,
|
|
19422
|
+
enumerable: false,
|
|
19423
|
+
get() {
|
|
19424
|
+
const bound = fn.bind(this);
|
|
19425
|
+
Object.defineProperty(this, key, {
|
|
19426
|
+
configurable: true,
|
|
19427
|
+
writable: true,
|
|
19428
|
+
enumerable: true,
|
|
19429
|
+
value: bound
|
|
19430
|
+
});
|
|
19431
|
+
return bound;
|
|
19432
|
+
},
|
|
19433
|
+
set(v) {
|
|
19434
|
+
Object.defineProperty(this, key, {
|
|
19435
|
+
configurable: true,
|
|
19436
|
+
writable: true,
|
|
19437
|
+
enumerable: true,
|
|
19438
|
+
value: v
|
|
19439
|
+
});
|
|
19440
|
+
}
|
|
19441
|
+
});
|
|
19442
|
+
}
|
|
19443
|
+
}
|
|
18880
19444
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
18881
19445
|
$ZodType.init(inst, def);
|
|
18882
19446
|
Object.assign(inst["~standard"], {
|
|
@@ -18889,23 +19453,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
18889
19453
|
inst.def = def;
|
|
18890
19454
|
inst.type = def.type;
|
|
18891
19455
|
Object.defineProperty(inst, "_def", { value: def });
|
|
18892
|
-
inst.check = (...checks2) => {
|
|
18893
|
-
return inst.clone(exports_util.mergeDefs(def, {
|
|
18894
|
-
checks: [
|
|
18895
|
-
...def.checks ?? [],
|
|
18896
|
-
...checks2.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
18897
|
-
]
|
|
18898
|
-
}), {
|
|
18899
|
-
parent: true
|
|
18900
|
-
});
|
|
18901
|
-
};
|
|
18902
|
-
inst.with = inst.check;
|
|
18903
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
18904
|
-
inst.brand = () => inst;
|
|
18905
|
-
inst.register = (reg, meta2) => {
|
|
18906
|
-
reg.add(inst, meta2);
|
|
18907
|
-
return inst;
|
|
18908
|
-
};
|
|
18909
19456
|
inst.parse = (data, params) => parse3(inst, data, params, { callee: inst.parse });
|
|
18910
19457
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
18911
19458
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -18919,45 +19466,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
18919
19466
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
18920
19467
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
18921
19468
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
18922
|
-
inst
|
|
18923
|
-
|
|
18924
|
-
|
|
18925
|
-
|
|
18926
|
-
|
|
18927
|
-
|
|
18928
|
-
|
|
18929
|
-
|
|
18930
|
-
|
|
18931
|
-
|
|
18932
|
-
|
|
18933
|
-
|
|
18934
|
-
|
|
18935
|
-
|
|
18936
|
-
|
|
18937
|
-
|
|
18938
|
-
|
|
18939
|
-
|
|
18940
|
-
|
|
18941
|
-
|
|
18942
|
-
|
|
18943
|
-
|
|
19469
|
+
_installLazyMethods(inst, "ZodType", {
|
|
19470
|
+
check(...chks) {
|
|
19471
|
+
const def2 = this.def;
|
|
19472
|
+
return this.clone(exports_util.mergeDefs(def2, {
|
|
19473
|
+
checks: [
|
|
19474
|
+
...def2.checks ?? [],
|
|
19475
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
19476
|
+
]
|
|
19477
|
+
}), { parent: true });
|
|
19478
|
+
},
|
|
19479
|
+
with(...chks) {
|
|
19480
|
+
return this.check(...chks);
|
|
19481
|
+
},
|
|
19482
|
+
clone(def2, params) {
|
|
19483
|
+
return clone(this, def2, params);
|
|
19484
|
+
},
|
|
19485
|
+
brand() {
|
|
19486
|
+
return this;
|
|
19487
|
+
},
|
|
19488
|
+
register(reg, meta2) {
|
|
19489
|
+
reg.add(this, meta2);
|
|
19490
|
+
return this;
|
|
19491
|
+
},
|
|
19492
|
+
refine(check, params) {
|
|
19493
|
+
return this.check(refine(check, params));
|
|
19494
|
+
},
|
|
19495
|
+
superRefine(refinement, params) {
|
|
19496
|
+
return this.check(superRefine(refinement, params));
|
|
19497
|
+
},
|
|
19498
|
+
overwrite(fn) {
|
|
19499
|
+
return this.check(_overwrite(fn));
|
|
19500
|
+
},
|
|
19501
|
+
optional() {
|
|
19502
|
+
return optional(this);
|
|
19503
|
+
},
|
|
19504
|
+
exactOptional() {
|
|
19505
|
+
return exactOptional(this);
|
|
19506
|
+
},
|
|
19507
|
+
nullable() {
|
|
19508
|
+
return nullable(this);
|
|
19509
|
+
},
|
|
19510
|
+
nullish() {
|
|
19511
|
+
return optional(nullable(this));
|
|
19512
|
+
},
|
|
19513
|
+
nonoptional(params) {
|
|
19514
|
+
return nonoptional(this, params);
|
|
19515
|
+
},
|
|
19516
|
+
array() {
|
|
19517
|
+
return array(this);
|
|
19518
|
+
},
|
|
19519
|
+
or(arg) {
|
|
19520
|
+
return union([this, arg]);
|
|
19521
|
+
},
|
|
19522
|
+
and(arg) {
|
|
19523
|
+
return intersection(this, arg);
|
|
19524
|
+
},
|
|
19525
|
+
transform(tx) {
|
|
19526
|
+
return pipe(this, transform(tx));
|
|
19527
|
+
},
|
|
19528
|
+
default(d) {
|
|
19529
|
+
return _default2(this, d);
|
|
19530
|
+
},
|
|
19531
|
+
prefault(d) {
|
|
19532
|
+
return prefault(this, d);
|
|
19533
|
+
},
|
|
19534
|
+
catch(params) {
|
|
19535
|
+
return _catch2(this, params);
|
|
19536
|
+
},
|
|
19537
|
+
pipe(target) {
|
|
19538
|
+
return pipe(this, target);
|
|
19539
|
+
},
|
|
19540
|
+
readonly() {
|
|
19541
|
+
return readonly(this);
|
|
19542
|
+
},
|
|
19543
|
+
describe(description) {
|
|
19544
|
+
const cl = this.clone();
|
|
19545
|
+
globalRegistry.add(cl, { description });
|
|
19546
|
+
return cl;
|
|
19547
|
+
},
|
|
19548
|
+
meta(...args) {
|
|
19549
|
+
if (args.length === 0)
|
|
19550
|
+
return globalRegistry.get(this);
|
|
19551
|
+
const cl = this.clone();
|
|
19552
|
+
globalRegistry.add(cl, args[0]);
|
|
19553
|
+
return cl;
|
|
19554
|
+
},
|
|
19555
|
+
isOptional() {
|
|
19556
|
+
return this.safeParse(undefined).success;
|
|
19557
|
+
},
|
|
19558
|
+
isNullable() {
|
|
19559
|
+
return this.safeParse(null).success;
|
|
19560
|
+
},
|
|
19561
|
+
apply(fn) {
|
|
19562
|
+
return fn(this);
|
|
19563
|
+
}
|
|
19564
|
+
});
|
|
18944
19565
|
Object.defineProperty(inst, "description", {
|
|
18945
19566
|
get() {
|
|
18946
19567
|
return globalRegistry.get(inst)?.description;
|
|
18947
19568
|
},
|
|
18948
19569
|
configurable: true
|
|
18949
19570
|
});
|
|
18950
|
-
inst.meta = (...args) => {
|
|
18951
|
-
if (args.length === 0) {
|
|
18952
|
-
return globalRegistry.get(inst);
|
|
18953
|
-
}
|
|
18954
|
-
const cl = inst.clone();
|
|
18955
|
-
globalRegistry.add(cl, args[0]);
|
|
18956
|
-
return cl;
|
|
18957
|
-
};
|
|
18958
|
-
inst.isOptional = () => inst.safeParse(undefined).success;
|
|
18959
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
18960
|
-
inst.apply = (fn) => fn(inst);
|
|
18961
19571
|
return inst;
|
|
18962
19572
|
});
|
|
18963
19573
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -18968,21 +19578,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
18968
19578
|
inst.format = bag.format ?? null;
|
|
18969
19579
|
inst.minLength = bag.minimum ?? null;
|
|
18970
19580
|
inst.maxLength = bag.maximum ?? null;
|
|
18971
|
-
inst
|
|
18972
|
-
|
|
18973
|
-
|
|
18974
|
-
|
|
18975
|
-
|
|
18976
|
-
|
|
18977
|
-
|
|
18978
|
-
|
|
18979
|
-
|
|
18980
|
-
|
|
18981
|
-
|
|
18982
|
-
|
|
18983
|
-
|
|
18984
|
-
|
|
18985
|
-
|
|
19581
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
19582
|
+
regex(...args) {
|
|
19583
|
+
return this.check(_regex(...args));
|
|
19584
|
+
},
|
|
19585
|
+
includes(...args) {
|
|
19586
|
+
return this.check(_includes(...args));
|
|
19587
|
+
},
|
|
19588
|
+
startsWith(...args) {
|
|
19589
|
+
return this.check(_startsWith(...args));
|
|
19590
|
+
},
|
|
19591
|
+
endsWith(...args) {
|
|
19592
|
+
return this.check(_endsWith(...args));
|
|
19593
|
+
},
|
|
19594
|
+
min(...args) {
|
|
19595
|
+
return this.check(_minLength(...args));
|
|
19596
|
+
},
|
|
19597
|
+
max(...args) {
|
|
19598
|
+
return this.check(_maxLength(...args));
|
|
19599
|
+
},
|
|
19600
|
+
length(...args) {
|
|
19601
|
+
return this.check(_length(...args));
|
|
19602
|
+
},
|
|
19603
|
+
nonempty(...args) {
|
|
19604
|
+
return this.check(_minLength(1, ...args));
|
|
19605
|
+
},
|
|
19606
|
+
lowercase(params) {
|
|
19607
|
+
return this.check(_lowercase(params));
|
|
19608
|
+
},
|
|
19609
|
+
uppercase(params) {
|
|
19610
|
+
return this.check(_uppercase(params));
|
|
19611
|
+
},
|
|
19612
|
+
trim() {
|
|
19613
|
+
return this.check(_trim());
|
|
19614
|
+
},
|
|
19615
|
+
normalize(...args) {
|
|
19616
|
+
return this.check(_normalize(...args));
|
|
19617
|
+
},
|
|
19618
|
+
toLowerCase() {
|
|
19619
|
+
return this.check(_toLowerCase());
|
|
19620
|
+
},
|
|
19621
|
+
toUpperCase() {
|
|
19622
|
+
return this.check(_toUpperCase());
|
|
19623
|
+
},
|
|
19624
|
+
slugify() {
|
|
19625
|
+
return this.check(_slugify());
|
|
19626
|
+
}
|
|
19627
|
+
});
|
|
18986
19628
|
});
|
|
18987
19629
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
18988
19630
|
$ZodString.init(inst, def);
|
|
@@ -19061,7 +19703,7 @@ function url(params) {
|
|
|
19061
19703
|
}
|
|
19062
19704
|
function httpUrl(params) {
|
|
19063
19705
|
return _url(ZodURL, {
|
|
19064
|
-
protocol:
|
|
19706
|
+
protocol: exports_regexes.httpProtocol,
|
|
19065
19707
|
hostname: exports_regexes.domain,
|
|
19066
19708
|
...exports_util.normalizeParams(params)
|
|
19067
19709
|
});
|
|
@@ -19203,21 +19845,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
19203
19845
|
$ZodNumber.init(inst, def);
|
|
19204
19846
|
ZodType.init(inst, def);
|
|
19205
19847
|
inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
|
|
19206
|
-
inst
|
|
19207
|
-
|
|
19208
|
-
|
|
19209
|
-
|
|
19210
|
-
|
|
19211
|
-
|
|
19212
|
-
|
|
19213
|
-
|
|
19214
|
-
|
|
19215
|
-
|
|
19216
|
-
|
|
19217
|
-
|
|
19218
|
-
|
|
19219
|
-
|
|
19220
|
-
|
|
19848
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
19849
|
+
gt(value, params) {
|
|
19850
|
+
return this.check(_gt(value, params));
|
|
19851
|
+
},
|
|
19852
|
+
gte(value, params) {
|
|
19853
|
+
return this.check(_gte(value, params));
|
|
19854
|
+
},
|
|
19855
|
+
min(value, params) {
|
|
19856
|
+
return this.check(_gte(value, params));
|
|
19857
|
+
},
|
|
19858
|
+
lt(value, params) {
|
|
19859
|
+
return this.check(_lt(value, params));
|
|
19860
|
+
},
|
|
19861
|
+
lte(value, params) {
|
|
19862
|
+
return this.check(_lte(value, params));
|
|
19863
|
+
},
|
|
19864
|
+
max(value, params) {
|
|
19865
|
+
return this.check(_lte(value, params));
|
|
19866
|
+
},
|
|
19867
|
+
int(params) {
|
|
19868
|
+
return this.check(int(params));
|
|
19869
|
+
},
|
|
19870
|
+
safe(params) {
|
|
19871
|
+
return this.check(int(params));
|
|
19872
|
+
},
|
|
19873
|
+
positive(params) {
|
|
19874
|
+
return this.check(_gt(0, params));
|
|
19875
|
+
},
|
|
19876
|
+
nonnegative(params) {
|
|
19877
|
+
return this.check(_gte(0, params));
|
|
19878
|
+
},
|
|
19879
|
+
negative(params) {
|
|
19880
|
+
return this.check(_lt(0, params));
|
|
19881
|
+
},
|
|
19882
|
+
nonpositive(params) {
|
|
19883
|
+
return this.check(_lte(0, params));
|
|
19884
|
+
},
|
|
19885
|
+
multipleOf(value, params) {
|
|
19886
|
+
return this.check(_multipleOf(value, params));
|
|
19887
|
+
},
|
|
19888
|
+
step(value, params) {
|
|
19889
|
+
return this.check(_multipleOf(value, params));
|
|
19890
|
+
},
|
|
19891
|
+
finite() {
|
|
19892
|
+
return this;
|
|
19893
|
+
}
|
|
19894
|
+
});
|
|
19221
19895
|
const bag = inst._zod.bag;
|
|
19222
19896
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
19223
19897
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -19364,11 +20038,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
|
19364
20038
|
ZodType.init(inst, def);
|
|
19365
20039
|
inst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);
|
|
19366
20040
|
inst.element = def.element;
|
|
19367
|
-
inst
|
|
19368
|
-
|
|
19369
|
-
|
|
19370
|
-
|
|
19371
|
-
|
|
20041
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
20042
|
+
min(n, params) {
|
|
20043
|
+
return this.check(_minLength(n, params));
|
|
20044
|
+
},
|
|
20045
|
+
nonempty(params) {
|
|
20046
|
+
return this.check(_minLength(1, params));
|
|
20047
|
+
},
|
|
20048
|
+
max(n, params) {
|
|
20049
|
+
return this.check(_maxLength(n, params));
|
|
20050
|
+
},
|
|
20051
|
+
length(n, params) {
|
|
20052
|
+
return this.check(_length(n, params));
|
|
20053
|
+
},
|
|
20054
|
+
unwrap() {
|
|
20055
|
+
return this.element;
|
|
20056
|
+
}
|
|
20057
|
+
});
|
|
19372
20058
|
});
|
|
19373
20059
|
function array(element, params) {
|
|
19374
20060
|
return _array(ZodArray, element, params);
|
|
@@ -19384,23 +20070,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
19384
20070
|
exports_util.defineLazy(inst, "shape", () => {
|
|
19385
20071
|
return def.shape;
|
|
19386
20072
|
});
|
|
19387
|
-
inst
|
|
19388
|
-
|
|
19389
|
-
|
|
19390
|
-
|
|
19391
|
-
|
|
19392
|
-
|
|
19393
|
-
|
|
19394
|
-
|
|
19395
|
-
|
|
19396
|
-
|
|
19397
|
-
|
|
19398
|
-
|
|
19399
|
-
|
|
19400
|
-
|
|
19401
|
-
|
|
19402
|
-
|
|
19403
|
-
|
|
20073
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
20074
|
+
keyof() {
|
|
20075
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
20076
|
+
},
|
|
20077
|
+
catchall(catchall) {
|
|
20078
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
20079
|
+
},
|
|
20080
|
+
passthrough() {
|
|
20081
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
20082
|
+
},
|
|
20083
|
+
loose() {
|
|
20084
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
20085
|
+
},
|
|
20086
|
+
strict() {
|
|
20087
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
20088
|
+
},
|
|
20089
|
+
strip() {
|
|
20090
|
+
return this.clone({ ...this._zod.def, catchall: undefined });
|
|
20091
|
+
},
|
|
20092
|
+
extend(incoming) {
|
|
20093
|
+
return exports_util.extend(this, incoming);
|
|
20094
|
+
},
|
|
20095
|
+
safeExtend(incoming) {
|
|
20096
|
+
return exports_util.safeExtend(this, incoming);
|
|
20097
|
+
},
|
|
20098
|
+
merge(other) {
|
|
20099
|
+
return exports_util.merge(this, other);
|
|
20100
|
+
},
|
|
20101
|
+
pick(mask) {
|
|
20102
|
+
return exports_util.pick(this, mask);
|
|
20103
|
+
},
|
|
20104
|
+
omit(mask) {
|
|
20105
|
+
return exports_util.omit(this, mask);
|
|
20106
|
+
},
|
|
20107
|
+
partial(...args) {
|
|
20108
|
+
return exports_util.partial(ZodOptional, this, args[0]);
|
|
20109
|
+
},
|
|
20110
|
+
required(...args) {
|
|
20111
|
+
return exports_util.required(ZodNonOptional, this, args[0]);
|
|
20112
|
+
}
|
|
20113
|
+
});
|
|
19404
20114
|
});
|
|
19405
20115
|
function object(shape, params) {
|
|
19406
20116
|
const def = {
|
|
@@ -19505,6 +20215,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
|
19505
20215
|
inst.valueType = def.valueType;
|
|
19506
20216
|
});
|
|
19507
20217
|
function record(keyType, valueType, params) {
|
|
20218
|
+
if (!valueType || !valueType._zod) {
|
|
20219
|
+
return new ZodRecord({
|
|
20220
|
+
type: "record",
|
|
20221
|
+
keyType: string2(),
|
|
20222
|
+
valueType: keyType,
|
|
20223
|
+
...exports_util.normalizeParams(valueType)
|
|
20224
|
+
});
|
|
20225
|
+
}
|
|
19508
20226
|
return new ZodRecord({
|
|
19509
20227
|
type: "record",
|
|
19510
20228
|
keyType,
|
|
@@ -19676,10 +20394,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
19676
20394
|
if (output instanceof Promise) {
|
|
19677
20395
|
return output.then((output2) => {
|
|
19678
20396
|
payload.value = output2;
|
|
20397
|
+
payload.fallback = true;
|
|
19679
20398
|
return payload;
|
|
19680
20399
|
});
|
|
19681
20400
|
}
|
|
19682
20401
|
payload.value = output;
|
|
20402
|
+
payload.fallback = true;
|
|
19683
20403
|
return payload;
|
|
19684
20404
|
};
|
|
19685
20405
|
});
|
|
@@ -19833,6 +20553,20 @@ function codec(in_, out, params) {
|
|
|
19833
20553
|
reverseTransform: params.encode
|
|
19834
20554
|
});
|
|
19835
20555
|
}
|
|
20556
|
+
function invertCodec(codec2) {
|
|
20557
|
+
const def = codec2._zod.def;
|
|
20558
|
+
return new ZodCodec({
|
|
20559
|
+
type: "pipe",
|
|
20560
|
+
in: def.out,
|
|
20561
|
+
out: def.in,
|
|
20562
|
+
transform: def.reverseTransform,
|
|
20563
|
+
reverseTransform: def.transform
|
|
20564
|
+
});
|
|
20565
|
+
}
|
|
20566
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
20567
|
+
ZodPipe.init(inst, def);
|
|
20568
|
+
$ZodPreprocess.init(inst, def);
|
|
20569
|
+
});
|
|
19836
20570
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
19837
20571
|
$ZodReadonly.init(inst, def);
|
|
19838
20572
|
ZodType.init(inst, def);
|
|
@@ -19911,8 +20645,8 @@ function custom(fn, _params) {
|
|
|
19911
20645
|
function refine(fn, _params = {}) {
|
|
19912
20646
|
return _refine(ZodCustom, fn, _params);
|
|
19913
20647
|
}
|
|
19914
|
-
function superRefine(fn) {
|
|
19915
|
-
return _superRefine(fn);
|
|
20648
|
+
function superRefine(fn, params) {
|
|
20649
|
+
return _superRefine(fn, params);
|
|
19916
20650
|
}
|
|
19917
20651
|
var describe2 = describe;
|
|
19918
20652
|
var meta2 = meta;
|
|
@@ -19950,7 +20684,11 @@ function json(params) {
|
|
|
19950
20684
|
return jsonSchema;
|
|
19951
20685
|
}
|
|
19952
20686
|
function preprocess(fn, schema) {
|
|
19953
|
-
return
|
|
20687
|
+
return new ZodPreprocess({
|
|
20688
|
+
type: "pipe",
|
|
20689
|
+
in: transform(fn),
|
|
20690
|
+
out: schema
|
|
20691
|
+
});
|
|
19954
20692
|
}
|
|
19955
20693
|
// node_modules/zod/v4/classic/compat.js
|
|
19956
20694
|
var ZodIssueCode = {
|
|
@@ -19982,7 +20720,7 @@ var z = {
|
|
|
19982
20720
|
...exports_checks2,
|
|
19983
20721
|
iso: exports_iso
|
|
19984
20722
|
};
|
|
19985
|
-
var RECOGNIZED_KEYS = new Set([
|
|
20723
|
+
var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
|
|
19986
20724
|
"$schema",
|
|
19987
20725
|
"$ref",
|
|
19988
20726
|
"$defs",
|
|
@@ -20356,12 +21094,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
20356
21094
|
default:
|
|
20357
21095
|
throw new Error(`Unsupported type: ${type}`);
|
|
20358
21096
|
}
|
|
20359
|
-
if (schema.description) {
|
|
20360
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
20361
|
-
}
|
|
20362
|
-
if (schema.default !== undefined) {
|
|
20363
|
-
zodSchema = zodSchema.default(schema.default);
|
|
20364
|
-
}
|
|
20365
21097
|
return zodSchema;
|
|
20366
21098
|
}
|
|
20367
21099
|
function convertSchema(schema, ctx) {
|
|
@@ -20398,6 +21130,9 @@ function convertSchema(schema, ctx) {
|
|
|
20398
21130
|
if (schema.readOnly === true) {
|
|
20399
21131
|
baseSchema = z.readonly(baseSchema);
|
|
20400
21132
|
}
|
|
21133
|
+
if (schema.default !== undefined) {
|
|
21134
|
+
baseSchema = baseSchema.default(schema.default);
|
|
21135
|
+
}
|
|
20401
21136
|
const extraMeta = {};
|
|
20402
21137
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
20403
21138
|
for (const key of coreMetadataKeys) {
|
|
@@ -20419,23 +21154,32 @@ function convertSchema(schema, ctx) {
|
|
|
20419
21154
|
if (Object.keys(extraMeta).length > 0) {
|
|
20420
21155
|
ctx.registry.add(baseSchema, extraMeta);
|
|
20421
21156
|
}
|
|
21157
|
+
if (schema.description) {
|
|
21158
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
21159
|
+
}
|
|
20422
21160
|
return baseSchema;
|
|
20423
21161
|
}
|
|
20424
21162
|
function fromJSONSchema(schema, params) {
|
|
20425
21163
|
if (typeof schema === "boolean") {
|
|
20426
21164
|
return schema ? z.any() : z.never();
|
|
20427
21165
|
}
|
|
20428
|
-
|
|
20429
|
-
|
|
21166
|
+
let normalized;
|
|
21167
|
+
try {
|
|
21168
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
21169
|
+
} catch {
|
|
21170
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
21171
|
+
}
|
|
21172
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
21173
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
20430
21174
|
const ctx = {
|
|
20431
21175
|
version: version2,
|
|
20432
21176
|
defs,
|
|
20433
21177
|
refs: new Map,
|
|
20434
21178
|
processing: new Set,
|
|
20435
|
-
rootSchema:
|
|
21179
|
+
rootSchema: normalized,
|
|
20436
21180
|
registry: params?.registry ?? globalRegistry
|
|
20437
21181
|
};
|
|
20438
|
-
return convertSchema(
|
|
21182
|
+
return convertSchema(normalized, ctx);
|
|
20439
21183
|
}
|
|
20440
21184
|
// node_modules/zod/v4/classic/coerce.js
|
|
20441
21185
|
var exports_coerce = {};
|
|
@@ -21083,8 +21827,8 @@ Cleaned from: "${commentWithMeta.text}"`
|
|
|
21083
21827
|
}
|
|
21084
21828
|
}
|
|
21085
21829
|
}
|
|
21086
|
-
} catch (
|
|
21087
|
-
console.warn("Failed to parse YAML comments:",
|
|
21830
|
+
} catch (error51) {
|
|
21831
|
+
console.warn("Failed to parse YAML comments:", error51);
|
|
21088
21832
|
}
|
|
21089
21833
|
return comments;
|
|
21090
21834
|
}
|
|
@@ -21127,10 +21871,10 @@ async function runCommand(command, args) {
|
|
|
21127
21871
|
} else {
|
|
21128
21872
|
throw new Error(`Command "${command} ${args.join(" ")}" failed with code ${exitCode.toString()}`);
|
|
21129
21873
|
}
|
|
21130
|
-
} catch (
|
|
21131
|
-
const parseResult = ErrorSchema.safeParse(
|
|
21132
|
-
const errorMessage = parseResult.success ? parseResult.data.message : String(
|
|
21133
|
-
throw new Error(`Failed to spawn command "${command} ${args.join(" ")}": ${errorMessage}
|
|
21874
|
+
} catch (error51) {
|
|
21875
|
+
const parseResult = ErrorSchema.safeParse(error51);
|
|
21876
|
+
const errorMessage = parseResult.success ? parseResult.data.message : String(error51);
|
|
21877
|
+
throw new Error(`Failed to spawn command "${command} ${args.join(" ")}": ${errorMessage}`, { cause: error51 });
|
|
21134
21878
|
}
|
|
21135
21879
|
}
|
|
21136
21880
|
async function fetchHelmChart(chart) {
|
|
@@ -21181,8 +21925,8 @@ async function fetchHelmChart(chart) {
|
|
|
21181
21925
|
console.warn(` ⚠️ Falling back to unvalidated object for type generation`);
|
|
21182
21926
|
return { values: recordParseResult.data, schema, yamlComments };
|
|
21183
21927
|
}
|
|
21184
|
-
} catch (
|
|
21185
|
-
console.warn(` ⚠️ Failed to read/parse values.yaml: ${String(
|
|
21928
|
+
} catch (error51) {
|
|
21929
|
+
console.warn(` ⚠️ Failed to read/parse values.yaml: ${String(error51)}`);
|
|
21186
21930
|
return { values: {}, schema: null, yamlComments: new Map };
|
|
21187
21931
|
}
|
|
21188
21932
|
} finally {
|
|
@@ -22069,12 +22813,12 @@ Run with --help for usage information`);
|
|
|
22069
22813
|
console.log(code);
|
|
22070
22814
|
}
|
|
22071
22815
|
process.exit(0);
|
|
22072
|
-
} catch (
|
|
22073
|
-
const parseResult = ErrorSchema2.safeParse(
|
|
22816
|
+
} catch (error51) {
|
|
22817
|
+
const parseResult = ErrorSchema2.safeParse(error51);
|
|
22074
22818
|
if (parseResult.success) {
|
|
22075
22819
|
console.error(`Error: ${parseResult.data.message}`);
|
|
22076
22820
|
} else {
|
|
22077
|
-
console.error(`Error: ${String(
|
|
22821
|
+
console.error(`Error: ${String(error51)}`);
|
|
22078
22822
|
}
|
|
22079
22823
|
process.exit(1);
|
|
22080
22824
|
}
|