@agentcash/discovery 1.6.5 → 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 +1374 -861
- package/dist/cli.js +1375 -862
- 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.cjs
CHANGED
|
@@ -37,7 +37,7 @@ module.exports = __toCommonJS(cli_exports);
|
|
|
37
37
|
// src/core/source/openapi/index.ts
|
|
38
38
|
var import_neverthrow2 = require("neverthrow");
|
|
39
39
|
|
|
40
|
-
// node_modules/.pnpm/zod@4.3
|
|
40
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
41
41
|
var external_exports = {};
|
|
42
42
|
__export(external_exports, {
|
|
43
43
|
$brand: () => $brand,
|
|
@@ -99,6 +99,7 @@ __export(external_exports, {
|
|
|
99
99
|
ZodOptional: () => ZodOptional,
|
|
100
100
|
ZodPipe: () => ZodPipe,
|
|
101
101
|
ZodPrefault: () => ZodPrefault,
|
|
102
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
102
103
|
ZodPromise: () => ZodPromise,
|
|
103
104
|
ZodReadonly: () => ZodReadonly,
|
|
104
105
|
ZodRealError: () => ZodRealError,
|
|
@@ -177,6 +178,7 @@ __export(external_exports, {
|
|
|
177
178
|
int32: () => int32,
|
|
178
179
|
int64: () => int64,
|
|
179
180
|
intersection: () => intersection,
|
|
181
|
+
invertCodec: () => invertCodec,
|
|
180
182
|
ipv4: () => ipv42,
|
|
181
183
|
ipv6: () => ipv62,
|
|
182
184
|
iso: () => iso_exports,
|
|
@@ -278,7 +280,7 @@ __export(external_exports, {
|
|
|
278
280
|
xor: () => xor
|
|
279
281
|
});
|
|
280
282
|
|
|
281
|
-
// node_modules/.pnpm/zod@4.3
|
|
283
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/index.js
|
|
282
284
|
var core_exports2 = {};
|
|
283
285
|
__export(core_exports2, {
|
|
284
286
|
$ZodAny: () => $ZodAny,
|
|
@@ -358,6 +360,7 @@ __export(core_exports2, {
|
|
|
358
360
|
$ZodOptional: () => $ZodOptional,
|
|
359
361
|
$ZodPipe: () => $ZodPipe,
|
|
360
362
|
$ZodPrefault: () => $ZodPrefault,
|
|
363
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
361
364
|
$ZodPromise: () => $ZodPromise,
|
|
362
365
|
$ZodReadonly: () => $ZodReadonly,
|
|
363
366
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -556,8 +559,9 @@ __export(core_exports2, {
|
|
|
556
559
|
version: () => version
|
|
557
560
|
});
|
|
558
561
|
|
|
559
|
-
// node_modules/.pnpm/zod@4.3
|
|
560
|
-
var
|
|
562
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
|
|
563
|
+
var _a;
|
|
564
|
+
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
561
565
|
status: "aborted"
|
|
562
566
|
});
|
|
563
567
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -592,10 +596,10 @@ function $constructor(name, initializer3, params) {
|
|
|
592
596
|
}
|
|
593
597
|
Object.defineProperty(Definition, "name", { value: name });
|
|
594
598
|
function _(def) {
|
|
595
|
-
var
|
|
599
|
+
var _a3;
|
|
596
600
|
const inst = params?.Parent ? new Definition() : this;
|
|
597
601
|
init(inst, def);
|
|
598
|
-
(
|
|
602
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
599
603
|
for (const fn of inst._zod.deferred) {
|
|
600
604
|
fn();
|
|
601
605
|
}
|
|
@@ -624,14 +628,15 @@ var $ZodEncodeError = class extends Error {
|
|
|
624
628
|
this.name = "ZodEncodeError";
|
|
625
629
|
}
|
|
626
630
|
};
|
|
627
|
-
|
|
631
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
632
|
+
var globalConfig = globalThis.__zod_globalConfig;
|
|
628
633
|
function config(newConfig) {
|
|
629
634
|
if (newConfig)
|
|
630
635
|
Object.assign(globalConfig, newConfig);
|
|
631
636
|
return globalConfig;
|
|
632
637
|
}
|
|
633
638
|
|
|
634
|
-
// node_modules/.pnpm/zod@4.3
|
|
639
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
|
|
635
640
|
var util_exports = {};
|
|
636
641
|
__export(util_exports, {
|
|
637
642
|
BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
|
|
@@ -657,6 +662,7 @@ __export(util_exports, {
|
|
|
657
662
|
defineLazy: () => defineLazy,
|
|
658
663
|
esc: () => esc,
|
|
659
664
|
escapeRegex: () => escapeRegex,
|
|
665
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
660
666
|
extend: () => extend,
|
|
661
667
|
finalizeIssue: () => finalizeIssue,
|
|
662
668
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
@@ -745,19 +751,12 @@ function cleanRegex(source) {
|
|
|
745
751
|
return source.slice(start, end);
|
|
746
752
|
}
|
|
747
753
|
function floatSafeRemainder(val, step) {
|
|
748
|
-
const
|
|
749
|
-
const
|
|
750
|
-
|
|
751
|
-
if (
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
758
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
759
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
760
|
-
return valInt % stepInt / 10 ** decCount;
|
|
754
|
+
const ratio = val / step;
|
|
755
|
+
const roundedRatio = Math.round(ratio);
|
|
756
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
757
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
758
|
+
return 0;
|
|
759
|
+
return ratio - roundedRatio;
|
|
761
760
|
}
|
|
762
761
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
763
762
|
function defineLazy(object2, key, getter) {
|
|
@@ -839,7 +838,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
|
|
|
839
838
|
function isObject(data) {
|
|
840
839
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
841
840
|
}
|
|
842
|
-
var allowsEval = cached(() => {
|
|
841
|
+
var allowsEval = /* @__PURE__ */ cached(() => {
|
|
842
|
+
if (globalConfig.jitless) {
|
|
843
|
+
return false;
|
|
844
|
+
}
|
|
843
845
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
844
846
|
return false;
|
|
845
847
|
}
|
|
@@ -872,6 +874,10 @@ function shallowClone(o) {
|
|
|
872
874
|
return { ...o };
|
|
873
875
|
if (Array.isArray(o))
|
|
874
876
|
return [...o];
|
|
877
|
+
if (o instanceof Map)
|
|
878
|
+
return new Map(o);
|
|
879
|
+
if (o instanceof Set)
|
|
880
|
+
return new Set(o);
|
|
875
881
|
return o;
|
|
876
882
|
}
|
|
877
883
|
function numKeys(data) {
|
|
@@ -928,7 +934,14 @@ var getParsedType = (data) => {
|
|
|
928
934
|
}
|
|
929
935
|
};
|
|
930
936
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
931
|
-
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
937
|
+
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
938
|
+
"string",
|
|
939
|
+
"number",
|
|
940
|
+
"bigint",
|
|
941
|
+
"boolean",
|
|
942
|
+
"symbol",
|
|
943
|
+
"undefined"
|
|
944
|
+
]);
|
|
932
945
|
function escapeRegex(str) {
|
|
933
946
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
934
947
|
}
|
|
@@ -1097,6 +1110,9 @@ function safeExtend(schema, shape) {
|
|
|
1097
1110
|
return clone(schema, def);
|
|
1098
1111
|
}
|
|
1099
1112
|
function merge(a, b) {
|
|
1113
|
+
if (a._zod.def.checks?.length) {
|
|
1114
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
1115
|
+
}
|
|
1100
1116
|
const def = mergeDefs(a._zod.def, {
|
|
1101
1117
|
get shape() {
|
|
1102
1118
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -1106,8 +1122,7 @@ function merge(a, b) {
|
|
|
1106
1122
|
get catchall() {
|
|
1107
1123
|
return b._zod.def.catchall;
|
|
1108
1124
|
},
|
|
1109
|
-
checks: []
|
|
1110
|
-
// delete existing checks
|
|
1125
|
+
checks: b._zod.def.checks ?? []
|
|
1111
1126
|
});
|
|
1112
1127
|
return clone(a, def);
|
|
1113
1128
|
}
|
|
@@ -1190,10 +1205,20 @@ function aborted(x, startIndex = 0) {
|
|
|
1190
1205
|
}
|
|
1191
1206
|
return false;
|
|
1192
1207
|
}
|
|
1208
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
1209
|
+
if (x.aborted === true)
|
|
1210
|
+
return true;
|
|
1211
|
+
for (let i = startIndex; i < x.issues.length; i++) {
|
|
1212
|
+
if (x.issues[i]?.continue === false) {
|
|
1213
|
+
return true;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
return false;
|
|
1217
|
+
}
|
|
1193
1218
|
function prefixIssues(path, issues) {
|
|
1194
1219
|
return issues.map((iss) => {
|
|
1195
|
-
var
|
|
1196
|
-
(
|
|
1220
|
+
var _a3;
|
|
1221
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
1197
1222
|
iss.path.unshift(path);
|
|
1198
1223
|
return iss;
|
|
1199
1224
|
});
|
|
@@ -1202,17 +1227,14 @@ function unwrapMessage(message) {
|
|
|
1202
1227
|
return typeof message === "string" ? message : message?.message;
|
|
1203
1228
|
}
|
|
1204
1229
|
function finalizeIssue(iss, ctx, config2) {
|
|
1205
|
-
const
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
delete full.continue;
|
|
1212
|
-
if (!ctx?.reportInput) {
|
|
1213
|
-
delete full.input;
|
|
1230
|
+
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";
|
|
1231
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
1232
|
+
rest.path ?? (rest.path = []);
|
|
1233
|
+
rest.message = message;
|
|
1234
|
+
if (ctx?.reportInput) {
|
|
1235
|
+
rest.input = _input;
|
|
1214
1236
|
}
|
|
1215
|
-
return
|
|
1237
|
+
return rest;
|
|
1216
1238
|
}
|
|
1217
1239
|
function getSizableOrigin(input) {
|
|
1218
1240
|
if (input instanceof Set)
|
|
@@ -1310,7 +1332,7 @@ var Class = class {
|
|
|
1310
1332
|
}
|
|
1311
1333
|
};
|
|
1312
1334
|
|
|
1313
|
-
// node_modules/.pnpm/zod@4.3
|
|
1335
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
|
|
1314
1336
|
var initializer = (inst, def) => {
|
|
1315
1337
|
inst.name = "$ZodError";
|
|
1316
1338
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -1329,10 +1351,10 @@ var initializer = (inst, def) => {
|
|
|
1329
1351
|
};
|
|
1330
1352
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
1331
1353
|
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
1332
|
-
function flattenError(
|
|
1354
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
1333
1355
|
const fieldErrors = {};
|
|
1334
1356
|
const formErrors = [];
|
|
1335
|
-
for (const sub of
|
|
1357
|
+
for (const sub of error51.issues) {
|
|
1336
1358
|
if (sub.path.length > 0) {
|
|
1337
1359
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
1338
1360
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -1342,50 +1364,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
|
|
|
1342
1364
|
}
|
|
1343
1365
|
return { formErrors, fieldErrors };
|
|
1344
1366
|
}
|
|
1345
|
-
function formatError(
|
|
1367
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
1346
1368
|
const fieldErrors = { _errors: [] };
|
|
1347
|
-
const processError = (
|
|
1348
|
-
for (const issue2 of
|
|
1369
|
+
const processError = (error52, path = []) => {
|
|
1370
|
+
for (const issue2 of error52.issues) {
|
|
1349
1371
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1350
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
1372
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
1351
1373
|
} else if (issue2.code === "invalid_key") {
|
|
1352
|
-
processError({ issues: issue2.issues });
|
|
1374
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1353
1375
|
} else if (issue2.code === "invalid_element") {
|
|
1354
|
-
processError({ issues: issue2.issues });
|
|
1355
|
-
} else if (issue2.path.length === 0) {
|
|
1356
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
1376
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1357
1377
|
} else {
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1378
|
+
const fullpath = [...path, ...issue2.path];
|
|
1379
|
+
if (fullpath.length === 0) {
|
|
1380
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
1381
|
+
} else {
|
|
1382
|
+
let curr = fieldErrors;
|
|
1383
|
+
let i = 0;
|
|
1384
|
+
while (i < fullpath.length) {
|
|
1385
|
+
const el = fullpath[i];
|
|
1386
|
+
const terminal = i === fullpath.length - 1;
|
|
1387
|
+
if (!terminal) {
|
|
1388
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
1389
|
+
} else {
|
|
1390
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
1391
|
+
curr[el]._errors.push(mapper(issue2));
|
|
1392
|
+
}
|
|
1393
|
+
curr = curr[el];
|
|
1394
|
+
i++;
|
|
1368
1395
|
}
|
|
1369
|
-
curr = curr[el];
|
|
1370
|
-
i++;
|
|
1371
1396
|
}
|
|
1372
1397
|
}
|
|
1373
1398
|
}
|
|
1374
1399
|
};
|
|
1375
|
-
processError(
|
|
1400
|
+
processError(error51);
|
|
1376
1401
|
return fieldErrors;
|
|
1377
1402
|
}
|
|
1378
|
-
function treeifyError(
|
|
1403
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
1379
1404
|
const result = { errors: [] };
|
|
1380
|
-
const processError = (
|
|
1381
|
-
var
|
|
1382
|
-
for (const issue2 of
|
|
1405
|
+
const processError = (error52, path = []) => {
|
|
1406
|
+
var _a3, _b;
|
|
1407
|
+
for (const issue2 of error52.issues) {
|
|
1383
1408
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1384
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
1409
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
1385
1410
|
} else if (issue2.code === "invalid_key") {
|
|
1386
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
1411
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1387
1412
|
} else if (issue2.code === "invalid_element") {
|
|
1388
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
1413
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
1389
1414
|
} else {
|
|
1390
1415
|
const fullpath = [...path, ...issue2.path];
|
|
1391
1416
|
if (fullpath.length === 0) {
|
|
@@ -1399,7 +1424,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
1399
1424
|
const terminal = i === fullpath.length - 1;
|
|
1400
1425
|
if (typeof el === "string") {
|
|
1401
1426
|
curr.properties ?? (curr.properties = {});
|
|
1402
|
-
(
|
|
1427
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
1403
1428
|
curr = curr.properties[el];
|
|
1404
1429
|
} else {
|
|
1405
1430
|
curr.items ?? (curr.items = []);
|
|
@@ -1414,7 +1439,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
1414
1439
|
}
|
|
1415
1440
|
}
|
|
1416
1441
|
};
|
|
1417
|
-
processError(
|
|
1442
|
+
processError(error51);
|
|
1418
1443
|
return result;
|
|
1419
1444
|
}
|
|
1420
1445
|
function toDotPath(_path) {
|
|
@@ -1435,9 +1460,9 @@ function toDotPath(_path) {
|
|
|
1435
1460
|
}
|
|
1436
1461
|
return segs.join("");
|
|
1437
1462
|
}
|
|
1438
|
-
function prettifyError(
|
|
1463
|
+
function prettifyError(error51) {
|
|
1439
1464
|
const lines = [];
|
|
1440
|
-
const issues = [...
|
|
1465
|
+
const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
1441
1466
|
for (const issue2 of issues) {
|
|
1442
1467
|
lines.push(`\u2716 ${issue2.message}`);
|
|
1443
1468
|
if (issue2.path?.length)
|
|
@@ -1446,9 +1471,9 @@ function prettifyError(error48) {
|
|
|
1446
1471
|
return lines.join("\n");
|
|
1447
1472
|
}
|
|
1448
1473
|
|
|
1449
|
-
// node_modules/.pnpm/zod@4.3
|
|
1474
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
|
|
1450
1475
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
1451
|
-
const ctx = _ctx ?
|
|
1476
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
1452
1477
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1453
1478
|
if (result instanceof Promise) {
|
|
1454
1479
|
throw new $ZodAsyncError();
|
|
@@ -1462,7 +1487,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
1462
1487
|
};
|
|
1463
1488
|
var parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
1464
1489
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
1465
|
-
const ctx = _ctx ?
|
|
1490
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
1466
1491
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1467
1492
|
if (result instanceof Promise)
|
|
1468
1493
|
result = await result;
|
|
@@ -1487,7 +1512,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
|
1487
1512
|
};
|
|
1488
1513
|
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
1489
1514
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1490
|
-
const ctx = _ctx ?
|
|
1515
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
1491
1516
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1492
1517
|
if (result instanceof Promise)
|
|
1493
1518
|
result = await result;
|
|
@@ -1498,7 +1523,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1498
1523
|
};
|
|
1499
1524
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
1500
1525
|
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
1501
|
-
const ctx = _ctx ?
|
|
1526
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1502
1527
|
return _parse(_Err)(schema, value, ctx);
|
|
1503
1528
|
};
|
|
1504
1529
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -1507,7 +1532,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
|
|
|
1507
1532
|
};
|
|
1508
1533
|
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
1509
1534
|
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1510
|
-
const ctx = _ctx ?
|
|
1535
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1511
1536
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
1512
1537
|
};
|
|
1513
1538
|
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -1516,7 +1541,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1516
1541
|
};
|
|
1517
1542
|
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
1518
1543
|
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
1519
|
-
const ctx = _ctx ?
|
|
1544
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1520
1545
|
return _safeParse(_Err)(schema, value, ctx);
|
|
1521
1546
|
};
|
|
1522
1547
|
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -1525,7 +1550,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
|
1525
1550
|
};
|
|
1526
1551
|
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
1527
1552
|
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1528
|
-
const ctx = _ctx ?
|
|
1553
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1529
1554
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
1530
1555
|
};
|
|
1531
1556
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -1534,7 +1559,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1534
1559
|
};
|
|
1535
1560
|
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
1536
1561
|
|
|
1537
|
-
// node_modules/.pnpm/zod@4.3
|
|
1562
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.js
|
|
1538
1563
|
var regexes_exports = {};
|
|
1539
1564
|
__export(regexes_exports, {
|
|
1540
1565
|
base64: () => base64,
|
|
@@ -1558,6 +1583,7 @@ __export(regexes_exports, {
|
|
|
1558
1583
|
hex: () => hex,
|
|
1559
1584
|
hostname: () => hostname,
|
|
1560
1585
|
html5Email: () => html5Email,
|
|
1586
|
+
httpProtocol: () => httpProtocol,
|
|
1561
1587
|
idnEmail: () => idnEmail,
|
|
1562
1588
|
integer: () => integer,
|
|
1563
1589
|
ipv4: () => ipv4,
|
|
@@ -1596,7 +1622,7 @@ __export(regexes_exports, {
|
|
|
1596
1622
|
uuid7: () => uuid7,
|
|
1597
1623
|
xid: () => xid
|
|
1598
1624
|
});
|
|
1599
|
-
var cuid = /^[cC][
|
|
1625
|
+
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
1600
1626
|
var cuid2 = /^[0-9a-z]+$/;
|
|
1601
1627
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
1602
1628
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -1635,6 +1661,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
|
|
|
1635
1661
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
1636
1662
|
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])?)*\.?$/;
|
|
1637
1663
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
1664
|
+
var httpProtocol = /^https?$/;
|
|
1638
1665
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
1639
1666
|
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])))`;
|
|
1640
1667
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -1691,12 +1718,12 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
|
1691
1718
|
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
1692
1719
|
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
1693
1720
|
|
|
1694
|
-
// node_modules/.pnpm/zod@4.3
|
|
1721
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.js
|
|
1695
1722
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
1696
|
-
var
|
|
1723
|
+
var _a3;
|
|
1697
1724
|
inst._zod ?? (inst._zod = {});
|
|
1698
1725
|
inst._zod.def = def;
|
|
1699
|
-
(
|
|
1726
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
1700
1727
|
});
|
|
1701
1728
|
var numericOriginMap = {
|
|
1702
1729
|
number: "number",
|
|
@@ -1762,8 +1789,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
1762
1789
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
1763
1790
|
$ZodCheck.init(inst, def);
|
|
1764
1791
|
inst._zod.onattach.push((inst2) => {
|
|
1765
|
-
var
|
|
1766
|
-
(
|
|
1792
|
+
var _a3;
|
|
1793
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
1767
1794
|
});
|
|
1768
1795
|
inst._zod.check = (payload) => {
|
|
1769
1796
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -1896,9 +1923,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
1896
1923
|
};
|
|
1897
1924
|
});
|
|
1898
1925
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
1899
|
-
var
|
|
1926
|
+
var _a3;
|
|
1900
1927
|
$ZodCheck.init(inst, def);
|
|
1901
|
-
(
|
|
1928
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1902
1929
|
const val = payload.value;
|
|
1903
1930
|
return !nullish(val) && val.size !== void 0;
|
|
1904
1931
|
});
|
|
@@ -1924,9 +1951,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
1924
1951
|
};
|
|
1925
1952
|
});
|
|
1926
1953
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
1927
|
-
var
|
|
1954
|
+
var _a3;
|
|
1928
1955
|
$ZodCheck.init(inst, def);
|
|
1929
|
-
(
|
|
1956
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1930
1957
|
const val = payload.value;
|
|
1931
1958
|
return !nullish(val) && val.size !== void 0;
|
|
1932
1959
|
});
|
|
@@ -1952,9 +1979,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
1952
1979
|
};
|
|
1953
1980
|
});
|
|
1954
1981
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (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.size !== void 0;
|
|
1960
1987
|
});
|
|
@@ -1982,9 +2009,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
1982
2009
|
};
|
|
1983
2010
|
});
|
|
1984
2011
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1985
|
-
var
|
|
2012
|
+
var _a3;
|
|
1986
2013
|
$ZodCheck.init(inst, def);
|
|
1987
|
-
(
|
|
2014
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1988
2015
|
const val = payload.value;
|
|
1989
2016
|
return !nullish(val) && val.length !== void 0;
|
|
1990
2017
|
});
|
|
@@ -2011,9 +2038,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
2011
2038
|
};
|
|
2012
2039
|
});
|
|
2013
2040
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
2014
|
-
var
|
|
2041
|
+
var _a3;
|
|
2015
2042
|
$ZodCheck.init(inst, def);
|
|
2016
|
-
(
|
|
2043
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2017
2044
|
const val = payload.value;
|
|
2018
2045
|
return !nullish(val) && val.length !== void 0;
|
|
2019
2046
|
});
|
|
@@ -2040,9 +2067,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
2040
2067
|
};
|
|
2041
2068
|
});
|
|
2042
2069
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
2043
|
-
var
|
|
2070
|
+
var _a3;
|
|
2044
2071
|
$ZodCheck.init(inst, def);
|
|
2045
|
-
(
|
|
2072
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2046
2073
|
const val = payload.value;
|
|
2047
2074
|
return !nullish(val) && val.length !== void 0;
|
|
2048
2075
|
});
|
|
@@ -2071,7 +2098,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2071
2098
|
};
|
|
2072
2099
|
});
|
|
2073
2100
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2074
|
-
var
|
|
2101
|
+
var _a3, _b;
|
|
2075
2102
|
$ZodCheck.init(inst, def);
|
|
2076
2103
|
inst._zod.onattach.push((inst2) => {
|
|
2077
2104
|
const bag = inst2._zod.bag;
|
|
@@ -2082,7 +2109,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
2082
2109
|
}
|
|
2083
2110
|
});
|
|
2084
2111
|
if (def.pattern)
|
|
2085
|
-
(
|
|
2112
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
2086
2113
|
def.pattern.lastIndex = 0;
|
|
2087
2114
|
if (def.pattern.test(payload.value))
|
|
2088
2115
|
return;
|
|
@@ -2239,7 +2266,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
2239
2266
|
};
|
|
2240
2267
|
});
|
|
2241
2268
|
|
|
2242
|
-
// node_modules/.pnpm/zod@4.3
|
|
2269
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/doc.js
|
|
2243
2270
|
var Doc = class {
|
|
2244
2271
|
constructor(args = []) {
|
|
2245
2272
|
this.content = [];
|
|
@@ -2275,16 +2302,16 @@ var Doc = class {
|
|
|
2275
2302
|
}
|
|
2276
2303
|
};
|
|
2277
2304
|
|
|
2278
|
-
// node_modules/.pnpm/zod@4.3
|
|
2305
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.js
|
|
2279
2306
|
var version = {
|
|
2280
2307
|
major: 4,
|
|
2281
|
-
minor:
|
|
2282
|
-
patch:
|
|
2308
|
+
minor: 4,
|
|
2309
|
+
patch: 3
|
|
2283
2310
|
};
|
|
2284
2311
|
|
|
2285
|
-
// node_modules/.pnpm/zod@4.3
|
|
2312
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.js
|
|
2286
2313
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2287
|
-
var
|
|
2314
|
+
var _a3;
|
|
2288
2315
|
inst ?? (inst = {});
|
|
2289
2316
|
inst._zod.def = def;
|
|
2290
2317
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -2299,7 +2326,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2299
2326
|
}
|
|
2300
2327
|
}
|
|
2301
2328
|
if (checks.length === 0) {
|
|
2302
|
-
(
|
|
2329
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
2303
2330
|
inst._zod.deferred?.push(() => {
|
|
2304
2331
|
inst._zod.run = inst._zod.parse;
|
|
2305
2332
|
});
|
|
@@ -2309,6 +2336,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2309
2336
|
let asyncResult;
|
|
2310
2337
|
for (const ch of checks2) {
|
|
2311
2338
|
if (ch._zod.def.when) {
|
|
2339
|
+
if (explicitlyAborted(payload))
|
|
2340
|
+
continue;
|
|
2312
2341
|
const shouldRun = ch._zod.def.when(payload);
|
|
2313
2342
|
if (!shouldRun)
|
|
2314
2343
|
continue;
|
|
@@ -2449,6 +2478,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
2449
2478
|
inst._zod.check = (payload) => {
|
|
2450
2479
|
try {
|
|
2451
2480
|
const trimmed = payload.value.trim();
|
|
2481
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
2482
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
2483
|
+
payload.issues.push({
|
|
2484
|
+
code: "invalid_format",
|
|
2485
|
+
format: "url",
|
|
2486
|
+
note: "Invalid URL format",
|
|
2487
|
+
input: payload.value,
|
|
2488
|
+
inst,
|
|
2489
|
+
continue: !def.abort
|
|
2490
|
+
});
|
|
2491
|
+
return;
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2452
2494
|
const url2 = new URL(trimmed);
|
|
2453
2495
|
if (def.hostname) {
|
|
2454
2496
|
def.hostname.lastIndex = 0;
|
|
@@ -2602,6 +2644,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
|
2602
2644
|
function isValidBase64(data) {
|
|
2603
2645
|
if (data === "")
|
|
2604
2646
|
return true;
|
|
2647
|
+
if (/\s/.test(data))
|
|
2648
|
+
return false;
|
|
2605
2649
|
if (data.length % 4 !== 0)
|
|
2606
2650
|
return false;
|
|
2607
2651
|
try {
|
|
@@ -2794,8 +2838,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
|
|
|
2794
2838
|
$ZodType.init(inst, def);
|
|
2795
2839
|
inst._zod.pattern = _undefined;
|
|
2796
2840
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
2797
|
-
inst._zod.optin = "optional";
|
|
2798
|
-
inst._zod.optout = "optional";
|
|
2799
2841
|
inst._zod.parse = (payload, _ctx) => {
|
|
2800
2842
|
const input = payload.value;
|
|
2801
2843
|
if (typeof input === "undefined")
|
|
@@ -2924,15 +2966,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
2924
2966
|
return payload;
|
|
2925
2967
|
};
|
|
2926
2968
|
});
|
|
2927
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
2969
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
2970
|
+
const isPresent = key in input;
|
|
2928
2971
|
if (result.issues.length) {
|
|
2929
|
-
if (isOptionalOut && !
|
|
2972
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
2930
2973
|
return;
|
|
2931
2974
|
}
|
|
2932
2975
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
2933
2976
|
}
|
|
2977
|
+
if (!isPresent && !isOptionalIn) {
|
|
2978
|
+
if (!result.issues.length) {
|
|
2979
|
+
final.issues.push({
|
|
2980
|
+
code: "invalid_type",
|
|
2981
|
+
expected: "nonoptional",
|
|
2982
|
+
input: void 0,
|
|
2983
|
+
path: [key]
|
|
2984
|
+
});
|
|
2985
|
+
}
|
|
2986
|
+
return;
|
|
2987
|
+
}
|
|
2934
2988
|
if (result.value === void 0) {
|
|
2935
|
-
if (
|
|
2989
|
+
if (isPresent) {
|
|
2936
2990
|
final.value[key] = void 0;
|
|
2937
2991
|
}
|
|
2938
2992
|
} else {
|
|
@@ -2960,8 +3014,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
2960
3014
|
const keySet = def.keySet;
|
|
2961
3015
|
const _catchall = def.catchall._zod;
|
|
2962
3016
|
const t = _catchall.def.type;
|
|
3017
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
2963
3018
|
const isOptionalOut = _catchall.optout === "optional";
|
|
2964
3019
|
for (const key in input) {
|
|
3020
|
+
if (key === "__proto__")
|
|
3021
|
+
continue;
|
|
2965
3022
|
if (keySet.has(key))
|
|
2966
3023
|
continue;
|
|
2967
3024
|
if (t === "never") {
|
|
@@ -2970,9 +3027,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
2970
3027
|
}
|
|
2971
3028
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
2972
3029
|
if (r instanceof Promise) {
|
|
2973
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3030
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
2974
3031
|
} else {
|
|
2975
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3032
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
2976
3033
|
}
|
|
2977
3034
|
}
|
|
2978
3035
|
if (unrecognized.length) {
|
|
@@ -3038,12 +3095,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3038
3095
|
const shape = value.shape;
|
|
3039
3096
|
for (const key of value.keys) {
|
|
3040
3097
|
const el = shape[key];
|
|
3098
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
3041
3099
|
const isOptionalOut = el._zod.optout === "optional";
|
|
3042
3100
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3043
3101
|
if (r instanceof Promise) {
|
|
3044
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3102
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
3045
3103
|
} else {
|
|
3046
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3104
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
3047
3105
|
}
|
|
3048
3106
|
}
|
|
3049
3107
|
if (!catchall) {
|
|
@@ -3074,9 +3132,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3074
3132
|
const id = ids[key];
|
|
3075
3133
|
const k = esc(key);
|
|
3076
3134
|
const schema = shape[key];
|
|
3135
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
3077
3136
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
3078
3137
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
3079
|
-
if (isOptionalOut) {
|
|
3138
|
+
if (isOptionalIn && isOptionalOut) {
|
|
3080
3139
|
doc.write(`
|
|
3081
3140
|
if (${id}.issues.length) {
|
|
3082
3141
|
if (${k} in input) {
|
|
@@ -3095,6 +3154,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3095
3154
|
newResult[${k}] = ${id}.value;
|
|
3096
3155
|
}
|
|
3097
3156
|
|
|
3157
|
+
`);
|
|
3158
|
+
} else if (!isOptionalIn) {
|
|
3159
|
+
doc.write(`
|
|
3160
|
+
const ${id}_present = ${k} in input;
|
|
3161
|
+
if (${id}.issues.length) {
|
|
3162
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
3163
|
+
...iss,
|
|
3164
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
3165
|
+
})));
|
|
3166
|
+
}
|
|
3167
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
3168
|
+
payload.issues.push({
|
|
3169
|
+
code: "invalid_type",
|
|
3170
|
+
expected: "nonoptional",
|
|
3171
|
+
input: undefined,
|
|
3172
|
+
path: [${k}]
|
|
3173
|
+
});
|
|
3174
|
+
}
|
|
3175
|
+
|
|
3176
|
+
if (${id}_present) {
|
|
3177
|
+
if (${id}.value === undefined) {
|
|
3178
|
+
newResult[${k}] = undefined;
|
|
3179
|
+
} else {
|
|
3180
|
+
newResult[${k}] = ${id}.value;
|
|
3181
|
+
}
|
|
3182
|
+
}
|
|
3183
|
+
|
|
3098
3184
|
`);
|
|
3099
3185
|
} else {
|
|
3100
3186
|
doc.write(`
|
|
@@ -3188,10 +3274,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
3188
3274
|
}
|
|
3189
3275
|
return void 0;
|
|
3190
3276
|
});
|
|
3191
|
-
const
|
|
3192
|
-
const first = def.options[0]._zod.run;
|
|
3277
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3193
3278
|
inst._zod.parse = (payload, ctx) => {
|
|
3194
|
-
if (
|
|
3279
|
+
if (first) {
|
|
3195
3280
|
return first(payload, ctx);
|
|
3196
3281
|
}
|
|
3197
3282
|
let async = false;
|
|
@@ -3244,10 +3329,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
|
|
|
3244
3329
|
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
3245
3330
|
$ZodUnion.init(inst, def);
|
|
3246
3331
|
def.inclusive = false;
|
|
3247
|
-
const
|
|
3248
|
-
const first = def.options[0]._zod.run;
|
|
3332
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3249
3333
|
inst._zod.parse = (payload, ctx) => {
|
|
3250
|
-
if (
|
|
3334
|
+
if (first) {
|
|
3251
3335
|
return first(payload, ctx);
|
|
3252
3336
|
}
|
|
3253
3337
|
let async = false;
|
|
@@ -3322,7 +3406,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3322
3406
|
if (opt) {
|
|
3323
3407
|
return opt._zod.run(payload, ctx);
|
|
3324
3408
|
}
|
|
3325
|
-
if (def.unionFallback) {
|
|
3409
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
3326
3410
|
return _super(payload, ctx);
|
|
3327
3411
|
}
|
|
3328
3412
|
payload.issues.push({
|
|
@@ -3330,6 +3414,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3330
3414
|
errors: [],
|
|
3331
3415
|
note: "No matching discriminator",
|
|
3332
3416
|
discriminator: def.discriminator,
|
|
3417
|
+
options: Array.from(disc.value.keys()),
|
|
3333
3418
|
input,
|
|
3334
3419
|
path: [def.discriminator],
|
|
3335
3420
|
inst
|
|
@@ -3451,64 +3536,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3451
3536
|
}
|
|
3452
3537
|
payload.value = [];
|
|
3453
3538
|
const proms = [];
|
|
3454
|
-
const
|
|
3455
|
-
const
|
|
3539
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
3540
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
3456
3541
|
if (!def.rest) {
|
|
3457
|
-
|
|
3458
|
-
const tooSmall = input.length < optStart - 1;
|
|
3459
|
-
if (tooBig || tooSmall) {
|
|
3542
|
+
if (input.length < optinStart) {
|
|
3460
3543
|
payload.issues.push({
|
|
3461
|
-
|
|
3544
|
+
code: "too_small",
|
|
3545
|
+
minimum: optinStart,
|
|
3546
|
+
inclusive: true,
|
|
3462
3547
|
input,
|
|
3463
3548
|
inst,
|
|
3464
3549
|
origin: "array"
|
|
3465
3550
|
});
|
|
3466
3551
|
return payload;
|
|
3467
3552
|
}
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3553
|
+
if (input.length > items.length) {
|
|
3554
|
+
payload.issues.push({
|
|
3555
|
+
code: "too_big",
|
|
3556
|
+
maximum: items.length,
|
|
3557
|
+
inclusive: true,
|
|
3558
|
+
input,
|
|
3559
|
+
inst,
|
|
3560
|
+
origin: "array"
|
|
3561
|
+
});
|
|
3475
3562
|
}
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
}, ctx);
|
|
3480
|
-
if (
|
|
3481
|
-
proms.push(
|
|
3563
|
+
}
|
|
3564
|
+
const itemResults = new Array(items.length);
|
|
3565
|
+
for (let i = 0; i < items.length; i++) {
|
|
3566
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
3567
|
+
if (r instanceof Promise) {
|
|
3568
|
+
proms.push(r.then((rr) => {
|
|
3569
|
+
itemResults[i] = rr;
|
|
3570
|
+
}));
|
|
3482
3571
|
} else {
|
|
3483
|
-
|
|
3572
|
+
itemResults[i] = r;
|
|
3484
3573
|
}
|
|
3485
3574
|
}
|
|
3486
3575
|
if (def.rest) {
|
|
3576
|
+
let i = items.length - 1;
|
|
3487
3577
|
const rest = input.slice(items.length);
|
|
3488
3578
|
for (const el of rest) {
|
|
3489
3579
|
i++;
|
|
3490
|
-
const result = def.rest._zod.run({
|
|
3491
|
-
value: el,
|
|
3492
|
-
issues: []
|
|
3493
|
-
}, ctx);
|
|
3580
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
3494
3581
|
if (result instanceof Promise) {
|
|
3495
|
-
proms.push(result.then((
|
|
3582
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
3496
3583
|
} else {
|
|
3497
3584
|
handleTupleResult(result, payload, i);
|
|
3498
3585
|
}
|
|
3499
3586
|
}
|
|
3500
3587
|
}
|
|
3501
|
-
if (proms.length)
|
|
3502
|
-
return Promise.all(proms).then(() => payload);
|
|
3503
|
-
|
|
3588
|
+
if (proms.length) {
|
|
3589
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
3590
|
+
}
|
|
3591
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
3504
3592
|
};
|
|
3505
3593
|
});
|
|
3594
|
+
function getTupleOptStart(items, key) {
|
|
3595
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
3596
|
+
if (items[i]._zod[key] !== "optional")
|
|
3597
|
+
return i + 1;
|
|
3598
|
+
}
|
|
3599
|
+
return 0;
|
|
3600
|
+
}
|
|
3506
3601
|
function handleTupleResult(result, final, index) {
|
|
3507
3602
|
if (result.issues.length) {
|
|
3508
3603
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
3509
3604
|
}
|
|
3510
3605
|
final.value[index] = result.value;
|
|
3511
3606
|
}
|
|
3607
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
3608
|
+
for (let i = 0; i < items.length; i++) {
|
|
3609
|
+
const r = itemResults[i];
|
|
3610
|
+
const isPresent = i < input.length;
|
|
3611
|
+
if (r.issues.length) {
|
|
3612
|
+
if (!isPresent && i >= optoutStart) {
|
|
3613
|
+
final.value.length = i;
|
|
3614
|
+
break;
|
|
3615
|
+
}
|
|
3616
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
3617
|
+
}
|
|
3618
|
+
final.value[i] = r.value;
|
|
3619
|
+
}
|
|
3620
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
3621
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
3622
|
+
final.value.length = i;
|
|
3623
|
+
} else {
|
|
3624
|
+
break;
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3627
|
+
return final;
|
|
3628
|
+
}
|
|
3512
3629
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
3513
3630
|
$ZodType.init(inst, def);
|
|
3514
3631
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3530,19 +3647,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3530
3647
|
for (const key of values) {
|
|
3531
3648
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
3532
3649
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
3650
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
3651
|
+
if (keyResult instanceof Promise) {
|
|
3652
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
3653
|
+
}
|
|
3654
|
+
if (keyResult.issues.length) {
|
|
3655
|
+
payload.issues.push({
|
|
3656
|
+
code: "invalid_key",
|
|
3657
|
+
origin: "record",
|
|
3658
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
3659
|
+
input: key,
|
|
3660
|
+
path: [key],
|
|
3661
|
+
inst
|
|
3662
|
+
});
|
|
3663
|
+
continue;
|
|
3664
|
+
}
|
|
3665
|
+
const outKey = keyResult.value;
|
|
3533
3666
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3534
3667
|
if (result instanceof Promise) {
|
|
3535
3668
|
proms.push(result.then((result2) => {
|
|
3536
3669
|
if (result2.issues.length) {
|
|
3537
3670
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
3538
3671
|
}
|
|
3539
|
-
payload.value[
|
|
3672
|
+
payload.value[outKey] = result2.value;
|
|
3540
3673
|
}));
|
|
3541
3674
|
} else {
|
|
3542
3675
|
if (result.issues.length) {
|
|
3543
3676
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
3544
3677
|
}
|
|
3545
|
-
payload.value[
|
|
3678
|
+
payload.value[outKey] = result.value;
|
|
3546
3679
|
}
|
|
3547
3680
|
}
|
|
3548
3681
|
}
|
|
@@ -3566,6 +3699,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3566
3699
|
for (const key of Reflect.ownKeys(input)) {
|
|
3567
3700
|
if (key === "__proto__")
|
|
3568
3701
|
continue;
|
|
3702
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
3703
|
+
continue;
|
|
3569
3704
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
3570
3705
|
if (keyResult instanceof Promise) {
|
|
3571
3706
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -3770,6 +3905,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
|
|
|
3770
3905
|
});
|
|
3771
3906
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
3772
3907
|
$ZodType.init(inst, def);
|
|
3908
|
+
inst._zod.optin = "optional";
|
|
3773
3909
|
inst._zod.parse = (payload, ctx) => {
|
|
3774
3910
|
if (ctx.direction === "backward") {
|
|
3775
3911
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -3779,6 +3915,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
3779
3915
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
3780
3916
|
return output.then((output2) => {
|
|
3781
3917
|
payload.value = output2;
|
|
3918
|
+
payload.fallback = true;
|
|
3782
3919
|
return payload;
|
|
3783
3920
|
});
|
|
3784
3921
|
}
|
|
@@ -3786,11 +3923,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
3786
3923
|
throw new $ZodAsyncError();
|
|
3787
3924
|
}
|
|
3788
3925
|
payload.value = _out;
|
|
3926
|
+
payload.fallback = true;
|
|
3789
3927
|
return payload;
|
|
3790
3928
|
};
|
|
3791
3929
|
});
|
|
3792
3930
|
function handleOptionalResult(result, input) {
|
|
3793
|
-
if (result.issues.length
|
|
3931
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
3794
3932
|
return { issues: [], value: void 0 };
|
|
3795
3933
|
}
|
|
3796
3934
|
return result;
|
|
@@ -3808,10 +3946,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
|
3808
3946
|
});
|
|
3809
3947
|
inst._zod.parse = (payload, ctx) => {
|
|
3810
3948
|
if (def.innerType._zod.optin === "optional") {
|
|
3949
|
+
const input = payload.value;
|
|
3811
3950
|
const result = def.innerType._zod.run(payload, ctx);
|
|
3812
3951
|
if (result instanceof Promise)
|
|
3813
|
-
return result.then((r) => handleOptionalResult(r,
|
|
3814
|
-
return handleOptionalResult(result,
|
|
3952
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
3953
|
+
return handleOptionalResult(result, input);
|
|
3815
3954
|
}
|
|
3816
3955
|
if (payload.value === void 0) {
|
|
3817
3956
|
return payload;
|
|
@@ -3927,7 +4066,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
|
3927
4066
|
});
|
|
3928
4067
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
3929
4068
|
$ZodType.init(inst, def);
|
|
3930
|
-
|
|
4069
|
+
inst._zod.optin = "optional";
|
|
3931
4070
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
3932
4071
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3933
4072
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3947,6 +4086,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
3947
4086
|
input: payload.value
|
|
3948
4087
|
});
|
|
3949
4088
|
payload.issues = [];
|
|
4089
|
+
payload.fallback = true;
|
|
3950
4090
|
}
|
|
3951
4091
|
return payload;
|
|
3952
4092
|
});
|
|
@@ -3961,6 +4101,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
3961
4101
|
input: payload.value
|
|
3962
4102
|
});
|
|
3963
4103
|
payload.issues = [];
|
|
4104
|
+
payload.fallback = true;
|
|
3964
4105
|
}
|
|
3965
4106
|
return payload;
|
|
3966
4107
|
};
|
|
@@ -4006,7 +4147,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
4006
4147
|
left.aborted = true;
|
|
4007
4148
|
return left;
|
|
4008
4149
|
}
|
|
4009
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
4150
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
4010
4151
|
}
|
|
4011
4152
|
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
4012
4153
|
$ZodType.init(inst, def);
|
|
@@ -4058,6 +4199,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
|
|
|
4058
4199
|
}
|
|
4059
4200
|
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
4060
4201
|
}
|
|
4202
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
4203
|
+
$ZodPipe.init(inst, def);
|
|
4204
|
+
});
|
|
4061
4205
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
4062
4206
|
$ZodType.init(inst, def);
|
|
4063
4207
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -4209,7 +4353,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
|
|
|
4209
4353
|
});
|
|
4210
4354
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
4211
4355
|
$ZodType.init(inst, def);
|
|
4212
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
4356
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
4357
|
+
const d = def;
|
|
4358
|
+
if (!d._cachedInner)
|
|
4359
|
+
d._cachedInner = def.getter();
|
|
4360
|
+
return d._cachedInner;
|
|
4361
|
+
});
|
|
4213
4362
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
4214
4363
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
4215
4364
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -4253,7 +4402,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
4253
4402
|
}
|
|
4254
4403
|
}
|
|
4255
4404
|
|
|
4256
|
-
// node_modules/.pnpm/zod@4.3
|
|
4405
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/index.js
|
|
4257
4406
|
var locales_exports = {};
|
|
4258
4407
|
__export(locales_exports, {
|
|
4259
4408
|
ar: () => ar_default,
|
|
@@ -4264,6 +4413,7 @@ __export(locales_exports, {
|
|
|
4264
4413
|
cs: () => cs_default,
|
|
4265
4414
|
da: () => da_default,
|
|
4266
4415
|
de: () => de_default,
|
|
4416
|
+
el: () => el_default,
|
|
4267
4417
|
en: () => en_default,
|
|
4268
4418
|
eo: () => eo_default,
|
|
4269
4419
|
es: () => es_default,
|
|
@@ -4272,6 +4422,7 @@ __export(locales_exports, {
|
|
|
4272
4422
|
fr: () => fr_default,
|
|
4273
4423
|
frCA: () => fr_CA_default,
|
|
4274
4424
|
he: () => he_default,
|
|
4425
|
+
hr: () => hr_default,
|
|
4275
4426
|
hu: () => hu_default,
|
|
4276
4427
|
hy: () => hy_default,
|
|
4277
4428
|
id: () => id_default,
|
|
@@ -4291,6 +4442,7 @@ __export(locales_exports, {
|
|
|
4291
4442
|
pl: () => pl_default,
|
|
4292
4443
|
ps: () => ps_default,
|
|
4293
4444
|
pt: () => pt_default,
|
|
4445
|
+
ro: () => ro_default,
|
|
4294
4446
|
ru: () => ru_default,
|
|
4295
4447
|
sl: () => sl_default,
|
|
4296
4448
|
sv: () => sv_default,
|
|
@@ -4307,7 +4459,7 @@ __export(locales_exports, {
|
|
|
4307
4459
|
zhTW: () => zh_TW_default
|
|
4308
4460
|
});
|
|
4309
4461
|
|
|
4310
|
-
// node_modules/.pnpm/zod@4.3
|
|
4462
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ar.js
|
|
4311
4463
|
var error = () => {
|
|
4312
4464
|
const Sizable = {
|
|
4313
4465
|
string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
|
|
@@ -4414,7 +4566,7 @@ function ar_default() {
|
|
|
4414
4566
|
};
|
|
4415
4567
|
}
|
|
4416
4568
|
|
|
4417
|
-
// node_modules/.pnpm/zod@4.3
|
|
4569
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/az.js
|
|
4418
4570
|
var error2 = () => {
|
|
4419
4571
|
const Sizable = {
|
|
4420
4572
|
string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
|
|
@@ -4520,7 +4672,7 @@ function az_default() {
|
|
|
4520
4672
|
};
|
|
4521
4673
|
}
|
|
4522
4674
|
|
|
4523
|
-
// node_modules/.pnpm/zod@4.3
|
|
4675
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/be.js
|
|
4524
4676
|
function getBelarusianPlural(count, one, few, many) {
|
|
4525
4677
|
const absCount = Math.abs(count);
|
|
4526
4678
|
const lastDigit = absCount % 10;
|
|
@@ -4677,7 +4829,7 @@ function be_default() {
|
|
|
4677
4829
|
};
|
|
4678
4830
|
}
|
|
4679
4831
|
|
|
4680
|
-
// node_modules/.pnpm/zod@4.3
|
|
4832
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/bg.js
|
|
4681
4833
|
var error4 = () => {
|
|
4682
4834
|
const Sizable = {
|
|
4683
4835
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
|
|
@@ -4798,7 +4950,7 @@ function bg_default() {
|
|
|
4798
4950
|
};
|
|
4799
4951
|
}
|
|
4800
4952
|
|
|
4801
|
-
// node_modules/.pnpm/zod@4.3
|
|
4953
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ca.js
|
|
4802
4954
|
var error5 = () => {
|
|
4803
4955
|
const Sizable = {
|
|
4804
4956
|
string: { unit: "car\xE0cters", verb: "contenir" },
|
|
@@ -4907,7 +5059,7 @@ function ca_default() {
|
|
|
4907
5059
|
};
|
|
4908
5060
|
}
|
|
4909
5061
|
|
|
4910
|
-
// node_modules/.pnpm/zod@4.3
|
|
5062
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/cs.js
|
|
4911
5063
|
var error6 = () => {
|
|
4912
5064
|
const Sizable = {
|
|
4913
5065
|
string: { unit: "znak\u016F", verb: "m\xEDt" },
|
|
@@ -5019,7 +5171,7 @@ function cs_default() {
|
|
|
5019
5171
|
};
|
|
5020
5172
|
}
|
|
5021
5173
|
|
|
5022
|
-
// node_modules/.pnpm/zod@4.3
|
|
5174
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/da.js
|
|
5023
5175
|
var error7 = () => {
|
|
5024
5176
|
const Sizable = {
|
|
5025
5177
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -5135,7 +5287,7 @@ function da_default() {
|
|
|
5135
5287
|
};
|
|
5136
5288
|
}
|
|
5137
5289
|
|
|
5138
|
-
// node_modules/.pnpm/zod@4.3
|
|
5290
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/de.js
|
|
5139
5291
|
var error8 = () => {
|
|
5140
5292
|
const Sizable = {
|
|
5141
5293
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -5244,8 +5396,118 @@ function de_default() {
|
|
|
5244
5396
|
};
|
|
5245
5397
|
}
|
|
5246
5398
|
|
|
5247
|
-
// node_modules/.pnpm/zod@4.3
|
|
5399
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/el.js
|
|
5248
5400
|
var error9 = () => {
|
|
5401
|
+
const Sizable = {
|
|
5402
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5403
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5404
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5405
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5406
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
5407
|
+
};
|
|
5408
|
+
function getSizing(origin) {
|
|
5409
|
+
return Sizable[origin] ?? null;
|
|
5410
|
+
}
|
|
5411
|
+
const FormatDictionary = {
|
|
5412
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
5413
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
5414
|
+
url: "URL",
|
|
5415
|
+
emoji: "emoji",
|
|
5416
|
+
uuid: "UUID",
|
|
5417
|
+
uuidv4: "UUIDv4",
|
|
5418
|
+
uuidv6: "UUIDv6",
|
|
5419
|
+
nanoid: "nanoid",
|
|
5420
|
+
guid: "GUID",
|
|
5421
|
+
cuid: "cuid",
|
|
5422
|
+
cuid2: "cuid2",
|
|
5423
|
+
ulid: "ULID",
|
|
5424
|
+
xid: "XID",
|
|
5425
|
+
ksuid: "KSUID",
|
|
5426
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
5427
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
5428
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
5429
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
5430
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
5431
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
5432
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
5433
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
5434
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
5435
|
+
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",
|
|
5436
|
+
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",
|
|
5437
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
5438
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
5439
|
+
jwt: "JWT",
|
|
5440
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
5441
|
+
};
|
|
5442
|
+
const TypeDictionary = {
|
|
5443
|
+
nan: "NaN"
|
|
5444
|
+
};
|
|
5445
|
+
return (issue2) => {
|
|
5446
|
+
switch (issue2.code) {
|
|
5447
|
+
case "invalid_type": {
|
|
5448
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
5449
|
+
const receivedType = parsedType(issue2.input);
|
|
5450
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
5451
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
5452
|
+
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}`;
|
|
5453
|
+
}
|
|
5454
|
+
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}`;
|
|
5455
|
+
}
|
|
5456
|
+
case "invalid_value":
|
|
5457
|
+
if (issue2.values.length === 1)
|
|
5458
|
+
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])}`;
|
|
5459
|
+
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, "|")}`;
|
|
5460
|
+
case "too_big": {
|
|
5461
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
5462
|
+
const sizing = getSizing(issue2.origin);
|
|
5463
|
+
if (sizing)
|
|
5464
|
+
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"}`;
|
|
5465
|
+
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()}`;
|
|
5466
|
+
}
|
|
5467
|
+
case "too_small": {
|
|
5468
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
5469
|
+
const sizing = getSizing(issue2.origin);
|
|
5470
|
+
if (sizing) {
|
|
5471
|
+
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}`;
|
|
5472
|
+
}
|
|
5473
|
+
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()}`;
|
|
5474
|
+
}
|
|
5475
|
+
case "invalid_format": {
|
|
5476
|
+
const _issue = issue2;
|
|
5477
|
+
if (_issue.format === "starts_with") {
|
|
5478
|
+
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}"`;
|
|
5479
|
+
}
|
|
5480
|
+
if (_issue.format === "ends_with")
|
|
5481
|
+
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}"`;
|
|
5482
|
+
if (_issue.format === "includes")
|
|
5483
|
+
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}"`;
|
|
5484
|
+
if (_issue.format === "regex")
|
|
5485
|
+
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}`;
|
|
5486
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
5487
|
+
}
|
|
5488
|
+
case "not_multiple_of":
|
|
5489
|
+
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}`;
|
|
5490
|
+
case "unrecognized_keys":
|
|
5491
|
+
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, ", ")}`;
|
|
5492
|
+
case "invalid_key":
|
|
5493
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
5494
|
+
case "invalid_union":
|
|
5495
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
5496
|
+
case "invalid_element":
|
|
5497
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
5498
|
+
default:
|
|
5499
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
5500
|
+
}
|
|
5501
|
+
};
|
|
5502
|
+
};
|
|
5503
|
+
function el_default() {
|
|
5504
|
+
return {
|
|
5505
|
+
localeError: error9()
|
|
5506
|
+
};
|
|
5507
|
+
}
|
|
5508
|
+
|
|
5509
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/en.js
|
|
5510
|
+
var error10 = () => {
|
|
5249
5511
|
const Sizable = {
|
|
5250
5512
|
string: { unit: "characters", verb: "to have" },
|
|
5251
5513
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -5339,6 +5601,10 @@ var error9 = () => {
|
|
|
5339
5601
|
case "invalid_key":
|
|
5340
5602
|
return `Invalid key in ${issue2.origin}`;
|
|
5341
5603
|
case "invalid_union":
|
|
5604
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
5605
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
5606
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
5607
|
+
}
|
|
5342
5608
|
return "Invalid input";
|
|
5343
5609
|
case "invalid_element":
|
|
5344
5610
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -5349,12 +5615,12 @@ var error9 = () => {
|
|
|
5349
5615
|
};
|
|
5350
5616
|
function en_default() {
|
|
5351
5617
|
return {
|
|
5352
|
-
localeError:
|
|
5618
|
+
localeError: error10()
|
|
5353
5619
|
};
|
|
5354
5620
|
}
|
|
5355
5621
|
|
|
5356
|
-
// node_modules/.pnpm/zod@4.3
|
|
5357
|
-
var
|
|
5622
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/eo.js
|
|
5623
|
+
var error11 = () => {
|
|
5358
5624
|
const Sizable = {
|
|
5359
5625
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
5360
5626
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -5459,12 +5725,12 @@ var error10 = () => {
|
|
|
5459
5725
|
};
|
|
5460
5726
|
function eo_default() {
|
|
5461
5727
|
return {
|
|
5462
|
-
localeError:
|
|
5728
|
+
localeError: error11()
|
|
5463
5729
|
};
|
|
5464
5730
|
}
|
|
5465
5731
|
|
|
5466
|
-
// node_modules/.pnpm/zod@4.3
|
|
5467
|
-
var
|
|
5732
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/es.js
|
|
5733
|
+
var error12 = () => {
|
|
5468
5734
|
const Sizable = {
|
|
5469
5735
|
string: { unit: "caracteres", verb: "tener" },
|
|
5470
5736
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -5592,12 +5858,12 @@ var error11 = () => {
|
|
|
5592
5858
|
};
|
|
5593
5859
|
function es_default() {
|
|
5594
5860
|
return {
|
|
5595
|
-
localeError:
|
|
5861
|
+
localeError: error12()
|
|
5596
5862
|
};
|
|
5597
5863
|
}
|
|
5598
5864
|
|
|
5599
|
-
// node_modules/.pnpm/zod@4.3
|
|
5600
|
-
var
|
|
5865
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fa.js
|
|
5866
|
+
var error13 = () => {
|
|
5601
5867
|
const Sizable = {
|
|
5602
5868
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
5603
5869
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -5707,12 +5973,12 @@ var error12 = () => {
|
|
|
5707
5973
|
};
|
|
5708
5974
|
function fa_default() {
|
|
5709
5975
|
return {
|
|
5710
|
-
localeError:
|
|
5976
|
+
localeError: error13()
|
|
5711
5977
|
};
|
|
5712
5978
|
}
|
|
5713
5979
|
|
|
5714
|
-
// node_modules/.pnpm/zod@4.3
|
|
5715
|
-
var
|
|
5980
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fi.js
|
|
5981
|
+
var error14 = () => {
|
|
5716
5982
|
const Sizable = {
|
|
5717
5983
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
5718
5984
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -5820,12 +6086,12 @@ var error13 = () => {
|
|
|
5820
6086
|
};
|
|
5821
6087
|
function fi_default() {
|
|
5822
6088
|
return {
|
|
5823
|
-
localeError:
|
|
6089
|
+
localeError: error14()
|
|
5824
6090
|
};
|
|
5825
6091
|
}
|
|
5826
6092
|
|
|
5827
|
-
// node_modules/.pnpm/zod@4.3
|
|
5828
|
-
var
|
|
6093
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr.js
|
|
6094
|
+
var error15 = () => {
|
|
5829
6095
|
const Sizable = {
|
|
5830
6096
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
5831
6097
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -5866,9 +6132,27 @@ var error14 = () => {
|
|
|
5866
6132
|
template_literal: "entr\xE9e"
|
|
5867
6133
|
};
|
|
5868
6134
|
const TypeDictionary = {
|
|
5869
|
-
|
|
6135
|
+
string: "cha\xEEne",
|
|
5870
6136
|
number: "nombre",
|
|
5871
|
-
|
|
6137
|
+
int: "entier",
|
|
6138
|
+
boolean: "bool\xE9en",
|
|
6139
|
+
bigint: "grand entier",
|
|
6140
|
+
symbol: "symbole",
|
|
6141
|
+
undefined: "ind\xE9fini",
|
|
6142
|
+
null: "null",
|
|
6143
|
+
never: "jamais",
|
|
6144
|
+
void: "vide",
|
|
6145
|
+
date: "date",
|
|
6146
|
+
array: "tableau",
|
|
6147
|
+
object: "objet",
|
|
6148
|
+
tuple: "tuple",
|
|
6149
|
+
record: "enregistrement",
|
|
6150
|
+
map: "carte",
|
|
6151
|
+
set: "ensemble",
|
|
6152
|
+
file: "fichier",
|
|
6153
|
+
nonoptional: "non-optionnel",
|
|
6154
|
+
nan: "NaN",
|
|
6155
|
+
function: "fonction"
|
|
5872
6156
|
};
|
|
5873
6157
|
return (issue2) => {
|
|
5874
6158
|
switch (issue2.code) {
|
|
@@ -5889,16 +6173,15 @@ var error14 = () => {
|
|
|
5889
6173
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
5890
6174
|
const sizing = getSizing(issue2.origin);
|
|
5891
6175
|
if (sizing)
|
|
5892
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
5893
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
6176
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
6177
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
5894
6178
|
}
|
|
5895
6179
|
case "too_small": {
|
|
5896
6180
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
5897
6181
|
const sizing = getSizing(issue2.origin);
|
|
5898
|
-
if (sizing)
|
|
5899
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
5900
|
-
}
|
|
5901
|
-
return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
6182
|
+
if (sizing)
|
|
6183
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6184
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
5902
6185
|
}
|
|
5903
6186
|
case "invalid_format": {
|
|
5904
6187
|
const _issue = issue2;
|
|
@@ -5929,12 +6212,12 @@ var error14 = () => {
|
|
|
5929
6212
|
};
|
|
5930
6213
|
function fr_default() {
|
|
5931
6214
|
return {
|
|
5932
|
-
localeError:
|
|
6215
|
+
localeError: error15()
|
|
5933
6216
|
};
|
|
5934
6217
|
}
|
|
5935
6218
|
|
|
5936
|
-
// node_modules/.pnpm/zod@4.3
|
|
5937
|
-
var
|
|
6219
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/fr-CA.js
|
|
6220
|
+
var error16 = () => {
|
|
5938
6221
|
const Sizable = {
|
|
5939
6222
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
5940
6223
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -6037,12 +6320,12 @@ var error15 = () => {
|
|
|
6037
6320
|
};
|
|
6038
6321
|
function fr_CA_default() {
|
|
6039
6322
|
return {
|
|
6040
|
-
localeError:
|
|
6323
|
+
localeError: error16()
|
|
6041
6324
|
};
|
|
6042
6325
|
}
|
|
6043
6326
|
|
|
6044
|
-
// node_modules/.pnpm/zod@4.3
|
|
6045
|
-
var
|
|
6327
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/he.js
|
|
6328
|
+
var error17 = () => {
|
|
6046
6329
|
const TypeNames = {
|
|
6047
6330
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
6048
6331
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -6232,24 +6515,24 @@ var error16 = () => {
|
|
|
6232
6515
|
};
|
|
6233
6516
|
function he_default() {
|
|
6234
6517
|
return {
|
|
6235
|
-
localeError:
|
|
6518
|
+
localeError: error17()
|
|
6236
6519
|
};
|
|
6237
6520
|
}
|
|
6238
6521
|
|
|
6239
|
-
// node_modules/.pnpm/zod@4.3
|
|
6240
|
-
var
|
|
6522
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hr.js
|
|
6523
|
+
var error18 = () => {
|
|
6241
6524
|
const Sizable = {
|
|
6242
|
-
string: { unit: "
|
|
6243
|
-
file: { unit: "
|
|
6244
|
-
array: { unit: "
|
|
6245
|
-
set: { unit: "
|
|
6525
|
+
string: { unit: "znakova", verb: "imati" },
|
|
6526
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
6527
|
+
array: { unit: "stavki", verb: "imati" },
|
|
6528
|
+
set: { unit: "stavki", verb: "imati" }
|
|
6246
6529
|
};
|
|
6247
6530
|
function getSizing(origin) {
|
|
6248
6531
|
return Sizable[origin] ?? null;
|
|
6249
6532
|
}
|
|
6250
6533
|
const FormatDictionary = {
|
|
6251
|
-
regex: "
|
|
6252
|
-
email: "email
|
|
6534
|
+
regex: "unos",
|
|
6535
|
+
email: "email adresa",
|
|
6253
6536
|
url: "URL",
|
|
6254
6537
|
emoji: "emoji",
|
|
6255
6538
|
uuid: "UUID",
|
|
@@ -6262,25 +6545,37 @@ var error17 = () => {
|
|
|
6262
6545
|
ulid: "ULID",
|
|
6263
6546
|
xid: "XID",
|
|
6264
6547
|
ksuid: "KSUID",
|
|
6265
|
-
datetime: "ISO
|
|
6266
|
-
date: "ISO
|
|
6267
|
-
time: "ISO
|
|
6268
|
-
duration: "ISO
|
|
6269
|
-
ipv4: "IPv4
|
|
6270
|
-
ipv6: "IPv6
|
|
6271
|
-
cidrv4: "IPv4
|
|
6272
|
-
cidrv6: "IPv6
|
|
6273
|
-
base64: "base64
|
|
6274
|
-
base64url: "base64url
|
|
6275
|
-
json_string: "JSON
|
|
6276
|
-
e164: "E.164
|
|
6548
|
+
datetime: "ISO datum i vrijeme",
|
|
6549
|
+
date: "ISO datum",
|
|
6550
|
+
time: "ISO vrijeme",
|
|
6551
|
+
duration: "ISO trajanje",
|
|
6552
|
+
ipv4: "IPv4 adresa",
|
|
6553
|
+
ipv6: "IPv6 adresa",
|
|
6554
|
+
cidrv4: "IPv4 raspon",
|
|
6555
|
+
cidrv6: "IPv6 raspon",
|
|
6556
|
+
base64: "base64 kodirani tekst",
|
|
6557
|
+
base64url: "base64url kodirani tekst",
|
|
6558
|
+
json_string: "JSON tekst",
|
|
6559
|
+
e164: "E.164 broj",
|
|
6277
6560
|
jwt: "JWT",
|
|
6278
|
-
template_literal: "
|
|
6561
|
+
template_literal: "unos"
|
|
6279
6562
|
};
|
|
6280
6563
|
const TypeDictionary = {
|
|
6281
6564
|
nan: "NaN",
|
|
6282
|
-
|
|
6283
|
-
|
|
6565
|
+
string: "tekst",
|
|
6566
|
+
number: "broj",
|
|
6567
|
+
boolean: "boolean",
|
|
6568
|
+
array: "niz",
|
|
6569
|
+
object: "objekt",
|
|
6570
|
+
set: "skup",
|
|
6571
|
+
file: "datoteka",
|
|
6572
|
+
date: "datum",
|
|
6573
|
+
bigint: "bigint",
|
|
6574
|
+
symbol: "simbol",
|
|
6575
|
+
undefined: "undefined",
|
|
6576
|
+
null: "null",
|
|
6577
|
+
function: "funkcija",
|
|
6578
|
+
map: "mapa"
|
|
6284
6579
|
};
|
|
6285
6580
|
return (issue2) => {
|
|
6286
6581
|
switch (issue2.code) {
|
|
@@ -6289,28 +6584,139 @@ var error17 = () => {
|
|
|
6289
6584
|
const receivedType = parsedType(issue2.input);
|
|
6290
6585
|
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
6291
6586
|
if (/^[A-Z]/.test(issue2.expected)) {
|
|
6292
|
-
return
|
|
6587
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
6293
6588
|
}
|
|
6294
|
-
return
|
|
6589
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
6295
6590
|
}
|
|
6296
6591
|
case "invalid_value":
|
|
6297
6592
|
if (issue2.values.length === 1)
|
|
6298
|
-
return
|
|
6299
|
-
return
|
|
6593
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
6594
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
6300
6595
|
case "too_big": {
|
|
6301
6596
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
6302
6597
|
const sizing = getSizing(issue2.origin);
|
|
6598
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
6303
6599
|
if (sizing)
|
|
6304
|
-
return `
|
|
6305
|
-
return `
|
|
6600
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
6601
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
6306
6602
|
}
|
|
6307
6603
|
case "too_small": {
|
|
6308
6604
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
6309
6605
|
const sizing = getSizing(issue2.origin);
|
|
6606
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
6310
6607
|
if (sizing) {
|
|
6311
|
-
return `
|
|
6608
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6312
6609
|
}
|
|
6313
|
-
return `
|
|
6610
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
6611
|
+
}
|
|
6612
|
+
case "invalid_format": {
|
|
6613
|
+
const _issue = issue2;
|
|
6614
|
+
if (_issue.format === "starts_with")
|
|
6615
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
6616
|
+
if (_issue.format === "ends_with")
|
|
6617
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
6618
|
+
if (_issue.format === "includes")
|
|
6619
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
6620
|
+
if (_issue.format === "regex")
|
|
6621
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
6622
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6623
|
+
}
|
|
6624
|
+
case "not_multiple_of":
|
|
6625
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
6626
|
+
case "unrecognized_keys":
|
|
6627
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
6628
|
+
case "invalid_key":
|
|
6629
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
6630
|
+
case "invalid_union":
|
|
6631
|
+
return "Neispravan unos";
|
|
6632
|
+
case "invalid_element":
|
|
6633
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
6634
|
+
default:
|
|
6635
|
+
return `Neispravan unos`;
|
|
6636
|
+
}
|
|
6637
|
+
};
|
|
6638
|
+
};
|
|
6639
|
+
function hr_default() {
|
|
6640
|
+
return {
|
|
6641
|
+
localeError: error18()
|
|
6642
|
+
};
|
|
6643
|
+
}
|
|
6644
|
+
|
|
6645
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hu.js
|
|
6646
|
+
var error19 = () => {
|
|
6647
|
+
const Sizable = {
|
|
6648
|
+
string: { unit: "karakter", verb: "legyen" },
|
|
6649
|
+
file: { unit: "byte", verb: "legyen" },
|
|
6650
|
+
array: { unit: "elem", verb: "legyen" },
|
|
6651
|
+
set: { unit: "elem", verb: "legyen" }
|
|
6652
|
+
};
|
|
6653
|
+
function getSizing(origin) {
|
|
6654
|
+
return Sizable[origin] ?? null;
|
|
6655
|
+
}
|
|
6656
|
+
const FormatDictionary = {
|
|
6657
|
+
regex: "bemenet",
|
|
6658
|
+
email: "email c\xEDm",
|
|
6659
|
+
url: "URL",
|
|
6660
|
+
emoji: "emoji",
|
|
6661
|
+
uuid: "UUID",
|
|
6662
|
+
uuidv4: "UUIDv4",
|
|
6663
|
+
uuidv6: "UUIDv6",
|
|
6664
|
+
nanoid: "nanoid",
|
|
6665
|
+
guid: "GUID",
|
|
6666
|
+
cuid: "cuid",
|
|
6667
|
+
cuid2: "cuid2",
|
|
6668
|
+
ulid: "ULID",
|
|
6669
|
+
xid: "XID",
|
|
6670
|
+
ksuid: "KSUID",
|
|
6671
|
+
datetime: "ISO id\u0151b\xE9lyeg",
|
|
6672
|
+
date: "ISO d\xE1tum",
|
|
6673
|
+
time: "ISO id\u0151",
|
|
6674
|
+
duration: "ISO id\u0151intervallum",
|
|
6675
|
+
ipv4: "IPv4 c\xEDm",
|
|
6676
|
+
ipv6: "IPv6 c\xEDm",
|
|
6677
|
+
cidrv4: "IPv4 tartom\xE1ny",
|
|
6678
|
+
cidrv6: "IPv6 tartom\xE1ny",
|
|
6679
|
+
base64: "base64-k\xF3dolt string",
|
|
6680
|
+
base64url: "base64url-k\xF3dolt string",
|
|
6681
|
+
json_string: "JSON string",
|
|
6682
|
+
e164: "E.164 sz\xE1m",
|
|
6683
|
+
jwt: "JWT",
|
|
6684
|
+
template_literal: "bemenet"
|
|
6685
|
+
};
|
|
6686
|
+
const TypeDictionary = {
|
|
6687
|
+
nan: "NaN",
|
|
6688
|
+
number: "sz\xE1m",
|
|
6689
|
+
array: "t\xF6mb"
|
|
6690
|
+
};
|
|
6691
|
+
return (issue2) => {
|
|
6692
|
+
switch (issue2.code) {
|
|
6693
|
+
case "invalid_type": {
|
|
6694
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
6695
|
+
const receivedType = parsedType(issue2.input);
|
|
6696
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
6697
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
6698
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
|
|
6699
|
+
}
|
|
6700
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
|
|
6701
|
+
}
|
|
6702
|
+
case "invalid_value":
|
|
6703
|
+
if (issue2.values.length === 1)
|
|
6704
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
|
|
6705
|
+
return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
|
|
6706
|
+
case "too_big": {
|
|
6707
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
6708
|
+
const sizing = getSizing(issue2.origin);
|
|
6709
|
+
if (sizing)
|
|
6710
|
+
return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
|
|
6711
|
+
return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
|
|
6712
|
+
}
|
|
6713
|
+
case "too_small": {
|
|
6714
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
6715
|
+
const sizing = getSizing(issue2.origin);
|
|
6716
|
+
if (sizing) {
|
|
6717
|
+
return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6718
|
+
}
|
|
6719
|
+
return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`;
|
|
6314
6720
|
}
|
|
6315
6721
|
case "invalid_format": {
|
|
6316
6722
|
const _issue = issue2;
|
|
@@ -6341,11 +6747,11 @@ var error17 = () => {
|
|
|
6341
6747
|
};
|
|
6342
6748
|
function hu_default() {
|
|
6343
6749
|
return {
|
|
6344
|
-
localeError:
|
|
6750
|
+
localeError: error19()
|
|
6345
6751
|
};
|
|
6346
6752
|
}
|
|
6347
6753
|
|
|
6348
|
-
// node_modules/.pnpm/zod@4.3
|
|
6754
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/hy.js
|
|
6349
6755
|
function getArmenianPlural(count, one, many) {
|
|
6350
6756
|
return Math.abs(count) === 1 ? one : many;
|
|
6351
6757
|
}
|
|
@@ -6356,7 +6762,7 @@ function withDefiniteArticle(word) {
|
|
|
6356
6762
|
const lastChar = word[word.length - 1];
|
|
6357
6763
|
return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
|
|
6358
6764
|
}
|
|
6359
|
-
var
|
|
6765
|
+
var error20 = () => {
|
|
6360
6766
|
const Sizable = {
|
|
6361
6767
|
string: {
|
|
6362
6768
|
unit: {
|
|
@@ -6489,12 +6895,12 @@ var error18 = () => {
|
|
|
6489
6895
|
};
|
|
6490
6896
|
function hy_default() {
|
|
6491
6897
|
return {
|
|
6492
|
-
localeError:
|
|
6898
|
+
localeError: error20()
|
|
6493
6899
|
};
|
|
6494
6900
|
}
|
|
6495
6901
|
|
|
6496
|
-
// node_modules/.pnpm/zod@4.3
|
|
6497
|
-
var
|
|
6902
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/id.js
|
|
6903
|
+
var error21 = () => {
|
|
6498
6904
|
const Sizable = {
|
|
6499
6905
|
string: { unit: "karakter", verb: "memiliki" },
|
|
6500
6906
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -6596,12 +7002,12 @@ var error19 = () => {
|
|
|
6596
7002
|
};
|
|
6597
7003
|
function id_default() {
|
|
6598
7004
|
return {
|
|
6599
|
-
localeError:
|
|
7005
|
+
localeError: error21()
|
|
6600
7006
|
};
|
|
6601
7007
|
}
|
|
6602
7008
|
|
|
6603
|
-
// node_modules/.pnpm/zod@4.3
|
|
6604
|
-
var
|
|
7009
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/is.js
|
|
7010
|
+
var error22 = () => {
|
|
6605
7011
|
const Sizable = {
|
|
6606
7012
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
6607
7013
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -6706,12 +7112,12 @@ var error20 = () => {
|
|
|
6706
7112
|
};
|
|
6707
7113
|
function is_default() {
|
|
6708
7114
|
return {
|
|
6709
|
-
localeError:
|
|
7115
|
+
localeError: error22()
|
|
6710
7116
|
};
|
|
6711
7117
|
}
|
|
6712
7118
|
|
|
6713
|
-
// node_modules/.pnpm/zod@4.3
|
|
6714
|
-
var
|
|
7119
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/it.js
|
|
7120
|
+
var error23 = () => {
|
|
6715
7121
|
const Sizable = {
|
|
6716
7122
|
string: { unit: "caratteri", verb: "avere" },
|
|
6717
7123
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -6796,7 +7202,7 @@ var error21 = () => {
|
|
|
6796
7202
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
6797
7203
|
if (_issue.format === "regex")
|
|
6798
7204
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
6799
|
-
return `
|
|
7205
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6800
7206
|
}
|
|
6801
7207
|
case "not_multiple_of":
|
|
6802
7208
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -6815,12 +7221,12 @@ var error21 = () => {
|
|
|
6815
7221
|
};
|
|
6816
7222
|
function it_default() {
|
|
6817
7223
|
return {
|
|
6818
|
-
localeError:
|
|
7224
|
+
localeError: error23()
|
|
6819
7225
|
};
|
|
6820
7226
|
}
|
|
6821
7227
|
|
|
6822
|
-
// node_modules/.pnpm/zod@4.3
|
|
6823
|
-
var
|
|
7228
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ja.js
|
|
7229
|
+
var error24 = () => {
|
|
6824
7230
|
const Sizable = {
|
|
6825
7231
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
6826
7232
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -6923,12 +7329,12 @@ var error22 = () => {
|
|
|
6923
7329
|
};
|
|
6924
7330
|
function ja_default() {
|
|
6925
7331
|
return {
|
|
6926
|
-
localeError:
|
|
7332
|
+
localeError: error24()
|
|
6927
7333
|
};
|
|
6928
7334
|
}
|
|
6929
7335
|
|
|
6930
|
-
// node_modules/.pnpm/zod@4.3
|
|
6931
|
-
var
|
|
7336
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ka.js
|
|
7337
|
+
var error25 = () => {
|
|
6932
7338
|
const Sizable = {
|
|
6933
7339
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
6934
7340
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -6961,9 +7367,9 @@ var error23 = () => {
|
|
|
6961
7367
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
6962
7368
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
6963
7369
|
cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
6964
|
-
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
6965
|
-
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
6966
|
-
json_string: "JSON \
|
|
7370
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7371
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7372
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
6967
7373
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
6968
7374
|
jwt: "JWT",
|
|
6969
7375
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -6971,7 +7377,7 @@ var error23 = () => {
|
|
|
6971
7377
|
const TypeDictionary = {
|
|
6972
7378
|
nan: "NaN",
|
|
6973
7379
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
6974
|
-
string: "\
|
|
7380
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
6975
7381
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
6976
7382
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
6977
7383
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -7009,14 +7415,14 @@ var error23 = () => {
|
|
|
7009
7415
|
case "invalid_format": {
|
|
7010
7416
|
const _issue = issue2;
|
|
7011
7417
|
if (_issue.format === "starts_with") {
|
|
7012
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7418
|
+
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`;
|
|
7013
7419
|
}
|
|
7014
7420
|
if (_issue.format === "ends_with")
|
|
7015
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7421
|
+
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`;
|
|
7016
7422
|
if (_issue.format === "includes")
|
|
7017
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7423
|
+
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`;
|
|
7018
7424
|
if (_issue.format === "regex")
|
|
7019
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7425
|
+
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}`;
|
|
7020
7426
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7021
7427
|
}
|
|
7022
7428
|
case "not_multiple_of":
|
|
@@ -7036,12 +7442,12 @@ var error23 = () => {
|
|
|
7036
7442
|
};
|
|
7037
7443
|
function ka_default() {
|
|
7038
7444
|
return {
|
|
7039
|
-
localeError:
|
|
7445
|
+
localeError: error25()
|
|
7040
7446
|
};
|
|
7041
7447
|
}
|
|
7042
7448
|
|
|
7043
|
-
// node_modules/.pnpm/zod@4.3
|
|
7044
|
-
var
|
|
7449
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/km.js
|
|
7450
|
+
var error26 = () => {
|
|
7045
7451
|
const Sizable = {
|
|
7046
7452
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
7047
7453
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -7147,17 +7553,17 @@ var error24 = () => {
|
|
|
7147
7553
|
};
|
|
7148
7554
|
function km_default() {
|
|
7149
7555
|
return {
|
|
7150
|
-
localeError:
|
|
7556
|
+
localeError: error26()
|
|
7151
7557
|
};
|
|
7152
7558
|
}
|
|
7153
7559
|
|
|
7154
|
-
// node_modules/.pnpm/zod@4.3
|
|
7560
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/kh.js
|
|
7155
7561
|
function kh_default() {
|
|
7156
7562
|
return km_default();
|
|
7157
7563
|
}
|
|
7158
7564
|
|
|
7159
|
-
// node_modules/.pnpm/zod@4.3
|
|
7160
|
-
var
|
|
7565
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ko.js
|
|
7566
|
+
var error27 = () => {
|
|
7161
7567
|
const Sizable = {
|
|
7162
7568
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
7163
7569
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -7264,11 +7670,11 @@ var error25 = () => {
|
|
|
7264
7670
|
};
|
|
7265
7671
|
function ko_default() {
|
|
7266
7672
|
return {
|
|
7267
|
-
localeError:
|
|
7673
|
+
localeError: error27()
|
|
7268
7674
|
};
|
|
7269
7675
|
}
|
|
7270
7676
|
|
|
7271
|
-
// node_modules/.pnpm/zod@4.3
|
|
7677
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/lt.js
|
|
7272
7678
|
var capitalizeFirstCharacter = (text) => {
|
|
7273
7679
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
7274
7680
|
};
|
|
@@ -7282,7 +7688,7 @@ function getUnitTypeFromNumber(number4) {
|
|
|
7282
7688
|
return "one";
|
|
7283
7689
|
return "few";
|
|
7284
7690
|
}
|
|
7285
|
-
var
|
|
7691
|
+
var error28 = () => {
|
|
7286
7692
|
const Sizable = {
|
|
7287
7693
|
string: {
|
|
7288
7694
|
unit: {
|
|
@@ -7468,12 +7874,12 @@ var error26 = () => {
|
|
|
7468
7874
|
};
|
|
7469
7875
|
function lt_default() {
|
|
7470
7876
|
return {
|
|
7471
|
-
localeError:
|
|
7877
|
+
localeError: error28()
|
|
7472
7878
|
};
|
|
7473
7879
|
}
|
|
7474
7880
|
|
|
7475
|
-
// node_modules/.pnpm/zod@4.3
|
|
7476
|
-
var
|
|
7881
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/mk.js
|
|
7882
|
+
var error29 = () => {
|
|
7477
7883
|
const Sizable = {
|
|
7478
7884
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
7479
7885
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -7578,12 +7984,12 @@ var error27 = () => {
|
|
|
7578
7984
|
};
|
|
7579
7985
|
function mk_default() {
|
|
7580
7986
|
return {
|
|
7581
|
-
localeError:
|
|
7987
|
+
localeError: error29()
|
|
7582
7988
|
};
|
|
7583
7989
|
}
|
|
7584
7990
|
|
|
7585
|
-
// node_modules/.pnpm/zod@4.3
|
|
7586
|
-
var
|
|
7991
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ms.js
|
|
7992
|
+
var error30 = () => {
|
|
7587
7993
|
const Sizable = {
|
|
7588
7994
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
7589
7995
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -7686,12 +8092,12 @@ var error28 = () => {
|
|
|
7686
8092
|
};
|
|
7687
8093
|
function ms_default() {
|
|
7688
8094
|
return {
|
|
7689
|
-
localeError:
|
|
8095
|
+
localeError: error30()
|
|
7690
8096
|
};
|
|
7691
8097
|
}
|
|
7692
8098
|
|
|
7693
|
-
// node_modules/.pnpm/zod@4.3
|
|
7694
|
-
var
|
|
8099
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/nl.js
|
|
8100
|
+
var error31 = () => {
|
|
7695
8101
|
const Sizable = {
|
|
7696
8102
|
string: { unit: "tekens", verb: "heeft" },
|
|
7697
8103
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -7797,12 +8203,12 @@ var error29 = () => {
|
|
|
7797
8203
|
};
|
|
7798
8204
|
function nl_default() {
|
|
7799
8205
|
return {
|
|
7800
|
-
localeError:
|
|
8206
|
+
localeError: error31()
|
|
7801
8207
|
};
|
|
7802
8208
|
}
|
|
7803
8209
|
|
|
7804
|
-
// node_modules/.pnpm/zod@4.3
|
|
7805
|
-
var
|
|
8210
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/no.js
|
|
8211
|
+
var error32 = () => {
|
|
7806
8212
|
const Sizable = {
|
|
7807
8213
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
7808
8214
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -7906,12 +8312,12 @@ var error30 = () => {
|
|
|
7906
8312
|
};
|
|
7907
8313
|
function no_default() {
|
|
7908
8314
|
return {
|
|
7909
|
-
localeError:
|
|
8315
|
+
localeError: error32()
|
|
7910
8316
|
};
|
|
7911
8317
|
}
|
|
7912
8318
|
|
|
7913
|
-
// node_modules/.pnpm/zod@4.3
|
|
7914
|
-
var
|
|
8319
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ota.js
|
|
8320
|
+
var error33 = () => {
|
|
7915
8321
|
const Sizable = {
|
|
7916
8322
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
7917
8323
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -8016,12 +8422,12 @@ var error31 = () => {
|
|
|
8016
8422
|
};
|
|
8017
8423
|
function ota_default() {
|
|
8018
8424
|
return {
|
|
8019
|
-
localeError:
|
|
8425
|
+
localeError: error33()
|
|
8020
8426
|
};
|
|
8021
8427
|
}
|
|
8022
8428
|
|
|
8023
|
-
// node_modules/.pnpm/zod@4.3
|
|
8024
|
-
var
|
|
8429
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ps.js
|
|
8430
|
+
var error34 = () => {
|
|
8025
8431
|
const Sizable = {
|
|
8026
8432
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
8027
8433
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -8131,12 +8537,12 @@ var error32 = () => {
|
|
|
8131
8537
|
};
|
|
8132
8538
|
function ps_default() {
|
|
8133
8539
|
return {
|
|
8134
|
-
localeError:
|
|
8540
|
+
localeError: error34()
|
|
8135
8541
|
};
|
|
8136
8542
|
}
|
|
8137
8543
|
|
|
8138
|
-
// node_modules/.pnpm/zod@4.3
|
|
8139
|
-
var
|
|
8544
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pl.js
|
|
8545
|
+
var error35 = () => {
|
|
8140
8546
|
const Sizable = {
|
|
8141
8547
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
8142
8548
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -8241,12 +8647,12 @@ var error33 = () => {
|
|
|
8241
8647
|
};
|
|
8242
8648
|
function pl_default() {
|
|
8243
8649
|
return {
|
|
8244
|
-
localeError:
|
|
8650
|
+
localeError: error35()
|
|
8245
8651
|
};
|
|
8246
8652
|
}
|
|
8247
8653
|
|
|
8248
|
-
// node_modules/.pnpm/zod@4.3
|
|
8249
|
-
var
|
|
8654
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/pt.js
|
|
8655
|
+
var error36 = () => {
|
|
8250
8656
|
const Sizable = {
|
|
8251
8657
|
string: { unit: "caracteres", verb: "ter" },
|
|
8252
8658
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -8350,11 +8756,131 @@ var error34 = () => {
|
|
|
8350
8756
|
};
|
|
8351
8757
|
function pt_default() {
|
|
8352
8758
|
return {
|
|
8353
|
-
localeError:
|
|
8759
|
+
localeError: error36()
|
|
8760
|
+
};
|
|
8761
|
+
}
|
|
8762
|
+
|
|
8763
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ro.js
|
|
8764
|
+
var error37 = () => {
|
|
8765
|
+
const Sizable = {
|
|
8766
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
8767
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
8768
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
8769
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
8770
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
8771
|
+
};
|
|
8772
|
+
function getSizing(origin) {
|
|
8773
|
+
return Sizable[origin] ?? null;
|
|
8774
|
+
}
|
|
8775
|
+
const FormatDictionary = {
|
|
8776
|
+
regex: "intrare",
|
|
8777
|
+
email: "adres\u0103 de email",
|
|
8778
|
+
url: "URL",
|
|
8779
|
+
emoji: "emoji",
|
|
8780
|
+
uuid: "UUID",
|
|
8781
|
+
uuidv4: "UUIDv4",
|
|
8782
|
+
uuidv6: "UUIDv6",
|
|
8783
|
+
nanoid: "nanoid",
|
|
8784
|
+
guid: "GUID",
|
|
8785
|
+
cuid: "cuid",
|
|
8786
|
+
cuid2: "cuid2",
|
|
8787
|
+
ulid: "ULID",
|
|
8788
|
+
xid: "XID",
|
|
8789
|
+
ksuid: "KSUID",
|
|
8790
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
8791
|
+
date: "dat\u0103 ISO",
|
|
8792
|
+
time: "or\u0103 ISO",
|
|
8793
|
+
duration: "durat\u0103 ISO",
|
|
8794
|
+
ipv4: "adres\u0103 IPv4",
|
|
8795
|
+
ipv6: "adres\u0103 IPv6",
|
|
8796
|
+
mac: "adres\u0103 MAC",
|
|
8797
|
+
cidrv4: "interval IPv4",
|
|
8798
|
+
cidrv6: "interval IPv6",
|
|
8799
|
+
base64: "\u0219ir codat base64",
|
|
8800
|
+
base64url: "\u0219ir codat base64url",
|
|
8801
|
+
json_string: "\u0219ir JSON",
|
|
8802
|
+
e164: "num\u0103r E.164",
|
|
8803
|
+
jwt: "JWT",
|
|
8804
|
+
template_literal: "intrare"
|
|
8805
|
+
};
|
|
8806
|
+
const TypeDictionary = {
|
|
8807
|
+
nan: "NaN",
|
|
8808
|
+
string: "\u0219ir",
|
|
8809
|
+
number: "num\u0103r",
|
|
8810
|
+
boolean: "boolean",
|
|
8811
|
+
function: "func\u021Bie",
|
|
8812
|
+
array: "matrice",
|
|
8813
|
+
object: "obiect",
|
|
8814
|
+
undefined: "nedefinit",
|
|
8815
|
+
symbol: "simbol",
|
|
8816
|
+
bigint: "num\u0103r mare",
|
|
8817
|
+
void: "void",
|
|
8818
|
+
never: "never",
|
|
8819
|
+
map: "hart\u0103",
|
|
8820
|
+
set: "set"
|
|
8821
|
+
};
|
|
8822
|
+
return (issue2) => {
|
|
8823
|
+
switch (issue2.code) {
|
|
8824
|
+
case "invalid_type": {
|
|
8825
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
8826
|
+
const receivedType = parsedType(issue2.input);
|
|
8827
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
8828
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
8829
|
+
}
|
|
8830
|
+
case "invalid_value":
|
|
8831
|
+
if (issue2.values.length === 1)
|
|
8832
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
8833
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
8834
|
+
case "too_big": {
|
|
8835
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
8836
|
+
const sizing = getSizing(issue2.origin);
|
|
8837
|
+
if (sizing)
|
|
8838
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
8839
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
8840
|
+
}
|
|
8841
|
+
case "too_small": {
|
|
8842
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
8843
|
+
const sizing = getSizing(issue2.origin);
|
|
8844
|
+
if (sizing) {
|
|
8845
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
8846
|
+
}
|
|
8847
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
8848
|
+
}
|
|
8849
|
+
case "invalid_format": {
|
|
8850
|
+
const _issue = issue2;
|
|
8851
|
+
if (_issue.format === "starts_with") {
|
|
8852
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
8853
|
+
}
|
|
8854
|
+
if (_issue.format === "ends_with")
|
|
8855
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
8856
|
+
if (_issue.format === "includes")
|
|
8857
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
8858
|
+
if (_issue.format === "regex")
|
|
8859
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
8860
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
8861
|
+
}
|
|
8862
|
+
case "not_multiple_of":
|
|
8863
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
8864
|
+
case "unrecognized_keys":
|
|
8865
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
8866
|
+
case "invalid_key":
|
|
8867
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
8868
|
+
case "invalid_union":
|
|
8869
|
+
return "Intrare invalid\u0103";
|
|
8870
|
+
case "invalid_element":
|
|
8871
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
8872
|
+
default:
|
|
8873
|
+
return `Intrare invalid\u0103`;
|
|
8874
|
+
}
|
|
8875
|
+
};
|
|
8876
|
+
};
|
|
8877
|
+
function ro_default() {
|
|
8878
|
+
return {
|
|
8879
|
+
localeError: error37()
|
|
8354
8880
|
};
|
|
8355
8881
|
}
|
|
8356
8882
|
|
|
8357
|
-
// node_modules/.pnpm/zod@4.3
|
|
8883
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ru.js
|
|
8358
8884
|
function getRussianPlural(count, one, few, many) {
|
|
8359
8885
|
const absCount = Math.abs(count);
|
|
8360
8886
|
const lastDigit = absCount % 10;
|
|
@@ -8370,7 +8896,7 @@ function getRussianPlural(count, one, few, many) {
|
|
|
8370
8896
|
}
|
|
8371
8897
|
return many;
|
|
8372
8898
|
}
|
|
8373
|
-
var
|
|
8899
|
+
var error38 = () => {
|
|
8374
8900
|
const Sizable = {
|
|
8375
8901
|
string: {
|
|
8376
8902
|
unit: {
|
|
@@ -8507,12 +9033,12 @@ var error35 = () => {
|
|
|
8507
9033
|
};
|
|
8508
9034
|
function ru_default() {
|
|
8509
9035
|
return {
|
|
8510
|
-
localeError:
|
|
9036
|
+
localeError: error38()
|
|
8511
9037
|
};
|
|
8512
9038
|
}
|
|
8513
9039
|
|
|
8514
|
-
// node_modules/.pnpm/zod@4.3
|
|
8515
|
-
var
|
|
9040
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sl.js
|
|
9041
|
+
var error39 = () => {
|
|
8516
9042
|
const Sizable = {
|
|
8517
9043
|
string: { unit: "znakov", verb: "imeti" },
|
|
8518
9044
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -8617,12 +9143,12 @@ var error36 = () => {
|
|
|
8617
9143
|
};
|
|
8618
9144
|
function sl_default() {
|
|
8619
9145
|
return {
|
|
8620
|
-
localeError:
|
|
9146
|
+
localeError: error39()
|
|
8621
9147
|
};
|
|
8622
9148
|
}
|
|
8623
9149
|
|
|
8624
|
-
// node_modules/.pnpm/zod@4.3
|
|
8625
|
-
var
|
|
9150
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/sv.js
|
|
9151
|
+
var error40 = () => {
|
|
8626
9152
|
const Sizable = {
|
|
8627
9153
|
string: { unit: "tecken", verb: "att ha" },
|
|
8628
9154
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -8728,12 +9254,12 @@ var error37 = () => {
|
|
|
8728
9254
|
};
|
|
8729
9255
|
function sv_default() {
|
|
8730
9256
|
return {
|
|
8731
|
-
localeError:
|
|
9257
|
+
localeError: error40()
|
|
8732
9258
|
};
|
|
8733
9259
|
}
|
|
8734
9260
|
|
|
8735
|
-
// node_modules/.pnpm/zod@4.3
|
|
8736
|
-
var
|
|
9261
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ta.js
|
|
9262
|
+
var error41 = () => {
|
|
8737
9263
|
const Sizable = {
|
|
8738
9264
|
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" },
|
|
8739
9265
|
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" },
|
|
@@ -8839,12 +9365,12 @@ var error38 = () => {
|
|
|
8839
9365
|
};
|
|
8840
9366
|
function ta_default() {
|
|
8841
9367
|
return {
|
|
8842
|
-
localeError:
|
|
9368
|
+
localeError: error41()
|
|
8843
9369
|
};
|
|
8844
9370
|
}
|
|
8845
9371
|
|
|
8846
|
-
// node_modules/.pnpm/zod@4.3
|
|
8847
|
-
var
|
|
9372
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/th.js
|
|
9373
|
+
var error42 = () => {
|
|
8848
9374
|
const Sizable = {
|
|
8849
9375
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
8850
9376
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -8950,12 +9476,12 @@ var error39 = () => {
|
|
|
8950
9476
|
};
|
|
8951
9477
|
function th_default() {
|
|
8952
9478
|
return {
|
|
8953
|
-
localeError:
|
|
9479
|
+
localeError: error42()
|
|
8954
9480
|
};
|
|
8955
9481
|
}
|
|
8956
9482
|
|
|
8957
|
-
// node_modules/.pnpm/zod@4.3
|
|
8958
|
-
var
|
|
9483
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/tr.js
|
|
9484
|
+
var error43 = () => {
|
|
8959
9485
|
const Sizable = {
|
|
8960
9486
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
8961
9487
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -9056,12 +9582,12 @@ var error40 = () => {
|
|
|
9056
9582
|
};
|
|
9057
9583
|
function tr_default() {
|
|
9058
9584
|
return {
|
|
9059
|
-
localeError:
|
|
9585
|
+
localeError: error43()
|
|
9060
9586
|
};
|
|
9061
9587
|
}
|
|
9062
9588
|
|
|
9063
|
-
// node_modules/.pnpm/zod@4.3
|
|
9064
|
-
var
|
|
9589
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uk.js
|
|
9590
|
+
var error44 = () => {
|
|
9065
9591
|
const Sizable = {
|
|
9066
9592
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
9067
9593
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -9165,17 +9691,17 @@ var error41 = () => {
|
|
|
9165
9691
|
};
|
|
9166
9692
|
function uk_default() {
|
|
9167
9693
|
return {
|
|
9168
|
-
localeError:
|
|
9694
|
+
localeError: error44()
|
|
9169
9695
|
};
|
|
9170
9696
|
}
|
|
9171
9697
|
|
|
9172
|
-
// node_modules/.pnpm/zod@4.3
|
|
9698
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ua.js
|
|
9173
9699
|
function ua_default() {
|
|
9174
9700
|
return uk_default();
|
|
9175
9701
|
}
|
|
9176
9702
|
|
|
9177
|
-
// node_modules/.pnpm/zod@4.3
|
|
9178
|
-
var
|
|
9703
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/ur.js
|
|
9704
|
+
var error45 = () => {
|
|
9179
9705
|
const Sizable = {
|
|
9180
9706
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
9181
9707
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -9281,17 +9807,18 @@ var error42 = () => {
|
|
|
9281
9807
|
};
|
|
9282
9808
|
function ur_default() {
|
|
9283
9809
|
return {
|
|
9284
|
-
localeError:
|
|
9810
|
+
localeError: error45()
|
|
9285
9811
|
};
|
|
9286
9812
|
}
|
|
9287
9813
|
|
|
9288
|
-
// node_modules/.pnpm/zod@4.3
|
|
9289
|
-
var
|
|
9814
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/uz.js
|
|
9815
|
+
var error46 = () => {
|
|
9290
9816
|
const Sizable = {
|
|
9291
9817
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
9292
9818
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
9293
9819
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
9294
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
9820
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
9821
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
9295
9822
|
};
|
|
9296
9823
|
function getSizing(origin) {
|
|
9297
9824
|
return Sizable[origin] ?? null;
|
|
@@ -9391,12 +9918,12 @@ var error43 = () => {
|
|
|
9391
9918
|
};
|
|
9392
9919
|
function uz_default() {
|
|
9393
9920
|
return {
|
|
9394
|
-
localeError:
|
|
9921
|
+
localeError: error46()
|
|
9395
9922
|
};
|
|
9396
9923
|
}
|
|
9397
9924
|
|
|
9398
|
-
// node_modules/.pnpm/zod@4.3
|
|
9399
|
-
var
|
|
9925
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/vi.js
|
|
9926
|
+
var error47 = () => {
|
|
9400
9927
|
const Sizable = {
|
|
9401
9928
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
9402
9929
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -9500,12 +10027,12 @@ var error44 = () => {
|
|
|
9500
10027
|
};
|
|
9501
10028
|
function vi_default() {
|
|
9502
10029
|
return {
|
|
9503
|
-
localeError:
|
|
10030
|
+
localeError: error47()
|
|
9504
10031
|
};
|
|
9505
10032
|
}
|
|
9506
10033
|
|
|
9507
|
-
// node_modules/.pnpm/zod@4.3
|
|
9508
|
-
var
|
|
10034
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-CN.js
|
|
10035
|
+
var error48 = () => {
|
|
9509
10036
|
const Sizable = {
|
|
9510
10037
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
9511
10038
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -9610,12 +10137,12 @@ var error45 = () => {
|
|
|
9610
10137
|
};
|
|
9611
10138
|
function zh_CN_default() {
|
|
9612
10139
|
return {
|
|
9613
|
-
localeError:
|
|
10140
|
+
localeError: error48()
|
|
9614
10141
|
};
|
|
9615
10142
|
}
|
|
9616
10143
|
|
|
9617
|
-
// node_modules/.pnpm/zod@4.3
|
|
9618
|
-
var
|
|
10144
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/zh-TW.js
|
|
10145
|
+
var error49 = () => {
|
|
9619
10146
|
const Sizable = {
|
|
9620
10147
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
9621
10148
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -9718,12 +10245,12 @@ var error46 = () => {
|
|
|
9718
10245
|
};
|
|
9719
10246
|
function zh_TW_default() {
|
|
9720
10247
|
return {
|
|
9721
|
-
localeError:
|
|
10248
|
+
localeError: error49()
|
|
9722
10249
|
};
|
|
9723
10250
|
}
|
|
9724
10251
|
|
|
9725
|
-
// node_modules/.pnpm/zod@4.3
|
|
9726
|
-
var
|
|
10252
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/yo.js
|
|
10253
|
+
var error50 = () => {
|
|
9727
10254
|
const Sizable = {
|
|
9728
10255
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
9729
10256
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -9826,12 +10353,12 @@ var error47 = () => {
|
|
|
9826
10353
|
};
|
|
9827
10354
|
function yo_default() {
|
|
9828
10355
|
return {
|
|
9829
|
-
localeError:
|
|
10356
|
+
localeError: error50()
|
|
9830
10357
|
};
|
|
9831
10358
|
}
|
|
9832
10359
|
|
|
9833
|
-
// node_modules/.pnpm/zod@4.3
|
|
9834
|
-
var
|
|
10360
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
|
|
10361
|
+
var _a2;
|
|
9835
10362
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
9836
10363
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
9837
10364
|
var $ZodRegistry = class {
|
|
@@ -9877,10 +10404,10 @@ var $ZodRegistry = class {
|
|
|
9877
10404
|
function registry() {
|
|
9878
10405
|
return new $ZodRegistry();
|
|
9879
10406
|
}
|
|
9880
|
-
(
|
|
10407
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
9881
10408
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
9882
10409
|
|
|
9883
|
-
// node_modules/.pnpm/zod@4.3
|
|
10410
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
|
|
9884
10411
|
// @__NO_SIDE_EFFECTS__
|
|
9885
10412
|
function _string(Class2, params) {
|
|
9886
10413
|
return new Class2({
|
|
@@ -10795,7 +11322,7 @@ function _refine(Class2, fn, _params) {
|
|
|
10795
11322
|
return schema;
|
|
10796
11323
|
}
|
|
10797
11324
|
// @__NO_SIDE_EFFECTS__
|
|
10798
|
-
function _superRefine(fn) {
|
|
11325
|
+
function _superRefine(fn, params) {
|
|
10799
11326
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
10800
11327
|
payload.addIssue = (issue2) => {
|
|
10801
11328
|
if (typeof issue2 === "string") {
|
|
@@ -10812,7 +11339,7 @@ function _superRefine(fn) {
|
|
|
10812
11339
|
}
|
|
10813
11340
|
};
|
|
10814
11341
|
return fn(payload.value, payload);
|
|
10815
|
-
});
|
|
11342
|
+
}, params);
|
|
10816
11343
|
return ch;
|
|
10817
11344
|
}
|
|
10818
11345
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -10919,7 +11446,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
10919
11446
|
return inst;
|
|
10920
11447
|
}
|
|
10921
11448
|
|
|
10922
|
-
// node_modules/.pnpm/zod@4.3
|
|
11449
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
|
|
10923
11450
|
function initializeContext(params) {
|
|
10924
11451
|
let target = params?.target ?? "draft-2020-12";
|
|
10925
11452
|
if (target === "draft-4")
|
|
@@ -10942,7 +11469,7 @@ function initializeContext(params) {
|
|
|
10942
11469
|
};
|
|
10943
11470
|
}
|
|
10944
11471
|
function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
10945
|
-
var
|
|
11472
|
+
var _a3;
|
|
10946
11473
|
const def = schema._zod.def;
|
|
10947
11474
|
const seen = ctx.seen.get(schema);
|
|
10948
11475
|
if (seen) {
|
|
@@ -10989,8 +11516,8 @@ function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
10989
11516
|
delete result.schema.examples;
|
|
10990
11517
|
delete result.schema.default;
|
|
10991
11518
|
}
|
|
10992
|
-
if (ctx.io === "input" && result.schema
|
|
10993
|
-
(
|
|
11519
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
11520
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
10994
11521
|
delete result.schema._prefault;
|
|
10995
11522
|
const _result = ctx.seen.get(schema);
|
|
10996
11523
|
return _result.schema;
|
|
@@ -11171,10 +11698,15 @@ function finalize(ctx, schema) {
|
|
|
11171
11698
|
result.$id = ctx.external.uri(id);
|
|
11172
11699
|
}
|
|
11173
11700
|
Object.assign(result, root.def ?? root.schema);
|
|
11701
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
11702
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
11703
|
+
delete result.id;
|
|
11174
11704
|
const defs = ctx.external?.defs ?? {};
|
|
11175
11705
|
for (const entry of ctx.seen.entries()) {
|
|
11176
11706
|
const seen = entry[1];
|
|
11177
11707
|
if (seen.def && seen.defId) {
|
|
11708
|
+
if (seen.def.id === seen.defId)
|
|
11709
|
+
delete seen.def.id;
|
|
11178
11710
|
defs[seen.defId] = seen.def;
|
|
11179
11711
|
}
|
|
11180
11712
|
}
|
|
@@ -11230,6 +11762,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
11230
11762
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
11231
11763
|
}
|
|
11232
11764
|
if (def.type === "pipe") {
|
|
11765
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
11766
|
+
return true;
|
|
11233
11767
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
11234
11768
|
}
|
|
11235
11769
|
if (def.type === "object") {
|
|
@@ -11271,7 +11805,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
|
|
|
11271
11805
|
return finalize(ctx, schema);
|
|
11272
11806
|
};
|
|
11273
11807
|
|
|
11274
|
-
// node_modules/.pnpm/zod@4.3
|
|
11808
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.js
|
|
11275
11809
|
var formatMap = {
|
|
11276
11810
|
guid: "uuid",
|
|
11277
11811
|
url: "uri",
|
|
@@ -11319,39 +11853,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
11319
11853
|
json2.type = "integer";
|
|
11320
11854
|
else
|
|
11321
11855
|
json2.type = "number";
|
|
11322
|
-
|
|
11323
|
-
|
|
11856
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
11857
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
11858
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
11859
|
+
if (exMin) {
|
|
11860
|
+
if (legacy) {
|
|
11324
11861
|
json2.minimum = exclusiveMinimum;
|
|
11325
11862
|
json2.exclusiveMinimum = true;
|
|
11326
11863
|
} else {
|
|
11327
11864
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
11328
11865
|
}
|
|
11329
|
-
}
|
|
11330
|
-
if (typeof minimum === "number") {
|
|
11866
|
+
} else if (typeof minimum === "number") {
|
|
11331
11867
|
json2.minimum = minimum;
|
|
11332
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
11333
|
-
if (exclusiveMinimum >= minimum)
|
|
11334
|
-
delete json2.minimum;
|
|
11335
|
-
else
|
|
11336
|
-
delete json2.exclusiveMinimum;
|
|
11337
|
-
}
|
|
11338
11868
|
}
|
|
11339
|
-
if (
|
|
11340
|
-
if (
|
|
11869
|
+
if (exMax) {
|
|
11870
|
+
if (legacy) {
|
|
11341
11871
|
json2.maximum = exclusiveMaximum;
|
|
11342
11872
|
json2.exclusiveMaximum = true;
|
|
11343
11873
|
} else {
|
|
11344
11874
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
11345
11875
|
}
|
|
11346
|
-
}
|
|
11347
|
-
if (typeof maximum === "number") {
|
|
11876
|
+
} else if (typeof maximum === "number") {
|
|
11348
11877
|
json2.maximum = maximum;
|
|
11349
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
11350
|
-
if (exclusiveMaximum <= maximum)
|
|
11351
|
-
delete json2.maximum;
|
|
11352
|
-
else
|
|
11353
|
-
delete json2.exclusiveMaximum;
|
|
11354
|
-
}
|
|
11355
11878
|
}
|
|
11356
11879
|
if (typeof multipleOf === "number")
|
|
11357
11880
|
json2.multipleOf = multipleOf;
|
|
@@ -11523,7 +12046,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
11523
12046
|
if (typeof maximum === "number")
|
|
11524
12047
|
json2.maxItems = maximum;
|
|
11525
12048
|
json2.type = "array";
|
|
11526
|
-
json2.items = process(def.element, ctx, {
|
|
12049
|
+
json2.items = process(def.element, ctx, {
|
|
12050
|
+
...params,
|
|
12051
|
+
path: [...params.path, "items"]
|
|
12052
|
+
});
|
|
11527
12053
|
};
|
|
11528
12054
|
var objectProcessor = (schema, ctx, _json, params) => {
|
|
11529
12055
|
const json2 = _json;
|
|
@@ -11716,7 +12242,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
|
|
|
11716
12242
|
};
|
|
11717
12243
|
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
11718
12244
|
const def = schema._zod.def;
|
|
11719
|
-
const
|
|
12245
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
12246
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
11720
12247
|
process(innerType, ctx, params);
|
|
11721
12248
|
const seen = ctx.seen.get(schema);
|
|
11722
12249
|
seen.ref = innerType;
|
|
@@ -11822,7 +12349,7 @@ function toJSONSchema(input, params) {
|
|
|
11822
12349
|
return finalize(ctx, input);
|
|
11823
12350
|
}
|
|
11824
12351
|
|
|
11825
|
-
// node_modules/.pnpm/zod@4.3
|
|
12352
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-generator.js
|
|
11826
12353
|
var JSONSchemaGenerator = class {
|
|
11827
12354
|
/** @deprecated Access via ctx instead */
|
|
11828
12355
|
get metadataRegistry() {
|
|
@@ -11897,10 +12424,10 @@ var JSONSchemaGenerator = class {
|
|
|
11897
12424
|
}
|
|
11898
12425
|
};
|
|
11899
12426
|
|
|
11900
|
-
// node_modules/.pnpm/zod@4.3
|
|
12427
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
|
|
11901
12428
|
var json_schema_exports = {};
|
|
11902
12429
|
|
|
11903
|
-
// node_modules/.pnpm/zod@4.3
|
|
12430
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
|
|
11904
12431
|
var schemas_exports2 = {};
|
|
11905
12432
|
__export(schemas_exports2, {
|
|
11906
12433
|
ZodAny: () => ZodAny,
|
|
@@ -11950,6 +12477,7 @@ __export(schemas_exports2, {
|
|
|
11950
12477
|
ZodOptional: () => ZodOptional,
|
|
11951
12478
|
ZodPipe: () => ZodPipe,
|
|
11952
12479
|
ZodPrefault: () => ZodPrefault,
|
|
12480
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
11953
12481
|
ZodPromise: () => ZodPromise,
|
|
11954
12482
|
ZodReadonly: () => ZodReadonly,
|
|
11955
12483
|
ZodRecord: () => ZodRecord,
|
|
@@ -12010,6 +12538,7 @@ __export(schemas_exports2, {
|
|
|
12010
12538
|
int32: () => int32,
|
|
12011
12539
|
int64: () => int64,
|
|
12012
12540
|
intersection: () => intersection,
|
|
12541
|
+
invertCodec: () => invertCodec,
|
|
12013
12542
|
ipv4: () => ipv42,
|
|
12014
12543
|
ipv6: () => ipv62,
|
|
12015
12544
|
json: () => json,
|
|
@@ -12069,7 +12598,7 @@ __export(schemas_exports2, {
|
|
|
12069
12598
|
xor: () => xor
|
|
12070
12599
|
});
|
|
12071
12600
|
|
|
12072
|
-
// node_modules/.pnpm/zod@4.3
|
|
12601
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/checks.js
|
|
12073
12602
|
var checks_exports2 = {};
|
|
12074
12603
|
__export(checks_exports2, {
|
|
12075
12604
|
endsWith: () => _endsWith,
|
|
@@ -12103,7 +12632,7 @@ __export(checks_exports2, {
|
|
|
12103
12632
|
uppercase: () => _uppercase
|
|
12104
12633
|
});
|
|
12105
12634
|
|
|
12106
|
-
// node_modules/.pnpm/zod@4.3
|
|
12635
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.js
|
|
12107
12636
|
var iso_exports = {};
|
|
12108
12637
|
__export(iso_exports, {
|
|
12109
12638
|
ZodISODate: () => ZodISODate,
|
|
@@ -12144,7 +12673,7 @@ function duration2(params) {
|
|
|
12144
12673
|
return _isoDuration(ZodISODuration, params);
|
|
12145
12674
|
}
|
|
12146
12675
|
|
|
12147
|
-
// node_modules/.pnpm/zod@4.3
|
|
12676
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.js
|
|
12148
12677
|
var initializer2 = (inst, issues) => {
|
|
12149
12678
|
$ZodError.init(inst, issues);
|
|
12150
12679
|
inst.name = "ZodError";
|
|
@@ -12179,12 +12708,12 @@ var initializer2 = (inst, issues) => {
|
|
|
12179
12708
|
}
|
|
12180
12709
|
});
|
|
12181
12710
|
};
|
|
12182
|
-
var ZodError = $constructor("ZodError", initializer2);
|
|
12183
|
-
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
12711
|
+
var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
12712
|
+
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
12184
12713
|
Parent: Error
|
|
12185
12714
|
});
|
|
12186
12715
|
|
|
12187
|
-
// node_modules/.pnpm/zod@4.3
|
|
12716
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.js
|
|
12188
12717
|
var parse2 = /* @__PURE__ */ _parse(ZodRealError);
|
|
12189
12718
|
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
12190
12719
|
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -12198,7 +12727,44 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
12198
12727
|
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
12199
12728
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
12200
12729
|
|
|
12201
|
-
// node_modules/.pnpm/zod@4.3
|
|
12730
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
|
|
12731
|
+
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
12732
|
+
function _installLazyMethods(inst, group, methods) {
|
|
12733
|
+
const proto = Object.getPrototypeOf(inst);
|
|
12734
|
+
let installed = _installedGroups.get(proto);
|
|
12735
|
+
if (!installed) {
|
|
12736
|
+
installed = /* @__PURE__ */ new Set();
|
|
12737
|
+
_installedGroups.set(proto, installed);
|
|
12738
|
+
}
|
|
12739
|
+
if (installed.has(group))
|
|
12740
|
+
return;
|
|
12741
|
+
installed.add(group);
|
|
12742
|
+
for (const key in methods) {
|
|
12743
|
+
const fn = methods[key];
|
|
12744
|
+
Object.defineProperty(proto, key, {
|
|
12745
|
+
configurable: true,
|
|
12746
|
+
enumerable: false,
|
|
12747
|
+
get() {
|
|
12748
|
+
const bound = fn.bind(this);
|
|
12749
|
+
Object.defineProperty(this, key, {
|
|
12750
|
+
configurable: true,
|
|
12751
|
+
writable: true,
|
|
12752
|
+
enumerable: true,
|
|
12753
|
+
value: bound
|
|
12754
|
+
});
|
|
12755
|
+
return bound;
|
|
12756
|
+
},
|
|
12757
|
+
set(v) {
|
|
12758
|
+
Object.defineProperty(this, key, {
|
|
12759
|
+
configurable: true,
|
|
12760
|
+
writable: true,
|
|
12761
|
+
enumerable: true,
|
|
12762
|
+
value: v
|
|
12763
|
+
});
|
|
12764
|
+
}
|
|
12765
|
+
});
|
|
12766
|
+
}
|
|
12767
|
+
}
|
|
12202
12768
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
12203
12769
|
$ZodType.init(inst, def);
|
|
12204
12770
|
Object.assign(inst["~standard"], {
|
|
@@ -12211,23 +12777,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
12211
12777
|
inst.def = def;
|
|
12212
12778
|
inst.type = def.type;
|
|
12213
12779
|
Object.defineProperty(inst, "_def", { value: def });
|
|
12214
|
-
inst.check = (...checks) => {
|
|
12215
|
-
return inst.clone(util_exports.mergeDefs(def, {
|
|
12216
|
-
checks: [
|
|
12217
|
-
...def.checks ?? [],
|
|
12218
|
-
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
12219
|
-
]
|
|
12220
|
-
}), {
|
|
12221
|
-
parent: true
|
|
12222
|
-
});
|
|
12223
|
-
};
|
|
12224
|
-
inst.with = inst.check;
|
|
12225
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
12226
|
-
inst.brand = () => inst;
|
|
12227
|
-
inst.register = ((reg, meta3) => {
|
|
12228
|
-
reg.add(inst, meta3);
|
|
12229
|
-
return inst;
|
|
12230
|
-
});
|
|
12231
12780
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
12232
12781
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
12233
12782
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -12241,45 +12790,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
12241
12790
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
12242
12791
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
12243
12792
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
12244
|
-
inst
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12264
|
-
|
|
12265
|
-
|
|
12793
|
+
_installLazyMethods(inst, "ZodType", {
|
|
12794
|
+
check(...chks) {
|
|
12795
|
+
const def2 = this.def;
|
|
12796
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
12797
|
+
checks: [
|
|
12798
|
+
...def2.checks ?? [],
|
|
12799
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
12800
|
+
]
|
|
12801
|
+
}), { parent: true });
|
|
12802
|
+
},
|
|
12803
|
+
with(...chks) {
|
|
12804
|
+
return this.check(...chks);
|
|
12805
|
+
},
|
|
12806
|
+
clone(def2, params) {
|
|
12807
|
+
return clone(this, def2, params);
|
|
12808
|
+
},
|
|
12809
|
+
brand() {
|
|
12810
|
+
return this;
|
|
12811
|
+
},
|
|
12812
|
+
register(reg, meta3) {
|
|
12813
|
+
reg.add(this, meta3);
|
|
12814
|
+
return this;
|
|
12815
|
+
},
|
|
12816
|
+
refine(check2, params) {
|
|
12817
|
+
return this.check(refine(check2, params));
|
|
12818
|
+
},
|
|
12819
|
+
superRefine(refinement, params) {
|
|
12820
|
+
return this.check(superRefine(refinement, params));
|
|
12821
|
+
},
|
|
12822
|
+
overwrite(fn) {
|
|
12823
|
+
return this.check(_overwrite(fn));
|
|
12824
|
+
},
|
|
12825
|
+
optional() {
|
|
12826
|
+
return optional(this);
|
|
12827
|
+
},
|
|
12828
|
+
exactOptional() {
|
|
12829
|
+
return exactOptional(this);
|
|
12830
|
+
},
|
|
12831
|
+
nullable() {
|
|
12832
|
+
return nullable(this);
|
|
12833
|
+
},
|
|
12834
|
+
nullish() {
|
|
12835
|
+
return optional(nullable(this));
|
|
12836
|
+
},
|
|
12837
|
+
nonoptional(params) {
|
|
12838
|
+
return nonoptional(this, params);
|
|
12839
|
+
},
|
|
12840
|
+
array() {
|
|
12841
|
+
return array(this);
|
|
12842
|
+
},
|
|
12843
|
+
or(arg) {
|
|
12844
|
+
return union([this, arg]);
|
|
12845
|
+
},
|
|
12846
|
+
and(arg) {
|
|
12847
|
+
return intersection(this, arg);
|
|
12848
|
+
},
|
|
12849
|
+
transform(tx) {
|
|
12850
|
+
return pipe(this, transform(tx));
|
|
12851
|
+
},
|
|
12852
|
+
default(d) {
|
|
12853
|
+
return _default2(this, d);
|
|
12854
|
+
},
|
|
12855
|
+
prefault(d) {
|
|
12856
|
+
return prefault(this, d);
|
|
12857
|
+
},
|
|
12858
|
+
catch(params) {
|
|
12859
|
+
return _catch2(this, params);
|
|
12860
|
+
},
|
|
12861
|
+
pipe(target) {
|
|
12862
|
+
return pipe(this, target);
|
|
12863
|
+
},
|
|
12864
|
+
readonly() {
|
|
12865
|
+
return readonly(this);
|
|
12866
|
+
},
|
|
12867
|
+
describe(description) {
|
|
12868
|
+
const cl = this.clone();
|
|
12869
|
+
globalRegistry.add(cl, { description });
|
|
12870
|
+
return cl;
|
|
12871
|
+
},
|
|
12872
|
+
meta(...args) {
|
|
12873
|
+
if (args.length === 0)
|
|
12874
|
+
return globalRegistry.get(this);
|
|
12875
|
+
const cl = this.clone();
|
|
12876
|
+
globalRegistry.add(cl, args[0]);
|
|
12877
|
+
return cl;
|
|
12878
|
+
},
|
|
12879
|
+
isOptional() {
|
|
12880
|
+
return this.safeParse(void 0).success;
|
|
12881
|
+
},
|
|
12882
|
+
isNullable() {
|
|
12883
|
+
return this.safeParse(null).success;
|
|
12884
|
+
},
|
|
12885
|
+
apply(fn) {
|
|
12886
|
+
return fn(this);
|
|
12887
|
+
}
|
|
12888
|
+
});
|
|
12266
12889
|
Object.defineProperty(inst, "description", {
|
|
12267
12890
|
get() {
|
|
12268
12891
|
return globalRegistry.get(inst)?.description;
|
|
12269
12892
|
},
|
|
12270
12893
|
configurable: true
|
|
12271
12894
|
});
|
|
12272
|
-
inst.meta = (...args) => {
|
|
12273
|
-
if (args.length === 0) {
|
|
12274
|
-
return globalRegistry.get(inst);
|
|
12275
|
-
}
|
|
12276
|
-
const cl = inst.clone();
|
|
12277
|
-
globalRegistry.add(cl, args[0]);
|
|
12278
|
-
return cl;
|
|
12279
|
-
};
|
|
12280
|
-
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
12281
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
12282
|
-
inst.apply = (fn) => fn(inst);
|
|
12283
12895
|
return inst;
|
|
12284
12896
|
});
|
|
12285
12897
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -12290,21 +12902,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
12290
12902
|
inst.format = bag.format ?? null;
|
|
12291
12903
|
inst.minLength = bag.minimum ?? null;
|
|
12292
12904
|
inst.maxLength = bag.maximum ?? null;
|
|
12293
|
-
inst
|
|
12294
|
-
|
|
12295
|
-
|
|
12296
|
-
|
|
12297
|
-
|
|
12298
|
-
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
|
|
12905
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
12906
|
+
regex(...args) {
|
|
12907
|
+
return this.check(_regex(...args));
|
|
12908
|
+
},
|
|
12909
|
+
includes(...args) {
|
|
12910
|
+
return this.check(_includes(...args));
|
|
12911
|
+
},
|
|
12912
|
+
startsWith(...args) {
|
|
12913
|
+
return this.check(_startsWith(...args));
|
|
12914
|
+
},
|
|
12915
|
+
endsWith(...args) {
|
|
12916
|
+
return this.check(_endsWith(...args));
|
|
12917
|
+
},
|
|
12918
|
+
min(...args) {
|
|
12919
|
+
return this.check(_minLength(...args));
|
|
12920
|
+
},
|
|
12921
|
+
max(...args) {
|
|
12922
|
+
return this.check(_maxLength(...args));
|
|
12923
|
+
},
|
|
12924
|
+
length(...args) {
|
|
12925
|
+
return this.check(_length(...args));
|
|
12926
|
+
},
|
|
12927
|
+
nonempty(...args) {
|
|
12928
|
+
return this.check(_minLength(1, ...args));
|
|
12929
|
+
},
|
|
12930
|
+
lowercase(params) {
|
|
12931
|
+
return this.check(_lowercase(params));
|
|
12932
|
+
},
|
|
12933
|
+
uppercase(params) {
|
|
12934
|
+
return this.check(_uppercase(params));
|
|
12935
|
+
},
|
|
12936
|
+
trim() {
|
|
12937
|
+
return this.check(_trim());
|
|
12938
|
+
},
|
|
12939
|
+
normalize(...args) {
|
|
12940
|
+
return this.check(_normalize(...args));
|
|
12941
|
+
},
|
|
12942
|
+
toLowerCase() {
|
|
12943
|
+
return this.check(_toLowerCase());
|
|
12944
|
+
},
|
|
12945
|
+
toUpperCase() {
|
|
12946
|
+
return this.check(_toUpperCase());
|
|
12947
|
+
},
|
|
12948
|
+
slugify() {
|
|
12949
|
+
return this.check(_slugify());
|
|
12950
|
+
}
|
|
12951
|
+
});
|
|
12308
12952
|
});
|
|
12309
12953
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
12310
12954
|
$ZodString.init(inst, def);
|
|
@@ -12383,7 +13027,7 @@ function url(params) {
|
|
|
12383
13027
|
}
|
|
12384
13028
|
function httpUrl(params) {
|
|
12385
13029
|
return _url(ZodURL, {
|
|
12386
|
-
protocol:
|
|
13030
|
+
protocol: regexes_exports.httpProtocol,
|
|
12387
13031
|
hostname: regexes_exports.domain,
|
|
12388
13032
|
...util_exports.normalizeParams(params)
|
|
12389
13033
|
});
|
|
@@ -12525,21 +13169,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
12525
13169
|
$ZodNumber.init(inst, def);
|
|
12526
13170
|
ZodType.init(inst, def);
|
|
12527
13171
|
inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
|
|
12528
|
-
inst
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12540
|
-
|
|
12541
|
-
|
|
12542
|
-
|
|
13172
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
13173
|
+
gt(value, params) {
|
|
13174
|
+
return this.check(_gt(value, params));
|
|
13175
|
+
},
|
|
13176
|
+
gte(value, params) {
|
|
13177
|
+
return this.check(_gte(value, params));
|
|
13178
|
+
},
|
|
13179
|
+
min(value, params) {
|
|
13180
|
+
return this.check(_gte(value, params));
|
|
13181
|
+
},
|
|
13182
|
+
lt(value, params) {
|
|
13183
|
+
return this.check(_lt(value, params));
|
|
13184
|
+
},
|
|
13185
|
+
lte(value, params) {
|
|
13186
|
+
return this.check(_lte(value, params));
|
|
13187
|
+
},
|
|
13188
|
+
max(value, params) {
|
|
13189
|
+
return this.check(_lte(value, params));
|
|
13190
|
+
},
|
|
13191
|
+
int(params) {
|
|
13192
|
+
return this.check(int(params));
|
|
13193
|
+
},
|
|
13194
|
+
safe(params) {
|
|
13195
|
+
return this.check(int(params));
|
|
13196
|
+
},
|
|
13197
|
+
positive(params) {
|
|
13198
|
+
return this.check(_gt(0, params));
|
|
13199
|
+
},
|
|
13200
|
+
nonnegative(params) {
|
|
13201
|
+
return this.check(_gte(0, params));
|
|
13202
|
+
},
|
|
13203
|
+
negative(params) {
|
|
13204
|
+
return this.check(_lt(0, params));
|
|
13205
|
+
},
|
|
13206
|
+
nonpositive(params) {
|
|
13207
|
+
return this.check(_lte(0, params));
|
|
13208
|
+
},
|
|
13209
|
+
multipleOf(value, params) {
|
|
13210
|
+
return this.check(_multipleOf(value, params));
|
|
13211
|
+
},
|
|
13212
|
+
step(value, params) {
|
|
13213
|
+
return this.check(_multipleOf(value, params));
|
|
13214
|
+
},
|
|
13215
|
+
finite() {
|
|
13216
|
+
return this;
|
|
13217
|
+
}
|
|
13218
|
+
});
|
|
12543
13219
|
const bag = inst._zod.bag;
|
|
12544
13220
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
12545
13221
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -12686,11 +13362,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
|
12686
13362
|
ZodType.init(inst, def);
|
|
12687
13363
|
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
12688
13364
|
inst.element = def.element;
|
|
12689
|
-
inst
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
13365
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
13366
|
+
min(n, params) {
|
|
13367
|
+
return this.check(_minLength(n, params));
|
|
13368
|
+
},
|
|
13369
|
+
nonempty(params) {
|
|
13370
|
+
return this.check(_minLength(1, params));
|
|
13371
|
+
},
|
|
13372
|
+
max(n, params) {
|
|
13373
|
+
return this.check(_maxLength(n, params));
|
|
13374
|
+
},
|
|
13375
|
+
length(n, params) {
|
|
13376
|
+
return this.check(_length(n, params));
|
|
13377
|
+
},
|
|
13378
|
+
unwrap() {
|
|
13379
|
+
return this.element;
|
|
13380
|
+
}
|
|
13381
|
+
});
|
|
12694
13382
|
});
|
|
12695
13383
|
function array(element, params) {
|
|
12696
13384
|
return _array(ZodArray, element, params);
|
|
@@ -12706,23 +13394,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
12706
13394
|
util_exports.defineLazy(inst, "shape", () => {
|
|
12707
13395
|
return def.shape;
|
|
12708
13396
|
});
|
|
12709
|
-
inst
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
13397
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
13398
|
+
keyof() {
|
|
13399
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
13400
|
+
},
|
|
13401
|
+
catchall(catchall) {
|
|
13402
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
13403
|
+
},
|
|
13404
|
+
passthrough() {
|
|
13405
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
13406
|
+
},
|
|
13407
|
+
loose() {
|
|
13408
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
13409
|
+
},
|
|
13410
|
+
strict() {
|
|
13411
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
13412
|
+
},
|
|
13413
|
+
strip() {
|
|
13414
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
13415
|
+
},
|
|
13416
|
+
extend(incoming) {
|
|
13417
|
+
return util_exports.extend(this, incoming);
|
|
13418
|
+
},
|
|
13419
|
+
safeExtend(incoming) {
|
|
13420
|
+
return util_exports.safeExtend(this, incoming);
|
|
13421
|
+
},
|
|
13422
|
+
merge(other) {
|
|
13423
|
+
return util_exports.merge(this, other);
|
|
13424
|
+
},
|
|
13425
|
+
pick(mask) {
|
|
13426
|
+
return util_exports.pick(this, mask);
|
|
13427
|
+
},
|
|
13428
|
+
omit(mask) {
|
|
13429
|
+
return util_exports.omit(this, mask);
|
|
13430
|
+
},
|
|
13431
|
+
partial(...args) {
|
|
13432
|
+
return util_exports.partial(ZodOptional, this, args[0]);
|
|
13433
|
+
},
|
|
13434
|
+
required(...args) {
|
|
13435
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
13436
|
+
}
|
|
13437
|
+
});
|
|
12726
13438
|
});
|
|
12727
13439
|
function object(shape, params) {
|
|
12728
13440
|
const def = {
|
|
@@ -12827,6 +13539,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
|
12827
13539
|
inst.valueType = def.valueType;
|
|
12828
13540
|
});
|
|
12829
13541
|
function record(keyType, valueType, params) {
|
|
13542
|
+
if (!valueType || !valueType._zod) {
|
|
13543
|
+
return new ZodRecord({
|
|
13544
|
+
type: "record",
|
|
13545
|
+
keyType: string2(),
|
|
13546
|
+
valueType: keyType,
|
|
13547
|
+
...util_exports.normalizeParams(valueType)
|
|
13548
|
+
});
|
|
13549
|
+
}
|
|
12830
13550
|
return new ZodRecord({
|
|
12831
13551
|
type: "record",
|
|
12832
13552
|
keyType,
|
|
@@ -12998,10 +13718,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
12998
13718
|
if (output instanceof Promise) {
|
|
12999
13719
|
return output.then((output2) => {
|
|
13000
13720
|
payload.value = output2;
|
|
13721
|
+
payload.fallback = true;
|
|
13001
13722
|
return payload;
|
|
13002
13723
|
});
|
|
13003
13724
|
}
|
|
13004
13725
|
payload.value = output;
|
|
13726
|
+
payload.fallback = true;
|
|
13005
13727
|
return payload;
|
|
13006
13728
|
};
|
|
13007
13729
|
});
|
|
@@ -13156,6 +13878,20 @@ function codec(in_, out, params) {
|
|
|
13156
13878
|
reverseTransform: params.encode
|
|
13157
13879
|
});
|
|
13158
13880
|
}
|
|
13881
|
+
function invertCodec(codec2) {
|
|
13882
|
+
const def = codec2._zod.def;
|
|
13883
|
+
return new ZodCodec({
|
|
13884
|
+
type: "pipe",
|
|
13885
|
+
in: def.out,
|
|
13886
|
+
out: def.in,
|
|
13887
|
+
transform: def.reverseTransform,
|
|
13888
|
+
reverseTransform: def.transform
|
|
13889
|
+
});
|
|
13890
|
+
}
|
|
13891
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
13892
|
+
ZodPipe.init(inst, def);
|
|
13893
|
+
$ZodPreprocess.init(inst, def);
|
|
13894
|
+
});
|
|
13159
13895
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
13160
13896
|
$ZodReadonly.init(inst, def);
|
|
13161
13897
|
ZodType.init(inst, def);
|
|
@@ -13235,8 +13971,8 @@ function custom(fn, _params) {
|
|
|
13235
13971
|
function refine(fn, _params = {}) {
|
|
13236
13972
|
return _refine(ZodCustom, fn, _params);
|
|
13237
13973
|
}
|
|
13238
|
-
function superRefine(fn) {
|
|
13239
|
-
return _superRefine(fn);
|
|
13974
|
+
function superRefine(fn, params) {
|
|
13975
|
+
return _superRefine(fn, params);
|
|
13240
13976
|
}
|
|
13241
13977
|
var describe2 = describe;
|
|
13242
13978
|
var meta2 = meta;
|
|
@@ -13274,10 +14010,14 @@ function json(params) {
|
|
|
13274
14010
|
return jsonSchema;
|
|
13275
14011
|
}
|
|
13276
14012
|
function preprocess(fn, schema) {
|
|
13277
|
-
return
|
|
14013
|
+
return new ZodPreprocess({
|
|
14014
|
+
type: "pipe",
|
|
14015
|
+
in: transform(fn),
|
|
14016
|
+
out: schema
|
|
14017
|
+
});
|
|
13278
14018
|
}
|
|
13279
14019
|
|
|
13280
|
-
// node_modules/.pnpm/zod@4.3
|
|
14020
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/compat.js
|
|
13281
14021
|
var ZodIssueCode = {
|
|
13282
14022
|
invalid_type: "invalid_type",
|
|
13283
14023
|
too_big: "too_big",
|
|
@@ -13303,7 +14043,7 @@ var ZodFirstPartyTypeKind;
|
|
|
13303
14043
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
|
|
13304
14044
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
13305
14045
|
|
|
13306
|
-
// node_modules/.pnpm/zod@4.3
|
|
14046
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/from-json-schema.js
|
|
13307
14047
|
var z = {
|
|
13308
14048
|
...schemas_exports2,
|
|
13309
14049
|
...checks_exports2,
|
|
@@ -13695,12 +14435,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
13695
14435
|
default:
|
|
13696
14436
|
throw new Error(`Unsupported type: ${type}`);
|
|
13697
14437
|
}
|
|
13698
|
-
if (schema.description) {
|
|
13699
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
13700
|
-
}
|
|
13701
|
-
if (schema.default !== void 0) {
|
|
13702
|
-
zodSchema = zodSchema.default(schema.default);
|
|
13703
|
-
}
|
|
13704
14438
|
return zodSchema;
|
|
13705
14439
|
}
|
|
13706
14440
|
function convertSchema(schema, ctx) {
|
|
@@ -13737,6 +14471,9 @@ function convertSchema(schema, ctx) {
|
|
|
13737
14471
|
if (schema.readOnly === true) {
|
|
13738
14472
|
baseSchema = z.readonly(baseSchema);
|
|
13739
14473
|
}
|
|
14474
|
+
if (schema.default !== void 0) {
|
|
14475
|
+
baseSchema = baseSchema.default(schema.default);
|
|
14476
|
+
}
|
|
13740
14477
|
const extraMeta = {};
|
|
13741
14478
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
13742
14479
|
for (const key of coreMetadataKeys) {
|
|
@@ -13758,26 +14495,35 @@ function convertSchema(schema, ctx) {
|
|
|
13758
14495
|
if (Object.keys(extraMeta).length > 0) {
|
|
13759
14496
|
ctx.registry.add(baseSchema, extraMeta);
|
|
13760
14497
|
}
|
|
14498
|
+
if (schema.description) {
|
|
14499
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
14500
|
+
}
|
|
13761
14501
|
return baseSchema;
|
|
13762
14502
|
}
|
|
13763
14503
|
function fromJSONSchema(schema, params) {
|
|
13764
14504
|
if (typeof schema === "boolean") {
|
|
13765
14505
|
return schema ? z.any() : z.never();
|
|
13766
14506
|
}
|
|
13767
|
-
|
|
13768
|
-
|
|
14507
|
+
let normalized;
|
|
14508
|
+
try {
|
|
14509
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
14510
|
+
} catch {
|
|
14511
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
14512
|
+
}
|
|
14513
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
14514
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
13769
14515
|
const ctx = {
|
|
13770
14516
|
version: version2,
|
|
13771
14517
|
defs,
|
|
13772
14518
|
refs: /* @__PURE__ */ new Map(),
|
|
13773
14519
|
processing: /* @__PURE__ */ new Set(),
|
|
13774
|
-
rootSchema:
|
|
14520
|
+
rootSchema: normalized,
|
|
13775
14521
|
registry: params?.registry ?? globalRegistry
|
|
13776
14522
|
};
|
|
13777
|
-
return convertSchema(
|
|
14523
|
+
return convertSchema(normalized, ctx);
|
|
13778
14524
|
}
|
|
13779
14525
|
|
|
13780
|
-
// node_modules/.pnpm/zod@4.3
|
|
14526
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/coerce.js
|
|
13781
14527
|
var coerce_exports = {};
|
|
13782
14528
|
__export(coerce_exports, {
|
|
13783
14529
|
bigint: () => bigint3,
|
|
@@ -13802,7 +14548,7 @@ function date4(params) {
|
|
|
13802
14548
|
return _coercedDate(ZodDate, params);
|
|
13803
14549
|
}
|
|
13804
14550
|
|
|
13805
|
-
// node_modules/.pnpm/zod@4.3
|
|
14551
|
+
// node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
13806
14552
|
config(en_default());
|
|
13807
14553
|
|
|
13808
14554
|
// src/core/payment-info.ts
|
|
@@ -13951,7 +14697,6 @@ var LegacyPaymentInfoSchema = external_exports.object({
|
|
|
13951
14697
|
minPrice: external_exports.string().optional(),
|
|
13952
14698
|
maxPrice: external_exports.string().optional(),
|
|
13953
14699
|
protocols: external_exports.array(external_exports.string()).optional(),
|
|
13954
|
-
// RFC §4.4 spec fields
|
|
13955
14700
|
intent: external_exports.string().optional(),
|
|
13956
14701
|
method: external_exports.string().optional(),
|
|
13957
14702
|
amount: external_exports.union([external_exports.string(), external_exports.null()]).optional(),
|
|
@@ -13972,9 +14717,8 @@ var OpenApiOperationSchema = external_exports.object({
|
|
|
13972
14717
|
description: external_exports.string().optional(),
|
|
13973
14718
|
tags: external_exports.array(external_exports.string()).optional(),
|
|
13974
14719
|
security: external_exports.array(external_exports.record(external_exports.string(), external_exports.array(external_exports.string()))).optional(),
|
|
13975
|
-
// `in` / `name` are spec-required
|
|
13976
|
-
//
|
|
13977
|
-
// non-conformant OpenAPI documents in the wild.
|
|
14720
|
+
// `in` / `name` are spec-required but kept optional so a single malformed
|
|
14721
|
+
// parameter cannot abort parsing of an otherwise-valid spec.
|
|
13978
14722
|
parameters: external_exports.array(
|
|
13979
14723
|
external_exports.object({
|
|
13980
14724
|
in: external_exports.string().optional(),
|
|
@@ -13988,7 +14732,6 @@ var OpenApiOperationSchema = external_exports.object({
|
|
|
13988
14732
|
content: external_exports.record(external_exports.string(), external_exports.object({ schema: external_exports.unknown().optional() }))
|
|
13989
14733
|
}).optional(),
|
|
13990
14734
|
responses: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
13991
|
-
// Permissive: vendor extension shape is validated at runtime, never at parse time.
|
|
13992
14735
|
"x-payment-info": external_exports.unknown().optional()
|
|
13993
14736
|
});
|
|
13994
14737
|
var OpenApiPathItemSchema = external_exports.object({
|
|
@@ -14002,7 +14745,6 @@ var OpenApiPathItemSchema = external_exports.object({
|
|
|
14002
14745
|
trace: OpenApiOperationSchema.optional()
|
|
14003
14746
|
});
|
|
14004
14747
|
var OpenApiDocSchema = external_exports.object({
|
|
14005
|
-
// TODO(zdql): We should inherit a canonical OpenAPI schema and then extend with our types.
|
|
14006
14748
|
openapi: external_exports.string(),
|
|
14007
14749
|
info: external_exports.object({
|
|
14008
14750
|
title: external_exports.string(),
|
|
@@ -14018,24 +14760,23 @@ var OpenApiDocSchema = external_exports.object({
|
|
|
14018
14760
|
"x-discovery": external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
14019
14761
|
paths: external_exports.record(external_exports.string(), OpenApiPathItemSchema)
|
|
14020
14762
|
});
|
|
14021
|
-
|
|
14022
|
-
|
|
14023
|
-
|
|
14024
|
-
|
|
14025
|
-
|
|
14026
|
-
|
|
14027
|
-
|
|
14028
|
-
|
|
14029
|
-
|
|
14030
|
-
|
|
14031
|
-
|
|
14032
|
-
|
|
14033
|
-
|
|
14034
|
-
|
|
14035
|
-
|
|
14036
|
-
|
|
14037
|
-
|
|
14038
|
-
});
|
|
14763
|
+
|
|
14764
|
+
// src/core/lib/constants.ts
|
|
14765
|
+
var HTTP_METHODS = /* @__PURE__ */ new Set([
|
|
14766
|
+
"GET",
|
|
14767
|
+
"POST",
|
|
14768
|
+
"PUT",
|
|
14769
|
+
"DELETE",
|
|
14770
|
+
"PATCH",
|
|
14771
|
+
"HEAD",
|
|
14772
|
+
"OPTIONS",
|
|
14773
|
+
"TRACE"
|
|
14774
|
+
]);
|
|
14775
|
+
var OPENAPI_EXT = {
|
|
14776
|
+
authKind: "x-agentcash-auth-kind",
|
|
14777
|
+
provenance: "x-agentcash-provenance"
|
|
14778
|
+
};
|
|
14779
|
+
var SIWX_AUTH_KIND = "siwx";
|
|
14039
14780
|
|
|
14040
14781
|
// src/core/source/openapi/utils.ts
|
|
14041
14782
|
function isRecord(value) {
|
|
@@ -14046,7 +14787,12 @@ function resolveSecurityFlags(requirements, securitySchemes) {
|
|
|
14046
14787
|
let hasSiwx = false;
|
|
14047
14788
|
for (const requirement of requirements) {
|
|
14048
14789
|
for (const schemeName of Object.keys(requirement)) {
|
|
14049
|
-
if (schemeName ===
|
|
14790
|
+
if (schemeName === SIWX_AUTH_KIND) {
|
|
14791
|
+
hasSiwx = true;
|
|
14792
|
+
continue;
|
|
14793
|
+
}
|
|
14794
|
+
const def = securitySchemes[schemeName];
|
|
14795
|
+
if (isRecord(def) && def[OPENAPI_EXT.authKind] === SIWX_AUTH_KIND) {
|
|
14050
14796
|
hasSiwx = true;
|
|
14051
14797
|
continue;
|
|
14052
14798
|
}
|
|
@@ -14054,7 +14800,6 @@ function resolveSecurityFlags(requirements, securitySchemes) {
|
|
|
14054
14800
|
hasApiKey = true;
|
|
14055
14801
|
continue;
|
|
14056
14802
|
}
|
|
14057
|
-
const def = securitySchemes[schemeName];
|
|
14058
14803
|
if (isRecord(def) && def["type"] === "apiKey") hasApiKey = true;
|
|
14059
14804
|
}
|
|
14060
14805
|
}
|
|
@@ -14062,7 +14807,9 @@ function resolveSecurityFlags(requirements, securitySchemes) {
|
|
|
14062
14807
|
}
|
|
14063
14808
|
function inferAuthMode(operation, globalSecurity, securitySchemes) {
|
|
14064
14809
|
const hasXPaymentInfo = Boolean(operation["x-payment-info"]);
|
|
14065
|
-
const
|
|
14810
|
+
const operationOptsOutOfSecurity = Array.isArray(operation.security) && operation.security.length === 0;
|
|
14811
|
+
if (operationOptsOutOfSecurity && !hasXPaymentInfo) return "unprotected";
|
|
14812
|
+
const effectiveSecurity = operation.security !== void 0 ? operation.security : globalSecurity ?? [];
|
|
14066
14813
|
const { hasApiKey, hasSiwx } = resolveSecurityFlags(effectiveSecurity, securitySchemes ?? {});
|
|
14067
14814
|
if (hasXPaymentInfo && hasApiKey) return "apiKey+paid";
|
|
14068
14815
|
if (hasXPaymentInfo) return "paid";
|
|
@@ -14071,19 +14818,6 @@ function inferAuthMode(operation, globalSecurity, securitySchemes) {
|
|
|
14071
14818
|
return void 0;
|
|
14072
14819
|
}
|
|
14073
14820
|
|
|
14074
|
-
// src/core/lib/constants.ts
|
|
14075
|
-
var HTTP_METHODS = /* @__PURE__ */ new Set([
|
|
14076
|
-
"GET",
|
|
14077
|
-
"POST",
|
|
14078
|
-
"PUT",
|
|
14079
|
-
"DELETE",
|
|
14080
|
-
"PATCH",
|
|
14081
|
-
"HEAD",
|
|
14082
|
-
"OPTIONS",
|
|
14083
|
-
"TRACE"
|
|
14084
|
-
]);
|
|
14085
|
-
var DEFAULT_MISSING_METHOD = "POST";
|
|
14086
|
-
|
|
14087
14821
|
// src/core/lib/url.ts
|
|
14088
14822
|
function ensureProtocol(target) {
|
|
14089
14823
|
const trimmed = target.trim();
|
|
@@ -14108,11 +14842,6 @@ function normalizePath(pathname) {
|
|
|
14108
14842
|
const normalized = prefixed.replace(/\/+/g, "/");
|
|
14109
14843
|
return normalized !== "/" ? normalized.replace(/\/$/, "") : "/";
|
|
14110
14844
|
}
|
|
14111
|
-
function parseMethod(value) {
|
|
14112
|
-
if (!value) return void 0;
|
|
14113
|
-
const upper = value.toUpperCase();
|
|
14114
|
-
return HTTP_METHODS.has(upper) ? upper : void 0;
|
|
14115
|
-
}
|
|
14116
14845
|
function toAbsoluteUrl(origin, value) {
|
|
14117
14846
|
try {
|
|
14118
14847
|
if (/^https?:\/\//i.test(value)) return new URL(value);
|
|
@@ -14124,9 +14853,9 @@ function toAbsoluteUrl(origin, value) {
|
|
|
14124
14853
|
|
|
14125
14854
|
// src/core/source/fetch.ts
|
|
14126
14855
|
var import_neverthrow = require("neverthrow");
|
|
14127
|
-
function toFetchError(
|
|
14128
|
-
const cause =
|
|
14129
|
-
return { cause, message: String(
|
|
14856
|
+
function toFetchError(err2) {
|
|
14857
|
+
const cause = err2 instanceof DOMException && (err2.name === "TimeoutError" || err2.name === "AbortError") ? "timeout" : "network";
|
|
14858
|
+
return { cause, message: String(err2) };
|
|
14130
14859
|
}
|
|
14131
14860
|
function fetchSafe(url2, init) {
|
|
14132
14861
|
return import_neverthrow.ResultAsync.fromPromise(fetch(url2, init), toFetchError);
|
|
@@ -14232,179 +14961,6 @@ function getOpenAPI(origin, headers, signal, specificationOverrideUrl) {
|
|
|
14232
14961
|
});
|
|
14233
14962
|
}
|
|
14234
14963
|
|
|
14235
|
-
// src/core/source/wellknown/index.ts
|
|
14236
|
-
var import_neverthrow5 = require("neverthrow");
|
|
14237
|
-
|
|
14238
|
-
// src/core/source/wellknown/x402.ts
|
|
14239
|
-
var import_neverthrow3 = require("neverthrow");
|
|
14240
|
-
function toWellKnownParsed(origin, doc) {
|
|
14241
|
-
const routes = doc.resources.flatMap((entry) => {
|
|
14242
|
-
const trimmed = entry.trim();
|
|
14243
|
-
if (!trimmed) return [];
|
|
14244
|
-
const parts = trimmed.split(/\s+/);
|
|
14245
|
-
const maybeMethod = parts.length >= 2 ? parseMethod(parts[0]) : void 0;
|
|
14246
|
-
const target = maybeMethod ? parts.slice(1).join(" ") : trimmed;
|
|
14247
|
-
const absolute = toAbsoluteUrl(origin, target);
|
|
14248
|
-
if (!absolute) return [];
|
|
14249
|
-
return [
|
|
14250
|
-
{
|
|
14251
|
-
path: normalizePath(absolute.pathname),
|
|
14252
|
-
method: maybeMethod ?? DEFAULT_MISSING_METHOD
|
|
14253
|
-
}
|
|
14254
|
-
];
|
|
14255
|
-
});
|
|
14256
|
-
return { routes, ...doc.instructions ? { instructions: doc.instructions } : {} };
|
|
14257
|
-
}
|
|
14258
|
-
async function parseBody2(response, origin, url2) {
|
|
14259
|
-
try {
|
|
14260
|
-
const payload = await response.json();
|
|
14261
|
-
const doc = WellKnownDocSchema.safeParse(payload);
|
|
14262
|
-
if (!doc.success) return null;
|
|
14263
|
-
const parsed = WellKnownParsedSchema.safeParse(toWellKnownParsed(origin, doc.data));
|
|
14264
|
-
if (!parsed.success) return null;
|
|
14265
|
-
return {
|
|
14266
|
-
raw: payload,
|
|
14267
|
-
...parsed.data,
|
|
14268
|
-
protocol: "x402",
|
|
14269
|
-
fetchedUrl: url2
|
|
14270
|
-
};
|
|
14271
|
-
} catch {
|
|
14272
|
-
return null;
|
|
14273
|
-
}
|
|
14274
|
-
}
|
|
14275
|
-
function getX402WellKnown(origin, headers, signal) {
|
|
14276
|
-
const url2 = `${origin}/.well-known/x402`;
|
|
14277
|
-
return fetchSafe(url2, {
|
|
14278
|
-
method: "GET",
|
|
14279
|
-
headers: { Accept: "application/json", ...headers },
|
|
14280
|
-
signal
|
|
14281
|
-
}).andThen((response) => {
|
|
14282
|
-
if (!response.ok) return (0, import_neverthrow3.okAsync)(null);
|
|
14283
|
-
return import_neverthrow3.ResultAsync.fromSafePromise(parseBody2(response, origin, url2));
|
|
14284
|
-
});
|
|
14285
|
-
}
|
|
14286
|
-
|
|
14287
|
-
// src/core/source/wellknown/mpp.ts
|
|
14288
|
-
var import_neverthrow4 = require("neverthrow");
|
|
14289
|
-
var MppEndpointSchema = external_exports.object({
|
|
14290
|
-
method: external_exports.string(),
|
|
14291
|
-
path: external_exports.string(),
|
|
14292
|
-
description: external_exports.string().optional(),
|
|
14293
|
-
payment: external_exports.object({
|
|
14294
|
-
intent: external_exports.string().optional(),
|
|
14295
|
-
method: external_exports.string().optional(),
|
|
14296
|
-
amount: external_exports.string().optional(),
|
|
14297
|
-
currency: external_exports.string().optional()
|
|
14298
|
-
}).optional()
|
|
14299
|
-
});
|
|
14300
|
-
var MppWellKnownDocSchema = external_exports.object({
|
|
14301
|
-
version: external_exports.number().optional(),
|
|
14302
|
-
name: external_exports.string().optional(),
|
|
14303
|
-
description: external_exports.string().optional(),
|
|
14304
|
-
categories: external_exports.array(external_exports.string()).optional(),
|
|
14305
|
-
methods: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
14306
|
-
endpoints: external_exports.array(MppEndpointSchema).default([]),
|
|
14307
|
-
docs: external_exports.object({
|
|
14308
|
-
homepage: external_exports.string().optional(),
|
|
14309
|
-
apiReference: external_exports.string().optional()
|
|
14310
|
-
}).optional()
|
|
14311
|
-
});
|
|
14312
|
-
var MPP_DECIMALS = 6;
|
|
14313
|
-
function formatMppAmount(raw) {
|
|
14314
|
-
if (!raw) return void 0;
|
|
14315
|
-
const n = Number(raw);
|
|
14316
|
-
if (!Number.isFinite(n)) return void 0;
|
|
14317
|
-
return `$${(n / 10 ** MPP_DECIMALS).toFixed(MPP_DECIMALS)}`;
|
|
14318
|
-
}
|
|
14319
|
-
function toWellKnownParsed2(doc) {
|
|
14320
|
-
const routes = doc.endpoints.flatMap((entry) => {
|
|
14321
|
-
const method = parseMethod(entry.method);
|
|
14322
|
-
if (!method) return [];
|
|
14323
|
-
const path = normalizePath(entry.path);
|
|
14324
|
-
if (!path) return [];
|
|
14325
|
-
const price = formatMppAmount(entry.payment?.amount);
|
|
14326
|
-
return [{ path, method, ...price ? { price } : {} }];
|
|
14327
|
-
});
|
|
14328
|
-
return {
|
|
14329
|
-
routes,
|
|
14330
|
-
...doc.description ? { instructions: doc.description } : {}
|
|
14331
|
-
};
|
|
14332
|
-
}
|
|
14333
|
-
async function parseBody3(response, url2) {
|
|
14334
|
-
try {
|
|
14335
|
-
const payload = await response.json();
|
|
14336
|
-
const doc = MppWellKnownDocSchema.safeParse(payload);
|
|
14337
|
-
if (!doc.success) return null;
|
|
14338
|
-
const parsed = WellKnownParsedSchema.safeParse(toWellKnownParsed2(doc.data));
|
|
14339
|
-
if (!parsed.success) return null;
|
|
14340
|
-
return {
|
|
14341
|
-
raw: payload,
|
|
14342
|
-
...parsed.data,
|
|
14343
|
-
...doc.data.name ? { title: doc.data.name } : {},
|
|
14344
|
-
...doc.data.description ? { description: doc.data.description } : {},
|
|
14345
|
-
protocol: "mpp",
|
|
14346
|
-
fetchedUrl: url2
|
|
14347
|
-
};
|
|
14348
|
-
} catch {
|
|
14349
|
-
return null;
|
|
14350
|
-
}
|
|
14351
|
-
}
|
|
14352
|
-
function getMppWellKnown(origin, headers, signal) {
|
|
14353
|
-
const url2 = `${origin}/.well-known/mpp`;
|
|
14354
|
-
return fetchSafe(url2, {
|
|
14355
|
-
method: "GET",
|
|
14356
|
-
headers: { Accept: "application/json", ...headers },
|
|
14357
|
-
signal
|
|
14358
|
-
}).andThen((response) => {
|
|
14359
|
-
if (!response.ok) return (0, import_neverthrow4.okAsync)(null);
|
|
14360
|
-
return import_neverthrow4.ResultAsync.fromSafePromise(parseBody3(response, url2));
|
|
14361
|
-
});
|
|
14362
|
-
}
|
|
14363
|
-
|
|
14364
|
-
// src/core/source/wellknown/index.ts
|
|
14365
|
-
function mergeError(a, b) {
|
|
14366
|
-
return {
|
|
14367
|
-
cause: a.cause === "network" || b.cause === "network" ? "network" : "timeout",
|
|
14368
|
-
message: `x402: ${a.message} | mpp: ${b.message}`
|
|
14369
|
-
};
|
|
14370
|
-
}
|
|
14371
|
-
function merge2(x402, mpp) {
|
|
14372
|
-
const seen = /* @__PURE__ */ new Set();
|
|
14373
|
-
const routes = [...x402.routes, ...mpp.routes].filter((r) => {
|
|
14374
|
-
const key = `${r.method} ${r.path}`;
|
|
14375
|
-
if (seen.has(key)) return false;
|
|
14376
|
-
seen.add(key);
|
|
14377
|
-
return true;
|
|
14378
|
-
});
|
|
14379
|
-
return {
|
|
14380
|
-
raw: { ...mpp.raw, ...x402.raw },
|
|
14381
|
-
routes,
|
|
14382
|
-
protocol: "x402+mpp",
|
|
14383
|
-
// Prefer x402 instructions; fall back to mpp
|
|
14384
|
-
...x402.instructions || mpp.instructions ? { instructions: x402.instructions ?? mpp.instructions } : {},
|
|
14385
|
-
fetchedUrl: x402.fetchedUrl
|
|
14386
|
-
};
|
|
14387
|
-
}
|
|
14388
|
-
function getWellKnown(origin, headers, signal) {
|
|
14389
|
-
return new import_neverthrow5.ResultAsync(
|
|
14390
|
-
Promise.all([
|
|
14391
|
-
getX402WellKnown(origin, headers, signal),
|
|
14392
|
-
getMppWellKnown(origin, headers, signal)
|
|
14393
|
-
]).then(([x402Result, mppResult]) => {
|
|
14394
|
-
const x402 = x402Result.isOk() ? x402Result.value : null;
|
|
14395
|
-
const mpp = mppResult.isOk() ? mppResult.value : null;
|
|
14396
|
-
if (x402 && mpp) return (0, import_neverthrow5.ok)(merge2(x402, mpp));
|
|
14397
|
-
if (x402) return (0, import_neverthrow5.ok)(x402);
|
|
14398
|
-
if (mpp) return (0, import_neverthrow5.ok)(mpp);
|
|
14399
|
-
if (x402Result.isErr() && mppResult.isErr())
|
|
14400
|
-
return (0, import_neverthrow5.err)(mergeError(x402Result.error, mppResult.error));
|
|
14401
|
-
if (x402Result.isErr()) return (0, import_neverthrow5.err)(x402Result.error);
|
|
14402
|
-
if (mppResult.isErr()) return (0, import_neverthrow5.err)(mppResult.error);
|
|
14403
|
-
return (0, import_neverthrow5.ok)(null);
|
|
14404
|
-
})
|
|
14405
|
-
);
|
|
14406
|
-
}
|
|
14407
|
-
|
|
14408
14964
|
// src/core/layers/l2.ts
|
|
14409
14965
|
function formatPrice2(pricing) {
|
|
14410
14966
|
const sym = pricing.currency ?? "USD";
|
|
@@ -14439,28 +14995,6 @@ function checkL2ForOpenAPI(openApi) {
|
|
|
14439
14995
|
source: "openapi"
|
|
14440
14996
|
};
|
|
14441
14997
|
}
|
|
14442
|
-
var WELL_KNOWN_PROTOCOLS = {
|
|
14443
|
-
x402: ["x402"],
|
|
14444
|
-
mpp: ["mpp"],
|
|
14445
|
-
"x402+mpp": ["x402", "mpp"]
|
|
14446
|
-
};
|
|
14447
|
-
function checkL2ForWellknown(wellKnown) {
|
|
14448
|
-
const protocols = WELL_KNOWN_PROTOCOLS[wellKnown.protocol];
|
|
14449
|
-
const routes = wellKnown.routes.map((route) => ({
|
|
14450
|
-
path: route.path,
|
|
14451
|
-
method: route.method,
|
|
14452
|
-
summary: `${route.method} ${route.path}`,
|
|
14453
|
-
authMode: "paid",
|
|
14454
|
-
protocols,
|
|
14455
|
-
...route.price ? { price: route.price } : {}
|
|
14456
|
-
}));
|
|
14457
|
-
return {
|
|
14458
|
-
...wellKnown.title ? { title: wellKnown.title } : {},
|
|
14459
|
-
...wellKnown.description ? { description: wellKnown.description } : {},
|
|
14460
|
-
routes,
|
|
14461
|
-
source: `well-known/${wellKnown.protocol}`
|
|
14462
|
-
};
|
|
14463
|
-
}
|
|
14464
14998
|
|
|
14465
14999
|
// src/core/layers/l4.ts
|
|
14466
15000
|
function checkL4ForOpenAPI(openApi) {
|
|
@@ -14469,22 +15003,12 @@ function checkL4ForOpenAPI(openApi) {
|
|
|
14469
15003
|
}
|
|
14470
15004
|
return null;
|
|
14471
15005
|
}
|
|
14472
|
-
function checkL4ForWellknown(wellKnown) {
|
|
14473
|
-
if (wellKnown.instructions) {
|
|
14474
|
-
return { guidance: wellKnown.instructions, source: `well-known/${wellKnown.protocol}` };
|
|
14475
|
-
}
|
|
14476
|
-
return null;
|
|
14477
|
-
}
|
|
14478
15006
|
|
|
14479
15007
|
// src/audit/codes.ts
|
|
14480
15008
|
var AUDIT_CODES = {
|
|
14481
|
-
// ─── Source presence ─────────────────────────────────────────────────────────
|
|
14482
15009
|
OPENAPI_NOT_FOUND: "OPENAPI_NOT_FOUND",
|
|
14483
|
-
WELLKNOWN_NOT_FOUND: "WELLKNOWN_NOT_FOUND",
|
|
14484
|
-
// ─── OpenAPI quality ─────────────────────────────────────────────────────────
|
|
14485
15010
|
OPENAPI_PARSE_ERROR: "OPENAPI_PARSE_ERROR",
|
|
14486
15011
|
OPENAPI_NO_ROUTES: "OPENAPI_NO_ROUTES",
|
|
14487
|
-
// ─── L2 route-list checks ────────────────────────────────────────────────────
|
|
14488
15012
|
L2_NO_ROUTES: "L2_NO_ROUTES",
|
|
14489
15013
|
L2_ROUTE_COUNT_HIGH: "L2_ROUTE_COUNT_HIGH",
|
|
14490
15014
|
L2_AUTH_MODE_MISSING: "L2_AUTH_MODE_MISSING",
|
|
@@ -14497,16 +15021,14 @@ var AUDIT_CODES = {
|
|
|
14497
15021
|
L2_PROTOCOLS_MISSING_ON_PAID: "L2_PROTOCOLS_MISSING_ON_PAID",
|
|
14498
15022
|
L2_X402_MALFORMED: "L2_X402_MALFORMED",
|
|
14499
15023
|
L2_MPP_MALFORMED: "L2_MPP_MALFORMED",
|
|
14500
|
-
|
|
15024
|
+
LEGACY_WELL_KNOWN_FOUND: "LEGACY_WELL_KNOWN_FOUND",
|
|
14501
15025
|
L3_NOT_FOUND: "L3_NOT_FOUND",
|
|
14502
15026
|
L3_INPUT_SCHEMA_MISSING: "L3_INPUT_SCHEMA_MISSING",
|
|
14503
15027
|
L3_AUTH_MODE_MISSING: "L3_AUTH_MODE_MISSING",
|
|
14504
15028
|
L3_PROTOCOLS_MISSING_ON_PAID: "L3_PROTOCOLS_MISSING_ON_PAID",
|
|
14505
15029
|
L3_PAYMENT_OPTIONS_MISSING_ON_PAID: "L3_PAYMENT_OPTIONS_MISSING_ON_PAID",
|
|
14506
|
-
// ─── L4 guidance checks ──────────────────────────────────────────────────────
|
|
14507
15030
|
L4_GUIDANCE_MISSING: "L4_GUIDANCE_MISSING",
|
|
14508
15031
|
L4_GUIDANCE_TOO_LONG: "L4_GUIDANCE_TOO_LONG",
|
|
14509
|
-
// ─── MPP WWW-Authenticate header checks ──────────────────────────────────────
|
|
14510
15032
|
MPP_HEADER_MISSING: "MPP_HEADER_MISSING",
|
|
14511
15033
|
MPP_NO_PAYMENT_CHALLENGES: "MPP_NO_PAYMENT_CHALLENGES",
|
|
14512
15034
|
MPP_CHALLENGE_ID_MISSING: "MPP_CHALLENGE_ID_MISSING",
|
|
@@ -14652,19 +15174,6 @@ ${details}`,
|
|
|
14652
15174
|
}
|
|
14653
15175
|
return warnings;
|
|
14654
15176
|
}
|
|
14655
|
-
function getWarningsForWellKnown(wellKnown) {
|
|
14656
|
-
if (wellKnown === null) {
|
|
14657
|
-
return [
|
|
14658
|
-
{
|
|
14659
|
-
code: AUDIT_CODES.WELLKNOWN_NOT_FOUND,
|
|
14660
|
-
severity: "info",
|
|
14661
|
-
message: "No /.well-known/x402 resource found at this origin.",
|
|
14662
|
-
hint: "Expose /.well-known/x402 as a fallback for agents that cannot read OpenAPI."
|
|
14663
|
-
}
|
|
14664
|
-
];
|
|
14665
|
-
}
|
|
14666
|
-
return [];
|
|
14667
|
-
}
|
|
14668
15177
|
|
|
14669
15178
|
// src/audit/warnings/l2.ts
|
|
14670
15179
|
var KNOWN_PRICING_MODES = /* @__PURE__ */ new Set(["fixed", "dynamic"]);
|
|
@@ -14704,7 +15213,7 @@ function getWarningsForL2(l2) {
|
|
|
14704
15213
|
code: AUDIT_CODES.L2_AUTH_MODE_MISSING,
|
|
14705
15214
|
severity: "warn",
|
|
14706
15215
|
message: `Route ${loc} is missing an auth mode declaration.`,
|
|
14707
|
-
hint: "
|
|
15216
|
+
hint: "Reference a security scheme, add x-payment-info, or set `security: []` on the operation to mark it as explicitly public.",
|
|
14708
15217
|
path: route.path
|
|
14709
15218
|
});
|
|
14710
15219
|
}
|
|
@@ -14975,7 +15484,8 @@ function validateWithCoinbaseSchema(body) {
|
|
|
14975
15484
|
code: VALIDATION_CODES.COINBASE_SCHEMA_INVALID,
|
|
14976
15485
|
severity: "error",
|
|
14977
15486
|
message: `Coinbase schema validation failed at ${path}: ${issue2.message}`,
|
|
14978
|
-
path
|
|
15487
|
+
path,
|
|
15488
|
+
stage: "payment_required"
|
|
14979
15489
|
};
|
|
14980
15490
|
});
|
|
14981
15491
|
}
|
|
@@ -15217,7 +15727,8 @@ function validateWithCoinbaseSchema2(body) {
|
|
|
15217
15727
|
code: VALIDATION_CODES.COINBASE_SCHEMA_INVALID,
|
|
15218
15728
|
severity: "error",
|
|
15219
15729
|
message: `Coinbase schema validation failed at ${path}: ${issue2.message}`,
|
|
15220
|
-
path
|
|
15730
|
+
path,
|
|
15731
|
+
stage: "payment_required"
|
|
15221
15732
|
};
|
|
15222
15733
|
});
|
|
15223
15734
|
}
|
|
@@ -15381,7 +15892,8 @@ function getWarningsFor402Body(body) {
|
|
|
15381
15892
|
code: VALIDATION_CODES.X402_NOT_OBJECT,
|
|
15382
15893
|
severity: "error",
|
|
15383
15894
|
message: "Payment required payload must be a JSON object",
|
|
15384
|
-
path: "$"
|
|
15895
|
+
path: "$",
|
|
15896
|
+
stage: "payment_required"
|
|
15385
15897
|
}
|
|
15386
15898
|
];
|
|
15387
15899
|
}
|
|
@@ -15392,7 +15904,8 @@ function getWarningsFor402Body(body) {
|
|
|
15392
15904
|
code: versionRaw === void 0 ? VALIDATION_CODES.X402_VERSION_MISSING : VALIDATION_CODES.X402_VERSION_UNSUPPORTED,
|
|
15393
15905
|
severity: "error",
|
|
15394
15906
|
message: versionRaw === void 0 ? "x402Version is required" : `Unsupported x402Version '${String(versionRaw)}'`,
|
|
15395
|
-
path: "x402Version"
|
|
15907
|
+
path: "x402Version",
|
|
15908
|
+
stage: "payment_required"
|
|
15396
15909
|
}
|
|
15397
15910
|
];
|
|
15398
15911
|
}
|
|
@@ -15463,16 +15976,7 @@ function getWarningsFor402Body(body) {
|
|
|
15463
15976
|
stage: "payment_required"
|
|
15464
15977
|
});
|
|
15465
15978
|
}
|
|
15466
|
-
return [
|
|
15467
|
-
...coinbaseIssues,
|
|
15468
|
-
...issues.map((issue2) => ({
|
|
15469
|
-
code: issue2.code,
|
|
15470
|
-
severity: issue2.severity,
|
|
15471
|
-
message: issue2.message,
|
|
15472
|
-
...issue2.hint ? { hint: issue2.hint } : {},
|
|
15473
|
-
...issue2.path ? { path: issue2.path } : {}
|
|
15474
|
-
}))
|
|
15475
|
-
];
|
|
15979
|
+
return [...coinbaseIssues, ...issues];
|
|
15476
15980
|
}
|
|
15477
15981
|
function getWarningsForL3(l3) {
|
|
15478
15982
|
if (l3 === null) {
|
|
@@ -15491,7 +15995,7 @@ function getWarningsForL3(l3) {
|
|
|
15491
15995
|
code: AUDIT_CODES.L3_AUTH_MODE_MISSING,
|
|
15492
15996
|
severity: "warn",
|
|
15493
15997
|
message: "Endpoint has no auth mode in the spec.",
|
|
15494
|
-
hint: "
|
|
15998
|
+
hint: "Reference a security scheme, add x-payment-info, or set `security: []` on the operation to mark it as explicitly public."
|
|
15495
15999
|
});
|
|
15496
16000
|
}
|
|
15497
16001
|
if (l3.authMode === "paid" && !l3.inputSchema) {
|
|
@@ -15554,7 +16058,7 @@ function getWarningsForL4(l4) {
|
|
|
15554
16058
|
}
|
|
15555
16059
|
|
|
15556
16060
|
// src/audit/warnings/favicon.ts
|
|
15557
|
-
var
|
|
16061
|
+
var import_neverthrow3 = require("neverthrow");
|
|
15558
16062
|
var COMMON_PATHS = ["/favicon.ico", "/favicon.png", "/favicon.svg"];
|
|
15559
16063
|
var TIMEOUT = AbortSignal.timeout(5e3);
|
|
15560
16064
|
function isImage(res) {
|
|
@@ -15562,12 +16066,12 @@ function isImage(res) {
|
|
|
15562
16066
|
}
|
|
15563
16067
|
function checkUrl(url2) {
|
|
15564
16068
|
return fetchSafe(url2, { method: "HEAD", signal: TIMEOUT }).andThen((res) => {
|
|
15565
|
-
if (res.ok) return (0,
|
|
16069
|
+
if (res.ok) return (0, import_neverthrow3.okAsync)(isImage(res));
|
|
15566
16070
|
if (res.status === 405 || res.status === 403) {
|
|
15567
16071
|
return fetchSafe(url2, { signal: TIMEOUT }).map((getRes) => getRes.ok && isImage(getRes));
|
|
15568
16072
|
}
|
|
15569
|
-
return (0,
|
|
15570
|
-
}).orElse(() => (0,
|
|
16073
|
+
return (0, import_neverthrow3.okAsync)(false);
|
|
16074
|
+
}).orElse(() => (0, import_neverthrow3.okAsync)(false));
|
|
15571
16075
|
}
|
|
15572
16076
|
function resolveHref(href, origin) {
|
|
15573
16077
|
if (href.startsWith("//")) return `https:${href}`;
|
|
@@ -15596,15 +16100,15 @@ function extractIconHrefs(html, origin) {
|
|
|
15596
16100
|
function getHtmlIconHrefs(origin) {
|
|
15597
16101
|
return fetchSafe(origin, { signal: TIMEOUT }).andThen((res) => {
|
|
15598
16102
|
if (!res.ok || !(res.headers.get("content-type") ?? "").includes("text/html"))
|
|
15599
|
-
return (0,
|
|
15600
|
-
return
|
|
15601
|
-
}).map((html) => html ? extractIconHrefs(html, origin) : []).orElse(() => (0,
|
|
16103
|
+
return (0, import_neverthrow3.okAsync)("");
|
|
16104
|
+
return import_neverthrow3.ResultAsync.fromSafePromise(res.text());
|
|
16105
|
+
}).map((html) => html ? extractIconHrefs(html, origin) : []).orElse(() => (0, import_neverthrow3.okAsync)([]));
|
|
15602
16106
|
}
|
|
15603
16107
|
function checkFavicon(origin) {
|
|
15604
16108
|
const normalizedOrigin = origin.replace(/\/$/, "");
|
|
15605
16109
|
return getHtmlIconHrefs(normalizedOrigin).andThen((hrefs) => {
|
|
15606
16110
|
const candidates = [...hrefs, ...COMMON_PATHS.map((p) => `${normalizedOrigin}${p}`)];
|
|
15607
|
-
return
|
|
16111
|
+
return import_neverthrow3.ResultAsync.fromSafePromise(
|
|
15608
16112
|
Promise.all(candidates.map((url2) => checkUrl(url2).then((r) => r.isOk() && r.value))).then(
|
|
15609
16113
|
(results) => results.some(Boolean)
|
|
15610
16114
|
)
|
|
@@ -15625,8 +16129,42 @@ function getWarningsForFavicon(origin) {
|
|
|
15625
16129
|
});
|
|
15626
16130
|
}
|
|
15627
16131
|
|
|
16132
|
+
// src/audit/legacy-well-known.ts
|
|
16133
|
+
var import_neverthrow4 = require("neverthrow");
|
|
16134
|
+
async function exists(url2, headers, signal) {
|
|
16135
|
+
const result = await fetchSafe(url2, {
|
|
16136
|
+
method: "GET",
|
|
16137
|
+
headers: { Accept: "application/json", ...headers },
|
|
16138
|
+
signal
|
|
16139
|
+
});
|
|
16140
|
+
if (result.isErr()) return false;
|
|
16141
|
+
return result.value.ok;
|
|
16142
|
+
}
|
|
16143
|
+
function probeLegacyWellKnown(origin, headers, signal) {
|
|
16144
|
+
return import_neverthrow4.ResultAsync.fromSafePromise(
|
|
16145
|
+
Promise.all([
|
|
16146
|
+
exists(`${origin}/.well-known/x402`, headers, signal),
|
|
16147
|
+
exists(`${origin}/.well-known/mpp`, headers, signal)
|
|
16148
|
+
]).then(([x402, mpp]) => ({ x402, mpp }))
|
|
16149
|
+
);
|
|
16150
|
+
}
|
|
16151
|
+
function getWarningsForLegacyWellKnown(probe) {
|
|
16152
|
+
const paths = [];
|
|
16153
|
+
if (probe.x402) paths.push("/.well-known/x402");
|
|
16154
|
+
if (probe.mpp) paths.push("/.well-known/mpp");
|
|
16155
|
+
if (paths.length === 0) return [];
|
|
16156
|
+
return [
|
|
16157
|
+
{
|
|
16158
|
+
code: AUDIT_CODES.LEGACY_WELL_KNOWN_FOUND,
|
|
16159
|
+
severity: "info",
|
|
16160
|
+
message: `Legacy discovery document detected at ${paths.join(" and ")}. agentcash-discovery no longer parses these.`,
|
|
16161
|
+
hint: "Publish an OpenAPI spec at /openapi.json to be discovered."
|
|
16162
|
+
}
|
|
16163
|
+
];
|
|
16164
|
+
}
|
|
16165
|
+
|
|
15628
16166
|
// src/core/source/probe/index.ts
|
|
15629
|
-
var
|
|
16167
|
+
var import_neverthrow6 = require("neverthrow");
|
|
15630
16168
|
|
|
15631
16169
|
// src/core/protocols/x402/index.ts
|
|
15632
16170
|
function parseVersion(payload) {
|
|
@@ -15661,12 +16199,10 @@ function extractSchemas3(payload) {
|
|
|
15661
16199
|
return {};
|
|
15662
16200
|
}
|
|
15663
16201
|
function parseInputSchema(payload) {
|
|
15664
|
-
|
|
15665
|
-
return schema;
|
|
16202
|
+
return extractSchemas3(payload).inputSchema;
|
|
15666
16203
|
}
|
|
15667
16204
|
function parseOutputSchema(payload) {
|
|
15668
|
-
|
|
15669
|
-
return schema;
|
|
16205
|
+
return extractSchemas3(payload).outputSchema;
|
|
15670
16206
|
}
|
|
15671
16207
|
|
|
15672
16208
|
// src/core/protocols/x402/v1/parse-payment-required.ts
|
|
@@ -15677,9 +16213,9 @@ async function parsePaymentRequiredBody(response) {
|
|
|
15677
16213
|
}
|
|
15678
16214
|
|
|
15679
16215
|
// src/core/lib/base64.ts
|
|
15680
|
-
var
|
|
16216
|
+
var import_neverthrow5 = require("neverthrow");
|
|
15681
16217
|
function safeBase64DecodeUtf8(encoded) {
|
|
15682
|
-
return
|
|
16218
|
+
return import_neverthrow5.Result.fromThrowable(
|
|
15683
16219
|
() => {
|
|
15684
16220
|
if (typeof Buffer !== "undefined") {
|
|
15685
16221
|
return Buffer.from(encoded, "base64").toString("utf8");
|
|
@@ -15747,8 +16283,8 @@ function probeMethod(url2, method, path, headers, signal, inputBody) {
|
|
|
15747
16283
|
...hasBody ? { body: JSON.stringify(inputBody) } : {},
|
|
15748
16284
|
signal
|
|
15749
16285
|
}).andThen((response) => {
|
|
15750
|
-
if (!isUsableStatus(response.status)) return
|
|
15751
|
-
return
|
|
16286
|
+
if (!isUsableStatus(response.status)) return import_neverthrow6.ResultAsync.fromSafePromise(Promise.resolve(null));
|
|
16287
|
+
return import_neverthrow6.ResultAsync.fromSafePromise(
|
|
15752
16288
|
(async () => {
|
|
15753
16289
|
let authHint = response.status === 402 ? "paid" : "unprotected";
|
|
15754
16290
|
let paymentRequiredBody;
|
|
@@ -15779,7 +16315,7 @@ function probeMethod(url2, method, path, headers, signal, inputBody) {
|
|
|
15779
16315
|
}
|
|
15780
16316
|
function getProbe(url2, headers, signal, inputBody) {
|
|
15781
16317
|
const path = normalizePath(new URL(url2).pathname || "/");
|
|
15782
|
-
return
|
|
16318
|
+
return import_neverthrow6.ResultAsync.fromSafePromise(
|
|
15783
16319
|
Promise.all(
|
|
15784
16320
|
[...HTTP_METHODS].map(
|
|
15785
16321
|
(method) => probeMethod(url2, method, path, headers, signal, inputBody).match(
|
|
@@ -15792,9 +16328,9 @@ function getProbe(url2, headers, signal, inputBody) {
|
|
|
15792
16328
|
}
|
|
15793
16329
|
|
|
15794
16330
|
// src/core/protocols/mpp/index.ts
|
|
15795
|
-
var
|
|
16331
|
+
var import_neverthrow7 = require("neverthrow");
|
|
15796
16332
|
function parseBase64Json(encoded) {
|
|
15797
|
-
return
|
|
16333
|
+
return import_neverthrow7.Result.fromThrowable(
|
|
15798
16334
|
() => {
|
|
15799
16335
|
const decoded = safeBase64DecodeUtf8(encoded);
|
|
15800
16336
|
if (decoded.isErr()) throw decoded.error;
|
|
@@ -15963,6 +16499,10 @@ function resolveOperationPaymentInfo(operation) {
|
|
|
15963
16499
|
...names.length > 0 ? { protocols: names } : {}
|
|
15964
16500
|
};
|
|
15965
16501
|
}
|
|
16502
|
+
function extractSecurityRequirements(raw) {
|
|
16503
|
+
if (!Array.isArray(raw)) return void 0;
|
|
16504
|
+
return raw.filter((entry) => isRecord(entry));
|
|
16505
|
+
}
|
|
15966
16506
|
function getL3ForOpenAPI(openApi, path, method) {
|
|
15967
16507
|
const document = openApi.raw;
|
|
15968
16508
|
const paths = isRecord(document.paths) ? document.paths : void 0;
|
|
@@ -15974,10 +16514,13 @@ function getL3ForOpenAPI(openApi, path, method) {
|
|
|
15974
16514
|
const resolvedOperation = resolveRefs(operation, document);
|
|
15975
16515
|
const summary = typeof resolvedOperation.summary === "string" ? resolvedOperation.summary : typeof resolvedOperation.description === "string" ? resolvedOperation.description : void 0;
|
|
15976
16516
|
const paymentResolved = resolveOperationPaymentInfo(resolvedOperation);
|
|
16517
|
+
const globalSecurity = extractSecurityRequirements(document.security);
|
|
16518
|
+
const components = isRecord(document.components) ? document.components : void 0;
|
|
16519
|
+
const securitySchemes = isRecord(components?.securitySchemes) ? components.securitySchemes : void 0;
|
|
15977
16520
|
return {
|
|
15978
16521
|
source: "openapi",
|
|
15979
16522
|
...summary ? { summary } : {},
|
|
15980
|
-
authMode: inferAuthMode(resolvedOperation) ?? void 0,
|
|
16523
|
+
authMode: inferAuthMode(resolvedOperation, globalSecurity, securitySchemes) ?? void 0,
|
|
15981
16524
|
...paymentResolved?.price ? { estimatedPrice: paymentResolved.price } : {},
|
|
15982
16525
|
...paymentResolved?.currency ? { currency: paymentResolved.currency } : {},
|
|
15983
16526
|
...paymentResolved?.protocols ? { protocols: paymentResolved.protocols } : {},
|
|
@@ -16107,12 +16650,15 @@ function parseArgs(args) {
|
|
|
16107
16650
|
}
|
|
16108
16651
|
return { command: first ?? null, target: second ?? null, flags };
|
|
16109
16652
|
}
|
|
16110
|
-
function routeToResource(route) {
|
|
16653
|
+
function routeToResource(route, origin, source, trustTier) {
|
|
16111
16654
|
return {
|
|
16112
|
-
resourceKey: `${route.method} ${route.path}`,
|
|
16655
|
+
resourceKey: route.resourceKey ?? `${origin} ${route.method} ${route.path}`,
|
|
16656
|
+
origin,
|
|
16113
16657
|
method: route.method,
|
|
16114
16658
|
path: route.path,
|
|
16115
16659
|
summary: route.summary,
|
|
16660
|
+
source,
|
|
16661
|
+
trustTier,
|
|
16116
16662
|
...route.authMode ? { authHint: route.authMode } : {},
|
|
16117
16663
|
...route.price ? { priceHint: route.price } : {},
|
|
16118
16664
|
...route.protocols?.length ? { protocols: route.protocols } : {}
|
|
@@ -16147,7 +16693,7 @@ Discovering ${origin}...
|
|
|
16147
16693
|
...getWarningsForOpenAPI(openApiRaw),
|
|
16148
16694
|
...faviconWarnings.isOk() ? faviconWarnings.value : []
|
|
16149
16695
|
];
|
|
16150
|
-
if (openApi) {
|
|
16696
|
+
if (openApi && openApi.routes.length > 0) {
|
|
16151
16697
|
const l2 = checkL2ForOpenAPI(openApi);
|
|
16152
16698
|
const l4 = checkL4ForOpenAPI(openApi);
|
|
16153
16699
|
warnings.push(...getWarningsForL2(l2), ...getWarningsForL4(l4));
|
|
@@ -16171,7 +16717,9 @@ Discovering ${origin}...
|
|
|
16171
16717
|
{
|
|
16172
16718
|
ok: true,
|
|
16173
16719
|
selectedStage: "openapi",
|
|
16174
|
-
resources: l2.routes.map(
|
|
16720
|
+
resources: l2.routes.map(
|
|
16721
|
+
(route) => routeToResource(route, origin, "openapi", "origin_hosted")
|
|
16722
|
+
),
|
|
16175
16723
|
warnings,
|
|
16176
16724
|
trace: [],
|
|
16177
16725
|
meta: meta3
|
|
@@ -16201,61 +16749,26 @@ Guidance: ${tokens} tokens`);
|
|
|
16201
16749
|
${l4.guidance}`);
|
|
16202
16750
|
}
|
|
16203
16751
|
} else {
|
|
16204
|
-
const
|
|
16205
|
-
|
|
16206
|
-
|
|
16207
|
-
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16752
|
+
const legacyResult = await probeLegacyWellKnown(origin);
|
|
16753
|
+
if (legacyResult.isOk()) warnings.push(...getWarningsForLegacyWellKnown(legacyResult.value));
|
|
16754
|
+
if (flags.json) {
|
|
16755
|
+
console.log(
|
|
16756
|
+
JSON.stringify(
|
|
16757
|
+
{
|
|
16758
|
+
ok: false,
|
|
16759
|
+
selectedStage: null,
|
|
16760
|
+
resources: [],
|
|
16761
|
+
warnings,
|
|
16762
|
+
trace: [],
|
|
16763
|
+
meta: { origin }
|
|
16764
|
+
},
|
|
16765
|
+
null,
|
|
16766
|
+
2
|
|
16767
|
+
)
|
|
16213
16768
|
);
|
|
16214
|
-
|
|
16215
|
-
if (flags.json) {
|
|
16216
|
-
const meta3 = { origin, specUrl: wellKnown.fetchedUrl };
|
|
16217
|
-
if (l2.title) meta3.title = l2.title;
|
|
16218
|
-
if (l2.description) meta3.description = l2.description;
|
|
16219
|
-
if (l4 && flags.verbose) meta3.guidance = l4.guidance;
|
|
16220
|
-
console.log(
|
|
16221
|
-
JSON.stringify(
|
|
16222
|
-
{
|
|
16223
|
-
ok: true,
|
|
16224
|
-
selectedStage: l2.source,
|
|
16225
|
-
resources: l2.routes.map(routeToResource),
|
|
16226
|
-
warnings,
|
|
16227
|
-
trace: [],
|
|
16228
|
-
meta: meta3
|
|
16229
|
-
},
|
|
16230
|
-
null,
|
|
16231
|
-
2
|
|
16232
|
-
)
|
|
16233
|
-
);
|
|
16234
|
-
return 0;
|
|
16235
|
-
}
|
|
16236
|
-
console.log(`Source: ${l2.source}`);
|
|
16237
|
-
console.log(`Spec: ${wellKnown.fetchedUrl}`);
|
|
16238
|
-
if (l2.title) console.log(`API: ${l2.title}`);
|
|
16239
|
-
console.log(`Routes: ${l2.routes.length}
|
|
16240
|
-
`);
|
|
16241
|
-
for (const route of l2.routes) {
|
|
16242
|
-
const price = route.price ? ` ${route.price}` : "";
|
|
16243
|
-
const protocols = route.protocols?.length ? ` [${route.protocols.join(", ")}]` : "";
|
|
16244
|
-
console.log(` ${route.method.padEnd(7)} ${route.path} paid${price}${protocols}`);
|
|
16245
|
-
}
|
|
16246
|
-
} else {
|
|
16247
|
-
if (flags.json) {
|
|
16248
|
-
console.log(
|
|
16249
|
-
JSON.stringify(
|
|
16250
|
-
{ ok: false, selectedStage: null, resources: [], warnings, trace: [], meta: { origin } },
|
|
16251
|
-
null,
|
|
16252
|
-
2
|
|
16253
|
-
)
|
|
16254
|
-
);
|
|
16255
|
-
return 0;
|
|
16256
|
-
}
|
|
16257
|
-
console.log("Not found \u2014 no OpenAPI spec or /.well-known/x402 at this origin.");
|
|
16769
|
+
return 0;
|
|
16258
16770
|
}
|
|
16771
|
+
console.log("Not found \u2014 no OpenAPI spec at this origin.");
|
|
16259
16772
|
}
|
|
16260
16773
|
printWarnings(warnings, flags.verbose);
|
|
16261
16774
|
return 0;
|