@storm-software/git-tools 2.122.15 → 2.122.16
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/bin/{chunk-U33ERNJG.cjs → chunk-LVXCAKZC.cjs} +1904 -107
- package/bin/{chunk-CPA5SGWF.js → chunk-PXIBHNFL.js} +1904 -107
- package/bin/git.cjs +68 -68
- package/bin/git.js +1 -1
- package/bin/post-checkout.cjs +9 -9
- package/bin/post-checkout.js +1 -1
- package/bin/post-commit.cjs +9 -9
- package/bin/post-commit.js +1 -1
- package/bin/post-merge.cjs +9 -9
- package/bin/post-merge.js +1 -1
- package/bin/pre-commit.cjs +9 -9
- package/bin/pre-commit.js +1 -1
- package/bin/pre-install.cjs +9 -9
- package/bin/pre-install.js +1 -1
- package/bin/pre-push.cjs +13 -13
- package/bin/pre-push.js +1 -1
- package/bin/prepare.cjs +7 -7
- package/bin/prepare.js +1 -1
- package/bin/version-warning.cjs +5 -5
- package/bin/version-warning.js +1 -1
- package/package.json +5 -5
|
@@ -106,8 +106,8 @@ var CONSOLE_ICONS = {
|
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
// ../config-tools/src/logger/format-timestamp.ts
|
|
109
|
-
var formatTimestamp = (
|
|
110
|
-
return `${
|
|
109
|
+
var formatTimestamp = (date3 = /* @__PURE__ */ new Date()) => {
|
|
110
|
+
return `${date3.toLocaleDateString()} ${date3.toLocaleTimeString()}`;
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
// ../config-tools/src/logger/get-log-level.ts
|
|
@@ -290,17 +290,17 @@ var handleProcess = (config2) => {
|
|
|
290
290
|
`Using the following arguments to process the script: ${process.argv.join(", ")}`,
|
|
291
291
|
config2
|
|
292
292
|
);
|
|
293
|
-
process.on("unhandledRejection", (
|
|
293
|
+
process.on("unhandledRejection", (error2) => {
|
|
294
294
|
writeError(
|
|
295
|
-
`An Unhandled Rejection occurred while running the program: ${
|
|
295
|
+
`An Unhandled Rejection occurred while running the program: ${error2}`,
|
|
296
296
|
config2
|
|
297
297
|
);
|
|
298
298
|
exitWithError(config2);
|
|
299
299
|
});
|
|
300
|
-
process.on("uncaughtException", (
|
|
300
|
+
process.on("uncaughtException", (error2) => {
|
|
301
301
|
writeError(
|
|
302
|
-
`An Uncaught Exception occurred while running the program: ${
|
|
303
|
-
Stacktrace: ${
|
|
302
|
+
`An Uncaught Exception occurred while running the program: ${error2.message}
|
|
303
|
+
Stacktrace: ${error2.stack}`,
|
|
304
304
|
config2
|
|
305
305
|
);
|
|
306
306
|
exitWithError(config2);
|
|
@@ -319,7 +319,7 @@ Stacktrace: ${error.stack}`,
|
|
|
319
319
|
});
|
|
320
320
|
};
|
|
321
321
|
// @__NO_SIDE_EFFECTS__
|
|
322
|
-
function $constructor(name,
|
|
322
|
+
function $constructor(name, initializer3, params) {
|
|
323
323
|
function init(inst, def) {
|
|
324
324
|
var _a;
|
|
325
325
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -328,7 +328,7 @@ function $constructor(name, initializer2, params) {
|
|
|
328
328
|
});
|
|
329
329
|
(_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set());
|
|
330
330
|
inst._zod.traits.add(name);
|
|
331
|
-
|
|
331
|
+
initializer3(inst, def);
|
|
332
332
|
for (const k in _.prototype) {
|
|
333
333
|
if (!(k in inst))
|
|
334
334
|
Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) });
|
|
@@ -366,8 +366,16 @@ var $ZodAsyncError = class extends Error {
|
|
|
366
366
|
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
367
367
|
}
|
|
368
368
|
};
|
|
369
|
+
var $ZodEncodeError = class extends Error {
|
|
370
|
+
constructor(name) {
|
|
371
|
+
super(`Encountered unidirectional transform during encode: ${name}`);
|
|
372
|
+
this.name = "ZodEncodeError";
|
|
373
|
+
}
|
|
374
|
+
};
|
|
369
375
|
var globalConfig = {};
|
|
370
376
|
function config(newConfig) {
|
|
377
|
+
if (newConfig)
|
|
378
|
+
Object.assign(globalConfig, newConfig);
|
|
371
379
|
return globalConfig;
|
|
372
380
|
}
|
|
373
381
|
|
|
@@ -1022,6 +1030,55 @@ var initializer = (inst, def) => {
|
|
|
1022
1030
|
};
|
|
1023
1031
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
1024
1032
|
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
1033
|
+
function flattenError(error2, mapper = (issue2) => issue2.message) {
|
|
1034
|
+
const fieldErrors = {};
|
|
1035
|
+
const formErrors = [];
|
|
1036
|
+
for (const sub of error2.issues) {
|
|
1037
|
+
if (sub.path.length > 0) {
|
|
1038
|
+
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
1039
|
+
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
1040
|
+
} else {
|
|
1041
|
+
formErrors.push(mapper(sub));
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
return { formErrors, fieldErrors };
|
|
1045
|
+
}
|
|
1046
|
+
function formatError(error2, _mapper) {
|
|
1047
|
+
const mapper = _mapper || function(issue2) {
|
|
1048
|
+
return issue2.message;
|
|
1049
|
+
};
|
|
1050
|
+
const fieldErrors = { _errors: [] };
|
|
1051
|
+
const processError = (error3) => {
|
|
1052
|
+
for (const issue2 of error3.issues) {
|
|
1053
|
+
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
1054
|
+
issue2.errors.map((issues) => processError({ issues }));
|
|
1055
|
+
} else if (issue2.code === "invalid_key") {
|
|
1056
|
+
processError({ issues: issue2.issues });
|
|
1057
|
+
} else if (issue2.code === "invalid_element") {
|
|
1058
|
+
processError({ issues: issue2.issues });
|
|
1059
|
+
} else if (issue2.path.length === 0) {
|
|
1060
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
1061
|
+
} else {
|
|
1062
|
+
let curr = fieldErrors;
|
|
1063
|
+
let i = 0;
|
|
1064
|
+
while (i < issue2.path.length) {
|
|
1065
|
+
const el = issue2.path[i];
|
|
1066
|
+
const terminal = i === issue2.path.length - 1;
|
|
1067
|
+
if (!terminal) {
|
|
1068
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
1069
|
+
} else {
|
|
1070
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
1071
|
+
curr[el]._errors.push(mapper(issue2));
|
|
1072
|
+
}
|
|
1073
|
+
curr = curr[el];
|
|
1074
|
+
i++;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
};
|
|
1079
|
+
processError(error2);
|
|
1080
|
+
return fieldErrors;
|
|
1081
|
+
}
|
|
1025
1082
|
|
|
1026
1083
|
// ../../node_modules/.pnpm/zod@4.1.9/node_modules/zod/v4/core/parse.js
|
|
1027
1084
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
@@ -1037,7 +1094,6 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
1037
1094
|
}
|
|
1038
1095
|
return result.value;
|
|
1039
1096
|
};
|
|
1040
|
-
var parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
1041
1097
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
1042
1098
|
const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
|
|
1043
1099
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
@@ -1050,7 +1106,6 @@ var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
|
1050
1106
|
}
|
|
1051
1107
|
return result.value;
|
|
1052
1108
|
};
|
|
1053
|
-
var parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError);
|
|
1054
1109
|
var _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
1055
1110
|
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
1056
1111
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
@@ -1074,14 +1129,89 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1074
1129
|
} : { success: true, data: result.value };
|
|
1075
1130
|
};
|
|
1076
1131
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
1132
|
+
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
1133
|
+
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
1134
|
+
return _parse(_Err)(schema, value, ctx);
|
|
1135
|
+
};
|
|
1136
|
+
var _decode = (_Err) => (schema, value, _ctx) => {
|
|
1137
|
+
return _parse(_Err)(schema, value, _ctx);
|
|
1138
|
+
};
|
|
1139
|
+
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1140
|
+
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
1141
|
+
return _parseAsync(_Err)(schema, value, ctx);
|
|
1142
|
+
};
|
|
1143
|
+
var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1144
|
+
return _parseAsync(_Err)(schema, value, _ctx);
|
|
1145
|
+
};
|
|
1146
|
+
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
1147
|
+
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
1148
|
+
return _safeParse(_Err)(schema, value, ctx);
|
|
1149
|
+
};
|
|
1150
|
+
var _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
1151
|
+
return _safeParse(_Err)(schema, value, _ctx);
|
|
1152
|
+
};
|
|
1153
|
+
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1154
|
+
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
1155
|
+
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
1156
|
+
};
|
|
1157
|
+
var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
1158
|
+
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
1159
|
+
};
|
|
1077
1160
|
|
|
1078
1161
|
// ../../node_modules/.pnpm/zod@4.1.9/node_modules/zod/v4/core/regexes.js
|
|
1162
|
+
var cuid = /^[cC][^\s-]{8,}$/;
|
|
1163
|
+
var cuid2 = /^[0-9a-z]+$/;
|
|
1164
|
+
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
1165
|
+
var xid = /^[0-9a-vA-V]{20}$/;
|
|
1166
|
+
var ksuid = /^[A-Za-z0-9]{27}$/;
|
|
1167
|
+
var nanoid = /^[a-zA-Z0-9_-]{21}$/;
|
|
1168
|
+
var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
|
|
1169
|
+
var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
|
|
1170
|
+
var uuid = (version2) => {
|
|
1171
|
+
if (!version2)
|
|
1172
|
+
return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
|
|
1173
|
+
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
|
|
1174
|
+
};
|
|
1175
|
+
var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
|
|
1176
|
+
var _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
|
1177
|
+
function emoji() {
|
|
1178
|
+
return new RegExp(_emoji, "u");
|
|
1179
|
+
}
|
|
1180
|
+
var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
|
1181
|
+
var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
|
|
1182
|
+
var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
|
|
1183
|
+
var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
1184
|
+
var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
1185
|
+
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
1079
1186
|
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])?)*\.?$/;
|
|
1187
|
+
var e164 = /^\+(?:[0-9]){6,14}[0-9]$/;
|
|
1188
|
+
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])))`;
|
|
1189
|
+
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
1190
|
+
function timeSource(args) {
|
|
1191
|
+
const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
|
|
1192
|
+
const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
1193
|
+
return regex;
|
|
1194
|
+
}
|
|
1195
|
+
function time(args) {
|
|
1196
|
+
return new RegExp(`^${timeSource(args)}$`);
|
|
1197
|
+
}
|
|
1198
|
+
function datetime(args) {
|
|
1199
|
+
const time3 = timeSource({ precision: args.precision });
|
|
1200
|
+
const opts = ["Z"];
|
|
1201
|
+
if (args.local)
|
|
1202
|
+
opts.push("");
|
|
1203
|
+
if (args.offset)
|
|
1204
|
+
opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);
|
|
1205
|
+
const timeRegex = `${time3}(?:${opts.join("|")})`;
|
|
1206
|
+
return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
|
|
1207
|
+
}
|
|
1080
1208
|
var string = (params) => {
|
|
1081
1209
|
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
1082
1210
|
return new RegExp(`^${regex}$`);
|
|
1083
1211
|
};
|
|
1084
1212
|
var boolean = /^(?:true|false)$/i;
|
|
1213
|
+
var lowercase = /^[^A-Z]*$/;
|
|
1214
|
+
var uppercase = /^[^a-z]*$/;
|
|
1085
1215
|
|
|
1086
1216
|
// ../../node_modules/.pnpm/zod@4.1.9/node_modules/zod/v4/core/checks.js
|
|
1087
1217
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
@@ -1090,6 +1220,64 @@ var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
|
1090
1220
|
inst._zod.def = def;
|
|
1091
1221
|
(_a = inst._zod).onattach ?? (_a.onattach = []);
|
|
1092
1222
|
});
|
|
1223
|
+
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
1224
|
+
var _a;
|
|
1225
|
+
$ZodCheck.init(inst, def);
|
|
1226
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
1227
|
+
const val = payload.value;
|
|
1228
|
+
return !nullish(val) && val.length !== void 0;
|
|
1229
|
+
});
|
|
1230
|
+
inst._zod.onattach.push((inst2) => {
|
|
1231
|
+
const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
1232
|
+
if (def.maximum < curr)
|
|
1233
|
+
inst2._zod.bag.maximum = def.maximum;
|
|
1234
|
+
});
|
|
1235
|
+
inst._zod.check = (payload) => {
|
|
1236
|
+
const input = payload.value;
|
|
1237
|
+
const length = input.length;
|
|
1238
|
+
if (length <= def.maximum)
|
|
1239
|
+
return;
|
|
1240
|
+
const origin = getLengthableOrigin(input);
|
|
1241
|
+
payload.issues.push({
|
|
1242
|
+
origin,
|
|
1243
|
+
code: "too_big",
|
|
1244
|
+
maximum: def.maximum,
|
|
1245
|
+
inclusive: true,
|
|
1246
|
+
input,
|
|
1247
|
+
inst,
|
|
1248
|
+
continue: !def.abort
|
|
1249
|
+
});
|
|
1250
|
+
};
|
|
1251
|
+
});
|
|
1252
|
+
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
1253
|
+
var _a;
|
|
1254
|
+
$ZodCheck.init(inst, def);
|
|
1255
|
+
(_a = inst._zod.def).when ?? (_a.when = (payload) => {
|
|
1256
|
+
const val = payload.value;
|
|
1257
|
+
return !nullish(val) && val.length !== void 0;
|
|
1258
|
+
});
|
|
1259
|
+
inst._zod.onattach.push((inst2) => {
|
|
1260
|
+
const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
1261
|
+
if (def.minimum > curr)
|
|
1262
|
+
inst2._zod.bag.minimum = def.minimum;
|
|
1263
|
+
});
|
|
1264
|
+
inst._zod.check = (payload) => {
|
|
1265
|
+
const input = payload.value;
|
|
1266
|
+
const length = input.length;
|
|
1267
|
+
if (length >= def.minimum)
|
|
1268
|
+
return;
|
|
1269
|
+
const origin = getLengthableOrigin(input);
|
|
1270
|
+
payload.issues.push({
|
|
1271
|
+
origin,
|
|
1272
|
+
code: "too_small",
|
|
1273
|
+
minimum: def.minimum,
|
|
1274
|
+
inclusive: true,
|
|
1275
|
+
input,
|
|
1276
|
+
inst,
|
|
1277
|
+
continue: !def.abort
|
|
1278
|
+
});
|
|
1279
|
+
};
|
|
1280
|
+
});
|
|
1093
1281
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
1094
1282
|
var _a;
|
|
1095
1283
|
$ZodCheck.init(inst, def);
|
|
@@ -1168,6 +1356,84 @@ var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def)
|
|
|
1168
1356
|
});
|
|
1169
1357
|
};
|
|
1170
1358
|
});
|
|
1359
|
+
var $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => {
|
|
1360
|
+
def.pattern ?? (def.pattern = lowercase);
|
|
1361
|
+
$ZodCheckStringFormat.init(inst, def);
|
|
1362
|
+
});
|
|
1363
|
+
var $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => {
|
|
1364
|
+
def.pattern ?? (def.pattern = uppercase);
|
|
1365
|
+
$ZodCheckStringFormat.init(inst, def);
|
|
1366
|
+
});
|
|
1367
|
+
var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => {
|
|
1368
|
+
$ZodCheck.init(inst, def);
|
|
1369
|
+
const escapedRegex = escapeRegex(def.includes);
|
|
1370
|
+
const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);
|
|
1371
|
+
def.pattern = pattern;
|
|
1372
|
+
inst._zod.onattach.push((inst2) => {
|
|
1373
|
+
const bag = inst2._zod.bag;
|
|
1374
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
1375
|
+
bag.patterns.add(pattern);
|
|
1376
|
+
});
|
|
1377
|
+
inst._zod.check = (payload) => {
|
|
1378
|
+
if (payload.value.includes(def.includes, def.position))
|
|
1379
|
+
return;
|
|
1380
|
+
payload.issues.push({
|
|
1381
|
+
origin: "string",
|
|
1382
|
+
code: "invalid_format",
|
|
1383
|
+
format: "includes",
|
|
1384
|
+
includes: def.includes,
|
|
1385
|
+
input: payload.value,
|
|
1386
|
+
inst,
|
|
1387
|
+
continue: !def.abort
|
|
1388
|
+
});
|
|
1389
|
+
};
|
|
1390
|
+
});
|
|
1391
|
+
var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => {
|
|
1392
|
+
$ZodCheck.init(inst, def);
|
|
1393
|
+
const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
|
|
1394
|
+
def.pattern ?? (def.pattern = pattern);
|
|
1395
|
+
inst._zod.onattach.push((inst2) => {
|
|
1396
|
+
const bag = inst2._zod.bag;
|
|
1397
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
1398
|
+
bag.patterns.add(pattern);
|
|
1399
|
+
});
|
|
1400
|
+
inst._zod.check = (payload) => {
|
|
1401
|
+
if (payload.value.startsWith(def.prefix))
|
|
1402
|
+
return;
|
|
1403
|
+
payload.issues.push({
|
|
1404
|
+
origin: "string",
|
|
1405
|
+
code: "invalid_format",
|
|
1406
|
+
format: "starts_with",
|
|
1407
|
+
prefix: def.prefix,
|
|
1408
|
+
input: payload.value,
|
|
1409
|
+
inst,
|
|
1410
|
+
continue: !def.abort
|
|
1411
|
+
});
|
|
1412
|
+
};
|
|
1413
|
+
});
|
|
1414
|
+
var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => {
|
|
1415
|
+
$ZodCheck.init(inst, def);
|
|
1416
|
+
const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
|
|
1417
|
+
def.pattern ?? (def.pattern = pattern);
|
|
1418
|
+
inst._zod.onattach.push((inst2) => {
|
|
1419
|
+
const bag = inst2._zod.bag;
|
|
1420
|
+
bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
|
|
1421
|
+
bag.patterns.add(pattern);
|
|
1422
|
+
});
|
|
1423
|
+
inst._zod.check = (payload) => {
|
|
1424
|
+
if (payload.value.endsWith(def.suffix))
|
|
1425
|
+
return;
|
|
1426
|
+
payload.issues.push({
|
|
1427
|
+
origin: "string",
|
|
1428
|
+
code: "invalid_format",
|
|
1429
|
+
format: "ends_with",
|
|
1430
|
+
suffix: def.suffix,
|
|
1431
|
+
input: payload.value,
|
|
1432
|
+
inst,
|
|
1433
|
+
continue: !def.abort
|
|
1434
|
+
});
|
|
1435
|
+
};
|
|
1436
|
+
});
|
|
1171
1437
|
var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => {
|
|
1172
1438
|
$ZodCheck.init(inst, def);
|
|
1173
1439
|
inst._zod.check = (payload) => {
|
|
@@ -1175,6 +1441,42 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
1175
1441
|
};
|
|
1176
1442
|
});
|
|
1177
1443
|
|
|
1444
|
+
// ../../node_modules/.pnpm/zod@4.1.9/node_modules/zod/v4/core/doc.js
|
|
1445
|
+
var Doc = class {
|
|
1446
|
+
constructor(args = []) {
|
|
1447
|
+
this.content = [];
|
|
1448
|
+
this.indent = 0;
|
|
1449
|
+
if (this)
|
|
1450
|
+
this.args = args;
|
|
1451
|
+
}
|
|
1452
|
+
indented(fn) {
|
|
1453
|
+
this.indent += 1;
|
|
1454
|
+
fn(this);
|
|
1455
|
+
this.indent -= 1;
|
|
1456
|
+
}
|
|
1457
|
+
write(arg) {
|
|
1458
|
+
if (typeof arg === "function") {
|
|
1459
|
+
arg(this, { execution: "sync" });
|
|
1460
|
+
arg(this, { execution: "async" });
|
|
1461
|
+
return;
|
|
1462
|
+
}
|
|
1463
|
+
const content = arg;
|
|
1464
|
+
const lines = content.split("\n").filter((x) => x);
|
|
1465
|
+
const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
|
|
1466
|
+
const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
|
|
1467
|
+
for (const line of dedented) {
|
|
1468
|
+
this.content.push(line);
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
compile() {
|
|
1472
|
+
const F = Function;
|
|
1473
|
+
const args = this?.args;
|
|
1474
|
+
const content = this?.content ?? [``];
|
|
1475
|
+
const lines = [...content.map((x) => ` ${x}`)];
|
|
1476
|
+
return new F(...args, lines.join("\n"));
|
|
1477
|
+
}
|
|
1478
|
+
};
|
|
1479
|
+
|
|
1178
1480
|
// ../../node_modules/.pnpm/zod@4.1.9/node_modules/zod/v4/core/versions.js
|
|
1179
1481
|
var version = {
|
|
1180
1482
|
major: 4,
|
|
@@ -1316,6 +1618,34 @@ var $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, d
|
|
|
1316
1618
|
$ZodCheckStringFormat.init(inst, def);
|
|
1317
1619
|
$ZodString.init(inst, def);
|
|
1318
1620
|
});
|
|
1621
|
+
var $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => {
|
|
1622
|
+
def.pattern ?? (def.pattern = guid);
|
|
1623
|
+
$ZodStringFormat.init(inst, def);
|
|
1624
|
+
});
|
|
1625
|
+
var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
|
|
1626
|
+
if (def.version) {
|
|
1627
|
+
const versionMap = {
|
|
1628
|
+
v1: 1,
|
|
1629
|
+
v2: 2,
|
|
1630
|
+
v3: 3,
|
|
1631
|
+
v4: 4,
|
|
1632
|
+
v5: 5,
|
|
1633
|
+
v6: 6,
|
|
1634
|
+
v7: 7,
|
|
1635
|
+
v8: 8
|
|
1636
|
+
};
|
|
1637
|
+
const v = versionMap[def.version];
|
|
1638
|
+
if (v === void 0)
|
|
1639
|
+
throw new Error(`Invalid UUID version: "${def.version}"`);
|
|
1640
|
+
def.pattern ?? (def.pattern = uuid(v));
|
|
1641
|
+
} else
|
|
1642
|
+
def.pattern ?? (def.pattern = uuid());
|
|
1643
|
+
$ZodStringFormat.init(inst, def);
|
|
1644
|
+
});
|
|
1645
|
+
var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
|
|
1646
|
+
def.pattern ?? (def.pattern = email);
|
|
1647
|
+
$ZodStringFormat.init(inst, def);
|
|
1648
|
+
});
|
|
1319
1649
|
var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
1320
1650
|
$ZodStringFormat.init(inst, def);
|
|
1321
1651
|
inst._zod.check = (payload) => {
|
|
@@ -1367,6 +1697,204 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1367
1697
|
}
|
|
1368
1698
|
};
|
|
1369
1699
|
});
|
|
1700
|
+
var $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => {
|
|
1701
|
+
def.pattern ?? (def.pattern = emoji());
|
|
1702
|
+
$ZodStringFormat.init(inst, def);
|
|
1703
|
+
});
|
|
1704
|
+
var $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
|
|
1705
|
+
def.pattern ?? (def.pattern = nanoid);
|
|
1706
|
+
$ZodStringFormat.init(inst, def);
|
|
1707
|
+
});
|
|
1708
|
+
var $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => {
|
|
1709
|
+
def.pattern ?? (def.pattern = cuid);
|
|
1710
|
+
$ZodStringFormat.init(inst, def);
|
|
1711
|
+
});
|
|
1712
|
+
var $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => {
|
|
1713
|
+
def.pattern ?? (def.pattern = cuid2);
|
|
1714
|
+
$ZodStringFormat.init(inst, def);
|
|
1715
|
+
});
|
|
1716
|
+
var $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => {
|
|
1717
|
+
def.pattern ?? (def.pattern = ulid);
|
|
1718
|
+
$ZodStringFormat.init(inst, def);
|
|
1719
|
+
});
|
|
1720
|
+
var $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => {
|
|
1721
|
+
def.pattern ?? (def.pattern = xid);
|
|
1722
|
+
$ZodStringFormat.init(inst, def);
|
|
1723
|
+
});
|
|
1724
|
+
var $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
|
|
1725
|
+
def.pattern ?? (def.pattern = ksuid);
|
|
1726
|
+
$ZodStringFormat.init(inst, def);
|
|
1727
|
+
});
|
|
1728
|
+
var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
|
|
1729
|
+
def.pattern ?? (def.pattern = datetime(def));
|
|
1730
|
+
$ZodStringFormat.init(inst, def);
|
|
1731
|
+
});
|
|
1732
|
+
var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
|
|
1733
|
+
def.pattern ?? (def.pattern = date);
|
|
1734
|
+
$ZodStringFormat.init(inst, def);
|
|
1735
|
+
});
|
|
1736
|
+
var $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
|
|
1737
|
+
def.pattern ?? (def.pattern = time(def));
|
|
1738
|
+
$ZodStringFormat.init(inst, def);
|
|
1739
|
+
});
|
|
1740
|
+
var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
|
|
1741
|
+
def.pattern ?? (def.pattern = duration);
|
|
1742
|
+
$ZodStringFormat.init(inst, def);
|
|
1743
|
+
});
|
|
1744
|
+
var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
|
|
1745
|
+
def.pattern ?? (def.pattern = ipv4);
|
|
1746
|
+
$ZodStringFormat.init(inst, def);
|
|
1747
|
+
inst._zod.onattach.push((inst2) => {
|
|
1748
|
+
const bag = inst2._zod.bag;
|
|
1749
|
+
bag.format = `ipv4`;
|
|
1750
|
+
});
|
|
1751
|
+
});
|
|
1752
|
+
var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
1753
|
+
def.pattern ?? (def.pattern = ipv6);
|
|
1754
|
+
$ZodStringFormat.init(inst, def);
|
|
1755
|
+
inst._zod.onattach.push((inst2) => {
|
|
1756
|
+
const bag = inst2._zod.bag;
|
|
1757
|
+
bag.format = `ipv6`;
|
|
1758
|
+
});
|
|
1759
|
+
inst._zod.check = (payload) => {
|
|
1760
|
+
try {
|
|
1761
|
+
new URL(`http://[${payload.value}]`);
|
|
1762
|
+
} catch {
|
|
1763
|
+
payload.issues.push({
|
|
1764
|
+
code: "invalid_format",
|
|
1765
|
+
format: "ipv6",
|
|
1766
|
+
input: payload.value,
|
|
1767
|
+
inst,
|
|
1768
|
+
continue: !def.abort
|
|
1769
|
+
});
|
|
1770
|
+
}
|
|
1771
|
+
};
|
|
1772
|
+
});
|
|
1773
|
+
var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
|
|
1774
|
+
def.pattern ?? (def.pattern = cidrv4);
|
|
1775
|
+
$ZodStringFormat.init(inst, def);
|
|
1776
|
+
});
|
|
1777
|
+
var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
1778
|
+
def.pattern ?? (def.pattern = cidrv6);
|
|
1779
|
+
$ZodStringFormat.init(inst, def);
|
|
1780
|
+
inst._zod.check = (payload) => {
|
|
1781
|
+
const parts = payload.value.split("/");
|
|
1782
|
+
try {
|
|
1783
|
+
if (parts.length !== 2)
|
|
1784
|
+
throw new Error();
|
|
1785
|
+
const [address, prefix] = parts;
|
|
1786
|
+
if (!prefix)
|
|
1787
|
+
throw new Error();
|
|
1788
|
+
const prefixNum = Number(prefix);
|
|
1789
|
+
if (`${prefixNum}` !== prefix)
|
|
1790
|
+
throw new Error();
|
|
1791
|
+
if (prefixNum < 0 || prefixNum > 128)
|
|
1792
|
+
throw new Error();
|
|
1793
|
+
new URL(`http://[${address}]`);
|
|
1794
|
+
} catch {
|
|
1795
|
+
payload.issues.push({
|
|
1796
|
+
code: "invalid_format",
|
|
1797
|
+
format: "cidrv6",
|
|
1798
|
+
input: payload.value,
|
|
1799
|
+
inst,
|
|
1800
|
+
continue: !def.abort
|
|
1801
|
+
});
|
|
1802
|
+
}
|
|
1803
|
+
};
|
|
1804
|
+
});
|
|
1805
|
+
function isValidBase64(data) {
|
|
1806
|
+
if (data === "")
|
|
1807
|
+
return true;
|
|
1808
|
+
if (data.length % 4 !== 0)
|
|
1809
|
+
return false;
|
|
1810
|
+
try {
|
|
1811
|
+
atob(data);
|
|
1812
|
+
return true;
|
|
1813
|
+
} catch {
|
|
1814
|
+
return false;
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
|
|
1818
|
+
def.pattern ?? (def.pattern = base64);
|
|
1819
|
+
$ZodStringFormat.init(inst, def);
|
|
1820
|
+
inst._zod.onattach.push((inst2) => {
|
|
1821
|
+
inst2._zod.bag.contentEncoding = "base64";
|
|
1822
|
+
});
|
|
1823
|
+
inst._zod.check = (payload) => {
|
|
1824
|
+
if (isValidBase64(payload.value))
|
|
1825
|
+
return;
|
|
1826
|
+
payload.issues.push({
|
|
1827
|
+
code: "invalid_format",
|
|
1828
|
+
format: "base64",
|
|
1829
|
+
input: payload.value,
|
|
1830
|
+
inst,
|
|
1831
|
+
continue: !def.abort
|
|
1832
|
+
});
|
|
1833
|
+
};
|
|
1834
|
+
});
|
|
1835
|
+
function isValidBase64URL(data) {
|
|
1836
|
+
if (!base64url.test(data))
|
|
1837
|
+
return false;
|
|
1838
|
+
const base642 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
|
|
1839
|
+
const padded = base642.padEnd(Math.ceil(base642.length / 4) * 4, "=");
|
|
1840
|
+
return isValidBase64(padded);
|
|
1841
|
+
}
|
|
1842
|
+
var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
|
|
1843
|
+
def.pattern ?? (def.pattern = base64url);
|
|
1844
|
+
$ZodStringFormat.init(inst, def);
|
|
1845
|
+
inst._zod.onattach.push((inst2) => {
|
|
1846
|
+
inst2._zod.bag.contentEncoding = "base64url";
|
|
1847
|
+
});
|
|
1848
|
+
inst._zod.check = (payload) => {
|
|
1849
|
+
if (isValidBase64URL(payload.value))
|
|
1850
|
+
return;
|
|
1851
|
+
payload.issues.push({
|
|
1852
|
+
code: "invalid_format",
|
|
1853
|
+
format: "base64url",
|
|
1854
|
+
input: payload.value,
|
|
1855
|
+
inst,
|
|
1856
|
+
continue: !def.abort
|
|
1857
|
+
});
|
|
1858
|
+
};
|
|
1859
|
+
});
|
|
1860
|
+
var $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => {
|
|
1861
|
+
def.pattern ?? (def.pattern = e164);
|
|
1862
|
+
$ZodStringFormat.init(inst, def);
|
|
1863
|
+
});
|
|
1864
|
+
function isValidJWT(token, algorithm = null) {
|
|
1865
|
+
try {
|
|
1866
|
+
const tokensParts = token.split(".");
|
|
1867
|
+
if (tokensParts.length !== 3)
|
|
1868
|
+
return false;
|
|
1869
|
+
const [header] = tokensParts;
|
|
1870
|
+
if (!header)
|
|
1871
|
+
return false;
|
|
1872
|
+
const parsedHeader = JSON.parse(atob(header));
|
|
1873
|
+
if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
|
|
1874
|
+
return false;
|
|
1875
|
+
if (!parsedHeader.alg)
|
|
1876
|
+
return false;
|
|
1877
|
+
if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm))
|
|
1878
|
+
return false;
|
|
1879
|
+
return true;
|
|
1880
|
+
} catch {
|
|
1881
|
+
return false;
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
var $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
|
|
1885
|
+
$ZodStringFormat.init(inst, def);
|
|
1886
|
+
inst._zod.check = (payload) => {
|
|
1887
|
+
if (isValidJWT(payload.value, def.alg))
|
|
1888
|
+
return;
|
|
1889
|
+
payload.issues.push({
|
|
1890
|
+
code: "invalid_format",
|
|
1891
|
+
format: "jwt",
|
|
1892
|
+
input: payload.value,
|
|
1893
|
+
inst,
|
|
1894
|
+
continue: !def.abort
|
|
1895
|
+
});
|
|
1896
|
+
};
|
|
1897
|
+
});
|
|
1370
1898
|
var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
1371
1899
|
$ZodType.init(inst, def);
|
|
1372
1900
|
inst._zod.pattern = boolean;
|
|
@@ -1392,16 +1920,32 @@ var $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => {
|
|
|
1392
1920
|
$ZodType.init(inst, def);
|
|
1393
1921
|
inst._zod.parse = (payload) => payload;
|
|
1394
1922
|
});
|
|
1395
|
-
|
|
1396
|
-
if (result.issues.length) {
|
|
1397
|
-
final.issues.push(...prefixIssues(index, result.issues));
|
|
1398
|
-
}
|
|
1399
|
-
final.value[index] = result.value;
|
|
1400
|
-
}
|
|
1401
|
-
var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
1923
|
+
var $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
|
|
1402
1924
|
$ZodType.init(inst, def);
|
|
1403
|
-
inst._zod.parse = (payload
|
|
1404
|
-
|
|
1925
|
+
inst._zod.parse = (payload) => payload;
|
|
1926
|
+
});
|
|
1927
|
+
var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
|
|
1928
|
+
$ZodType.init(inst, def);
|
|
1929
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
1930
|
+
payload.issues.push({
|
|
1931
|
+
expected: "never",
|
|
1932
|
+
code: "invalid_type",
|
|
1933
|
+
input: payload.value,
|
|
1934
|
+
inst
|
|
1935
|
+
});
|
|
1936
|
+
return payload;
|
|
1937
|
+
};
|
|
1938
|
+
});
|
|
1939
|
+
function handleArrayResult(result, final, index) {
|
|
1940
|
+
if (result.issues.length) {
|
|
1941
|
+
final.issues.push(...prefixIssues(index, result.issues));
|
|
1942
|
+
}
|
|
1943
|
+
final.value[index] = result.value;
|
|
1944
|
+
}
|
|
1945
|
+
var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
1946
|
+
$ZodType.init(inst, def);
|
|
1947
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1948
|
+
const input = payload.value;
|
|
1405
1949
|
if (!Array.isArray(input)) {
|
|
1406
1950
|
payload.issues.push({
|
|
1407
1951
|
expected: "array",
|
|
@@ -1541,6 +2085,82 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
1541
2085
|
return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
|
|
1542
2086
|
};
|
|
1543
2087
|
});
|
|
2088
|
+
var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
|
|
2089
|
+
$ZodObject.init(inst, def);
|
|
2090
|
+
const superParse = inst._zod.parse;
|
|
2091
|
+
const _normalized = cached(() => normalizeDef(def));
|
|
2092
|
+
const generateFastpass = (shape) => {
|
|
2093
|
+
const doc = new Doc(["shape", "payload", "ctx"]);
|
|
2094
|
+
const normalized = _normalized.value;
|
|
2095
|
+
const parseStr = (key) => {
|
|
2096
|
+
const k = esc(key);
|
|
2097
|
+
return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
2098
|
+
};
|
|
2099
|
+
doc.write(`const input = payload.value;`);
|
|
2100
|
+
const ids = /* @__PURE__ */ Object.create(null);
|
|
2101
|
+
let counter = 0;
|
|
2102
|
+
for (const key of normalized.keys) {
|
|
2103
|
+
ids[key] = `key_${counter++}`;
|
|
2104
|
+
}
|
|
2105
|
+
doc.write(`const newResult = {};`);
|
|
2106
|
+
for (const key of normalized.keys) {
|
|
2107
|
+
const id = ids[key];
|
|
2108
|
+
const k = esc(key);
|
|
2109
|
+
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
2110
|
+
doc.write(`
|
|
2111
|
+
if (${id}.issues.length) {
|
|
2112
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
2113
|
+
...iss,
|
|
2114
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
2115
|
+
})));
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
|
|
2119
|
+
if (${id}.value === undefined) {
|
|
2120
|
+
if (${k} in input) {
|
|
2121
|
+
newResult[${k}] = undefined;
|
|
2122
|
+
}
|
|
2123
|
+
} else {
|
|
2124
|
+
newResult[${k}] = ${id}.value;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
`);
|
|
2128
|
+
}
|
|
2129
|
+
doc.write(`payload.value = newResult;`);
|
|
2130
|
+
doc.write(`return payload;`);
|
|
2131
|
+
const fn = doc.compile();
|
|
2132
|
+
return (payload, ctx) => fn(shape, payload, ctx);
|
|
2133
|
+
};
|
|
2134
|
+
let fastpass;
|
|
2135
|
+
const isObject2 = isObject;
|
|
2136
|
+
const jit = !globalConfig.jitless;
|
|
2137
|
+
const allowsEval2 = allowsEval;
|
|
2138
|
+
const fastEnabled = jit && allowsEval2.value;
|
|
2139
|
+
const catchall = def.catchall;
|
|
2140
|
+
let value;
|
|
2141
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2142
|
+
value ?? (value = _normalized.value);
|
|
2143
|
+
const input = payload.value;
|
|
2144
|
+
if (!isObject2(input)) {
|
|
2145
|
+
payload.issues.push({
|
|
2146
|
+
expected: "object",
|
|
2147
|
+
code: "invalid_type",
|
|
2148
|
+
input,
|
|
2149
|
+
inst
|
|
2150
|
+
});
|
|
2151
|
+
return payload;
|
|
2152
|
+
}
|
|
2153
|
+
if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
|
|
2154
|
+
if (!fastpass)
|
|
2155
|
+
fastpass = generateFastpass(def.shape);
|
|
2156
|
+
payload = fastpass(payload, ctx);
|
|
2157
|
+
if (!catchall)
|
|
2158
|
+
return payload;
|
|
2159
|
+
return handleCatchall([], input, payload, ctx, value, inst);
|
|
2160
|
+
}
|
|
2161
|
+
return superParse(payload, ctx);
|
|
2162
|
+
};
|
|
2163
|
+
});
|
|
1544
2164
|
function handleUnionResults(results, final, inst, ctx) {
|
|
1545
2165
|
for (const result of results) {
|
|
1546
2166
|
if (result.issues.length === 0) {
|
|
@@ -1607,6 +2227,81 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
1607
2227
|
});
|
|
1608
2228
|
};
|
|
1609
2229
|
});
|
|
2230
|
+
var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
|
|
2231
|
+
$ZodType.init(inst, def);
|
|
2232
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2233
|
+
const input = payload.value;
|
|
2234
|
+
const left = def.left._zod.run({ value: input, issues: [] }, ctx);
|
|
2235
|
+
const right = def.right._zod.run({ value: input, issues: [] }, ctx);
|
|
2236
|
+
const async = left instanceof Promise || right instanceof Promise;
|
|
2237
|
+
if (async) {
|
|
2238
|
+
return Promise.all([left, right]).then(([left2, right2]) => {
|
|
2239
|
+
return handleIntersectionResults(payload, left2, right2);
|
|
2240
|
+
});
|
|
2241
|
+
}
|
|
2242
|
+
return handleIntersectionResults(payload, left, right);
|
|
2243
|
+
};
|
|
2244
|
+
});
|
|
2245
|
+
function mergeValues(a, b) {
|
|
2246
|
+
if (a === b) {
|
|
2247
|
+
return { valid: true, data: a };
|
|
2248
|
+
}
|
|
2249
|
+
if (a instanceof Date && b instanceof Date && +a === +b) {
|
|
2250
|
+
return { valid: true, data: a };
|
|
2251
|
+
}
|
|
2252
|
+
if (isPlainObject(a) && isPlainObject(b)) {
|
|
2253
|
+
const bKeys = Object.keys(b);
|
|
2254
|
+
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
2255
|
+
const newObj = { ...a, ...b };
|
|
2256
|
+
for (const key of sharedKeys) {
|
|
2257
|
+
const sharedValue = mergeValues(a[key], b[key]);
|
|
2258
|
+
if (!sharedValue.valid) {
|
|
2259
|
+
return {
|
|
2260
|
+
valid: false,
|
|
2261
|
+
mergeErrorPath: [key, ...sharedValue.mergeErrorPath]
|
|
2262
|
+
};
|
|
2263
|
+
}
|
|
2264
|
+
newObj[key] = sharedValue.data;
|
|
2265
|
+
}
|
|
2266
|
+
return { valid: true, data: newObj };
|
|
2267
|
+
}
|
|
2268
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
2269
|
+
if (a.length !== b.length) {
|
|
2270
|
+
return { valid: false, mergeErrorPath: [] };
|
|
2271
|
+
}
|
|
2272
|
+
const newArray = [];
|
|
2273
|
+
for (let index = 0; index < a.length; index++) {
|
|
2274
|
+
const itemA = a[index];
|
|
2275
|
+
const itemB = b[index];
|
|
2276
|
+
const sharedValue = mergeValues(itemA, itemB);
|
|
2277
|
+
if (!sharedValue.valid) {
|
|
2278
|
+
return {
|
|
2279
|
+
valid: false,
|
|
2280
|
+
mergeErrorPath: [index, ...sharedValue.mergeErrorPath]
|
|
2281
|
+
};
|
|
2282
|
+
}
|
|
2283
|
+
newArray.push(sharedValue.data);
|
|
2284
|
+
}
|
|
2285
|
+
return { valid: true, data: newArray };
|
|
2286
|
+
}
|
|
2287
|
+
return { valid: false, mergeErrorPath: [] };
|
|
2288
|
+
}
|
|
2289
|
+
function handleIntersectionResults(result, left, right) {
|
|
2290
|
+
if (left.issues.length) {
|
|
2291
|
+
result.issues.push(...left.issues);
|
|
2292
|
+
}
|
|
2293
|
+
if (right.issues.length) {
|
|
2294
|
+
result.issues.push(...right.issues);
|
|
2295
|
+
}
|
|
2296
|
+
if (aborted(result))
|
|
2297
|
+
return result;
|
|
2298
|
+
const merged = mergeValues(left.value, right.value);
|
|
2299
|
+
if (!merged.valid) {
|
|
2300
|
+
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
|
|
2301
|
+
}
|
|
2302
|
+
result.value = merged.data;
|
|
2303
|
+
return result;
|
|
2304
|
+
}
|
|
1610
2305
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
1611
2306
|
$ZodType.init(inst, def);
|
|
1612
2307
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -1741,6 +2436,27 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
|
1741
2436
|
return payload;
|
|
1742
2437
|
};
|
|
1743
2438
|
});
|
|
2439
|
+
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
2440
|
+
$ZodType.init(inst, def);
|
|
2441
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2442
|
+
if (ctx.direction === "backward") {
|
|
2443
|
+
throw new $ZodEncodeError(inst.constructor.name);
|
|
2444
|
+
}
|
|
2445
|
+
const _out = def.transform(payload.value, payload);
|
|
2446
|
+
if (ctx.async) {
|
|
2447
|
+
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
2448
|
+
return output.then((output2) => {
|
|
2449
|
+
payload.value = output2;
|
|
2450
|
+
return payload;
|
|
2451
|
+
});
|
|
2452
|
+
}
|
|
2453
|
+
if (_out instanceof Promise) {
|
|
2454
|
+
throw new $ZodAsyncError();
|
|
2455
|
+
}
|
|
2456
|
+
payload.value = _out;
|
|
2457
|
+
return payload;
|
|
2458
|
+
};
|
|
2459
|
+
});
|
|
1744
2460
|
function handleOptionalResult(result, input) {
|
|
1745
2461
|
if (result.issues.length && input === void 0) {
|
|
1746
2462
|
return { issues: [], value: void 0 };
|
|
@@ -1813,6 +2529,285 @@ function handleDefaultResult(payload, def) {
|
|
|
1813
2529
|
}
|
|
1814
2530
|
return payload;
|
|
1815
2531
|
}
|
|
2532
|
+
var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
|
|
2533
|
+
$ZodType.init(inst, def);
|
|
2534
|
+
inst._zod.optin = "optional";
|
|
2535
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
2536
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2537
|
+
if (ctx.direction === "backward") {
|
|
2538
|
+
return def.innerType._zod.run(payload, ctx);
|
|
2539
|
+
}
|
|
2540
|
+
if (payload.value === void 0) {
|
|
2541
|
+
payload.value = def.defaultValue;
|
|
2542
|
+
}
|
|
2543
|
+
return def.innerType._zod.run(payload, ctx);
|
|
2544
|
+
};
|
|
2545
|
+
});
|
|
2546
|
+
var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
|
|
2547
|
+
$ZodType.init(inst, def);
|
|
2548
|
+
defineLazy(inst._zod, "values", () => {
|
|
2549
|
+
const v = def.innerType._zod.values;
|
|
2550
|
+
return v ? new Set([...v].filter((x) => x !== void 0)) : void 0;
|
|
2551
|
+
});
|
|
2552
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2553
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
2554
|
+
if (result instanceof Promise) {
|
|
2555
|
+
return result.then((result2) => handleNonOptionalResult(result2, inst));
|
|
2556
|
+
}
|
|
2557
|
+
return handleNonOptionalResult(result, inst);
|
|
2558
|
+
};
|
|
2559
|
+
});
|
|
2560
|
+
function handleNonOptionalResult(payload, inst) {
|
|
2561
|
+
if (!payload.issues.length && payload.value === void 0) {
|
|
2562
|
+
payload.issues.push({
|
|
2563
|
+
code: "invalid_type",
|
|
2564
|
+
expected: "nonoptional",
|
|
2565
|
+
input: payload.value,
|
|
2566
|
+
inst
|
|
2567
|
+
});
|
|
2568
|
+
}
|
|
2569
|
+
return payload;
|
|
2570
|
+
}
|
|
2571
|
+
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
2572
|
+
$ZodType.init(inst, def);
|
|
2573
|
+
defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
|
|
2574
|
+
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
2575
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
2576
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2577
|
+
if (ctx.direction === "backward") {
|
|
2578
|
+
return def.innerType._zod.run(payload, ctx);
|
|
2579
|
+
}
|
|
2580
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
2581
|
+
if (result instanceof Promise) {
|
|
2582
|
+
return result.then((result2) => {
|
|
2583
|
+
payload.value = result2.value;
|
|
2584
|
+
if (result2.issues.length) {
|
|
2585
|
+
payload.value = def.catchValue({
|
|
2586
|
+
...payload,
|
|
2587
|
+
error: {
|
|
2588
|
+
issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config()))
|
|
2589
|
+
},
|
|
2590
|
+
input: payload.value
|
|
2591
|
+
});
|
|
2592
|
+
payload.issues = [];
|
|
2593
|
+
}
|
|
2594
|
+
return payload;
|
|
2595
|
+
});
|
|
2596
|
+
}
|
|
2597
|
+
payload.value = result.value;
|
|
2598
|
+
if (result.issues.length) {
|
|
2599
|
+
payload.value = def.catchValue({
|
|
2600
|
+
...payload,
|
|
2601
|
+
error: {
|
|
2602
|
+
issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config()))
|
|
2603
|
+
},
|
|
2604
|
+
input: payload.value
|
|
2605
|
+
});
|
|
2606
|
+
payload.issues = [];
|
|
2607
|
+
}
|
|
2608
|
+
return payload;
|
|
2609
|
+
};
|
|
2610
|
+
});
|
|
2611
|
+
var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
|
|
2612
|
+
$ZodType.init(inst, def);
|
|
2613
|
+
defineLazy(inst._zod, "values", () => def.in._zod.values);
|
|
2614
|
+
defineLazy(inst._zod, "optin", () => def.in._zod.optin);
|
|
2615
|
+
defineLazy(inst._zod, "optout", () => def.out._zod.optout);
|
|
2616
|
+
defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
|
|
2617
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2618
|
+
if (ctx.direction === "backward") {
|
|
2619
|
+
const right = def.out._zod.run(payload, ctx);
|
|
2620
|
+
if (right instanceof Promise) {
|
|
2621
|
+
return right.then((right2) => handlePipeResult(right2, def.in, ctx));
|
|
2622
|
+
}
|
|
2623
|
+
return handlePipeResult(right, def.in, ctx);
|
|
2624
|
+
}
|
|
2625
|
+
const left = def.in._zod.run(payload, ctx);
|
|
2626
|
+
if (left instanceof Promise) {
|
|
2627
|
+
return left.then((left2) => handlePipeResult(left2, def.out, ctx));
|
|
2628
|
+
}
|
|
2629
|
+
return handlePipeResult(left, def.out, ctx);
|
|
2630
|
+
};
|
|
2631
|
+
});
|
|
2632
|
+
function handlePipeResult(left, next, ctx) {
|
|
2633
|
+
if (left.issues.length) {
|
|
2634
|
+
left.aborted = true;
|
|
2635
|
+
return left;
|
|
2636
|
+
}
|
|
2637
|
+
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
2638
|
+
}
|
|
2639
|
+
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
2640
|
+
$ZodType.init(inst, def);
|
|
2641
|
+
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
2642
|
+
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
2643
|
+
defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
|
|
2644
|
+
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
2645
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2646
|
+
if (ctx.direction === "backward") {
|
|
2647
|
+
return def.innerType._zod.run(payload, ctx);
|
|
2648
|
+
}
|
|
2649
|
+
const result = def.innerType._zod.run(payload, ctx);
|
|
2650
|
+
if (result instanceof Promise) {
|
|
2651
|
+
return result.then(handleReadonlyResult);
|
|
2652
|
+
}
|
|
2653
|
+
return handleReadonlyResult(result);
|
|
2654
|
+
};
|
|
2655
|
+
});
|
|
2656
|
+
function handleReadonlyResult(payload) {
|
|
2657
|
+
payload.value = Object.freeze(payload.value);
|
|
2658
|
+
return payload;
|
|
2659
|
+
}
|
|
2660
|
+
var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
2661
|
+
$ZodCheck.init(inst, def);
|
|
2662
|
+
$ZodType.init(inst, def);
|
|
2663
|
+
inst._zod.parse = (payload, _) => {
|
|
2664
|
+
return payload;
|
|
2665
|
+
};
|
|
2666
|
+
inst._zod.check = (payload) => {
|
|
2667
|
+
const input = payload.value;
|
|
2668
|
+
const r = def.fn(input);
|
|
2669
|
+
if (r instanceof Promise) {
|
|
2670
|
+
return r.then((r2) => handleRefineResult(r2, payload, input, inst));
|
|
2671
|
+
}
|
|
2672
|
+
handleRefineResult(r, payload, input, inst);
|
|
2673
|
+
return;
|
|
2674
|
+
};
|
|
2675
|
+
});
|
|
2676
|
+
function handleRefineResult(result, payload, input, inst) {
|
|
2677
|
+
if (!result) {
|
|
2678
|
+
const _iss = {
|
|
2679
|
+
code: "custom",
|
|
2680
|
+
input,
|
|
2681
|
+
inst,
|
|
2682
|
+
// incorporates params.error into issue reporting
|
|
2683
|
+
path: [...inst._zod.def.path ?? []],
|
|
2684
|
+
// incorporates params.error into issue reporting
|
|
2685
|
+
continue: !inst._zod.def.abort
|
|
2686
|
+
// params: inst._zod.def.params,
|
|
2687
|
+
};
|
|
2688
|
+
if (inst._zod.def.params)
|
|
2689
|
+
_iss.params = inst._zod.def.params;
|
|
2690
|
+
payload.issues.push(issue(_iss));
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2694
|
+
// ../../node_modules/.pnpm/zod@4.1.9/node_modules/zod/v4/locales/en.js
|
|
2695
|
+
var parsedType = (data) => {
|
|
2696
|
+
const t = typeof data;
|
|
2697
|
+
switch (t) {
|
|
2698
|
+
case "number": {
|
|
2699
|
+
return Number.isNaN(data) ? "NaN" : "number";
|
|
2700
|
+
}
|
|
2701
|
+
case "object": {
|
|
2702
|
+
if (Array.isArray(data)) {
|
|
2703
|
+
return "array";
|
|
2704
|
+
}
|
|
2705
|
+
if (data === null) {
|
|
2706
|
+
return "null";
|
|
2707
|
+
}
|
|
2708
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
2709
|
+
return data.constructor.name;
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
return t;
|
|
2714
|
+
};
|
|
2715
|
+
var error = () => {
|
|
2716
|
+
const Sizable = {
|
|
2717
|
+
string: { unit: "characters", verb: "to have" },
|
|
2718
|
+
file: { unit: "bytes", verb: "to have" },
|
|
2719
|
+
array: { unit: "items", verb: "to have" },
|
|
2720
|
+
set: { unit: "items", verb: "to have" }
|
|
2721
|
+
};
|
|
2722
|
+
function getSizing(origin) {
|
|
2723
|
+
return Sizable[origin] ?? null;
|
|
2724
|
+
}
|
|
2725
|
+
const Nouns = {
|
|
2726
|
+
regex: "input",
|
|
2727
|
+
email: "email address",
|
|
2728
|
+
url: "URL",
|
|
2729
|
+
emoji: "emoji",
|
|
2730
|
+
uuid: "UUID",
|
|
2731
|
+
uuidv4: "UUIDv4",
|
|
2732
|
+
uuidv6: "UUIDv6",
|
|
2733
|
+
nanoid: "nanoid",
|
|
2734
|
+
guid: "GUID",
|
|
2735
|
+
cuid: "cuid",
|
|
2736
|
+
cuid2: "cuid2",
|
|
2737
|
+
ulid: "ULID",
|
|
2738
|
+
xid: "XID",
|
|
2739
|
+
ksuid: "KSUID",
|
|
2740
|
+
datetime: "ISO datetime",
|
|
2741
|
+
date: "ISO date",
|
|
2742
|
+
time: "ISO time",
|
|
2743
|
+
duration: "ISO duration",
|
|
2744
|
+
ipv4: "IPv4 address",
|
|
2745
|
+
ipv6: "IPv6 address",
|
|
2746
|
+
cidrv4: "IPv4 range",
|
|
2747
|
+
cidrv6: "IPv6 range",
|
|
2748
|
+
base64: "base64-encoded string",
|
|
2749
|
+
base64url: "base64url-encoded string",
|
|
2750
|
+
json_string: "JSON string",
|
|
2751
|
+
e164: "E.164 number",
|
|
2752
|
+
jwt: "JWT",
|
|
2753
|
+
template_literal: "input"
|
|
2754
|
+
};
|
|
2755
|
+
return (issue2) => {
|
|
2756
|
+
switch (issue2.code) {
|
|
2757
|
+
case "invalid_type":
|
|
2758
|
+
return `Invalid input: expected ${issue2.expected}, received ${parsedType(issue2.input)}`;
|
|
2759
|
+
case "invalid_value":
|
|
2760
|
+
if (issue2.values.length === 1)
|
|
2761
|
+
return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`;
|
|
2762
|
+
return `Invalid option: expected one of ${joinValues(issue2.values, "|")}`;
|
|
2763
|
+
case "too_big": {
|
|
2764
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
2765
|
+
const sizing = getSizing(issue2.origin);
|
|
2766
|
+
if (sizing)
|
|
2767
|
+
return `Too big: expected ${issue2.origin ?? "value"} to have ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`;
|
|
2768
|
+
return `Too big: expected ${issue2.origin ?? "value"} to be ${adj}${issue2.maximum.toString()}`;
|
|
2769
|
+
}
|
|
2770
|
+
case "too_small": {
|
|
2771
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
2772
|
+
const sizing = getSizing(issue2.origin);
|
|
2773
|
+
if (sizing) {
|
|
2774
|
+
return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
2775
|
+
}
|
|
2776
|
+
return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`;
|
|
2777
|
+
}
|
|
2778
|
+
case "invalid_format": {
|
|
2779
|
+
const _issue = issue2;
|
|
2780
|
+
if (_issue.format === "starts_with") {
|
|
2781
|
+
return `Invalid string: must start with "${_issue.prefix}"`;
|
|
2782
|
+
}
|
|
2783
|
+
if (_issue.format === "ends_with")
|
|
2784
|
+
return `Invalid string: must end with "${_issue.suffix}"`;
|
|
2785
|
+
if (_issue.format === "includes")
|
|
2786
|
+
return `Invalid string: must include "${_issue.includes}"`;
|
|
2787
|
+
if (_issue.format === "regex")
|
|
2788
|
+
return `Invalid string: must match pattern ${_issue.pattern}`;
|
|
2789
|
+
return `Invalid ${Nouns[_issue.format] ?? issue2.format}`;
|
|
2790
|
+
}
|
|
2791
|
+
case "not_multiple_of":
|
|
2792
|
+
return `Invalid number: must be a multiple of ${issue2.divisor}`;
|
|
2793
|
+
case "unrecognized_keys":
|
|
2794
|
+
return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
|
|
2795
|
+
case "invalid_key":
|
|
2796
|
+
return `Invalid key in ${issue2.origin}`;
|
|
2797
|
+
case "invalid_union":
|
|
2798
|
+
return "Invalid input";
|
|
2799
|
+
case "invalid_element":
|
|
2800
|
+
return `Invalid value in ${issue2.origin}`;
|
|
2801
|
+
default:
|
|
2802
|
+
return `Invalid input`;
|
|
2803
|
+
}
|
|
2804
|
+
};
|
|
2805
|
+
};
|
|
2806
|
+
function en_default() {
|
|
2807
|
+
return {
|
|
2808
|
+
localeError: error()
|
|
2809
|
+
};
|
|
2810
|
+
}
|
|
1816
2811
|
var $ZodRegistry = class {
|
|
1817
2812
|
constructor() {
|
|
1818
2813
|
this._map = /* @__PURE__ */ new WeakMap();
|
|
@@ -1859,6 +2854,7 @@ var $ZodRegistry = class {
|
|
|
1859
2854
|
function registry() {
|
|
1860
2855
|
return new $ZodRegistry();
|
|
1861
2856
|
}
|
|
2857
|
+
var globalRegistry = /* @__PURE__ */ registry();
|
|
1862
2858
|
|
|
1863
2859
|
// ../../node_modules/.pnpm/zod@4.1.9/node_modules/zod/v4/core/api.js
|
|
1864
2860
|
function _string(Class2, params) {
|
|
@@ -1867,65 +2863,488 @@ function _string(Class2, params) {
|
|
|
1867
2863
|
...normalizeParams(params)
|
|
1868
2864
|
});
|
|
1869
2865
|
}
|
|
1870
|
-
function
|
|
2866
|
+
function _email(Class2, params) {
|
|
1871
2867
|
return new Class2({
|
|
1872
2868
|
type: "string",
|
|
1873
|
-
format: "
|
|
2869
|
+
format: "email",
|
|
1874
2870
|
check: "string_format",
|
|
1875
2871
|
abort: false,
|
|
1876
2872
|
...normalizeParams(params)
|
|
1877
2873
|
});
|
|
1878
2874
|
}
|
|
1879
|
-
function
|
|
2875
|
+
function _guid(Class2, params) {
|
|
1880
2876
|
return new Class2({
|
|
1881
|
-
type: "
|
|
2877
|
+
type: "string",
|
|
2878
|
+
format: "guid",
|
|
2879
|
+
check: "string_format",
|
|
2880
|
+
abort: false,
|
|
1882
2881
|
...normalizeParams(params)
|
|
1883
2882
|
});
|
|
1884
2883
|
}
|
|
1885
|
-
function
|
|
2884
|
+
function _uuid(Class2, params) {
|
|
1886
2885
|
return new Class2({
|
|
1887
|
-
type: "
|
|
2886
|
+
type: "string",
|
|
2887
|
+
format: "uuid",
|
|
2888
|
+
check: "string_format",
|
|
2889
|
+
abort: false,
|
|
2890
|
+
...normalizeParams(params)
|
|
1888
2891
|
});
|
|
1889
2892
|
}
|
|
1890
|
-
function
|
|
1891
|
-
return new
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
2893
|
+
function _uuidv4(Class2, params) {
|
|
2894
|
+
return new Class2({
|
|
2895
|
+
type: "string",
|
|
2896
|
+
format: "uuid",
|
|
2897
|
+
check: "string_format",
|
|
2898
|
+
abort: false,
|
|
2899
|
+
version: "v4",
|
|
2900
|
+
...normalizeParams(params)
|
|
1895
2901
|
});
|
|
1896
2902
|
}
|
|
1897
|
-
function
|
|
1898
|
-
return new
|
|
2903
|
+
function _uuidv6(Class2, params) {
|
|
2904
|
+
return new Class2({
|
|
2905
|
+
type: "string",
|
|
2906
|
+
format: "uuid",
|
|
1899
2907
|
check: "string_format",
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
2908
|
+
abort: false,
|
|
2909
|
+
version: "v6",
|
|
2910
|
+
...normalizeParams(params)
|
|
1903
2911
|
});
|
|
1904
2912
|
}
|
|
1905
|
-
function
|
|
1906
|
-
return new
|
|
1907
|
-
|
|
1908
|
-
|
|
2913
|
+
function _uuidv7(Class2, params) {
|
|
2914
|
+
return new Class2({
|
|
2915
|
+
type: "string",
|
|
2916
|
+
format: "uuid",
|
|
2917
|
+
check: "string_format",
|
|
2918
|
+
abort: false,
|
|
2919
|
+
version: "v7",
|
|
2920
|
+
...normalizeParams(params)
|
|
1909
2921
|
});
|
|
1910
2922
|
}
|
|
1911
|
-
function
|
|
1912
|
-
return
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
2923
|
+
function _url(Class2, params) {
|
|
2924
|
+
return new Class2({
|
|
2925
|
+
type: "string",
|
|
2926
|
+
format: "url",
|
|
2927
|
+
check: "string_format",
|
|
2928
|
+
abort: false,
|
|
2929
|
+
...normalizeParams(params)
|
|
2930
|
+
});
|
|
1916
2931
|
}
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
2932
|
+
function _emoji2(Class2, params) {
|
|
2933
|
+
return new Class2({
|
|
2934
|
+
type: "string",
|
|
2935
|
+
format: "emoji",
|
|
2936
|
+
check: "string_format",
|
|
2937
|
+
abort: false,
|
|
2938
|
+
...normalizeParams(params)
|
|
2939
|
+
});
|
|
2940
|
+
}
|
|
2941
|
+
function _nanoid(Class2, params) {
|
|
2942
|
+
return new Class2({
|
|
2943
|
+
type: "string",
|
|
2944
|
+
format: "nanoid",
|
|
2945
|
+
check: "string_format",
|
|
2946
|
+
abort: false,
|
|
2947
|
+
...normalizeParams(params)
|
|
2948
|
+
});
|
|
2949
|
+
}
|
|
2950
|
+
function _cuid(Class2, params) {
|
|
2951
|
+
return new Class2({
|
|
2952
|
+
type: "string",
|
|
2953
|
+
format: "cuid",
|
|
2954
|
+
check: "string_format",
|
|
2955
|
+
abort: false,
|
|
2956
|
+
...normalizeParams(params)
|
|
2957
|
+
});
|
|
2958
|
+
}
|
|
2959
|
+
function _cuid2(Class2, params) {
|
|
2960
|
+
return new Class2({
|
|
2961
|
+
type: "string",
|
|
2962
|
+
format: "cuid2",
|
|
2963
|
+
check: "string_format",
|
|
2964
|
+
abort: false,
|
|
2965
|
+
...normalizeParams(params)
|
|
2966
|
+
});
|
|
2967
|
+
}
|
|
2968
|
+
function _ulid(Class2, params) {
|
|
2969
|
+
return new Class2({
|
|
2970
|
+
type: "string",
|
|
2971
|
+
format: "ulid",
|
|
2972
|
+
check: "string_format",
|
|
2973
|
+
abort: false,
|
|
2974
|
+
...normalizeParams(params)
|
|
2975
|
+
});
|
|
2976
|
+
}
|
|
2977
|
+
function _xid(Class2, params) {
|
|
2978
|
+
return new Class2({
|
|
2979
|
+
type: "string",
|
|
2980
|
+
format: "xid",
|
|
2981
|
+
check: "string_format",
|
|
2982
|
+
abort: false,
|
|
2983
|
+
...normalizeParams(params)
|
|
2984
|
+
});
|
|
2985
|
+
}
|
|
2986
|
+
function _ksuid(Class2, params) {
|
|
2987
|
+
return new Class2({
|
|
2988
|
+
type: "string",
|
|
2989
|
+
format: "ksuid",
|
|
2990
|
+
check: "string_format",
|
|
2991
|
+
abort: false,
|
|
2992
|
+
...normalizeParams(params)
|
|
2993
|
+
});
|
|
2994
|
+
}
|
|
2995
|
+
function _ipv4(Class2, params) {
|
|
2996
|
+
return new Class2({
|
|
2997
|
+
type: "string",
|
|
2998
|
+
format: "ipv4",
|
|
2999
|
+
check: "string_format",
|
|
3000
|
+
abort: false,
|
|
3001
|
+
...normalizeParams(params)
|
|
3002
|
+
});
|
|
3003
|
+
}
|
|
3004
|
+
function _ipv6(Class2, params) {
|
|
3005
|
+
return new Class2({
|
|
3006
|
+
type: "string",
|
|
3007
|
+
format: "ipv6",
|
|
3008
|
+
check: "string_format",
|
|
3009
|
+
abort: false,
|
|
3010
|
+
...normalizeParams(params)
|
|
3011
|
+
});
|
|
3012
|
+
}
|
|
3013
|
+
function _cidrv4(Class2, params) {
|
|
3014
|
+
return new Class2({
|
|
3015
|
+
type: "string",
|
|
3016
|
+
format: "cidrv4",
|
|
3017
|
+
check: "string_format",
|
|
3018
|
+
abort: false,
|
|
3019
|
+
...normalizeParams(params)
|
|
3020
|
+
});
|
|
3021
|
+
}
|
|
3022
|
+
function _cidrv6(Class2, params) {
|
|
3023
|
+
return new Class2({
|
|
3024
|
+
type: "string",
|
|
3025
|
+
format: "cidrv6",
|
|
3026
|
+
check: "string_format",
|
|
3027
|
+
abort: false,
|
|
3028
|
+
...normalizeParams(params)
|
|
3029
|
+
});
|
|
3030
|
+
}
|
|
3031
|
+
function _base64(Class2, params) {
|
|
3032
|
+
return new Class2({
|
|
3033
|
+
type: "string",
|
|
3034
|
+
format: "base64",
|
|
3035
|
+
check: "string_format",
|
|
3036
|
+
abort: false,
|
|
3037
|
+
...normalizeParams(params)
|
|
3038
|
+
});
|
|
3039
|
+
}
|
|
3040
|
+
function _base64url(Class2, params) {
|
|
3041
|
+
return new Class2({
|
|
3042
|
+
type: "string",
|
|
3043
|
+
format: "base64url",
|
|
3044
|
+
check: "string_format",
|
|
3045
|
+
abort: false,
|
|
3046
|
+
...normalizeParams(params)
|
|
3047
|
+
});
|
|
3048
|
+
}
|
|
3049
|
+
function _e164(Class2, params) {
|
|
3050
|
+
return new Class2({
|
|
3051
|
+
type: "string",
|
|
3052
|
+
format: "e164",
|
|
3053
|
+
check: "string_format",
|
|
3054
|
+
abort: false,
|
|
3055
|
+
...normalizeParams(params)
|
|
3056
|
+
});
|
|
3057
|
+
}
|
|
3058
|
+
function _jwt(Class2, params) {
|
|
3059
|
+
return new Class2({
|
|
3060
|
+
type: "string",
|
|
3061
|
+
format: "jwt",
|
|
3062
|
+
check: "string_format",
|
|
3063
|
+
abort: false,
|
|
3064
|
+
...normalizeParams(params)
|
|
3065
|
+
});
|
|
3066
|
+
}
|
|
3067
|
+
function _isoDateTime(Class2, params) {
|
|
3068
|
+
return new Class2({
|
|
3069
|
+
type: "string",
|
|
3070
|
+
format: "datetime",
|
|
3071
|
+
check: "string_format",
|
|
3072
|
+
offset: false,
|
|
3073
|
+
local: false,
|
|
3074
|
+
precision: null,
|
|
3075
|
+
...normalizeParams(params)
|
|
3076
|
+
});
|
|
3077
|
+
}
|
|
3078
|
+
function _isoDate(Class2, params) {
|
|
3079
|
+
return new Class2({
|
|
3080
|
+
type: "string",
|
|
3081
|
+
format: "date",
|
|
3082
|
+
check: "string_format",
|
|
3083
|
+
...normalizeParams(params)
|
|
3084
|
+
});
|
|
3085
|
+
}
|
|
3086
|
+
function _isoTime(Class2, params) {
|
|
3087
|
+
return new Class2({
|
|
3088
|
+
type: "string",
|
|
3089
|
+
format: "time",
|
|
3090
|
+
check: "string_format",
|
|
3091
|
+
precision: null,
|
|
3092
|
+
...normalizeParams(params)
|
|
3093
|
+
});
|
|
3094
|
+
}
|
|
3095
|
+
function _isoDuration(Class2, params) {
|
|
3096
|
+
return new Class2({
|
|
3097
|
+
type: "string",
|
|
3098
|
+
format: "duration",
|
|
3099
|
+
check: "string_format",
|
|
3100
|
+
...normalizeParams(params)
|
|
3101
|
+
});
|
|
3102
|
+
}
|
|
3103
|
+
function _boolean(Class2, params) {
|
|
3104
|
+
return new Class2({
|
|
3105
|
+
type: "boolean",
|
|
3106
|
+
...normalizeParams(params)
|
|
3107
|
+
});
|
|
3108
|
+
}
|
|
3109
|
+
function _any(Class2) {
|
|
3110
|
+
return new Class2({
|
|
3111
|
+
type: "any"
|
|
3112
|
+
});
|
|
3113
|
+
}
|
|
3114
|
+
function _unknown(Class2) {
|
|
3115
|
+
return new Class2({
|
|
3116
|
+
type: "unknown"
|
|
3117
|
+
});
|
|
3118
|
+
}
|
|
3119
|
+
function _never(Class2, params) {
|
|
3120
|
+
return new Class2({
|
|
3121
|
+
type: "never",
|
|
3122
|
+
...normalizeParams(params)
|
|
3123
|
+
});
|
|
3124
|
+
}
|
|
3125
|
+
function _maxLength(maximum, params) {
|
|
3126
|
+
const ch = new $ZodCheckMaxLength({
|
|
3127
|
+
check: "max_length",
|
|
3128
|
+
...normalizeParams(params),
|
|
3129
|
+
maximum
|
|
3130
|
+
});
|
|
3131
|
+
return ch;
|
|
3132
|
+
}
|
|
3133
|
+
function _minLength(minimum, params) {
|
|
3134
|
+
return new $ZodCheckMinLength({
|
|
3135
|
+
check: "min_length",
|
|
3136
|
+
...normalizeParams(params),
|
|
3137
|
+
minimum
|
|
3138
|
+
});
|
|
3139
|
+
}
|
|
3140
|
+
function _length(length, params) {
|
|
3141
|
+
return new $ZodCheckLengthEquals({
|
|
3142
|
+
check: "length_equals",
|
|
3143
|
+
...normalizeParams(params),
|
|
3144
|
+
length
|
|
3145
|
+
});
|
|
3146
|
+
}
|
|
3147
|
+
function _regex(pattern, params) {
|
|
3148
|
+
return new $ZodCheckRegex({
|
|
3149
|
+
check: "string_format",
|
|
3150
|
+
format: "regex",
|
|
3151
|
+
...normalizeParams(params),
|
|
3152
|
+
pattern
|
|
3153
|
+
});
|
|
3154
|
+
}
|
|
3155
|
+
function _lowercase(params) {
|
|
3156
|
+
return new $ZodCheckLowerCase({
|
|
3157
|
+
check: "string_format",
|
|
3158
|
+
format: "lowercase",
|
|
3159
|
+
...normalizeParams(params)
|
|
3160
|
+
});
|
|
3161
|
+
}
|
|
3162
|
+
function _uppercase(params) {
|
|
3163
|
+
return new $ZodCheckUpperCase({
|
|
3164
|
+
check: "string_format",
|
|
3165
|
+
format: "uppercase",
|
|
3166
|
+
...normalizeParams(params)
|
|
3167
|
+
});
|
|
3168
|
+
}
|
|
3169
|
+
function _includes(includes, params) {
|
|
3170
|
+
return new $ZodCheckIncludes({
|
|
3171
|
+
check: "string_format",
|
|
3172
|
+
format: "includes",
|
|
3173
|
+
...normalizeParams(params),
|
|
3174
|
+
includes
|
|
3175
|
+
});
|
|
3176
|
+
}
|
|
3177
|
+
function _startsWith(prefix, params) {
|
|
3178
|
+
return new $ZodCheckStartsWith({
|
|
3179
|
+
check: "string_format",
|
|
3180
|
+
format: "starts_with",
|
|
3181
|
+
...normalizeParams(params),
|
|
3182
|
+
prefix
|
|
3183
|
+
});
|
|
3184
|
+
}
|
|
3185
|
+
function _endsWith(suffix, params) {
|
|
3186
|
+
return new $ZodCheckEndsWith({
|
|
3187
|
+
check: "string_format",
|
|
3188
|
+
format: "ends_with",
|
|
3189
|
+
...normalizeParams(params),
|
|
3190
|
+
suffix
|
|
3191
|
+
});
|
|
3192
|
+
}
|
|
3193
|
+
function _overwrite(tx) {
|
|
3194
|
+
return new $ZodCheckOverwrite({
|
|
3195
|
+
check: "overwrite",
|
|
3196
|
+
tx
|
|
3197
|
+
});
|
|
3198
|
+
}
|
|
3199
|
+
function _normalize(form) {
|
|
3200
|
+
return _overwrite((input) => input.normalize(form));
|
|
3201
|
+
}
|
|
3202
|
+
function _trim() {
|
|
3203
|
+
return _overwrite((input) => input.trim());
|
|
3204
|
+
}
|
|
3205
|
+
function _toLowerCase() {
|
|
3206
|
+
return _overwrite((input) => input.toLowerCase());
|
|
3207
|
+
}
|
|
3208
|
+
function _toUpperCase() {
|
|
3209
|
+
return _overwrite((input) => input.toUpperCase());
|
|
3210
|
+
}
|
|
3211
|
+
function _array(Class2, element, params) {
|
|
3212
|
+
return new Class2({
|
|
3213
|
+
type: "array",
|
|
3214
|
+
element,
|
|
3215
|
+
// get element() {
|
|
3216
|
+
// return element;
|
|
3217
|
+
// },
|
|
3218
|
+
...normalizeParams(params)
|
|
3219
|
+
});
|
|
3220
|
+
}
|
|
3221
|
+
function _refine(Class2, fn, _params) {
|
|
3222
|
+
const schema = new Class2({
|
|
3223
|
+
type: "custom",
|
|
3224
|
+
check: "custom",
|
|
3225
|
+
fn,
|
|
3226
|
+
...normalizeParams(_params)
|
|
3227
|
+
});
|
|
3228
|
+
return schema;
|
|
3229
|
+
}
|
|
3230
|
+
function _superRefine(fn) {
|
|
3231
|
+
const ch = _check((payload) => {
|
|
3232
|
+
payload.addIssue = (issue2) => {
|
|
3233
|
+
if (typeof issue2 === "string") {
|
|
3234
|
+
payload.issues.push(issue(issue2, payload.value, ch._zod.def));
|
|
3235
|
+
} else {
|
|
3236
|
+
const _issue = issue2;
|
|
3237
|
+
if (_issue.fatal)
|
|
3238
|
+
_issue.continue = false;
|
|
3239
|
+
_issue.code ?? (_issue.code = "custom");
|
|
3240
|
+
_issue.input ?? (_issue.input = payload.value);
|
|
3241
|
+
_issue.inst ?? (_issue.inst = ch);
|
|
3242
|
+
_issue.continue ?? (_issue.continue = !ch._zod.def.abort);
|
|
3243
|
+
payload.issues.push(issue(_issue));
|
|
3244
|
+
}
|
|
3245
|
+
};
|
|
3246
|
+
return fn(payload.value, payload);
|
|
3247
|
+
});
|
|
3248
|
+
return ch;
|
|
3249
|
+
}
|
|
3250
|
+
function _check(fn, params) {
|
|
3251
|
+
const ch = new $ZodCheck({
|
|
3252
|
+
check: "custom",
|
|
3253
|
+
...normalizeParams(params)
|
|
3254
|
+
});
|
|
3255
|
+
ch._zod.check = fn;
|
|
3256
|
+
return ch;
|
|
3257
|
+
}
|
|
3258
|
+
|
|
3259
|
+
// ../../node_modules/.pnpm/zod@4.1.9/node_modules/zod/v4/classic/iso.js
|
|
3260
|
+
var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
|
|
3261
|
+
$ZodISODateTime.init(inst, def);
|
|
3262
|
+
ZodStringFormat.init(inst, def);
|
|
3263
|
+
});
|
|
3264
|
+
function datetime2(params) {
|
|
3265
|
+
return _isoDateTime(ZodISODateTime, params);
|
|
3266
|
+
}
|
|
3267
|
+
var ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => {
|
|
3268
|
+
$ZodISODate.init(inst, def);
|
|
3269
|
+
ZodStringFormat.init(inst, def);
|
|
3270
|
+
});
|
|
3271
|
+
function date2(params) {
|
|
3272
|
+
return _isoDate(ZodISODate, params);
|
|
3273
|
+
}
|
|
3274
|
+
var ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => {
|
|
3275
|
+
$ZodISOTime.init(inst, def);
|
|
3276
|
+
ZodStringFormat.init(inst, def);
|
|
3277
|
+
});
|
|
3278
|
+
function time2(params) {
|
|
3279
|
+
return _isoTime(ZodISOTime, params);
|
|
3280
|
+
}
|
|
3281
|
+
var ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => {
|
|
3282
|
+
$ZodISODuration.init(inst, def);
|
|
3283
|
+
ZodStringFormat.init(inst, def);
|
|
3284
|
+
});
|
|
3285
|
+
function duration2(params) {
|
|
3286
|
+
return _isoDuration(ZodISODuration, params);
|
|
3287
|
+
}
|
|
3288
|
+
|
|
3289
|
+
// ../../node_modules/.pnpm/zod@4.1.9/node_modules/zod/v4/classic/errors.js
|
|
3290
|
+
var initializer2 = (inst, issues) => {
|
|
3291
|
+
$ZodError.init(inst, issues);
|
|
3292
|
+
inst.name = "ZodError";
|
|
3293
|
+
Object.defineProperties(inst, {
|
|
3294
|
+
format: {
|
|
3295
|
+
value: (mapper) => formatError(inst, mapper)
|
|
3296
|
+
// enumerable: false,
|
|
3297
|
+
},
|
|
3298
|
+
flatten: {
|
|
3299
|
+
value: (mapper) => flattenError(inst, mapper)
|
|
3300
|
+
// enumerable: false,
|
|
3301
|
+
},
|
|
3302
|
+
addIssue: {
|
|
3303
|
+
value: (issue2) => {
|
|
3304
|
+
inst.issues.push(issue2);
|
|
3305
|
+
inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
|
|
3306
|
+
}
|
|
3307
|
+
// enumerable: false,
|
|
3308
|
+
},
|
|
3309
|
+
addIssues: {
|
|
3310
|
+
value: (issues2) => {
|
|
3311
|
+
inst.issues.push(...issues2);
|
|
3312
|
+
inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
|
|
3313
|
+
}
|
|
3314
|
+
// enumerable: false,
|
|
3315
|
+
},
|
|
3316
|
+
isEmpty: {
|
|
3317
|
+
get() {
|
|
3318
|
+
return inst.issues.length === 0;
|
|
3319
|
+
}
|
|
3320
|
+
// enumerable: false,
|
|
3321
|
+
}
|
|
3322
|
+
});
|
|
3323
|
+
};
|
|
3324
|
+
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
3325
|
+
Parent: Error
|
|
3326
|
+
});
|
|
3327
|
+
|
|
3328
|
+
// ../../node_modules/.pnpm/zod@4.1.9/node_modules/zod/v4/classic/parse.js
|
|
3329
|
+
var parse2 = /* @__PURE__ */ _parse(ZodRealError);
|
|
3330
|
+
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
3331
|
+
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
3332
|
+
var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError);
|
|
3333
|
+
var encode = /* @__PURE__ */ _encode(ZodRealError);
|
|
3334
|
+
var decode = /* @__PURE__ */ _decode(ZodRealError);
|
|
3335
|
+
var encodeAsync = /* @__PURE__ */ _encodeAsync(ZodRealError);
|
|
3336
|
+
var decodeAsync = /* @__PURE__ */ _decodeAsync(ZodRealError);
|
|
3337
|
+
var safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
|
|
3338
|
+
var safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
3339
|
+
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
3340
|
+
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
3341
|
+
|
|
3342
|
+
// ../../node_modules/.pnpm/zod@4.1.9/node_modules/zod/v4/classic/schemas.js
|
|
3343
|
+
var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
3344
|
+
$ZodType.init(inst, def);
|
|
3345
|
+
inst.def = def;
|
|
1924
3346
|
inst.type = def.type;
|
|
1925
|
-
|
|
1926
|
-
inst.safeParse = (data, params) => safeParse(inst, data, params);
|
|
1927
|
-
inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
1928
|
-
inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
|
|
3347
|
+
Object.defineProperty(inst, "_def", { value: def });
|
|
1929
3348
|
inst.check = (...checks) => {
|
|
1930
3349
|
return inst.clone(
|
|
1931
3350
|
{
|
|
@@ -1938,145 +3357,446 @@ var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
|
|
|
1938
3357
|
// { parent: true }
|
|
1939
3358
|
);
|
|
1940
3359
|
};
|
|
1941
|
-
inst.clone = (
|
|
3360
|
+
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
1942
3361
|
inst.brand = () => inst;
|
|
1943
3362
|
inst.register = ((reg, meta) => {
|
|
1944
3363
|
reg.add(inst, meta);
|
|
1945
3364
|
return inst;
|
|
1946
3365
|
});
|
|
3366
|
+
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
3367
|
+
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
3368
|
+
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
3369
|
+
inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params);
|
|
3370
|
+
inst.spa = inst.safeParseAsync;
|
|
3371
|
+
inst.encode = (data, params) => encode(inst, data, params);
|
|
3372
|
+
inst.decode = (data, params) => decode(inst, data, params);
|
|
3373
|
+
inst.encodeAsync = async (data, params) => encodeAsync(inst, data, params);
|
|
3374
|
+
inst.decodeAsync = async (data, params) => decodeAsync(inst, data, params);
|
|
3375
|
+
inst.safeEncode = (data, params) => safeEncode(inst, data, params);
|
|
3376
|
+
inst.safeDecode = (data, params) => safeDecode(inst, data, params);
|
|
3377
|
+
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync(inst, data, params);
|
|
3378
|
+
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params);
|
|
3379
|
+
inst.refine = (check, params) => inst.check(refine(check, params));
|
|
3380
|
+
inst.superRefine = (refinement) => inst.check(superRefine(refinement));
|
|
3381
|
+
inst.overwrite = (fn) => inst.check(_overwrite(fn));
|
|
3382
|
+
inst.optional = () => optional(inst);
|
|
3383
|
+
inst.nullable = () => nullable(inst);
|
|
3384
|
+
inst.nullish = () => optional(nullable(inst));
|
|
3385
|
+
inst.nonoptional = (params) => nonoptional(inst, params);
|
|
3386
|
+
inst.array = () => array(inst);
|
|
3387
|
+
inst.or = (arg) => union([inst, arg]);
|
|
3388
|
+
inst.and = (arg) => intersection(inst, arg);
|
|
3389
|
+
inst.transform = (tx) => pipe(inst, transform(tx));
|
|
3390
|
+
inst.default = (def2) => _default(inst, def2);
|
|
3391
|
+
inst.prefault = (def2) => prefault(inst, def2);
|
|
3392
|
+
inst.catch = (params) => _catch(inst, params);
|
|
3393
|
+
inst.pipe = (target) => pipe(inst, target);
|
|
3394
|
+
inst.readonly = () => readonly(inst);
|
|
3395
|
+
inst.describe = (description) => {
|
|
3396
|
+
const cl = inst.clone();
|
|
3397
|
+
globalRegistry.add(cl, { description });
|
|
3398
|
+
return cl;
|
|
3399
|
+
};
|
|
3400
|
+
Object.defineProperty(inst, "description", {
|
|
3401
|
+
get() {
|
|
3402
|
+
return globalRegistry.get(inst)?.description;
|
|
3403
|
+
},
|
|
3404
|
+
configurable: true
|
|
3405
|
+
});
|
|
3406
|
+
inst.meta = (...args) => {
|
|
3407
|
+
if (args.length === 0) {
|
|
3408
|
+
return globalRegistry.get(inst);
|
|
3409
|
+
}
|
|
3410
|
+
const cl = inst.clone();
|
|
3411
|
+
globalRegistry.add(cl, args[0]);
|
|
3412
|
+
return cl;
|
|
3413
|
+
};
|
|
3414
|
+
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
3415
|
+
inst.isNullable = () => inst.safeParse(null).success;
|
|
3416
|
+
return inst;
|
|
1947
3417
|
});
|
|
1948
|
-
var
|
|
3418
|
+
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
3419
|
+
$ZodString.init(inst, def);
|
|
3420
|
+
ZodType.init(inst, def);
|
|
3421
|
+
const bag = inst._zod.bag;
|
|
3422
|
+
inst.format = bag.format ?? null;
|
|
3423
|
+
inst.minLength = bag.minimum ?? null;
|
|
3424
|
+
inst.maxLength = bag.maximum ?? null;
|
|
3425
|
+
inst.regex = (...args) => inst.check(_regex(...args));
|
|
3426
|
+
inst.includes = (...args) => inst.check(_includes(...args));
|
|
3427
|
+
inst.startsWith = (...args) => inst.check(_startsWith(...args));
|
|
3428
|
+
inst.endsWith = (...args) => inst.check(_endsWith(...args));
|
|
3429
|
+
inst.min = (...args) => inst.check(_minLength(...args));
|
|
3430
|
+
inst.max = (...args) => inst.check(_maxLength(...args));
|
|
3431
|
+
inst.length = (...args) => inst.check(_length(...args));
|
|
3432
|
+
inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
|
|
3433
|
+
inst.lowercase = (params) => inst.check(_lowercase(params));
|
|
3434
|
+
inst.uppercase = (params) => inst.check(_uppercase(params));
|
|
3435
|
+
inst.trim = () => inst.check(_trim());
|
|
3436
|
+
inst.normalize = (...args) => inst.check(_normalize(...args));
|
|
3437
|
+
inst.toLowerCase = () => inst.check(_toLowerCase());
|
|
3438
|
+
inst.toUpperCase = () => inst.check(_toUpperCase());
|
|
3439
|
+
});
|
|
3440
|
+
var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
1949
3441
|
$ZodString.init(inst, def);
|
|
1950
|
-
|
|
3442
|
+
_ZodString.init(inst, def);
|
|
3443
|
+
inst.email = (params) => inst.check(_email(ZodEmail, params));
|
|
3444
|
+
inst.url = (params) => inst.check(_url(ZodURL, params));
|
|
3445
|
+
inst.jwt = (params) => inst.check(_jwt(ZodJWT, params));
|
|
3446
|
+
inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params));
|
|
3447
|
+
inst.guid = (params) => inst.check(_guid(ZodGUID, params));
|
|
3448
|
+
inst.uuid = (params) => inst.check(_uuid(ZodUUID, params));
|
|
3449
|
+
inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params));
|
|
3450
|
+
inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params));
|
|
3451
|
+
inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params));
|
|
3452
|
+
inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params));
|
|
3453
|
+
inst.guid = (params) => inst.check(_guid(ZodGUID, params));
|
|
3454
|
+
inst.cuid = (params) => inst.check(_cuid(ZodCUID, params));
|
|
3455
|
+
inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params));
|
|
3456
|
+
inst.ulid = (params) => inst.check(_ulid(ZodULID, params));
|
|
3457
|
+
inst.base64 = (params) => inst.check(_base64(ZodBase64, params));
|
|
3458
|
+
inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params));
|
|
3459
|
+
inst.xid = (params) => inst.check(_xid(ZodXID, params));
|
|
3460
|
+
inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params));
|
|
3461
|
+
inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params));
|
|
3462
|
+
inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params));
|
|
3463
|
+
inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params));
|
|
3464
|
+
inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params));
|
|
3465
|
+
inst.e164 = (params) => inst.check(_e164(ZodE164, params));
|
|
3466
|
+
inst.datetime = (params) => inst.check(datetime2(params));
|
|
3467
|
+
inst.date = (params) => inst.check(date2(params));
|
|
3468
|
+
inst.time = (params) => inst.check(time2(params));
|
|
3469
|
+
inst.duration = (params) => inst.check(duration2(params));
|
|
1951
3470
|
});
|
|
1952
3471
|
function string2(params) {
|
|
1953
|
-
return _string(
|
|
3472
|
+
return _string(ZodString, params);
|
|
1954
3473
|
}
|
|
1955
|
-
var
|
|
3474
|
+
var ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
|
|
1956
3475
|
$ZodStringFormat.init(inst, def);
|
|
1957
|
-
|
|
3476
|
+
_ZodString.init(inst, def);
|
|
1958
3477
|
});
|
|
1959
|
-
var
|
|
3478
|
+
var ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
|
|
3479
|
+
$ZodEmail.init(inst, def);
|
|
3480
|
+
ZodStringFormat.init(inst, def);
|
|
3481
|
+
});
|
|
3482
|
+
var ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
|
|
3483
|
+
$ZodGUID.init(inst, def);
|
|
3484
|
+
ZodStringFormat.init(inst, def);
|
|
3485
|
+
});
|
|
3486
|
+
var ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => {
|
|
3487
|
+
$ZodUUID.init(inst, def);
|
|
3488
|
+
ZodStringFormat.init(inst, def);
|
|
3489
|
+
});
|
|
3490
|
+
var ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
|
|
1960
3491
|
$ZodURL.init(inst, def);
|
|
1961
|
-
|
|
3492
|
+
ZodStringFormat.init(inst, def);
|
|
1962
3493
|
});
|
|
1963
3494
|
function url(params) {
|
|
1964
|
-
return _url(
|
|
3495
|
+
return _url(ZodURL, params);
|
|
1965
3496
|
}
|
|
1966
|
-
var
|
|
3497
|
+
var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
|
|
3498
|
+
$ZodEmoji.init(inst, def);
|
|
3499
|
+
ZodStringFormat.init(inst, def);
|
|
3500
|
+
});
|
|
3501
|
+
var ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
|
|
3502
|
+
$ZodNanoID.init(inst, def);
|
|
3503
|
+
ZodStringFormat.init(inst, def);
|
|
3504
|
+
});
|
|
3505
|
+
var ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => {
|
|
3506
|
+
$ZodCUID.init(inst, def);
|
|
3507
|
+
ZodStringFormat.init(inst, def);
|
|
3508
|
+
});
|
|
3509
|
+
var ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => {
|
|
3510
|
+
$ZodCUID2.init(inst, def);
|
|
3511
|
+
ZodStringFormat.init(inst, def);
|
|
3512
|
+
});
|
|
3513
|
+
var ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => {
|
|
3514
|
+
$ZodULID.init(inst, def);
|
|
3515
|
+
ZodStringFormat.init(inst, def);
|
|
3516
|
+
});
|
|
3517
|
+
var ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => {
|
|
3518
|
+
$ZodXID.init(inst, def);
|
|
3519
|
+
ZodStringFormat.init(inst, def);
|
|
3520
|
+
});
|
|
3521
|
+
var ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => {
|
|
3522
|
+
$ZodKSUID.init(inst, def);
|
|
3523
|
+
ZodStringFormat.init(inst, def);
|
|
3524
|
+
});
|
|
3525
|
+
var ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => {
|
|
3526
|
+
$ZodIPv4.init(inst, def);
|
|
3527
|
+
ZodStringFormat.init(inst, def);
|
|
3528
|
+
});
|
|
3529
|
+
var ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
|
|
3530
|
+
$ZodIPv6.init(inst, def);
|
|
3531
|
+
ZodStringFormat.init(inst, def);
|
|
3532
|
+
});
|
|
3533
|
+
var ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
|
|
3534
|
+
$ZodCIDRv4.init(inst, def);
|
|
3535
|
+
ZodStringFormat.init(inst, def);
|
|
3536
|
+
});
|
|
3537
|
+
var ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => {
|
|
3538
|
+
$ZodCIDRv6.init(inst, def);
|
|
3539
|
+
ZodStringFormat.init(inst, def);
|
|
3540
|
+
});
|
|
3541
|
+
var ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => {
|
|
3542
|
+
$ZodBase64.init(inst, def);
|
|
3543
|
+
ZodStringFormat.init(inst, def);
|
|
3544
|
+
});
|
|
3545
|
+
var ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
|
|
3546
|
+
$ZodBase64URL.init(inst, def);
|
|
3547
|
+
ZodStringFormat.init(inst, def);
|
|
3548
|
+
});
|
|
3549
|
+
var ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => {
|
|
3550
|
+
$ZodE164.init(inst, def);
|
|
3551
|
+
ZodStringFormat.init(inst, def);
|
|
3552
|
+
});
|
|
3553
|
+
var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
|
|
3554
|
+
$ZodJWT.init(inst, def);
|
|
3555
|
+
ZodStringFormat.init(inst, def);
|
|
3556
|
+
});
|
|
3557
|
+
var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
|
|
1967
3558
|
$ZodBoolean.init(inst, def);
|
|
1968
|
-
|
|
3559
|
+
ZodType.init(inst, def);
|
|
1969
3560
|
});
|
|
1970
3561
|
function boolean2(params) {
|
|
1971
|
-
return _boolean(
|
|
3562
|
+
return _boolean(ZodBoolean, params);
|
|
1972
3563
|
}
|
|
1973
|
-
var
|
|
3564
|
+
var ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
|
|
1974
3565
|
$ZodAny.init(inst, def);
|
|
1975
|
-
|
|
3566
|
+
ZodType.init(inst, def);
|
|
1976
3567
|
});
|
|
1977
3568
|
function any() {
|
|
1978
|
-
return _any(
|
|
3569
|
+
return _any(ZodAny);
|
|
3570
|
+
}
|
|
3571
|
+
var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
|
|
3572
|
+
$ZodUnknown.init(inst, def);
|
|
3573
|
+
ZodType.init(inst, def);
|
|
3574
|
+
});
|
|
3575
|
+
function unknown() {
|
|
3576
|
+
return _unknown(ZodUnknown);
|
|
1979
3577
|
}
|
|
1980
|
-
var
|
|
3578
|
+
var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
|
|
3579
|
+
$ZodNever.init(inst, def);
|
|
3580
|
+
ZodType.init(inst, def);
|
|
3581
|
+
});
|
|
3582
|
+
function never(params) {
|
|
3583
|
+
return _never(ZodNever, params);
|
|
3584
|
+
}
|
|
3585
|
+
var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
1981
3586
|
$ZodArray.init(inst, def);
|
|
1982
|
-
|
|
3587
|
+
ZodType.init(inst, def);
|
|
3588
|
+
inst.element = def.element;
|
|
3589
|
+
inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
|
|
3590
|
+
inst.nonempty = (params) => inst.check(_minLength(1, params));
|
|
3591
|
+
inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
|
|
3592
|
+
inst.length = (len, params) => inst.check(_length(len, params));
|
|
3593
|
+
inst.unwrap = () => inst.element;
|
|
1983
3594
|
});
|
|
1984
3595
|
function array(element, params) {
|
|
1985
|
-
return
|
|
1986
|
-
type: "array",
|
|
1987
|
-
element,
|
|
1988
|
-
...util_exports.normalizeParams(params)
|
|
1989
|
-
});
|
|
3596
|
+
return _array(ZodArray, element, params);
|
|
1990
3597
|
}
|
|
1991
|
-
var
|
|
1992
|
-
$
|
|
1993
|
-
|
|
3598
|
+
var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
3599
|
+
$ZodObjectJIT.init(inst, def);
|
|
3600
|
+
ZodType.init(inst, def);
|
|
1994
3601
|
util_exports.defineLazy(inst, "shape", () => def.shape);
|
|
3602
|
+
inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
|
|
3603
|
+
inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
|
|
3604
|
+
inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
|
|
3605
|
+
inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
|
|
3606
|
+
inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
|
|
3607
|
+
inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 });
|
|
3608
|
+
inst.extend = (incoming) => {
|
|
3609
|
+
return util_exports.extend(inst, incoming);
|
|
3610
|
+
};
|
|
3611
|
+
inst.safeExtend = (incoming) => {
|
|
3612
|
+
return util_exports.safeExtend(inst, incoming);
|
|
3613
|
+
};
|
|
3614
|
+
inst.merge = (other) => util_exports.merge(inst, other);
|
|
3615
|
+
inst.pick = (mask) => util_exports.pick(inst, mask);
|
|
3616
|
+
inst.omit = (mask) => util_exports.omit(inst, mask);
|
|
3617
|
+
inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]);
|
|
3618
|
+
inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]);
|
|
1995
3619
|
});
|
|
1996
3620
|
function object(shape, params) {
|
|
1997
3621
|
const def = {
|
|
1998
3622
|
type: "object",
|
|
1999
3623
|
get shape() {
|
|
2000
|
-
util_exports.assignProp(this, "shape",
|
|
3624
|
+
util_exports.assignProp(this, "shape", shape ? util_exports.objectClone(shape) : {});
|
|
2001
3625
|
return this.shape;
|
|
2002
3626
|
},
|
|
2003
3627
|
...util_exports.normalizeParams(params)
|
|
2004
3628
|
};
|
|
2005
|
-
return new
|
|
3629
|
+
return new ZodObject(def);
|
|
2006
3630
|
}
|
|
2007
|
-
var
|
|
3631
|
+
var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
|
|
2008
3632
|
$ZodUnion.init(inst, def);
|
|
2009
|
-
|
|
3633
|
+
ZodType.init(inst, def);
|
|
3634
|
+
inst.options = def.options;
|
|
2010
3635
|
});
|
|
2011
3636
|
function union(options, params) {
|
|
2012
|
-
return new
|
|
3637
|
+
return new ZodUnion({
|
|
2013
3638
|
type: "union",
|
|
2014
3639
|
options,
|
|
2015
3640
|
...util_exports.normalizeParams(params)
|
|
2016
3641
|
});
|
|
2017
3642
|
}
|
|
2018
|
-
var
|
|
3643
|
+
var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
|
|
3644
|
+
$ZodIntersection.init(inst, def);
|
|
3645
|
+
ZodType.init(inst, def);
|
|
3646
|
+
});
|
|
3647
|
+
function intersection(left, right) {
|
|
3648
|
+
return new ZodIntersection({
|
|
3649
|
+
type: "intersection",
|
|
3650
|
+
left,
|
|
3651
|
+
right
|
|
3652
|
+
});
|
|
3653
|
+
}
|
|
3654
|
+
var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
2019
3655
|
$ZodRecord.init(inst, def);
|
|
2020
|
-
|
|
3656
|
+
ZodType.init(inst, def);
|
|
3657
|
+
inst.keyType = def.keyType;
|
|
3658
|
+
inst.valueType = def.valueType;
|
|
2021
3659
|
});
|
|
2022
3660
|
function record(keyType, valueType, params) {
|
|
2023
|
-
return new
|
|
3661
|
+
return new ZodRecord({
|
|
2024
3662
|
type: "record",
|
|
2025
3663
|
keyType,
|
|
2026
3664
|
valueType,
|
|
2027
3665
|
...util_exports.normalizeParams(params)
|
|
2028
3666
|
});
|
|
2029
3667
|
}
|
|
2030
|
-
var
|
|
3668
|
+
var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
|
|
2031
3669
|
$ZodEnum.init(inst, def);
|
|
2032
|
-
|
|
3670
|
+
ZodType.init(inst, def);
|
|
3671
|
+
inst.enum = def.entries;
|
|
2033
3672
|
inst.options = Object.values(def.entries);
|
|
3673
|
+
const keys = new Set(Object.keys(def.entries));
|
|
3674
|
+
inst.extract = (values, params) => {
|
|
3675
|
+
const newEntries = {};
|
|
3676
|
+
for (const value of values) {
|
|
3677
|
+
if (keys.has(value)) {
|
|
3678
|
+
newEntries[value] = def.entries[value];
|
|
3679
|
+
} else
|
|
3680
|
+
throw new Error(`Key ${value} not found in enum`);
|
|
3681
|
+
}
|
|
3682
|
+
return new ZodEnum({
|
|
3683
|
+
...def,
|
|
3684
|
+
checks: [],
|
|
3685
|
+
...util_exports.normalizeParams(params),
|
|
3686
|
+
entries: newEntries
|
|
3687
|
+
});
|
|
3688
|
+
};
|
|
3689
|
+
inst.exclude = (values, params) => {
|
|
3690
|
+
const newEntries = { ...def.entries };
|
|
3691
|
+
for (const value of values) {
|
|
3692
|
+
if (keys.has(value)) {
|
|
3693
|
+
delete newEntries[value];
|
|
3694
|
+
} else
|
|
3695
|
+
throw new Error(`Key ${value} not found in enum`);
|
|
3696
|
+
}
|
|
3697
|
+
return new ZodEnum({
|
|
3698
|
+
...def,
|
|
3699
|
+
checks: [],
|
|
3700
|
+
...util_exports.normalizeParams(params),
|
|
3701
|
+
entries: newEntries
|
|
3702
|
+
});
|
|
3703
|
+
};
|
|
2034
3704
|
});
|
|
2035
3705
|
function _enum(values, params) {
|
|
2036
3706
|
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
|
|
2037
|
-
return new
|
|
3707
|
+
return new ZodEnum({
|
|
2038
3708
|
type: "enum",
|
|
2039
3709
|
entries,
|
|
2040
3710
|
...util_exports.normalizeParams(params)
|
|
2041
3711
|
});
|
|
2042
3712
|
}
|
|
2043
|
-
var
|
|
3713
|
+
var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
|
|
2044
3714
|
$ZodLiteral.init(inst, def);
|
|
2045
|
-
|
|
3715
|
+
ZodType.init(inst, def);
|
|
3716
|
+
inst.values = new Set(def.values);
|
|
3717
|
+
Object.defineProperty(inst, "value", {
|
|
3718
|
+
get() {
|
|
3719
|
+
if (def.values.length > 1) {
|
|
3720
|
+
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
3721
|
+
}
|
|
3722
|
+
return def.values[0];
|
|
3723
|
+
}
|
|
3724
|
+
});
|
|
2046
3725
|
});
|
|
2047
3726
|
function literal(value, params) {
|
|
2048
|
-
return new
|
|
3727
|
+
return new ZodLiteral({
|
|
2049
3728
|
type: "literal",
|
|
2050
3729
|
values: Array.isArray(value) ? value : [value],
|
|
2051
3730
|
...util_exports.normalizeParams(params)
|
|
2052
3731
|
});
|
|
2053
3732
|
}
|
|
2054
|
-
var
|
|
3733
|
+
var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
3734
|
+
$ZodTransform.init(inst, def);
|
|
3735
|
+
ZodType.init(inst, def);
|
|
3736
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
3737
|
+
if (_ctx.direction === "backward") {
|
|
3738
|
+
throw new $ZodEncodeError(inst.constructor.name);
|
|
3739
|
+
}
|
|
3740
|
+
payload.addIssue = (issue2) => {
|
|
3741
|
+
if (typeof issue2 === "string") {
|
|
3742
|
+
payload.issues.push(util_exports.issue(issue2, payload.value, def));
|
|
3743
|
+
} else {
|
|
3744
|
+
const _issue = issue2;
|
|
3745
|
+
if (_issue.fatal)
|
|
3746
|
+
_issue.continue = false;
|
|
3747
|
+
_issue.code ?? (_issue.code = "custom");
|
|
3748
|
+
_issue.input ?? (_issue.input = payload.value);
|
|
3749
|
+
_issue.inst ?? (_issue.inst = inst);
|
|
3750
|
+
payload.issues.push(util_exports.issue(_issue));
|
|
3751
|
+
}
|
|
3752
|
+
};
|
|
3753
|
+
const output = def.transform(payload.value, payload);
|
|
3754
|
+
if (output instanceof Promise) {
|
|
3755
|
+
return output.then((output2) => {
|
|
3756
|
+
payload.value = output2;
|
|
3757
|
+
return payload;
|
|
3758
|
+
});
|
|
3759
|
+
}
|
|
3760
|
+
payload.value = output;
|
|
3761
|
+
return payload;
|
|
3762
|
+
};
|
|
3763
|
+
});
|
|
3764
|
+
function transform(fn) {
|
|
3765
|
+
return new ZodTransform({
|
|
3766
|
+
type: "transform",
|
|
3767
|
+
transform: fn
|
|
3768
|
+
});
|
|
3769
|
+
}
|
|
3770
|
+
var ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
|
|
2055
3771
|
$ZodOptional.init(inst, def);
|
|
2056
|
-
|
|
3772
|
+
ZodType.init(inst, def);
|
|
3773
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
2057
3774
|
});
|
|
2058
3775
|
function optional(innerType) {
|
|
2059
|
-
return new
|
|
3776
|
+
return new ZodOptional({
|
|
2060
3777
|
type: "optional",
|
|
2061
3778
|
innerType
|
|
2062
3779
|
});
|
|
2063
3780
|
}
|
|
2064
|
-
var
|
|
3781
|
+
var ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
|
|
2065
3782
|
$ZodNullable.init(inst, def);
|
|
2066
|
-
|
|
3783
|
+
ZodType.init(inst, def);
|
|
3784
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
2067
3785
|
});
|
|
2068
3786
|
function nullable(innerType) {
|
|
2069
|
-
return new
|
|
3787
|
+
return new ZodNullable({
|
|
2070
3788
|
type: "nullable",
|
|
2071
3789
|
innerType
|
|
2072
3790
|
});
|
|
2073
3791
|
}
|
|
2074
|
-
var
|
|
3792
|
+
var ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
|
|
2075
3793
|
$ZodDefault.init(inst, def);
|
|
2076
|
-
|
|
3794
|
+
ZodType.init(inst, def);
|
|
3795
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
3796
|
+
inst.removeDefault = inst.unwrap;
|
|
2077
3797
|
});
|
|
2078
3798
|
function _default(innerType, defaultValue) {
|
|
2079
|
-
return new
|
|
3799
|
+
return new ZodDefault({
|
|
2080
3800
|
type: "default",
|
|
2081
3801
|
innerType,
|
|
2082
3802
|
get defaultValue() {
|
|
@@ -2084,6 +3804,83 @@ function _default(innerType, defaultValue) {
|
|
|
2084
3804
|
}
|
|
2085
3805
|
});
|
|
2086
3806
|
}
|
|
3807
|
+
var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
|
|
3808
|
+
$ZodPrefault.init(inst, def);
|
|
3809
|
+
ZodType.init(inst, def);
|
|
3810
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
3811
|
+
});
|
|
3812
|
+
function prefault(innerType, defaultValue) {
|
|
3813
|
+
return new ZodPrefault({
|
|
3814
|
+
type: "prefault",
|
|
3815
|
+
innerType,
|
|
3816
|
+
get defaultValue() {
|
|
3817
|
+
return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue);
|
|
3818
|
+
}
|
|
3819
|
+
});
|
|
3820
|
+
}
|
|
3821
|
+
var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
|
|
3822
|
+
$ZodNonOptional.init(inst, def);
|
|
3823
|
+
ZodType.init(inst, def);
|
|
3824
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
3825
|
+
});
|
|
3826
|
+
function nonoptional(innerType, params) {
|
|
3827
|
+
return new ZodNonOptional({
|
|
3828
|
+
type: "nonoptional",
|
|
3829
|
+
innerType,
|
|
3830
|
+
...util_exports.normalizeParams(params)
|
|
3831
|
+
});
|
|
3832
|
+
}
|
|
3833
|
+
var ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
|
|
3834
|
+
$ZodCatch.init(inst, def);
|
|
3835
|
+
ZodType.init(inst, def);
|
|
3836
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
3837
|
+
inst.removeCatch = inst.unwrap;
|
|
3838
|
+
});
|
|
3839
|
+
function _catch(innerType, catchValue) {
|
|
3840
|
+
return new ZodCatch({
|
|
3841
|
+
type: "catch",
|
|
3842
|
+
innerType,
|
|
3843
|
+
catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
|
|
3844
|
+
});
|
|
3845
|
+
}
|
|
3846
|
+
var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
|
|
3847
|
+
$ZodPipe.init(inst, def);
|
|
3848
|
+
ZodType.init(inst, def);
|
|
3849
|
+
inst.in = def.in;
|
|
3850
|
+
inst.out = def.out;
|
|
3851
|
+
});
|
|
3852
|
+
function pipe(in_, out) {
|
|
3853
|
+
return new ZodPipe({
|
|
3854
|
+
type: "pipe",
|
|
3855
|
+
in: in_,
|
|
3856
|
+
out
|
|
3857
|
+
// ...util.normalizeParams(params),
|
|
3858
|
+
});
|
|
3859
|
+
}
|
|
3860
|
+
var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
3861
|
+
$ZodReadonly.init(inst, def);
|
|
3862
|
+
ZodType.init(inst, def);
|
|
3863
|
+
inst.unwrap = () => inst._zod.def.innerType;
|
|
3864
|
+
});
|
|
3865
|
+
function readonly(innerType) {
|
|
3866
|
+
return new ZodReadonly({
|
|
3867
|
+
type: "readonly",
|
|
3868
|
+
innerType
|
|
3869
|
+
});
|
|
3870
|
+
}
|
|
3871
|
+
var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
|
|
3872
|
+
$ZodCustom.init(inst, def);
|
|
3873
|
+
ZodType.init(inst, def);
|
|
3874
|
+
});
|
|
3875
|
+
function refine(fn, _params = {}) {
|
|
3876
|
+
return _refine(ZodCustom, fn, _params);
|
|
3877
|
+
}
|
|
3878
|
+
function superRefine(fn) {
|
|
3879
|
+
return _superRefine(fn);
|
|
3880
|
+
}
|
|
3881
|
+
|
|
3882
|
+
// ../../node_modules/.pnpm/zod@4.1.9/node_modules/zod/v4/classic/external.js
|
|
3883
|
+
config(en_default());
|
|
2087
3884
|
|
|
2088
3885
|
// ../config/src/constants.ts
|
|
2089
3886
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
@@ -3696,15 +5493,15 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
3696
5493
|
await workspaceConfigSchema.parseAsync(configInput)
|
|
3697
5494
|
);
|
|
3698
5495
|
result.workspaceRoot ??= _workspaceRoot;
|
|
3699
|
-
} catch (
|
|
5496
|
+
} catch (error2) {
|
|
3700
5497
|
throw new Error(
|
|
3701
|
-
`Failed to parse Storm Workspace configuration${
|
|
5498
|
+
`Failed to parse Storm Workspace configuration${error2?.message ? `: ${error2.message}` : ""}
|
|
3702
5499
|
|
|
3703
5500
|
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${formatLogMessage(
|
|
3704
5501
|
configInput
|
|
3705
5502
|
)}`,
|
|
3706
5503
|
{
|
|
3707
|
-
cause:
|
|
5504
|
+
cause: error2
|
|
3708
5505
|
}
|
|
3709
5506
|
);
|
|
3710
5507
|
}
|