@storm-software/git-tools 2.122.16 → 2.122.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/bin/{chunk-PXIBHNFL.js → chunk-4S6MPWDI.js} +121 -1908
- package/bin/{chunk-LVXCAKZC.cjs → chunk-T2YZSJ5E.cjs} +121 -1908
- 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 +6 -6
|
@@ -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 = (date2 = /* @__PURE__ */ new Date()) => {
|
|
110
|
+
return `${date2.toLocaleDateString()} ${date2.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", (error) => {
|
|
294
294
|
writeError(
|
|
295
|
-
`An Unhandled Rejection occurred while running the program: ${
|
|
295
|
+
`An Unhandled Rejection occurred while running the program: ${error}`,
|
|
296
296
|
config2
|
|
297
297
|
);
|
|
298
298
|
exitWithError(config2);
|
|
299
299
|
});
|
|
300
|
-
process.on("uncaughtException", (
|
|
300
|
+
process.on("uncaughtException", (error) => {
|
|
301
301
|
writeError(
|
|
302
|
-
`An Uncaught Exception occurred while running the program: ${
|
|
303
|
-
Stacktrace: ${
|
|
302
|
+
`An Uncaught Exception occurred while running the program: ${error.message}
|
|
303
|
+
Stacktrace: ${error.stack}`,
|
|
304
304
|
config2
|
|
305
305
|
);
|
|
306
306
|
exitWithError(config2);
|
|
@@ -319,7 +319,7 @@ Stacktrace: ${error2.stack}`,
|
|
|
319
319
|
});
|
|
320
320
|
};
|
|
321
321
|
// @__NO_SIDE_EFFECTS__
|
|
322
|
-
function $constructor(name,
|
|
322
|
+
function $constructor(name, initializer2, params) {
|
|
323
323
|
function init(inst, def) {
|
|
324
324
|
var _a;
|
|
325
325
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -328,7 +328,7 @@ function $constructor(name, initializer3, params) {
|
|
|
328
328
|
});
|
|
329
329
|
(_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set());
|
|
330
330
|
inst._zod.traits.add(name);
|
|
331
|
-
|
|
331
|
+
initializer2(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,20 +366,12 @@ 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
|
-
};
|
|
375
369
|
var globalConfig = {};
|
|
376
370
|
function config(newConfig) {
|
|
377
|
-
if (newConfig)
|
|
378
|
-
Object.assign(globalConfig, newConfig);
|
|
379
371
|
return globalConfig;
|
|
380
372
|
}
|
|
381
373
|
|
|
382
|
-
// ../../node_modules/.pnpm/zod@4.1.
|
|
374
|
+
// ../../node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/util.js
|
|
383
375
|
var util_exports = {};
|
|
384
376
|
__export(util_exports, {
|
|
385
377
|
BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
|
|
@@ -1011,7 +1003,7 @@ var Class = class {
|
|
|
1011
1003
|
}
|
|
1012
1004
|
};
|
|
1013
1005
|
|
|
1014
|
-
// ../../node_modules/.pnpm/zod@4.1.
|
|
1006
|
+
// ../../node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/errors.js
|
|
1015
1007
|
var initializer = (inst, def) => {
|
|
1016
1008
|
inst.name = "$ZodError";
|
|
1017
1009
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -1030,57 +1022,8 @@ var initializer = (inst, def) => {
|
|
|
1030
1022
|
};
|
|
1031
1023
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
1032
1024
|
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
|
-
}
|
|
1082
1025
|
|
|
1083
|
-
// ../../node_modules/.pnpm/zod@4.1.
|
|
1026
|
+
// ../../node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/parse.js
|
|
1084
1027
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
1085
1028
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
|
1086
1029
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
@@ -1094,6 +1037,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
1094
1037
|
}
|
|
1095
1038
|
return result.value;
|
|
1096
1039
|
};
|
|
1040
|
+
var parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
1097
1041
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
1098
1042
|
const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
|
|
1099
1043
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
@@ -1106,6 +1050,7 @@ var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
|
1106
1050
|
}
|
|
1107
1051
|
return result.value;
|
|
1108
1052
|
};
|
|
1053
|
+
var parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError);
|
|
1109
1054
|
var _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
1110
1055
|
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
1111
1056
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
@@ -1129,155 +1074,22 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
1129
1074
|
} : { success: true, data: result.value };
|
|
1130
1075
|
};
|
|
1131
1076
|
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
|
-
};
|
|
1160
1077
|
|
|
1161
|
-
// ../../node_modules/.pnpm/zod@4.1.
|
|
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_-]*$/;
|
|
1078
|
+
// ../../node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/regexes.js
|
|
1186
1079
|
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
|
-
}
|
|
1208
1080
|
var string = (params) => {
|
|
1209
1081
|
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
1210
1082
|
return new RegExp(`^${regex}$`);
|
|
1211
1083
|
};
|
|
1212
1084
|
var boolean = /^(?:true|false)$/i;
|
|
1213
|
-
var lowercase = /^[^A-Z]*$/;
|
|
1214
|
-
var uppercase = /^[^a-z]*$/;
|
|
1215
1085
|
|
|
1216
|
-
// ../../node_modules/.pnpm/zod@4.1.
|
|
1086
|
+
// ../../node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/checks.js
|
|
1217
1087
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
1218
1088
|
var _a;
|
|
1219
1089
|
inst._zod ?? (inst._zod = {});
|
|
1220
1090
|
inst._zod.def = def;
|
|
1221
1091
|
(_a = inst._zod).onattach ?? (_a.onattach = []);
|
|
1222
1092
|
});
|
|
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
|
-
});
|
|
1281
1093
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
1282
1094
|
var _a;
|
|
1283
1095
|
$ZodCheck.init(inst, def);
|
|
@@ -1356,84 +1168,6 @@ var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def)
|
|
|
1356
1168
|
});
|
|
1357
1169
|
};
|
|
1358
1170
|
});
|
|
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
|
-
});
|
|
1437
1171
|
var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => {
|
|
1438
1172
|
$ZodCheck.init(inst, def);
|
|
1439
1173
|
inst._zod.check = (payload) => {
|
|
@@ -1441,50 +1175,14 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
1441
1175
|
};
|
|
1442
1176
|
});
|
|
1443
1177
|
|
|
1444
|
-
// ../../node_modules/.pnpm/zod@4.1.
|
|
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
|
-
|
|
1480
|
-
// ../../node_modules/.pnpm/zod@4.1.9/node_modules/zod/v4/core/versions.js
|
|
1178
|
+
// ../../node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/versions.js
|
|
1481
1179
|
var version = {
|
|
1482
1180
|
major: 4,
|
|
1483
1181
|
minor: 1,
|
|
1484
|
-
patch:
|
|
1182
|
+
patch: 11
|
|
1485
1183
|
};
|
|
1486
1184
|
|
|
1487
|
-
// ../../node_modules/.pnpm/zod@4.1.
|
|
1185
|
+
// ../../node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/schemas.js
|
|
1488
1186
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
1489
1187
|
var _a;
|
|
1490
1188
|
inst ?? (inst = {});
|
|
@@ -1618,34 +1316,6 @@ var $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, d
|
|
|
1618
1316
|
$ZodCheckStringFormat.init(inst, def);
|
|
1619
1317
|
$ZodString.init(inst, def);
|
|
1620
1318
|
});
|
|
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
|
-
});
|
|
1649
1319
|
var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
1650
1320
|
$ZodStringFormat.init(inst, def);
|
|
1651
1321
|
inst._zod.check = (payload) => {
|
|
@@ -1697,204 +1367,6 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
1697
1367
|
}
|
|
1698
1368
|
};
|
|
1699
1369
|
});
|
|
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
|
-
});
|
|
1898
1370
|
var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
1899
1371
|
$ZodType.init(inst, def);
|
|
1900
1372
|
inst._zod.pattern = boolean;
|
|
@@ -1920,29 +1392,13 @@ var $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => {
|
|
|
1920
1392
|
$ZodType.init(inst, def);
|
|
1921
1393
|
inst._zod.parse = (payload) => payload;
|
|
1922
1394
|
});
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
}
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
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) => {
|
|
1395
|
+
function handleArrayResult(result, final, index) {
|
|
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) => {
|
|
1946
1402
|
$ZodType.init(inst, def);
|
|
1947
1403
|
inst._zod.parse = (payload, ctx) => {
|
|
1948
1404
|
const input = payload.value;
|
|
@@ -2038,6 +1494,19 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
2038
1494
|
}
|
|
2039
1495
|
var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
2040
1496
|
$ZodType.init(inst, def);
|
|
1497
|
+
const desc = Object.getOwnPropertyDescriptor(def, "shape");
|
|
1498
|
+
if (!desc?.get) {
|
|
1499
|
+
const sh = def.shape;
|
|
1500
|
+
Object.defineProperty(def, "shape", {
|
|
1501
|
+
get: () => {
|
|
1502
|
+
const newSh = { ...sh };
|
|
1503
|
+
Object.defineProperty(def, "shape", {
|
|
1504
|
+
value: newSh
|
|
1505
|
+
});
|
|
1506
|
+
return newSh;
|
|
1507
|
+
}
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
2041
1510
|
const _normalized = cached(() => normalizeDef(def));
|
|
2042
1511
|
defineLazy(inst._zod, "propValues", () => {
|
|
2043
1512
|
const shape = def.shape;
|
|
@@ -2085,82 +1554,6 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
2085
1554
|
return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
|
|
2086
1555
|
};
|
|
2087
1556
|
});
|
|
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
|
-
});
|
|
2164
1557
|
function handleUnionResults(results, final, inst, ctx) {
|
|
2165
1558
|
for (const result of results) {
|
|
2166
1559
|
if (result.issues.length === 0) {
|
|
@@ -2227,81 +1620,6 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
2227
1620
|
});
|
|
2228
1621
|
};
|
|
2229
1622
|
});
|
|
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
|
-
}
|
|
2305
1623
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
2306
1624
|
$ZodType.init(inst, def);
|
|
2307
1625
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -2436,27 +1754,6 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
|
2436
1754
|
return payload;
|
|
2437
1755
|
};
|
|
2438
1756
|
});
|
|
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
|
-
});
|
|
2460
1757
|
function handleOptionalResult(result, input) {
|
|
2461
1758
|
if (result.issues.length && input === void 0) {
|
|
2462
1759
|
return { issues: [], value: void 0 };
|
|
@@ -2529,285 +1826,6 @@ function handleDefaultResult(payload, def) {
|
|
|
2529
1826
|
}
|
|
2530
1827
|
return payload;
|
|
2531
1828
|
}
|
|
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
|
-
}
|
|
2811
1829
|
var $ZodRegistry = class {
|
|
2812
1830
|
constructor() {
|
|
2813
1831
|
this._map = /* @__PURE__ */ new WeakMap();
|
|
@@ -2854,497 +1872,73 @@ var $ZodRegistry = class {
|
|
|
2854
1872
|
function registry() {
|
|
2855
1873
|
return new $ZodRegistry();
|
|
2856
1874
|
}
|
|
2857
|
-
var globalRegistry = /* @__PURE__ */ registry();
|
|
2858
1875
|
|
|
2859
|
-
// ../../node_modules/.pnpm/zod@4.1.
|
|
1876
|
+
// ../../node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/core/api.js
|
|
2860
1877
|
function _string(Class2, params) {
|
|
2861
1878
|
return new Class2({
|
|
2862
1879
|
type: "string",
|
|
2863
1880
|
...normalizeParams(params)
|
|
2864
1881
|
});
|
|
2865
1882
|
}
|
|
2866
|
-
function
|
|
1883
|
+
function _url(Class2, params) {
|
|
2867
1884
|
return new Class2({
|
|
2868
1885
|
type: "string",
|
|
2869
|
-
format: "
|
|
1886
|
+
format: "url",
|
|
2870
1887
|
check: "string_format",
|
|
2871
1888
|
abort: false,
|
|
2872
1889
|
...normalizeParams(params)
|
|
2873
1890
|
});
|
|
2874
1891
|
}
|
|
2875
|
-
function
|
|
1892
|
+
function _boolean(Class2, params) {
|
|
2876
1893
|
return new Class2({
|
|
2877
|
-
type: "
|
|
2878
|
-
format: "guid",
|
|
2879
|
-
check: "string_format",
|
|
2880
|
-
abort: false,
|
|
1894
|
+
type: "boolean",
|
|
2881
1895
|
...normalizeParams(params)
|
|
2882
1896
|
});
|
|
2883
1897
|
}
|
|
2884
|
-
function
|
|
1898
|
+
function _any(Class2) {
|
|
2885
1899
|
return new Class2({
|
|
2886
|
-
type: "
|
|
2887
|
-
format: "uuid",
|
|
2888
|
-
check: "string_format",
|
|
2889
|
-
abort: false,
|
|
2890
|
-
...normalizeParams(params)
|
|
1900
|
+
type: "any"
|
|
2891
1901
|
});
|
|
2892
1902
|
}
|
|
2893
|
-
function
|
|
2894
|
-
return new
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
abort: false,
|
|
2899
|
-
version: "v4",
|
|
2900
|
-
...normalizeParams(params)
|
|
1903
|
+
function _length(length, params) {
|
|
1904
|
+
return new $ZodCheckLengthEquals({
|
|
1905
|
+
check: "length_equals",
|
|
1906
|
+
...normalizeParams(params),
|
|
1907
|
+
length
|
|
2901
1908
|
});
|
|
2902
1909
|
}
|
|
2903
|
-
function
|
|
2904
|
-
return new
|
|
2905
|
-
type: "string",
|
|
2906
|
-
format: "uuid",
|
|
1910
|
+
function _regex(pattern, params) {
|
|
1911
|
+
return new $ZodCheckRegex({
|
|
2907
1912
|
check: "string_format",
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
1913
|
+
format: "regex",
|
|
1914
|
+
...normalizeParams(params),
|
|
1915
|
+
pattern
|
|
2911
1916
|
});
|
|
2912
1917
|
}
|
|
2913
|
-
function
|
|
2914
|
-
return new
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
check: "string_format",
|
|
2918
|
-
abort: false,
|
|
2919
|
-
version: "v7",
|
|
2920
|
-
...normalizeParams(params)
|
|
1918
|
+
function _overwrite(tx) {
|
|
1919
|
+
return new $ZodCheckOverwrite({
|
|
1920
|
+
check: "overwrite",
|
|
1921
|
+
tx
|
|
2921
1922
|
});
|
|
2922
1923
|
}
|
|
2923
|
-
function
|
|
2924
|
-
return
|
|
2925
|
-
type: "string",
|
|
2926
|
-
format: "url",
|
|
2927
|
-
check: "string_format",
|
|
2928
|
-
abort: false,
|
|
2929
|
-
...normalizeParams(params)
|
|
2930
|
-
});
|
|
2931
|
-
}
|
|
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());
|
|
1924
|
+
function _trim() {
|
|
1925
|
+
return _overwrite((input) => input.trim());
|
|
3204
1926
|
}
|
|
3205
1927
|
function _toLowerCase() {
|
|
3206
1928
|
return _overwrite((input) => input.toLowerCase());
|
|
3207
1929
|
}
|
|
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
1930
|
|
|
3289
|
-
// ../../node_modules/.pnpm/zod@4.1.
|
|
3290
|
-
var
|
|
3291
|
-
|
|
3292
|
-
|
|
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) => {
|
|
1931
|
+
// ../../node_modules/.pnpm/zod@4.1.11/node_modules/zod/v4/mini/schemas.js
|
|
1932
|
+
var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
|
|
1933
|
+
if (!inst._zod)
|
|
1934
|
+
throw new Error("Uninitialized schema in ZodMiniType.");
|
|
3344
1935
|
$ZodType.init(inst, def);
|
|
3345
1936
|
inst.def = def;
|
|
3346
1937
|
inst.type = def.type;
|
|
3347
|
-
|
|
1938
|
+
inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
|
|
1939
|
+
inst.safeParse = (data, params) => safeParse(inst, data, params);
|
|
1940
|
+
inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
1941
|
+
inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
|
|
3348
1942
|
inst.check = (...checks) => {
|
|
3349
1943
|
return inst.clone(
|
|
3350
1944
|
{
|
|
@@ -3357,446 +1951,142 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
3357
1951
|
// { parent: true }
|
|
3358
1952
|
);
|
|
3359
1953
|
};
|
|
3360
|
-
inst.clone = (
|
|
1954
|
+
inst.clone = (_def, params) => clone(inst, _def, params);
|
|
3361
1955
|
inst.brand = () => inst;
|
|
3362
1956
|
inst.register = ((reg, meta) => {
|
|
3363
1957
|
reg.add(inst, meta);
|
|
3364
1958
|
return inst;
|
|
3365
1959
|
});
|
|
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;
|
|
3417
1960
|
});
|
|
3418
|
-
var
|
|
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) => {
|
|
1961
|
+
var ZodMiniString = /* @__PURE__ */ $constructor("ZodMiniString", (inst, def) => {
|
|
3441
1962
|
$ZodString.init(inst, def);
|
|
3442
|
-
|
|
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));
|
|
1963
|
+
ZodMiniType.init(inst, def);
|
|
3470
1964
|
});
|
|
3471
1965
|
function string2(params) {
|
|
3472
|
-
return _string(
|
|
1966
|
+
return _string(ZodMiniString, params);
|
|
3473
1967
|
}
|
|
3474
|
-
var
|
|
1968
|
+
var ZodMiniStringFormat = /* @__PURE__ */ $constructor("ZodMiniStringFormat", (inst, def) => {
|
|
3475
1969
|
$ZodStringFormat.init(inst, def);
|
|
3476
|
-
|
|
3477
|
-
});
|
|
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);
|
|
1970
|
+
ZodMiniString.init(inst, def);
|
|
3489
1971
|
});
|
|
3490
|
-
var
|
|
1972
|
+
var ZodMiniURL = /* @__PURE__ */ $constructor("ZodMiniURL", (inst, def) => {
|
|
3491
1973
|
$ZodURL.init(inst, def);
|
|
3492
|
-
|
|
1974
|
+
ZodMiniStringFormat.init(inst, def);
|
|
3493
1975
|
});
|
|
3494
1976
|
function url(params) {
|
|
3495
|
-
return _url(
|
|
1977
|
+
return _url(ZodMiniURL, params);
|
|
3496
1978
|
}
|
|
3497
|
-
var
|
|
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) => {
|
|
1979
|
+
var ZodMiniBoolean = /* @__PURE__ */ $constructor("ZodMiniBoolean", (inst, def) => {
|
|
3558
1980
|
$ZodBoolean.init(inst, def);
|
|
3559
|
-
|
|
1981
|
+
ZodMiniType.init(inst, def);
|
|
3560
1982
|
});
|
|
3561
1983
|
function boolean2(params) {
|
|
3562
|
-
return _boolean(
|
|
1984
|
+
return _boolean(ZodMiniBoolean, params);
|
|
3563
1985
|
}
|
|
3564
|
-
var
|
|
1986
|
+
var ZodMiniAny = /* @__PURE__ */ $constructor("ZodMiniAny", (inst, def) => {
|
|
3565
1987
|
$ZodAny.init(inst, def);
|
|
3566
|
-
|
|
1988
|
+
ZodMiniType.init(inst, def);
|
|
3567
1989
|
});
|
|
3568
1990
|
function any() {
|
|
3569
|
-
return _any(
|
|
1991
|
+
return _any(ZodMiniAny);
|
|
3570
1992
|
}
|
|
3571
|
-
var
|
|
3572
|
-
$ZodUnknown.init(inst, def);
|
|
3573
|
-
ZodType.init(inst, def);
|
|
3574
|
-
});
|
|
3575
|
-
function unknown() {
|
|
3576
|
-
return _unknown(ZodUnknown);
|
|
3577
|
-
}
|
|
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) => {
|
|
1993
|
+
var ZodMiniArray = /* @__PURE__ */ $constructor("ZodMiniArray", (inst, def) => {
|
|
3586
1994
|
$ZodArray.init(inst, def);
|
|
3587
|
-
|
|
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;
|
|
1995
|
+
ZodMiniType.init(inst, def);
|
|
3594
1996
|
});
|
|
3595
1997
|
function array(element, params) {
|
|
3596
|
-
return
|
|
1998
|
+
return new ZodMiniArray({
|
|
1999
|
+
type: "array",
|
|
2000
|
+
element,
|
|
2001
|
+
...util_exports.normalizeParams(params)
|
|
2002
|
+
});
|
|
3597
2003
|
}
|
|
3598
|
-
var
|
|
3599
|
-
$
|
|
3600
|
-
|
|
2004
|
+
var ZodMiniObject = /* @__PURE__ */ $constructor("ZodMiniObject", (inst, def) => {
|
|
2005
|
+
$ZodObject.init(inst, def);
|
|
2006
|
+
ZodMiniType.init(inst, def);
|
|
3601
2007
|
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]);
|
|
3619
2008
|
});
|
|
3620
2009
|
function object(shape, params) {
|
|
3621
2010
|
const def = {
|
|
3622
2011
|
type: "object",
|
|
3623
|
-
|
|
3624
|
-
util_exports.assignProp(this, "shape", shape ? util_exports.objectClone(shape) : {});
|
|
3625
|
-
return this.shape;
|
|
3626
|
-
},
|
|
2012
|
+
shape: shape ?? {},
|
|
3627
2013
|
...util_exports.normalizeParams(params)
|
|
3628
2014
|
};
|
|
3629
|
-
return new
|
|
2015
|
+
return new ZodMiniObject(def);
|
|
3630
2016
|
}
|
|
3631
|
-
var
|
|
2017
|
+
var ZodMiniUnion = /* @__PURE__ */ $constructor("ZodMiniUnion", (inst, def) => {
|
|
3632
2018
|
$ZodUnion.init(inst, def);
|
|
3633
|
-
|
|
3634
|
-
inst.options = def.options;
|
|
2019
|
+
ZodMiniType.init(inst, def);
|
|
3635
2020
|
});
|
|
3636
2021
|
function union(options, params) {
|
|
3637
|
-
return new
|
|
2022
|
+
return new ZodMiniUnion({
|
|
3638
2023
|
type: "union",
|
|
3639
2024
|
options,
|
|
3640
2025
|
...util_exports.normalizeParams(params)
|
|
3641
2026
|
});
|
|
3642
2027
|
}
|
|
3643
|
-
var
|
|
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) => {
|
|
2028
|
+
var ZodMiniRecord = /* @__PURE__ */ $constructor("ZodMiniRecord", (inst, def) => {
|
|
3655
2029
|
$ZodRecord.init(inst, def);
|
|
3656
|
-
|
|
3657
|
-
inst.keyType = def.keyType;
|
|
3658
|
-
inst.valueType = def.valueType;
|
|
2030
|
+
ZodMiniType.init(inst, def);
|
|
3659
2031
|
});
|
|
3660
2032
|
function record(keyType, valueType, params) {
|
|
3661
|
-
return new
|
|
2033
|
+
return new ZodMiniRecord({
|
|
3662
2034
|
type: "record",
|
|
3663
2035
|
keyType,
|
|
3664
2036
|
valueType,
|
|
3665
2037
|
...util_exports.normalizeParams(params)
|
|
3666
2038
|
});
|
|
3667
2039
|
}
|
|
3668
|
-
var
|
|
2040
|
+
var ZodMiniEnum = /* @__PURE__ */ $constructor("ZodMiniEnum", (inst, def) => {
|
|
3669
2041
|
$ZodEnum.init(inst, def);
|
|
3670
|
-
|
|
3671
|
-
inst.enum = def.entries;
|
|
2042
|
+
ZodMiniType.init(inst, def);
|
|
3672
2043
|
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
|
-
};
|
|
3704
2044
|
});
|
|
3705
2045
|
function _enum(values, params) {
|
|
3706
2046
|
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
|
|
3707
|
-
return new
|
|
2047
|
+
return new ZodMiniEnum({
|
|
3708
2048
|
type: "enum",
|
|
3709
2049
|
entries,
|
|
3710
2050
|
...util_exports.normalizeParams(params)
|
|
3711
2051
|
});
|
|
3712
2052
|
}
|
|
3713
|
-
var
|
|
2053
|
+
var ZodMiniLiteral = /* @__PURE__ */ $constructor("ZodMiniLiteral", (inst, def) => {
|
|
3714
2054
|
$ZodLiteral.init(inst, def);
|
|
3715
|
-
|
|
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
|
-
});
|
|
2055
|
+
ZodMiniType.init(inst, def);
|
|
3725
2056
|
});
|
|
3726
2057
|
function literal(value, params) {
|
|
3727
|
-
return new
|
|
2058
|
+
return new ZodMiniLiteral({
|
|
3728
2059
|
type: "literal",
|
|
3729
2060
|
values: Array.isArray(value) ? value : [value],
|
|
3730
2061
|
...util_exports.normalizeParams(params)
|
|
3731
2062
|
});
|
|
3732
2063
|
}
|
|
3733
|
-
var
|
|
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) => {
|
|
2064
|
+
var ZodMiniOptional = /* @__PURE__ */ $constructor("ZodMiniOptional", (inst, def) => {
|
|
3771
2065
|
$ZodOptional.init(inst, def);
|
|
3772
|
-
|
|
3773
|
-
inst.unwrap = () => inst._zod.def.innerType;
|
|
2066
|
+
ZodMiniType.init(inst, def);
|
|
3774
2067
|
});
|
|
3775
2068
|
function optional(innerType) {
|
|
3776
|
-
return new
|
|
2069
|
+
return new ZodMiniOptional({
|
|
3777
2070
|
type: "optional",
|
|
3778
2071
|
innerType
|
|
3779
2072
|
});
|
|
3780
2073
|
}
|
|
3781
|
-
var
|
|
2074
|
+
var ZodMiniNullable = /* @__PURE__ */ $constructor("ZodMiniNullable", (inst, def) => {
|
|
3782
2075
|
$ZodNullable.init(inst, def);
|
|
3783
|
-
|
|
3784
|
-
inst.unwrap = () => inst._zod.def.innerType;
|
|
2076
|
+
ZodMiniType.init(inst, def);
|
|
3785
2077
|
});
|
|
3786
2078
|
function nullable(innerType) {
|
|
3787
|
-
return new
|
|
2079
|
+
return new ZodMiniNullable({
|
|
3788
2080
|
type: "nullable",
|
|
3789
2081
|
innerType
|
|
3790
2082
|
});
|
|
3791
2083
|
}
|
|
3792
|
-
var
|
|
2084
|
+
var ZodMiniDefault = /* @__PURE__ */ $constructor("ZodMiniDefault", (inst, def) => {
|
|
3793
2085
|
$ZodDefault.init(inst, def);
|
|
3794
|
-
|
|
3795
|
-
inst.unwrap = () => inst._zod.def.innerType;
|
|
3796
|
-
inst.removeDefault = inst.unwrap;
|
|
2086
|
+
ZodMiniType.init(inst, def);
|
|
3797
2087
|
});
|
|
3798
2088
|
function _default(innerType, defaultValue) {
|
|
3799
|
-
return new
|
|
2089
|
+
return new ZodMiniDefault({
|
|
3800
2090
|
type: "default",
|
|
3801
2091
|
innerType,
|
|
3802
2092
|
get defaultValue() {
|
|
@@ -3804,83 +2094,6 @@ function _default(innerType, defaultValue) {
|
|
|
3804
2094
|
}
|
|
3805
2095
|
});
|
|
3806
2096
|
}
|
|
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());
|
|
3884
2097
|
|
|
3885
2098
|
// ../config/src/constants.ts
|
|
3886
2099
|
var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
|
|
@@ -5493,15 +3706,15 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
5493
3706
|
await workspaceConfigSchema.parseAsync(configInput)
|
|
5494
3707
|
);
|
|
5495
3708
|
result.workspaceRoot ??= _workspaceRoot;
|
|
5496
|
-
} catch (
|
|
3709
|
+
} catch (error) {
|
|
5497
3710
|
throw new Error(
|
|
5498
|
-
`Failed to parse Storm Workspace configuration${
|
|
3711
|
+
`Failed to parse Storm Workspace configuration${error?.message ? `: ${error.message}` : ""}
|
|
5499
3712
|
|
|
5500
3713
|
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${formatLogMessage(
|
|
5501
3714
|
configInput
|
|
5502
3715
|
)}`,
|
|
5503
3716
|
{
|
|
5504
|
-
cause:
|
|
3717
|
+
cause: error
|
|
5505
3718
|
}
|
|
5506
3719
|
);
|
|
5507
3720
|
}
|