@agentcash/discovery 1.6.4 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -3
- package/README.md +123 -101
- package/dist/cli.cjs +1365 -850
- package/dist/cli.js +1366 -851
- package/dist/index.cjs +1402 -892
- package/dist/index.d.cts +17 -126
- package/dist/index.d.ts +17 -126
- package/dist/index.js +1390 -878
- package/dist/schemas.cjs +1250 -530
- package/dist/schemas.d.cts +1 -32
- package/dist/schemas.d.ts +1 -32
- package/dist/schemas.js +1249 -527
- package/docs/SPECIFICATION.md +270 -0
- package/docs/VALIDATION_DIAGNOSTICS_DESIGN_2026-03-03.md +117 -0
- package/package.json +24 -22
- package/dist/flags.cjs +0 -44
- package/dist/flags.d.cts +0 -6
- package/dist/flags.d.ts +0 -6
- package/dist/flags.js +0 -17
package/dist/cli.js
CHANGED
|
@@ -5,9 +5,9 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/core/source/openapi/index.ts
|
|
8
|
-
import {
|
|
8
|
+
import { err, ok, okAsync, ResultAsync as ResultAsync2 } from "neverthrow";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/zod@4.3
|
|
10
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
11
11
|
var external_exports = {};
|
|
12
12
|
__export(external_exports, {
|
|
13
13
|
$brand: () => $brand,
|
|
@@ -69,6 +69,7 @@ __export(external_exports, {
|
|
|
69
69
|
ZodOptional: () => ZodOptional,
|
|
70
70
|
ZodPipe: () => ZodPipe,
|
|
71
71
|
ZodPrefault: () => ZodPrefault,
|
|
72
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
72
73
|
ZodPromise: () => ZodPromise,
|
|
73
74
|
ZodReadonly: () => ZodReadonly,
|
|
74
75
|
ZodRealError: () => ZodRealError,
|
|
@@ -147,6 +148,7 @@ __export(external_exports, {
|
|
|
147
148
|
int32: () => int32,
|
|
148
149
|
int64: () => int64,
|
|
149
150
|
intersection: () => intersection,
|
|
151
|
+
invertCodec: () => invertCodec,
|
|
150
152
|
ipv4: () => ipv42,
|
|
151
153
|
ipv6: () => ipv62,
|
|
152
154
|
iso: () => iso_exports,
|
|
@@ -248,7 +250,7 @@ __export(external_exports, {
|
|
|
248
250
|
xor: () => xor
|
|
249
251
|
});
|
|
250
252
|
|
|
251
|
-
// node_modules/.pnpm/zod@4.3
|
|
253
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/index.js
|
|
252
254
|
var core_exports2 = {};
|
|
253
255
|
__export(core_exports2, {
|
|
254
256
|
$ZodAny: () => $ZodAny,
|
|
@@ -328,6 +330,7 @@ __export(core_exports2, {
|
|
|
328
330
|
$ZodOptional: () => $ZodOptional,
|
|
329
331
|
$ZodPipe: () => $ZodPipe,
|
|
330
332
|
$ZodPrefault: () => $ZodPrefault,
|
|
333
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
331
334
|
$ZodPromise: () => $ZodPromise,
|
|
332
335
|
$ZodReadonly: () => $ZodReadonly,
|
|
333
336
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -526,8 +529,9 @@ __export(core_exports2, {
|
|
|
526
529
|
version: () => version
|
|
527
530
|
});
|
|
528
531
|
|
|
529
|
-
// node_modules/.pnpm/zod@4.3
|
|
530
|
-
var
|
|
532
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
|
|
533
|
+
var _a;
|
|
534
|
+
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
531
535
|
status: "aborted"
|
|
532
536
|
});
|
|
533
537
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -562,10 +566,10 @@ function $constructor(name, initializer3, params) {
|
|
|
562
566
|
}
|
|
563
567
|
Object.defineProperty(Definition, "name", { value: name });
|
|
564
568
|
function _(def) {
|
|
565
|
-
var
|
|
569
|
+
var _a3;
|
|
566
570
|
const inst = params?.Parent ? new Definition() : this;
|
|
567
571
|
init(inst, def);
|
|
568
|
-
(
|
|
572
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
569
573
|
for (const fn of inst._zod.deferred) {
|
|
570
574
|
fn();
|
|
571
575
|
}
|
|
@@ -594,14 +598,15 @@ var $ZodEncodeError = class extends Error {
|
|
|
594
598
|
this.name = "ZodEncodeError";
|
|
595
599
|
}
|
|
596
600
|
};
|
|
597
|
-
|
|
601
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
602
|
+
var globalConfig = globalThis.__zod_globalConfig;
|
|
598
603
|
function config(newConfig) {
|
|
599
604
|
if (newConfig)
|
|
600
605
|
Object.assign(globalConfig, newConfig);
|
|
601
606
|
return globalConfig;
|
|
602
607
|
}
|
|
603
608
|
|
|
604
|
-
// node_modules/.pnpm/zod@4.3
|
|
609
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
|
|
605
610
|
var util_exports = {};
|
|
606
611
|
__export(util_exports, {
|
|
607
612
|
BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
|
|
@@ -627,6 +632,7 @@ __export(util_exports, {
|
|
|
627
632
|
defineLazy: () => defineLazy,
|
|
628
633
|
esc: () => esc,
|
|
629
634
|
escapeRegex: () => escapeRegex,
|
|
635
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
630
636
|
extend: () => extend,
|
|
631
637
|
finalizeIssue: () => finalizeIssue,
|
|
632
638
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
@@ -715,19 +721,12 @@ function cleanRegex(source) {
|
|
|
715
721
|
return source.slice(start, end);
|
|
716
722
|
}
|
|
717
723
|
function floatSafeRemainder(val, step) {
|
|
718
|
-
const
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
if (
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
728
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
729
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
730
|
-
return valInt % stepInt / 10 ** decCount;
|
|
724
|
+
const ratio = val / step;
|
|
725
|
+
const roundedRatio = Math.round(ratio);
|
|
726
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
727
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
728
|
+
return 0;
|
|
729
|
+
return ratio - roundedRatio;
|
|
731
730
|
}
|
|
732
731
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
733
732
|
function defineLazy(object2, key, getter) {
|
|
@@ -809,7 +808,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
|
|
|
809
808
|
function isObject(data) {
|
|
810
809
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
811
810
|
}
|
|
812
|
-
var allowsEval = cached(() => {
|
|
811
|
+
var allowsEval = /* @__PURE__ */ cached(() => {
|
|
812
|
+
if (globalConfig.jitless) {
|
|
813
|
+
return false;
|
|
814
|
+
}
|
|
813
815
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
814
816
|
return false;
|
|
815
817
|
}
|
|
@@ -842,6 +844,10 @@ function shallowClone(o) {
|
|
|
842
844
|
return { ...o };
|
|
843
845
|
if (Array.isArray(o))
|
|
844
846
|
return [...o];
|
|
847
|
+
if (o instanceof Map)
|
|
848
|
+
return new Map(o);
|
|
849
|
+
if (o instanceof Set)
|
|
850
|
+
return new Set(o);
|
|
845
851
|
return o;
|
|
846
852
|
}
|
|
847
853
|
function numKeys(data) {
|
|
@@ -898,7 +904,14 @@ var getParsedType = (data) => {
|
|
|
898
904
|
}
|
|
899
905
|
};
|
|
900
906
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
901
|
-
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
907
|
+
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
908
|
+
"string",
|
|
909
|
+
"number",
|
|
910
|
+
"bigint",
|
|
911
|
+
"boolean",
|
|
912
|
+
"symbol",
|
|
913
|
+
"undefined"
|
|
914
|
+
]);
|
|
902
915
|
function escapeRegex(str) {
|
|
903
916
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
904
917
|
}
|
|
@@ -1067,6 +1080,9 @@ function safeExtend(schema, shape) {
|
|
|
1067
1080
|
return clone(schema, def);
|
|
1068
1081
|
}
|
|
1069
1082
|
function merge(a, b) {
|
|
1083
|
+
if (a._zod.def.checks?.length) {
|
|
1084
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
1085
|
+
}
|
|
1070
1086
|
const def = mergeDefs(a._zod.def, {
|
|
1071
1087
|
get shape() {
|
|
1072
1088
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -1076,8 +1092,7 @@ function merge(a, b) {
|
|
|
1076
1092
|
get catchall() {
|
|
1077
1093
|
return b._zod.def.catchall;
|
|
1078
1094
|
},
|
|
1079
|
-
checks: []
|
|
1080
|
-
// delete existing checks
|
|
1095
|
+
checks: b._zod.def.checks ?? []
|
|
1081
1096
|
});
|
|
1082
1097
|
return clone(a, def);
|
|
1083
1098
|
}
|
|
@@ -1160,10 +1175,20 @@ function aborted(x, startIndex = 0) {
|
|
|
1160
1175
|
}
|
|
1161
1176
|
return false;
|
|
1162
1177
|
}
|
|
1178
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
1179
|
+
if (x.aborted === true)
|
|
1180
|
+
return true;
|
|
1181
|
+
for (let i = startIndex; i < x.issues.length; i++) {
|
|
1182
|
+
if (x.issues[i]?.continue === false) {
|
|
1183
|
+
return true;
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
return false;
|
|
1187
|
+
}
|
|
1163
1188
|
function prefixIssues(path, issues) {
|
|
1164
1189
|
return issues.map((iss) => {
|
|
1165
|
-
var
|
|
1166
|
-
(
|
|
1190
|
+
var _a3;
|
|
1191
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
1167
1192
|
iss.path.unshift(path);
|
|
1168
1193
|
return iss;
|
|
1169
1194
|
});
|
|
@@ -1172,17 +1197,14 @@ function unwrapMessage(message) {
|
|
|
1172
1197
|
return typeof message === "string" ? message : message?.message;
|
|
1173
1198
|
}
|
|
1174
1199
|
function finalizeIssue(iss, ctx, config2) {
|
|
1175
|
-
const
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
delete full.continue;
|
|
1182
|
-
if (!ctx?.reportInput) {
|
|
1183
|
-
delete full.input;
|
|
1200
|
+
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";
|
|
1201
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
1202
|
+
rest.path ?? (rest.path = []);
|
|
1203
|
+
rest.message = message;
|
|
1204
|
+
if (ctx?.reportInput) {
|
|
1205
|
+
rest.input = _input;
|
|
1184
1206
|
}
|
|
1185
|
-
return
|
|
1207
|
+
return rest;
|
|
1186
1208
|
}
|
|
1187
1209
|
function getSizableOrigin(input) {
|
|
1188
1210
|
if (input instanceof Set)
|
|
@@ -1280,7 +1302,7 @@ var Class = class {
|
|
|
1280
1302
|
}
|
|
1281
1303
|
};
|
|
1282
1304
|
|
|
1283
|
-
// node_modules/.pnpm/zod@4.3
|
|
1305
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
|
|
1284
1306
|
var initializer = (inst, def) => {
|
|
1285
1307
|
inst.name = "$ZodError";
|
|
1286
1308
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -1299,10 +1321,10 @@ var initializer = (inst, def) => {
|
|
|
1299
1321
|
};
|
|
1300
1322
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
1301
1323
|
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
1302
|
-
function flattenError(
|
|
1324
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
1303
1325
|
const fieldErrors = {};
|
|
1304
1326
|
const formErrors = [];
|
|
1305
|
-
for (const sub of
|
|
1327
|
+
for (const sub of error51.issues) {
|
|
1306
1328
|
if (sub.path.length > 0) {
|
|
1307
1329
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
1308
1330
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -1312,50 +1334,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
|
|
|
1312
1334
|
}
|
|
1313
1335
|
return { formErrors, fieldErrors };
|
|
1314
1336
|
}
|
|
1315
|
-
function formatError(
|
|
1337
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
1316
1338
|
const fieldErrors = { _errors: [] };
|
|
1317
|
-
const processError = (
|
|
1318
|
-
for (const issue2 of
|
|
1339
|
+
const processError = (error52, path = []) => {
|
|
1340
|
+
for (const issue2 of error52.issues) {
|
|
1319
1341
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1320
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
1342
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
1321
1343
|
} else if (issue2.code === "invalid_key") {
|
|
1322
|
-
processError({ issues: issue2.issues });
|
|
1344
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1323
1345
|
} else if (issue2.code === "invalid_element") {
|
|
1324
|
-
processError({ issues: issue2.issues });
|
|
1325
|
-
} else if (issue2.path.length === 0) {
|
|
1326
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
1346
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1327
1347
|
} else {
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1348
|
+
const fullpath = [...path, ...issue2.path];
|
|
1349
|
+
if (fullpath.length === 0) {
|
|
1350
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
1351
|
+
} else {
|
|
1352
|
+
let curr = fieldErrors;
|
|
1353
|
+
let i = 0;
|
|
1354
|
+
while (i < fullpath.length) {
|
|
1355
|
+
const el = fullpath[i];
|
|
1356
|
+
const terminal = i === fullpath.length - 1;
|
|
1357
|
+
if (!terminal) {
|
|
1358
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
1359
|
+
} else {
|
|
1360
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
1361
|
+
curr[el]._errors.push(mapper(issue2));
|
|
1362
|
+
}
|
|
1363
|
+
curr = curr[el];
|
|
1364
|
+
i++;
|
|
1338
1365
|
}
|
|
1339
|
-
curr = curr[el];
|
|
1340
|
-
i++;
|
|
1341
1366
|
}
|
|
1342
1367
|
}
|
|
1343
1368
|
}
|
|
1344
1369
|
};
|
|
1345
|
-
processError(
|
|
1370
|
+
processError(error51);
|
|
1346
1371
|
return fieldErrors;
|
|
1347
1372
|
}
|
|
1348
|
-
function treeifyError(
|
|
1373
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
1349
1374
|
const result = { errors: [] };
|
|
1350
|
-
const processError = (
|
|
1351
|
-
var
|
|
1352
|
-
for (const issue2 of
|
|
1375
|
+
const processError = (error52, path = []) => {
|
|
1376
|
+
var _a3, _b;
|
|
1377
|
+
for (const issue2 of error52.issues) {
|
|
1353
1378
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1354
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
1379
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
1355
1380
|
} else if (issue2.code === "invalid_key") {
|
|
1356
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
1381
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1357
1382
|
} else if (issue2.code === "invalid_element") {
|
|
1358
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
1383
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1359
1384
|
} else {
|
|
1360
1385
|
const fullpath = [...path, ...issue2.path];
|
|
1361
1386
|
if (fullpath.length === 0) {
|
|
@@ -1369,7 +1394,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
1369
1394
|
const terminal = i === fullpath.length - 1;
|
|
1370
1395
|
if (typeof el === "string") {
|
|
1371
1396
|
curr.properties ?? (curr.properties = {});
|
|
1372
|
-
(
|
|
1397
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
1373
1398
|
curr = curr.properties[el];
|
|
1374
1399
|
} else {
|
|
1375
1400
|
curr.items ?? (curr.items = []);
|
|
@@ -1384,7 +1409,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
1384
1409
|
}
|
|
1385
1410
|
}
|
|
1386
1411
|
};
|
|
1387
|
-
processError(
|
|
1412
|
+
processError(error51);
|
|
1388
1413
|
return result;
|
|
1389
1414
|
}
|
|
1390
1415
|
function toDotPath(_path) {
|
|
@@ -1405,9 +1430,9 @@ function toDotPath(_path) {
|
|
|
1405
1430
|
}
|
|
1406
1431
|
return segs.join("");
|
|
1407
1432
|
}
|
|
1408
|
-
function prettifyError(
|
|
1433
|
+
function prettifyError(error51) {
|
|
1409
1434
|
const lines = [];
|
|
1410
|
-
const issues = [...
|
|
1435
|
+
const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
1411
1436
|
for (const issue2 of issues) {
|
|
1412
1437
|
lines.push(`\u2716 ${issue2.message}`);
|
|
1413
1438
|
if (issue2.path?.length)
|
|
@@ -1416,9 +1441,9 @@ function prettifyError(error48) {
|
|
|
1416
1441
|
return lines.join("\n");
|
|
1417
1442
|
}
|
|
1418
1443
|
|
|
1419
|
-
// node_modules/.pnpm/zod@4.3
|
|
1444
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
|
|
1420
1445
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
1421
|
-
const ctx = _ctx ?
|
|
1446
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
1422
1447
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1423
1448
|
if (result instanceof Promise) {
|
|
1424
1449
|
throw new $ZodAsyncError();
|
|
@@ -1432,7 +1457,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
1432
1457
|
};
|
|
1433
1458
|
var parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
1434
1459
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
1435
|
-
const ctx = _ctx ?
|
|
1460
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
1436
1461
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1437
1462
|
if (result instanceof Promise)
|
|
1438
1463
|
result = await result;
|
|
@@ -1457,7 +1482,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
|
1457
1482
|
};
|
|
1458
1483
|
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
1459
1484
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1460
|
-
const ctx = _ctx ?
|
|
1485
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
1461
1486
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1462
1487
|
if (result instanceof Promise)
|
|
1463
1488
|
result = await result;
|
|
@@ -1468,7 +1493,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1468
1493
|
};
|
|
1469
1494
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
1470
1495
|
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
1471
|
-
const ctx = _ctx ?
|
|
1496
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1472
1497
|
return _parse(_Err)(schema, value, ctx);
|
|
1473
1498
|
};
|
|
1474
1499
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -1477,7 +1502,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
|
|
|
1477
1502
|
};
|
|
1478
1503
|
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
1479
1504
|
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1480
|
-
const ctx = _ctx ?
|
|
1505
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1481
1506
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
1482
1507
|
};
|
|
1483
1508
|
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -1486,7 +1511,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1486
1511
|
};
|
|
1487
1512
|
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
1488
1513
|
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
1489
|
-
const ctx = _ctx ?
|
|
1514
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1490
1515
|
return _safeParse(_Err)(schema, value, ctx);
|
|
1491
1516
|
};
|
|
1492
1517
|
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -1495,7 +1520,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
|
1495
1520
|
};
|
|
1496
1521
|
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
1497
1522
|
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1498
|
-
const ctx = _ctx ?
|
|
1523
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1499
1524
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
1500
1525
|
};
|
|
1501
1526
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -1504,7 +1529,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1504
1529
|
};
|
|
1505
1530
|
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
1506
1531
|
|
|
1507
|
-
// node_modules/.pnpm/zod@4.3
|
|
1532
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.js
|
|
1508
1533
|
var regexes_exports = {};
|
|
1509
1534
|
__export(regexes_exports, {
|
|
1510
1535
|
base64: () => base64,
|
|
@@ -1528,6 +1553,7 @@ __export(regexes_exports, {
|
|
|
1528
1553
|
hex: () => hex,
|
|
1529
1554
|
hostname: () => hostname,
|
|
1530
1555
|
html5Email: () => html5Email,
|
|
1556
|
+
httpProtocol: () => httpProtocol,
|
|
1531
1557
|
idnEmail: () => idnEmail,
|
|
1532
1558
|
integer: () => integer,
|
|
1533
1559
|
ipv4: () => ipv4,
|
|
@@ -1566,7 +1592,7 @@ __export(regexes_exports, {
|
|
|
1566
1592
|
uuid7: () => uuid7,
|
|
1567
1593
|
xid: () => xid
|
|
1568
1594
|
});
|
|
1569
|
-
var cuid = /^[cC][
|
|
1595
|
+
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
1570
1596
|
var cuid2 = /^[0-9a-z]+$/;
|
|
1571
1597
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
1572
1598
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -1605,6 +1631,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
|
|
|
1605
1631
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
1606
1632
|
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])?)*\.?$/;
|
|
1607
1633
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
1634
|
+
var httpProtocol = /^https?$/;
|
|
1608
1635
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
1609
1636
|
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])))`;
|
|
1610
1637
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -1661,12 +1688,12 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
|
1661
1688
|
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
1662
1689
|
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
1663
1690
|
|
|
1664
|
-
// node_modules/.pnpm/zod@4.3
|
|
1691
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.js
|
|
1665
1692
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
1666
|
-
var
|
|
1693
|
+
var _a3;
|
|
1667
1694
|
inst._zod ?? (inst._zod = {});
|
|
1668
1695
|
inst._zod.def = def;
|
|
1669
|
-
(
|
|
1696
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
1670
1697
|
});
|
|
1671
1698
|
var numericOriginMap = {
|
|
1672
1699
|
number: "number",
|
|
@@ -1732,8 +1759,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
1732
1759
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
1733
1760
|
$ZodCheck.init(inst, def);
|
|
1734
1761
|
inst._zod.onattach.push((inst2) => {
|
|
1735
|
-
var
|
|
1736
|
-
(
|
|
1762
|
+
var _a3;
|
|
1763
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
1737
1764
|
});
|
|
1738
1765
|
inst._zod.check = (payload) => {
|
|
1739
1766
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -1866,9 +1893,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
1866
1893
|
};
|
|
1867
1894
|
});
|
|
1868
1895
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
1869
|
-
var
|
|
1896
|
+
var _a3;
|
|
1870
1897
|
$ZodCheck.init(inst, def);
|
|
1871
|
-
(
|
|
1898
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1872
1899
|
const val = payload.value;
|
|
1873
1900
|
return !nullish(val) && val.size !== void 0;
|
|
1874
1901
|
});
|
|
@@ -1894,9 +1921,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
1894
1921
|
};
|
|
1895
1922
|
});
|
|
1896
1923
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
1897
|
-
var
|
|
1924
|
+
var _a3;
|
|
1898
1925
|
$ZodCheck.init(inst, def);
|
|
1899
|
-
(
|
|
1926
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1900
1927
|
const val = payload.value;
|
|
1901
1928
|
return !nullish(val) && val.size !== void 0;
|
|
1902
1929
|
});
|
|
@@ -1922,9 +1949,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
1922
1949
|
};
|
|
1923
1950
|
});
|
|
1924
1951
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
1925
|
-
var
|
|
1952
|
+
var _a3;
|
|
1926
1953
|
$ZodCheck.init(inst, def);
|
|
1927
|
-
(
|
|
1954
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1928
1955
|
const val = payload.value;
|
|
1929
1956
|
return !nullish(val) && val.size !== void 0;
|
|
1930
1957
|
});
|
|
@@ -1952,9 +1979,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
1952
1979
|
};
|
|
1953
1980
|
});
|
|
1954
1981
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1955
|
-
var
|
|
1982
|
+
var _a3;
|
|
1956
1983
|
$ZodCheck.init(inst, def);
|
|
1957
|
-
(
|
|
1984
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1958
1985
|
const val = payload.value;
|
|
1959
1986
|
return !nullish(val) && val.length !== void 0;
|
|
1960
1987
|
});
|
|
@@ -1981,9 +2008,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
1981
2008
|
};
|
|
1982
2009
|
});
|
|
1983
2010
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
1984
|
-
var
|
|
2011
|
+
var _a3;
|
|
1985
2012
|
$ZodCheck.init(inst, def);
|
|
1986
|
-
(
|
|
2013
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1987
2014
|
const val = payload.value;
|
|
1988
2015
|
return !nullish(val) && val.length !== void 0;
|
|
1989
2016
|
});
|
|
@@ -2010,9 +2037,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
2010
2037
|
};
|
|
2011
2038
|
});
|
|
2012
2039
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
2013
|
-
var
|
|
2040
|
+
var _a3;
|
|
2014
2041
|
$ZodCheck.init(inst, def);
|
|
2015
|
-
(
|
|
2042
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2016
2043
|
const val = payload.value;
|
|
2017
2044
|
return !nullish(val) && val.length !== void 0;
|
|
2018
2045
|
});
|
|
@@ -2041,7 +2068,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2041
2068
|
};
|
|
2042
2069
|
});
|
|
2043
2070
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2044
|
-
var
|
|
2071
|
+
var _a3, _b;
|
|
2045
2072
|
$ZodCheck.init(inst, def);
|
|
2046
2073
|
inst._zod.onattach.push((inst2) => {
|
|
2047
2074
|
const bag = inst2._zod.bag;
|
|
@@ -2052,7 +2079,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
2052
2079
|
}
|
|
2053
2080
|
});
|
|
2054
2081
|
if (def.pattern)
|
|
2055
|
-
(
|
|
2082
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
2056
2083
|
def.pattern.lastIndex = 0;
|
|
2057
2084
|
if (def.pattern.test(payload.value))
|
|
2058
2085
|
return;
|
|
@@ -2209,7 +2236,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
2209
2236
|
};
|
|
2210
2237
|
});
|
|
2211
2238
|
|
|
2212
|
-
// node_modules/.pnpm/zod@4.3
|
|
2239
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/doc.js
|
|
2213
2240
|
var Doc = class {
|
|
2214
2241
|
constructor(args = []) {
|
|
2215
2242
|
this.content = [];
|
|
@@ -2245,16 +2272,16 @@ var Doc = class {
|
|
|
2245
2272
|
}
|
|
2246
2273
|
};
|
|
2247
2274
|
|
|
2248
|
-
// node_modules/.pnpm/zod@4.3
|
|
2275
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.js
|
|
2249
2276
|
var version = {
|
|
2250
2277
|
major: 4,
|
|
2251
|
-
minor:
|
|
2252
|
-
patch:
|
|
2278
|
+
minor: 4,
|
|
2279
|
+
patch: 3
|
|
2253
2280
|
};
|
|
2254
2281
|
|
|
2255
|
-
// node_modules/.pnpm/zod@4.3
|
|
2282
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.js
|
|
2256
2283
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2257
|
-
var
|
|
2284
|
+
var _a3;
|
|
2258
2285
|
inst ?? (inst = {});
|
|
2259
2286
|
inst._zod.def = def;
|
|
2260
2287
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -2269,7 +2296,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2269
2296
|
}
|
|
2270
2297
|
}
|
|
2271
2298
|
if (checks.length === 0) {
|
|
2272
|
-
(
|
|
2299
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
2273
2300
|
inst._zod.deferred?.push(() => {
|
|
2274
2301
|
inst._zod.run = inst._zod.parse;
|
|
2275
2302
|
});
|
|
@@ -2279,6 +2306,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2279
2306
|
let asyncResult;
|
|
2280
2307
|
for (const ch of checks2) {
|
|
2281
2308
|
if (ch._zod.def.when) {
|
|
2309
|
+
if (explicitlyAborted(payload))
|
|
2310
|
+
continue;
|
|
2282
2311
|
const shouldRun = ch._zod.def.when(payload);
|
|
2283
2312
|
if (!shouldRun)
|
|
2284
2313
|
continue;
|
|
@@ -2419,6 +2448,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
2419
2448
|
inst._zod.check = (payload) => {
|
|
2420
2449
|
try {
|
|
2421
2450
|
const trimmed = payload.value.trim();
|
|
2451
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
2452
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
2453
|
+
payload.issues.push({
|
|
2454
|
+
code: "invalid_format",
|
|
2455
|
+
format: "url",
|
|
2456
|
+
note: "Invalid URL format",
|
|
2457
|
+
input: payload.value,
|
|
2458
|
+
inst,
|
|
2459
|
+
continue: !def.abort
|
|
2460
|
+
});
|
|
2461
|
+
return;
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2422
2464
|
const url2 = new URL(trimmed);
|
|
2423
2465
|
if (def.hostname) {
|
|
2424
2466
|
def.hostname.lastIndex = 0;
|
|
@@ -2572,6 +2614,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
|
2572
2614
|
function isValidBase64(data) {
|
|
2573
2615
|
if (data === "")
|
|
2574
2616
|
return true;
|
|
2617
|
+
if (/\s/.test(data))
|
|
2618
|
+
return false;
|
|
2575
2619
|
if (data.length % 4 !== 0)
|
|
2576
2620
|
return false;
|
|
2577
2621
|
try {
|
|
@@ -2764,8 +2808,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
|
|
|
2764
2808
|
$ZodType.init(inst, def);
|
|
2765
2809
|
inst._zod.pattern = _undefined;
|
|
2766
2810
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
2767
|
-
inst._zod.optin = "optional";
|
|
2768
|
-
inst._zod.optout = "optional";
|
|
2769
2811
|
inst._zod.parse = (payload, _ctx) => {
|
|
2770
2812
|
const input = payload.value;
|
|
2771
2813
|
if (typeof input === "undefined")
|
|
@@ -2894,15 +2936,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
2894
2936
|
return payload;
|
|
2895
2937
|
};
|
|
2896
2938
|
});
|
|
2897
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
2939
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
2940
|
+
const isPresent = key in input;
|
|
2898
2941
|
if (result.issues.length) {
|
|
2899
|
-
if (isOptionalOut && !
|
|
2942
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
2900
2943
|
return;
|
|
2901
2944
|
}
|
|
2902
2945
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
2903
2946
|
}
|
|
2947
|
+
if (!isPresent && !isOptionalIn) {
|
|
2948
|
+
if (!result.issues.length) {
|
|
2949
|
+
final.issues.push({
|
|
2950
|
+
code: "invalid_type",
|
|
2951
|
+
expected: "nonoptional",
|
|
2952
|
+
input: void 0,
|
|
2953
|
+
path: [key]
|
|
2954
|
+
});
|
|
2955
|
+
}
|
|
2956
|
+
return;
|
|
2957
|
+
}
|
|
2904
2958
|
if (result.value === void 0) {
|
|
2905
|
-
if (
|
|
2959
|
+
if (isPresent) {
|
|
2906
2960
|
final.value[key] = void 0;
|
|
2907
2961
|
}
|
|
2908
2962
|
} else {
|
|
@@ -2930,8 +2984,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
2930
2984
|
const keySet = def.keySet;
|
|
2931
2985
|
const _catchall = def.catchall._zod;
|
|
2932
2986
|
const t = _catchall.def.type;
|
|
2987
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
2933
2988
|
const isOptionalOut = _catchall.optout === "optional";
|
|
2934
2989
|
for (const key in input) {
|
|
2990
|
+
if (key === "__proto__")
|
|
2991
|
+
continue;
|
|
2935
2992
|
if (keySet.has(key))
|
|
2936
2993
|
continue;
|
|
2937
2994
|
if (t === "never") {
|
|
@@ -2940,9 +2997,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
2940
2997
|
}
|
|
2941
2998
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
2942
2999
|
if (r instanceof Promise) {
|
|
2943
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3000
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
2944
3001
|
} else {
|
|
2945
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3002
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
2946
3003
|
}
|
|
2947
3004
|
}
|
|
2948
3005
|
if (unrecognized.length) {
|
|
@@ -3008,12 +3065,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3008
3065
|
const shape = value.shape;
|
|
3009
3066
|
for (const key of value.keys) {
|
|
3010
3067
|
const el = shape[key];
|
|
3068
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
3011
3069
|
const isOptionalOut = el._zod.optout === "optional";
|
|
3012
3070
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3013
3071
|
if (r instanceof Promise) {
|
|
3014
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3072
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
3015
3073
|
} else {
|
|
3016
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3074
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
3017
3075
|
}
|
|
3018
3076
|
}
|
|
3019
3077
|
if (!catchall) {
|
|
@@ -3044,9 +3102,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3044
3102
|
const id = ids[key];
|
|
3045
3103
|
const k = esc(key);
|
|
3046
3104
|
const schema = shape[key];
|
|
3105
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
3047
3106
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
3048
3107
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
3049
|
-
if (isOptionalOut) {
|
|
3108
|
+
if (isOptionalIn && isOptionalOut) {
|
|
3050
3109
|
doc.write(`
|
|
3051
3110
|
if (${id}.issues.length) {
|
|
3052
3111
|
if (${k} in input) {
|
|
@@ -3065,6 +3124,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3065
3124
|
newResult[${k}] = ${id}.value;
|
|
3066
3125
|
}
|
|
3067
3126
|
|
|
3127
|
+
`);
|
|
3128
|
+
} else if (!isOptionalIn) {
|
|
3129
|
+
doc.write(`
|
|
3130
|
+
const ${id}_present = ${k} in input;
|
|
3131
|
+
if (${id}.issues.length) {
|
|
3132
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
3133
|
+
...iss,
|
|
3134
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
3135
|
+
})));
|
|
3136
|
+
}
|
|
3137
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
3138
|
+
payload.issues.push({
|
|
3139
|
+
code: "invalid_type",
|
|
3140
|
+
expected: "nonoptional",
|
|
3141
|
+
input: undefined,
|
|
3142
|
+
path: [${k}]
|
|
3143
|
+
});
|
|
3144
|
+
}
|
|
3145
|
+
|
|
3146
|
+
if (${id}_present) {
|
|
3147
|
+
if (${id}.value === undefined) {
|
|
3148
|
+
newResult[${k}] = undefined;
|
|
3149
|
+
} else {
|
|
3150
|
+
newResult[${k}] = ${id}.value;
|
|
3151
|
+
}
|
|
3152
|
+
}
|
|
3153
|
+
|
|
3068
3154
|
`);
|
|
3069
3155
|
} else {
|
|
3070
3156
|
doc.write(`
|
|
@@ -3158,10 +3244,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
3158
3244
|
}
|
|
3159
3245
|
return void 0;
|
|
3160
3246
|
});
|
|
3161
|
-
const
|
|
3162
|
-
const first = def.options[0]._zod.run;
|
|
3247
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3163
3248
|
inst._zod.parse = (payload, ctx) => {
|
|
3164
|
-
if (
|
|
3249
|
+
if (first) {
|
|
3165
3250
|
return first(payload, ctx);
|
|
3166
3251
|
}
|
|
3167
3252
|
let async = false;
|
|
@@ -3214,10 +3299,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
|
|
|
3214
3299
|
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
3215
3300
|
$ZodUnion.init(inst, def);
|
|
3216
3301
|
def.inclusive = false;
|
|
3217
|
-
const
|
|
3218
|
-
const first = def.options[0]._zod.run;
|
|
3302
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3219
3303
|
inst._zod.parse = (payload, ctx) => {
|
|
3220
|
-
if (
|
|
3304
|
+
if (first) {
|
|
3221
3305
|
return first(payload, ctx);
|
|
3222
3306
|
}
|
|
3223
3307
|
let async = false;
|
|
@@ -3292,7 +3376,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3292
3376
|
if (opt) {
|
|
3293
3377
|
return opt._zod.run(payload, ctx);
|
|
3294
3378
|
}
|
|
3295
|
-
if (def.unionFallback) {
|
|
3379
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
3296
3380
|
return _super(payload, ctx);
|
|
3297
3381
|
}
|
|
3298
3382
|
payload.issues.push({
|
|
@@ -3300,6 +3384,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3300
3384
|
errors: [],
|
|
3301
3385
|
note: "No matching discriminator",
|
|
3302
3386
|
discriminator: def.discriminator,
|
|
3387
|
+
options: Array.from(disc.value.keys()),
|
|
3303
3388
|
input,
|
|
3304
3389
|
path: [def.discriminator],
|
|
3305
3390
|
inst
|
|
@@ -3421,64 +3506,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3421
3506
|
}
|
|
3422
3507
|
payload.value = [];
|
|
3423
3508
|
const proms = [];
|
|
3424
|
-
const
|
|
3425
|
-
const
|
|
3509
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
3510
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
3426
3511
|
if (!def.rest) {
|
|
3427
|
-
|
|
3428
|
-
const tooSmall = input.length < optStart - 1;
|
|
3429
|
-
if (tooBig || tooSmall) {
|
|
3512
|
+
if (input.length < optinStart) {
|
|
3430
3513
|
payload.issues.push({
|
|
3431
|
-
|
|
3514
|
+
code: "too_small",
|
|
3515
|
+
minimum: optinStart,
|
|
3516
|
+
inclusive: true,
|
|
3432
3517
|
input,
|
|
3433
3518
|
inst,
|
|
3434
3519
|
origin: "array"
|
|
3435
3520
|
});
|
|
3436
3521
|
return payload;
|
|
3437
3522
|
}
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3523
|
+
if (input.length > items.length) {
|
|
3524
|
+
payload.issues.push({
|
|
3525
|
+
code: "too_big",
|
|
3526
|
+
maximum: items.length,
|
|
3527
|
+
inclusive: true,
|
|
3528
|
+
input,
|
|
3529
|
+
inst,
|
|
3530
|
+
origin: "array"
|
|
3531
|
+
});
|
|
3445
3532
|
}
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
}, ctx);
|
|
3450
|
-
if (
|
|
3451
|
-
proms.push(
|
|
3533
|
+
}
|
|
3534
|
+
const itemResults = new Array(items.length);
|
|
3535
|
+
for (let i = 0; i < items.length; i++) {
|
|
3536
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
3537
|
+
if (r instanceof Promise) {
|
|
3538
|
+
proms.push(r.then((rr) => {
|
|
3539
|
+
itemResults[i] = rr;
|
|
3540
|
+
}));
|
|
3452
3541
|
} else {
|
|
3453
|
-
|
|
3542
|
+
itemResults[i] = r;
|
|
3454
3543
|
}
|
|
3455
3544
|
}
|
|
3456
3545
|
if (def.rest) {
|
|
3546
|
+
let i = items.length - 1;
|
|
3457
3547
|
const rest = input.slice(items.length);
|
|
3458
3548
|
for (const el of rest) {
|
|
3459
3549
|
i++;
|
|
3460
|
-
const result = def.rest._zod.run({
|
|
3461
|
-
value: el,
|
|
3462
|
-
issues: []
|
|
3463
|
-
}, ctx);
|
|
3550
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
3464
3551
|
if (result instanceof Promise) {
|
|
3465
|
-
proms.push(result.then((
|
|
3552
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
3466
3553
|
} else {
|
|
3467
3554
|
handleTupleResult(result, payload, i);
|
|
3468
3555
|
}
|
|
3469
3556
|
}
|
|
3470
3557
|
}
|
|
3471
|
-
if (proms.length)
|
|
3472
|
-
return Promise.all(proms).then(() => payload);
|
|
3473
|
-
|
|
3558
|
+
if (proms.length) {
|
|
3559
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
3560
|
+
}
|
|
3561
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
3474
3562
|
};
|
|
3475
3563
|
});
|
|
3564
|
+
function getTupleOptStart(items, key) {
|
|
3565
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
3566
|
+
if (items[i]._zod[key] !== "optional")
|
|
3567
|
+
return i + 1;
|
|
3568
|
+
}
|
|
3569
|
+
return 0;
|
|
3570
|
+
}
|
|
3476
3571
|
function handleTupleResult(result, final, index) {
|
|
3477
3572
|
if (result.issues.length) {
|
|
3478
3573
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
3479
3574
|
}
|
|
3480
3575
|
final.value[index] = result.value;
|
|
3481
3576
|
}
|
|
3577
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
3578
|
+
for (let i = 0; i < items.length; i++) {
|
|
3579
|
+
const r = itemResults[i];
|
|
3580
|
+
const isPresent = i < input.length;
|
|
3581
|
+
if (r.issues.length) {
|
|
3582
|
+
if (!isPresent && i >= optoutStart) {
|
|
3583
|
+
final.value.length = i;
|
|
3584
|
+
break;
|
|
3585
|
+
}
|
|
3586
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
3587
|
+
}
|
|
3588
|
+
final.value[i] = r.value;
|
|
3589
|
+
}
|
|
3590
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
3591
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
3592
|
+
final.value.length = i;
|
|
3593
|
+
} else {
|
|
3594
|
+
break;
|
|
3595
|
+
}
|
|
3596
|
+
}
|
|
3597
|
+
return final;
|
|
3598
|
+
}
|
|
3482
3599
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
3483
3600
|
$ZodType.init(inst, def);
|
|
3484
3601
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3500,19 +3617,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3500
3617
|
for (const key of values) {
|
|
3501
3618
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
3502
3619
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
3620
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
3621
|
+
if (keyResult instanceof Promise) {
|
|
3622
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
3623
|
+
}
|
|
3624
|
+
if (keyResult.issues.length) {
|
|
3625
|
+
payload.issues.push({
|
|
3626
|
+
code: "invalid_key",
|
|
3627
|
+
origin: "record",
|
|
3628
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
3629
|
+
input: key,
|
|
3630
|
+
path: [key],
|
|
3631
|
+
inst
|
|
3632
|
+
});
|
|
3633
|
+
continue;
|
|
3634
|
+
}
|
|
3635
|
+
const outKey = keyResult.value;
|
|
3503
3636
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3504
3637
|
if (result instanceof Promise) {
|
|
3505
3638
|
proms.push(result.then((result2) => {
|
|
3506
3639
|
if (result2.issues.length) {
|
|
3507
3640
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
3508
3641
|
}
|
|
3509
|
-
payload.value[
|
|
3642
|
+
payload.value[outKey] = result2.value;
|
|
3510
3643
|
}));
|
|
3511
3644
|
} else {
|
|
3512
3645
|
if (result.issues.length) {
|
|
3513
3646
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
3514
3647
|
}
|
|
3515
|
-
payload.value[
|
|
3648
|
+
payload.value[outKey] = result.value;
|
|
3516
3649
|
}
|
|
3517
3650
|
}
|
|
3518
3651
|
}
|
|
@@ -3536,6 +3669,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3536
3669
|
for (const key of Reflect.ownKeys(input)) {
|
|
3537
3670
|
if (key === "__proto__")
|
|
3538
3671
|
continue;
|
|
3672
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
3673
|
+
continue;
|
|
3539
3674
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
3540
3675
|
if (keyResult instanceof Promise) {
|
|
3541
3676
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -3740,6 +3875,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
|
|
|
3740
3875
|
});
|
|
3741
3876
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
3742
3877
|
$ZodType.init(inst, def);
|
|
3878
|
+
inst._zod.optin = "optional";
|
|
3743
3879
|
inst._zod.parse = (payload, ctx) => {
|
|
3744
3880
|
if (ctx.direction === "backward") {
|
|
3745
3881
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -3749,6 +3885,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
3749
3885
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
3750
3886
|
return output.then((output2) => {
|
|
3751
3887
|
payload.value = output2;
|
|
3888
|
+
payload.fallback = true;
|
|
3752
3889
|
return payload;
|
|
3753
3890
|
});
|
|
3754
3891
|
}
|
|
@@ -3756,11 +3893,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
3756
3893
|
throw new $ZodAsyncError();
|
|
3757
3894
|
}
|
|
3758
3895
|
payload.value = _out;
|
|
3896
|
+
payload.fallback = true;
|
|
3759
3897
|
return payload;
|
|
3760
3898
|
};
|
|
3761
3899
|
});
|
|
3762
3900
|
function handleOptionalResult(result, input) {
|
|
3763
|
-
if (result.issues.length
|
|
3901
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
3764
3902
|
return { issues: [], value: void 0 };
|
|
3765
3903
|
}
|
|
3766
3904
|
return result;
|
|
@@ -3778,10 +3916,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
|
3778
3916
|
});
|
|
3779
3917
|
inst._zod.parse = (payload, ctx) => {
|
|
3780
3918
|
if (def.innerType._zod.optin === "optional") {
|
|
3919
|
+
const input = payload.value;
|
|
3781
3920
|
const result = def.innerType._zod.run(payload, ctx);
|
|
3782
3921
|
if (result instanceof Promise)
|
|
3783
|
-
return result.then((r) => handleOptionalResult(r,
|
|
3784
|
-
return handleOptionalResult(result,
|
|
3922
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
3923
|
+
return handleOptionalResult(result, input);
|
|
3785
3924
|
}
|
|
3786
3925
|
if (payload.value === void 0) {
|
|
3787
3926
|
return payload;
|
|
@@ -3897,7 +4036,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
|
3897
4036
|
});
|
|
3898
4037
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
3899
4038
|
$ZodType.init(inst, def);
|
|
3900
|
-
|
|
4039
|
+
inst._zod.optin = "optional";
|
|
3901
4040
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
3902
4041
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3903
4042
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3917,6 +4056,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
3917
4056
|
input: payload.value
|
|
3918
4057
|
});
|
|
3919
4058
|
payload.issues = [];
|
|
4059
|
+
payload.fallback = true;
|
|
3920
4060
|
}
|
|
3921
4061
|
return payload;
|
|
3922
4062
|
});
|
|
@@ -3931,6 +4071,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
3931
4071
|
input: payload.value
|
|
3932
4072
|
});
|
|
3933
4073
|
payload.issues = [];
|
|
4074
|
+
payload.fallback = true;
|
|
3934
4075
|
}
|
|
3935
4076
|
return payload;
|
|
3936
4077
|
};
|
|
@@ -3976,7 +4117,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
3976
4117
|
left.aborted = true;
|
|
3977
4118
|
return left;
|
|
3978
4119
|
}
|
|
3979
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
4120
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
3980
4121
|
}
|
|
3981
4122
|
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
3982
4123
|
$ZodType.init(inst, def);
|
|
@@ -4028,6 +4169,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
|
|
|
4028
4169
|
}
|
|
4029
4170
|
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
4030
4171
|
}
|
|
4172
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
4173
|
+
$ZodPipe.init(inst, def);
|
|
4174
|
+
});
|
|
4031
4175
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
4032
4176
|
$ZodType.init(inst, def);
|
|
4033
4177
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -4179,7 +4323,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
|
|
|
4179
4323
|
});
|
|
4180
4324
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
4181
4325
|
$ZodType.init(inst, def);
|
|
4182
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
4326
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
4327
|
+
const d = def;
|
|
4328
|
+
if (!d._cachedInner)
|
|
4329
|
+
d._cachedInner = def.getter();
|
|
4330
|
+
return d._cachedInner;
|
|
4331
|
+
});
|
|
4183
4332
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
4184
4333
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
4185
4334
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -4223,7 +4372,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
4223
4372
|
}
|
|
4224
4373
|
}
|
|
4225
4374
|
|
|
4226
|
-
// node_modules/.pnpm/zod@4.3
|
|
4375
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/index.js
|
|
4227
4376
|
var locales_exports = {};
|
|
4228
4377
|
__export(locales_exports, {
|
|
4229
4378
|
ar: () => ar_default,
|
|
@@ -4234,6 +4383,7 @@ __export(locales_exports, {
|
|
|
4234
4383
|
cs: () => cs_default,
|
|
4235
4384
|
da: () => da_default,
|
|
4236
4385
|
de: () => de_default,
|
|
4386
|
+
el: () => el_default,
|
|
4237
4387
|
en: () => en_default,
|
|
4238
4388
|
eo: () => eo_default,
|
|
4239
4389
|
es: () => es_default,
|
|
@@ -4242,6 +4392,7 @@ __export(locales_exports, {
|
|
|
4242
4392
|
fr: () => fr_default,
|
|
4243
4393
|
frCA: () => fr_CA_default,
|
|
4244
4394
|
he: () => he_default,
|
|
4395
|
+
hr: () => hr_default,
|
|
4245
4396
|
hu: () => hu_default,
|
|
4246
4397
|
hy: () => hy_default,
|
|
4247
4398
|
id: () => id_default,
|
|
@@ -4261,6 +4412,7 @@ __export(locales_exports, {
|
|
|
4261
4412
|
pl: () => pl_default,
|
|
4262
4413
|
ps: () => ps_default,
|
|
4263
4414
|
pt: () => pt_default,
|
|
4415
|
+
ro: () => ro_default,
|
|
4264
4416
|
ru: () => ru_default,
|
|
4265
4417
|
sl: () => sl_default,
|
|
4266
4418
|
sv: () => sv_default,
|
|
@@ -4277,7 +4429,7 @@ __export(locales_exports, {
|
|
|
4277
4429
|
zhTW: () => zh_TW_default
|
|
4278
4430
|
});
|
|
4279
4431
|
|
|
4280
|
-
// node_modules/.pnpm/zod@4.3
|
|
4432
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ar.js
|
|
4281
4433
|
var error = () => {
|
|
4282
4434
|
const Sizable = {
|
|
4283
4435
|
string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
|
|
@@ -4384,7 +4536,7 @@ function ar_default() {
|
|
|
4384
4536
|
};
|
|
4385
4537
|
}
|
|
4386
4538
|
|
|
4387
|
-
// node_modules/.pnpm/zod@4.3
|
|
4539
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/az.js
|
|
4388
4540
|
var error2 = () => {
|
|
4389
4541
|
const Sizable = {
|
|
4390
4542
|
string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
|
|
@@ -4490,7 +4642,7 @@ function az_default() {
|
|
|
4490
4642
|
};
|
|
4491
4643
|
}
|
|
4492
4644
|
|
|
4493
|
-
// node_modules/.pnpm/zod@4.3
|
|
4645
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/be.js
|
|
4494
4646
|
function getBelarusianPlural(count, one, few, many) {
|
|
4495
4647
|
const absCount = Math.abs(count);
|
|
4496
4648
|
const lastDigit = absCount % 10;
|
|
@@ -4647,7 +4799,7 @@ function be_default() {
|
|
|
4647
4799
|
};
|
|
4648
4800
|
}
|
|
4649
4801
|
|
|
4650
|
-
// node_modules/.pnpm/zod@4.3
|
|
4802
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/bg.js
|
|
4651
4803
|
var error4 = () => {
|
|
4652
4804
|
const Sizable = {
|
|
4653
4805
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
|
|
@@ -4768,7 +4920,7 @@ function bg_default() {
|
|
|
4768
4920
|
};
|
|
4769
4921
|
}
|
|
4770
4922
|
|
|
4771
|
-
// node_modules/.pnpm/zod@4.3
|
|
4923
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ca.js
|
|
4772
4924
|
var error5 = () => {
|
|
4773
4925
|
const Sizable = {
|
|
4774
4926
|
string: { unit: "car\xE0cters", verb: "contenir" },
|
|
@@ -4877,7 +5029,7 @@ function ca_default() {
|
|
|
4877
5029
|
};
|
|
4878
5030
|
}
|
|
4879
5031
|
|
|
4880
|
-
// node_modules/.pnpm/zod@4.3
|
|
5032
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/cs.js
|
|
4881
5033
|
var error6 = () => {
|
|
4882
5034
|
const Sizable = {
|
|
4883
5035
|
string: { unit: "znak\u016F", verb: "m\xEDt" },
|
|
@@ -4989,7 +5141,7 @@ function cs_default() {
|
|
|
4989
5141
|
};
|
|
4990
5142
|
}
|
|
4991
5143
|
|
|
4992
|
-
// node_modules/.pnpm/zod@4.3
|
|
5144
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/da.js
|
|
4993
5145
|
var error7 = () => {
|
|
4994
5146
|
const Sizable = {
|
|
4995
5147
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -5105,7 +5257,7 @@ function da_default() {
|
|
|
5105
5257
|
};
|
|
5106
5258
|
}
|
|
5107
5259
|
|
|
5108
|
-
// node_modules/.pnpm/zod@4.3
|
|
5260
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/de.js
|
|
5109
5261
|
var error8 = () => {
|
|
5110
5262
|
const Sizable = {
|
|
5111
5263
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -5214,8 +5366,118 @@ function de_default() {
|
|
|
5214
5366
|
};
|
|
5215
5367
|
}
|
|
5216
5368
|
|
|
5217
|
-
// node_modules/.pnpm/zod@4.3
|
|
5369
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/el.js
|
|
5218
5370
|
var error9 = () => {
|
|
5371
|
+
const Sizable = {
|
|
5372
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5373
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5374
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5375
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5376
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
5377
|
+
};
|
|
5378
|
+
function getSizing(origin) {
|
|
5379
|
+
return Sizable[origin] ?? null;
|
|
5380
|
+
}
|
|
5381
|
+
const FormatDictionary = {
|
|
5382
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
5383
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
5384
|
+
url: "URL",
|
|
5385
|
+
emoji: "emoji",
|
|
5386
|
+
uuid: "UUID",
|
|
5387
|
+
uuidv4: "UUIDv4",
|
|
5388
|
+
uuidv6: "UUIDv6",
|
|
5389
|
+
nanoid: "nanoid",
|
|
5390
|
+
guid: "GUID",
|
|
5391
|
+
cuid: "cuid",
|
|
5392
|
+
cuid2: "cuid2",
|
|
5393
|
+
ulid: "ULID",
|
|
5394
|
+
xid: "XID",
|
|
5395
|
+
ksuid: "KSUID",
|
|
5396
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
5397
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
5398
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
5399
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
5400
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
5401
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
5402
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
5403
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
5404
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
5405
|
+
base64: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",
|
|
5406
|
+
base64url: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",
|
|
5407
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
5408
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
5409
|
+
jwt: "JWT",
|
|
5410
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
5411
|
+
};
|
|
5412
|
+
const TypeDictionary = {
|
|
5413
|
+
nan: "NaN"
|
|
5414
|
+
};
|
|
5415
|
+
return (issue2) => {
|
|
5416
|
+
switch (issue2.code) {
|
|
5417
|
+
case "invalid_type": {
|
|
5418
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
5419
|
+
const receivedType = parsedType(issue2.input);
|
|
5420
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
5421
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
5422
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${issue2.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
|
|
5423
|
+
}
|
|
5424
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
|
|
5425
|
+
}
|
|
5426
|
+
case "invalid_value":
|
|
5427
|
+
if (issue2.values.length === 1)
|
|
5428
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${stringifyPrimitive(issue2.values[0])}`;
|
|
5429
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${joinValues(issue2.values, "|")}`;
|
|
5430
|
+
case "too_big": {
|
|
5431
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
5432
|
+
const sizing = getSizing(issue2.origin);
|
|
5433
|
+
if (sizing)
|
|
5434
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`;
|
|
5435
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.maximum.toString()}`;
|
|
5436
|
+
}
|
|
5437
|
+
case "too_small": {
|
|
5438
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
5439
|
+
const sizing = getSizing(issue2.origin);
|
|
5440
|
+
if (sizing) {
|
|
5441
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
5442
|
+
}
|
|
5443
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.minimum.toString()}`;
|
|
5444
|
+
}
|
|
5445
|
+
case "invalid_format": {
|
|
5446
|
+
const _issue = issue2;
|
|
5447
|
+
if (_issue.format === "starts_with") {
|
|
5448
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${_issue.prefix}"`;
|
|
5449
|
+
}
|
|
5450
|
+
if (_issue.format === "ends_with")
|
|
5451
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${_issue.suffix}"`;
|
|
5452
|
+
if (_issue.format === "includes")
|
|
5453
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${_issue.includes}"`;
|
|
5454
|
+
if (_issue.format === "regex")
|
|
5455
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${_issue.pattern}`;
|
|
5456
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
5457
|
+
}
|
|
5458
|
+
case "not_multiple_of":
|
|
5459
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${issue2.divisor}`;
|
|
5460
|
+
case "unrecognized_keys":
|
|
5461
|
+
return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${issue2.keys.length > 1 ? "\u03B1" : "\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${issue2.keys.length > 1 ? "\u03B9\u03AC" : "\u03AF"}: ${joinValues(issue2.keys, ", ")}`;
|
|
5462
|
+
case "invalid_key":
|
|
5463
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
5464
|
+
case "invalid_union":
|
|
5465
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
5466
|
+
case "invalid_element":
|
|
5467
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
5468
|
+
default:
|
|
5469
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
5470
|
+
}
|
|
5471
|
+
};
|
|
5472
|
+
};
|
|
5473
|
+
function el_default() {
|
|
5474
|
+
return {
|
|
5475
|
+
localeError: error9()
|
|
5476
|
+
};
|
|
5477
|
+
}
|
|
5478
|
+
|
|
5479
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/en.js
|
|
5480
|
+
var error10 = () => {
|
|
5219
5481
|
const Sizable = {
|
|
5220
5482
|
string: { unit: "characters", verb: "to have" },
|
|
5221
5483
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -5309,6 +5571,10 @@ var error9 = () => {
|
|
|
5309
5571
|
case "invalid_key":
|
|
5310
5572
|
return `Invalid key in ${issue2.origin}`;
|
|
5311
5573
|
case "invalid_union":
|
|
5574
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
5575
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
5576
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
5577
|
+
}
|
|
5312
5578
|
return "Invalid input";
|
|
5313
5579
|
case "invalid_element":
|
|
5314
5580
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -5319,12 +5585,12 @@ var error9 = () => {
|
|
|
5319
5585
|
};
|
|
5320
5586
|
function en_default() {
|
|
5321
5587
|
return {
|
|
5322
|
-
localeError:
|
|
5588
|
+
localeError: error10()
|
|
5323
5589
|
};
|
|
5324
5590
|
}
|
|
5325
5591
|
|
|
5326
|
-
// node_modules/.pnpm/zod@4.3
|
|
5327
|
-
var
|
|
5592
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/eo.js
|
|
5593
|
+
var error11 = () => {
|
|
5328
5594
|
const Sizable = {
|
|
5329
5595
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
5330
5596
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -5429,12 +5695,12 @@ var error10 = () => {
|
|
|
5429
5695
|
};
|
|
5430
5696
|
function eo_default() {
|
|
5431
5697
|
return {
|
|
5432
|
-
localeError:
|
|
5698
|
+
localeError: error11()
|
|
5433
5699
|
};
|
|
5434
5700
|
}
|
|
5435
5701
|
|
|
5436
|
-
// node_modules/.pnpm/zod@4.3
|
|
5437
|
-
var
|
|
5702
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/es.js
|
|
5703
|
+
var error12 = () => {
|
|
5438
5704
|
const Sizable = {
|
|
5439
5705
|
string: { unit: "caracteres", verb: "tener" },
|
|
5440
5706
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -5562,12 +5828,12 @@ var error11 = () => {
|
|
|
5562
5828
|
};
|
|
5563
5829
|
function es_default() {
|
|
5564
5830
|
return {
|
|
5565
|
-
localeError:
|
|
5831
|
+
localeError: error12()
|
|
5566
5832
|
};
|
|
5567
5833
|
}
|
|
5568
5834
|
|
|
5569
|
-
// node_modules/.pnpm/zod@4.3
|
|
5570
|
-
var
|
|
5835
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fa.js
|
|
5836
|
+
var error13 = () => {
|
|
5571
5837
|
const Sizable = {
|
|
5572
5838
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
5573
5839
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -5677,12 +5943,12 @@ var error12 = () => {
|
|
|
5677
5943
|
};
|
|
5678
5944
|
function fa_default() {
|
|
5679
5945
|
return {
|
|
5680
|
-
localeError:
|
|
5946
|
+
localeError: error13()
|
|
5681
5947
|
};
|
|
5682
5948
|
}
|
|
5683
5949
|
|
|
5684
|
-
// node_modules/.pnpm/zod@4.3
|
|
5685
|
-
var
|
|
5950
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fi.js
|
|
5951
|
+
var error14 = () => {
|
|
5686
5952
|
const Sizable = {
|
|
5687
5953
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
5688
5954
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -5790,12 +6056,12 @@ var error13 = () => {
|
|
|
5790
6056
|
};
|
|
5791
6057
|
function fi_default() {
|
|
5792
6058
|
return {
|
|
5793
|
-
localeError:
|
|
6059
|
+
localeError: error14()
|
|
5794
6060
|
};
|
|
5795
6061
|
}
|
|
5796
6062
|
|
|
5797
|
-
// node_modules/.pnpm/zod@4.3
|
|
5798
|
-
var
|
|
6063
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr.js
|
|
6064
|
+
var error15 = () => {
|
|
5799
6065
|
const Sizable = {
|
|
5800
6066
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
5801
6067
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -5836,9 +6102,27 @@ var error14 = () => {
|
|
|
5836
6102
|
template_literal: "entr\xE9e"
|
|
5837
6103
|
};
|
|
5838
6104
|
const TypeDictionary = {
|
|
5839
|
-
|
|
6105
|
+
string: "cha\xEEne",
|
|
5840
6106
|
number: "nombre",
|
|
5841
|
-
|
|
6107
|
+
int: "entier",
|
|
6108
|
+
boolean: "bool\xE9en",
|
|
6109
|
+
bigint: "grand entier",
|
|
6110
|
+
symbol: "symbole",
|
|
6111
|
+
undefined: "ind\xE9fini",
|
|
6112
|
+
null: "null",
|
|
6113
|
+
never: "jamais",
|
|
6114
|
+
void: "vide",
|
|
6115
|
+
date: "date",
|
|
6116
|
+
array: "tableau",
|
|
6117
|
+
object: "objet",
|
|
6118
|
+
tuple: "tuple",
|
|
6119
|
+
record: "enregistrement",
|
|
6120
|
+
map: "carte",
|
|
6121
|
+
set: "ensemble",
|
|
6122
|
+
file: "fichier",
|
|
6123
|
+
nonoptional: "non-optionnel",
|
|
6124
|
+
nan: "NaN",
|
|
6125
|
+
function: "fonction"
|
|
5842
6126
|
};
|
|
5843
6127
|
return (issue2) => {
|
|
5844
6128
|
switch (issue2.code) {
|
|
@@ -5859,16 +6143,15 @@ var error14 = () => {
|
|
|
5859
6143
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
5860
6144
|
const sizing = getSizing(issue2.origin);
|
|
5861
6145
|
if (sizing)
|
|
5862
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
5863
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
6146
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
6147
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
5864
6148
|
}
|
|
5865
6149
|
case "too_small": {
|
|
5866
6150
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
5867
6151
|
const sizing = getSizing(issue2.origin);
|
|
5868
|
-
if (sizing)
|
|
5869
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
5870
|
-
}
|
|
5871
|
-
return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
6152
|
+
if (sizing)
|
|
6153
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6154
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
5872
6155
|
}
|
|
5873
6156
|
case "invalid_format": {
|
|
5874
6157
|
const _issue = issue2;
|
|
@@ -5899,12 +6182,12 @@ var error14 = () => {
|
|
|
5899
6182
|
};
|
|
5900
6183
|
function fr_default() {
|
|
5901
6184
|
return {
|
|
5902
|
-
localeError:
|
|
6185
|
+
localeError: error15()
|
|
5903
6186
|
};
|
|
5904
6187
|
}
|
|
5905
6188
|
|
|
5906
|
-
// node_modules/.pnpm/zod@4.3
|
|
5907
|
-
var
|
|
6189
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr-CA.js
|
|
6190
|
+
var error16 = () => {
|
|
5908
6191
|
const Sizable = {
|
|
5909
6192
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
5910
6193
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -6007,12 +6290,12 @@ var error15 = () => {
|
|
|
6007
6290
|
};
|
|
6008
6291
|
function fr_CA_default() {
|
|
6009
6292
|
return {
|
|
6010
|
-
localeError:
|
|
6293
|
+
localeError: error16()
|
|
6011
6294
|
};
|
|
6012
6295
|
}
|
|
6013
6296
|
|
|
6014
|
-
// node_modules/.pnpm/zod@4.3
|
|
6015
|
-
var
|
|
6297
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/he.js
|
|
6298
|
+
var error17 = () => {
|
|
6016
6299
|
const TypeNames = {
|
|
6017
6300
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
6018
6301
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -6202,24 +6485,24 @@ var error16 = () => {
|
|
|
6202
6485
|
};
|
|
6203
6486
|
function he_default() {
|
|
6204
6487
|
return {
|
|
6205
|
-
localeError:
|
|
6488
|
+
localeError: error17()
|
|
6206
6489
|
};
|
|
6207
6490
|
}
|
|
6208
6491
|
|
|
6209
|
-
// node_modules/.pnpm/zod@4.3
|
|
6210
|
-
var
|
|
6492
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hr.js
|
|
6493
|
+
var error18 = () => {
|
|
6211
6494
|
const Sizable = {
|
|
6212
|
-
string: { unit: "
|
|
6213
|
-
file: { unit: "
|
|
6214
|
-
array: { unit: "
|
|
6215
|
-
set: { unit: "
|
|
6495
|
+
string: { unit: "znakova", verb: "imati" },
|
|
6496
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
6497
|
+
array: { unit: "stavki", verb: "imati" },
|
|
6498
|
+
set: { unit: "stavki", verb: "imati" }
|
|
6216
6499
|
};
|
|
6217
6500
|
function getSizing(origin) {
|
|
6218
6501
|
return Sizable[origin] ?? null;
|
|
6219
6502
|
}
|
|
6220
6503
|
const FormatDictionary = {
|
|
6221
|
-
regex: "
|
|
6222
|
-
email: "email
|
|
6504
|
+
regex: "unos",
|
|
6505
|
+
email: "email adresa",
|
|
6223
6506
|
url: "URL",
|
|
6224
6507
|
emoji: "emoji",
|
|
6225
6508
|
uuid: "UUID",
|
|
@@ -6232,25 +6515,37 @@ var error17 = () => {
|
|
|
6232
6515
|
ulid: "ULID",
|
|
6233
6516
|
xid: "XID",
|
|
6234
6517
|
ksuid: "KSUID",
|
|
6235
|
-
datetime: "ISO
|
|
6236
|
-
date: "ISO
|
|
6237
|
-
time: "ISO
|
|
6238
|
-
duration: "ISO
|
|
6239
|
-
ipv4: "IPv4
|
|
6240
|
-
ipv6: "IPv6
|
|
6241
|
-
cidrv4: "IPv4
|
|
6242
|
-
cidrv6: "IPv6
|
|
6243
|
-
base64: "base64
|
|
6244
|
-
base64url: "base64url
|
|
6245
|
-
json_string: "JSON
|
|
6246
|
-
e164: "E.164
|
|
6518
|
+
datetime: "ISO datum i vrijeme",
|
|
6519
|
+
date: "ISO datum",
|
|
6520
|
+
time: "ISO vrijeme",
|
|
6521
|
+
duration: "ISO trajanje",
|
|
6522
|
+
ipv4: "IPv4 adresa",
|
|
6523
|
+
ipv6: "IPv6 adresa",
|
|
6524
|
+
cidrv4: "IPv4 raspon",
|
|
6525
|
+
cidrv6: "IPv6 raspon",
|
|
6526
|
+
base64: "base64 kodirani tekst",
|
|
6527
|
+
base64url: "base64url kodirani tekst",
|
|
6528
|
+
json_string: "JSON tekst",
|
|
6529
|
+
e164: "E.164 broj",
|
|
6247
6530
|
jwt: "JWT",
|
|
6248
|
-
template_literal: "
|
|
6531
|
+
template_literal: "unos"
|
|
6249
6532
|
};
|
|
6250
6533
|
const TypeDictionary = {
|
|
6251
6534
|
nan: "NaN",
|
|
6252
|
-
|
|
6253
|
-
|
|
6535
|
+
string: "tekst",
|
|
6536
|
+
number: "broj",
|
|
6537
|
+
boolean: "boolean",
|
|
6538
|
+
array: "niz",
|
|
6539
|
+
object: "objekt",
|
|
6540
|
+
set: "skup",
|
|
6541
|
+
file: "datoteka",
|
|
6542
|
+
date: "datum",
|
|
6543
|
+
bigint: "bigint",
|
|
6544
|
+
symbol: "simbol",
|
|
6545
|
+
undefined: "undefined",
|
|
6546
|
+
null: "null",
|
|
6547
|
+
function: "funkcija",
|
|
6548
|
+
map: "mapa"
|
|
6254
6549
|
};
|
|
6255
6550
|
return (issue2) => {
|
|
6256
6551
|
switch (issue2.code) {
|
|
@@ -6259,28 +6554,139 @@ var error17 = () => {
|
|
|
6259
6554
|
const receivedType = parsedType(issue2.input);
|
|
6260
6555
|
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
6261
6556
|
if (/^[A-Z]/.test(issue2.expected)) {
|
|
6262
|
-
return
|
|
6557
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
6263
6558
|
}
|
|
6264
|
-
return
|
|
6559
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
6265
6560
|
}
|
|
6266
6561
|
case "invalid_value":
|
|
6267
6562
|
if (issue2.values.length === 1)
|
|
6268
|
-
return
|
|
6269
|
-
return
|
|
6563
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
6564
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
6270
6565
|
case "too_big": {
|
|
6271
6566
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
6272
6567
|
const sizing = getSizing(issue2.origin);
|
|
6568
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
6273
6569
|
if (sizing)
|
|
6274
|
-
return `
|
|
6275
|
-
return `
|
|
6570
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
6571
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
6276
6572
|
}
|
|
6277
6573
|
case "too_small": {
|
|
6278
6574
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
6279
6575
|
const sizing = getSizing(issue2.origin);
|
|
6576
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
6280
6577
|
if (sizing) {
|
|
6281
|
-
return `
|
|
6578
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6282
6579
|
}
|
|
6283
|
-
return `
|
|
6580
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
6581
|
+
}
|
|
6582
|
+
case "invalid_format": {
|
|
6583
|
+
const _issue = issue2;
|
|
6584
|
+
if (_issue.format === "starts_with")
|
|
6585
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
6586
|
+
if (_issue.format === "ends_with")
|
|
6587
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
6588
|
+
if (_issue.format === "includes")
|
|
6589
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
6590
|
+
if (_issue.format === "regex")
|
|
6591
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
6592
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6593
|
+
}
|
|
6594
|
+
case "not_multiple_of":
|
|
6595
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
6596
|
+
case "unrecognized_keys":
|
|
6597
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
6598
|
+
case "invalid_key":
|
|
6599
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
6600
|
+
case "invalid_union":
|
|
6601
|
+
return "Neispravan unos";
|
|
6602
|
+
case "invalid_element":
|
|
6603
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
6604
|
+
default:
|
|
6605
|
+
return `Neispravan unos`;
|
|
6606
|
+
}
|
|
6607
|
+
};
|
|
6608
|
+
};
|
|
6609
|
+
function hr_default() {
|
|
6610
|
+
return {
|
|
6611
|
+
localeError: error18()
|
|
6612
|
+
};
|
|
6613
|
+
}
|
|
6614
|
+
|
|
6615
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hu.js
|
|
6616
|
+
var error19 = () => {
|
|
6617
|
+
const Sizable = {
|
|
6618
|
+
string: { unit: "karakter", verb: "legyen" },
|
|
6619
|
+
file: { unit: "byte", verb: "legyen" },
|
|
6620
|
+
array: { unit: "elem", verb: "legyen" },
|
|
6621
|
+
set: { unit: "elem", verb: "legyen" }
|
|
6622
|
+
};
|
|
6623
|
+
function getSizing(origin) {
|
|
6624
|
+
return Sizable[origin] ?? null;
|
|
6625
|
+
}
|
|
6626
|
+
const FormatDictionary = {
|
|
6627
|
+
regex: "bemenet",
|
|
6628
|
+
email: "email c\xEDm",
|
|
6629
|
+
url: "URL",
|
|
6630
|
+
emoji: "emoji",
|
|
6631
|
+
uuid: "UUID",
|
|
6632
|
+
uuidv4: "UUIDv4",
|
|
6633
|
+
uuidv6: "UUIDv6",
|
|
6634
|
+
nanoid: "nanoid",
|
|
6635
|
+
guid: "GUID",
|
|
6636
|
+
cuid: "cuid",
|
|
6637
|
+
cuid2: "cuid2",
|
|
6638
|
+
ulid: "ULID",
|
|
6639
|
+
xid: "XID",
|
|
6640
|
+
ksuid: "KSUID",
|
|
6641
|
+
datetime: "ISO id\u0151b\xE9lyeg",
|
|
6642
|
+
date: "ISO d\xE1tum",
|
|
6643
|
+
time: "ISO id\u0151",
|
|
6644
|
+
duration: "ISO id\u0151intervallum",
|
|
6645
|
+
ipv4: "IPv4 c\xEDm",
|
|
6646
|
+
ipv6: "IPv6 c\xEDm",
|
|
6647
|
+
cidrv4: "IPv4 tartom\xE1ny",
|
|
6648
|
+
cidrv6: "IPv6 tartom\xE1ny",
|
|
6649
|
+
base64: "base64-k\xF3dolt string",
|
|
6650
|
+
base64url: "base64url-k\xF3dolt string",
|
|
6651
|
+
json_string: "JSON string",
|
|
6652
|
+
e164: "E.164 sz\xE1m",
|
|
6653
|
+
jwt: "JWT",
|
|
6654
|
+
template_literal: "bemenet"
|
|
6655
|
+
};
|
|
6656
|
+
const TypeDictionary = {
|
|
6657
|
+
nan: "NaN",
|
|
6658
|
+
number: "sz\xE1m",
|
|
6659
|
+
array: "t\xF6mb"
|
|
6660
|
+
};
|
|
6661
|
+
return (issue2) => {
|
|
6662
|
+
switch (issue2.code) {
|
|
6663
|
+
case "invalid_type": {
|
|
6664
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
6665
|
+
const receivedType = parsedType(issue2.input);
|
|
6666
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
6667
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
6668
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
|
|
6669
|
+
}
|
|
6670
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
|
|
6671
|
+
}
|
|
6672
|
+
case "invalid_value":
|
|
6673
|
+
if (issue2.values.length === 1)
|
|
6674
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
|
|
6675
|
+
return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
|
|
6676
|
+
case "too_big": {
|
|
6677
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
6678
|
+
const sizing = getSizing(issue2.origin);
|
|
6679
|
+
if (sizing)
|
|
6680
|
+
return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
|
|
6681
|
+
return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
|
|
6682
|
+
}
|
|
6683
|
+
case "too_small": {
|
|
6684
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
6685
|
+
const sizing = getSizing(issue2.origin);
|
|
6686
|
+
if (sizing) {
|
|
6687
|
+
return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6688
|
+
}
|
|
6689
|
+
return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`;
|
|
6284
6690
|
}
|
|
6285
6691
|
case "invalid_format": {
|
|
6286
6692
|
const _issue = issue2;
|
|
@@ -6311,11 +6717,11 @@ var error17 = () => {
|
|
|
6311
6717
|
};
|
|
6312
6718
|
function hu_default() {
|
|
6313
6719
|
return {
|
|
6314
|
-
localeError:
|
|
6720
|
+
localeError: error19()
|
|
6315
6721
|
};
|
|
6316
6722
|
}
|
|
6317
6723
|
|
|
6318
|
-
// node_modules/.pnpm/zod@4.3
|
|
6724
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hy.js
|
|
6319
6725
|
function getArmenianPlural(count, one, many) {
|
|
6320
6726
|
return Math.abs(count) === 1 ? one : many;
|
|
6321
6727
|
}
|
|
@@ -6326,7 +6732,7 @@ function withDefiniteArticle(word) {
|
|
|
6326
6732
|
const lastChar = word[word.length - 1];
|
|
6327
6733
|
return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
|
|
6328
6734
|
}
|
|
6329
|
-
var
|
|
6735
|
+
var error20 = () => {
|
|
6330
6736
|
const Sizable = {
|
|
6331
6737
|
string: {
|
|
6332
6738
|
unit: {
|
|
@@ -6459,12 +6865,12 @@ var error18 = () => {
|
|
|
6459
6865
|
};
|
|
6460
6866
|
function hy_default() {
|
|
6461
6867
|
return {
|
|
6462
|
-
localeError:
|
|
6868
|
+
localeError: error20()
|
|
6463
6869
|
};
|
|
6464
6870
|
}
|
|
6465
6871
|
|
|
6466
|
-
// node_modules/.pnpm/zod@4.3
|
|
6467
|
-
var
|
|
6872
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/id.js
|
|
6873
|
+
var error21 = () => {
|
|
6468
6874
|
const Sizable = {
|
|
6469
6875
|
string: { unit: "karakter", verb: "memiliki" },
|
|
6470
6876
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -6566,12 +6972,12 @@ var error19 = () => {
|
|
|
6566
6972
|
};
|
|
6567
6973
|
function id_default() {
|
|
6568
6974
|
return {
|
|
6569
|
-
localeError:
|
|
6975
|
+
localeError: error21()
|
|
6570
6976
|
};
|
|
6571
6977
|
}
|
|
6572
6978
|
|
|
6573
|
-
// node_modules/.pnpm/zod@4.3
|
|
6574
|
-
var
|
|
6979
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/is.js
|
|
6980
|
+
var error22 = () => {
|
|
6575
6981
|
const Sizable = {
|
|
6576
6982
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
6577
6983
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -6676,12 +7082,12 @@ var error20 = () => {
|
|
|
6676
7082
|
};
|
|
6677
7083
|
function is_default() {
|
|
6678
7084
|
return {
|
|
6679
|
-
localeError:
|
|
7085
|
+
localeError: error22()
|
|
6680
7086
|
};
|
|
6681
7087
|
}
|
|
6682
7088
|
|
|
6683
|
-
// node_modules/.pnpm/zod@4.3
|
|
6684
|
-
var
|
|
7089
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/it.js
|
|
7090
|
+
var error23 = () => {
|
|
6685
7091
|
const Sizable = {
|
|
6686
7092
|
string: { unit: "caratteri", verb: "avere" },
|
|
6687
7093
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -6766,7 +7172,7 @@ var error21 = () => {
|
|
|
6766
7172
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
6767
7173
|
if (_issue.format === "regex")
|
|
6768
7174
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
6769
|
-
return `
|
|
7175
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6770
7176
|
}
|
|
6771
7177
|
case "not_multiple_of":
|
|
6772
7178
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -6785,12 +7191,12 @@ var error21 = () => {
|
|
|
6785
7191
|
};
|
|
6786
7192
|
function it_default() {
|
|
6787
7193
|
return {
|
|
6788
|
-
localeError:
|
|
7194
|
+
localeError: error23()
|
|
6789
7195
|
};
|
|
6790
7196
|
}
|
|
6791
7197
|
|
|
6792
|
-
// node_modules/.pnpm/zod@4.3
|
|
6793
|
-
var
|
|
7198
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ja.js
|
|
7199
|
+
var error24 = () => {
|
|
6794
7200
|
const Sizable = {
|
|
6795
7201
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
6796
7202
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -6893,12 +7299,12 @@ var error22 = () => {
|
|
|
6893
7299
|
};
|
|
6894
7300
|
function ja_default() {
|
|
6895
7301
|
return {
|
|
6896
|
-
localeError:
|
|
7302
|
+
localeError: error24()
|
|
6897
7303
|
};
|
|
6898
7304
|
}
|
|
6899
7305
|
|
|
6900
|
-
// node_modules/.pnpm/zod@4.3
|
|
6901
|
-
var
|
|
7306
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ka.js
|
|
7307
|
+
var error25 = () => {
|
|
6902
7308
|
const Sizable = {
|
|
6903
7309
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
6904
7310
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -6931,9 +7337,9 @@ var error23 = () => {
|
|
|
6931
7337
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
6932
7338
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
6933
7339
|
cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
6934
|
-
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
6935
|
-
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
6936
|
-
json_string: "JSON \
|
|
7340
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7341
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7342
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
6937
7343
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
6938
7344
|
jwt: "JWT",
|
|
6939
7345
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -6941,7 +7347,7 @@ var error23 = () => {
|
|
|
6941
7347
|
const TypeDictionary = {
|
|
6942
7348
|
nan: "NaN",
|
|
6943
7349
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
6944
|
-
string: "\
|
|
7350
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
6945
7351
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
6946
7352
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
6947
7353
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -6979,14 +7385,14 @@ var error23 = () => {
|
|
|
6979
7385
|
case "invalid_format": {
|
|
6980
7386
|
const _issue = issue2;
|
|
6981
7387
|
if (_issue.format === "starts_with") {
|
|
6982
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7388
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
|
|
6983
7389
|
}
|
|
6984
7390
|
if (_issue.format === "ends_with")
|
|
6985
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7391
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`;
|
|
6986
7392
|
if (_issue.format === "includes")
|
|
6987
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7393
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`;
|
|
6988
7394
|
if (_issue.format === "regex")
|
|
6989
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7395
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;
|
|
6990
7396
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6991
7397
|
}
|
|
6992
7398
|
case "not_multiple_of":
|
|
@@ -7006,12 +7412,12 @@ var error23 = () => {
|
|
|
7006
7412
|
};
|
|
7007
7413
|
function ka_default() {
|
|
7008
7414
|
return {
|
|
7009
|
-
localeError:
|
|
7415
|
+
localeError: error25()
|
|
7010
7416
|
};
|
|
7011
7417
|
}
|
|
7012
7418
|
|
|
7013
|
-
// node_modules/.pnpm/zod@4.3
|
|
7014
|
-
var
|
|
7419
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/km.js
|
|
7420
|
+
var error26 = () => {
|
|
7015
7421
|
const Sizable = {
|
|
7016
7422
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
7017
7423
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -7117,17 +7523,17 @@ var error24 = () => {
|
|
|
7117
7523
|
};
|
|
7118
7524
|
function km_default() {
|
|
7119
7525
|
return {
|
|
7120
|
-
localeError:
|
|
7526
|
+
localeError: error26()
|
|
7121
7527
|
};
|
|
7122
7528
|
}
|
|
7123
7529
|
|
|
7124
|
-
// node_modules/.pnpm/zod@4.3
|
|
7530
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/kh.js
|
|
7125
7531
|
function kh_default() {
|
|
7126
7532
|
return km_default();
|
|
7127
7533
|
}
|
|
7128
7534
|
|
|
7129
|
-
// node_modules/.pnpm/zod@4.3
|
|
7130
|
-
var
|
|
7535
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ko.js
|
|
7536
|
+
var error27 = () => {
|
|
7131
7537
|
const Sizable = {
|
|
7132
7538
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
7133
7539
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -7234,11 +7640,11 @@ var error25 = () => {
|
|
|
7234
7640
|
};
|
|
7235
7641
|
function ko_default() {
|
|
7236
7642
|
return {
|
|
7237
|
-
localeError:
|
|
7643
|
+
localeError: error27()
|
|
7238
7644
|
};
|
|
7239
7645
|
}
|
|
7240
7646
|
|
|
7241
|
-
// node_modules/.pnpm/zod@4.3
|
|
7647
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/lt.js
|
|
7242
7648
|
var capitalizeFirstCharacter = (text) => {
|
|
7243
7649
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
7244
7650
|
};
|
|
@@ -7252,7 +7658,7 @@ function getUnitTypeFromNumber(number4) {
|
|
|
7252
7658
|
return "one";
|
|
7253
7659
|
return "few";
|
|
7254
7660
|
}
|
|
7255
|
-
var
|
|
7661
|
+
var error28 = () => {
|
|
7256
7662
|
const Sizable = {
|
|
7257
7663
|
string: {
|
|
7258
7664
|
unit: {
|
|
@@ -7438,12 +7844,12 @@ var error26 = () => {
|
|
|
7438
7844
|
};
|
|
7439
7845
|
function lt_default() {
|
|
7440
7846
|
return {
|
|
7441
|
-
localeError:
|
|
7847
|
+
localeError: error28()
|
|
7442
7848
|
};
|
|
7443
7849
|
}
|
|
7444
7850
|
|
|
7445
|
-
// node_modules/.pnpm/zod@4.3
|
|
7446
|
-
var
|
|
7851
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/mk.js
|
|
7852
|
+
var error29 = () => {
|
|
7447
7853
|
const Sizable = {
|
|
7448
7854
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
7449
7855
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -7548,12 +7954,12 @@ var error27 = () => {
|
|
|
7548
7954
|
};
|
|
7549
7955
|
function mk_default() {
|
|
7550
7956
|
return {
|
|
7551
|
-
localeError:
|
|
7957
|
+
localeError: error29()
|
|
7552
7958
|
};
|
|
7553
7959
|
}
|
|
7554
7960
|
|
|
7555
|
-
// node_modules/.pnpm/zod@4.3
|
|
7556
|
-
var
|
|
7961
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ms.js
|
|
7962
|
+
var error30 = () => {
|
|
7557
7963
|
const Sizable = {
|
|
7558
7964
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
7559
7965
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -7656,12 +8062,12 @@ var error28 = () => {
|
|
|
7656
8062
|
};
|
|
7657
8063
|
function ms_default() {
|
|
7658
8064
|
return {
|
|
7659
|
-
localeError:
|
|
8065
|
+
localeError: error30()
|
|
7660
8066
|
};
|
|
7661
8067
|
}
|
|
7662
8068
|
|
|
7663
|
-
// node_modules/.pnpm/zod@4.3
|
|
7664
|
-
var
|
|
8069
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/nl.js
|
|
8070
|
+
var error31 = () => {
|
|
7665
8071
|
const Sizable = {
|
|
7666
8072
|
string: { unit: "tekens", verb: "heeft" },
|
|
7667
8073
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -7767,12 +8173,12 @@ var error29 = () => {
|
|
|
7767
8173
|
};
|
|
7768
8174
|
function nl_default() {
|
|
7769
8175
|
return {
|
|
7770
|
-
localeError:
|
|
8176
|
+
localeError: error31()
|
|
7771
8177
|
};
|
|
7772
8178
|
}
|
|
7773
8179
|
|
|
7774
|
-
// node_modules/.pnpm/zod@4.3
|
|
7775
|
-
var
|
|
8180
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/no.js
|
|
8181
|
+
var error32 = () => {
|
|
7776
8182
|
const Sizable = {
|
|
7777
8183
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
7778
8184
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -7876,12 +8282,12 @@ var error30 = () => {
|
|
|
7876
8282
|
};
|
|
7877
8283
|
function no_default() {
|
|
7878
8284
|
return {
|
|
7879
|
-
localeError:
|
|
8285
|
+
localeError: error32()
|
|
7880
8286
|
};
|
|
7881
8287
|
}
|
|
7882
8288
|
|
|
7883
|
-
// node_modules/.pnpm/zod@4.3
|
|
7884
|
-
var
|
|
8289
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ota.js
|
|
8290
|
+
var error33 = () => {
|
|
7885
8291
|
const Sizable = {
|
|
7886
8292
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
7887
8293
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -7986,12 +8392,12 @@ var error31 = () => {
|
|
|
7986
8392
|
};
|
|
7987
8393
|
function ota_default() {
|
|
7988
8394
|
return {
|
|
7989
|
-
localeError:
|
|
8395
|
+
localeError: error33()
|
|
7990
8396
|
};
|
|
7991
8397
|
}
|
|
7992
8398
|
|
|
7993
|
-
// node_modules/.pnpm/zod@4.3
|
|
7994
|
-
var
|
|
8399
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ps.js
|
|
8400
|
+
var error34 = () => {
|
|
7995
8401
|
const Sizable = {
|
|
7996
8402
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
7997
8403
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -8101,12 +8507,12 @@ var error32 = () => {
|
|
|
8101
8507
|
};
|
|
8102
8508
|
function ps_default() {
|
|
8103
8509
|
return {
|
|
8104
|
-
localeError:
|
|
8510
|
+
localeError: error34()
|
|
8105
8511
|
};
|
|
8106
8512
|
}
|
|
8107
8513
|
|
|
8108
|
-
// node_modules/.pnpm/zod@4.3
|
|
8109
|
-
var
|
|
8514
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pl.js
|
|
8515
|
+
var error35 = () => {
|
|
8110
8516
|
const Sizable = {
|
|
8111
8517
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
8112
8518
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -8211,12 +8617,12 @@ var error33 = () => {
|
|
|
8211
8617
|
};
|
|
8212
8618
|
function pl_default() {
|
|
8213
8619
|
return {
|
|
8214
|
-
localeError:
|
|
8620
|
+
localeError: error35()
|
|
8215
8621
|
};
|
|
8216
8622
|
}
|
|
8217
8623
|
|
|
8218
|
-
// node_modules/.pnpm/zod@4.3
|
|
8219
|
-
var
|
|
8624
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pt.js
|
|
8625
|
+
var error36 = () => {
|
|
8220
8626
|
const Sizable = {
|
|
8221
8627
|
string: { unit: "caracteres", verb: "ter" },
|
|
8222
8628
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -8320,11 +8726,131 @@ var error34 = () => {
|
|
|
8320
8726
|
};
|
|
8321
8727
|
function pt_default() {
|
|
8322
8728
|
return {
|
|
8323
|
-
localeError:
|
|
8729
|
+
localeError: error36()
|
|
8730
|
+
};
|
|
8731
|
+
}
|
|
8732
|
+
|
|
8733
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ro.js
|
|
8734
|
+
var error37 = () => {
|
|
8735
|
+
const Sizable = {
|
|
8736
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
8737
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
8738
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
8739
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
8740
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
8741
|
+
};
|
|
8742
|
+
function getSizing(origin) {
|
|
8743
|
+
return Sizable[origin] ?? null;
|
|
8744
|
+
}
|
|
8745
|
+
const FormatDictionary = {
|
|
8746
|
+
regex: "intrare",
|
|
8747
|
+
email: "adres\u0103 de email",
|
|
8748
|
+
url: "URL",
|
|
8749
|
+
emoji: "emoji",
|
|
8750
|
+
uuid: "UUID",
|
|
8751
|
+
uuidv4: "UUIDv4",
|
|
8752
|
+
uuidv6: "UUIDv6",
|
|
8753
|
+
nanoid: "nanoid",
|
|
8754
|
+
guid: "GUID",
|
|
8755
|
+
cuid: "cuid",
|
|
8756
|
+
cuid2: "cuid2",
|
|
8757
|
+
ulid: "ULID",
|
|
8758
|
+
xid: "XID",
|
|
8759
|
+
ksuid: "KSUID",
|
|
8760
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
8761
|
+
date: "dat\u0103 ISO",
|
|
8762
|
+
time: "or\u0103 ISO",
|
|
8763
|
+
duration: "durat\u0103 ISO",
|
|
8764
|
+
ipv4: "adres\u0103 IPv4",
|
|
8765
|
+
ipv6: "adres\u0103 IPv6",
|
|
8766
|
+
mac: "adres\u0103 MAC",
|
|
8767
|
+
cidrv4: "interval IPv4",
|
|
8768
|
+
cidrv6: "interval IPv6",
|
|
8769
|
+
base64: "\u0219ir codat base64",
|
|
8770
|
+
base64url: "\u0219ir codat base64url",
|
|
8771
|
+
json_string: "\u0219ir JSON",
|
|
8772
|
+
e164: "num\u0103r E.164",
|
|
8773
|
+
jwt: "JWT",
|
|
8774
|
+
template_literal: "intrare"
|
|
8775
|
+
};
|
|
8776
|
+
const TypeDictionary = {
|
|
8777
|
+
nan: "NaN",
|
|
8778
|
+
string: "\u0219ir",
|
|
8779
|
+
number: "num\u0103r",
|
|
8780
|
+
boolean: "boolean",
|
|
8781
|
+
function: "func\u021Bie",
|
|
8782
|
+
array: "matrice",
|
|
8783
|
+
object: "obiect",
|
|
8784
|
+
undefined: "nedefinit",
|
|
8785
|
+
symbol: "simbol",
|
|
8786
|
+
bigint: "num\u0103r mare",
|
|
8787
|
+
void: "void",
|
|
8788
|
+
never: "never",
|
|
8789
|
+
map: "hart\u0103",
|
|
8790
|
+
set: "set"
|
|
8791
|
+
};
|
|
8792
|
+
return (issue2) => {
|
|
8793
|
+
switch (issue2.code) {
|
|
8794
|
+
case "invalid_type": {
|
|
8795
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
8796
|
+
const receivedType = parsedType(issue2.input);
|
|
8797
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
8798
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
8799
|
+
}
|
|
8800
|
+
case "invalid_value":
|
|
8801
|
+
if (issue2.values.length === 1)
|
|
8802
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
8803
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
8804
|
+
case "too_big": {
|
|
8805
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
8806
|
+
const sizing = getSizing(issue2.origin);
|
|
8807
|
+
if (sizing)
|
|
8808
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
8809
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
8810
|
+
}
|
|
8811
|
+
case "too_small": {
|
|
8812
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
8813
|
+
const sizing = getSizing(issue2.origin);
|
|
8814
|
+
if (sizing) {
|
|
8815
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
8816
|
+
}
|
|
8817
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
8818
|
+
}
|
|
8819
|
+
case "invalid_format": {
|
|
8820
|
+
const _issue = issue2;
|
|
8821
|
+
if (_issue.format === "starts_with") {
|
|
8822
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
8823
|
+
}
|
|
8824
|
+
if (_issue.format === "ends_with")
|
|
8825
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
8826
|
+
if (_issue.format === "includes")
|
|
8827
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
8828
|
+
if (_issue.format === "regex")
|
|
8829
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
8830
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
8831
|
+
}
|
|
8832
|
+
case "not_multiple_of":
|
|
8833
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
8834
|
+
case "unrecognized_keys":
|
|
8835
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
8836
|
+
case "invalid_key":
|
|
8837
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
8838
|
+
case "invalid_union":
|
|
8839
|
+
return "Intrare invalid\u0103";
|
|
8840
|
+
case "invalid_element":
|
|
8841
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
8842
|
+
default:
|
|
8843
|
+
return `Intrare invalid\u0103`;
|
|
8844
|
+
}
|
|
8845
|
+
};
|
|
8846
|
+
};
|
|
8847
|
+
function ro_default() {
|
|
8848
|
+
return {
|
|
8849
|
+
localeError: error37()
|
|
8324
8850
|
};
|
|
8325
8851
|
}
|
|
8326
8852
|
|
|
8327
|
-
// node_modules/.pnpm/zod@4.3
|
|
8853
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ru.js
|
|
8328
8854
|
function getRussianPlural(count, one, few, many) {
|
|
8329
8855
|
const absCount = Math.abs(count);
|
|
8330
8856
|
const lastDigit = absCount % 10;
|
|
@@ -8340,7 +8866,7 @@ function getRussianPlural(count, one, few, many) {
|
|
|
8340
8866
|
}
|
|
8341
8867
|
return many;
|
|
8342
8868
|
}
|
|
8343
|
-
var
|
|
8869
|
+
var error38 = () => {
|
|
8344
8870
|
const Sizable = {
|
|
8345
8871
|
string: {
|
|
8346
8872
|
unit: {
|
|
@@ -8477,12 +9003,12 @@ var error35 = () => {
|
|
|
8477
9003
|
};
|
|
8478
9004
|
function ru_default() {
|
|
8479
9005
|
return {
|
|
8480
|
-
localeError:
|
|
9006
|
+
localeError: error38()
|
|
8481
9007
|
};
|
|
8482
9008
|
}
|
|
8483
9009
|
|
|
8484
|
-
// node_modules/.pnpm/zod@4.3
|
|
8485
|
-
var
|
|
9010
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sl.js
|
|
9011
|
+
var error39 = () => {
|
|
8486
9012
|
const Sizable = {
|
|
8487
9013
|
string: { unit: "znakov", verb: "imeti" },
|
|
8488
9014
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -8587,12 +9113,12 @@ var error36 = () => {
|
|
|
8587
9113
|
};
|
|
8588
9114
|
function sl_default() {
|
|
8589
9115
|
return {
|
|
8590
|
-
localeError:
|
|
9116
|
+
localeError: error39()
|
|
8591
9117
|
};
|
|
8592
9118
|
}
|
|
8593
9119
|
|
|
8594
|
-
// node_modules/.pnpm/zod@4.3
|
|
8595
|
-
var
|
|
9120
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sv.js
|
|
9121
|
+
var error40 = () => {
|
|
8596
9122
|
const Sizable = {
|
|
8597
9123
|
string: { unit: "tecken", verb: "att ha" },
|
|
8598
9124
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -8698,12 +9224,12 @@ var error37 = () => {
|
|
|
8698
9224
|
};
|
|
8699
9225
|
function sv_default() {
|
|
8700
9226
|
return {
|
|
8701
|
-
localeError:
|
|
9227
|
+
localeError: error40()
|
|
8702
9228
|
};
|
|
8703
9229
|
}
|
|
8704
9230
|
|
|
8705
|
-
// node_modules/.pnpm/zod@4.3
|
|
8706
|
-
var
|
|
9231
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ta.js
|
|
9232
|
+
var error41 = () => {
|
|
8707
9233
|
const Sizable = {
|
|
8708
9234
|
string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
8709
9235
|
file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
@@ -8809,12 +9335,12 @@ var error38 = () => {
|
|
|
8809
9335
|
};
|
|
8810
9336
|
function ta_default() {
|
|
8811
9337
|
return {
|
|
8812
|
-
localeError:
|
|
9338
|
+
localeError: error41()
|
|
8813
9339
|
};
|
|
8814
9340
|
}
|
|
8815
9341
|
|
|
8816
|
-
// node_modules/.pnpm/zod@4.3
|
|
8817
|
-
var
|
|
9342
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/th.js
|
|
9343
|
+
var error42 = () => {
|
|
8818
9344
|
const Sizable = {
|
|
8819
9345
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
8820
9346
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -8920,12 +9446,12 @@ var error39 = () => {
|
|
|
8920
9446
|
};
|
|
8921
9447
|
function th_default() {
|
|
8922
9448
|
return {
|
|
8923
|
-
localeError:
|
|
9449
|
+
localeError: error42()
|
|
8924
9450
|
};
|
|
8925
9451
|
}
|
|
8926
9452
|
|
|
8927
|
-
// node_modules/.pnpm/zod@4.3
|
|
8928
|
-
var
|
|
9453
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/tr.js
|
|
9454
|
+
var error43 = () => {
|
|
8929
9455
|
const Sizable = {
|
|
8930
9456
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
8931
9457
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -9026,12 +9552,12 @@ var error40 = () => {
|
|
|
9026
9552
|
};
|
|
9027
9553
|
function tr_default() {
|
|
9028
9554
|
return {
|
|
9029
|
-
localeError:
|
|
9555
|
+
localeError: error43()
|
|
9030
9556
|
};
|
|
9031
9557
|
}
|
|
9032
9558
|
|
|
9033
|
-
// node_modules/.pnpm/zod@4.3
|
|
9034
|
-
var
|
|
9559
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uk.js
|
|
9560
|
+
var error44 = () => {
|
|
9035
9561
|
const Sizable = {
|
|
9036
9562
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
9037
9563
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -9135,17 +9661,17 @@ var error41 = () => {
|
|
|
9135
9661
|
};
|
|
9136
9662
|
function uk_default() {
|
|
9137
9663
|
return {
|
|
9138
|
-
localeError:
|
|
9664
|
+
localeError: error44()
|
|
9139
9665
|
};
|
|
9140
9666
|
}
|
|
9141
9667
|
|
|
9142
|
-
// node_modules/.pnpm/zod@4.3
|
|
9668
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ua.js
|
|
9143
9669
|
function ua_default() {
|
|
9144
9670
|
return uk_default();
|
|
9145
9671
|
}
|
|
9146
9672
|
|
|
9147
|
-
// node_modules/.pnpm/zod@4.3
|
|
9148
|
-
var
|
|
9673
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ur.js
|
|
9674
|
+
var error45 = () => {
|
|
9149
9675
|
const Sizable = {
|
|
9150
9676
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
9151
9677
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -9251,17 +9777,18 @@ var error42 = () => {
|
|
|
9251
9777
|
};
|
|
9252
9778
|
function ur_default() {
|
|
9253
9779
|
return {
|
|
9254
|
-
localeError:
|
|
9780
|
+
localeError: error45()
|
|
9255
9781
|
};
|
|
9256
9782
|
}
|
|
9257
9783
|
|
|
9258
|
-
// node_modules/.pnpm/zod@4.3
|
|
9259
|
-
var
|
|
9784
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uz.js
|
|
9785
|
+
var error46 = () => {
|
|
9260
9786
|
const Sizable = {
|
|
9261
9787
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
9262
9788
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
9263
9789
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
9264
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
9790
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
9791
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
9265
9792
|
};
|
|
9266
9793
|
function getSizing(origin) {
|
|
9267
9794
|
return Sizable[origin] ?? null;
|
|
@@ -9361,12 +9888,12 @@ var error43 = () => {
|
|
|
9361
9888
|
};
|
|
9362
9889
|
function uz_default() {
|
|
9363
9890
|
return {
|
|
9364
|
-
localeError:
|
|
9891
|
+
localeError: error46()
|
|
9365
9892
|
};
|
|
9366
9893
|
}
|
|
9367
9894
|
|
|
9368
|
-
// node_modules/.pnpm/zod@4.3
|
|
9369
|
-
var
|
|
9895
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/vi.js
|
|
9896
|
+
var error47 = () => {
|
|
9370
9897
|
const Sizable = {
|
|
9371
9898
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
9372
9899
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -9470,12 +9997,12 @@ var error44 = () => {
|
|
|
9470
9997
|
};
|
|
9471
9998
|
function vi_default() {
|
|
9472
9999
|
return {
|
|
9473
|
-
localeError:
|
|
10000
|
+
localeError: error47()
|
|
9474
10001
|
};
|
|
9475
10002
|
}
|
|
9476
10003
|
|
|
9477
|
-
// node_modules/.pnpm/zod@4.3
|
|
9478
|
-
var
|
|
10004
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-CN.js
|
|
10005
|
+
var error48 = () => {
|
|
9479
10006
|
const Sizable = {
|
|
9480
10007
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
9481
10008
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -9580,12 +10107,12 @@ var error45 = () => {
|
|
|
9580
10107
|
};
|
|
9581
10108
|
function zh_CN_default() {
|
|
9582
10109
|
return {
|
|
9583
|
-
localeError:
|
|
10110
|
+
localeError: error48()
|
|
9584
10111
|
};
|
|
9585
10112
|
}
|
|
9586
10113
|
|
|
9587
|
-
// node_modules/.pnpm/zod@4.3
|
|
9588
|
-
var
|
|
10114
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-TW.js
|
|
10115
|
+
var error49 = () => {
|
|
9589
10116
|
const Sizable = {
|
|
9590
10117
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
9591
10118
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -9688,12 +10215,12 @@ var error46 = () => {
|
|
|
9688
10215
|
};
|
|
9689
10216
|
function zh_TW_default() {
|
|
9690
10217
|
return {
|
|
9691
|
-
localeError:
|
|
10218
|
+
localeError: error49()
|
|
9692
10219
|
};
|
|
9693
10220
|
}
|
|
9694
10221
|
|
|
9695
|
-
// node_modules/.pnpm/zod@4.3
|
|
9696
|
-
var
|
|
10222
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/yo.js
|
|
10223
|
+
var error50 = () => {
|
|
9697
10224
|
const Sizable = {
|
|
9698
10225
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
9699
10226
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -9796,12 +10323,12 @@ var error47 = () => {
|
|
|
9796
10323
|
};
|
|
9797
10324
|
function yo_default() {
|
|
9798
10325
|
return {
|
|
9799
|
-
localeError:
|
|
10326
|
+
localeError: error50()
|
|
9800
10327
|
};
|
|
9801
10328
|
}
|
|
9802
10329
|
|
|
9803
|
-
// node_modules/.pnpm/zod@4.3
|
|
9804
|
-
var
|
|
10330
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
|
|
10331
|
+
var _a2;
|
|
9805
10332
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
9806
10333
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
9807
10334
|
var $ZodRegistry = class {
|
|
@@ -9847,10 +10374,10 @@ var $ZodRegistry = class {
|
|
|
9847
10374
|
function registry() {
|
|
9848
10375
|
return new $ZodRegistry();
|
|
9849
10376
|
}
|
|
9850
|
-
(
|
|
10377
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
9851
10378
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
9852
10379
|
|
|
9853
|
-
// node_modules/.pnpm/zod@4.3
|
|
10380
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
|
|
9854
10381
|
// @__NO_SIDE_EFFECTS__
|
|
9855
10382
|
function _string(Class2, params) {
|
|
9856
10383
|
return new Class2({
|
|
@@ -10765,7 +11292,7 @@ function _refine(Class2, fn, _params) {
|
|
|
10765
11292
|
return schema;
|
|
10766
11293
|
}
|
|
10767
11294
|
// @__NO_SIDE_EFFECTS__
|
|
10768
|
-
function _superRefine(fn) {
|
|
11295
|
+
function _superRefine(fn, params) {
|
|
10769
11296
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
10770
11297
|
payload.addIssue = (issue2) => {
|
|
10771
11298
|
if (typeof issue2 === "string") {
|
|
@@ -10782,7 +11309,7 @@ function _superRefine(fn) {
|
|
|
10782
11309
|
}
|
|
10783
11310
|
};
|
|
10784
11311
|
return fn(payload.value, payload);
|
|
10785
|
-
});
|
|
11312
|
+
}, params);
|
|
10786
11313
|
return ch;
|
|
10787
11314
|
}
|
|
10788
11315
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -10889,7 +11416,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
10889
11416
|
return inst;
|
|
10890
11417
|
}
|
|
10891
11418
|
|
|
10892
|
-
// node_modules/.pnpm/zod@4.3
|
|
11419
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
|
|
10893
11420
|
function initializeContext(params) {
|
|
10894
11421
|
let target = params?.target ?? "draft-2020-12";
|
|
10895
11422
|
if (target === "draft-4")
|
|
@@ -10912,7 +11439,7 @@ function initializeContext(params) {
|
|
|
10912
11439
|
};
|
|
10913
11440
|
}
|
|
10914
11441
|
function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
10915
|
-
var
|
|
11442
|
+
var _a3;
|
|
10916
11443
|
const def = schema._zod.def;
|
|
10917
11444
|
const seen = ctx.seen.get(schema);
|
|
10918
11445
|
if (seen) {
|
|
@@ -10959,8 +11486,8 @@ function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
10959
11486
|
delete result.schema.examples;
|
|
10960
11487
|
delete result.schema.default;
|
|
10961
11488
|
}
|
|
10962
|
-
if (ctx.io === "input" && result.schema
|
|
10963
|
-
(
|
|
11489
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
11490
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
10964
11491
|
delete result.schema._prefault;
|
|
10965
11492
|
const _result = ctx.seen.get(schema);
|
|
10966
11493
|
return _result.schema;
|
|
@@ -11141,10 +11668,15 @@ function finalize(ctx, schema) {
|
|
|
11141
11668
|
result.$id = ctx.external.uri(id);
|
|
11142
11669
|
}
|
|
11143
11670
|
Object.assign(result, root.def ?? root.schema);
|
|
11671
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
11672
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
11673
|
+
delete result.id;
|
|
11144
11674
|
const defs = ctx.external?.defs ?? {};
|
|
11145
11675
|
for (const entry of ctx.seen.entries()) {
|
|
11146
11676
|
const seen = entry[1];
|
|
11147
11677
|
if (seen.def && seen.defId) {
|
|
11678
|
+
if (seen.def.id === seen.defId)
|
|
11679
|
+
delete seen.def.id;
|
|
11148
11680
|
defs[seen.defId] = seen.def;
|
|
11149
11681
|
}
|
|
11150
11682
|
}
|
|
@@ -11200,6 +11732,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
11200
11732
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
11201
11733
|
}
|
|
11202
11734
|
if (def.type === "pipe") {
|
|
11735
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
11736
|
+
return true;
|
|
11203
11737
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
11204
11738
|
}
|
|
11205
11739
|
if (def.type === "object") {
|
|
@@ -11241,7 +11775,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
|
|
|
11241
11775
|
return finalize(ctx, schema);
|
|
11242
11776
|
};
|
|
11243
11777
|
|
|
11244
|
-
// node_modules/.pnpm/zod@4.3
|
|
11778
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.js
|
|
11245
11779
|
var formatMap = {
|
|
11246
11780
|
guid: "uuid",
|
|
11247
11781
|
url: "uri",
|
|
@@ -11289,39 +11823,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
11289
11823
|
json2.type = "integer";
|
|
11290
11824
|
else
|
|
11291
11825
|
json2.type = "number";
|
|
11292
|
-
|
|
11293
|
-
|
|
11826
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
11827
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
11828
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
11829
|
+
if (exMin) {
|
|
11830
|
+
if (legacy) {
|
|
11294
11831
|
json2.minimum = exclusiveMinimum;
|
|
11295
11832
|
json2.exclusiveMinimum = true;
|
|
11296
11833
|
} else {
|
|
11297
11834
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
11298
11835
|
}
|
|
11299
|
-
}
|
|
11300
|
-
if (typeof minimum === "number") {
|
|
11836
|
+
} else if (typeof minimum === "number") {
|
|
11301
11837
|
json2.minimum = minimum;
|
|
11302
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
11303
|
-
if (exclusiveMinimum >= minimum)
|
|
11304
|
-
delete json2.minimum;
|
|
11305
|
-
else
|
|
11306
|
-
delete json2.exclusiveMinimum;
|
|
11307
|
-
}
|
|
11308
11838
|
}
|
|
11309
|
-
if (
|
|
11310
|
-
if (
|
|
11839
|
+
if (exMax) {
|
|
11840
|
+
if (legacy) {
|
|
11311
11841
|
json2.maximum = exclusiveMaximum;
|
|
11312
11842
|
json2.exclusiveMaximum = true;
|
|
11313
11843
|
} else {
|
|
11314
11844
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
11315
11845
|
}
|
|
11316
|
-
}
|
|
11317
|
-
if (typeof maximum === "number") {
|
|
11846
|
+
} else if (typeof maximum === "number") {
|
|
11318
11847
|
json2.maximum = maximum;
|
|
11319
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
11320
|
-
if (exclusiveMaximum <= maximum)
|
|
11321
|
-
delete json2.maximum;
|
|
11322
|
-
else
|
|
11323
|
-
delete json2.exclusiveMaximum;
|
|
11324
|
-
}
|
|
11325
11848
|
}
|
|
11326
11849
|
if (typeof multipleOf === "number")
|
|
11327
11850
|
json2.multipleOf = multipleOf;
|
|
@@ -11493,7 +12016,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
11493
12016
|
if (typeof maximum === "number")
|
|
11494
12017
|
json2.maxItems = maximum;
|
|
11495
12018
|
json2.type = "array";
|
|
11496
|
-
json2.items = process(def.element, ctx, {
|
|
12019
|
+
json2.items = process(def.element, ctx, {
|
|
12020
|
+
...params,
|
|
12021
|
+
path: [...params.path, "items"]
|
|
12022
|
+
});
|
|
11497
12023
|
};
|
|
11498
12024
|
var objectProcessor = (schema, ctx, _json, params) => {
|
|
11499
12025
|
const json2 = _json;
|
|
@@ -11686,7 +12212,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
|
|
|
11686
12212
|
};
|
|
11687
12213
|
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
11688
12214
|
const def = schema._zod.def;
|
|
11689
|
-
const
|
|
12215
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
12216
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
11690
12217
|
process(innerType, ctx, params);
|
|
11691
12218
|
const seen = ctx.seen.get(schema);
|
|
11692
12219
|
seen.ref = innerType;
|
|
@@ -11792,7 +12319,7 @@ function toJSONSchema(input, params) {
|
|
|
11792
12319
|
return finalize(ctx, input);
|
|
11793
12320
|
}
|
|
11794
12321
|
|
|
11795
|
-
// node_modules/.pnpm/zod@4.3
|
|
12322
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-generator.js
|
|
11796
12323
|
var JSONSchemaGenerator = class {
|
|
11797
12324
|
/** @deprecated Access via ctx instead */
|
|
11798
12325
|
get metadataRegistry() {
|
|
@@ -11867,10 +12394,10 @@ var JSONSchemaGenerator = class {
|
|
|
11867
12394
|
}
|
|
11868
12395
|
};
|
|
11869
12396
|
|
|
11870
|
-
// node_modules/.pnpm/zod@4.3
|
|
12397
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
|
|
11871
12398
|
var json_schema_exports = {};
|
|
11872
12399
|
|
|
11873
|
-
// node_modules/.pnpm/zod@4.3
|
|
12400
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
|
|
11874
12401
|
var schemas_exports2 = {};
|
|
11875
12402
|
__export(schemas_exports2, {
|
|
11876
12403
|
ZodAny: () => ZodAny,
|
|
@@ -11920,6 +12447,7 @@ __export(schemas_exports2, {
|
|
|
11920
12447
|
ZodOptional: () => ZodOptional,
|
|
11921
12448
|
ZodPipe: () => ZodPipe,
|
|
11922
12449
|
ZodPrefault: () => ZodPrefault,
|
|
12450
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
11923
12451
|
ZodPromise: () => ZodPromise,
|
|
11924
12452
|
ZodReadonly: () => ZodReadonly,
|
|
11925
12453
|
ZodRecord: () => ZodRecord,
|
|
@@ -11980,6 +12508,7 @@ __export(schemas_exports2, {
|
|
|
11980
12508
|
int32: () => int32,
|
|
11981
12509
|
int64: () => int64,
|
|
11982
12510
|
intersection: () => intersection,
|
|
12511
|
+
invertCodec: () => invertCodec,
|
|
11983
12512
|
ipv4: () => ipv42,
|
|
11984
12513
|
ipv6: () => ipv62,
|
|
11985
12514
|
json: () => json,
|
|
@@ -12039,7 +12568,7 @@ __export(schemas_exports2, {
|
|
|
12039
12568
|
xor: () => xor
|
|
12040
12569
|
});
|
|
12041
12570
|
|
|
12042
|
-
// node_modules/.pnpm/zod@4.3
|
|
12571
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/checks.js
|
|
12043
12572
|
var checks_exports2 = {};
|
|
12044
12573
|
__export(checks_exports2, {
|
|
12045
12574
|
endsWith: () => _endsWith,
|
|
@@ -12073,7 +12602,7 @@ __export(checks_exports2, {
|
|
|
12073
12602
|
uppercase: () => _uppercase
|
|
12074
12603
|
});
|
|
12075
12604
|
|
|
12076
|
-
// node_modules/.pnpm/zod@4.3
|
|
12605
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.js
|
|
12077
12606
|
var iso_exports = {};
|
|
12078
12607
|
__export(iso_exports, {
|
|
12079
12608
|
ZodISODate: () => ZodISODate,
|
|
@@ -12114,7 +12643,7 @@ function duration2(params) {
|
|
|
12114
12643
|
return _isoDuration(ZodISODuration, params);
|
|
12115
12644
|
}
|
|
12116
12645
|
|
|
12117
|
-
// node_modules/.pnpm/zod@4.3
|
|
12646
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.js
|
|
12118
12647
|
var initializer2 = (inst, issues) => {
|
|
12119
12648
|
$ZodError.init(inst, issues);
|
|
12120
12649
|
inst.name = "ZodError";
|
|
@@ -12149,12 +12678,12 @@ var initializer2 = (inst, issues) => {
|
|
|
12149
12678
|
}
|
|
12150
12679
|
});
|
|
12151
12680
|
};
|
|
12152
|
-
var ZodError = $constructor("ZodError", initializer2);
|
|
12153
|
-
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
12681
|
+
var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
12682
|
+
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
12154
12683
|
Parent: Error
|
|
12155
12684
|
});
|
|
12156
12685
|
|
|
12157
|
-
// node_modules/.pnpm/zod@4.3
|
|
12686
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.js
|
|
12158
12687
|
var parse2 = /* @__PURE__ */ _parse(ZodRealError);
|
|
12159
12688
|
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
12160
12689
|
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -12168,7 +12697,44 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
12168
12697
|
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
12169
12698
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
12170
12699
|
|
|
12171
|
-
// node_modules/.pnpm/zod@4.3
|
|
12700
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
|
|
12701
|
+
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
12702
|
+
function _installLazyMethods(inst, group, methods) {
|
|
12703
|
+
const proto = Object.getPrototypeOf(inst);
|
|
12704
|
+
let installed = _installedGroups.get(proto);
|
|
12705
|
+
if (!installed) {
|
|
12706
|
+
installed = /* @__PURE__ */ new Set();
|
|
12707
|
+
_installedGroups.set(proto, installed);
|
|
12708
|
+
}
|
|
12709
|
+
if (installed.has(group))
|
|
12710
|
+
return;
|
|
12711
|
+
installed.add(group);
|
|
12712
|
+
for (const key in methods) {
|
|
12713
|
+
const fn = methods[key];
|
|
12714
|
+
Object.defineProperty(proto, key, {
|
|
12715
|
+
configurable: true,
|
|
12716
|
+
enumerable: false,
|
|
12717
|
+
get() {
|
|
12718
|
+
const bound = fn.bind(this);
|
|
12719
|
+
Object.defineProperty(this, key, {
|
|
12720
|
+
configurable: true,
|
|
12721
|
+
writable: true,
|
|
12722
|
+
enumerable: true,
|
|
12723
|
+
value: bound
|
|
12724
|
+
});
|
|
12725
|
+
return bound;
|
|
12726
|
+
},
|
|
12727
|
+
set(v) {
|
|
12728
|
+
Object.defineProperty(this, key, {
|
|
12729
|
+
configurable: true,
|
|
12730
|
+
writable: true,
|
|
12731
|
+
enumerable: true,
|
|
12732
|
+
value: v
|
|
12733
|
+
});
|
|
12734
|
+
}
|
|
12735
|
+
});
|
|
12736
|
+
}
|
|
12737
|
+
}
|
|
12172
12738
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
12173
12739
|
$ZodType.init(inst, def);
|
|
12174
12740
|
Object.assign(inst["~standard"], {
|
|
@@ -12181,23 +12747,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
12181
12747
|
inst.def = def;
|
|
12182
12748
|
inst.type = def.type;
|
|
12183
12749
|
Object.defineProperty(inst, "_def", { value: def });
|
|
12184
|
-
inst.check = (...checks) => {
|
|
12185
|
-
return inst.clone(util_exports.mergeDefs(def, {
|
|
12186
|
-
checks: [
|
|
12187
|
-
...def.checks ?? [],
|
|
12188
|
-
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
12189
|
-
]
|
|
12190
|
-
}), {
|
|
12191
|
-
parent: true
|
|
12192
|
-
});
|
|
12193
|
-
};
|
|
12194
|
-
inst.with = inst.check;
|
|
12195
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
12196
|
-
inst.brand = () => inst;
|
|
12197
|
-
inst.register = ((reg, meta3) => {
|
|
12198
|
-
reg.add(inst, meta3);
|
|
12199
|
-
return inst;
|
|
12200
|
-
});
|
|
12201
12750
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
12202
12751
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
12203
12752
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -12211,45 +12760,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
12211
12760
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
12212
12761
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
12213
12762
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
12214
|
-
inst
|
|
12215
|
-
|
|
12216
|
-
|
|
12217
|
-
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
|
|
12222
|
-
|
|
12223
|
-
|
|
12224
|
-
|
|
12225
|
-
|
|
12226
|
-
|
|
12227
|
-
|
|
12228
|
-
|
|
12229
|
-
|
|
12230
|
-
|
|
12231
|
-
|
|
12232
|
-
|
|
12233
|
-
|
|
12234
|
-
|
|
12235
|
-
|
|
12763
|
+
_installLazyMethods(inst, "ZodType", {
|
|
12764
|
+
check(...chks) {
|
|
12765
|
+
const def2 = this.def;
|
|
12766
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
12767
|
+
checks: [
|
|
12768
|
+
...def2.checks ?? [],
|
|
12769
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
12770
|
+
]
|
|
12771
|
+
}), { parent: true });
|
|
12772
|
+
},
|
|
12773
|
+
with(...chks) {
|
|
12774
|
+
return this.check(...chks);
|
|
12775
|
+
},
|
|
12776
|
+
clone(def2, params) {
|
|
12777
|
+
return clone(this, def2, params);
|
|
12778
|
+
},
|
|
12779
|
+
brand() {
|
|
12780
|
+
return this;
|
|
12781
|
+
},
|
|
12782
|
+
register(reg, meta3) {
|
|
12783
|
+
reg.add(this, meta3);
|
|
12784
|
+
return this;
|
|
12785
|
+
},
|
|
12786
|
+
refine(check2, params) {
|
|
12787
|
+
return this.check(refine(check2, params));
|
|
12788
|
+
},
|
|
12789
|
+
superRefine(refinement, params) {
|
|
12790
|
+
return this.check(superRefine(refinement, params));
|
|
12791
|
+
},
|
|
12792
|
+
overwrite(fn) {
|
|
12793
|
+
return this.check(_overwrite(fn));
|
|
12794
|
+
},
|
|
12795
|
+
optional() {
|
|
12796
|
+
return optional(this);
|
|
12797
|
+
},
|
|
12798
|
+
exactOptional() {
|
|
12799
|
+
return exactOptional(this);
|
|
12800
|
+
},
|
|
12801
|
+
nullable() {
|
|
12802
|
+
return nullable(this);
|
|
12803
|
+
},
|
|
12804
|
+
nullish() {
|
|
12805
|
+
return optional(nullable(this));
|
|
12806
|
+
},
|
|
12807
|
+
nonoptional(params) {
|
|
12808
|
+
return nonoptional(this, params);
|
|
12809
|
+
},
|
|
12810
|
+
array() {
|
|
12811
|
+
return array(this);
|
|
12812
|
+
},
|
|
12813
|
+
or(arg) {
|
|
12814
|
+
return union([this, arg]);
|
|
12815
|
+
},
|
|
12816
|
+
and(arg) {
|
|
12817
|
+
return intersection(this, arg);
|
|
12818
|
+
},
|
|
12819
|
+
transform(tx) {
|
|
12820
|
+
return pipe(this, transform(tx));
|
|
12821
|
+
},
|
|
12822
|
+
default(d) {
|
|
12823
|
+
return _default2(this, d);
|
|
12824
|
+
},
|
|
12825
|
+
prefault(d) {
|
|
12826
|
+
return prefault(this, d);
|
|
12827
|
+
},
|
|
12828
|
+
catch(params) {
|
|
12829
|
+
return _catch2(this, params);
|
|
12830
|
+
},
|
|
12831
|
+
pipe(target) {
|
|
12832
|
+
return pipe(this, target);
|
|
12833
|
+
},
|
|
12834
|
+
readonly() {
|
|
12835
|
+
return readonly(this);
|
|
12836
|
+
},
|
|
12837
|
+
describe(description) {
|
|
12838
|
+
const cl = this.clone();
|
|
12839
|
+
globalRegistry.add(cl, { description });
|
|
12840
|
+
return cl;
|
|
12841
|
+
},
|
|
12842
|
+
meta(...args) {
|
|
12843
|
+
if (args.length === 0)
|
|
12844
|
+
return globalRegistry.get(this);
|
|
12845
|
+
const cl = this.clone();
|
|
12846
|
+
globalRegistry.add(cl, args[0]);
|
|
12847
|
+
return cl;
|
|
12848
|
+
},
|
|
12849
|
+
isOptional() {
|
|
12850
|
+
return this.safeParse(void 0).success;
|
|
12851
|
+
},
|
|
12852
|
+
isNullable() {
|
|
12853
|
+
return this.safeParse(null).success;
|
|
12854
|
+
},
|
|
12855
|
+
apply(fn) {
|
|
12856
|
+
return fn(this);
|
|
12857
|
+
}
|
|
12858
|
+
});
|
|
12236
12859
|
Object.defineProperty(inst, "description", {
|
|
12237
12860
|
get() {
|
|
12238
12861
|
return globalRegistry.get(inst)?.description;
|
|
12239
12862
|
},
|
|
12240
12863
|
configurable: true
|
|
12241
12864
|
});
|
|
12242
|
-
inst.meta = (...args) => {
|
|
12243
|
-
if (args.length === 0) {
|
|
12244
|
-
return globalRegistry.get(inst);
|
|
12245
|
-
}
|
|
12246
|
-
const cl = inst.clone();
|
|
12247
|
-
globalRegistry.add(cl, args[0]);
|
|
12248
|
-
return cl;
|
|
12249
|
-
};
|
|
12250
|
-
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
12251
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
12252
|
-
inst.apply = (fn) => fn(inst);
|
|
12253
12865
|
return inst;
|
|
12254
12866
|
});
|
|
12255
12867
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -12260,21 +12872,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
12260
12872
|
inst.format = bag.format ?? null;
|
|
12261
12873
|
inst.minLength = bag.minimum ?? null;
|
|
12262
12874
|
inst.maxLength = bag.maximum ?? null;
|
|
12263
|
-
inst
|
|
12264
|
-
|
|
12265
|
-
|
|
12266
|
-
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
|
|
12277
|
-
|
|
12875
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
12876
|
+
regex(...args) {
|
|
12877
|
+
return this.check(_regex(...args));
|
|
12878
|
+
},
|
|
12879
|
+
includes(...args) {
|
|
12880
|
+
return this.check(_includes(...args));
|
|
12881
|
+
},
|
|
12882
|
+
startsWith(...args) {
|
|
12883
|
+
return this.check(_startsWith(...args));
|
|
12884
|
+
},
|
|
12885
|
+
endsWith(...args) {
|
|
12886
|
+
return this.check(_endsWith(...args));
|
|
12887
|
+
},
|
|
12888
|
+
min(...args) {
|
|
12889
|
+
return this.check(_minLength(...args));
|
|
12890
|
+
},
|
|
12891
|
+
max(...args) {
|
|
12892
|
+
return this.check(_maxLength(...args));
|
|
12893
|
+
},
|
|
12894
|
+
length(...args) {
|
|
12895
|
+
return this.check(_length(...args));
|
|
12896
|
+
},
|
|
12897
|
+
nonempty(...args) {
|
|
12898
|
+
return this.check(_minLength(1, ...args));
|
|
12899
|
+
},
|
|
12900
|
+
lowercase(params) {
|
|
12901
|
+
return this.check(_lowercase(params));
|
|
12902
|
+
},
|
|
12903
|
+
uppercase(params) {
|
|
12904
|
+
return this.check(_uppercase(params));
|
|
12905
|
+
},
|
|
12906
|
+
trim() {
|
|
12907
|
+
return this.check(_trim());
|
|
12908
|
+
},
|
|
12909
|
+
normalize(...args) {
|
|
12910
|
+
return this.check(_normalize(...args));
|
|
12911
|
+
},
|
|
12912
|
+
toLowerCase() {
|
|
12913
|
+
return this.check(_toLowerCase());
|
|
12914
|
+
},
|
|
12915
|
+
toUpperCase() {
|
|
12916
|
+
return this.check(_toUpperCase());
|
|
12917
|
+
},
|
|
12918
|
+
slugify() {
|
|
12919
|
+
return this.check(_slugify());
|
|
12920
|
+
}
|
|
12921
|
+
});
|
|
12278
12922
|
});
|
|
12279
12923
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
12280
12924
|
$ZodString.init(inst, def);
|
|
@@ -12353,7 +12997,7 @@ function url(params) {
|
|
|
12353
12997
|
}
|
|
12354
12998
|
function httpUrl(params) {
|
|
12355
12999
|
return _url(ZodURL, {
|
|
12356
|
-
protocol:
|
|
13000
|
+
protocol: regexes_exports.httpProtocol,
|
|
12357
13001
|
hostname: regexes_exports.domain,
|
|
12358
13002
|
...util_exports.normalizeParams(params)
|
|
12359
13003
|
});
|
|
@@ -12495,21 +13139,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
12495
13139
|
$ZodNumber.init(inst, def);
|
|
12496
13140
|
ZodType.init(inst, def);
|
|
12497
13141
|
inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
|
|
12498
|
-
inst
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
13142
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
13143
|
+
gt(value, params) {
|
|
13144
|
+
return this.check(_gt(value, params));
|
|
13145
|
+
},
|
|
13146
|
+
gte(value, params) {
|
|
13147
|
+
return this.check(_gte(value, params));
|
|
13148
|
+
},
|
|
13149
|
+
min(value, params) {
|
|
13150
|
+
return this.check(_gte(value, params));
|
|
13151
|
+
},
|
|
13152
|
+
lt(value, params) {
|
|
13153
|
+
return this.check(_lt(value, params));
|
|
13154
|
+
},
|
|
13155
|
+
lte(value, params) {
|
|
13156
|
+
return this.check(_lte(value, params));
|
|
13157
|
+
},
|
|
13158
|
+
max(value, params) {
|
|
13159
|
+
return this.check(_lte(value, params));
|
|
13160
|
+
},
|
|
13161
|
+
int(params) {
|
|
13162
|
+
return this.check(int(params));
|
|
13163
|
+
},
|
|
13164
|
+
safe(params) {
|
|
13165
|
+
return this.check(int(params));
|
|
13166
|
+
},
|
|
13167
|
+
positive(params) {
|
|
13168
|
+
return this.check(_gt(0, params));
|
|
13169
|
+
},
|
|
13170
|
+
nonnegative(params) {
|
|
13171
|
+
return this.check(_gte(0, params));
|
|
13172
|
+
},
|
|
13173
|
+
negative(params) {
|
|
13174
|
+
return this.check(_lt(0, params));
|
|
13175
|
+
},
|
|
13176
|
+
nonpositive(params) {
|
|
13177
|
+
return this.check(_lte(0, params));
|
|
13178
|
+
},
|
|
13179
|
+
multipleOf(value, params) {
|
|
13180
|
+
return this.check(_multipleOf(value, params));
|
|
13181
|
+
},
|
|
13182
|
+
step(value, params) {
|
|
13183
|
+
return this.check(_multipleOf(value, params));
|
|
13184
|
+
},
|
|
13185
|
+
finite() {
|
|
13186
|
+
return this;
|
|
13187
|
+
}
|
|
13188
|
+
});
|
|
12513
13189
|
const bag = inst._zod.bag;
|
|
12514
13190
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
12515
13191
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -12656,11 +13332,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
|
12656
13332
|
ZodType.init(inst, def);
|
|
12657
13333
|
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
12658
13334
|
inst.element = def.element;
|
|
12659
|
-
inst
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
13335
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
13336
|
+
min(n, params) {
|
|
13337
|
+
return this.check(_minLength(n, params));
|
|
13338
|
+
},
|
|
13339
|
+
nonempty(params) {
|
|
13340
|
+
return this.check(_minLength(1, params));
|
|
13341
|
+
},
|
|
13342
|
+
max(n, params) {
|
|
13343
|
+
return this.check(_maxLength(n, params));
|
|
13344
|
+
},
|
|
13345
|
+
length(n, params) {
|
|
13346
|
+
return this.check(_length(n, params));
|
|
13347
|
+
},
|
|
13348
|
+
unwrap() {
|
|
13349
|
+
return this.element;
|
|
13350
|
+
}
|
|
13351
|
+
});
|
|
12664
13352
|
});
|
|
12665
13353
|
function array(element, params) {
|
|
12666
13354
|
return _array(ZodArray, element, params);
|
|
@@ -12676,23 +13364,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
12676
13364
|
util_exports.defineLazy(inst, "shape", () => {
|
|
12677
13365
|
return def.shape;
|
|
12678
13366
|
});
|
|
12679
|
-
inst
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
13367
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
13368
|
+
keyof() {
|
|
13369
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
13370
|
+
},
|
|
13371
|
+
catchall(catchall) {
|
|
13372
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
13373
|
+
},
|
|
13374
|
+
passthrough() {
|
|
13375
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
13376
|
+
},
|
|
13377
|
+
loose() {
|
|
13378
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
13379
|
+
},
|
|
13380
|
+
strict() {
|
|
13381
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
13382
|
+
},
|
|
13383
|
+
strip() {
|
|
13384
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
13385
|
+
},
|
|
13386
|
+
extend(incoming) {
|
|
13387
|
+
return util_exports.extend(this, incoming);
|
|
13388
|
+
},
|
|
13389
|
+
safeExtend(incoming) {
|
|
13390
|
+
return util_exports.safeExtend(this, incoming);
|
|
13391
|
+
},
|
|
13392
|
+
merge(other) {
|
|
13393
|
+
return util_exports.merge(this, other);
|
|
13394
|
+
},
|
|
13395
|
+
pick(mask) {
|
|
13396
|
+
return util_exports.pick(this, mask);
|
|
13397
|
+
},
|
|
13398
|
+
omit(mask) {
|
|
13399
|
+
return util_exports.omit(this, mask);
|
|
13400
|
+
},
|
|
13401
|
+
partial(...args) {
|
|
13402
|
+
return util_exports.partial(ZodOptional, this, args[0]);
|
|
13403
|
+
},
|
|
13404
|
+
required(...args) {
|
|
13405
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
13406
|
+
}
|
|
13407
|
+
});
|
|
12696
13408
|
});
|
|
12697
13409
|
function object(shape, params) {
|
|
12698
13410
|
const def = {
|
|
@@ -12797,6 +13509,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
|
12797
13509
|
inst.valueType = def.valueType;
|
|
12798
13510
|
});
|
|
12799
13511
|
function record(keyType, valueType, params) {
|
|
13512
|
+
if (!valueType || !valueType._zod) {
|
|
13513
|
+
return new ZodRecord({
|
|
13514
|
+
type: "record",
|
|
13515
|
+
keyType: string2(),
|
|
13516
|
+
valueType: keyType,
|
|
13517
|
+
...util_exports.normalizeParams(valueType)
|
|
13518
|
+
});
|
|
13519
|
+
}
|
|
12800
13520
|
return new ZodRecord({
|
|
12801
13521
|
type: "record",
|
|
12802
13522
|
keyType,
|
|
@@ -12968,10 +13688,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
12968
13688
|
if (output instanceof Promise) {
|
|
12969
13689
|
return output.then((output2) => {
|
|
12970
13690
|
payload.value = output2;
|
|
13691
|
+
payload.fallback = true;
|
|
12971
13692
|
return payload;
|
|
12972
13693
|
});
|
|
12973
13694
|
}
|
|
12974
13695
|
payload.value = output;
|
|
13696
|
+
payload.fallback = true;
|
|
12975
13697
|
return payload;
|
|
12976
13698
|
};
|
|
12977
13699
|
});
|
|
@@ -13126,6 +13848,20 @@ function codec(in_, out, params) {
|
|
|
13126
13848
|
reverseTransform: params.encode
|
|
13127
13849
|
});
|
|
13128
13850
|
}
|
|
13851
|
+
function invertCodec(codec2) {
|
|
13852
|
+
const def = codec2._zod.def;
|
|
13853
|
+
return new ZodCodec({
|
|
13854
|
+
type: "pipe",
|
|
13855
|
+
in: def.out,
|
|
13856
|
+
out: def.in,
|
|
13857
|
+
transform: def.reverseTransform,
|
|
13858
|
+
reverseTransform: def.transform
|
|
13859
|
+
});
|
|
13860
|
+
}
|
|
13861
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
13862
|
+
ZodPipe.init(inst, def);
|
|
13863
|
+
$ZodPreprocess.init(inst, def);
|
|
13864
|
+
});
|
|
13129
13865
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
13130
13866
|
$ZodReadonly.init(inst, def);
|
|
13131
13867
|
ZodType.init(inst, def);
|
|
@@ -13205,8 +13941,8 @@ function custom(fn, _params) {
|
|
|
13205
13941
|
function refine(fn, _params = {}) {
|
|
13206
13942
|
return _refine(ZodCustom, fn, _params);
|
|
13207
13943
|
}
|
|
13208
|
-
function superRefine(fn) {
|
|
13209
|
-
return _superRefine(fn);
|
|
13944
|
+
function superRefine(fn, params) {
|
|
13945
|
+
return _superRefine(fn, params);
|
|
13210
13946
|
}
|
|
13211
13947
|
var describe2 = describe;
|
|
13212
13948
|
var meta2 = meta;
|
|
@@ -13244,10 +13980,14 @@ function json(params) {
|
|
|
13244
13980
|
return jsonSchema;
|
|
13245
13981
|
}
|
|
13246
13982
|
function preprocess(fn, schema) {
|
|
13247
|
-
return
|
|
13983
|
+
return new ZodPreprocess({
|
|
13984
|
+
type: "pipe",
|
|
13985
|
+
in: transform(fn),
|
|
13986
|
+
out: schema
|
|
13987
|
+
});
|
|
13248
13988
|
}
|
|
13249
13989
|
|
|
13250
|
-
// node_modules/.pnpm/zod@4.3
|
|
13990
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/compat.js
|
|
13251
13991
|
var ZodIssueCode = {
|
|
13252
13992
|
invalid_type: "invalid_type",
|
|
13253
13993
|
too_big: "too_big",
|
|
@@ -13273,7 +14013,7 @@ var ZodFirstPartyTypeKind;
|
|
|
13273
14013
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
|
|
13274
14014
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
13275
14015
|
|
|
13276
|
-
// node_modules/.pnpm/zod@4.3
|
|
14016
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/from-json-schema.js
|
|
13277
14017
|
var z = {
|
|
13278
14018
|
...schemas_exports2,
|
|
13279
14019
|
...checks_exports2,
|
|
@@ -13665,12 +14405,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
13665
14405
|
default:
|
|
13666
14406
|
throw new Error(`Unsupported type: ${type}`);
|
|
13667
14407
|
}
|
|
13668
|
-
if (schema.description) {
|
|
13669
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
13670
|
-
}
|
|
13671
|
-
if (schema.default !== void 0) {
|
|
13672
|
-
zodSchema = zodSchema.default(schema.default);
|
|
13673
|
-
}
|
|
13674
14408
|
return zodSchema;
|
|
13675
14409
|
}
|
|
13676
14410
|
function convertSchema(schema, ctx) {
|
|
@@ -13707,6 +14441,9 @@ function convertSchema(schema, ctx) {
|
|
|
13707
14441
|
if (schema.readOnly === true) {
|
|
13708
14442
|
baseSchema = z.readonly(baseSchema);
|
|
13709
14443
|
}
|
|
14444
|
+
if (schema.default !== void 0) {
|
|
14445
|
+
baseSchema = baseSchema.default(schema.default);
|
|
14446
|
+
}
|
|
13710
14447
|
const extraMeta = {};
|
|
13711
14448
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
13712
14449
|
for (const key of coreMetadataKeys) {
|
|
@@ -13728,26 +14465,35 @@ function convertSchema(schema, ctx) {
|
|
|
13728
14465
|
if (Object.keys(extraMeta).length > 0) {
|
|
13729
14466
|
ctx.registry.add(baseSchema, extraMeta);
|
|
13730
14467
|
}
|
|
14468
|
+
if (schema.description) {
|
|
14469
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
14470
|
+
}
|
|
13731
14471
|
return baseSchema;
|
|
13732
14472
|
}
|
|
13733
14473
|
function fromJSONSchema(schema, params) {
|
|
13734
14474
|
if (typeof schema === "boolean") {
|
|
13735
14475
|
return schema ? z.any() : z.never();
|
|
13736
14476
|
}
|
|
13737
|
-
|
|
13738
|
-
|
|
14477
|
+
let normalized;
|
|
14478
|
+
try {
|
|
14479
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
14480
|
+
} catch {
|
|
14481
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
14482
|
+
}
|
|
14483
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
14484
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
13739
14485
|
const ctx = {
|
|
13740
14486
|
version: version2,
|
|
13741
14487
|
defs,
|
|
13742
14488
|
refs: /* @__PURE__ */ new Map(),
|
|
13743
14489
|
processing: /* @__PURE__ */ new Set(),
|
|
13744
|
-
rootSchema:
|
|
14490
|
+
rootSchema: normalized,
|
|
13745
14491
|
registry: params?.registry ?? globalRegistry
|
|
13746
14492
|
};
|
|
13747
|
-
return convertSchema(
|
|
14493
|
+
return convertSchema(normalized, ctx);
|
|
13748
14494
|
}
|
|
13749
14495
|
|
|
13750
|
-
// node_modules/.pnpm/zod@4.3
|
|
14496
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/coerce.js
|
|
13751
14497
|
var coerce_exports = {};
|
|
13752
14498
|
__export(coerce_exports, {
|
|
13753
14499
|
bigint: () => bigint3,
|
|
@@ -13772,7 +14518,7 @@ function date4(params) {
|
|
|
13772
14518
|
return _coercedDate(ZodDate, params);
|
|
13773
14519
|
}
|
|
13774
14520
|
|
|
13775
|
-
// node_modules/.pnpm/zod@4.3
|
|
14521
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
13776
14522
|
config(en_default());
|
|
13777
14523
|
|
|
13778
14524
|
// src/core/payment-info.ts
|
|
@@ -13921,7 +14667,6 @@ var LegacyPaymentInfoSchema = external_exports.object({
|
|
|
13921
14667
|
minPrice: external_exports.string().optional(),
|
|
13922
14668
|
maxPrice: external_exports.string().optional(),
|
|
13923
14669
|
protocols: external_exports.array(external_exports.string()).optional(),
|
|
13924
|
-
// RFC §4.4 spec fields
|
|
13925
14670
|
intent: external_exports.string().optional(),
|
|
13926
14671
|
method: external_exports.string().optional(),
|
|
13927
14672
|
amount: external_exports.union([external_exports.string(), external_exports.null()]).optional(),
|
|
@@ -13942,9 +14687,8 @@ var OpenApiOperationSchema = external_exports.object({
|
|
|
13942
14687
|
description: external_exports.string().optional(),
|
|
13943
14688
|
tags: external_exports.array(external_exports.string()).optional(),
|
|
13944
14689
|
security: external_exports.array(external_exports.record(external_exports.string(), external_exports.array(external_exports.string()))).optional(),
|
|
13945
|
-
// `in` / `name` are spec-required
|
|
13946
|
-
//
|
|
13947
|
-
// non-conformant OpenAPI documents in the wild.
|
|
14690
|
+
// `in` / `name` are spec-required but kept optional so a single malformed
|
|
14691
|
+
// parameter cannot abort parsing of an otherwise-valid spec.
|
|
13948
14692
|
parameters: external_exports.array(
|
|
13949
14693
|
external_exports.object({
|
|
13950
14694
|
in: external_exports.string().optional(),
|
|
@@ -13958,7 +14702,6 @@ var OpenApiOperationSchema = external_exports.object({
|
|
|
13958
14702
|
content: external_exports.record(external_exports.string(), external_exports.object({ schema: external_exports.unknown().optional() }))
|
|
13959
14703
|
}).optional(),
|
|
13960
14704
|
responses: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
13961
|
-
// Permissive: vendor extension shape is validated at runtime, never at parse time.
|
|
13962
14705
|
"x-payment-info": external_exports.unknown().optional()
|
|
13963
14706
|
});
|
|
13964
14707
|
var OpenApiPathItemSchema = external_exports.object({
|
|
@@ -13972,7 +14715,6 @@ var OpenApiPathItemSchema = external_exports.object({
|
|
|
13972
14715
|
trace: OpenApiOperationSchema.optional()
|
|
13973
14716
|
});
|
|
13974
14717
|
var OpenApiDocSchema = external_exports.object({
|
|
13975
|
-
// TODO(zdql): We should inherit a canonical OpenAPI schema and then extend with our types.
|
|
13976
14718
|
openapi: external_exports.string(),
|
|
13977
14719
|
info: external_exports.object({
|
|
13978
14720
|
title: external_exports.string(),
|
|
@@ -13988,24 +14730,23 @@ var OpenApiDocSchema = external_exports.object({
|
|
|
13988
14730
|
"x-discovery": external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
13989
14731
|
paths: external_exports.record(external_exports.string(), OpenApiPathItemSchema)
|
|
13990
14732
|
});
|
|
13991
|
-
|
|
13992
|
-
|
|
13993
|
-
|
|
13994
|
-
|
|
13995
|
-
|
|
13996
|
-
|
|
13997
|
-
|
|
13998
|
-
|
|
13999
|
-
|
|
14000
|
-
|
|
14001
|
-
|
|
14002
|
-
|
|
14003
|
-
|
|
14004
|
-
|
|
14005
|
-
|
|
14006
|
-
|
|
14007
|
-
|
|
14008
|
-
});
|
|
14733
|
+
|
|
14734
|
+
// src/core/lib/constants.ts
|
|
14735
|
+
var HTTP_METHODS = /* @__PURE__ */ new Set([
|
|
14736
|
+
"GET",
|
|
14737
|
+
"POST",
|
|
14738
|
+
"PUT",
|
|
14739
|
+
"DELETE",
|
|
14740
|
+
"PATCH",
|
|
14741
|
+
"HEAD",
|
|
14742
|
+
"OPTIONS",
|
|
14743
|
+
"TRACE"
|
|
14744
|
+
]);
|
|
14745
|
+
var OPENAPI_EXT = {
|
|
14746
|
+
authKind: "x-agentcash-auth-kind",
|
|
14747
|
+
provenance: "x-agentcash-provenance"
|
|
14748
|
+
};
|
|
14749
|
+
var SIWX_AUTH_KIND = "siwx";
|
|
14009
14750
|
|
|
14010
14751
|
// src/core/source/openapi/utils.ts
|
|
14011
14752
|
function isRecord(value) {
|
|
@@ -14016,7 +14757,12 @@ function resolveSecurityFlags(requirements, securitySchemes) {
|
|
|
14016
14757
|
let hasSiwx = false;
|
|
14017
14758
|
for (const requirement of requirements) {
|
|
14018
14759
|
for (const schemeName of Object.keys(requirement)) {
|
|
14019
|
-
if (schemeName ===
|
|
14760
|
+
if (schemeName === SIWX_AUTH_KIND) {
|
|
14761
|
+
hasSiwx = true;
|
|
14762
|
+
continue;
|
|
14763
|
+
}
|
|
14764
|
+
const def = securitySchemes[schemeName];
|
|
14765
|
+
if (isRecord(def) && def[OPENAPI_EXT.authKind] === SIWX_AUTH_KIND) {
|
|
14020
14766
|
hasSiwx = true;
|
|
14021
14767
|
continue;
|
|
14022
14768
|
}
|
|
@@ -14024,7 +14770,6 @@ function resolveSecurityFlags(requirements, securitySchemes) {
|
|
|
14024
14770
|
hasApiKey = true;
|
|
14025
14771
|
continue;
|
|
14026
14772
|
}
|
|
14027
|
-
const def = securitySchemes[schemeName];
|
|
14028
14773
|
if (isRecord(def) && def["type"] === "apiKey") hasApiKey = true;
|
|
14029
14774
|
}
|
|
14030
14775
|
}
|
|
@@ -14032,7 +14777,9 @@ function resolveSecurityFlags(requirements, securitySchemes) {
|
|
|
14032
14777
|
}
|
|
14033
14778
|
function inferAuthMode(operation, globalSecurity, securitySchemes) {
|
|
14034
14779
|
const hasXPaymentInfo = Boolean(operation["x-payment-info"]);
|
|
14035
|
-
const
|
|
14780
|
+
const operationOptsOutOfSecurity = Array.isArray(operation.security) && operation.security.length === 0;
|
|
14781
|
+
if (operationOptsOutOfSecurity && !hasXPaymentInfo) return "unprotected";
|
|
14782
|
+
const effectiveSecurity = operation.security !== void 0 ? operation.security : globalSecurity ?? [];
|
|
14036
14783
|
const { hasApiKey, hasSiwx } = resolveSecurityFlags(effectiveSecurity, securitySchemes ?? {});
|
|
14037
14784
|
if (hasXPaymentInfo && hasApiKey) return "apiKey+paid";
|
|
14038
14785
|
if (hasXPaymentInfo) return "paid";
|
|
@@ -14041,19 +14788,6 @@ function inferAuthMode(operation, globalSecurity, securitySchemes) {
|
|
|
14041
14788
|
return void 0;
|
|
14042
14789
|
}
|
|
14043
14790
|
|
|
14044
|
-
// src/core/lib/constants.ts
|
|
14045
|
-
var HTTP_METHODS = /* @__PURE__ */ new Set([
|
|
14046
|
-
"GET",
|
|
14047
|
-
"POST",
|
|
14048
|
-
"PUT",
|
|
14049
|
-
"DELETE",
|
|
14050
|
-
"PATCH",
|
|
14051
|
-
"HEAD",
|
|
14052
|
-
"OPTIONS",
|
|
14053
|
-
"TRACE"
|
|
14054
|
-
]);
|
|
14055
|
-
var DEFAULT_MISSING_METHOD = "POST";
|
|
14056
|
-
|
|
14057
14791
|
// src/core/lib/url.ts
|
|
14058
14792
|
function ensureProtocol(target) {
|
|
14059
14793
|
const trimmed = target.trim();
|
|
@@ -14078,11 +14812,6 @@ function normalizePath(pathname) {
|
|
|
14078
14812
|
const normalized = prefixed.replace(/\/+/g, "/");
|
|
14079
14813
|
return normalized !== "/" ? normalized.replace(/\/$/, "") : "/";
|
|
14080
14814
|
}
|
|
14081
|
-
function parseMethod(value) {
|
|
14082
|
-
if (!value) return void 0;
|
|
14083
|
-
const upper = value.toUpperCase();
|
|
14084
|
-
return HTTP_METHODS.has(upper) ? upper : void 0;
|
|
14085
|
-
}
|
|
14086
14815
|
function toAbsoluteUrl(origin, value) {
|
|
14087
14816
|
try {
|
|
14088
14817
|
if (/^https?:\/\//i.test(value)) return new URL(value);
|
|
@@ -14094,9 +14823,9 @@ function toAbsoluteUrl(origin, value) {
|
|
|
14094
14823
|
|
|
14095
14824
|
// src/core/source/fetch.ts
|
|
14096
14825
|
import { ResultAsync } from "neverthrow";
|
|
14097
|
-
function toFetchError(
|
|
14098
|
-
const cause =
|
|
14099
|
-
return { cause, message: String(
|
|
14826
|
+
function toFetchError(err2) {
|
|
14827
|
+
const cause = err2 instanceof DOMException && (err2.name === "TimeoutError" || err2.name === "AbortError") ? "timeout" : "network";
|
|
14828
|
+
return { cause, message: String(err2) };
|
|
14100
14829
|
}
|
|
14101
14830
|
function fetchSafe(url2, init) {
|
|
14102
14831
|
return ResultAsync.fromPromise(fetch(url2, init), toFetchError);
|
|
@@ -14202,179 +14931,6 @@ function getOpenAPI(origin, headers, signal, specificationOverrideUrl) {
|
|
|
14202
14931
|
});
|
|
14203
14932
|
}
|
|
14204
14933
|
|
|
14205
|
-
// src/core/source/wellknown/index.ts
|
|
14206
|
-
import { ok as ok2, err as err2, ResultAsync as ResultAsync5 } from "neverthrow";
|
|
14207
|
-
|
|
14208
|
-
// src/core/source/wellknown/x402.ts
|
|
14209
|
-
import { okAsync as okAsync2, ResultAsync as ResultAsync3 } from "neverthrow";
|
|
14210
|
-
function toWellKnownParsed(origin, doc) {
|
|
14211
|
-
const routes = doc.resources.flatMap((entry) => {
|
|
14212
|
-
const trimmed = entry.trim();
|
|
14213
|
-
if (!trimmed) return [];
|
|
14214
|
-
const parts = trimmed.split(/\s+/);
|
|
14215
|
-
const maybeMethod = parts.length >= 2 ? parseMethod(parts[0]) : void 0;
|
|
14216
|
-
const target = maybeMethod ? parts.slice(1).join(" ") : trimmed;
|
|
14217
|
-
const absolute = toAbsoluteUrl(origin, target);
|
|
14218
|
-
if (!absolute) return [];
|
|
14219
|
-
return [
|
|
14220
|
-
{
|
|
14221
|
-
path: normalizePath(absolute.pathname),
|
|
14222
|
-
method: maybeMethod ?? DEFAULT_MISSING_METHOD
|
|
14223
|
-
}
|
|
14224
|
-
];
|
|
14225
|
-
});
|
|
14226
|
-
return { routes, ...doc.instructions ? { instructions: doc.instructions } : {} };
|
|
14227
|
-
}
|
|
14228
|
-
async function parseBody2(response, origin, url2) {
|
|
14229
|
-
try {
|
|
14230
|
-
const payload = await response.json();
|
|
14231
|
-
const doc = WellKnownDocSchema.safeParse(payload);
|
|
14232
|
-
if (!doc.success) return null;
|
|
14233
|
-
const parsed = WellKnownParsedSchema.safeParse(toWellKnownParsed(origin, doc.data));
|
|
14234
|
-
if (!parsed.success) return null;
|
|
14235
|
-
return {
|
|
14236
|
-
raw: payload,
|
|
14237
|
-
...parsed.data,
|
|
14238
|
-
protocol: "x402",
|
|
14239
|
-
fetchedUrl: url2
|
|
14240
|
-
};
|
|
14241
|
-
} catch {
|
|
14242
|
-
return null;
|
|
14243
|
-
}
|
|
14244
|
-
}
|
|
14245
|
-
function getX402WellKnown(origin, headers, signal) {
|
|
14246
|
-
const url2 = `${origin}/.well-known/x402`;
|
|
14247
|
-
return fetchSafe(url2, {
|
|
14248
|
-
method: "GET",
|
|
14249
|
-
headers: { Accept: "application/json", ...headers },
|
|
14250
|
-
signal
|
|
14251
|
-
}).andThen((response) => {
|
|
14252
|
-
if (!response.ok) return okAsync2(null);
|
|
14253
|
-
return ResultAsync3.fromSafePromise(parseBody2(response, origin, url2));
|
|
14254
|
-
});
|
|
14255
|
-
}
|
|
14256
|
-
|
|
14257
|
-
// src/core/source/wellknown/mpp.ts
|
|
14258
|
-
import { okAsync as okAsync3, ResultAsync as ResultAsync4 } from "neverthrow";
|
|
14259
|
-
var MppEndpointSchema = external_exports.object({
|
|
14260
|
-
method: external_exports.string(),
|
|
14261
|
-
path: external_exports.string(),
|
|
14262
|
-
description: external_exports.string().optional(),
|
|
14263
|
-
payment: external_exports.object({
|
|
14264
|
-
intent: external_exports.string().optional(),
|
|
14265
|
-
method: external_exports.string().optional(),
|
|
14266
|
-
amount: external_exports.string().optional(),
|
|
14267
|
-
currency: external_exports.string().optional()
|
|
14268
|
-
}).optional()
|
|
14269
|
-
});
|
|
14270
|
-
var MppWellKnownDocSchema = external_exports.object({
|
|
14271
|
-
version: external_exports.number().optional(),
|
|
14272
|
-
name: external_exports.string().optional(),
|
|
14273
|
-
description: external_exports.string().optional(),
|
|
14274
|
-
categories: external_exports.array(external_exports.string()).optional(),
|
|
14275
|
-
methods: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
14276
|
-
endpoints: external_exports.array(MppEndpointSchema).default([]),
|
|
14277
|
-
docs: external_exports.object({
|
|
14278
|
-
homepage: external_exports.string().optional(),
|
|
14279
|
-
apiReference: external_exports.string().optional()
|
|
14280
|
-
}).optional()
|
|
14281
|
-
});
|
|
14282
|
-
var MPP_DECIMALS = 6;
|
|
14283
|
-
function formatMppAmount(raw) {
|
|
14284
|
-
if (!raw) return void 0;
|
|
14285
|
-
const n = Number(raw);
|
|
14286
|
-
if (!Number.isFinite(n)) return void 0;
|
|
14287
|
-
return `$${(n / 10 ** MPP_DECIMALS).toFixed(MPP_DECIMALS)}`;
|
|
14288
|
-
}
|
|
14289
|
-
function toWellKnownParsed2(doc) {
|
|
14290
|
-
const routes = doc.endpoints.flatMap((entry) => {
|
|
14291
|
-
const method = parseMethod(entry.method);
|
|
14292
|
-
if (!method) return [];
|
|
14293
|
-
const path = normalizePath(entry.path);
|
|
14294
|
-
if (!path) return [];
|
|
14295
|
-
const price = formatMppAmount(entry.payment?.amount);
|
|
14296
|
-
return [{ path, method, ...price ? { price } : {} }];
|
|
14297
|
-
});
|
|
14298
|
-
return {
|
|
14299
|
-
routes,
|
|
14300
|
-
...doc.description ? { instructions: doc.description } : {}
|
|
14301
|
-
};
|
|
14302
|
-
}
|
|
14303
|
-
async function parseBody3(response, url2) {
|
|
14304
|
-
try {
|
|
14305
|
-
const payload = await response.json();
|
|
14306
|
-
const doc = MppWellKnownDocSchema.safeParse(payload);
|
|
14307
|
-
if (!doc.success) return null;
|
|
14308
|
-
const parsed = WellKnownParsedSchema.safeParse(toWellKnownParsed2(doc.data));
|
|
14309
|
-
if (!parsed.success) return null;
|
|
14310
|
-
return {
|
|
14311
|
-
raw: payload,
|
|
14312
|
-
...parsed.data,
|
|
14313
|
-
...doc.data.name ? { title: doc.data.name } : {},
|
|
14314
|
-
...doc.data.description ? { description: doc.data.description } : {},
|
|
14315
|
-
protocol: "mpp",
|
|
14316
|
-
fetchedUrl: url2
|
|
14317
|
-
};
|
|
14318
|
-
} catch {
|
|
14319
|
-
return null;
|
|
14320
|
-
}
|
|
14321
|
-
}
|
|
14322
|
-
function getMppWellKnown(origin, headers, signal) {
|
|
14323
|
-
const url2 = `${origin}/.well-known/mpp`;
|
|
14324
|
-
return fetchSafe(url2, {
|
|
14325
|
-
method: "GET",
|
|
14326
|
-
headers: { Accept: "application/json", ...headers },
|
|
14327
|
-
signal
|
|
14328
|
-
}).andThen((response) => {
|
|
14329
|
-
if (!response.ok) return okAsync3(null);
|
|
14330
|
-
return ResultAsync4.fromSafePromise(parseBody3(response, url2));
|
|
14331
|
-
});
|
|
14332
|
-
}
|
|
14333
|
-
|
|
14334
|
-
// src/core/source/wellknown/index.ts
|
|
14335
|
-
function mergeError(a, b) {
|
|
14336
|
-
return {
|
|
14337
|
-
cause: a.cause === "network" || b.cause === "network" ? "network" : "timeout",
|
|
14338
|
-
message: `x402: ${a.message} | mpp: ${b.message}`
|
|
14339
|
-
};
|
|
14340
|
-
}
|
|
14341
|
-
function merge2(x402, mpp) {
|
|
14342
|
-
const seen = /* @__PURE__ */ new Set();
|
|
14343
|
-
const routes = [...x402.routes, ...mpp.routes].filter((r) => {
|
|
14344
|
-
const key = `${r.method} ${r.path}`;
|
|
14345
|
-
if (seen.has(key)) return false;
|
|
14346
|
-
seen.add(key);
|
|
14347
|
-
return true;
|
|
14348
|
-
});
|
|
14349
|
-
return {
|
|
14350
|
-
raw: { ...mpp.raw, ...x402.raw },
|
|
14351
|
-
routes,
|
|
14352
|
-
protocol: "x402+mpp",
|
|
14353
|
-
// Prefer x402 instructions; fall back to mpp
|
|
14354
|
-
...x402.instructions || mpp.instructions ? { instructions: x402.instructions ?? mpp.instructions } : {},
|
|
14355
|
-
fetchedUrl: x402.fetchedUrl
|
|
14356
|
-
};
|
|
14357
|
-
}
|
|
14358
|
-
function getWellKnown(origin, headers, signal) {
|
|
14359
|
-
return new ResultAsync5(
|
|
14360
|
-
Promise.all([
|
|
14361
|
-
getX402WellKnown(origin, headers, signal),
|
|
14362
|
-
getMppWellKnown(origin, headers, signal)
|
|
14363
|
-
]).then(([x402Result, mppResult]) => {
|
|
14364
|
-
const x402 = x402Result.isOk() ? x402Result.value : null;
|
|
14365
|
-
const mpp = mppResult.isOk() ? mppResult.value : null;
|
|
14366
|
-
if (x402 && mpp) return ok2(merge2(x402, mpp));
|
|
14367
|
-
if (x402) return ok2(x402);
|
|
14368
|
-
if (mpp) return ok2(mpp);
|
|
14369
|
-
if (x402Result.isErr() && mppResult.isErr())
|
|
14370
|
-
return err2(mergeError(x402Result.error, mppResult.error));
|
|
14371
|
-
if (x402Result.isErr()) return err2(x402Result.error);
|
|
14372
|
-
if (mppResult.isErr()) return err2(mppResult.error);
|
|
14373
|
-
return ok2(null);
|
|
14374
|
-
})
|
|
14375
|
-
);
|
|
14376
|
-
}
|
|
14377
|
-
|
|
14378
14934
|
// src/core/layers/l2.ts
|
|
14379
14935
|
function formatPrice2(pricing) {
|
|
14380
14936
|
const sym = pricing.currency ?? "USD";
|
|
@@ -14409,28 +14965,6 @@ function checkL2ForOpenAPI(openApi) {
|
|
|
14409
14965
|
source: "openapi"
|
|
14410
14966
|
};
|
|
14411
14967
|
}
|
|
14412
|
-
var WELL_KNOWN_PROTOCOLS = {
|
|
14413
|
-
x402: ["x402"],
|
|
14414
|
-
mpp: ["mpp"],
|
|
14415
|
-
"x402+mpp": ["x402", "mpp"]
|
|
14416
|
-
};
|
|
14417
|
-
function checkL2ForWellknown(wellKnown) {
|
|
14418
|
-
const protocols = WELL_KNOWN_PROTOCOLS[wellKnown.protocol];
|
|
14419
|
-
const routes = wellKnown.routes.map((route) => ({
|
|
14420
|
-
path: route.path,
|
|
14421
|
-
method: route.method,
|
|
14422
|
-
summary: `${route.method} ${route.path}`,
|
|
14423
|
-
authMode: "paid",
|
|
14424
|
-
protocols,
|
|
14425
|
-
...route.price ? { price: route.price } : {}
|
|
14426
|
-
}));
|
|
14427
|
-
return {
|
|
14428
|
-
...wellKnown.title ? { title: wellKnown.title } : {},
|
|
14429
|
-
...wellKnown.description ? { description: wellKnown.description } : {},
|
|
14430
|
-
routes,
|
|
14431
|
-
source: `well-known/${wellKnown.protocol}`
|
|
14432
|
-
};
|
|
14433
|
-
}
|
|
14434
14968
|
|
|
14435
14969
|
// src/core/layers/l4.ts
|
|
14436
14970
|
function checkL4ForOpenAPI(openApi) {
|
|
@@ -14439,22 +14973,12 @@ function checkL4ForOpenAPI(openApi) {
|
|
|
14439
14973
|
}
|
|
14440
14974
|
return null;
|
|
14441
14975
|
}
|
|
14442
|
-
function checkL4ForWellknown(wellKnown) {
|
|
14443
|
-
if (wellKnown.instructions) {
|
|
14444
|
-
return { guidance: wellKnown.instructions, source: `well-known/${wellKnown.protocol}` };
|
|
14445
|
-
}
|
|
14446
|
-
return null;
|
|
14447
|
-
}
|
|
14448
14976
|
|
|
14449
14977
|
// src/audit/codes.ts
|
|
14450
14978
|
var AUDIT_CODES = {
|
|
14451
|
-
// ─── Source presence ─────────────────────────────────────────────────────────
|
|
14452
14979
|
OPENAPI_NOT_FOUND: "OPENAPI_NOT_FOUND",
|
|
14453
|
-
WELLKNOWN_NOT_FOUND: "WELLKNOWN_NOT_FOUND",
|
|
14454
|
-
// ─── OpenAPI quality ─────────────────────────────────────────────────────────
|
|
14455
14980
|
OPENAPI_PARSE_ERROR: "OPENAPI_PARSE_ERROR",
|
|
14456
14981
|
OPENAPI_NO_ROUTES: "OPENAPI_NO_ROUTES",
|
|
14457
|
-
// ─── L2 route-list checks ────────────────────────────────────────────────────
|
|
14458
14982
|
L2_NO_ROUTES: "L2_NO_ROUTES",
|
|
14459
14983
|
L2_ROUTE_COUNT_HIGH: "L2_ROUTE_COUNT_HIGH",
|
|
14460
14984
|
L2_AUTH_MODE_MISSING: "L2_AUTH_MODE_MISSING",
|
|
@@ -14467,16 +14991,14 @@ var AUDIT_CODES = {
|
|
|
14467
14991
|
L2_PROTOCOLS_MISSING_ON_PAID: "L2_PROTOCOLS_MISSING_ON_PAID",
|
|
14468
14992
|
L2_X402_MALFORMED: "L2_X402_MALFORMED",
|
|
14469
14993
|
L2_MPP_MALFORMED: "L2_MPP_MALFORMED",
|
|
14470
|
-
|
|
14994
|
+
LEGACY_WELL_KNOWN_FOUND: "LEGACY_WELL_KNOWN_FOUND",
|
|
14471
14995
|
L3_NOT_FOUND: "L3_NOT_FOUND",
|
|
14472
14996
|
L3_INPUT_SCHEMA_MISSING: "L3_INPUT_SCHEMA_MISSING",
|
|
14473
14997
|
L3_AUTH_MODE_MISSING: "L3_AUTH_MODE_MISSING",
|
|
14474
14998
|
L3_PROTOCOLS_MISSING_ON_PAID: "L3_PROTOCOLS_MISSING_ON_PAID",
|
|
14475
14999
|
L3_PAYMENT_OPTIONS_MISSING_ON_PAID: "L3_PAYMENT_OPTIONS_MISSING_ON_PAID",
|
|
14476
|
-
// ─── L4 guidance checks ──────────────────────────────────────────────────────
|
|
14477
15000
|
L4_GUIDANCE_MISSING: "L4_GUIDANCE_MISSING",
|
|
14478
15001
|
L4_GUIDANCE_TOO_LONG: "L4_GUIDANCE_TOO_LONG",
|
|
14479
|
-
// ─── MPP WWW-Authenticate header checks ──────────────────────────────────────
|
|
14480
15002
|
MPP_HEADER_MISSING: "MPP_HEADER_MISSING",
|
|
14481
15003
|
MPP_NO_PAYMENT_CHALLENGES: "MPP_NO_PAYMENT_CHALLENGES",
|
|
14482
15004
|
MPP_CHALLENGE_ID_MISSING: "MPP_CHALLENGE_ID_MISSING",
|
|
@@ -14622,19 +15144,6 @@ ${details}`,
|
|
|
14622
15144
|
}
|
|
14623
15145
|
return warnings;
|
|
14624
15146
|
}
|
|
14625
|
-
function getWarningsForWellKnown(wellKnown) {
|
|
14626
|
-
if (wellKnown === null) {
|
|
14627
|
-
return [
|
|
14628
|
-
{
|
|
14629
|
-
code: AUDIT_CODES.WELLKNOWN_NOT_FOUND,
|
|
14630
|
-
severity: "info",
|
|
14631
|
-
message: "No /.well-known/x402 resource found at this origin.",
|
|
14632
|
-
hint: "Expose /.well-known/x402 as a fallback for agents that cannot read OpenAPI."
|
|
14633
|
-
}
|
|
14634
|
-
];
|
|
14635
|
-
}
|
|
14636
|
-
return [];
|
|
14637
|
-
}
|
|
14638
15147
|
|
|
14639
15148
|
// src/audit/warnings/l2.ts
|
|
14640
15149
|
var KNOWN_PRICING_MODES = /* @__PURE__ */ new Set(["fixed", "dynamic"]);
|
|
@@ -14674,7 +15183,7 @@ function getWarningsForL2(l2) {
|
|
|
14674
15183
|
code: AUDIT_CODES.L2_AUTH_MODE_MISSING,
|
|
14675
15184
|
severity: "warn",
|
|
14676
15185
|
message: `Route ${loc} is missing an auth mode declaration.`,
|
|
14677
|
-
hint: "
|
|
15186
|
+
hint: "Reference a security scheme, add x-payment-info, or set `security: []` on the operation to mark it as explicitly public.",
|
|
14678
15187
|
path: route.path
|
|
14679
15188
|
});
|
|
14680
15189
|
}
|
|
@@ -14945,7 +15454,8 @@ function validateWithCoinbaseSchema(body) {
|
|
|
14945
15454
|
code: VALIDATION_CODES.COINBASE_SCHEMA_INVALID,
|
|
14946
15455
|
severity: "error",
|
|
14947
15456
|
message: `Coinbase schema validation failed at ${path}: ${issue2.message}`,
|
|
14948
|
-
path
|
|
15457
|
+
path,
|
|
15458
|
+
stage: "payment_required"
|
|
14949
15459
|
};
|
|
14950
15460
|
});
|
|
14951
15461
|
}
|
|
@@ -15187,7 +15697,8 @@ function validateWithCoinbaseSchema2(body) {
|
|
|
15187
15697
|
code: VALIDATION_CODES.COINBASE_SCHEMA_INVALID,
|
|
15188
15698
|
severity: "error",
|
|
15189
15699
|
message: `Coinbase schema validation failed at ${path}: ${issue2.message}`,
|
|
15190
|
-
path
|
|
15700
|
+
path,
|
|
15701
|
+
stage: "payment_required"
|
|
15191
15702
|
};
|
|
15192
15703
|
});
|
|
15193
15704
|
}
|
|
@@ -15351,7 +15862,8 @@ function getWarningsFor402Body(body) {
|
|
|
15351
15862
|
code: VALIDATION_CODES.X402_NOT_OBJECT,
|
|
15352
15863
|
severity: "error",
|
|
15353
15864
|
message: "Payment required payload must be a JSON object",
|
|
15354
|
-
path: "$"
|
|
15865
|
+
path: "$",
|
|
15866
|
+
stage: "payment_required"
|
|
15355
15867
|
}
|
|
15356
15868
|
];
|
|
15357
15869
|
}
|
|
@@ -15362,7 +15874,8 @@ function getWarningsFor402Body(body) {
|
|
|
15362
15874
|
code: versionRaw === void 0 ? VALIDATION_CODES.X402_VERSION_MISSING : VALIDATION_CODES.X402_VERSION_UNSUPPORTED,
|
|
15363
15875
|
severity: "error",
|
|
15364
15876
|
message: versionRaw === void 0 ? "x402Version is required" : `Unsupported x402Version '${String(versionRaw)}'`,
|
|
15365
|
-
path: "x402Version"
|
|
15877
|
+
path: "x402Version",
|
|
15878
|
+
stage: "payment_required"
|
|
15366
15879
|
}
|
|
15367
15880
|
];
|
|
15368
15881
|
}
|
|
@@ -15433,16 +15946,7 @@ function getWarningsFor402Body(body) {
|
|
|
15433
15946
|
stage: "payment_required"
|
|
15434
15947
|
});
|
|
15435
15948
|
}
|
|
15436
|
-
return [
|
|
15437
|
-
...coinbaseIssues,
|
|
15438
|
-
...issues.map((issue2) => ({
|
|
15439
|
-
code: issue2.code,
|
|
15440
|
-
severity: issue2.severity,
|
|
15441
|
-
message: issue2.message,
|
|
15442
|
-
...issue2.hint ? { hint: issue2.hint } : {},
|
|
15443
|
-
...issue2.path ? { path: issue2.path } : {}
|
|
15444
|
-
}))
|
|
15445
|
-
];
|
|
15949
|
+
return [...coinbaseIssues, ...issues];
|
|
15446
15950
|
}
|
|
15447
15951
|
function getWarningsForL3(l3) {
|
|
15448
15952
|
if (l3 === null) {
|
|
@@ -15461,7 +15965,7 @@ function getWarningsForL3(l3) {
|
|
|
15461
15965
|
code: AUDIT_CODES.L3_AUTH_MODE_MISSING,
|
|
15462
15966
|
severity: "warn",
|
|
15463
15967
|
message: "Endpoint has no auth mode in the spec.",
|
|
15464
|
-
hint: "
|
|
15968
|
+
hint: "Reference a security scheme, add x-payment-info, or set `security: []` on the operation to mark it as explicitly public."
|
|
15465
15969
|
});
|
|
15466
15970
|
}
|
|
15467
15971
|
if (l3.authMode === "paid" && !l3.inputSchema) {
|
|
@@ -15524,7 +16028,7 @@ function getWarningsForL4(l4) {
|
|
|
15524
16028
|
}
|
|
15525
16029
|
|
|
15526
16030
|
// src/audit/warnings/favicon.ts
|
|
15527
|
-
import { okAsync as
|
|
16031
|
+
import { okAsync as okAsync2, ResultAsync as ResultAsync3 } from "neverthrow";
|
|
15528
16032
|
var COMMON_PATHS = ["/favicon.ico", "/favicon.png", "/favicon.svg"];
|
|
15529
16033
|
var TIMEOUT = AbortSignal.timeout(5e3);
|
|
15530
16034
|
function isImage(res) {
|
|
@@ -15532,12 +16036,12 @@ function isImage(res) {
|
|
|
15532
16036
|
}
|
|
15533
16037
|
function checkUrl(url2) {
|
|
15534
16038
|
return fetchSafe(url2, { method: "HEAD", signal: TIMEOUT }).andThen((res) => {
|
|
15535
|
-
if (res.ok) return
|
|
16039
|
+
if (res.ok) return okAsync2(isImage(res));
|
|
15536
16040
|
if (res.status === 405 || res.status === 403) {
|
|
15537
16041
|
return fetchSafe(url2, { signal: TIMEOUT }).map((getRes) => getRes.ok && isImage(getRes));
|
|
15538
16042
|
}
|
|
15539
|
-
return
|
|
15540
|
-
}).orElse(() =>
|
|
16043
|
+
return okAsync2(false);
|
|
16044
|
+
}).orElse(() => okAsync2(false));
|
|
15541
16045
|
}
|
|
15542
16046
|
function resolveHref(href, origin) {
|
|
15543
16047
|
if (href.startsWith("//")) return `https:${href}`;
|
|
@@ -15566,15 +16070,15 @@ function extractIconHrefs(html, origin) {
|
|
|
15566
16070
|
function getHtmlIconHrefs(origin) {
|
|
15567
16071
|
return fetchSafe(origin, { signal: TIMEOUT }).andThen((res) => {
|
|
15568
16072
|
if (!res.ok || !(res.headers.get("content-type") ?? "").includes("text/html"))
|
|
15569
|
-
return
|
|
15570
|
-
return
|
|
15571
|
-
}).map((html) => html ? extractIconHrefs(html, origin) : []).orElse(() =>
|
|
16073
|
+
return okAsync2("");
|
|
16074
|
+
return ResultAsync3.fromSafePromise(res.text());
|
|
16075
|
+
}).map((html) => html ? extractIconHrefs(html, origin) : []).orElse(() => okAsync2([]));
|
|
15572
16076
|
}
|
|
15573
16077
|
function checkFavicon(origin) {
|
|
15574
16078
|
const normalizedOrigin = origin.replace(/\/$/, "");
|
|
15575
16079
|
return getHtmlIconHrefs(normalizedOrigin).andThen((hrefs) => {
|
|
15576
16080
|
const candidates = [...hrefs, ...COMMON_PATHS.map((p) => `${normalizedOrigin}${p}`)];
|
|
15577
|
-
return
|
|
16081
|
+
return ResultAsync3.fromSafePromise(
|
|
15578
16082
|
Promise.all(candidates.map((url2) => checkUrl(url2).then((r) => r.isOk() && r.value))).then(
|
|
15579
16083
|
(results) => results.some(Boolean)
|
|
15580
16084
|
)
|
|
@@ -15595,8 +16099,42 @@ function getWarningsForFavicon(origin) {
|
|
|
15595
16099
|
});
|
|
15596
16100
|
}
|
|
15597
16101
|
|
|
16102
|
+
// src/audit/legacy-well-known.ts
|
|
16103
|
+
import { ResultAsync as ResultAsync4 } from "neverthrow";
|
|
16104
|
+
async function exists(url2, headers, signal) {
|
|
16105
|
+
const result = await fetchSafe(url2, {
|
|
16106
|
+
method: "GET",
|
|
16107
|
+
headers: { Accept: "application/json", ...headers },
|
|
16108
|
+
signal
|
|
16109
|
+
});
|
|
16110
|
+
if (result.isErr()) return false;
|
|
16111
|
+
return result.value.ok;
|
|
16112
|
+
}
|
|
16113
|
+
function probeLegacyWellKnown(origin, headers, signal) {
|
|
16114
|
+
return ResultAsync4.fromSafePromise(
|
|
16115
|
+
Promise.all([
|
|
16116
|
+
exists(`${origin}/.well-known/x402`, headers, signal),
|
|
16117
|
+
exists(`${origin}/.well-known/mpp`, headers, signal)
|
|
16118
|
+
]).then(([x402, mpp]) => ({ x402, mpp }))
|
|
16119
|
+
);
|
|
16120
|
+
}
|
|
16121
|
+
function getWarningsForLegacyWellKnown(probe) {
|
|
16122
|
+
const paths = [];
|
|
16123
|
+
if (probe.x402) paths.push("/.well-known/x402");
|
|
16124
|
+
if (probe.mpp) paths.push("/.well-known/mpp");
|
|
16125
|
+
if (paths.length === 0) return [];
|
|
16126
|
+
return [
|
|
16127
|
+
{
|
|
16128
|
+
code: AUDIT_CODES.LEGACY_WELL_KNOWN_FOUND,
|
|
16129
|
+
severity: "info",
|
|
16130
|
+
message: `Legacy discovery document detected at ${paths.join(" and ")}. agentcash-discovery no longer parses these.`,
|
|
16131
|
+
hint: "Publish an OpenAPI spec at /openapi.json to be discovered."
|
|
16132
|
+
}
|
|
16133
|
+
];
|
|
16134
|
+
}
|
|
16135
|
+
|
|
15598
16136
|
// src/core/source/probe/index.ts
|
|
15599
|
-
import { ResultAsync as
|
|
16137
|
+
import { ResultAsync as ResultAsync5 } from "neverthrow";
|
|
15600
16138
|
|
|
15601
16139
|
// src/core/protocols/x402/index.ts
|
|
15602
16140
|
function parseVersion(payload) {
|
|
@@ -15631,12 +16169,10 @@ function extractSchemas3(payload) {
|
|
|
15631
16169
|
return {};
|
|
15632
16170
|
}
|
|
15633
16171
|
function parseInputSchema(payload) {
|
|
15634
|
-
|
|
15635
|
-
return schema;
|
|
16172
|
+
return extractSchemas3(payload).inputSchema;
|
|
15636
16173
|
}
|
|
15637
16174
|
function parseOutputSchema(payload) {
|
|
15638
|
-
|
|
15639
|
-
return schema;
|
|
16175
|
+
return extractSchemas3(payload).outputSchema;
|
|
15640
16176
|
}
|
|
15641
16177
|
|
|
15642
16178
|
// src/core/protocols/x402/v1/parse-payment-required.ts
|
|
@@ -15647,9 +16183,9 @@ async function parsePaymentRequiredBody(response) {
|
|
|
15647
16183
|
}
|
|
15648
16184
|
|
|
15649
16185
|
// src/core/lib/base64.ts
|
|
15650
|
-
import { Result
|
|
16186
|
+
import { Result } from "neverthrow";
|
|
15651
16187
|
function safeBase64DecodeUtf8(encoded) {
|
|
15652
|
-
return
|
|
16188
|
+
return Result.fromThrowable(
|
|
15653
16189
|
() => {
|
|
15654
16190
|
if (typeof Buffer !== "undefined") {
|
|
15655
16191
|
return Buffer.from(encoded, "base64").toString("utf8");
|
|
@@ -15717,8 +16253,8 @@ function probeMethod(url2, method, path, headers, signal, inputBody) {
|
|
|
15717
16253
|
...hasBody ? { body: JSON.stringify(inputBody) } : {},
|
|
15718
16254
|
signal
|
|
15719
16255
|
}).andThen((response) => {
|
|
15720
|
-
if (!isUsableStatus(response.status)) return
|
|
15721
|
-
return
|
|
16256
|
+
if (!isUsableStatus(response.status)) return ResultAsync5.fromSafePromise(Promise.resolve(null));
|
|
16257
|
+
return ResultAsync5.fromSafePromise(
|
|
15722
16258
|
(async () => {
|
|
15723
16259
|
let authHint = response.status === 402 ? "paid" : "unprotected";
|
|
15724
16260
|
let paymentRequiredBody;
|
|
@@ -15749,7 +16285,7 @@ function probeMethod(url2, method, path, headers, signal, inputBody) {
|
|
|
15749
16285
|
}
|
|
15750
16286
|
function getProbe(url2, headers, signal, inputBody) {
|
|
15751
16287
|
const path = normalizePath(new URL(url2).pathname || "/");
|
|
15752
|
-
return
|
|
16288
|
+
return ResultAsync5.fromSafePromise(
|
|
15753
16289
|
Promise.all(
|
|
15754
16290
|
[...HTTP_METHODS].map(
|
|
15755
16291
|
(method) => probeMethod(url2, method, path, headers, signal, inputBody).match(
|
|
@@ -15762,9 +16298,9 @@ function getProbe(url2, headers, signal, inputBody) {
|
|
|
15762
16298
|
}
|
|
15763
16299
|
|
|
15764
16300
|
// src/core/protocols/mpp/index.ts
|
|
15765
|
-
import { Result as
|
|
16301
|
+
import { Result as Result2 } from "neverthrow";
|
|
15766
16302
|
function parseBase64Json(encoded) {
|
|
15767
|
-
return
|
|
16303
|
+
return Result2.fromThrowable(
|
|
15768
16304
|
() => {
|
|
15769
16305
|
const decoded = safeBase64DecodeUtf8(encoded);
|
|
15770
16306
|
if (decoded.isErr()) throw decoded.error;
|
|
@@ -15933,6 +16469,10 @@ function resolveOperationPaymentInfo(operation) {
|
|
|
15933
16469
|
...names.length > 0 ? { protocols: names } : {}
|
|
15934
16470
|
};
|
|
15935
16471
|
}
|
|
16472
|
+
function extractSecurityRequirements(raw) {
|
|
16473
|
+
if (!Array.isArray(raw)) return void 0;
|
|
16474
|
+
return raw.filter((entry) => isRecord(entry));
|
|
16475
|
+
}
|
|
15936
16476
|
function getL3ForOpenAPI(openApi, path, method) {
|
|
15937
16477
|
const document = openApi.raw;
|
|
15938
16478
|
const paths = isRecord(document.paths) ? document.paths : void 0;
|
|
@@ -15944,10 +16484,13 @@ function getL3ForOpenAPI(openApi, path, method) {
|
|
|
15944
16484
|
const resolvedOperation = resolveRefs(operation, document);
|
|
15945
16485
|
const summary = typeof resolvedOperation.summary === "string" ? resolvedOperation.summary : typeof resolvedOperation.description === "string" ? resolvedOperation.description : void 0;
|
|
15946
16486
|
const paymentResolved = resolveOperationPaymentInfo(resolvedOperation);
|
|
16487
|
+
const globalSecurity = extractSecurityRequirements(document.security);
|
|
16488
|
+
const components = isRecord(document.components) ? document.components : void 0;
|
|
16489
|
+
const securitySchemes = isRecord(components?.securitySchemes) ? components.securitySchemes : void 0;
|
|
15947
16490
|
return {
|
|
15948
16491
|
source: "openapi",
|
|
15949
16492
|
...summary ? { summary } : {},
|
|
15950
|
-
authMode: inferAuthMode(resolvedOperation) ?? void 0,
|
|
16493
|
+
authMode: inferAuthMode(resolvedOperation, globalSecurity, securitySchemes) ?? void 0,
|
|
15951
16494
|
...paymentResolved?.price ? { estimatedPrice: paymentResolved.price } : {},
|
|
15952
16495
|
...paymentResolved?.currency ? { currency: paymentResolved.currency } : {},
|
|
15953
16496
|
...paymentResolved?.protocols ? { protocols: paymentResolved.protocols } : {},
|
|
@@ -16077,12 +16620,15 @@ function parseArgs(args) {
|
|
|
16077
16620
|
}
|
|
16078
16621
|
return { command: first ?? null, target: second ?? null, flags };
|
|
16079
16622
|
}
|
|
16080
|
-
function routeToResource(route) {
|
|
16623
|
+
function routeToResource(route, origin, source, trustTier) {
|
|
16081
16624
|
return {
|
|
16082
|
-
resourceKey: `${route.method} ${route.path}`,
|
|
16625
|
+
resourceKey: route.resourceKey ?? `${origin} ${route.method} ${route.path}`,
|
|
16626
|
+
origin,
|
|
16083
16627
|
method: route.method,
|
|
16084
16628
|
path: route.path,
|
|
16085
16629
|
summary: route.summary,
|
|
16630
|
+
source,
|
|
16631
|
+
trustTier,
|
|
16086
16632
|
...route.authMode ? { authHint: route.authMode } : {},
|
|
16087
16633
|
...route.price ? { priceHint: route.price } : {},
|
|
16088
16634
|
...route.protocols?.length ? { protocols: route.protocols } : {}
|
|
@@ -16107,20 +16653,17 @@ async function runDiscover(target, flags) {
|
|
|
16107
16653
|
if (!flags.json) console.log(`
|
|
16108
16654
|
Discovering ${origin}...
|
|
16109
16655
|
`);
|
|
16110
|
-
const [openApiResult,
|
|
16656
|
+
const [openApiResult, faviconWarnings] = await Promise.all([
|
|
16111
16657
|
getOpenAPI(origin),
|
|
16112
|
-
getWellKnown(origin),
|
|
16113
16658
|
getWarningsForFavicon(origin)
|
|
16114
16659
|
]);
|
|
16115
16660
|
const openApiRaw = openApiResult.isOk() ? openApiResult.value : null;
|
|
16116
|
-
const wellKnown = wellKnownResult.isOk() ? wellKnownResult.value : null;
|
|
16117
16661
|
const openApi = isOpenApiSource(openApiRaw) ? openApiRaw : null;
|
|
16118
16662
|
const warnings = [
|
|
16119
16663
|
...getWarningsForOpenAPI(openApiRaw),
|
|
16120
|
-
...getWarningsForWellKnown(wellKnown),
|
|
16121
16664
|
...faviconWarnings.isOk() ? faviconWarnings.value : []
|
|
16122
16665
|
];
|
|
16123
|
-
if (openApi) {
|
|
16666
|
+
if (openApi && openApi.routes.length > 0) {
|
|
16124
16667
|
const l2 = checkL2ForOpenAPI(openApi);
|
|
16125
16668
|
const l4 = checkL4ForOpenAPI(openApi);
|
|
16126
16669
|
warnings.push(...getWarningsForL2(l2), ...getWarningsForL4(l4));
|
|
@@ -16144,7 +16687,9 @@ Discovering ${origin}...
|
|
|
16144
16687
|
{
|
|
16145
16688
|
ok: true,
|
|
16146
16689
|
selectedStage: "openapi",
|
|
16147
|
-
resources: l2.routes.map(
|
|
16690
|
+
resources: l2.routes.map(
|
|
16691
|
+
(route) => routeToResource(route, origin, "openapi", "origin_hosted")
|
|
16692
|
+
),
|
|
16148
16693
|
warnings,
|
|
16149
16694
|
trace: [],
|
|
16150
16695
|
meta: meta3
|
|
@@ -16173,28 +16718,19 @@ Guidance: ${tokens} tokens`);
|
|
|
16173
16718
|
if (flags.verbose) console.log(`
|
|
16174
16719
|
${l4.guidance}`);
|
|
16175
16720
|
}
|
|
16176
|
-
} else
|
|
16177
|
-
const
|
|
16178
|
-
|
|
16179
|
-
warnings.push(...getWarningsForL2(l2), ...getWarningsForL4(l4));
|
|
16180
|
-
const l3WarningArrays = await Promise.all(
|
|
16181
|
-
l2.routes.map((r) => getL3Warnings(`${origin}${r.path}`))
|
|
16182
|
-
);
|
|
16183
|
-
warnings.push(...l3WarningArrays.flat());
|
|
16721
|
+
} else {
|
|
16722
|
+
const legacyResult = await probeLegacyWellKnown(origin);
|
|
16723
|
+
if (legacyResult.isOk()) warnings.push(...getWarningsForLegacyWellKnown(legacyResult.value));
|
|
16184
16724
|
if (flags.json) {
|
|
16185
|
-
const meta3 = { origin, specUrl: wellKnown.fetchedUrl };
|
|
16186
|
-
if (l2.title) meta3.title = l2.title;
|
|
16187
|
-
if (l2.description) meta3.description = l2.description;
|
|
16188
|
-
if (l4 && flags.verbose) meta3.guidance = l4.guidance;
|
|
16189
16725
|
console.log(
|
|
16190
16726
|
JSON.stringify(
|
|
16191
16727
|
{
|
|
16192
|
-
ok:
|
|
16193
|
-
selectedStage:
|
|
16194
|
-
resources:
|
|
16728
|
+
ok: false,
|
|
16729
|
+
selectedStage: null,
|
|
16730
|
+
resources: [],
|
|
16195
16731
|
warnings,
|
|
16196
16732
|
trace: [],
|
|
16197
|
-
meta:
|
|
16733
|
+
meta: { origin }
|
|
16198
16734
|
},
|
|
16199
16735
|
null,
|
|
16200
16736
|
2
|
|
@@ -16202,28 +16738,7 @@ ${l4.guidance}`);
|
|
|
16202
16738
|
);
|
|
16203
16739
|
return 0;
|
|
16204
16740
|
}
|
|
16205
|
-
console.log(
|
|
16206
|
-
console.log(`Spec: ${wellKnown.fetchedUrl}`);
|
|
16207
|
-
if (l2.title) console.log(`API: ${l2.title}`);
|
|
16208
|
-
console.log(`Routes: ${l2.routes.length}
|
|
16209
|
-
`);
|
|
16210
|
-
for (const route of l2.routes) {
|
|
16211
|
-
const price = route.price ? ` ${route.price}` : "";
|
|
16212
|
-
const protocols = route.protocols?.length ? ` [${route.protocols.join(", ")}]` : "";
|
|
16213
|
-
console.log(` ${route.method.padEnd(7)} ${route.path} paid${price}${protocols}`);
|
|
16214
|
-
}
|
|
16215
|
-
} else {
|
|
16216
|
-
if (flags.json) {
|
|
16217
|
-
console.log(
|
|
16218
|
-
JSON.stringify(
|
|
16219
|
-
{ ok: false, selectedStage: null, resources: [], warnings, trace: [], meta: { origin } },
|
|
16220
|
-
null,
|
|
16221
|
-
2
|
|
16222
|
-
)
|
|
16223
|
-
);
|
|
16224
|
-
return 0;
|
|
16225
|
-
}
|
|
16226
|
-
console.log("Not found \u2014 no OpenAPI spec or /.well-known/x402 at this origin.");
|
|
16741
|
+
console.log("Not found \u2014 no OpenAPI spec at this origin.");
|
|
16227
16742
|
}
|
|
16228
16743
|
printWarnings(warnings, flags.verbose);
|
|
16229
16744
|
return 0;
|