@glasstrace/sdk 1.10.2 → 1.12.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/README.md +63 -8
- package/dist/async-context/index.cjs +1189 -440
- package/dist/async-context/index.cjs.map +1 -1
- package/dist/async-context/index.js +2 -2
- package/dist/{capture-error-BeuEXXJO.d.cts → capture-error-CRQSqKgd.d.cts} +2 -2
- package/dist/{capture-error-D02pzB7q.d.ts → capture-error-CqCbjoMq.d.ts} +2 -2
- package/dist/{chunk-OXM2BZMF.js → chunk-4YRYR32D.js} +2 -2
- package/dist/{chunk-XG6WR2KS.js → chunk-6NKMAKMI.js} +3 -3
- package/dist/{chunk-6RKS3DNA.js → chunk-BN5DVIUO.js} +1176 -424
- package/dist/chunk-BN5DVIUO.js.map +1 -0
- package/dist/{chunk-QS5RZ2TC.js → chunk-CZQN6G4I.js} +28 -22
- package/dist/chunk-CZQN6G4I.js.map +1 -0
- package/dist/{chunk-D54FMQHF.js → chunk-FFNGE5RR.js} +2 -2
- package/dist/{chunk-RL43PU2X.js → chunk-J3ZCVE67.js} +2 -2
- package/dist/{chunk-BSVWJSVX.js → chunk-KBHGPQZ2.js} +2 -2
- package/dist/{chunk-CIKPFJOM.js → chunk-KOYZJN6G.js} +310 -20
- package/dist/chunk-KOYZJN6G.js.map +1 -0
- package/dist/{chunk-M5GO2SSO.js → chunk-M3ZTG4P5.js} +2 -2
- package/dist/{chunk-UMGZJYC4.js → chunk-V75ZB4G4.js} +10 -5
- package/dist/chunk-V75ZB4G4.js.map +1 -0
- package/dist/{chunk-ZBQQXVHD.js → chunk-YIEXKQYP.js} +2 -67
- package/dist/chunk-YIEXKQYP.js.map +1 -0
- package/dist/{chunk-QVTONMVZ.js → chunk-ZIL2IY4C.js} +2 -2
- package/dist/cli/init.cjs +1672 -576
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +33 -20
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/mcp-add.cjs +1509 -521
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +34 -16
- package/dist/cli/mcp-add.js.map +1 -1
- package/dist/cli/status.cjs +6 -1
- package/dist/cli/status.cjs.map +1 -1
- package/dist/cli/status.js +7 -2
- package/dist/cli/status.js.map +1 -1
- package/dist/cli/uninit.cjs +6 -1
- package/dist/cli/uninit.cjs.map +1 -1
- package/dist/cli/uninit.js +4 -4
- package/dist/cli/upgrade-instructions.cjs +383 -112
- package/dist/cli/upgrade-instructions.cjs.map +1 -1
- package/dist/cli/upgrade-instructions.js +72 -20
- package/dist/cli/upgrade-instructions.js.map +1 -1
- package/dist/cli/validate.cjs +1168 -422
- package/dist/cli/validate.cjs.map +1 -1
- package/dist/cli/validate.js +2 -2
- package/dist/{correlation-id-NAapJ5jn.d.cts → correlation-id-CFpyJsKv.d.cts} +1 -1
- package/dist/{correlation-id-B_K8adD6.d.ts → correlation-id-DPXyY9-3.d.ts} +1 -1
- package/dist/edge-entry.cjs +1197 -448
- package/dist/edge-entry.cjs.map +1 -1
- package/dist/edge-entry.d.cts +2 -2
- package/dist/edge-entry.d.ts +2 -2
- package/dist/edge-entry.js +4 -4
- package/dist/index.cjs +1341 -553
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-CkTf_boH.d.cts → index.d-D-jdiIPU.d.cts} +1 -1
- package/dist/{index.d-CkTf_boH.d.ts → index.d-D-jdiIPU.d.ts} +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/dist/middleware/index.cjs +1192 -443
- package/dist/middleware/index.cjs.map +1 -1
- package/dist/middleware/index.js +2 -2
- package/dist/node-entry.cjs +1329 -551
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.d.cts +3 -3
- package/dist/node-entry.d.ts +3 -3
- package/dist/node-entry.js +8 -8
- package/dist/node-subpath.cjs +1168 -422
- package/dist/node-subpath.cjs.map +1 -1
- package/dist/node-subpath.d.cts +1 -1
- package/dist/node-subpath.d.ts +1 -1
- package/dist/node-subpath.js +3 -3
- package/dist/{source-map-uploader-CLYCE2TZ.js → source-map-uploader-K67LTPBG.js} +3 -3
- package/dist/trpc/index.cjs +1187 -438
- package/dist/trpc/index.cjs.map +1 -1
- package/dist/trpc/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-6RKS3DNA.js.map +0 -1
- package/dist/chunk-CIKPFJOM.js.map +0 -1
- package/dist/chunk-QS5RZ2TC.js.map +0 -1
- package/dist/chunk-UMGZJYC4.js.map +0 -1
- package/dist/chunk-ZBQQXVHD.js.map +0 -1
- /package/dist/{chunk-OXM2BZMF.js.map → chunk-4YRYR32D.js.map} +0 -0
- /package/dist/{chunk-XG6WR2KS.js.map → chunk-6NKMAKMI.js.map} +0 -0
- /package/dist/{chunk-D54FMQHF.js.map → chunk-FFNGE5RR.js.map} +0 -0
- /package/dist/{chunk-RL43PU2X.js.map → chunk-J3ZCVE67.js.map} +0 -0
- /package/dist/{chunk-BSVWJSVX.js.map → chunk-KBHGPQZ2.js.map} +0 -0
- /package/dist/{chunk-M5GO2SSO.js.map → chunk-M3ZTG4P5.js.map} +0 -0
- /package/dist/{chunk-QVTONMVZ.js.map → chunk-ZIL2IY4C.js.map} +0 -0
- /package/dist/{source-map-uploader-CLYCE2TZ.js.map → source-map-uploader-K67LTPBG.js.map} +0 -0
package/dist/cli/mcp-add.cjs
CHANGED
|
@@ -104,6 +104,7 @@ __export(external_exports, {
|
|
|
104
104
|
ZodOptional: () => ZodOptional,
|
|
105
105
|
ZodPipe: () => ZodPipe,
|
|
106
106
|
ZodPrefault: () => ZodPrefault,
|
|
107
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
107
108
|
ZodPromise: () => ZodPromise,
|
|
108
109
|
ZodReadonly: () => ZodReadonly,
|
|
109
110
|
ZodRealError: () => ZodRealError,
|
|
@@ -182,6 +183,7 @@ __export(external_exports, {
|
|
|
182
183
|
int32: () => int32,
|
|
183
184
|
int64: () => int64,
|
|
184
185
|
intersection: () => intersection,
|
|
186
|
+
invertCodec: () => invertCodec,
|
|
185
187
|
ipv4: () => ipv42,
|
|
186
188
|
ipv6: () => ipv62,
|
|
187
189
|
iso: () => iso_exports,
|
|
@@ -363,6 +365,7 @@ __export(core_exports2, {
|
|
|
363
365
|
$ZodOptional: () => $ZodOptional,
|
|
364
366
|
$ZodPipe: () => $ZodPipe,
|
|
365
367
|
$ZodPrefault: () => $ZodPrefault,
|
|
368
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
366
369
|
$ZodPromise: () => $ZodPromise,
|
|
367
370
|
$ZodReadonly: () => $ZodReadonly,
|
|
368
371
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -562,7 +565,8 @@ __export(core_exports2, {
|
|
|
562
565
|
});
|
|
563
566
|
|
|
564
567
|
// ../../node_modules/zod/v4/core/core.js
|
|
565
|
-
var
|
|
568
|
+
var _a;
|
|
569
|
+
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
566
570
|
status: "aborted"
|
|
567
571
|
});
|
|
568
572
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -597,10 +601,10 @@ function $constructor(name, initializer3, params) {
|
|
|
597
601
|
}
|
|
598
602
|
Object.defineProperty(Definition, "name", { value: name });
|
|
599
603
|
function _(def) {
|
|
600
|
-
var
|
|
604
|
+
var _a3;
|
|
601
605
|
const inst = params?.Parent ? new Definition() : this;
|
|
602
606
|
init(inst, def);
|
|
603
|
-
(
|
|
607
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
604
608
|
for (const fn of inst._zod.deferred) {
|
|
605
609
|
fn();
|
|
606
610
|
}
|
|
@@ -629,7 +633,8 @@ var $ZodEncodeError = class extends Error {
|
|
|
629
633
|
this.name = "ZodEncodeError";
|
|
630
634
|
}
|
|
631
635
|
};
|
|
632
|
-
|
|
636
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
637
|
+
var globalConfig = globalThis.__zod_globalConfig;
|
|
633
638
|
function config(newConfig) {
|
|
634
639
|
if (newConfig)
|
|
635
640
|
Object.assign(globalConfig, newConfig);
|
|
@@ -662,6 +667,7 @@ __export(util_exports, {
|
|
|
662
667
|
defineLazy: () => defineLazy,
|
|
663
668
|
esc: () => esc,
|
|
664
669
|
escapeRegex: () => escapeRegex,
|
|
670
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
665
671
|
extend: () => extend,
|
|
666
672
|
finalizeIssue: () => finalizeIssue,
|
|
667
673
|
floatSafeRemainder: () => floatSafeRemainder,
|
|
@@ -750,19 +756,12 @@ function cleanRegex(source) {
|
|
|
750
756
|
return source.slice(start, end);
|
|
751
757
|
}
|
|
752
758
|
function floatSafeRemainder(val, step) {
|
|
753
|
-
const
|
|
754
|
-
const
|
|
755
|
-
|
|
756
|
-
if (
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
763
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
764
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
765
|
-
return valInt % stepInt / 10 ** decCount;
|
|
759
|
+
const ratio = val / step;
|
|
760
|
+
const roundedRatio = Math.round(ratio);
|
|
761
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
762
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
763
|
+
return 0;
|
|
764
|
+
return ratio - roundedRatio;
|
|
766
765
|
}
|
|
767
766
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
768
767
|
function defineLazy(object2, key, getter) {
|
|
@@ -844,7 +843,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
|
|
|
844
843
|
function isObject(data) {
|
|
845
844
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
846
845
|
}
|
|
847
|
-
var allowsEval = cached(() => {
|
|
846
|
+
var allowsEval = /* @__PURE__ */ cached(() => {
|
|
847
|
+
if (globalConfig.jitless) {
|
|
848
|
+
return false;
|
|
849
|
+
}
|
|
848
850
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
849
851
|
return false;
|
|
850
852
|
}
|
|
@@ -877,6 +879,10 @@ function shallowClone(o) {
|
|
|
877
879
|
return { ...o };
|
|
878
880
|
if (Array.isArray(o))
|
|
879
881
|
return [...o];
|
|
882
|
+
if (o instanceof Map)
|
|
883
|
+
return new Map(o);
|
|
884
|
+
if (o instanceof Set)
|
|
885
|
+
return new Set(o);
|
|
880
886
|
return o;
|
|
881
887
|
}
|
|
882
888
|
function numKeys(data) {
|
|
@@ -933,7 +939,14 @@ var getParsedType = (data) => {
|
|
|
933
939
|
}
|
|
934
940
|
};
|
|
935
941
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
936
|
-
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
942
|
+
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
943
|
+
"string",
|
|
944
|
+
"number",
|
|
945
|
+
"bigint",
|
|
946
|
+
"boolean",
|
|
947
|
+
"symbol",
|
|
948
|
+
"undefined"
|
|
949
|
+
]);
|
|
937
950
|
function escapeRegex(str) {
|
|
938
951
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
939
952
|
}
|
|
@@ -1102,6 +1115,9 @@ function safeExtend(schema, shape) {
|
|
|
1102
1115
|
return clone(schema, def);
|
|
1103
1116
|
}
|
|
1104
1117
|
function merge(a, b) {
|
|
1118
|
+
if (a._zod.def.checks?.length) {
|
|
1119
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
1120
|
+
}
|
|
1105
1121
|
const def = mergeDefs(a._zod.def, {
|
|
1106
1122
|
get shape() {
|
|
1107
1123
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -1111,8 +1127,7 @@ function merge(a, b) {
|
|
|
1111
1127
|
get catchall() {
|
|
1112
1128
|
return b._zod.def.catchall;
|
|
1113
1129
|
},
|
|
1114
|
-
checks: []
|
|
1115
|
-
// delete existing checks
|
|
1130
|
+
checks: b._zod.def.checks ?? []
|
|
1116
1131
|
});
|
|
1117
1132
|
return clone(a, def);
|
|
1118
1133
|
}
|
|
@@ -1195,10 +1210,20 @@ function aborted(x, startIndex = 0) {
|
|
|
1195
1210
|
}
|
|
1196
1211
|
return false;
|
|
1197
1212
|
}
|
|
1213
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
1214
|
+
if (x.aborted === true)
|
|
1215
|
+
return true;
|
|
1216
|
+
for (let i = startIndex; i < x.issues.length; i++) {
|
|
1217
|
+
if (x.issues[i]?.continue === false) {
|
|
1218
|
+
return true;
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
return false;
|
|
1222
|
+
}
|
|
1198
1223
|
function prefixIssues(path2, issues) {
|
|
1199
1224
|
return issues.map((iss) => {
|
|
1200
|
-
var
|
|
1201
|
-
(
|
|
1225
|
+
var _a3;
|
|
1226
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
1202
1227
|
iss.path.unshift(path2);
|
|
1203
1228
|
return iss;
|
|
1204
1229
|
});
|
|
@@ -1207,17 +1232,14 @@ function unwrapMessage(message) {
|
|
|
1207
1232
|
return typeof message === "string" ? message : message?.message;
|
|
1208
1233
|
}
|
|
1209
1234
|
function finalizeIssue(iss, ctx, config2) {
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1235
|
+
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";
|
|
1236
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
1237
|
+
rest.path ?? (rest.path = []);
|
|
1238
|
+
rest.message = message;
|
|
1239
|
+
if (ctx?.reportInput) {
|
|
1240
|
+
rest.input = _input;
|
|
1214
1241
|
}
|
|
1215
|
-
|
|
1216
|
-
delete full.continue;
|
|
1217
|
-
if (!ctx?.reportInput) {
|
|
1218
|
-
delete full.input;
|
|
1219
|
-
}
|
|
1220
|
-
return full;
|
|
1242
|
+
return rest;
|
|
1221
1243
|
}
|
|
1222
1244
|
function getSizableOrigin(input) {
|
|
1223
1245
|
if (input instanceof Set)
|
|
@@ -1334,10 +1356,10 @@ var initializer = (inst, def) => {
|
|
|
1334
1356
|
};
|
|
1335
1357
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
1336
1358
|
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
1337
|
-
function flattenError(
|
|
1359
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
1338
1360
|
const fieldErrors = {};
|
|
1339
1361
|
const formErrors = [];
|
|
1340
|
-
for (const sub of
|
|
1362
|
+
for (const sub of error51.issues) {
|
|
1341
1363
|
if (sub.path.length > 0) {
|
|
1342
1364
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
1343
1365
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -1347,50 +1369,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
|
|
|
1347
1369
|
}
|
|
1348
1370
|
return { formErrors, fieldErrors };
|
|
1349
1371
|
}
|
|
1350
|
-
function formatError(
|
|
1372
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
1351
1373
|
const fieldErrors = { _errors: [] };
|
|
1352
|
-
const processError = (
|
|
1353
|
-
for (const issue2 of
|
|
1374
|
+
const processError = (error52, path2 = []) => {
|
|
1375
|
+
for (const issue2 of error52.issues) {
|
|
1354
1376
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1355
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
1377
|
+
issue2.errors.map((issues) => processError({ issues }, [...path2, ...issue2.path]));
|
|
1356
1378
|
} else if (issue2.code === "invalid_key") {
|
|
1357
|
-
processError({ issues: issue2.issues });
|
|
1379
|
+
processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
|
|
1358
1380
|
} else if (issue2.code === "invalid_element") {
|
|
1359
|
-
processError({ issues: issue2.issues });
|
|
1360
|
-
} else if (issue2.path.length === 0) {
|
|
1361
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
1381
|
+
processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
|
|
1362
1382
|
} else {
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1383
|
+
const fullpath = [...path2, ...issue2.path];
|
|
1384
|
+
if (fullpath.length === 0) {
|
|
1385
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
1386
|
+
} else {
|
|
1387
|
+
let curr = fieldErrors;
|
|
1388
|
+
let i = 0;
|
|
1389
|
+
while (i < fullpath.length) {
|
|
1390
|
+
const el = fullpath[i];
|
|
1391
|
+
const terminal = i === fullpath.length - 1;
|
|
1392
|
+
if (!terminal) {
|
|
1393
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
1394
|
+
} else {
|
|
1395
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
1396
|
+
curr[el]._errors.push(mapper(issue2));
|
|
1397
|
+
}
|
|
1398
|
+
curr = curr[el];
|
|
1399
|
+
i++;
|
|
1373
1400
|
}
|
|
1374
|
-
curr = curr[el];
|
|
1375
|
-
i++;
|
|
1376
1401
|
}
|
|
1377
1402
|
}
|
|
1378
1403
|
}
|
|
1379
1404
|
};
|
|
1380
|
-
processError(
|
|
1405
|
+
processError(error51);
|
|
1381
1406
|
return fieldErrors;
|
|
1382
1407
|
}
|
|
1383
|
-
function treeifyError(
|
|
1408
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
1384
1409
|
const result = { errors: [] };
|
|
1385
|
-
const processError = (
|
|
1386
|
-
var
|
|
1387
|
-
for (const issue2 of
|
|
1410
|
+
const processError = (error52, path2 = []) => {
|
|
1411
|
+
var _a3, _b;
|
|
1412
|
+
for (const issue2 of error52.issues) {
|
|
1388
1413
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1389
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
1414
|
+
issue2.errors.map((issues) => processError({ issues }, [...path2, ...issue2.path]));
|
|
1390
1415
|
} else if (issue2.code === "invalid_key") {
|
|
1391
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
1416
|
+
processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
|
|
1392
1417
|
} else if (issue2.code === "invalid_element") {
|
|
1393
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
1418
|
+
processError({ issues: issue2.issues }, [...path2, ...issue2.path]);
|
|
1394
1419
|
} else {
|
|
1395
1420
|
const fullpath = [...path2, ...issue2.path];
|
|
1396
1421
|
if (fullpath.length === 0) {
|
|
@@ -1404,7 +1429,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
1404
1429
|
const terminal = i === fullpath.length - 1;
|
|
1405
1430
|
if (typeof el === "string") {
|
|
1406
1431
|
curr.properties ?? (curr.properties = {});
|
|
1407
|
-
(
|
|
1432
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
1408
1433
|
curr = curr.properties[el];
|
|
1409
1434
|
} else {
|
|
1410
1435
|
curr.items ?? (curr.items = []);
|
|
@@ -1419,7 +1444,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
1419
1444
|
}
|
|
1420
1445
|
}
|
|
1421
1446
|
};
|
|
1422
|
-
processError(
|
|
1447
|
+
processError(error51);
|
|
1423
1448
|
return result;
|
|
1424
1449
|
}
|
|
1425
1450
|
function toDotPath(_path) {
|
|
@@ -1440,9 +1465,9 @@ function toDotPath(_path) {
|
|
|
1440
1465
|
}
|
|
1441
1466
|
return segs.join("");
|
|
1442
1467
|
}
|
|
1443
|
-
function prettifyError(
|
|
1468
|
+
function prettifyError(error51) {
|
|
1444
1469
|
const lines = [];
|
|
1445
|
-
const issues = [...
|
|
1470
|
+
const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
1446
1471
|
for (const issue2 of issues) {
|
|
1447
1472
|
lines.push(`\u2716 ${issue2.message}`);
|
|
1448
1473
|
if (issue2.path?.length)
|
|
@@ -1453,7 +1478,7 @@ function prettifyError(error48) {
|
|
|
1453
1478
|
|
|
1454
1479
|
// ../../node_modules/zod/v4/core/parse.js
|
|
1455
1480
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
1456
|
-
const ctx = _ctx ?
|
|
1481
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
1457
1482
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1458
1483
|
if (result instanceof Promise) {
|
|
1459
1484
|
throw new $ZodAsyncError();
|
|
@@ -1467,7 +1492,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
1467
1492
|
};
|
|
1468
1493
|
var parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
1469
1494
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
1470
|
-
const ctx = _ctx ?
|
|
1495
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
1471
1496
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1472
1497
|
if (result instanceof Promise)
|
|
1473
1498
|
result = await result;
|
|
@@ -1492,7 +1517,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
|
1492
1517
|
};
|
|
1493
1518
|
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
1494
1519
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1495
|
-
const ctx = _ctx ?
|
|
1520
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
1496
1521
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
1497
1522
|
if (result instanceof Promise)
|
|
1498
1523
|
result = await result;
|
|
@@ -1503,7 +1528,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1503
1528
|
};
|
|
1504
1529
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
1505
1530
|
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
1506
|
-
const ctx = _ctx ?
|
|
1531
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1507
1532
|
return _parse(_Err)(schema, value, ctx);
|
|
1508
1533
|
};
|
|
1509
1534
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -1512,7 +1537,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
|
|
|
1512
1537
|
};
|
|
1513
1538
|
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
1514
1539
|
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1515
|
-
const ctx = _ctx ?
|
|
1540
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1516
1541
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
1517
1542
|
};
|
|
1518
1543
|
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -1521,7 +1546,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1521
1546
|
};
|
|
1522
1547
|
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
1523
1548
|
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
1524
|
-
const ctx = _ctx ?
|
|
1549
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1525
1550
|
return _safeParse(_Err)(schema, value, ctx);
|
|
1526
1551
|
};
|
|
1527
1552
|
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -1530,7 +1555,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
|
1530
1555
|
};
|
|
1531
1556
|
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
1532
1557
|
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1533
|
-
const ctx = _ctx ?
|
|
1558
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
1534
1559
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
1535
1560
|
};
|
|
1536
1561
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -1563,6 +1588,7 @@ __export(regexes_exports, {
|
|
|
1563
1588
|
hex: () => hex,
|
|
1564
1589
|
hostname: () => hostname,
|
|
1565
1590
|
html5Email: () => html5Email,
|
|
1591
|
+
httpProtocol: () => httpProtocol,
|
|
1566
1592
|
idnEmail: () => idnEmail,
|
|
1567
1593
|
integer: () => integer,
|
|
1568
1594
|
ipv4: () => ipv4,
|
|
@@ -1601,7 +1627,7 @@ __export(regexes_exports, {
|
|
|
1601
1627
|
uuid7: () => uuid7,
|
|
1602
1628
|
xid: () => xid
|
|
1603
1629
|
});
|
|
1604
|
-
var cuid = /^[cC][
|
|
1630
|
+
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
1605
1631
|
var cuid2 = /^[0-9a-z]+$/;
|
|
1606
1632
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
1607
1633
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -1640,6 +1666,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
|
|
|
1640
1666
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
1641
1667
|
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])?)*\.?$/;
|
|
1642
1668
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
1669
|
+
var httpProtocol = /^https?$/;
|
|
1643
1670
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
1644
1671
|
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])))`;
|
|
1645
1672
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -1698,10 +1725,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
1698
1725
|
|
|
1699
1726
|
// ../../node_modules/zod/v4/core/checks.js
|
|
1700
1727
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
1701
|
-
var
|
|
1728
|
+
var _a3;
|
|
1702
1729
|
inst._zod ?? (inst._zod = {});
|
|
1703
1730
|
inst._zod.def = def;
|
|
1704
|
-
(
|
|
1731
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
1705
1732
|
});
|
|
1706
1733
|
var numericOriginMap = {
|
|
1707
1734
|
number: "number",
|
|
@@ -1767,8 +1794,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
1767
1794
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
1768
1795
|
$ZodCheck.init(inst, def);
|
|
1769
1796
|
inst._zod.onattach.push((inst2) => {
|
|
1770
|
-
var
|
|
1771
|
-
(
|
|
1797
|
+
var _a3;
|
|
1798
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
1772
1799
|
});
|
|
1773
1800
|
inst._zod.check = (payload) => {
|
|
1774
1801
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -1901,9 +1928,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
1901
1928
|
};
|
|
1902
1929
|
});
|
|
1903
1930
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
1904
|
-
var
|
|
1931
|
+
var _a3;
|
|
1905
1932
|
$ZodCheck.init(inst, def);
|
|
1906
|
-
(
|
|
1933
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1907
1934
|
const val = payload.value;
|
|
1908
1935
|
return !nullish(val) && val.size !== void 0;
|
|
1909
1936
|
});
|
|
@@ -1929,9 +1956,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
1929
1956
|
};
|
|
1930
1957
|
});
|
|
1931
1958
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
1932
|
-
var
|
|
1959
|
+
var _a3;
|
|
1933
1960
|
$ZodCheck.init(inst, def);
|
|
1934
|
-
(
|
|
1961
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1935
1962
|
const val = payload.value;
|
|
1936
1963
|
return !nullish(val) && val.size !== void 0;
|
|
1937
1964
|
});
|
|
@@ -1957,9 +1984,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
1957
1984
|
};
|
|
1958
1985
|
});
|
|
1959
1986
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
1960
|
-
var
|
|
1987
|
+
var _a3;
|
|
1961
1988
|
$ZodCheck.init(inst, def);
|
|
1962
|
-
(
|
|
1989
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1963
1990
|
const val = payload.value;
|
|
1964
1991
|
return !nullish(val) && val.size !== void 0;
|
|
1965
1992
|
});
|
|
@@ -1987,9 +2014,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
1987
2014
|
};
|
|
1988
2015
|
});
|
|
1989
2016
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1990
|
-
var
|
|
2017
|
+
var _a3;
|
|
1991
2018
|
$ZodCheck.init(inst, def);
|
|
1992
|
-
(
|
|
2019
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
1993
2020
|
const val = payload.value;
|
|
1994
2021
|
return !nullish(val) && val.length !== void 0;
|
|
1995
2022
|
});
|
|
@@ -2016,9 +2043,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
2016
2043
|
};
|
|
2017
2044
|
});
|
|
2018
2045
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
2019
|
-
var
|
|
2046
|
+
var _a3;
|
|
2020
2047
|
$ZodCheck.init(inst, def);
|
|
2021
|
-
(
|
|
2048
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2022
2049
|
const val = payload.value;
|
|
2023
2050
|
return !nullish(val) && val.length !== void 0;
|
|
2024
2051
|
});
|
|
@@ -2045,9 +2072,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
2045
2072
|
};
|
|
2046
2073
|
});
|
|
2047
2074
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
2048
|
-
var
|
|
2075
|
+
var _a3;
|
|
2049
2076
|
$ZodCheck.init(inst, def);
|
|
2050
|
-
(
|
|
2077
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
2051
2078
|
const val = payload.value;
|
|
2052
2079
|
return !nullish(val) && val.length !== void 0;
|
|
2053
2080
|
});
|
|
@@ -2076,7 +2103,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2076
2103
|
};
|
|
2077
2104
|
});
|
|
2078
2105
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2079
|
-
var
|
|
2106
|
+
var _a3, _b;
|
|
2080
2107
|
$ZodCheck.init(inst, def);
|
|
2081
2108
|
inst._zod.onattach.push((inst2) => {
|
|
2082
2109
|
const bag = inst2._zod.bag;
|
|
@@ -2087,7 +2114,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
2087
2114
|
}
|
|
2088
2115
|
});
|
|
2089
2116
|
if (def.pattern)
|
|
2090
|
-
(
|
|
2117
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
2091
2118
|
def.pattern.lastIndex = 0;
|
|
2092
2119
|
if (def.pattern.test(payload.value))
|
|
2093
2120
|
return;
|
|
@@ -2283,13 +2310,13 @@ var Doc = class {
|
|
|
2283
2310
|
// ../../node_modules/zod/v4/core/versions.js
|
|
2284
2311
|
var version = {
|
|
2285
2312
|
major: 4,
|
|
2286
|
-
minor:
|
|
2287
|
-
patch:
|
|
2313
|
+
minor: 4,
|
|
2314
|
+
patch: 3
|
|
2288
2315
|
};
|
|
2289
2316
|
|
|
2290
2317
|
// ../../node_modules/zod/v4/core/schemas.js
|
|
2291
2318
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
2292
|
-
var
|
|
2319
|
+
var _a3;
|
|
2293
2320
|
inst ?? (inst = {});
|
|
2294
2321
|
inst._zod.def = def;
|
|
2295
2322
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -2304,7 +2331,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2304
2331
|
}
|
|
2305
2332
|
}
|
|
2306
2333
|
if (checks.length === 0) {
|
|
2307
|
-
(
|
|
2334
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
2308
2335
|
inst._zod.deferred?.push(() => {
|
|
2309
2336
|
inst._zod.run = inst._zod.parse;
|
|
2310
2337
|
});
|
|
@@ -2314,6 +2341,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
2314
2341
|
let asyncResult;
|
|
2315
2342
|
for (const ch of checks2) {
|
|
2316
2343
|
if (ch._zod.def.when) {
|
|
2344
|
+
if (explicitlyAborted(payload))
|
|
2345
|
+
continue;
|
|
2317
2346
|
const shouldRun = ch._zod.def.when(payload);
|
|
2318
2347
|
if (!shouldRun)
|
|
2319
2348
|
continue;
|
|
@@ -2454,6 +2483,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
2454
2483
|
inst._zod.check = (payload) => {
|
|
2455
2484
|
try {
|
|
2456
2485
|
const trimmed = payload.value.trim();
|
|
2486
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
2487
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
2488
|
+
payload.issues.push({
|
|
2489
|
+
code: "invalid_format",
|
|
2490
|
+
format: "url",
|
|
2491
|
+
note: "Invalid URL format",
|
|
2492
|
+
input: payload.value,
|
|
2493
|
+
inst,
|
|
2494
|
+
continue: !def.abort
|
|
2495
|
+
});
|
|
2496
|
+
return;
|
|
2497
|
+
}
|
|
2498
|
+
}
|
|
2457
2499
|
const url2 = new URL(trimmed);
|
|
2458
2500
|
if (def.hostname) {
|
|
2459
2501
|
def.hostname.lastIndex = 0;
|
|
@@ -2607,6 +2649,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
|
2607
2649
|
function isValidBase64(data) {
|
|
2608
2650
|
if (data === "")
|
|
2609
2651
|
return true;
|
|
2652
|
+
if (/\s/.test(data))
|
|
2653
|
+
return false;
|
|
2610
2654
|
if (data.length % 4 !== 0)
|
|
2611
2655
|
return false;
|
|
2612
2656
|
try {
|
|
@@ -2799,8 +2843,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
|
|
|
2799
2843
|
$ZodType.init(inst, def);
|
|
2800
2844
|
inst._zod.pattern = _undefined;
|
|
2801
2845
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
2802
|
-
inst._zod.optin = "optional";
|
|
2803
|
-
inst._zod.optout = "optional";
|
|
2804
2846
|
inst._zod.parse = (payload, _ctx) => {
|
|
2805
2847
|
const input = payload.value;
|
|
2806
2848
|
if (typeof input === "undefined")
|
|
@@ -2929,15 +2971,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
2929
2971
|
return payload;
|
|
2930
2972
|
};
|
|
2931
2973
|
});
|
|
2932
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
2974
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
2975
|
+
const isPresent = key in input;
|
|
2933
2976
|
if (result.issues.length) {
|
|
2934
|
-
if (isOptionalOut && !
|
|
2977
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
2935
2978
|
return;
|
|
2936
2979
|
}
|
|
2937
2980
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
2938
2981
|
}
|
|
2982
|
+
if (!isPresent && !isOptionalIn) {
|
|
2983
|
+
if (!result.issues.length) {
|
|
2984
|
+
final.issues.push({
|
|
2985
|
+
code: "invalid_type",
|
|
2986
|
+
expected: "nonoptional",
|
|
2987
|
+
input: void 0,
|
|
2988
|
+
path: [key]
|
|
2989
|
+
});
|
|
2990
|
+
}
|
|
2991
|
+
return;
|
|
2992
|
+
}
|
|
2939
2993
|
if (result.value === void 0) {
|
|
2940
|
-
if (
|
|
2994
|
+
if (isPresent) {
|
|
2941
2995
|
final.value[key] = void 0;
|
|
2942
2996
|
}
|
|
2943
2997
|
} else {
|
|
@@ -2965,8 +3019,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
2965
3019
|
const keySet = def.keySet;
|
|
2966
3020
|
const _catchall = def.catchall._zod;
|
|
2967
3021
|
const t = _catchall.def.type;
|
|
3022
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
2968
3023
|
const isOptionalOut = _catchall.optout === "optional";
|
|
2969
3024
|
for (const key in input) {
|
|
3025
|
+
if (key === "__proto__")
|
|
3026
|
+
continue;
|
|
2970
3027
|
if (keySet.has(key))
|
|
2971
3028
|
continue;
|
|
2972
3029
|
if (t === "never") {
|
|
@@ -2975,9 +3032,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
2975
3032
|
}
|
|
2976
3033
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
2977
3034
|
if (r instanceof Promise) {
|
|
2978
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3035
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
2979
3036
|
} else {
|
|
2980
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3037
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
2981
3038
|
}
|
|
2982
3039
|
}
|
|
2983
3040
|
if (unrecognized.length) {
|
|
@@ -3043,12 +3100,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3043
3100
|
const shape = value.shape;
|
|
3044
3101
|
for (const key of value.keys) {
|
|
3045
3102
|
const el = shape[key];
|
|
3103
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
3046
3104
|
const isOptionalOut = el._zod.optout === "optional";
|
|
3047
3105
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3048
3106
|
if (r instanceof Promise) {
|
|
3049
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
3107
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
3050
3108
|
} else {
|
|
3051
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
3109
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
3052
3110
|
}
|
|
3053
3111
|
}
|
|
3054
3112
|
if (!catchall) {
|
|
@@ -3079,9 +3137,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3079
3137
|
const id = ids[key];
|
|
3080
3138
|
const k = esc(key);
|
|
3081
3139
|
const schema = shape[key];
|
|
3140
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
3082
3141
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
3083
3142
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
3084
|
-
if (isOptionalOut) {
|
|
3143
|
+
if (isOptionalIn && isOptionalOut) {
|
|
3085
3144
|
doc.write(`
|
|
3086
3145
|
if (${id}.issues.length) {
|
|
3087
3146
|
if (${k} in input) {
|
|
@@ -3100,6 +3159,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3100
3159
|
newResult[${k}] = ${id}.value;
|
|
3101
3160
|
}
|
|
3102
3161
|
|
|
3162
|
+
`);
|
|
3163
|
+
} else if (!isOptionalIn) {
|
|
3164
|
+
doc.write(`
|
|
3165
|
+
const ${id}_present = ${k} in input;
|
|
3166
|
+
if (${id}.issues.length) {
|
|
3167
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
3168
|
+
...iss,
|
|
3169
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
3170
|
+
})));
|
|
3171
|
+
}
|
|
3172
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
3173
|
+
payload.issues.push({
|
|
3174
|
+
code: "invalid_type",
|
|
3175
|
+
expected: "nonoptional",
|
|
3176
|
+
input: undefined,
|
|
3177
|
+
path: [${k}]
|
|
3178
|
+
});
|
|
3179
|
+
}
|
|
3180
|
+
|
|
3181
|
+
if (${id}_present) {
|
|
3182
|
+
if (${id}.value === undefined) {
|
|
3183
|
+
newResult[${k}] = undefined;
|
|
3184
|
+
} else {
|
|
3185
|
+
newResult[${k}] = ${id}.value;
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3103
3189
|
`);
|
|
3104
3190
|
} else {
|
|
3105
3191
|
doc.write(`
|
|
@@ -3193,10 +3279,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
3193
3279
|
}
|
|
3194
3280
|
return void 0;
|
|
3195
3281
|
});
|
|
3196
|
-
const
|
|
3197
|
-
const first = def.options[0]._zod.run;
|
|
3282
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3198
3283
|
inst._zod.parse = (payload, ctx) => {
|
|
3199
|
-
if (
|
|
3284
|
+
if (first) {
|
|
3200
3285
|
return first(payload, ctx);
|
|
3201
3286
|
}
|
|
3202
3287
|
let async = false;
|
|
@@ -3249,10 +3334,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
|
|
|
3249
3334
|
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
3250
3335
|
$ZodUnion.init(inst, def);
|
|
3251
3336
|
def.inclusive = false;
|
|
3252
|
-
const
|
|
3253
|
-
const first = def.options[0]._zod.run;
|
|
3337
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
3254
3338
|
inst._zod.parse = (payload, ctx) => {
|
|
3255
|
-
if (
|
|
3339
|
+
if (first) {
|
|
3256
3340
|
return first(payload, ctx);
|
|
3257
3341
|
}
|
|
3258
3342
|
let async = false;
|
|
@@ -3327,7 +3411,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3327
3411
|
if (opt) {
|
|
3328
3412
|
return opt._zod.run(payload, ctx);
|
|
3329
3413
|
}
|
|
3330
|
-
if (def.unionFallback) {
|
|
3414
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
3331
3415
|
return _super(payload, ctx);
|
|
3332
3416
|
}
|
|
3333
3417
|
payload.issues.push({
|
|
@@ -3335,6 +3419,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3335
3419
|
errors: [],
|
|
3336
3420
|
note: "No matching discriminator",
|
|
3337
3421
|
discriminator: def.discriminator,
|
|
3422
|
+
options: Array.from(disc.value.keys()),
|
|
3338
3423
|
input,
|
|
3339
3424
|
path: [def.discriminator],
|
|
3340
3425
|
inst
|
|
@@ -3456,64 +3541,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3456
3541
|
}
|
|
3457
3542
|
payload.value = [];
|
|
3458
3543
|
const proms = [];
|
|
3459
|
-
const
|
|
3460
|
-
const
|
|
3544
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
3545
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
3461
3546
|
if (!def.rest) {
|
|
3462
|
-
|
|
3463
|
-
const tooSmall = input.length < optStart - 1;
|
|
3464
|
-
if (tooBig || tooSmall) {
|
|
3547
|
+
if (input.length < optinStart) {
|
|
3465
3548
|
payload.issues.push({
|
|
3466
|
-
|
|
3549
|
+
code: "too_small",
|
|
3550
|
+
minimum: optinStart,
|
|
3551
|
+
inclusive: true,
|
|
3467
3552
|
input,
|
|
3468
3553
|
inst,
|
|
3469
3554
|
origin: "array"
|
|
3470
3555
|
});
|
|
3471
3556
|
return payload;
|
|
3472
3557
|
}
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3558
|
+
if (input.length > items.length) {
|
|
3559
|
+
payload.issues.push({
|
|
3560
|
+
code: "too_big",
|
|
3561
|
+
maximum: items.length,
|
|
3562
|
+
inclusive: true,
|
|
3563
|
+
input,
|
|
3564
|
+
inst,
|
|
3565
|
+
origin: "array"
|
|
3566
|
+
});
|
|
3480
3567
|
}
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
}, ctx);
|
|
3485
|
-
if (
|
|
3486
|
-
proms.push(
|
|
3568
|
+
}
|
|
3569
|
+
const itemResults = new Array(items.length);
|
|
3570
|
+
for (let i = 0; i < items.length; i++) {
|
|
3571
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
3572
|
+
if (r instanceof Promise) {
|
|
3573
|
+
proms.push(r.then((rr) => {
|
|
3574
|
+
itemResults[i] = rr;
|
|
3575
|
+
}));
|
|
3487
3576
|
} else {
|
|
3488
|
-
|
|
3577
|
+
itemResults[i] = r;
|
|
3489
3578
|
}
|
|
3490
3579
|
}
|
|
3491
3580
|
if (def.rest) {
|
|
3581
|
+
let i = items.length - 1;
|
|
3492
3582
|
const rest = input.slice(items.length);
|
|
3493
3583
|
for (const el of rest) {
|
|
3494
3584
|
i++;
|
|
3495
|
-
const result = def.rest._zod.run({
|
|
3496
|
-
value: el,
|
|
3497
|
-
issues: []
|
|
3498
|
-
}, ctx);
|
|
3585
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
3499
3586
|
if (result instanceof Promise) {
|
|
3500
|
-
proms.push(result.then((
|
|
3587
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
3501
3588
|
} else {
|
|
3502
3589
|
handleTupleResult(result, payload, i);
|
|
3503
3590
|
}
|
|
3504
3591
|
}
|
|
3505
3592
|
}
|
|
3506
|
-
if (proms.length)
|
|
3507
|
-
return Promise.all(proms).then(() => payload);
|
|
3508
|
-
|
|
3593
|
+
if (proms.length) {
|
|
3594
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
3595
|
+
}
|
|
3596
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
3509
3597
|
};
|
|
3510
3598
|
});
|
|
3599
|
+
function getTupleOptStart(items, key) {
|
|
3600
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
3601
|
+
if (items[i]._zod[key] !== "optional")
|
|
3602
|
+
return i + 1;
|
|
3603
|
+
}
|
|
3604
|
+
return 0;
|
|
3605
|
+
}
|
|
3511
3606
|
function handleTupleResult(result, final, index) {
|
|
3512
3607
|
if (result.issues.length) {
|
|
3513
3608
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
3514
3609
|
}
|
|
3515
3610
|
final.value[index] = result.value;
|
|
3516
3611
|
}
|
|
3612
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
3613
|
+
for (let i = 0; i < items.length; i++) {
|
|
3614
|
+
const r = itemResults[i];
|
|
3615
|
+
const isPresent = i < input.length;
|
|
3616
|
+
if (r.issues.length) {
|
|
3617
|
+
if (!isPresent && i >= optoutStart) {
|
|
3618
|
+
final.value.length = i;
|
|
3619
|
+
break;
|
|
3620
|
+
}
|
|
3621
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
3622
|
+
}
|
|
3623
|
+
final.value[i] = r.value;
|
|
3624
|
+
}
|
|
3625
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
3626
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
3627
|
+
final.value.length = i;
|
|
3628
|
+
} else {
|
|
3629
|
+
break;
|
|
3630
|
+
}
|
|
3631
|
+
}
|
|
3632
|
+
return final;
|
|
3633
|
+
}
|
|
3517
3634
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
3518
3635
|
$ZodType.init(inst, def);
|
|
3519
3636
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3535,19 +3652,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3535
3652
|
for (const key of values) {
|
|
3536
3653
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
3537
3654
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
3655
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
3656
|
+
if (keyResult instanceof Promise) {
|
|
3657
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
3658
|
+
}
|
|
3659
|
+
if (keyResult.issues.length) {
|
|
3660
|
+
payload.issues.push({
|
|
3661
|
+
code: "invalid_key",
|
|
3662
|
+
origin: "record",
|
|
3663
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
3664
|
+
input: key,
|
|
3665
|
+
path: [key],
|
|
3666
|
+
inst
|
|
3667
|
+
});
|
|
3668
|
+
continue;
|
|
3669
|
+
}
|
|
3670
|
+
const outKey = keyResult.value;
|
|
3538
3671
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
3539
3672
|
if (result instanceof Promise) {
|
|
3540
3673
|
proms.push(result.then((result2) => {
|
|
3541
3674
|
if (result2.issues.length) {
|
|
3542
3675
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
3543
3676
|
}
|
|
3544
|
-
payload.value[
|
|
3677
|
+
payload.value[outKey] = result2.value;
|
|
3545
3678
|
}));
|
|
3546
3679
|
} else {
|
|
3547
3680
|
if (result.issues.length) {
|
|
3548
3681
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
3549
3682
|
}
|
|
3550
|
-
payload.value[
|
|
3683
|
+
payload.value[outKey] = result.value;
|
|
3551
3684
|
}
|
|
3552
3685
|
}
|
|
3553
3686
|
}
|
|
@@ -3571,6 +3704,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3571
3704
|
for (const key of Reflect.ownKeys(input)) {
|
|
3572
3705
|
if (key === "__proto__")
|
|
3573
3706
|
continue;
|
|
3707
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
3708
|
+
continue;
|
|
3574
3709
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
3575
3710
|
if (keyResult instanceof Promise) {
|
|
3576
3711
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -3775,6 +3910,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
|
|
|
3775
3910
|
});
|
|
3776
3911
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
3777
3912
|
$ZodType.init(inst, def);
|
|
3913
|
+
inst._zod.optin = "optional";
|
|
3778
3914
|
inst._zod.parse = (payload, ctx) => {
|
|
3779
3915
|
if (ctx.direction === "backward") {
|
|
3780
3916
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -3784,6 +3920,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
3784
3920
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
3785
3921
|
return output.then((output2) => {
|
|
3786
3922
|
payload.value = output2;
|
|
3923
|
+
payload.fallback = true;
|
|
3787
3924
|
return payload;
|
|
3788
3925
|
});
|
|
3789
3926
|
}
|
|
@@ -3791,11 +3928,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
3791
3928
|
throw new $ZodAsyncError();
|
|
3792
3929
|
}
|
|
3793
3930
|
payload.value = _out;
|
|
3931
|
+
payload.fallback = true;
|
|
3794
3932
|
return payload;
|
|
3795
3933
|
};
|
|
3796
3934
|
});
|
|
3797
3935
|
function handleOptionalResult(result, input) {
|
|
3798
|
-
if (result.issues.length
|
|
3936
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
3799
3937
|
return { issues: [], value: void 0 };
|
|
3800
3938
|
}
|
|
3801
3939
|
return result;
|
|
@@ -3813,10 +3951,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
|
3813
3951
|
});
|
|
3814
3952
|
inst._zod.parse = (payload, ctx) => {
|
|
3815
3953
|
if (def.innerType._zod.optin === "optional") {
|
|
3954
|
+
const input = payload.value;
|
|
3816
3955
|
const result = def.innerType._zod.run(payload, ctx);
|
|
3817
3956
|
if (result instanceof Promise)
|
|
3818
|
-
return result.then((r) => handleOptionalResult(r,
|
|
3819
|
-
return handleOptionalResult(result,
|
|
3957
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
3958
|
+
return handleOptionalResult(result, input);
|
|
3820
3959
|
}
|
|
3821
3960
|
if (payload.value === void 0) {
|
|
3822
3961
|
return payload;
|
|
@@ -3932,7 +4071,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
|
3932
4071
|
});
|
|
3933
4072
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
3934
4073
|
$ZodType.init(inst, def);
|
|
3935
|
-
|
|
4074
|
+
inst._zod.optin = "optional";
|
|
3936
4075
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
3937
4076
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
3938
4077
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -3952,6 +4091,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
3952
4091
|
input: payload.value
|
|
3953
4092
|
});
|
|
3954
4093
|
payload.issues = [];
|
|
4094
|
+
payload.fallback = true;
|
|
3955
4095
|
}
|
|
3956
4096
|
return payload;
|
|
3957
4097
|
});
|
|
@@ -3966,6 +4106,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
3966
4106
|
input: payload.value
|
|
3967
4107
|
});
|
|
3968
4108
|
payload.issues = [];
|
|
4109
|
+
payload.fallback = true;
|
|
3969
4110
|
}
|
|
3970
4111
|
return payload;
|
|
3971
4112
|
};
|
|
@@ -4011,7 +4152,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
4011
4152
|
left.aborted = true;
|
|
4012
4153
|
return left;
|
|
4013
4154
|
}
|
|
4014
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
4155
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
4015
4156
|
}
|
|
4016
4157
|
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
4017
4158
|
$ZodType.init(inst, def);
|
|
@@ -4063,6 +4204,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
|
|
|
4063
4204
|
}
|
|
4064
4205
|
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
4065
4206
|
}
|
|
4207
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
4208
|
+
$ZodPipe.init(inst, def);
|
|
4209
|
+
});
|
|
4066
4210
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
4067
4211
|
$ZodType.init(inst, def);
|
|
4068
4212
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -4214,7 +4358,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
|
|
|
4214
4358
|
});
|
|
4215
4359
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
4216
4360
|
$ZodType.init(inst, def);
|
|
4217
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
4361
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
4362
|
+
const d = def;
|
|
4363
|
+
if (!d._cachedInner)
|
|
4364
|
+
d._cachedInner = def.getter();
|
|
4365
|
+
return d._cachedInner;
|
|
4366
|
+
});
|
|
4218
4367
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
4219
4368
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
4220
4369
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -4269,6 +4418,7 @@ __export(locales_exports, {
|
|
|
4269
4418
|
cs: () => cs_default,
|
|
4270
4419
|
da: () => da_default,
|
|
4271
4420
|
de: () => de_default,
|
|
4421
|
+
el: () => el_default,
|
|
4272
4422
|
en: () => en_default,
|
|
4273
4423
|
eo: () => eo_default,
|
|
4274
4424
|
es: () => es_default,
|
|
@@ -4277,6 +4427,7 @@ __export(locales_exports, {
|
|
|
4277
4427
|
fr: () => fr_default,
|
|
4278
4428
|
frCA: () => fr_CA_default,
|
|
4279
4429
|
he: () => he_default,
|
|
4430
|
+
hr: () => hr_default,
|
|
4280
4431
|
hu: () => hu_default,
|
|
4281
4432
|
hy: () => hy_default,
|
|
4282
4433
|
id: () => id_default,
|
|
@@ -4296,6 +4447,7 @@ __export(locales_exports, {
|
|
|
4296
4447
|
pl: () => pl_default,
|
|
4297
4448
|
ps: () => ps_default,
|
|
4298
4449
|
pt: () => pt_default,
|
|
4450
|
+
ro: () => ro_default,
|
|
4299
4451
|
ru: () => ru_default,
|
|
4300
4452
|
sl: () => sl_default,
|
|
4301
4453
|
sv: () => sv_default,
|
|
@@ -5249,8 +5401,118 @@ function de_default() {
|
|
|
5249
5401
|
};
|
|
5250
5402
|
}
|
|
5251
5403
|
|
|
5252
|
-
// ../../node_modules/zod/v4/locales/
|
|
5404
|
+
// ../../node_modules/zod/v4/locales/el.js
|
|
5253
5405
|
var error9 = () => {
|
|
5406
|
+
const Sizable = {
|
|
5407
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5408
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5409
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5410
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
5411
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
5412
|
+
};
|
|
5413
|
+
function getSizing(origin) {
|
|
5414
|
+
return Sizable[origin] ?? null;
|
|
5415
|
+
}
|
|
5416
|
+
const FormatDictionary = {
|
|
5417
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
5418
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
5419
|
+
url: "URL",
|
|
5420
|
+
emoji: "emoji",
|
|
5421
|
+
uuid: "UUID",
|
|
5422
|
+
uuidv4: "UUIDv4",
|
|
5423
|
+
uuidv6: "UUIDv6",
|
|
5424
|
+
nanoid: "nanoid",
|
|
5425
|
+
guid: "GUID",
|
|
5426
|
+
cuid: "cuid",
|
|
5427
|
+
cuid2: "cuid2",
|
|
5428
|
+
ulid: "ULID",
|
|
5429
|
+
xid: "XID",
|
|
5430
|
+
ksuid: "KSUID",
|
|
5431
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
5432
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
5433
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
5434
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
5435
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
5436
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
5437
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
5438
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
5439
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
5440
|
+
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",
|
|
5441
|
+
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",
|
|
5442
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
5443
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
5444
|
+
jwt: "JWT",
|
|
5445
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
5446
|
+
};
|
|
5447
|
+
const TypeDictionary = {
|
|
5448
|
+
nan: "NaN"
|
|
5449
|
+
};
|
|
5450
|
+
return (issue2) => {
|
|
5451
|
+
switch (issue2.code) {
|
|
5452
|
+
case "invalid_type": {
|
|
5453
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
5454
|
+
const receivedType = parsedType(issue2.input);
|
|
5455
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
5456
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
5457
|
+
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}`;
|
|
5458
|
+
}
|
|
5459
|
+
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}`;
|
|
5460
|
+
}
|
|
5461
|
+
case "invalid_value":
|
|
5462
|
+
if (issue2.values.length === 1)
|
|
5463
|
+
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])}`;
|
|
5464
|
+
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, "|")}`;
|
|
5465
|
+
case "too_big": {
|
|
5466
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
5467
|
+
const sizing = getSizing(issue2.origin);
|
|
5468
|
+
if (sizing)
|
|
5469
|
+
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"}`;
|
|
5470
|
+
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()}`;
|
|
5471
|
+
}
|
|
5472
|
+
case "too_small": {
|
|
5473
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
5474
|
+
const sizing = getSizing(issue2.origin);
|
|
5475
|
+
if (sizing) {
|
|
5476
|
+
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}`;
|
|
5477
|
+
}
|
|
5478
|
+
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()}`;
|
|
5479
|
+
}
|
|
5480
|
+
case "invalid_format": {
|
|
5481
|
+
const _issue = issue2;
|
|
5482
|
+
if (_issue.format === "starts_with") {
|
|
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 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${_issue.prefix}"`;
|
|
5484
|
+
}
|
|
5485
|
+
if (_issue.format === "ends_with")
|
|
5486
|
+
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}"`;
|
|
5487
|
+
if (_issue.format === "includes")
|
|
5488
|
+
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}"`;
|
|
5489
|
+
if (_issue.format === "regex")
|
|
5490
|
+
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}`;
|
|
5491
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
5492
|
+
}
|
|
5493
|
+
case "not_multiple_of":
|
|
5494
|
+
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}`;
|
|
5495
|
+
case "unrecognized_keys":
|
|
5496
|
+
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, ", ")}`;
|
|
5497
|
+
case "invalid_key":
|
|
5498
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
5499
|
+
case "invalid_union":
|
|
5500
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
5501
|
+
case "invalid_element":
|
|
5502
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
5503
|
+
default:
|
|
5504
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
5505
|
+
}
|
|
5506
|
+
};
|
|
5507
|
+
};
|
|
5508
|
+
function el_default() {
|
|
5509
|
+
return {
|
|
5510
|
+
localeError: error9()
|
|
5511
|
+
};
|
|
5512
|
+
}
|
|
5513
|
+
|
|
5514
|
+
// ../../node_modules/zod/v4/locales/en.js
|
|
5515
|
+
var error10 = () => {
|
|
5254
5516
|
const Sizable = {
|
|
5255
5517
|
string: { unit: "characters", verb: "to have" },
|
|
5256
5518
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -5344,6 +5606,10 @@ var error9 = () => {
|
|
|
5344
5606
|
case "invalid_key":
|
|
5345
5607
|
return `Invalid key in ${issue2.origin}`;
|
|
5346
5608
|
case "invalid_union":
|
|
5609
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
5610
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
5611
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
5612
|
+
}
|
|
5347
5613
|
return "Invalid input";
|
|
5348
5614
|
case "invalid_element":
|
|
5349
5615
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -5354,12 +5620,12 @@ var error9 = () => {
|
|
|
5354
5620
|
};
|
|
5355
5621
|
function en_default() {
|
|
5356
5622
|
return {
|
|
5357
|
-
localeError:
|
|
5623
|
+
localeError: error10()
|
|
5358
5624
|
};
|
|
5359
5625
|
}
|
|
5360
5626
|
|
|
5361
5627
|
// ../../node_modules/zod/v4/locales/eo.js
|
|
5362
|
-
var
|
|
5628
|
+
var error11 = () => {
|
|
5363
5629
|
const Sizable = {
|
|
5364
5630
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
5365
5631
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -5464,12 +5730,12 @@ var error10 = () => {
|
|
|
5464
5730
|
};
|
|
5465
5731
|
function eo_default() {
|
|
5466
5732
|
return {
|
|
5467
|
-
localeError:
|
|
5733
|
+
localeError: error11()
|
|
5468
5734
|
};
|
|
5469
5735
|
}
|
|
5470
5736
|
|
|
5471
5737
|
// ../../node_modules/zod/v4/locales/es.js
|
|
5472
|
-
var
|
|
5738
|
+
var error12 = () => {
|
|
5473
5739
|
const Sizable = {
|
|
5474
5740
|
string: { unit: "caracteres", verb: "tener" },
|
|
5475
5741
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -5597,12 +5863,12 @@ var error11 = () => {
|
|
|
5597
5863
|
};
|
|
5598
5864
|
function es_default() {
|
|
5599
5865
|
return {
|
|
5600
|
-
localeError:
|
|
5866
|
+
localeError: error12()
|
|
5601
5867
|
};
|
|
5602
5868
|
}
|
|
5603
5869
|
|
|
5604
5870
|
// ../../node_modules/zod/v4/locales/fa.js
|
|
5605
|
-
var
|
|
5871
|
+
var error13 = () => {
|
|
5606
5872
|
const Sizable = {
|
|
5607
5873
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
5608
5874
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -5712,12 +5978,12 @@ var error12 = () => {
|
|
|
5712
5978
|
};
|
|
5713
5979
|
function fa_default() {
|
|
5714
5980
|
return {
|
|
5715
|
-
localeError:
|
|
5981
|
+
localeError: error13()
|
|
5716
5982
|
};
|
|
5717
5983
|
}
|
|
5718
5984
|
|
|
5719
5985
|
// ../../node_modules/zod/v4/locales/fi.js
|
|
5720
|
-
var
|
|
5986
|
+
var error14 = () => {
|
|
5721
5987
|
const Sizable = {
|
|
5722
5988
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
5723
5989
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -5825,12 +6091,12 @@ var error13 = () => {
|
|
|
5825
6091
|
};
|
|
5826
6092
|
function fi_default() {
|
|
5827
6093
|
return {
|
|
5828
|
-
localeError:
|
|
6094
|
+
localeError: error14()
|
|
5829
6095
|
};
|
|
5830
6096
|
}
|
|
5831
6097
|
|
|
5832
6098
|
// ../../node_modules/zod/v4/locales/fr.js
|
|
5833
|
-
var
|
|
6099
|
+
var error15 = () => {
|
|
5834
6100
|
const Sizable = {
|
|
5835
6101
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
5836
6102
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -5871,9 +6137,27 @@ var error14 = () => {
|
|
|
5871
6137
|
template_literal: "entr\xE9e"
|
|
5872
6138
|
};
|
|
5873
6139
|
const TypeDictionary = {
|
|
5874
|
-
|
|
6140
|
+
string: "cha\xEEne",
|
|
5875
6141
|
number: "nombre",
|
|
5876
|
-
|
|
6142
|
+
int: "entier",
|
|
6143
|
+
boolean: "bool\xE9en",
|
|
6144
|
+
bigint: "grand entier",
|
|
6145
|
+
symbol: "symbole",
|
|
6146
|
+
undefined: "ind\xE9fini",
|
|
6147
|
+
null: "null",
|
|
6148
|
+
never: "jamais",
|
|
6149
|
+
void: "vide",
|
|
6150
|
+
date: "date",
|
|
6151
|
+
array: "tableau",
|
|
6152
|
+
object: "objet",
|
|
6153
|
+
tuple: "tuple",
|
|
6154
|
+
record: "enregistrement",
|
|
6155
|
+
map: "carte",
|
|
6156
|
+
set: "ensemble",
|
|
6157
|
+
file: "fichier",
|
|
6158
|
+
nonoptional: "non-optionnel",
|
|
6159
|
+
nan: "NaN",
|
|
6160
|
+
function: "fonction"
|
|
5877
6161
|
};
|
|
5878
6162
|
return (issue2) => {
|
|
5879
6163
|
switch (issue2.code) {
|
|
@@ -5894,16 +6178,15 @@ var error14 = () => {
|
|
|
5894
6178
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
5895
6179
|
const sizing = getSizing(issue2.origin);
|
|
5896
6180
|
if (sizing)
|
|
5897
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
5898
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
6181
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
6182
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
5899
6183
|
}
|
|
5900
6184
|
case "too_small": {
|
|
5901
6185
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
5902
6186
|
const sizing = getSizing(issue2.origin);
|
|
5903
|
-
if (sizing)
|
|
5904
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
5905
|
-
}
|
|
5906
|
-
return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
6187
|
+
if (sizing)
|
|
6188
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6189
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
5907
6190
|
}
|
|
5908
6191
|
case "invalid_format": {
|
|
5909
6192
|
const _issue = issue2;
|
|
@@ -5934,12 +6217,12 @@ var error14 = () => {
|
|
|
5934
6217
|
};
|
|
5935
6218
|
function fr_default() {
|
|
5936
6219
|
return {
|
|
5937
|
-
localeError:
|
|
6220
|
+
localeError: error15()
|
|
5938
6221
|
};
|
|
5939
6222
|
}
|
|
5940
6223
|
|
|
5941
6224
|
// ../../node_modules/zod/v4/locales/fr-CA.js
|
|
5942
|
-
var
|
|
6225
|
+
var error16 = () => {
|
|
5943
6226
|
const Sizable = {
|
|
5944
6227
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
5945
6228
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -6042,12 +6325,12 @@ var error15 = () => {
|
|
|
6042
6325
|
};
|
|
6043
6326
|
function fr_CA_default() {
|
|
6044
6327
|
return {
|
|
6045
|
-
localeError:
|
|
6328
|
+
localeError: error16()
|
|
6046
6329
|
};
|
|
6047
6330
|
}
|
|
6048
6331
|
|
|
6049
6332
|
// ../../node_modules/zod/v4/locales/he.js
|
|
6050
|
-
var
|
|
6333
|
+
var error17 = () => {
|
|
6051
6334
|
const TypeNames = {
|
|
6052
6335
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
6053
6336
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -6237,24 +6520,24 @@ var error16 = () => {
|
|
|
6237
6520
|
};
|
|
6238
6521
|
function he_default() {
|
|
6239
6522
|
return {
|
|
6240
|
-
localeError:
|
|
6523
|
+
localeError: error17()
|
|
6241
6524
|
};
|
|
6242
6525
|
}
|
|
6243
6526
|
|
|
6244
|
-
// ../../node_modules/zod/v4/locales/
|
|
6245
|
-
var
|
|
6527
|
+
// ../../node_modules/zod/v4/locales/hr.js
|
|
6528
|
+
var error18 = () => {
|
|
6246
6529
|
const Sizable = {
|
|
6247
|
-
string: { unit: "
|
|
6248
|
-
file: { unit: "
|
|
6249
|
-
array: { unit: "
|
|
6250
|
-
set: { unit: "
|
|
6530
|
+
string: { unit: "znakova", verb: "imati" },
|
|
6531
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
6532
|
+
array: { unit: "stavki", verb: "imati" },
|
|
6533
|
+
set: { unit: "stavki", verb: "imati" }
|
|
6251
6534
|
};
|
|
6252
6535
|
function getSizing(origin) {
|
|
6253
6536
|
return Sizable[origin] ?? null;
|
|
6254
6537
|
}
|
|
6255
6538
|
const FormatDictionary = {
|
|
6256
|
-
regex: "
|
|
6257
|
-
email: "email
|
|
6539
|
+
regex: "unos",
|
|
6540
|
+
email: "email adresa",
|
|
6258
6541
|
url: "URL",
|
|
6259
6542
|
emoji: "emoji",
|
|
6260
6543
|
uuid: "UUID",
|
|
@@ -6267,25 +6550,37 @@ var error17 = () => {
|
|
|
6267
6550
|
ulid: "ULID",
|
|
6268
6551
|
xid: "XID",
|
|
6269
6552
|
ksuid: "KSUID",
|
|
6270
|
-
datetime: "ISO
|
|
6271
|
-
date: "ISO
|
|
6272
|
-
time: "ISO
|
|
6273
|
-
duration: "ISO
|
|
6274
|
-
ipv4: "IPv4
|
|
6275
|
-
ipv6: "IPv6
|
|
6276
|
-
cidrv4: "IPv4
|
|
6277
|
-
cidrv6: "IPv6
|
|
6278
|
-
base64: "base64
|
|
6279
|
-
base64url: "base64url
|
|
6280
|
-
json_string: "JSON
|
|
6281
|
-
e164: "E.164
|
|
6553
|
+
datetime: "ISO datum i vrijeme",
|
|
6554
|
+
date: "ISO datum",
|
|
6555
|
+
time: "ISO vrijeme",
|
|
6556
|
+
duration: "ISO trajanje",
|
|
6557
|
+
ipv4: "IPv4 adresa",
|
|
6558
|
+
ipv6: "IPv6 adresa",
|
|
6559
|
+
cidrv4: "IPv4 raspon",
|
|
6560
|
+
cidrv6: "IPv6 raspon",
|
|
6561
|
+
base64: "base64 kodirani tekst",
|
|
6562
|
+
base64url: "base64url kodirani tekst",
|
|
6563
|
+
json_string: "JSON tekst",
|
|
6564
|
+
e164: "E.164 broj",
|
|
6282
6565
|
jwt: "JWT",
|
|
6283
|
-
template_literal: "
|
|
6566
|
+
template_literal: "unos"
|
|
6284
6567
|
};
|
|
6285
6568
|
const TypeDictionary = {
|
|
6286
6569
|
nan: "NaN",
|
|
6287
|
-
|
|
6288
|
-
|
|
6570
|
+
string: "tekst",
|
|
6571
|
+
number: "broj",
|
|
6572
|
+
boolean: "boolean",
|
|
6573
|
+
array: "niz",
|
|
6574
|
+
object: "objekt",
|
|
6575
|
+
set: "skup",
|
|
6576
|
+
file: "datoteka",
|
|
6577
|
+
date: "datum",
|
|
6578
|
+
bigint: "bigint",
|
|
6579
|
+
symbol: "simbol",
|
|
6580
|
+
undefined: "undefined",
|
|
6581
|
+
null: "null",
|
|
6582
|
+
function: "funkcija",
|
|
6583
|
+
map: "mapa"
|
|
6289
6584
|
};
|
|
6290
6585
|
return (issue2) => {
|
|
6291
6586
|
switch (issue2.code) {
|
|
@@ -6294,26 +6589,137 @@ var error17 = () => {
|
|
|
6294
6589
|
const receivedType = parsedType(issue2.input);
|
|
6295
6590
|
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
6296
6591
|
if (/^[A-Z]/.test(issue2.expected)) {
|
|
6297
|
-
return
|
|
6592
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
6298
6593
|
}
|
|
6299
|
-
return
|
|
6594
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
6300
6595
|
}
|
|
6301
6596
|
case "invalid_value":
|
|
6302
6597
|
if (issue2.values.length === 1)
|
|
6303
|
-
return
|
|
6304
|
-
return
|
|
6598
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
6599
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
6305
6600
|
case "too_big": {
|
|
6306
6601
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
6307
6602
|
const sizing = getSizing(issue2.origin);
|
|
6603
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
6308
6604
|
if (sizing)
|
|
6309
|
-
return `
|
|
6310
|
-
return `
|
|
6605
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
6606
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
6311
6607
|
}
|
|
6312
6608
|
case "too_small": {
|
|
6313
6609
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
6314
6610
|
const sizing = getSizing(issue2.origin);
|
|
6611
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
6315
6612
|
if (sizing) {
|
|
6316
|
-
return `
|
|
6613
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6614
|
+
}
|
|
6615
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
6616
|
+
}
|
|
6617
|
+
case "invalid_format": {
|
|
6618
|
+
const _issue = issue2;
|
|
6619
|
+
if (_issue.format === "starts_with")
|
|
6620
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
6621
|
+
if (_issue.format === "ends_with")
|
|
6622
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
6623
|
+
if (_issue.format === "includes")
|
|
6624
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
6625
|
+
if (_issue.format === "regex")
|
|
6626
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
6627
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6628
|
+
}
|
|
6629
|
+
case "not_multiple_of":
|
|
6630
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
6631
|
+
case "unrecognized_keys":
|
|
6632
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
6633
|
+
case "invalid_key":
|
|
6634
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
6635
|
+
case "invalid_union":
|
|
6636
|
+
return "Neispravan unos";
|
|
6637
|
+
case "invalid_element":
|
|
6638
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
6639
|
+
default:
|
|
6640
|
+
return `Neispravan unos`;
|
|
6641
|
+
}
|
|
6642
|
+
};
|
|
6643
|
+
};
|
|
6644
|
+
function hr_default() {
|
|
6645
|
+
return {
|
|
6646
|
+
localeError: error18()
|
|
6647
|
+
};
|
|
6648
|
+
}
|
|
6649
|
+
|
|
6650
|
+
// ../../node_modules/zod/v4/locales/hu.js
|
|
6651
|
+
var error19 = () => {
|
|
6652
|
+
const Sizable = {
|
|
6653
|
+
string: { unit: "karakter", verb: "legyen" },
|
|
6654
|
+
file: { unit: "byte", verb: "legyen" },
|
|
6655
|
+
array: { unit: "elem", verb: "legyen" },
|
|
6656
|
+
set: { unit: "elem", verb: "legyen" }
|
|
6657
|
+
};
|
|
6658
|
+
function getSizing(origin) {
|
|
6659
|
+
return Sizable[origin] ?? null;
|
|
6660
|
+
}
|
|
6661
|
+
const FormatDictionary = {
|
|
6662
|
+
regex: "bemenet",
|
|
6663
|
+
email: "email c\xEDm",
|
|
6664
|
+
url: "URL",
|
|
6665
|
+
emoji: "emoji",
|
|
6666
|
+
uuid: "UUID",
|
|
6667
|
+
uuidv4: "UUIDv4",
|
|
6668
|
+
uuidv6: "UUIDv6",
|
|
6669
|
+
nanoid: "nanoid",
|
|
6670
|
+
guid: "GUID",
|
|
6671
|
+
cuid: "cuid",
|
|
6672
|
+
cuid2: "cuid2",
|
|
6673
|
+
ulid: "ULID",
|
|
6674
|
+
xid: "XID",
|
|
6675
|
+
ksuid: "KSUID",
|
|
6676
|
+
datetime: "ISO id\u0151b\xE9lyeg",
|
|
6677
|
+
date: "ISO d\xE1tum",
|
|
6678
|
+
time: "ISO id\u0151",
|
|
6679
|
+
duration: "ISO id\u0151intervallum",
|
|
6680
|
+
ipv4: "IPv4 c\xEDm",
|
|
6681
|
+
ipv6: "IPv6 c\xEDm",
|
|
6682
|
+
cidrv4: "IPv4 tartom\xE1ny",
|
|
6683
|
+
cidrv6: "IPv6 tartom\xE1ny",
|
|
6684
|
+
base64: "base64-k\xF3dolt string",
|
|
6685
|
+
base64url: "base64url-k\xF3dolt string",
|
|
6686
|
+
json_string: "JSON string",
|
|
6687
|
+
e164: "E.164 sz\xE1m",
|
|
6688
|
+
jwt: "JWT",
|
|
6689
|
+
template_literal: "bemenet"
|
|
6690
|
+
};
|
|
6691
|
+
const TypeDictionary = {
|
|
6692
|
+
nan: "NaN",
|
|
6693
|
+
number: "sz\xE1m",
|
|
6694
|
+
array: "t\xF6mb"
|
|
6695
|
+
};
|
|
6696
|
+
return (issue2) => {
|
|
6697
|
+
switch (issue2.code) {
|
|
6698
|
+
case "invalid_type": {
|
|
6699
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
6700
|
+
const receivedType = parsedType(issue2.input);
|
|
6701
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
6702
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
6703
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
|
|
6704
|
+
}
|
|
6705
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
|
|
6706
|
+
}
|
|
6707
|
+
case "invalid_value":
|
|
6708
|
+
if (issue2.values.length === 1)
|
|
6709
|
+
return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
|
|
6710
|
+
return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
|
|
6711
|
+
case "too_big": {
|
|
6712
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
6713
|
+
const sizing = getSizing(issue2.origin);
|
|
6714
|
+
if (sizing)
|
|
6715
|
+
return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
|
|
6716
|
+
return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
|
|
6717
|
+
}
|
|
6718
|
+
case "too_small": {
|
|
6719
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
6720
|
+
const sizing = getSizing(issue2.origin);
|
|
6721
|
+
if (sizing) {
|
|
6722
|
+
return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
6317
6723
|
}
|
|
6318
6724
|
return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`;
|
|
6319
6725
|
}
|
|
@@ -6346,7 +6752,7 @@ var error17 = () => {
|
|
|
6346
6752
|
};
|
|
6347
6753
|
function hu_default() {
|
|
6348
6754
|
return {
|
|
6349
|
-
localeError:
|
|
6755
|
+
localeError: error19()
|
|
6350
6756
|
};
|
|
6351
6757
|
}
|
|
6352
6758
|
|
|
@@ -6361,7 +6767,7 @@ function withDefiniteArticle(word) {
|
|
|
6361
6767
|
const lastChar = word[word.length - 1];
|
|
6362
6768
|
return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
|
|
6363
6769
|
}
|
|
6364
|
-
var
|
|
6770
|
+
var error20 = () => {
|
|
6365
6771
|
const Sizable = {
|
|
6366
6772
|
string: {
|
|
6367
6773
|
unit: {
|
|
@@ -6494,12 +6900,12 @@ var error18 = () => {
|
|
|
6494
6900
|
};
|
|
6495
6901
|
function hy_default() {
|
|
6496
6902
|
return {
|
|
6497
|
-
localeError:
|
|
6903
|
+
localeError: error20()
|
|
6498
6904
|
};
|
|
6499
6905
|
}
|
|
6500
6906
|
|
|
6501
6907
|
// ../../node_modules/zod/v4/locales/id.js
|
|
6502
|
-
var
|
|
6908
|
+
var error21 = () => {
|
|
6503
6909
|
const Sizable = {
|
|
6504
6910
|
string: { unit: "karakter", verb: "memiliki" },
|
|
6505
6911
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -6601,12 +7007,12 @@ var error19 = () => {
|
|
|
6601
7007
|
};
|
|
6602
7008
|
function id_default() {
|
|
6603
7009
|
return {
|
|
6604
|
-
localeError:
|
|
7010
|
+
localeError: error21()
|
|
6605
7011
|
};
|
|
6606
7012
|
}
|
|
6607
7013
|
|
|
6608
7014
|
// ../../node_modules/zod/v4/locales/is.js
|
|
6609
|
-
var
|
|
7015
|
+
var error22 = () => {
|
|
6610
7016
|
const Sizable = {
|
|
6611
7017
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
6612
7018
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -6711,12 +7117,12 @@ var error20 = () => {
|
|
|
6711
7117
|
};
|
|
6712
7118
|
function is_default() {
|
|
6713
7119
|
return {
|
|
6714
|
-
localeError:
|
|
7120
|
+
localeError: error22()
|
|
6715
7121
|
};
|
|
6716
7122
|
}
|
|
6717
7123
|
|
|
6718
7124
|
// ../../node_modules/zod/v4/locales/it.js
|
|
6719
|
-
var
|
|
7125
|
+
var error23 = () => {
|
|
6720
7126
|
const Sizable = {
|
|
6721
7127
|
string: { unit: "caratteri", verb: "avere" },
|
|
6722
7128
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -6801,7 +7207,7 @@ var error21 = () => {
|
|
|
6801
7207
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
6802
7208
|
if (_issue.format === "regex")
|
|
6803
7209
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
6804
|
-
return `
|
|
7210
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
6805
7211
|
}
|
|
6806
7212
|
case "not_multiple_of":
|
|
6807
7213
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -6820,12 +7226,12 @@ var error21 = () => {
|
|
|
6820
7226
|
};
|
|
6821
7227
|
function it_default() {
|
|
6822
7228
|
return {
|
|
6823
|
-
localeError:
|
|
7229
|
+
localeError: error23()
|
|
6824
7230
|
};
|
|
6825
7231
|
}
|
|
6826
7232
|
|
|
6827
7233
|
// ../../node_modules/zod/v4/locales/ja.js
|
|
6828
|
-
var
|
|
7234
|
+
var error24 = () => {
|
|
6829
7235
|
const Sizable = {
|
|
6830
7236
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
6831
7237
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -6928,12 +7334,12 @@ var error22 = () => {
|
|
|
6928
7334
|
};
|
|
6929
7335
|
function ja_default() {
|
|
6930
7336
|
return {
|
|
6931
|
-
localeError:
|
|
7337
|
+
localeError: error24()
|
|
6932
7338
|
};
|
|
6933
7339
|
}
|
|
6934
7340
|
|
|
6935
7341
|
// ../../node_modules/zod/v4/locales/ka.js
|
|
6936
|
-
var
|
|
7342
|
+
var error25 = () => {
|
|
6937
7343
|
const Sizable = {
|
|
6938
7344
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
6939
7345
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -6966,9 +7372,9 @@ var error23 = () => {
|
|
|
6966
7372
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
6967
7373
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
6968
7374
|
cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
6969
|
-
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
6970
|
-
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
6971
|
-
json_string: "JSON \
|
|
7375
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7376
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
7377
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
6972
7378
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
6973
7379
|
jwt: "JWT",
|
|
6974
7380
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -6976,7 +7382,7 @@ var error23 = () => {
|
|
|
6976
7382
|
const TypeDictionary = {
|
|
6977
7383
|
nan: "NaN",
|
|
6978
7384
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
6979
|
-
string: "\
|
|
7385
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
6980
7386
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
6981
7387
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
6982
7388
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -7014,14 +7420,14 @@ var error23 = () => {
|
|
|
7014
7420
|
case "invalid_format": {
|
|
7015
7421
|
const _issue = issue2;
|
|
7016
7422
|
if (_issue.format === "starts_with") {
|
|
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 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
|
|
7018
7424
|
}
|
|
7019
7425
|
if (_issue.format === "ends_with")
|
|
7020
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7426
|
+
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`;
|
|
7021
7427
|
if (_issue.format === "includes")
|
|
7022
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7428
|
+
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`;
|
|
7023
7429
|
if (_issue.format === "regex")
|
|
7024
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
7430
|
+
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}`;
|
|
7025
7431
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
7026
7432
|
}
|
|
7027
7433
|
case "not_multiple_of":
|
|
@@ -7041,12 +7447,12 @@ var error23 = () => {
|
|
|
7041
7447
|
};
|
|
7042
7448
|
function ka_default() {
|
|
7043
7449
|
return {
|
|
7044
|
-
localeError:
|
|
7450
|
+
localeError: error25()
|
|
7045
7451
|
};
|
|
7046
7452
|
}
|
|
7047
7453
|
|
|
7048
7454
|
// ../../node_modules/zod/v4/locales/km.js
|
|
7049
|
-
var
|
|
7455
|
+
var error26 = () => {
|
|
7050
7456
|
const Sizable = {
|
|
7051
7457
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
7052
7458
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -7152,7 +7558,7 @@ var error24 = () => {
|
|
|
7152
7558
|
};
|
|
7153
7559
|
function km_default() {
|
|
7154
7560
|
return {
|
|
7155
|
-
localeError:
|
|
7561
|
+
localeError: error26()
|
|
7156
7562
|
};
|
|
7157
7563
|
}
|
|
7158
7564
|
|
|
@@ -7162,7 +7568,7 @@ function kh_default() {
|
|
|
7162
7568
|
}
|
|
7163
7569
|
|
|
7164
7570
|
// ../../node_modules/zod/v4/locales/ko.js
|
|
7165
|
-
var
|
|
7571
|
+
var error27 = () => {
|
|
7166
7572
|
const Sizable = {
|
|
7167
7573
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
7168
7574
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -7269,7 +7675,7 @@ var error25 = () => {
|
|
|
7269
7675
|
};
|
|
7270
7676
|
function ko_default() {
|
|
7271
7677
|
return {
|
|
7272
|
-
localeError:
|
|
7678
|
+
localeError: error27()
|
|
7273
7679
|
};
|
|
7274
7680
|
}
|
|
7275
7681
|
|
|
@@ -7287,7 +7693,7 @@ function getUnitTypeFromNumber(number4) {
|
|
|
7287
7693
|
return "one";
|
|
7288
7694
|
return "few";
|
|
7289
7695
|
}
|
|
7290
|
-
var
|
|
7696
|
+
var error28 = () => {
|
|
7291
7697
|
const Sizable = {
|
|
7292
7698
|
string: {
|
|
7293
7699
|
unit: {
|
|
@@ -7473,12 +7879,12 @@ var error26 = () => {
|
|
|
7473
7879
|
};
|
|
7474
7880
|
function lt_default() {
|
|
7475
7881
|
return {
|
|
7476
|
-
localeError:
|
|
7882
|
+
localeError: error28()
|
|
7477
7883
|
};
|
|
7478
7884
|
}
|
|
7479
7885
|
|
|
7480
7886
|
// ../../node_modules/zod/v4/locales/mk.js
|
|
7481
|
-
var
|
|
7887
|
+
var error29 = () => {
|
|
7482
7888
|
const Sizable = {
|
|
7483
7889
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
7484
7890
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -7583,12 +7989,12 @@ var error27 = () => {
|
|
|
7583
7989
|
};
|
|
7584
7990
|
function mk_default() {
|
|
7585
7991
|
return {
|
|
7586
|
-
localeError:
|
|
7992
|
+
localeError: error29()
|
|
7587
7993
|
};
|
|
7588
7994
|
}
|
|
7589
7995
|
|
|
7590
7996
|
// ../../node_modules/zod/v4/locales/ms.js
|
|
7591
|
-
var
|
|
7997
|
+
var error30 = () => {
|
|
7592
7998
|
const Sizable = {
|
|
7593
7999
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
7594
8000
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -7691,12 +8097,12 @@ var error28 = () => {
|
|
|
7691
8097
|
};
|
|
7692
8098
|
function ms_default() {
|
|
7693
8099
|
return {
|
|
7694
|
-
localeError:
|
|
8100
|
+
localeError: error30()
|
|
7695
8101
|
};
|
|
7696
8102
|
}
|
|
7697
8103
|
|
|
7698
8104
|
// ../../node_modules/zod/v4/locales/nl.js
|
|
7699
|
-
var
|
|
8105
|
+
var error31 = () => {
|
|
7700
8106
|
const Sizable = {
|
|
7701
8107
|
string: { unit: "tekens", verb: "heeft" },
|
|
7702
8108
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -7802,12 +8208,12 @@ var error29 = () => {
|
|
|
7802
8208
|
};
|
|
7803
8209
|
function nl_default() {
|
|
7804
8210
|
return {
|
|
7805
|
-
localeError:
|
|
8211
|
+
localeError: error31()
|
|
7806
8212
|
};
|
|
7807
8213
|
}
|
|
7808
8214
|
|
|
7809
8215
|
// ../../node_modules/zod/v4/locales/no.js
|
|
7810
|
-
var
|
|
8216
|
+
var error32 = () => {
|
|
7811
8217
|
const Sizable = {
|
|
7812
8218
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
7813
8219
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -7911,12 +8317,12 @@ var error30 = () => {
|
|
|
7911
8317
|
};
|
|
7912
8318
|
function no_default() {
|
|
7913
8319
|
return {
|
|
7914
|
-
localeError:
|
|
8320
|
+
localeError: error32()
|
|
7915
8321
|
};
|
|
7916
8322
|
}
|
|
7917
8323
|
|
|
7918
8324
|
// ../../node_modules/zod/v4/locales/ota.js
|
|
7919
|
-
var
|
|
8325
|
+
var error33 = () => {
|
|
7920
8326
|
const Sizable = {
|
|
7921
8327
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
7922
8328
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -8021,12 +8427,12 @@ var error31 = () => {
|
|
|
8021
8427
|
};
|
|
8022
8428
|
function ota_default() {
|
|
8023
8429
|
return {
|
|
8024
|
-
localeError:
|
|
8430
|
+
localeError: error33()
|
|
8025
8431
|
};
|
|
8026
8432
|
}
|
|
8027
8433
|
|
|
8028
8434
|
// ../../node_modules/zod/v4/locales/ps.js
|
|
8029
|
-
var
|
|
8435
|
+
var error34 = () => {
|
|
8030
8436
|
const Sizable = {
|
|
8031
8437
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
8032
8438
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -8136,12 +8542,12 @@ var error32 = () => {
|
|
|
8136
8542
|
};
|
|
8137
8543
|
function ps_default() {
|
|
8138
8544
|
return {
|
|
8139
|
-
localeError:
|
|
8545
|
+
localeError: error34()
|
|
8140
8546
|
};
|
|
8141
8547
|
}
|
|
8142
8548
|
|
|
8143
8549
|
// ../../node_modules/zod/v4/locales/pl.js
|
|
8144
|
-
var
|
|
8550
|
+
var error35 = () => {
|
|
8145
8551
|
const Sizable = {
|
|
8146
8552
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
8147
8553
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -8246,12 +8652,12 @@ var error33 = () => {
|
|
|
8246
8652
|
};
|
|
8247
8653
|
function pl_default() {
|
|
8248
8654
|
return {
|
|
8249
|
-
localeError:
|
|
8655
|
+
localeError: error35()
|
|
8250
8656
|
};
|
|
8251
8657
|
}
|
|
8252
8658
|
|
|
8253
8659
|
// ../../node_modules/zod/v4/locales/pt.js
|
|
8254
|
-
var
|
|
8660
|
+
var error36 = () => {
|
|
8255
8661
|
const Sizable = {
|
|
8256
8662
|
string: { unit: "caracteres", verb: "ter" },
|
|
8257
8663
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -8355,7 +8761,127 @@ var error34 = () => {
|
|
|
8355
8761
|
};
|
|
8356
8762
|
function pt_default() {
|
|
8357
8763
|
return {
|
|
8358
|
-
localeError:
|
|
8764
|
+
localeError: error36()
|
|
8765
|
+
};
|
|
8766
|
+
}
|
|
8767
|
+
|
|
8768
|
+
// ../../node_modules/zod/v4/locales/ro.js
|
|
8769
|
+
var error37 = () => {
|
|
8770
|
+
const Sizable = {
|
|
8771
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
8772
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
8773
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
8774
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
8775
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
8776
|
+
};
|
|
8777
|
+
function getSizing(origin) {
|
|
8778
|
+
return Sizable[origin] ?? null;
|
|
8779
|
+
}
|
|
8780
|
+
const FormatDictionary = {
|
|
8781
|
+
regex: "intrare",
|
|
8782
|
+
email: "adres\u0103 de email",
|
|
8783
|
+
url: "URL",
|
|
8784
|
+
emoji: "emoji",
|
|
8785
|
+
uuid: "UUID",
|
|
8786
|
+
uuidv4: "UUIDv4",
|
|
8787
|
+
uuidv6: "UUIDv6",
|
|
8788
|
+
nanoid: "nanoid",
|
|
8789
|
+
guid: "GUID",
|
|
8790
|
+
cuid: "cuid",
|
|
8791
|
+
cuid2: "cuid2",
|
|
8792
|
+
ulid: "ULID",
|
|
8793
|
+
xid: "XID",
|
|
8794
|
+
ksuid: "KSUID",
|
|
8795
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
8796
|
+
date: "dat\u0103 ISO",
|
|
8797
|
+
time: "or\u0103 ISO",
|
|
8798
|
+
duration: "durat\u0103 ISO",
|
|
8799
|
+
ipv4: "adres\u0103 IPv4",
|
|
8800
|
+
ipv6: "adres\u0103 IPv6",
|
|
8801
|
+
mac: "adres\u0103 MAC",
|
|
8802
|
+
cidrv4: "interval IPv4",
|
|
8803
|
+
cidrv6: "interval IPv6",
|
|
8804
|
+
base64: "\u0219ir codat base64",
|
|
8805
|
+
base64url: "\u0219ir codat base64url",
|
|
8806
|
+
json_string: "\u0219ir JSON",
|
|
8807
|
+
e164: "num\u0103r E.164",
|
|
8808
|
+
jwt: "JWT",
|
|
8809
|
+
template_literal: "intrare"
|
|
8810
|
+
};
|
|
8811
|
+
const TypeDictionary = {
|
|
8812
|
+
nan: "NaN",
|
|
8813
|
+
string: "\u0219ir",
|
|
8814
|
+
number: "num\u0103r",
|
|
8815
|
+
boolean: "boolean",
|
|
8816
|
+
function: "func\u021Bie",
|
|
8817
|
+
array: "matrice",
|
|
8818
|
+
object: "obiect",
|
|
8819
|
+
undefined: "nedefinit",
|
|
8820
|
+
symbol: "simbol",
|
|
8821
|
+
bigint: "num\u0103r mare",
|
|
8822
|
+
void: "void",
|
|
8823
|
+
never: "never",
|
|
8824
|
+
map: "hart\u0103",
|
|
8825
|
+
set: "set"
|
|
8826
|
+
};
|
|
8827
|
+
return (issue2) => {
|
|
8828
|
+
switch (issue2.code) {
|
|
8829
|
+
case "invalid_type": {
|
|
8830
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
8831
|
+
const receivedType = parsedType(issue2.input);
|
|
8832
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
8833
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
8834
|
+
}
|
|
8835
|
+
case "invalid_value":
|
|
8836
|
+
if (issue2.values.length === 1)
|
|
8837
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
8838
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
8839
|
+
case "too_big": {
|
|
8840
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
8841
|
+
const sizing = getSizing(issue2.origin);
|
|
8842
|
+
if (sizing)
|
|
8843
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
8844
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
8845
|
+
}
|
|
8846
|
+
case "too_small": {
|
|
8847
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
8848
|
+
const sizing = getSizing(issue2.origin);
|
|
8849
|
+
if (sizing) {
|
|
8850
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
8851
|
+
}
|
|
8852
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
8853
|
+
}
|
|
8854
|
+
case "invalid_format": {
|
|
8855
|
+
const _issue = issue2;
|
|
8856
|
+
if (_issue.format === "starts_with") {
|
|
8857
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
8858
|
+
}
|
|
8859
|
+
if (_issue.format === "ends_with")
|
|
8860
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
8861
|
+
if (_issue.format === "includes")
|
|
8862
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
8863
|
+
if (_issue.format === "regex")
|
|
8864
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
8865
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
8866
|
+
}
|
|
8867
|
+
case "not_multiple_of":
|
|
8868
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
8869
|
+
case "unrecognized_keys":
|
|
8870
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
8871
|
+
case "invalid_key":
|
|
8872
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
8873
|
+
case "invalid_union":
|
|
8874
|
+
return "Intrare invalid\u0103";
|
|
8875
|
+
case "invalid_element":
|
|
8876
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
8877
|
+
default:
|
|
8878
|
+
return `Intrare invalid\u0103`;
|
|
8879
|
+
}
|
|
8880
|
+
};
|
|
8881
|
+
};
|
|
8882
|
+
function ro_default() {
|
|
8883
|
+
return {
|
|
8884
|
+
localeError: error37()
|
|
8359
8885
|
};
|
|
8360
8886
|
}
|
|
8361
8887
|
|
|
@@ -8375,7 +8901,7 @@ function getRussianPlural(count, one, few, many) {
|
|
|
8375
8901
|
}
|
|
8376
8902
|
return many;
|
|
8377
8903
|
}
|
|
8378
|
-
var
|
|
8904
|
+
var error38 = () => {
|
|
8379
8905
|
const Sizable = {
|
|
8380
8906
|
string: {
|
|
8381
8907
|
unit: {
|
|
@@ -8512,12 +9038,12 @@ var error35 = () => {
|
|
|
8512
9038
|
};
|
|
8513
9039
|
function ru_default() {
|
|
8514
9040
|
return {
|
|
8515
|
-
localeError:
|
|
9041
|
+
localeError: error38()
|
|
8516
9042
|
};
|
|
8517
9043
|
}
|
|
8518
9044
|
|
|
8519
9045
|
// ../../node_modules/zod/v4/locales/sl.js
|
|
8520
|
-
var
|
|
9046
|
+
var error39 = () => {
|
|
8521
9047
|
const Sizable = {
|
|
8522
9048
|
string: { unit: "znakov", verb: "imeti" },
|
|
8523
9049
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -8622,12 +9148,12 @@ var error36 = () => {
|
|
|
8622
9148
|
};
|
|
8623
9149
|
function sl_default() {
|
|
8624
9150
|
return {
|
|
8625
|
-
localeError:
|
|
9151
|
+
localeError: error39()
|
|
8626
9152
|
};
|
|
8627
9153
|
}
|
|
8628
9154
|
|
|
8629
9155
|
// ../../node_modules/zod/v4/locales/sv.js
|
|
8630
|
-
var
|
|
9156
|
+
var error40 = () => {
|
|
8631
9157
|
const Sizable = {
|
|
8632
9158
|
string: { unit: "tecken", verb: "att ha" },
|
|
8633
9159
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -8733,12 +9259,12 @@ var error37 = () => {
|
|
|
8733
9259
|
};
|
|
8734
9260
|
function sv_default() {
|
|
8735
9261
|
return {
|
|
8736
|
-
localeError:
|
|
9262
|
+
localeError: error40()
|
|
8737
9263
|
};
|
|
8738
9264
|
}
|
|
8739
9265
|
|
|
8740
9266
|
// ../../node_modules/zod/v4/locales/ta.js
|
|
8741
|
-
var
|
|
9267
|
+
var error41 = () => {
|
|
8742
9268
|
const Sizable = {
|
|
8743
9269
|
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" },
|
|
8744
9270
|
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" },
|
|
@@ -8844,12 +9370,12 @@ var error38 = () => {
|
|
|
8844
9370
|
};
|
|
8845
9371
|
function ta_default() {
|
|
8846
9372
|
return {
|
|
8847
|
-
localeError:
|
|
9373
|
+
localeError: error41()
|
|
8848
9374
|
};
|
|
8849
9375
|
}
|
|
8850
9376
|
|
|
8851
9377
|
// ../../node_modules/zod/v4/locales/th.js
|
|
8852
|
-
var
|
|
9378
|
+
var error42 = () => {
|
|
8853
9379
|
const Sizable = {
|
|
8854
9380
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
8855
9381
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -8955,12 +9481,12 @@ var error39 = () => {
|
|
|
8955
9481
|
};
|
|
8956
9482
|
function th_default() {
|
|
8957
9483
|
return {
|
|
8958
|
-
localeError:
|
|
9484
|
+
localeError: error42()
|
|
8959
9485
|
};
|
|
8960
9486
|
}
|
|
8961
9487
|
|
|
8962
9488
|
// ../../node_modules/zod/v4/locales/tr.js
|
|
8963
|
-
var
|
|
9489
|
+
var error43 = () => {
|
|
8964
9490
|
const Sizable = {
|
|
8965
9491
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
8966
9492
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -9061,12 +9587,12 @@ var error40 = () => {
|
|
|
9061
9587
|
};
|
|
9062
9588
|
function tr_default() {
|
|
9063
9589
|
return {
|
|
9064
|
-
localeError:
|
|
9590
|
+
localeError: error43()
|
|
9065
9591
|
};
|
|
9066
9592
|
}
|
|
9067
9593
|
|
|
9068
9594
|
// ../../node_modules/zod/v4/locales/uk.js
|
|
9069
|
-
var
|
|
9595
|
+
var error44 = () => {
|
|
9070
9596
|
const Sizable = {
|
|
9071
9597
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
9072
9598
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -9170,7 +9696,7 @@ var error41 = () => {
|
|
|
9170
9696
|
};
|
|
9171
9697
|
function uk_default() {
|
|
9172
9698
|
return {
|
|
9173
|
-
localeError:
|
|
9699
|
+
localeError: error44()
|
|
9174
9700
|
};
|
|
9175
9701
|
}
|
|
9176
9702
|
|
|
@@ -9180,7 +9706,7 @@ function ua_default() {
|
|
|
9180
9706
|
}
|
|
9181
9707
|
|
|
9182
9708
|
// ../../node_modules/zod/v4/locales/ur.js
|
|
9183
|
-
var
|
|
9709
|
+
var error45 = () => {
|
|
9184
9710
|
const Sizable = {
|
|
9185
9711
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
9186
9712
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -9286,17 +9812,18 @@ var error42 = () => {
|
|
|
9286
9812
|
};
|
|
9287
9813
|
function ur_default() {
|
|
9288
9814
|
return {
|
|
9289
|
-
localeError:
|
|
9815
|
+
localeError: error45()
|
|
9290
9816
|
};
|
|
9291
9817
|
}
|
|
9292
9818
|
|
|
9293
9819
|
// ../../node_modules/zod/v4/locales/uz.js
|
|
9294
|
-
var
|
|
9820
|
+
var error46 = () => {
|
|
9295
9821
|
const Sizable = {
|
|
9296
9822
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
9297
9823
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
9298
9824
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
9299
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
9825
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
9826
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
9300
9827
|
};
|
|
9301
9828
|
function getSizing(origin) {
|
|
9302
9829
|
return Sizable[origin] ?? null;
|
|
@@ -9396,12 +9923,12 @@ var error43 = () => {
|
|
|
9396
9923
|
};
|
|
9397
9924
|
function uz_default() {
|
|
9398
9925
|
return {
|
|
9399
|
-
localeError:
|
|
9926
|
+
localeError: error46()
|
|
9400
9927
|
};
|
|
9401
9928
|
}
|
|
9402
9929
|
|
|
9403
9930
|
// ../../node_modules/zod/v4/locales/vi.js
|
|
9404
|
-
var
|
|
9931
|
+
var error47 = () => {
|
|
9405
9932
|
const Sizable = {
|
|
9406
9933
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
9407
9934
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -9505,12 +10032,12 @@ var error44 = () => {
|
|
|
9505
10032
|
};
|
|
9506
10033
|
function vi_default() {
|
|
9507
10034
|
return {
|
|
9508
|
-
localeError:
|
|
10035
|
+
localeError: error47()
|
|
9509
10036
|
};
|
|
9510
10037
|
}
|
|
9511
10038
|
|
|
9512
10039
|
// ../../node_modules/zod/v4/locales/zh-CN.js
|
|
9513
|
-
var
|
|
10040
|
+
var error48 = () => {
|
|
9514
10041
|
const Sizable = {
|
|
9515
10042
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
9516
10043
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -9615,12 +10142,12 @@ var error45 = () => {
|
|
|
9615
10142
|
};
|
|
9616
10143
|
function zh_CN_default() {
|
|
9617
10144
|
return {
|
|
9618
|
-
localeError:
|
|
10145
|
+
localeError: error48()
|
|
9619
10146
|
};
|
|
9620
10147
|
}
|
|
9621
10148
|
|
|
9622
10149
|
// ../../node_modules/zod/v4/locales/zh-TW.js
|
|
9623
|
-
var
|
|
10150
|
+
var error49 = () => {
|
|
9624
10151
|
const Sizable = {
|
|
9625
10152
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
9626
10153
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -9723,12 +10250,12 @@ var error46 = () => {
|
|
|
9723
10250
|
};
|
|
9724
10251
|
function zh_TW_default() {
|
|
9725
10252
|
return {
|
|
9726
|
-
localeError:
|
|
10253
|
+
localeError: error49()
|
|
9727
10254
|
};
|
|
9728
10255
|
}
|
|
9729
10256
|
|
|
9730
10257
|
// ../../node_modules/zod/v4/locales/yo.js
|
|
9731
|
-
var
|
|
10258
|
+
var error50 = () => {
|
|
9732
10259
|
const Sizable = {
|
|
9733
10260
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
9734
10261
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -9831,12 +10358,12 @@ var error47 = () => {
|
|
|
9831
10358
|
};
|
|
9832
10359
|
function yo_default() {
|
|
9833
10360
|
return {
|
|
9834
|
-
localeError:
|
|
10361
|
+
localeError: error50()
|
|
9835
10362
|
};
|
|
9836
10363
|
}
|
|
9837
10364
|
|
|
9838
10365
|
// ../../node_modules/zod/v4/core/registries.js
|
|
9839
|
-
var
|
|
10366
|
+
var _a2;
|
|
9840
10367
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
9841
10368
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
9842
10369
|
var $ZodRegistry = class {
|
|
@@ -9882,7 +10409,7 @@ var $ZodRegistry = class {
|
|
|
9882
10409
|
function registry() {
|
|
9883
10410
|
return new $ZodRegistry();
|
|
9884
10411
|
}
|
|
9885
|
-
(
|
|
10412
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
9886
10413
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
9887
10414
|
|
|
9888
10415
|
// ../../node_modules/zod/v4/core/api.js
|
|
@@ -10800,7 +11327,7 @@ function _refine(Class2, fn, _params) {
|
|
|
10800
11327
|
return schema;
|
|
10801
11328
|
}
|
|
10802
11329
|
// @__NO_SIDE_EFFECTS__
|
|
10803
|
-
function _superRefine(fn) {
|
|
11330
|
+
function _superRefine(fn, params) {
|
|
10804
11331
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
10805
11332
|
payload.addIssue = (issue2) => {
|
|
10806
11333
|
if (typeof issue2 === "string") {
|
|
@@ -10817,7 +11344,7 @@ function _superRefine(fn) {
|
|
|
10817
11344
|
}
|
|
10818
11345
|
};
|
|
10819
11346
|
return fn(payload.value, payload);
|
|
10820
|
-
});
|
|
11347
|
+
}, params);
|
|
10821
11348
|
return ch;
|
|
10822
11349
|
}
|
|
10823
11350
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -10947,7 +11474,7 @@ function initializeContext(params) {
|
|
|
10947
11474
|
};
|
|
10948
11475
|
}
|
|
10949
11476
|
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
10950
|
-
var
|
|
11477
|
+
var _a3;
|
|
10951
11478
|
const def = schema._zod.def;
|
|
10952
11479
|
const seen = ctx.seen.get(schema);
|
|
10953
11480
|
if (seen) {
|
|
@@ -10994,8 +11521,8 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
10994
11521
|
delete result.schema.examples;
|
|
10995
11522
|
delete result.schema.default;
|
|
10996
11523
|
}
|
|
10997
|
-
if (ctx.io === "input" && result.schema
|
|
10998
|
-
(
|
|
11524
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
11525
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
10999
11526
|
delete result.schema._prefault;
|
|
11000
11527
|
const _result = ctx.seen.get(schema);
|
|
11001
11528
|
return _result.schema;
|
|
@@ -11176,10 +11703,15 @@ function finalize(ctx, schema) {
|
|
|
11176
11703
|
result.$id = ctx.external.uri(id);
|
|
11177
11704
|
}
|
|
11178
11705
|
Object.assign(result, root.def ?? root.schema);
|
|
11706
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
11707
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
11708
|
+
delete result.id;
|
|
11179
11709
|
const defs = ctx.external?.defs ?? {};
|
|
11180
11710
|
for (const entry of ctx.seen.entries()) {
|
|
11181
11711
|
const seen = entry[1];
|
|
11182
11712
|
if (seen.def && seen.defId) {
|
|
11713
|
+
if (seen.def.id === seen.defId)
|
|
11714
|
+
delete seen.def.id;
|
|
11183
11715
|
defs[seen.defId] = seen.def;
|
|
11184
11716
|
}
|
|
11185
11717
|
}
|
|
@@ -11235,6 +11767,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
11235
11767
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
11236
11768
|
}
|
|
11237
11769
|
if (def.type === "pipe") {
|
|
11770
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
11771
|
+
return true;
|
|
11238
11772
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
11239
11773
|
}
|
|
11240
11774
|
if (def.type === "object") {
|
|
@@ -11324,39 +11858,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
11324
11858
|
json2.type = "integer";
|
|
11325
11859
|
else
|
|
11326
11860
|
json2.type = "number";
|
|
11327
|
-
|
|
11328
|
-
|
|
11861
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
11862
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
11863
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
11864
|
+
if (exMin) {
|
|
11865
|
+
if (legacy) {
|
|
11329
11866
|
json2.minimum = exclusiveMinimum;
|
|
11330
11867
|
json2.exclusiveMinimum = true;
|
|
11331
11868
|
} else {
|
|
11332
11869
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
11333
11870
|
}
|
|
11334
|
-
}
|
|
11335
|
-
if (typeof minimum === "number") {
|
|
11871
|
+
} else if (typeof minimum === "number") {
|
|
11336
11872
|
json2.minimum = minimum;
|
|
11337
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
11338
|
-
if (exclusiveMinimum >= minimum)
|
|
11339
|
-
delete json2.minimum;
|
|
11340
|
-
else
|
|
11341
|
-
delete json2.exclusiveMinimum;
|
|
11342
|
-
}
|
|
11343
11873
|
}
|
|
11344
|
-
if (
|
|
11345
|
-
if (
|
|
11874
|
+
if (exMax) {
|
|
11875
|
+
if (legacy) {
|
|
11346
11876
|
json2.maximum = exclusiveMaximum;
|
|
11347
11877
|
json2.exclusiveMaximum = true;
|
|
11348
11878
|
} else {
|
|
11349
11879
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
11350
11880
|
}
|
|
11351
|
-
}
|
|
11352
|
-
if (typeof maximum === "number") {
|
|
11881
|
+
} else if (typeof maximum === "number") {
|
|
11353
11882
|
json2.maximum = maximum;
|
|
11354
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
11355
|
-
if (exclusiveMaximum <= maximum)
|
|
11356
|
-
delete json2.maximum;
|
|
11357
|
-
else
|
|
11358
|
-
delete json2.exclusiveMaximum;
|
|
11359
|
-
}
|
|
11360
11883
|
}
|
|
11361
11884
|
if (typeof multipleOf === "number")
|
|
11362
11885
|
json2.multipleOf = multipleOf;
|
|
@@ -11528,7 +12051,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
11528
12051
|
if (typeof maximum === "number")
|
|
11529
12052
|
json2.maxItems = maximum;
|
|
11530
12053
|
json2.type = "array";
|
|
11531
|
-
json2.items = process2(def.element, ctx, {
|
|
12054
|
+
json2.items = process2(def.element, ctx, {
|
|
12055
|
+
...params,
|
|
12056
|
+
path: [...params.path, "items"]
|
|
12057
|
+
});
|
|
11532
12058
|
};
|
|
11533
12059
|
var objectProcessor = (schema, ctx, _json, params) => {
|
|
11534
12060
|
const json2 = _json;
|
|
@@ -11721,7 +12247,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
|
|
|
11721
12247
|
};
|
|
11722
12248
|
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
11723
12249
|
const def = schema._zod.def;
|
|
11724
|
-
const
|
|
12250
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
12251
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
11725
12252
|
process2(innerType, ctx, params);
|
|
11726
12253
|
const seen = ctx.seen.get(schema);
|
|
11727
12254
|
seen.ref = innerType;
|
|
@@ -11955,6 +12482,7 @@ __export(schemas_exports2, {
|
|
|
11955
12482
|
ZodOptional: () => ZodOptional,
|
|
11956
12483
|
ZodPipe: () => ZodPipe,
|
|
11957
12484
|
ZodPrefault: () => ZodPrefault,
|
|
12485
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
11958
12486
|
ZodPromise: () => ZodPromise,
|
|
11959
12487
|
ZodReadonly: () => ZodReadonly,
|
|
11960
12488
|
ZodRecord: () => ZodRecord,
|
|
@@ -12015,6 +12543,7 @@ __export(schemas_exports2, {
|
|
|
12015
12543
|
int32: () => int32,
|
|
12016
12544
|
int64: () => int64,
|
|
12017
12545
|
intersection: () => intersection,
|
|
12546
|
+
invertCodec: () => invertCodec,
|
|
12018
12547
|
ipv4: () => ipv42,
|
|
12019
12548
|
ipv6: () => ipv62,
|
|
12020
12549
|
json: () => json,
|
|
@@ -12184,8 +12713,8 @@ var initializer2 = (inst, issues) => {
|
|
|
12184
12713
|
}
|
|
12185
12714
|
});
|
|
12186
12715
|
};
|
|
12187
|
-
var ZodError = $constructor("ZodError", initializer2);
|
|
12188
|
-
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
12716
|
+
var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
12717
|
+
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
12189
12718
|
Parent: Error
|
|
12190
12719
|
});
|
|
12191
12720
|
|
|
@@ -12204,6 +12733,43 @@ var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
|
12204
12733
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
12205
12734
|
|
|
12206
12735
|
// ../../node_modules/zod/v4/classic/schemas.js
|
|
12736
|
+
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
12737
|
+
function _installLazyMethods(inst, group, methods) {
|
|
12738
|
+
const proto = Object.getPrototypeOf(inst);
|
|
12739
|
+
let installed = _installedGroups.get(proto);
|
|
12740
|
+
if (!installed) {
|
|
12741
|
+
installed = /* @__PURE__ */ new Set();
|
|
12742
|
+
_installedGroups.set(proto, installed);
|
|
12743
|
+
}
|
|
12744
|
+
if (installed.has(group))
|
|
12745
|
+
return;
|
|
12746
|
+
installed.add(group);
|
|
12747
|
+
for (const key in methods) {
|
|
12748
|
+
const fn = methods[key];
|
|
12749
|
+
Object.defineProperty(proto, key, {
|
|
12750
|
+
configurable: true,
|
|
12751
|
+
enumerable: false,
|
|
12752
|
+
get() {
|
|
12753
|
+
const bound = fn.bind(this);
|
|
12754
|
+
Object.defineProperty(this, key, {
|
|
12755
|
+
configurable: true,
|
|
12756
|
+
writable: true,
|
|
12757
|
+
enumerable: true,
|
|
12758
|
+
value: bound
|
|
12759
|
+
});
|
|
12760
|
+
return bound;
|
|
12761
|
+
},
|
|
12762
|
+
set(v) {
|
|
12763
|
+
Object.defineProperty(this, key, {
|
|
12764
|
+
configurable: true,
|
|
12765
|
+
writable: true,
|
|
12766
|
+
enumerable: true,
|
|
12767
|
+
value: v
|
|
12768
|
+
});
|
|
12769
|
+
}
|
|
12770
|
+
});
|
|
12771
|
+
}
|
|
12772
|
+
}
|
|
12207
12773
|
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
12208
12774
|
$ZodType.init(inst, def);
|
|
12209
12775
|
Object.assign(inst["~standard"], {
|
|
@@ -12216,23 +12782,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
12216
12782
|
inst.def = def;
|
|
12217
12783
|
inst.type = def.type;
|
|
12218
12784
|
Object.defineProperty(inst, "_def", { value: def });
|
|
12219
|
-
inst.check = (...checks) => {
|
|
12220
|
-
return inst.clone(util_exports.mergeDefs(def, {
|
|
12221
|
-
checks: [
|
|
12222
|
-
...def.checks ?? [],
|
|
12223
|
-
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
12224
|
-
]
|
|
12225
|
-
}), {
|
|
12226
|
-
parent: true
|
|
12227
|
-
});
|
|
12228
|
-
};
|
|
12229
|
-
inst.with = inst.check;
|
|
12230
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
12231
|
-
inst.brand = () => inst;
|
|
12232
|
-
inst.register = ((reg, meta3) => {
|
|
12233
|
-
reg.add(inst, meta3);
|
|
12234
|
-
return inst;
|
|
12235
|
-
});
|
|
12236
12785
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
12237
12786
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
12238
12787
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -12246,45 +12795,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
12246
12795
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
12247
12796
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
12248
12797
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
12249
|
-
inst
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12264
|
-
|
|
12265
|
-
|
|
12266
|
-
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12798
|
+
_installLazyMethods(inst, "ZodType", {
|
|
12799
|
+
check(...chks) {
|
|
12800
|
+
const def2 = this.def;
|
|
12801
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
12802
|
+
checks: [
|
|
12803
|
+
...def2.checks ?? [],
|
|
12804
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
12805
|
+
]
|
|
12806
|
+
}), { parent: true });
|
|
12807
|
+
},
|
|
12808
|
+
with(...chks) {
|
|
12809
|
+
return this.check(...chks);
|
|
12810
|
+
},
|
|
12811
|
+
clone(def2, params) {
|
|
12812
|
+
return clone(this, def2, params);
|
|
12813
|
+
},
|
|
12814
|
+
brand() {
|
|
12815
|
+
return this;
|
|
12816
|
+
},
|
|
12817
|
+
register(reg, meta3) {
|
|
12818
|
+
reg.add(this, meta3);
|
|
12819
|
+
return this;
|
|
12820
|
+
},
|
|
12821
|
+
refine(check2, params) {
|
|
12822
|
+
return this.check(refine(check2, params));
|
|
12823
|
+
},
|
|
12824
|
+
superRefine(refinement, params) {
|
|
12825
|
+
return this.check(superRefine(refinement, params));
|
|
12826
|
+
},
|
|
12827
|
+
overwrite(fn) {
|
|
12828
|
+
return this.check(_overwrite(fn));
|
|
12829
|
+
},
|
|
12830
|
+
optional() {
|
|
12831
|
+
return optional(this);
|
|
12832
|
+
},
|
|
12833
|
+
exactOptional() {
|
|
12834
|
+
return exactOptional(this);
|
|
12835
|
+
},
|
|
12836
|
+
nullable() {
|
|
12837
|
+
return nullable(this);
|
|
12838
|
+
},
|
|
12839
|
+
nullish() {
|
|
12840
|
+
return optional(nullable(this));
|
|
12841
|
+
},
|
|
12842
|
+
nonoptional(params) {
|
|
12843
|
+
return nonoptional(this, params);
|
|
12844
|
+
},
|
|
12845
|
+
array() {
|
|
12846
|
+
return array(this);
|
|
12847
|
+
},
|
|
12848
|
+
or(arg) {
|
|
12849
|
+
return union([this, arg]);
|
|
12850
|
+
},
|
|
12851
|
+
and(arg) {
|
|
12852
|
+
return intersection(this, arg);
|
|
12853
|
+
},
|
|
12854
|
+
transform(tx) {
|
|
12855
|
+
return pipe(this, transform(tx));
|
|
12856
|
+
},
|
|
12857
|
+
default(d) {
|
|
12858
|
+
return _default2(this, d);
|
|
12859
|
+
},
|
|
12860
|
+
prefault(d) {
|
|
12861
|
+
return prefault(this, d);
|
|
12862
|
+
},
|
|
12863
|
+
catch(params) {
|
|
12864
|
+
return _catch2(this, params);
|
|
12865
|
+
},
|
|
12866
|
+
pipe(target) {
|
|
12867
|
+
return pipe(this, target);
|
|
12868
|
+
},
|
|
12869
|
+
readonly() {
|
|
12870
|
+
return readonly(this);
|
|
12871
|
+
},
|
|
12872
|
+
describe(description) {
|
|
12873
|
+
const cl = this.clone();
|
|
12874
|
+
globalRegistry.add(cl, { description });
|
|
12875
|
+
return cl;
|
|
12876
|
+
},
|
|
12877
|
+
meta(...args) {
|
|
12878
|
+
if (args.length === 0)
|
|
12879
|
+
return globalRegistry.get(this);
|
|
12880
|
+
const cl = this.clone();
|
|
12881
|
+
globalRegistry.add(cl, args[0]);
|
|
12882
|
+
return cl;
|
|
12883
|
+
},
|
|
12884
|
+
isOptional() {
|
|
12885
|
+
return this.safeParse(void 0).success;
|
|
12886
|
+
},
|
|
12887
|
+
isNullable() {
|
|
12888
|
+
return this.safeParse(null).success;
|
|
12889
|
+
},
|
|
12890
|
+
apply(fn) {
|
|
12891
|
+
return fn(this);
|
|
12892
|
+
}
|
|
12893
|
+
});
|
|
12271
12894
|
Object.defineProperty(inst, "description", {
|
|
12272
12895
|
get() {
|
|
12273
12896
|
return globalRegistry.get(inst)?.description;
|
|
12274
12897
|
},
|
|
12275
12898
|
configurable: true
|
|
12276
12899
|
});
|
|
12277
|
-
inst.meta = (...args) => {
|
|
12278
|
-
if (args.length === 0) {
|
|
12279
|
-
return globalRegistry.get(inst);
|
|
12280
|
-
}
|
|
12281
|
-
const cl = inst.clone();
|
|
12282
|
-
globalRegistry.add(cl, args[0]);
|
|
12283
|
-
return cl;
|
|
12284
|
-
};
|
|
12285
|
-
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
12286
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
12287
|
-
inst.apply = (fn) => fn(inst);
|
|
12288
12900
|
return inst;
|
|
12289
12901
|
});
|
|
12290
12902
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -12295,21 +12907,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
12295
12907
|
inst.format = bag.format ?? null;
|
|
12296
12908
|
inst.minLength = bag.minimum ?? null;
|
|
12297
12909
|
inst.maxLength = bag.maximum ?? null;
|
|
12298
|
-
inst
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
|
|
12311
|
-
|
|
12312
|
-
|
|
12910
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
12911
|
+
regex(...args) {
|
|
12912
|
+
return this.check(_regex(...args));
|
|
12913
|
+
},
|
|
12914
|
+
includes(...args) {
|
|
12915
|
+
return this.check(_includes(...args));
|
|
12916
|
+
},
|
|
12917
|
+
startsWith(...args) {
|
|
12918
|
+
return this.check(_startsWith(...args));
|
|
12919
|
+
},
|
|
12920
|
+
endsWith(...args) {
|
|
12921
|
+
return this.check(_endsWith(...args));
|
|
12922
|
+
},
|
|
12923
|
+
min(...args) {
|
|
12924
|
+
return this.check(_minLength(...args));
|
|
12925
|
+
},
|
|
12926
|
+
max(...args) {
|
|
12927
|
+
return this.check(_maxLength(...args));
|
|
12928
|
+
},
|
|
12929
|
+
length(...args) {
|
|
12930
|
+
return this.check(_length(...args));
|
|
12931
|
+
},
|
|
12932
|
+
nonempty(...args) {
|
|
12933
|
+
return this.check(_minLength(1, ...args));
|
|
12934
|
+
},
|
|
12935
|
+
lowercase(params) {
|
|
12936
|
+
return this.check(_lowercase(params));
|
|
12937
|
+
},
|
|
12938
|
+
uppercase(params) {
|
|
12939
|
+
return this.check(_uppercase(params));
|
|
12940
|
+
},
|
|
12941
|
+
trim() {
|
|
12942
|
+
return this.check(_trim());
|
|
12943
|
+
},
|
|
12944
|
+
normalize(...args) {
|
|
12945
|
+
return this.check(_normalize(...args));
|
|
12946
|
+
},
|
|
12947
|
+
toLowerCase() {
|
|
12948
|
+
return this.check(_toLowerCase());
|
|
12949
|
+
},
|
|
12950
|
+
toUpperCase() {
|
|
12951
|
+
return this.check(_toUpperCase());
|
|
12952
|
+
},
|
|
12953
|
+
slugify() {
|
|
12954
|
+
return this.check(_slugify());
|
|
12955
|
+
}
|
|
12956
|
+
});
|
|
12313
12957
|
});
|
|
12314
12958
|
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
12315
12959
|
$ZodString.init(inst, def);
|
|
@@ -12388,7 +13032,7 @@ function url(params) {
|
|
|
12388
13032
|
}
|
|
12389
13033
|
function httpUrl(params) {
|
|
12390
13034
|
return _url(ZodURL, {
|
|
12391
|
-
protocol:
|
|
13035
|
+
protocol: regexes_exports.httpProtocol,
|
|
12392
13036
|
hostname: regexes_exports.domain,
|
|
12393
13037
|
...util_exports.normalizeParams(params)
|
|
12394
13038
|
});
|
|
@@ -12530,21 +13174,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
12530
13174
|
$ZodNumber.init(inst, def);
|
|
12531
13175
|
ZodType.init(inst, def);
|
|
12532
13176
|
inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
|
|
12533
|
-
inst
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12540
|
-
|
|
12541
|
-
|
|
12542
|
-
|
|
12543
|
-
|
|
12544
|
-
|
|
12545
|
-
|
|
12546
|
-
|
|
12547
|
-
|
|
13177
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
13178
|
+
gt(value, params) {
|
|
13179
|
+
return this.check(_gt(value, params));
|
|
13180
|
+
},
|
|
13181
|
+
gte(value, params) {
|
|
13182
|
+
return this.check(_gte(value, params));
|
|
13183
|
+
},
|
|
13184
|
+
min(value, params) {
|
|
13185
|
+
return this.check(_gte(value, params));
|
|
13186
|
+
},
|
|
13187
|
+
lt(value, params) {
|
|
13188
|
+
return this.check(_lt(value, params));
|
|
13189
|
+
},
|
|
13190
|
+
lte(value, params) {
|
|
13191
|
+
return this.check(_lte(value, params));
|
|
13192
|
+
},
|
|
13193
|
+
max(value, params) {
|
|
13194
|
+
return this.check(_lte(value, params));
|
|
13195
|
+
},
|
|
13196
|
+
int(params) {
|
|
13197
|
+
return this.check(int(params));
|
|
13198
|
+
},
|
|
13199
|
+
safe(params) {
|
|
13200
|
+
return this.check(int(params));
|
|
13201
|
+
},
|
|
13202
|
+
positive(params) {
|
|
13203
|
+
return this.check(_gt(0, params));
|
|
13204
|
+
},
|
|
13205
|
+
nonnegative(params) {
|
|
13206
|
+
return this.check(_gte(0, params));
|
|
13207
|
+
},
|
|
13208
|
+
negative(params) {
|
|
13209
|
+
return this.check(_lt(0, params));
|
|
13210
|
+
},
|
|
13211
|
+
nonpositive(params) {
|
|
13212
|
+
return this.check(_lte(0, params));
|
|
13213
|
+
},
|
|
13214
|
+
multipleOf(value, params) {
|
|
13215
|
+
return this.check(_multipleOf(value, params));
|
|
13216
|
+
},
|
|
13217
|
+
step(value, params) {
|
|
13218
|
+
return this.check(_multipleOf(value, params));
|
|
13219
|
+
},
|
|
13220
|
+
finite() {
|
|
13221
|
+
return this;
|
|
13222
|
+
}
|
|
13223
|
+
});
|
|
12548
13224
|
const bag = inst._zod.bag;
|
|
12549
13225
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
12550
13226
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -12691,11 +13367,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
|
12691
13367
|
ZodType.init(inst, def);
|
|
12692
13368
|
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
12693
13369
|
inst.element = def.element;
|
|
12694
|
-
inst
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
13370
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
13371
|
+
min(n, params) {
|
|
13372
|
+
return this.check(_minLength(n, params));
|
|
13373
|
+
},
|
|
13374
|
+
nonempty(params) {
|
|
13375
|
+
return this.check(_minLength(1, params));
|
|
13376
|
+
},
|
|
13377
|
+
max(n, params) {
|
|
13378
|
+
return this.check(_maxLength(n, params));
|
|
13379
|
+
},
|
|
13380
|
+
length(n, params) {
|
|
13381
|
+
return this.check(_length(n, params));
|
|
13382
|
+
},
|
|
13383
|
+
unwrap() {
|
|
13384
|
+
return this.element;
|
|
13385
|
+
}
|
|
13386
|
+
});
|
|
12699
13387
|
});
|
|
12700
13388
|
function array(element, params) {
|
|
12701
13389
|
return _array(ZodArray, element, params);
|
|
@@ -12711,23 +13399,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
12711
13399
|
util_exports.defineLazy(inst, "shape", () => {
|
|
12712
13400
|
return def.shape;
|
|
12713
13401
|
});
|
|
12714
|
-
inst
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
|
|
12730
|
-
|
|
13402
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
13403
|
+
keyof() {
|
|
13404
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
13405
|
+
},
|
|
13406
|
+
catchall(catchall) {
|
|
13407
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
13408
|
+
},
|
|
13409
|
+
passthrough() {
|
|
13410
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
13411
|
+
},
|
|
13412
|
+
loose() {
|
|
13413
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
13414
|
+
},
|
|
13415
|
+
strict() {
|
|
13416
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
13417
|
+
},
|
|
13418
|
+
strip() {
|
|
13419
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
13420
|
+
},
|
|
13421
|
+
extend(incoming) {
|
|
13422
|
+
return util_exports.extend(this, incoming);
|
|
13423
|
+
},
|
|
13424
|
+
safeExtend(incoming) {
|
|
13425
|
+
return util_exports.safeExtend(this, incoming);
|
|
13426
|
+
},
|
|
13427
|
+
merge(other) {
|
|
13428
|
+
return util_exports.merge(this, other);
|
|
13429
|
+
},
|
|
13430
|
+
pick(mask) {
|
|
13431
|
+
return util_exports.pick(this, mask);
|
|
13432
|
+
},
|
|
13433
|
+
omit(mask) {
|
|
13434
|
+
return util_exports.omit(this, mask);
|
|
13435
|
+
},
|
|
13436
|
+
partial(...args) {
|
|
13437
|
+
return util_exports.partial(ZodOptional, this, args[0]);
|
|
13438
|
+
},
|
|
13439
|
+
required(...args) {
|
|
13440
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
13441
|
+
}
|
|
13442
|
+
});
|
|
12731
13443
|
});
|
|
12732
13444
|
function object(shape, params) {
|
|
12733
13445
|
const def = {
|
|
@@ -12832,6 +13544,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
|
12832
13544
|
inst.valueType = def.valueType;
|
|
12833
13545
|
});
|
|
12834
13546
|
function record(keyType, valueType, params) {
|
|
13547
|
+
if (!valueType || !valueType._zod) {
|
|
13548
|
+
return new ZodRecord({
|
|
13549
|
+
type: "record",
|
|
13550
|
+
keyType: string2(),
|
|
13551
|
+
valueType: keyType,
|
|
13552
|
+
...util_exports.normalizeParams(valueType)
|
|
13553
|
+
});
|
|
13554
|
+
}
|
|
12835
13555
|
return new ZodRecord({
|
|
12836
13556
|
type: "record",
|
|
12837
13557
|
keyType,
|
|
@@ -13003,10 +13723,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
13003
13723
|
if (output instanceof Promise) {
|
|
13004
13724
|
return output.then((output2) => {
|
|
13005
13725
|
payload.value = output2;
|
|
13726
|
+
payload.fallback = true;
|
|
13006
13727
|
return payload;
|
|
13007
13728
|
});
|
|
13008
13729
|
}
|
|
13009
13730
|
payload.value = output;
|
|
13731
|
+
payload.fallback = true;
|
|
13010
13732
|
return payload;
|
|
13011
13733
|
};
|
|
13012
13734
|
});
|
|
@@ -13161,6 +13883,20 @@ function codec(in_, out, params) {
|
|
|
13161
13883
|
reverseTransform: params.encode
|
|
13162
13884
|
});
|
|
13163
13885
|
}
|
|
13886
|
+
function invertCodec(codec2) {
|
|
13887
|
+
const def = codec2._zod.def;
|
|
13888
|
+
return new ZodCodec({
|
|
13889
|
+
type: "pipe",
|
|
13890
|
+
in: def.out,
|
|
13891
|
+
out: def.in,
|
|
13892
|
+
transform: def.reverseTransform,
|
|
13893
|
+
reverseTransform: def.transform
|
|
13894
|
+
});
|
|
13895
|
+
}
|
|
13896
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
13897
|
+
ZodPipe.init(inst, def);
|
|
13898
|
+
$ZodPreprocess.init(inst, def);
|
|
13899
|
+
});
|
|
13164
13900
|
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
13165
13901
|
$ZodReadonly.init(inst, def);
|
|
13166
13902
|
ZodType.init(inst, def);
|
|
@@ -13240,8 +13976,8 @@ function custom(fn, _params) {
|
|
|
13240
13976
|
function refine(fn, _params = {}) {
|
|
13241
13977
|
return _refine(ZodCustom, fn, _params);
|
|
13242
13978
|
}
|
|
13243
|
-
function superRefine(fn) {
|
|
13244
|
-
return _superRefine(fn);
|
|
13979
|
+
function superRefine(fn, params) {
|
|
13980
|
+
return _superRefine(fn, params);
|
|
13245
13981
|
}
|
|
13246
13982
|
var describe2 = describe;
|
|
13247
13983
|
var meta2 = meta;
|
|
@@ -13279,7 +14015,11 @@ function json(params) {
|
|
|
13279
14015
|
return jsonSchema;
|
|
13280
14016
|
}
|
|
13281
14017
|
function preprocess(fn, schema) {
|
|
13282
|
-
return
|
|
14018
|
+
return new ZodPreprocess({
|
|
14019
|
+
type: "pipe",
|
|
14020
|
+
in: transform(fn),
|
|
14021
|
+
out: schema
|
|
14022
|
+
});
|
|
13283
14023
|
}
|
|
13284
14024
|
|
|
13285
14025
|
// ../../node_modules/zod/v4/classic/compat.js
|
|
@@ -13700,12 +14440,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
13700
14440
|
default:
|
|
13701
14441
|
throw new Error(`Unsupported type: ${type}`);
|
|
13702
14442
|
}
|
|
13703
|
-
if (schema.description) {
|
|
13704
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
13705
|
-
}
|
|
13706
|
-
if (schema.default !== void 0) {
|
|
13707
|
-
zodSchema = zodSchema.default(schema.default);
|
|
13708
|
-
}
|
|
13709
14443
|
return zodSchema;
|
|
13710
14444
|
}
|
|
13711
14445
|
function convertSchema(schema, ctx) {
|
|
@@ -13742,6 +14476,9 @@ function convertSchema(schema, ctx) {
|
|
|
13742
14476
|
if (schema.readOnly === true) {
|
|
13743
14477
|
baseSchema = z.readonly(baseSchema);
|
|
13744
14478
|
}
|
|
14479
|
+
if (schema.default !== void 0) {
|
|
14480
|
+
baseSchema = baseSchema.default(schema.default);
|
|
14481
|
+
}
|
|
13745
14482
|
const extraMeta = {};
|
|
13746
14483
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
13747
14484
|
for (const key of coreMetadataKeys) {
|
|
@@ -13763,23 +14500,32 @@ function convertSchema(schema, ctx) {
|
|
|
13763
14500
|
if (Object.keys(extraMeta).length > 0) {
|
|
13764
14501
|
ctx.registry.add(baseSchema, extraMeta);
|
|
13765
14502
|
}
|
|
14503
|
+
if (schema.description) {
|
|
14504
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
14505
|
+
}
|
|
13766
14506
|
return baseSchema;
|
|
13767
14507
|
}
|
|
13768
14508
|
function fromJSONSchema(schema, params) {
|
|
13769
14509
|
if (typeof schema === "boolean") {
|
|
13770
14510
|
return schema ? z.any() : z.never();
|
|
13771
14511
|
}
|
|
13772
|
-
|
|
13773
|
-
|
|
14512
|
+
let normalized;
|
|
14513
|
+
try {
|
|
14514
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
14515
|
+
} catch {
|
|
14516
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
14517
|
+
}
|
|
14518
|
+
const version2 = detectVersion(normalized, params?.defaultTarget);
|
|
14519
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
13774
14520
|
const ctx = {
|
|
13775
14521
|
version: version2,
|
|
13776
14522
|
defs,
|
|
13777
14523
|
refs: /* @__PURE__ */ new Map(),
|
|
13778
14524
|
processing: /* @__PURE__ */ new Set(),
|
|
13779
|
-
rootSchema:
|
|
14525
|
+
rootSchema: normalized,
|
|
13780
14526
|
registry: params?.registry ?? globalRegistry
|
|
13781
14527
|
};
|
|
13782
|
-
return convertSchema(
|
|
14528
|
+
return convertSchema(normalized, ctx);
|
|
13783
14529
|
}
|
|
13784
14530
|
|
|
13785
14531
|
// ../../node_modules/zod/v4/classic/coerce.js
|
|
@@ -14277,33 +15023,61 @@ var AGENT_RULES = [
|
|
|
14277
15023
|
},
|
|
14278
15024
|
{
|
|
14279
15025
|
name: "codex",
|
|
15026
|
+
// Codex 2026 default discovery is `AGENTS.override.md` → `AGENTS.md` →
|
|
15027
|
+
// opt-in `project_doc_fallback_filenames`; `codex.md` is NOT in the
|
|
15028
|
+
// default fallback list. Detection requires Codex-specific markers
|
|
15029
|
+
// (`codex.md` legacy, `.codex/` config dir) — `AGENTS.md` is NOT
|
|
15030
|
+
// included as a marker because the SDK now writes `AGENTS.md`
|
|
15031
|
+
// broadly via the multi-target dispatcher's companion writes; if
|
|
15032
|
+
// `AGENTS.md` were a Codex marker, every project with the SDK's
|
|
15033
|
+
// own companion AGENTS.md would re-classify as Codex on subsequent
|
|
15034
|
+
// detect runs and trigger unintended `.codex/config.toml` writes
|
|
15035
|
+
// (Codex P1 + Copilot P1 review of Wave 18 PR #274). The canonical
|
|
15036
|
+
// write destination remains AGENTS.md regardless of which marker
|
|
15037
|
+
// classified the project.
|
|
14280
15038
|
markers: ["codex.md", ".codex"],
|
|
14281
15039
|
mcpConfigPath: (dir) => (0, import_node_path.join)(dir, ".codex", "config.toml"),
|
|
14282
|
-
infoFilePath: (dir) => (0, import_node_path.join)(dir, "
|
|
15040
|
+
infoFilePath: (dir) => (0, import_node_path.join)(dir, "AGENTS.md"),
|
|
14283
15041
|
cliBinary: "codex",
|
|
14284
15042
|
registrationCommand: "npx glasstrace mcp add --agent codex"
|
|
14285
15043
|
},
|
|
14286
15044
|
{
|
|
14287
15045
|
name: "gemini",
|
|
14288
|
-
markers: [".gemini"],
|
|
15046
|
+
markers: [".gemini", "GEMINI.md"],
|
|
14289
15047
|
mcpConfigPath: (dir) => (0, import_node_path.join)(dir, ".gemini", "settings.json"),
|
|
14290
|
-
infoFilePath: () =>
|
|
15048
|
+
infoFilePath: (dir) => (0, import_node_path.join)(dir, "GEMINI.md"),
|
|
14291
15049
|
cliBinary: "gemini",
|
|
14292
15050
|
registrationCommand: "npx glasstrace mcp add --agent gemini"
|
|
14293
15051
|
},
|
|
14294
15052
|
{
|
|
14295
15053
|
name: "cursor",
|
|
15054
|
+
// `.cursor/rules/*.mdc` is the current canonical format per Cursor's
|
|
15055
|
+
// 2026 docs. `.cursorrules` (single file) is supported-but-deprecated
|
|
15056
|
+
// and stays as a transitional fallback that the multi-target write
|
|
15057
|
+
// helper writes unconditionally alongside the .mdc canonical.
|
|
14296
15058
|
markers: [".cursor", ".cursorrules"],
|
|
14297
15059
|
mcpConfigPath: (dir) => (0, import_node_path.join)(dir, ".cursor", "mcp.json"),
|
|
14298
|
-
infoFilePath: (dir) => (0, import_node_path.join)(dir, ".
|
|
15060
|
+
infoFilePath: (dir) => (0, import_node_path.join)(dir, ".cursor", "rules", "glasstrace.mdc"),
|
|
14299
15061
|
cliBinary: null,
|
|
14300
15062
|
registrationCommand: "npx glasstrace mcp add --agent cursor"
|
|
14301
15063
|
},
|
|
14302
15064
|
{
|
|
14303
15065
|
name: "windsurf",
|
|
14304
|
-
|
|
15066
|
+
// Windsurf's current canonical workspace-rules format is
|
|
15067
|
+
// `.windsurf/rules/*.md`. AGENTS.md is a parallel cross-tool
|
|
15068
|
+
// mechanism Windsurf also reads BUT is NOT included as a Windsurf
|
|
15069
|
+
// detection marker — the SDK writes `AGENTS.md` broadly via the
|
|
15070
|
+
// multi-target dispatcher's companion writes, so treating
|
|
15071
|
+
// `AGENTS.md` as a Windsurf marker would re-classify every
|
|
15072
|
+
// SDK-managed project as Windsurf and cause `glasstrace uninit`
|
|
15073
|
+
// to mutate the global `~/.codeium/windsurf/mcp_config.json` for
|
|
15074
|
+
// non-Windsurf projects (Codex P1 + Copilot P1 review of Wave 18
|
|
15075
|
+
// PR #274). The single-file `.windsurfrules` is the deprecated
|
|
15076
|
+
// legacy form — recognized as a marker so legacy projects classify
|
|
15077
|
+
// correctly, but the SDK no longer writes to it.
|
|
15078
|
+
markers: [".windsurf", ".windsurfrules"],
|
|
14305
15079
|
mcpConfigPath: () => (0, import_node_path.join)((0, import_node_os.homedir)(), ".codeium", "windsurf", "mcp_config.json"),
|
|
14306
|
-
infoFilePath: (dir) => (0, import_node_path.join)(dir, ".
|
|
15080
|
+
infoFilePath: (dir) => (0, import_node_path.join)(dir, ".windsurf", "rules", "glasstrace.md"),
|
|
14307
15081
|
cliBinary: null,
|
|
14308
15082
|
registrationCommand: "npx glasstrace mcp add --agent windsurf"
|
|
14309
15083
|
}
|
|
@@ -14333,8 +15107,8 @@ async function findGitRoot(startDir) {
|
|
|
14333
15107
|
function isCliAvailable(binary) {
|
|
14334
15108
|
return new Promise((resolve2) => {
|
|
14335
15109
|
const command = process.platform === "win32" ? "where" : "which";
|
|
14336
|
-
(0, import_node_child_process.execFile)(command, [binary], (
|
|
14337
|
-
resolve2(
|
|
15110
|
+
(0, import_node_child_process.execFile)(command, [binary], (error51) => {
|
|
15111
|
+
resolve2(error51 === null);
|
|
14338
15112
|
});
|
|
14339
15113
|
});
|
|
14340
15114
|
}
|
|
@@ -14390,10 +15164,7 @@ async function detectAgents(projectRoot) {
|
|
|
14390
15164
|
continue;
|
|
14391
15165
|
}
|
|
14392
15166
|
seenAgents.add(rule.name);
|
|
14393
|
-
|
|
14394
|
-
if (infoFilePath !== null && !await pathExists(infoFilePath)) {
|
|
14395
|
-
infoFilePath = null;
|
|
14396
|
-
}
|
|
15167
|
+
const infoFilePath = rule.infoFilePath(foundDir);
|
|
14397
15168
|
const cliAvailable = rule.cliBinary ? await isCliAvailable(rule.cliBinary) : false;
|
|
14398
15169
|
detected.push({
|
|
14399
15170
|
name: rule.name,
|
|
@@ -14406,7 +15177,7 @@ async function detectAgents(projectRoot) {
|
|
|
14406
15177
|
detected.push({
|
|
14407
15178
|
name: "generic",
|
|
14408
15179
|
mcpConfigPath: (0, import_node_path.join)(resolvedRoot, ".glasstrace", "mcp.json"),
|
|
14409
|
-
infoFilePath:
|
|
15180
|
+
infoFilePath: (0, import_node_path.join)(resolvedRoot, "AGENTS.md"),
|
|
14410
15181
|
cliAvailable: false,
|
|
14411
15182
|
registrationCommand: null
|
|
14412
15183
|
});
|
|
@@ -14586,34 +15357,75 @@ function generateInfoSection(agent, endpoint, sdkVersion) {
|
|
|
14586
15357
|
}
|
|
14587
15358
|
const content = buildAgentInstructionBody();
|
|
14588
15359
|
switch (agent.name) {
|
|
14589
|
-
case "claude":
|
|
14590
|
-
|
|
14591
|
-
|
|
14592
|
-
|
|
14593
|
-
|
|
14594
|
-
}
|
|
14595
|
-
case "codex": {
|
|
15360
|
+
case "claude":
|
|
15361
|
+
case "codex":
|
|
15362
|
+
case "gemini":
|
|
15363
|
+
case "windsurf":
|
|
15364
|
+
case "generic": {
|
|
14596
15365
|
const m = htmlMarkers(sdkVersion);
|
|
14597
15366
|
return `${m.start}
|
|
14598
15367
|
${content}${m.end}
|
|
14599
15368
|
`;
|
|
14600
15369
|
}
|
|
14601
15370
|
case "cursor": {
|
|
14602
|
-
const m =
|
|
15371
|
+
const m = htmlMarkers(sdkVersion);
|
|
14603
15372
|
return `${m.start}
|
|
14604
15373
|
${content}${m.end}
|
|
14605
15374
|
`;
|
|
14606
15375
|
}
|
|
14607
|
-
case "gemini":
|
|
14608
|
-
case "windsurf":
|
|
14609
|
-
case "generic":
|
|
14610
|
-
return "";
|
|
14611
15376
|
default: {
|
|
14612
15377
|
const _exhaustive = agent.name;
|
|
14613
15378
|
throw new Error(`Unknown agent: ${_exhaustive}`);
|
|
14614
15379
|
}
|
|
14615
15380
|
}
|
|
14616
15381
|
}
|
|
15382
|
+
function generateInfoSectionForCursorrulesLegacy(endpoint, sdkVersion) {
|
|
15383
|
+
if (!endpoint || endpoint.trim() === "") {
|
|
15384
|
+
throw new Error("endpoint must not be empty");
|
|
15385
|
+
}
|
|
15386
|
+
if (!sdkVersion || sdkVersion.trim() === "") {
|
|
15387
|
+
throw new Error("sdkVersion must not be empty");
|
|
15388
|
+
}
|
|
15389
|
+
if (!SDK_VERSION_STAMP_PATTERN.test(sdkVersion)) {
|
|
15390
|
+
throw new Error(
|
|
15391
|
+
"sdkVersion must match [A-Za-z0-9.+\\-]+ (semver-shaped, no whitespace, no angle brackets)"
|
|
15392
|
+
);
|
|
15393
|
+
}
|
|
15394
|
+
const content = buildAgentInstructionBody();
|
|
15395
|
+
const m = hashMarkers(sdkVersion);
|
|
15396
|
+
return `${m.start}
|
|
15397
|
+
${content}${m.end}
|
|
15398
|
+
`;
|
|
15399
|
+
}
|
|
15400
|
+
function generateInfoSectionForCursorMdc(endpoint, sdkVersion) {
|
|
15401
|
+
if (!endpoint || endpoint.trim() === "") {
|
|
15402
|
+
throw new Error("endpoint must not be empty");
|
|
15403
|
+
}
|
|
15404
|
+
if (!sdkVersion || sdkVersion.trim() === "") {
|
|
15405
|
+
throw new Error("sdkVersion must not be empty");
|
|
15406
|
+
}
|
|
15407
|
+
if (!SDK_VERSION_STAMP_PATTERN.test(sdkVersion)) {
|
|
15408
|
+
throw new Error(
|
|
15409
|
+
"sdkVersion must match [A-Za-z0-9.+\\-]+ (semver-shaped, no whitespace, no angle brackets)"
|
|
15410
|
+
);
|
|
15411
|
+
}
|
|
15412
|
+
const content = buildAgentInstructionBody();
|
|
15413
|
+
const m = htmlMarkers(sdkVersion);
|
|
15414
|
+
return [
|
|
15415
|
+
"---",
|
|
15416
|
+
"description: Glasstrace MCP runtime debugging tools \u2014 runtime evidence the agent reads when source alone cannot resolve a bug",
|
|
15417
|
+
"alwaysApply: true",
|
|
15418
|
+
"---",
|
|
15419
|
+
"",
|
|
15420
|
+
`${m.start}
|
|
15421
|
+
${content}${m.end}
|
|
15422
|
+
`
|
|
15423
|
+
].join("\n");
|
|
15424
|
+
}
|
|
15425
|
+
|
|
15426
|
+
// src/agent-detection/inject-all-targets.ts
|
|
15427
|
+
var import_promises3 = require("node:fs/promises");
|
|
15428
|
+
var import_node_path3 = require("node:path");
|
|
14617
15429
|
|
|
14618
15430
|
// src/agent-detection/inject.ts
|
|
14619
15431
|
var import_promises2 = require("node:fs/promises");
|
|
@@ -14688,71 +15500,6 @@ function findMarkerBoundaries(lines) {
|
|
|
14688
15500
|
}
|
|
14689
15501
|
return null;
|
|
14690
15502
|
}
|
|
14691
|
-
async function injectInfoSection(agent, content, projectRoot) {
|
|
14692
|
-
if (agent.infoFilePath === null) {
|
|
14693
|
-
return;
|
|
14694
|
-
}
|
|
14695
|
-
if (content === "") {
|
|
14696
|
-
return;
|
|
14697
|
-
}
|
|
14698
|
-
const filePath = agent.infoFilePath;
|
|
14699
|
-
let existingContent = null;
|
|
14700
|
-
try {
|
|
14701
|
-
existingContent = await (0, import_promises2.readFile)(filePath, "utf-8");
|
|
14702
|
-
} catch (err) {
|
|
14703
|
-
const code = err.code;
|
|
14704
|
-
if (code !== "ENOENT") {
|
|
14705
|
-
if (isPermissionError(err)) {
|
|
14706
|
-
process.stderr.write(
|
|
14707
|
-
`Warning: cannot read info file ${filePath}: permission denied
|
|
14708
|
-
`
|
|
14709
|
-
);
|
|
14710
|
-
return;
|
|
14711
|
-
}
|
|
14712
|
-
throw err;
|
|
14713
|
-
}
|
|
14714
|
-
}
|
|
14715
|
-
if (existingContent === null) {
|
|
14716
|
-
try {
|
|
14717
|
-
await (0, import_promises2.mkdir)((0, import_node_path2.dirname)(filePath), { recursive: true });
|
|
14718
|
-
await (0, import_promises2.writeFile)(filePath, content, "utf-8");
|
|
14719
|
-
} catch (err) {
|
|
14720
|
-
if (isPermissionError(err)) {
|
|
14721
|
-
process.stderr.write(
|
|
14722
|
-
`Warning: cannot write info file ${filePath}: permission denied
|
|
14723
|
-
`
|
|
14724
|
-
);
|
|
14725
|
-
return;
|
|
14726
|
-
}
|
|
14727
|
-
throw err;
|
|
14728
|
-
}
|
|
14729
|
-
return;
|
|
14730
|
-
}
|
|
14731
|
-
const lines = existingContent.split("\n");
|
|
14732
|
-
const boundaries = findMarkerBoundaries(lines);
|
|
14733
|
-
let newContent;
|
|
14734
|
-
if (boundaries !== null) {
|
|
14735
|
-
const before = lines.slice(0, boundaries.startIdx);
|
|
14736
|
-
const after = lines.slice(boundaries.endIdx + 1);
|
|
14737
|
-
const contentWithoutTrailingNewline = content.endsWith("\n") ? content.slice(0, -1) : content;
|
|
14738
|
-
newContent = [...before, contentWithoutTrailingNewline, ...after].join("\n");
|
|
14739
|
-
} else {
|
|
14740
|
-
const separator = existingContent.endsWith("\n") ? "\n" : "\n\n";
|
|
14741
|
-
newContent = existingContent + separator + content;
|
|
14742
|
-
}
|
|
14743
|
-
try {
|
|
14744
|
-
await (0, import_promises2.writeFile)(filePath, newContent, "utf-8");
|
|
14745
|
-
} catch (err) {
|
|
14746
|
-
if (isPermissionError(err)) {
|
|
14747
|
-
process.stderr.write(
|
|
14748
|
-
`Warning: cannot write info file ${filePath}: permission denied
|
|
14749
|
-
`
|
|
14750
|
-
);
|
|
14751
|
-
return;
|
|
14752
|
-
}
|
|
14753
|
-
throw err;
|
|
14754
|
-
}
|
|
14755
|
-
}
|
|
14756
15503
|
async function updateGitignore(paths, projectRoot) {
|
|
14757
15504
|
const gitignorePath = (0, import_node_path2.join)(projectRoot, ".gitignore");
|
|
14758
15505
|
const relativePaths = paths.filter((p) => !(0, import_node_path2.isAbsolute)(p));
|
|
@@ -14800,6 +15547,228 @@ async function updateGitignore(paths, projectRoot) {
|
|
|
14800
15547
|
}
|
|
14801
15548
|
}
|
|
14802
15549
|
|
|
15550
|
+
// src/agent-detection/inject-all-targets.ts
|
|
15551
|
+
async function injectAllTargets(agents, endpoint, sdkVersion, projectRoot) {
|
|
15552
|
+
const writtenAgentsMd = /* @__PURE__ */ new Set();
|
|
15553
|
+
for (const agent of agents) {
|
|
15554
|
+
const targets = computeTargets(agent, projectRoot);
|
|
15555
|
+
for (const target of targets) {
|
|
15556
|
+
if (target.isAgentsMdCompanion) {
|
|
15557
|
+
if (writtenAgentsMd.has(target.path)) {
|
|
15558
|
+
continue;
|
|
15559
|
+
}
|
|
15560
|
+
writtenAgentsMd.add(target.path);
|
|
15561
|
+
}
|
|
15562
|
+
let createContent;
|
|
15563
|
+
let managedSectionOnly;
|
|
15564
|
+
if (target.kind === "cursor-mdc") {
|
|
15565
|
+
createContent = generateInfoSectionForCursorMdc(endpoint, sdkVersion);
|
|
15566
|
+
managedSectionOnly = generateInfoSection(agent, endpoint, sdkVersion);
|
|
15567
|
+
} else if (target.kind === "cursorrules-legacy") {
|
|
15568
|
+
createContent = generateInfoSectionForCursorrulesLegacy(
|
|
15569
|
+
endpoint,
|
|
15570
|
+
sdkVersion
|
|
15571
|
+
);
|
|
15572
|
+
managedSectionOnly = createContent;
|
|
15573
|
+
} else {
|
|
15574
|
+
createContent = generateInfoSection(agent, endpoint, sdkVersion);
|
|
15575
|
+
managedSectionOnly = createContent;
|
|
15576
|
+
}
|
|
15577
|
+
if (managedSectionOnly === "") continue;
|
|
15578
|
+
await writeManagedSectionToTarget(
|
|
15579
|
+
target.path,
|
|
15580
|
+
createContent,
|
|
15581
|
+
managedSectionOnly
|
|
15582
|
+
);
|
|
15583
|
+
}
|
|
15584
|
+
}
|
|
15585
|
+
}
|
|
15586
|
+
function foundDirFromAgent(agent) {
|
|
15587
|
+
if (agent.infoFilePath === null) return null;
|
|
15588
|
+
switch (agent.name) {
|
|
15589
|
+
case "claude":
|
|
15590
|
+
case "codex":
|
|
15591
|
+
case "gemini":
|
|
15592
|
+
case "generic":
|
|
15593
|
+
return (0, import_node_path3.dirname)(agent.infoFilePath);
|
|
15594
|
+
case "cursor":
|
|
15595
|
+
return (0, import_node_path3.dirname)((0, import_node_path3.dirname)((0, import_node_path3.dirname)(agent.infoFilePath)));
|
|
15596
|
+
case "windsurf":
|
|
15597
|
+
return (0, import_node_path3.dirname)((0, import_node_path3.dirname)((0, import_node_path3.dirname)(agent.infoFilePath)));
|
|
15598
|
+
}
|
|
15599
|
+
}
|
|
15600
|
+
function computeTargets(agent, projectRoot) {
|
|
15601
|
+
const targets = [];
|
|
15602
|
+
const foundDir = foundDirFromAgent(agent) ?? projectRoot;
|
|
15603
|
+
switch (agent.name) {
|
|
15604
|
+
case "claude": {
|
|
15605
|
+
if (agent.infoFilePath) {
|
|
15606
|
+
targets.push({
|
|
15607
|
+
path: agent.infoFilePath,
|
|
15608
|
+
kind: "primary",
|
|
15609
|
+
isAgentsMdCompanion: false
|
|
15610
|
+
});
|
|
15611
|
+
}
|
|
15612
|
+
targets.push({
|
|
15613
|
+
path: (0, import_node_path3.join)(foundDir, "AGENTS.md"),
|
|
15614
|
+
kind: "agents-md-companion",
|
|
15615
|
+
isAgentsMdCompanion: true
|
|
15616
|
+
});
|
|
15617
|
+
return targets;
|
|
15618
|
+
}
|
|
15619
|
+
case "codex": {
|
|
15620
|
+
if (agent.infoFilePath) {
|
|
15621
|
+
targets.push({
|
|
15622
|
+
path: agent.infoFilePath,
|
|
15623
|
+
kind: "primary",
|
|
15624
|
+
isAgentsMdCompanion: true
|
|
15625
|
+
});
|
|
15626
|
+
}
|
|
15627
|
+
return targets;
|
|
15628
|
+
}
|
|
15629
|
+
case "gemini": {
|
|
15630
|
+
if (agent.infoFilePath) {
|
|
15631
|
+
targets.push({
|
|
15632
|
+
path: agent.infoFilePath,
|
|
15633
|
+
kind: "primary",
|
|
15634
|
+
isAgentsMdCompanion: false
|
|
15635
|
+
});
|
|
15636
|
+
}
|
|
15637
|
+
targets.push({
|
|
15638
|
+
path: (0, import_node_path3.join)(foundDir, "AGENTS.md"),
|
|
15639
|
+
kind: "agents-md-companion",
|
|
15640
|
+
isAgentsMdCompanion: true
|
|
15641
|
+
});
|
|
15642
|
+
return targets;
|
|
15643
|
+
}
|
|
15644
|
+
case "cursor": {
|
|
15645
|
+
if (agent.infoFilePath) {
|
|
15646
|
+
targets.push({
|
|
15647
|
+
path: agent.infoFilePath,
|
|
15648
|
+
kind: "cursor-mdc",
|
|
15649
|
+
isAgentsMdCompanion: false
|
|
15650
|
+
});
|
|
15651
|
+
targets.push({
|
|
15652
|
+
path: (0, import_node_path3.join)(foundDir, ".cursorrules"),
|
|
15653
|
+
kind: "cursorrules-legacy",
|
|
15654
|
+
isAgentsMdCompanion: false
|
|
15655
|
+
});
|
|
15656
|
+
}
|
|
15657
|
+
targets.push({
|
|
15658
|
+
path: (0, import_node_path3.join)(foundDir, "AGENTS.md"),
|
|
15659
|
+
kind: "agents-md-companion",
|
|
15660
|
+
isAgentsMdCompanion: true
|
|
15661
|
+
});
|
|
15662
|
+
return targets;
|
|
15663
|
+
}
|
|
15664
|
+
case "windsurf": {
|
|
15665
|
+
if (agent.infoFilePath) {
|
|
15666
|
+
targets.push({
|
|
15667
|
+
path: agent.infoFilePath,
|
|
15668
|
+
kind: "primary",
|
|
15669
|
+
isAgentsMdCompanion: false
|
|
15670
|
+
});
|
|
15671
|
+
}
|
|
15672
|
+
targets.push({
|
|
15673
|
+
path: (0, import_node_path3.join)(foundDir, "AGENTS.md"),
|
|
15674
|
+
kind: "agents-md-companion",
|
|
15675
|
+
isAgentsMdCompanion: true
|
|
15676
|
+
});
|
|
15677
|
+
return targets;
|
|
15678
|
+
}
|
|
15679
|
+
case "generic": {
|
|
15680
|
+
if (agent.infoFilePath) {
|
|
15681
|
+
targets.push({
|
|
15682
|
+
path: agent.infoFilePath,
|
|
15683
|
+
kind: "primary",
|
|
15684
|
+
isAgentsMdCompanion: true
|
|
15685
|
+
});
|
|
15686
|
+
}
|
|
15687
|
+
return targets;
|
|
15688
|
+
}
|
|
15689
|
+
default: {
|
|
15690
|
+
const _exhaustive = agent.name;
|
|
15691
|
+
throw new Error(`Unknown agent: ${_exhaustive}`);
|
|
15692
|
+
}
|
|
15693
|
+
}
|
|
15694
|
+
}
|
|
15695
|
+
async function writeManagedSectionToTarget(filePath, createContent, managedSectionOnly) {
|
|
15696
|
+
let existingContent = null;
|
|
15697
|
+
try {
|
|
15698
|
+
existingContent = await (0, import_promises3.readFile)(filePath, "utf-8");
|
|
15699
|
+
} catch (err) {
|
|
15700
|
+
const code = err.code;
|
|
15701
|
+
if (code !== "ENOENT") {
|
|
15702
|
+
emitTargetWarning(filePath, "read", err);
|
|
15703
|
+
return;
|
|
15704
|
+
}
|
|
15705
|
+
}
|
|
15706
|
+
if (existingContent === null) {
|
|
15707
|
+
try {
|
|
15708
|
+
await (0, import_promises3.mkdir)((0, import_node_path3.dirname)(filePath), { recursive: true });
|
|
15709
|
+
await (0, import_promises3.writeFile)(filePath, createContent, "utf-8");
|
|
15710
|
+
} catch (err) {
|
|
15711
|
+
emitTargetWarning(filePath, "write", err);
|
|
15712
|
+
return;
|
|
15713
|
+
}
|
|
15714
|
+
return;
|
|
15715
|
+
}
|
|
15716
|
+
const lines = existingContent.split("\n");
|
|
15717
|
+
const boundaries = findMarkerBoundaries(lines);
|
|
15718
|
+
let newContent;
|
|
15719
|
+
if (boundaries !== null) {
|
|
15720
|
+
const before = lines.slice(0, boundaries.startIdx);
|
|
15721
|
+
const after = lines.slice(boundaries.endIdx + 1);
|
|
15722
|
+
const contentWithoutTrailingNewline = managedSectionOnly.endsWith("\n") ? managedSectionOnly.slice(0, -1) : managedSectionOnly;
|
|
15723
|
+
newContent = [...before, contentWithoutTrailingNewline, ...after].join(
|
|
15724
|
+
"\n"
|
|
15725
|
+
);
|
|
15726
|
+
} else {
|
|
15727
|
+
const separator = existingContent.endsWith("\n") ? "\n" : "\n\n";
|
|
15728
|
+
newContent = existingContent + separator + managedSectionOnly;
|
|
15729
|
+
}
|
|
15730
|
+
try {
|
|
15731
|
+
await (0, import_promises3.writeFile)(filePath, newContent, "utf-8");
|
|
15732
|
+
} catch (err) {
|
|
15733
|
+
emitTargetWarning(filePath, "write", err);
|
|
15734
|
+
}
|
|
15735
|
+
}
|
|
15736
|
+
function emitTargetWarning(filePath, op, err) {
|
|
15737
|
+
const code = err.code;
|
|
15738
|
+
let qualifier;
|
|
15739
|
+
switch (code) {
|
|
15740
|
+
case "EACCES":
|
|
15741
|
+
case "EPERM":
|
|
15742
|
+
qualifier = "permission denied";
|
|
15743
|
+
break;
|
|
15744
|
+
case "EROFS":
|
|
15745
|
+
qualifier = "filesystem read-only";
|
|
15746
|
+
break;
|
|
15747
|
+
case "ENOSPC":
|
|
15748
|
+
qualifier = "disk full";
|
|
15749
|
+
break;
|
|
15750
|
+
case "ENAMETOOLONG":
|
|
15751
|
+
qualifier = "path too long";
|
|
15752
|
+
break;
|
|
15753
|
+
case "ENOTDIR":
|
|
15754
|
+
qualifier = "not a directory";
|
|
15755
|
+
break;
|
|
15756
|
+
case "EISDIR":
|
|
15757
|
+
qualifier = "is a directory";
|
|
15758
|
+
break;
|
|
15759
|
+
default:
|
|
15760
|
+
qualifier = "I/O error";
|
|
15761
|
+
break;
|
|
15762
|
+
}
|
|
15763
|
+
try {
|
|
15764
|
+
process.stderr.write(
|
|
15765
|
+
`Warning: cannot ${op} info file ${filePath}: ${qualifier}
|
|
15766
|
+
`
|
|
15767
|
+
);
|
|
15768
|
+
} catch {
|
|
15769
|
+
}
|
|
15770
|
+
}
|
|
15771
|
+
|
|
14803
15772
|
// src/cli/constants.ts
|
|
14804
15773
|
function formatAgentName(name) {
|
|
14805
15774
|
const displayNames = {
|
|
@@ -14955,14 +15924,9 @@ async function mcpAdd(options) {
|
|
|
14955
15924
|
const bearer = resolved.effective.key;
|
|
14956
15925
|
for (const agent of targetAgents) {
|
|
14957
15926
|
const name = formatAgentName(agent.name);
|
|
14958
|
-
const sdkVersion = true ? "1.10.2" : "0.0.0-dev";
|
|
14959
15927
|
if (agent.name !== "generic") {
|
|
14960
15928
|
const cliSuccess = await registerViaCli(agent, bearer);
|
|
14961
15929
|
if (cliSuccess) {
|
|
14962
|
-
const infoContent = generateInfoSection(agent, MCP_ENDPOINT, sdkVersion);
|
|
14963
|
-
if (infoContent !== "") {
|
|
14964
|
-
await injectInfoSection(agent, infoContent, projectRoot);
|
|
14965
|
-
}
|
|
14966
15930
|
results.push({
|
|
14967
15931
|
agent: agent.name,
|
|
14968
15932
|
success: true,
|
|
@@ -14977,10 +15941,6 @@ async function mcpAdd(options) {
|
|
|
14977
15941
|
const configContent = generateMcpConfig(agent, MCP_ENDPOINT, bearer);
|
|
14978
15942
|
await writeMcpConfig(agent, configContent, projectRoot);
|
|
14979
15943
|
if (fs.existsSync(agent.mcpConfigPath)) {
|
|
14980
|
-
const infoContent = generateInfoSection(agent, MCP_ENDPOINT, sdkVersion);
|
|
14981
|
-
if (infoContent !== "") {
|
|
14982
|
-
await injectInfoSection(agent, infoContent, projectRoot);
|
|
14983
|
-
}
|
|
14984
15944
|
results.push({
|
|
14985
15945
|
agent: agent.name,
|
|
14986
15946
|
success: true,
|
|
@@ -15013,6 +15973,34 @@ async function mcpAdd(options) {
|
|
|
15013
15973
|
message: `${name}: No registration method available`
|
|
15014
15974
|
});
|
|
15015
15975
|
}
|
|
15976
|
+
const successfulAgentNames = new Set(
|
|
15977
|
+
results.filter((r) => r.success).map((r) => r.agent)
|
|
15978
|
+
);
|
|
15979
|
+
const agentsWithMcpReady = targetAgents.filter(
|
|
15980
|
+
(a) => successfulAgentNames.has(a.name)
|
|
15981
|
+
);
|
|
15982
|
+
const detectedNonGenericMcpAdd = targetAgents.filter(
|
|
15983
|
+
(a) => a.name !== "generic"
|
|
15984
|
+
);
|
|
15985
|
+
const nonGenericReadyMcpAdd = agentsWithMcpReady.filter(
|
|
15986
|
+
(a) => a.name !== "generic"
|
|
15987
|
+
);
|
|
15988
|
+
const dispatchSetMcpAdd = detectedNonGenericMcpAdd.length === 0 ? agentsWithMcpReady : nonGenericReadyMcpAdd;
|
|
15989
|
+
if (dispatchSetMcpAdd.length > 0) {
|
|
15990
|
+
const sdkVersion = true ? "1.12.0" : "0.0.0-dev";
|
|
15991
|
+
try {
|
|
15992
|
+
await injectAllTargets(
|
|
15993
|
+
dispatchSetMcpAdd,
|
|
15994
|
+
MCP_ENDPOINT,
|
|
15995
|
+
sdkVersion,
|
|
15996
|
+
projectRoot
|
|
15997
|
+
);
|
|
15998
|
+
} catch (injectErr) {
|
|
15999
|
+
messages.push(
|
|
16000
|
+
`Warning: Failed to write some agent-instruction files: ${injectErr instanceof Error ? injectErr.message : String(injectErr)}`
|
|
16001
|
+
);
|
|
16002
|
+
}
|
|
16003
|
+
}
|
|
15016
16004
|
await updateGitignore(
|
|
15017
16005
|
[".mcp.json", ".cursor/mcp.json", ".gemini/settings.json", ".codex/config.toml"],
|
|
15018
16006
|
projectRoot
|