@yawlabs/postgres-mcp 0.5.1 → 0.5.3
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/CHANGELOG.md +93 -0
- package/dist/index.js +1565 -725
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -79,12 +79,12 @@ var require_code = __commonJS({
|
|
|
79
79
|
return item === "" || item === '""';
|
|
80
80
|
}
|
|
81
81
|
get str() {
|
|
82
|
-
var
|
|
83
|
-
return (
|
|
82
|
+
var _a3;
|
|
83
|
+
return (_a3 = this._str) !== null && _a3 !== void 0 ? _a3 : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
|
|
84
84
|
}
|
|
85
85
|
get names() {
|
|
86
|
-
var
|
|
87
|
-
return (
|
|
86
|
+
var _a3;
|
|
87
|
+
return (_a3 = this._names) !== null && _a3 !== void 0 ? _a3 : this._names = this._items.reduce((names, c) => {
|
|
88
88
|
if (c instanceof Name)
|
|
89
89
|
names[c.str] = (names[c.str] || 0) + 1;
|
|
90
90
|
return names;
|
|
@@ -230,8 +230,8 @@ var require_scope = __commonJS({
|
|
|
230
230
|
return `${prefix}${ng.index++}`;
|
|
231
231
|
}
|
|
232
232
|
_nameGroup(prefix) {
|
|
233
|
-
var
|
|
234
|
-
if (((_b = (
|
|
233
|
+
var _a3, _b;
|
|
234
|
+
if (((_b = (_a3 = this._parent) === null || _a3 === void 0 ? void 0 : _a3._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) {
|
|
235
235
|
throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
|
|
236
236
|
}
|
|
237
237
|
return this._names[prefix] = { prefix, index: 0 };
|
|
@@ -264,12 +264,12 @@ var require_scope = __commonJS({
|
|
|
264
264
|
return new ValueScopeName(prefix, this._newName(prefix));
|
|
265
265
|
}
|
|
266
266
|
value(nameOrPrefix, value) {
|
|
267
|
-
var
|
|
267
|
+
var _a3;
|
|
268
268
|
if (value.ref === void 0)
|
|
269
269
|
throw new Error("CodeGen: ref must be passed in value");
|
|
270
270
|
const name = this.toName(nameOrPrefix);
|
|
271
271
|
const { prefix } = name;
|
|
272
|
-
const valueKey = (
|
|
272
|
+
const valueKey = (_a3 = value.key) !== null && _a3 !== void 0 ? _a3 : value.ref;
|
|
273
273
|
let vs = this._values[prefix];
|
|
274
274
|
if (vs) {
|
|
275
275
|
const _name = vs.get(valueKey);
|
|
@@ -476,9 +476,9 @@ var require_codegen = __commonJS({
|
|
|
476
476
|
}
|
|
477
477
|
};
|
|
478
478
|
var Throw = class extends Node {
|
|
479
|
-
constructor(
|
|
479
|
+
constructor(error51) {
|
|
480
480
|
super();
|
|
481
|
-
this.error =
|
|
481
|
+
this.error = error51;
|
|
482
482
|
}
|
|
483
483
|
render({ _n }) {
|
|
484
484
|
return `throw ${this.error};` + _n;
|
|
@@ -587,8 +587,8 @@ var require_codegen = __commonJS({
|
|
|
587
587
|
return this;
|
|
588
588
|
}
|
|
589
589
|
optimizeNames(names, constants) {
|
|
590
|
-
var
|
|
591
|
-
this.else = (
|
|
590
|
+
var _a3;
|
|
591
|
+
this.else = (_a3 = this.else) === null || _a3 === void 0 ? void 0 : _a3.optimizeNames(names, constants);
|
|
592
592
|
if (!(super.optimizeNames(names, constants) || this.else))
|
|
593
593
|
return;
|
|
594
594
|
this.condition = optimizeExpr(this.condition, names, constants);
|
|
@@ -692,16 +692,16 @@ var require_codegen = __commonJS({
|
|
|
692
692
|
return code;
|
|
693
693
|
}
|
|
694
694
|
optimizeNodes() {
|
|
695
|
-
var
|
|
695
|
+
var _a3, _b;
|
|
696
696
|
super.optimizeNodes();
|
|
697
|
-
(
|
|
697
|
+
(_a3 = this.catch) === null || _a3 === void 0 ? void 0 : _a3.optimizeNodes();
|
|
698
698
|
(_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();
|
|
699
699
|
return this;
|
|
700
700
|
}
|
|
701
701
|
optimizeNames(names, constants) {
|
|
702
|
-
var
|
|
702
|
+
var _a3, _b;
|
|
703
703
|
super.optimizeNames(names, constants);
|
|
704
|
-
(
|
|
704
|
+
(_a3 = this.catch) === null || _a3 === void 0 ? void 0 : _a3.optimizeNames(names, constants);
|
|
705
705
|
(_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);
|
|
706
706
|
return this;
|
|
707
707
|
}
|
|
@@ -715,9 +715,9 @@ var require_codegen = __commonJS({
|
|
|
715
715
|
}
|
|
716
716
|
};
|
|
717
717
|
var Catch = class extends BlockNode {
|
|
718
|
-
constructor(
|
|
718
|
+
constructor(error51) {
|
|
719
719
|
super();
|
|
720
|
-
this.error =
|
|
720
|
+
this.error = error51;
|
|
721
721
|
}
|
|
722
722
|
render(opts) {
|
|
723
723
|
return `catch(${this.error})` + super.render(opts);
|
|
@@ -908,9 +908,9 @@ var require_codegen = __commonJS({
|
|
|
908
908
|
this._blockNode(node);
|
|
909
909
|
this.code(tryBody);
|
|
910
910
|
if (catchCode) {
|
|
911
|
-
const
|
|
912
|
-
this._currNode = node.catch = new Catch(
|
|
913
|
-
catchCode(
|
|
911
|
+
const error51 = this.name("e");
|
|
912
|
+
this._currNode = node.catch = new Catch(error51);
|
|
913
|
+
catchCode(error51);
|
|
914
914
|
}
|
|
915
915
|
if (finallyCode) {
|
|
916
916
|
this._currNode = node.finally = new Finally();
|
|
@@ -919,8 +919,8 @@ var require_codegen = __commonJS({
|
|
|
919
919
|
return this._endBlockNode(Catch, Finally);
|
|
920
920
|
}
|
|
921
921
|
// `throw` statement
|
|
922
|
-
throw(
|
|
923
|
-
return this._leafNode(new Throw(
|
|
922
|
+
throw(error51) {
|
|
923
|
+
return this._leafNode(new Throw(error51));
|
|
924
924
|
}
|
|
925
925
|
// start self-balancing block
|
|
926
926
|
block(body, nodeCount) {
|
|
@@ -1276,10 +1276,10 @@ var require_errors = __commonJS({
|
|
|
1276
1276
|
exports.keyword$DataError = {
|
|
1277
1277
|
message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)`
|
|
1278
1278
|
};
|
|
1279
|
-
function reportError(cxt,
|
|
1279
|
+
function reportError(cxt, error51 = exports.keywordError, errorPaths, overrideAllErrors) {
|
|
1280
1280
|
const { it } = cxt;
|
|
1281
1281
|
const { gen, compositeRule, allErrors } = it;
|
|
1282
|
-
const errObj = errorObjectCode(cxt,
|
|
1282
|
+
const errObj = errorObjectCode(cxt, error51, errorPaths);
|
|
1283
1283
|
if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) {
|
|
1284
1284
|
addError(gen, errObj);
|
|
1285
1285
|
} else {
|
|
@@ -1287,10 +1287,10 @@ var require_errors = __commonJS({
|
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
1289
1289
|
exports.reportError = reportError;
|
|
1290
|
-
function reportExtraError(cxt,
|
|
1290
|
+
function reportExtraError(cxt, error51 = exports.keywordError, errorPaths) {
|
|
1291
1291
|
const { it } = cxt;
|
|
1292
1292
|
const { gen, compositeRule, allErrors } = it;
|
|
1293
|
-
const errObj = errorObjectCode(cxt,
|
|
1293
|
+
const errObj = errorObjectCode(cxt, error51, errorPaths);
|
|
1294
1294
|
addError(gen, errObj);
|
|
1295
1295
|
if (!(compositeRule || allErrors)) {
|
|
1296
1296
|
returnErrors(it, names_1.default.vErrors);
|
|
@@ -1341,19 +1341,19 @@ var require_errors = __commonJS({
|
|
|
1341
1341
|
schema: new codegen_1.Name("schema"),
|
|
1342
1342
|
parentSchema: new codegen_1.Name("parentSchema")
|
|
1343
1343
|
};
|
|
1344
|
-
function errorObjectCode(cxt,
|
|
1344
|
+
function errorObjectCode(cxt, error51, errorPaths) {
|
|
1345
1345
|
const { createErrors } = cxt.it;
|
|
1346
1346
|
if (createErrors === false)
|
|
1347
1347
|
return (0, codegen_1._)`{}`;
|
|
1348
|
-
return errorObject(cxt,
|
|
1348
|
+
return errorObject(cxt, error51, errorPaths);
|
|
1349
1349
|
}
|
|
1350
|
-
function errorObject(cxt,
|
|
1350
|
+
function errorObject(cxt, error51, errorPaths = {}) {
|
|
1351
1351
|
const { gen, it } = cxt;
|
|
1352
1352
|
const keyValues = [
|
|
1353
1353
|
errorInstancePath(it, errorPaths),
|
|
1354
1354
|
errorSchemaPath(cxt, errorPaths)
|
|
1355
1355
|
];
|
|
1356
|
-
extraErrorProps(cxt,
|
|
1356
|
+
extraErrorProps(cxt, error51, keyValues);
|
|
1357
1357
|
return gen.object(...keyValues);
|
|
1358
1358
|
}
|
|
1359
1359
|
function errorInstancePath({ errorPath }, { instancePath }) {
|
|
@@ -1481,8 +1481,8 @@ var require_applicability = __commonJS({
|
|
|
1481
1481
|
}
|
|
1482
1482
|
exports.shouldUseGroup = shouldUseGroup;
|
|
1483
1483
|
function shouldUseRule(schema, rule) {
|
|
1484
|
-
var
|
|
1485
|
-
return schema[rule.keyword] !== void 0 || ((
|
|
1484
|
+
var _a3;
|
|
1485
|
+
return schema[rule.keyword] !== void 0 || ((_a3 = rule.definition.implements) === null || _a3 === void 0 ? void 0 : _a3.some((kwd) => schema[kwd] !== void 0));
|
|
1486
1486
|
}
|
|
1487
1487
|
exports.shouldUseRule = shouldUseRule;
|
|
1488
1488
|
}
|
|
@@ -1870,14 +1870,14 @@ var require_keyword = __commonJS({
|
|
|
1870
1870
|
}
|
|
1871
1871
|
exports.macroKeywordCode = macroKeywordCode;
|
|
1872
1872
|
function funcKeywordCode(cxt, def) {
|
|
1873
|
-
var
|
|
1873
|
+
var _a3;
|
|
1874
1874
|
const { gen, keyword, schema, parentSchema, $data, it } = cxt;
|
|
1875
1875
|
checkAsyncKeyword(it, def);
|
|
1876
1876
|
const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
|
|
1877
1877
|
const validateRef = useKeyword(gen, keyword, validate);
|
|
1878
1878
|
const valid = gen.let("valid");
|
|
1879
1879
|
cxt.block$data(valid, validateKeyword);
|
|
1880
|
-
cxt.ok((
|
|
1880
|
+
cxt.ok((_a3 = def.valid) !== null && _a3 !== void 0 ? _a3 : valid);
|
|
1881
1881
|
function validateKeyword() {
|
|
1882
1882
|
if (def.errors === false) {
|
|
1883
1883
|
assignValid();
|
|
@@ -1908,8 +1908,8 @@ var require_keyword = __commonJS({
|
|
|
1908
1908
|
gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
|
|
1909
1909
|
}
|
|
1910
1910
|
function reportErrs(errors) {
|
|
1911
|
-
var
|
|
1912
|
-
gen.if((0, codegen_1.not)((
|
|
1911
|
+
var _a4;
|
|
1912
|
+
gen.if((0, codegen_1.not)((_a4 = def.valid) !== null && _a4 !== void 0 ? _a4 : valid), errors);
|
|
1913
1913
|
}
|
|
1914
1914
|
}
|
|
1915
1915
|
exports.funcKeywordCode = funcKeywordCode;
|
|
@@ -2877,7 +2877,7 @@ var require_compile = __commonJS({
|
|
|
2877
2877
|
var validate_1 = require_validate();
|
|
2878
2878
|
var SchemaEnv = class {
|
|
2879
2879
|
constructor(env) {
|
|
2880
|
-
var
|
|
2880
|
+
var _a3;
|
|
2881
2881
|
this.refs = {};
|
|
2882
2882
|
this.dynamicAnchors = {};
|
|
2883
2883
|
let schema;
|
|
@@ -2886,7 +2886,7 @@ var require_compile = __commonJS({
|
|
|
2886
2886
|
this.schema = env.schema;
|
|
2887
2887
|
this.schemaId = env.schemaId;
|
|
2888
2888
|
this.root = env.root || this;
|
|
2889
|
-
this.baseId = (
|
|
2889
|
+
this.baseId = (_a3 = env.baseId) !== null && _a3 !== void 0 ? _a3 : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
|
|
2890
2890
|
this.schemaPath = env.schemaPath;
|
|
2891
2891
|
this.localRefs = env.localRefs;
|
|
2892
2892
|
this.meta = env.meta;
|
|
@@ -2982,14 +2982,14 @@ var require_compile = __commonJS({
|
|
|
2982
2982
|
}
|
|
2983
2983
|
exports.compileSchema = compileSchema;
|
|
2984
2984
|
function resolveRef2(root, baseId, ref) {
|
|
2985
|
-
var
|
|
2985
|
+
var _a3;
|
|
2986
2986
|
ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
|
|
2987
2987
|
const schOrFunc = root.refs[ref];
|
|
2988
2988
|
if (schOrFunc)
|
|
2989
2989
|
return schOrFunc;
|
|
2990
2990
|
let _sch = resolve.call(this, root, ref);
|
|
2991
2991
|
if (_sch === void 0) {
|
|
2992
|
-
const schema = (
|
|
2992
|
+
const schema = (_a3 = root.localRefs) === null || _a3 === void 0 ? void 0 : _a3[ref];
|
|
2993
2993
|
const { schemaId } = this.opts;
|
|
2994
2994
|
if (schema)
|
|
2995
2995
|
_sch = new SchemaEnv({ schema, schemaId, root, baseId });
|
|
@@ -3058,8 +3058,8 @@ var require_compile = __commonJS({
|
|
|
3058
3058
|
"definitions"
|
|
3059
3059
|
]);
|
|
3060
3060
|
function getJsonPointer(parsedRef, { baseId, schema, root }) {
|
|
3061
|
-
var
|
|
3062
|
-
if (((
|
|
3061
|
+
var _a3;
|
|
3062
|
+
if (((_a3 = parsedRef.fragment) === null || _a3 === void 0 ? void 0 : _a3[0]) !== "/")
|
|
3063
3063
|
return;
|
|
3064
3064
|
for (const part of parsedRef.fragment.slice(1).split("/")) {
|
|
3065
3065
|
if (typeof schema === "boolean")
|
|
@@ -3112,6 +3112,9 @@ var require_utils = __commonJS({
|
|
|
3112
3112
|
"use strict";
|
|
3113
3113
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
3114
3114
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
3115
|
+
var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
|
|
3116
|
+
var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
|
|
3117
|
+
var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
|
|
3115
3118
|
function stringArrayToHexStripped(input) {
|
|
3116
3119
|
let acc = "";
|
|
3117
3120
|
let code = 0;
|
|
@@ -3304,27 +3307,77 @@ var require_utils = __commonJS({
|
|
|
3304
3307
|
}
|
|
3305
3308
|
return output.join("");
|
|
3306
3309
|
}
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3310
|
+
var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
|
|
3311
|
+
var HOST_DELIM_RE = /[@/?#:]/g;
|
|
3312
|
+
var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
|
|
3313
|
+
function reescapeHostDelimiters(host, isIP) {
|
|
3314
|
+
const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
|
|
3315
|
+
re.lastIndex = 0;
|
|
3316
|
+
return host.replace(re, (ch) => HOST_DELIMS[ch]);
|
|
3317
|
+
}
|
|
3318
|
+
function normalizePercentEncoding(input, decodeUnreserved = false) {
|
|
3319
|
+
if (input.indexOf("%") === -1) {
|
|
3320
|
+
return input;
|
|
3317
3321
|
}
|
|
3318
|
-
|
|
3319
|
-
|
|
3322
|
+
let output = "";
|
|
3323
|
+
for (let i = 0; i < input.length; i++) {
|
|
3324
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
3325
|
+
const hex3 = input.slice(i + 1, i + 3);
|
|
3326
|
+
if (isHexPair(hex3)) {
|
|
3327
|
+
const normalizedHex = hex3.toUpperCase();
|
|
3328
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
3329
|
+
if (decodeUnreserved && isUnreserved(decoded)) {
|
|
3330
|
+
output += decoded;
|
|
3331
|
+
} else {
|
|
3332
|
+
output += "%" + normalizedHex;
|
|
3333
|
+
}
|
|
3334
|
+
i += 2;
|
|
3335
|
+
continue;
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
output += input[i];
|
|
3320
3339
|
}
|
|
3321
|
-
|
|
3322
|
-
|
|
3340
|
+
return output;
|
|
3341
|
+
}
|
|
3342
|
+
function normalizePathEncoding(input) {
|
|
3343
|
+
let output = "";
|
|
3344
|
+
for (let i = 0; i < input.length; i++) {
|
|
3345
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
3346
|
+
const hex3 = input.slice(i + 1, i + 3);
|
|
3347
|
+
if (isHexPair(hex3)) {
|
|
3348
|
+
const normalizedHex = hex3.toUpperCase();
|
|
3349
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
|
|
3350
|
+
if (decoded !== "." && isUnreserved(decoded)) {
|
|
3351
|
+
output += decoded;
|
|
3352
|
+
} else {
|
|
3353
|
+
output += "%" + normalizedHex;
|
|
3354
|
+
}
|
|
3355
|
+
i += 2;
|
|
3356
|
+
continue;
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
if (isPathCharacter(input[i])) {
|
|
3360
|
+
output += input[i];
|
|
3361
|
+
} else {
|
|
3362
|
+
output += escape(input[i]);
|
|
3363
|
+
}
|
|
3323
3364
|
}
|
|
3324
|
-
|
|
3325
|
-
|
|
3365
|
+
return output;
|
|
3366
|
+
}
|
|
3367
|
+
function escapePreservingEscapes(input) {
|
|
3368
|
+
let output = "";
|
|
3369
|
+
for (let i = 0; i < input.length; i++) {
|
|
3370
|
+
if (input[i] === "%" && i + 2 < input.length) {
|
|
3371
|
+
const hex3 = input.slice(i + 1, i + 3);
|
|
3372
|
+
if (isHexPair(hex3)) {
|
|
3373
|
+
output += "%" + hex3.toUpperCase();
|
|
3374
|
+
i += 2;
|
|
3375
|
+
continue;
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3378
|
+
output += escape(input[i]);
|
|
3326
3379
|
}
|
|
3327
|
-
return
|
|
3380
|
+
return output;
|
|
3328
3381
|
}
|
|
3329
3382
|
function recomposeAuthority(component) {
|
|
3330
3383
|
const uriTokens = [];
|
|
@@ -3339,7 +3392,7 @@ var require_utils = __commonJS({
|
|
|
3339
3392
|
if (ipV6res.isIPV6 === true) {
|
|
3340
3393
|
host = `[${ipV6res.escapedHost}]`;
|
|
3341
3394
|
} else {
|
|
3342
|
-
host =
|
|
3395
|
+
host = reescapeHostDelimiters(host, false);
|
|
3343
3396
|
}
|
|
3344
3397
|
}
|
|
3345
3398
|
uriTokens.push(host);
|
|
@@ -3353,7 +3406,10 @@ var require_utils = __commonJS({
|
|
|
3353
3406
|
module.exports = {
|
|
3354
3407
|
nonSimpleDomain,
|
|
3355
3408
|
recomposeAuthority,
|
|
3356
|
-
|
|
3409
|
+
reescapeHostDelimiters,
|
|
3410
|
+
normalizePercentEncoding,
|
|
3411
|
+
normalizePathEncoding,
|
|
3412
|
+
escapePreservingEscapes,
|
|
3357
3413
|
removeDotSegments,
|
|
3358
3414
|
isIPv4,
|
|
3359
3415
|
isUUID,
|
|
@@ -3577,12 +3633,12 @@ var require_schemes = __commonJS({
|
|
|
3577
3633
|
var require_fast_uri = __commonJS({
|
|
3578
3634
|
"node_modules/fast-uri/index.js"(exports, module) {
|
|
3579
3635
|
"use strict";
|
|
3580
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority,
|
|
3636
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
3581
3637
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
3582
3638
|
function normalize(uri, options) {
|
|
3583
3639
|
if (typeof uri === "string") {
|
|
3584
3640
|
uri = /** @type {T} */
|
|
3585
|
-
|
|
3641
|
+
normalizeString(uri, options);
|
|
3586
3642
|
} else if (typeof uri === "object") {
|
|
3587
3643
|
uri = /** @type {T} */
|
|
3588
3644
|
parse3(serialize(uri, options), options);
|
|
@@ -3649,19 +3705,9 @@ var require_fast_uri = __commonJS({
|
|
|
3649
3705
|
return target;
|
|
3650
3706
|
}
|
|
3651
3707
|
function equal(uriA, uriB, options) {
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
} else if (typeof uriA === "object") {
|
|
3656
|
-
uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
|
|
3657
|
-
}
|
|
3658
|
-
if (typeof uriB === "string") {
|
|
3659
|
-
uriB = unescape(uriB);
|
|
3660
|
-
uriB = serialize(normalizeComponentEncoding(parse3(uriB, options), true), { ...options, skipEscape: true });
|
|
3661
|
-
} else if (typeof uriB === "object") {
|
|
3662
|
-
uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
|
|
3663
|
-
}
|
|
3664
|
-
return uriA.toLowerCase() === uriB.toLowerCase();
|
|
3708
|
+
const normalizedA = normalizeComparableURI(uriA, options);
|
|
3709
|
+
const normalizedB = normalizeComparableURI(uriB, options);
|
|
3710
|
+
return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
|
|
3665
3711
|
}
|
|
3666
3712
|
function serialize(cmpts, opts) {
|
|
3667
3713
|
const component = {
|
|
@@ -3686,12 +3732,12 @@ var require_fast_uri = __commonJS({
|
|
|
3686
3732
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
3687
3733
|
if (component.path !== void 0) {
|
|
3688
3734
|
if (!options.skipEscape) {
|
|
3689
|
-
component.path =
|
|
3735
|
+
component.path = escapePreservingEscapes(component.path);
|
|
3690
3736
|
if (component.scheme !== void 0) {
|
|
3691
3737
|
component.path = component.path.split("%3A").join(":");
|
|
3692
3738
|
}
|
|
3693
3739
|
} else {
|
|
3694
|
-
component.path =
|
|
3740
|
+
component.path = normalizePercentEncoding(component.path);
|
|
3695
3741
|
}
|
|
3696
3742
|
}
|
|
3697
3743
|
if (options.reference !== "suffix" && component.scheme) {
|
|
@@ -3726,7 +3772,16 @@ var require_fast_uri = __commonJS({
|
|
|
3726
3772
|
return uriTokens.join("");
|
|
3727
3773
|
}
|
|
3728
3774
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
3729
|
-
function
|
|
3775
|
+
function getParseError(parsed, matches) {
|
|
3776
|
+
if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
|
|
3777
|
+
return 'URI path must start with "/" when authority is present.';
|
|
3778
|
+
}
|
|
3779
|
+
if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
|
|
3780
|
+
return "URI port is malformed.";
|
|
3781
|
+
}
|
|
3782
|
+
return void 0;
|
|
3783
|
+
}
|
|
3784
|
+
function parseWithStatus(uri, opts) {
|
|
3730
3785
|
const options = Object.assign({}, opts);
|
|
3731
3786
|
const parsed = {
|
|
3732
3787
|
scheme: void 0,
|
|
@@ -3737,6 +3792,7 @@ var require_fast_uri = __commonJS({
|
|
|
3737
3792
|
query: void 0,
|
|
3738
3793
|
fragment: void 0
|
|
3739
3794
|
};
|
|
3795
|
+
let malformedAuthorityOrPort = false;
|
|
3740
3796
|
let isIP = false;
|
|
3741
3797
|
if (options.reference === "suffix") {
|
|
3742
3798
|
if (options.scheme) {
|
|
@@ -3757,6 +3813,11 @@ var require_fast_uri = __commonJS({
|
|
|
3757
3813
|
if (isNaN(parsed.port)) {
|
|
3758
3814
|
parsed.port = matches[5];
|
|
3759
3815
|
}
|
|
3816
|
+
const parseError = getParseError(parsed, matches);
|
|
3817
|
+
if (parseError !== void 0) {
|
|
3818
|
+
parsed.error = parsed.error || parseError;
|
|
3819
|
+
malformedAuthorityOrPort = true;
|
|
3820
|
+
}
|
|
3760
3821
|
if (parsed.host) {
|
|
3761
3822
|
const ipv4result = isIPv4(parsed.host);
|
|
3762
3823
|
if (ipv4result === false) {
|
|
@@ -3795,14 +3856,18 @@ var require_fast_uri = __commonJS({
|
|
|
3795
3856
|
parsed.scheme = unescape(parsed.scheme);
|
|
3796
3857
|
}
|
|
3797
3858
|
if (parsed.host !== void 0) {
|
|
3798
|
-
parsed.host = unescape(parsed.host);
|
|
3859
|
+
parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
|
|
3799
3860
|
}
|
|
3800
3861
|
}
|
|
3801
3862
|
if (parsed.path) {
|
|
3802
|
-
parsed.path =
|
|
3863
|
+
parsed.path = normalizePathEncoding(parsed.path);
|
|
3803
3864
|
}
|
|
3804
3865
|
if (parsed.fragment) {
|
|
3805
|
-
|
|
3866
|
+
try {
|
|
3867
|
+
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
3868
|
+
} catch {
|
|
3869
|
+
parsed.error = parsed.error || "URI malformed";
|
|
3870
|
+
}
|
|
3806
3871
|
}
|
|
3807
3872
|
}
|
|
3808
3873
|
if (schemeHandler && schemeHandler.parse) {
|
|
@@ -3811,7 +3876,29 @@ var require_fast_uri = __commonJS({
|
|
|
3811
3876
|
} else {
|
|
3812
3877
|
parsed.error = parsed.error || "URI can not be parsed.";
|
|
3813
3878
|
}
|
|
3814
|
-
return parsed;
|
|
3879
|
+
return { parsed, malformedAuthorityOrPort };
|
|
3880
|
+
}
|
|
3881
|
+
function parse3(uri, opts) {
|
|
3882
|
+
return parseWithStatus(uri, opts).parsed;
|
|
3883
|
+
}
|
|
3884
|
+
function normalizeString(uri, opts) {
|
|
3885
|
+
return normalizeStringWithStatus(uri, opts).normalized;
|
|
3886
|
+
}
|
|
3887
|
+
function normalizeStringWithStatus(uri, opts) {
|
|
3888
|
+
const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
|
|
3889
|
+
return {
|
|
3890
|
+
normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
|
|
3891
|
+
malformedAuthorityOrPort
|
|
3892
|
+
};
|
|
3893
|
+
}
|
|
3894
|
+
function normalizeComparableURI(uri, opts) {
|
|
3895
|
+
if (typeof uri === "string") {
|
|
3896
|
+
const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
|
|
3897
|
+
return malformedAuthorityOrPort ? void 0 : normalized;
|
|
3898
|
+
}
|
|
3899
|
+
if (typeof uri === "object") {
|
|
3900
|
+
return serialize(uri, opts);
|
|
3901
|
+
}
|
|
3815
3902
|
}
|
|
3816
3903
|
var fastUri = {
|
|
3817
3904
|
SCHEMES,
|
|
@@ -3920,9 +4007,9 @@ var require_core = __commonJS({
|
|
|
3920
4007
|
};
|
|
3921
4008
|
var MAX_EXPRESSION = 200;
|
|
3922
4009
|
function requiredOptions(o) {
|
|
3923
|
-
var
|
|
4010
|
+
var _a3, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
3924
4011
|
const s = o.strict;
|
|
3925
|
-
const _optz = (
|
|
4012
|
+
const _optz = (_a3 = o.code) === null || _a3 === void 0 ? void 0 : _a3.optimize;
|
|
3926
4013
|
const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;
|
|
3927
4014
|
const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;
|
|
3928
4015
|
const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;
|
|
@@ -4396,7 +4483,7 @@ var require_core = __commonJS({
|
|
|
4396
4483
|
}
|
|
4397
4484
|
}
|
|
4398
4485
|
function addRule(keyword, definition, dataType) {
|
|
4399
|
-
var
|
|
4486
|
+
var _a3;
|
|
4400
4487
|
const post = definition === null || definition === void 0 ? void 0 : definition.post;
|
|
4401
4488
|
if (dataType && post)
|
|
4402
4489
|
throw new Error('keyword with "post" flag cannot have "type"');
|
|
@@ -4422,7 +4509,7 @@ var require_core = __commonJS({
|
|
|
4422
4509
|
else
|
|
4423
4510
|
ruleGroup.rules.push(rule);
|
|
4424
4511
|
RULES.all[keyword] = rule;
|
|
4425
|
-
(
|
|
4512
|
+
(_a3 = definition.implements) === null || _a3 === void 0 ? void 0 : _a3.forEach((kwd) => this.addKeyword(kwd));
|
|
4426
4513
|
}
|
|
4427
4514
|
function addBeforeRule(ruleGroup, rule, before) {
|
|
4428
4515
|
const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
|
|
@@ -4556,10 +4643,10 @@ var require_ref = __commonJS({
|
|
|
4556
4643
|
gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
|
|
4557
4644
|
}
|
|
4558
4645
|
function addEvaluatedFrom(source) {
|
|
4559
|
-
var
|
|
4646
|
+
var _a3;
|
|
4560
4647
|
if (!it.opts.unevaluated)
|
|
4561
4648
|
return;
|
|
4562
|
-
const schEvaluated = (
|
|
4649
|
+
const schEvaluated = (_a3 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a3 === void 0 ? void 0 : _a3.evaluated;
|
|
4563
4650
|
if (it.props !== true) {
|
|
4564
4651
|
if (schEvaluated && !schEvaluated.dynamicProps) {
|
|
4565
4652
|
if (schEvaluated.props !== void 0) {
|
|
@@ -4621,7 +4708,7 @@ var require_limitNumber = __commonJS({
|
|
|
4621
4708
|
exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
|
|
4622
4709
|
exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
|
|
4623
4710
|
};
|
|
4624
|
-
var
|
|
4711
|
+
var error51 = {
|
|
4625
4712
|
message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
4626
4713
|
params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
|
|
4627
4714
|
};
|
|
@@ -4630,7 +4717,7 @@ var require_limitNumber = __commonJS({
|
|
|
4630
4717
|
type: "number",
|
|
4631
4718
|
schemaType: "number",
|
|
4632
4719
|
$data: true,
|
|
4633
|
-
error:
|
|
4720
|
+
error: error51,
|
|
4634
4721
|
code(cxt) {
|
|
4635
4722
|
const { keyword, data, schemaCode } = cxt;
|
|
4636
4723
|
cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);
|
|
@@ -4646,7 +4733,7 @@ var require_multipleOf = __commonJS({
|
|
|
4646
4733
|
"use strict";
|
|
4647
4734
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4648
4735
|
var codegen_1 = require_codegen();
|
|
4649
|
-
var
|
|
4736
|
+
var error51 = {
|
|
4650
4737
|
message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
|
|
4651
4738
|
params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`
|
|
4652
4739
|
};
|
|
@@ -4655,7 +4742,7 @@ var require_multipleOf = __commonJS({
|
|
|
4655
4742
|
type: "number",
|
|
4656
4743
|
schemaType: "number",
|
|
4657
4744
|
$data: true,
|
|
4658
|
-
error:
|
|
4745
|
+
error: error51,
|
|
4659
4746
|
code(cxt) {
|
|
4660
4747
|
const { gen, data, schemaCode, it } = cxt;
|
|
4661
4748
|
const prec = it.opts.multipleOfPrecision;
|
|
@@ -4702,7 +4789,7 @@ var require_limitLength = __commonJS({
|
|
|
4702
4789
|
var codegen_1 = require_codegen();
|
|
4703
4790
|
var util_1 = require_util();
|
|
4704
4791
|
var ucs2length_1 = require_ucs2length();
|
|
4705
|
-
var
|
|
4792
|
+
var error51 = {
|
|
4706
4793
|
message({ keyword, schemaCode }) {
|
|
4707
4794
|
const comp = keyword === "maxLength" ? "more" : "fewer";
|
|
4708
4795
|
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;
|
|
@@ -4714,7 +4801,7 @@ var require_limitLength = __commonJS({
|
|
|
4714
4801
|
type: "string",
|
|
4715
4802
|
schemaType: "number",
|
|
4716
4803
|
$data: true,
|
|
4717
|
-
error:
|
|
4804
|
+
error: error51,
|
|
4718
4805
|
code(cxt) {
|
|
4719
4806
|
const { keyword, data, schemaCode, it } = cxt;
|
|
4720
4807
|
const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT;
|
|
@@ -4734,7 +4821,7 @@ var require_pattern = __commonJS({
|
|
|
4734
4821
|
var code_1 = require_code2();
|
|
4735
4822
|
var util_1 = require_util();
|
|
4736
4823
|
var codegen_1 = require_codegen();
|
|
4737
|
-
var
|
|
4824
|
+
var error51 = {
|
|
4738
4825
|
message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
|
|
4739
4826
|
params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`
|
|
4740
4827
|
};
|
|
@@ -4743,7 +4830,7 @@ var require_pattern = __commonJS({
|
|
|
4743
4830
|
type: "string",
|
|
4744
4831
|
schemaType: "string",
|
|
4745
4832
|
$data: true,
|
|
4746
|
-
error:
|
|
4833
|
+
error: error51,
|
|
4747
4834
|
code(cxt) {
|
|
4748
4835
|
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
4749
4836
|
const u = it.opts.unicodeRegExp ? "u" : "";
|
|
@@ -4769,7 +4856,7 @@ var require_limitProperties = __commonJS({
|
|
|
4769
4856
|
"use strict";
|
|
4770
4857
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4771
4858
|
var codegen_1 = require_codegen();
|
|
4772
|
-
var
|
|
4859
|
+
var error51 = {
|
|
4773
4860
|
message({ keyword, schemaCode }) {
|
|
4774
4861
|
const comp = keyword === "maxProperties" ? "more" : "fewer";
|
|
4775
4862
|
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;
|
|
@@ -4781,7 +4868,7 @@ var require_limitProperties = __commonJS({
|
|
|
4781
4868
|
type: "object",
|
|
4782
4869
|
schemaType: "number",
|
|
4783
4870
|
$data: true,
|
|
4784
|
-
error:
|
|
4871
|
+
error: error51,
|
|
4785
4872
|
code(cxt) {
|
|
4786
4873
|
const { keyword, data, schemaCode } = cxt;
|
|
4787
4874
|
const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT;
|
|
@@ -4800,7 +4887,7 @@ var require_required = __commonJS({
|
|
|
4800
4887
|
var code_1 = require_code2();
|
|
4801
4888
|
var codegen_1 = require_codegen();
|
|
4802
4889
|
var util_1 = require_util();
|
|
4803
|
-
var
|
|
4890
|
+
var error51 = {
|
|
4804
4891
|
message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,
|
|
4805
4892
|
params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`
|
|
4806
4893
|
};
|
|
@@ -4809,7 +4896,7 @@ var require_required = __commonJS({
|
|
|
4809
4896
|
type: "object",
|
|
4810
4897
|
schemaType: "array",
|
|
4811
4898
|
$data: true,
|
|
4812
|
-
error:
|
|
4899
|
+
error: error51,
|
|
4813
4900
|
code(cxt) {
|
|
4814
4901
|
const { gen, schema, schemaCode, data, $data, it } = cxt;
|
|
4815
4902
|
const { opts } = it;
|
|
@@ -4880,7 +4967,7 @@ var require_limitItems = __commonJS({
|
|
|
4880
4967
|
"use strict";
|
|
4881
4968
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4882
4969
|
var codegen_1 = require_codegen();
|
|
4883
|
-
var
|
|
4970
|
+
var error51 = {
|
|
4884
4971
|
message({ keyword, schemaCode }) {
|
|
4885
4972
|
const comp = keyword === "maxItems" ? "more" : "fewer";
|
|
4886
4973
|
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;
|
|
@@ -4892,7 +4979,7 @@ var require_limitItems = __commonJS({
|
|
|
4892
4979
|
type: "array",
|
|
4893
4980
|
schemaType: "number",
|
|
4894
4981
|
$data: true,
|
|
4895
|
-
error:
|
|
4982
|
+
error: error51,
|
|
4896
4983
|
code(cxt) {
|
|
4897
4984
|
const { keyword, data, schemaCode } = cxt;
|
|
4898
4985
|
const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT;
|
|
@@ -4923,7 +5010,7 @@ var require_uniqueItems = __commonJS({
|
|
|
4923
5010
|
var codegen_1 = require_codegen();
|
|
4924
5011
|
var util_1 = require_util();
|
|
4925
5012
|
var equal_1 = require_equal();
|
|
4926
|
-
var
|
|
5013
|
+
var error51 = {
|
|
4927
5014
|
message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
|
|
4928
5015
|
params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`
|
|
4929
5016
|
};
|
|
@@ -4932,7 +5019,7 @@ var require_uniqueItems = __commonJS({
|
|
|
4932
5019
|
type: "array",
|
|
4933
5020
|
schemaType: "boolean",
|
|
4934
5021
|
$data: true,
|
|
4935
|
-
error:
|
|
5022
|
+
error: error51,
|
|
4936
5023
|
code(cxt) {
|
|
4937
5024
|
const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;
|
|
4938
5025
|
if (!$data && !schema)
|
|
@@ -4989,14 +5076,14 @@ var require_const = __commonJS({
|
|
|
4989
5076
|
var codegen_1 = require_codegen();
|
|
4990
5077
|
var util_1 = require_util();
|
|
4991
5078
|
var equal_1 = require_equal();
|
|
4992
|
-
var
|
|
5079
|
+
var error51 = {
|
|
4993
5080
|
message: "must be equal to constant",
|
|
4994
5081
|
params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`
|
|
4995
5082
|
};
|
|
4996
5083
|
var def = {
|
|
4997
5084
|
keyword: "const",
|
|
4998
5085
|
$data: true,
|
|
4999
|
-
error:
|
|
5086
|
+
error: error51,
|
|
5000
5087
|
code(cxt) {
|
|
5001
5088
|
const { gen, data, $data, schemaCode, schema } = cxt;
|
|
5002
5089
|
if ($data || schema && typeof schema == "object") {
|
|
@@ -5018,7 +5105,7 @@ var require_enum = __commonJS({
|
|
|
5018
5105
|
var codegen_1 = require_codegen();
|
|
5019
5106
|
var util_1 = require_util();
|
|
5020
5107
|
var equal_1 = require_equal();
|
|
5021
|
-
var
|
|
5108
|
+
var error51 = {
|
|
5022
5109
|
message: "must be equal to one of the allowed values",
|
|
5023
5110
|
params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
|
|
5024
5111
|
};
|
|
@@ -5026,7 +5113,7 @@ var require_enum = __commonJS({
|
|
|
5026
5113
|
keyword: "enum",
|
|
5027
5114
|
schemaType: "array",
|
|
5028
5115
|
$data: true,
|
|
5029
|
-
error:
|
|
5116
|
+
error: error51,
|
|
5030
5117
|
code(cxt) {
|
|
5031
5118
|
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
5032
5119
|
if (!$data && schema.length === 0)
|
|
@@ -5105,7 +5192,7 @@ var require_additionalItems = __commonJS({
|
|
|
5105
5192
|
exports.validateAdditionalItems = void 0;
|
|
5106
5193
|
var codegen_1 = require_codegen();
|
|
5107
5194
|
var util_1 = require_util();
|
|
5108
|
-
var
|
|
5195
|
+
var error51 = {
|
|
5109
5196
|
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
5110
5197
|
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
|
|
5111
5198
|
};
|
|
@@ -5114,7 +5201,7 @@ var require_additionalItems = __commonJS({
|
|
|
5114
5201
|
type: "array",
|
|
5115
5202
|
schemaType: ["boolean", "object"],
|
|
5116
5203
|
before: "uniqueItems",
|
|
5117
|
-
error:
|
|
5204
|
+
error: error51,
|
|
5118
5205
|
code(cxt) {
|
|
5119
5206
|
const { parentSchema, it } = cxt;
|
|
5120
5207
|
const { items } = parentSchema;
|
|
@@ -5233,7 +5320,7 @@ var require_items2020 = __commonJS({
|
|
|
5233
5320
|
var util_1 = require_util();
|
|
5234
5321
|
var code_1 = require_code2();
|
|
5235
5322
|
var additionalItems_1 = require_additionalItems();
|
|
5236
|
-
var
|
|
5323
|
+
var error51 = {
|
|
5237
5324
|
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
5238
5325
|
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
|
|
5239
5326
|
};
|
|
@@ -5242,7 +5329,7 @@ var require_items2020 = __commonJS({
|
|
|
5242
5329
|
type: "array",
|
|
5243
5330
|
schemaType: ["object", "boolean"],
|
|
5244
5331
|
before: "uniqueItems",
|
|
5245
|
-
error:
|
|
5332
|
+
error: error51,
|
|
5246
5333
|
code(cxt) {
|
|
5247
5334
|
const { schema, parentSchema, it } = cxt;
|
|
5248
5335
|
const { prefixItems } = parentSchema;
|
|
@@ -5266,7 +5353,7 @@ var require_contains = __commonJS({
|
|
|
5266
5353
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5267
5354
|
var codegen_1 = require_codegen();
|
|
5268
5355
|
var util_1 = require_util();
|
|
5269
|
-
var
|
|
5356
|
+
var error51 = {
|
|
5270
5357
|
message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,
|
|
5271
5358
|
params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`
|
|
5272
5359
|
};
|
|
@@ -5276,7 +5363,7 @@ var require_contains = __commonJS({
|
|
|
5276
5363
|
schemaType: ["object", "boolean"],
|
|
5277
5364
|
before: "uniqueItems",
|
|
5278
5365
|
trackErrors: true,
|
|
5279
|
-
error:
|
|
5366
|
+
error: error51,
|
|
5280
5367
|
code(cxt) {
|
|
5281
5368
|
const { gen, schema, parentSchema, data, it } = cxt;
|
|
5282
5369
|
let min;
|
|
@@ -5454,7 +5541,7 @@ var require_propertyNames = __commonJS({
|
|
|
5454
5541
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5455
5542
|
var codegen_1 = require_codegen();
|
|
5456
5543
|
var util_1 = require_util();
|
|
5457
|
-
var
|
|
5544
|
+
var error51 = {
|
|
5458
5545
|
message: "property name must be valid",
|
|
5459
5546
|
params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`
|
|
5460
5547
|
};
|
|
@@ -5462,7 +5549,7 @@ var require_propertyNames = __commonJS({
|
|
|
5462
5549
|
keyword: "propertyNames",
|
|
5463
5550
|
type: "object",
|
|
5464
5551
|
schemaType: ["object", "boolean"],
|
|
5465
|
-
error:
|
|
5552
|
+
error: error51,
|
|
5466
5553
|
code(cxt) {
|
|
5467
5554
|
const { gen, schema, data, it } = cxt;
|
|
5468
5555
|
if ((0, util_1.alwaysValidSchema)(it, schema))
|
|
@@ -5499,7 +5586,7 @@ var require_additionalProperties = __commonJS({
|
|
|
5499
5586
|
var codegen_1 = require_codegen();
|
|
5500
5587
|
var names_1 = require_names();
|
|
5501
5588
|
var util_1 = require_util();
|
|
5502
|
-
var
|
|
5589
|
+
var error51 = {
|
|
5503
5590
|
message: "must NOT have additional properties",
|
|
5504
5591
|
params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`
|
|
5505
5592
|
};
|
|
@@ -5509,7 +5596,7 @@ var require_additionalProperties = __commonJS({
|
|
|
5509
5596
|
schemaType: ["boolean", "object"],
|
|
5510
5597
|
allowUndefined: true,
|
|
5511
5598
|
trackErrors: true,
|
|
5512
|
-
error:
|
|
5599
|
+
error: error51,
|
|
5513
5600
|
code(cxt) {
|
|
5514
5601
|
const { gen, schema, parentSchema, data, errsCount, it } = cxt;
|
|
5515
5602
|
if (!errsCount)
|
|
@@ -5783,7 +5870,7 @@ var require_oneOf = __commonJS({
|
|
|
5783
5870
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5784
5871
|
var codegen_1 = require_codegen();
|
|
5785
5872
|
var util_1 = require_util();
|
|
5786
|
-
var
|
|
5873
|
+
var error51 = {
|
|
5787
5874
|
message: "must match exactly one schema in oneOf",
|
|
5788
5875
|
params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`
|
|
5789
5876
|
};
|
|
@@ -5791,7 +5878,7 @@ var require_oneOf = __commonJS({
|
|
|
5791
5878
|
keyword: "oneOf",
|
|
5792
5879
|
schemaType: "array",
|
|
5793
5880
|
trackErrors: true,
|
|
5794
|
-
error:
|
|
5881
|
+
error: error51,
|
|
5795
5882
|
code(cxt) {
|
|
5796
5883
|
const { gen, schema, parentSchema, it } = cxt;
|
|
5797
5884
|
if (!Array.isArray(schema))
|
|
@@ -5868,7 +5955,7 @@ var require_if = __commonJS({
|
|
|
5868
5955
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5869
5956
|
var codegen_1 = require_codegen();
|
|
5870
5957
|
var util_1 = require_util();
|
|
5871
|
-
var
|
|
5958
|
+
var error51 = {
|
|
5872
5959
|
message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`,
|
|
5873
5960
|
params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`
|
|
5874
5961
|
};
|
|
@@ -5876,7 +5963,7 @@ var require_if = __commonJS({
|
|
|
5876
5963
|
keyword: "if",
|
|
5877
5964
|
schemaType: ["object", "boolean"],
|
|
5878
5965
|
trackErrors: true,
|
|
5879
|
-
error:
|
|
5966
|
+
error: error51,
|
|
5880
5967
|
code(cxt) {
|
|
5881
5968
|
const { gen, parentSchema, it } = cxt;
|
|
5882
5969
|
if (parentSchema.then === void 0 && parentSchema.else === void 0) {
|
|
@@ -6002,7 +6089,7 @@ var require_format = __commonJS({
|
|
|
6002
6089
|
"use strict";
|
|
6003
6090
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6004
6091
|
var codegen_1 = require_codegen();
|
|
6005
|
-
var
|
|
6092
|
+
var error51 = {
|
|
6006
6093
|
message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
|
|
6007
6094
|
params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`
|
|
6008
6095
|
};
|
|
@@ -6011,7 +6098,7 @@ var require_format = __commonJS({
|
|
|
6011
6098
|
type: ["number", "string"],
|
|
6012
6099
|
schemaType: "string",
|
|
6013
6100
|
$data: true,
|
|
6014
|
-
error:
|
|
6101
|
+
error: error51,
|
|
6015
6102
|
code(cxt, ruleType) {
|
|
6016
6103
|
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
6017
6104
|
const { opts, errSchemaPath, schemaEnv, self } = it;
|
|
@@ -6166,7 +6253,7 @@ var require_discriminator = __commonJS({
|
|
|
6166
6253
|
var compile_1 = require_compile();
|
|
6167
6254
|
var ref_error_1 = require_ref_error();
|
|
6168
6255
|
var util_1 = require_util();
|
|
6169
|
-
var
|
|
6256
|
+
var error51 = {
|
|
6170
6257
|
message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
|
|
6171
6258
|
params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`
|
|
6172
6259
|
};
|
|
@@ -6174,7 +6261,7 @@ var require_discriminator = __commonJS({
|
|
|
6174
6261
|
keyword: "discriminator",
|
|
6175
6262
|
type: "object",
|
|
6176
6263
|
schemaType: "object",
|
|
6177
|
-
error:
|
|
6264
|
+
error: error51,
|
|
6178
6265
|
code(cxt) {
|
|
6179
6266
|
const { gen, data, schema, parentSchema, it } = cxt;
|
|
6180
6267
|
const { oneOf } = parentSchema;
|
|
@@ -6210,7 +6297,7 @@ var require_discriminator = __commonJS({
|
|
|
6210
6297
|
return _valid;
|
|
6211
6298
|
}
|
|
6212
6299
|
function getMapping() {
|
|
6213
|
-
var
|
|
6300
|
+
var _a3;
|
|
6214
6301
|
const oneOfMapping = {};
|
|
6215
6302
|
const topRequired = hasRequired(parentSchema);
|
|
6216
6303
|
let tagRequired = true;
|
|
@@ -6224,7 +6311,7 @@ var require_discriminator = __commonJS({
|
|
|
6224
6311
|
if (sch === void 0)
|
|
6225
6312
|
throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
|
|
6226
6313
|
}
|
|
6227
|
-
const propSch = (
|
|
6314
|
+
const propSch = (_a3 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a3 === void 0 ? void 0 : _a3[tagName];
|
|
6228
6315
|
if (typeof propSch != "object") {
|
|
6229
6316
|
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
|
|
6230
6317
|
}
|
|
@@ -6706,7 +6793,7 @@ var require_limit = __commonJS({
|
|
|
6706
6793
|
formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
|
|
6707
6794
|
formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
|
|
6708
6795
|
};
|
|
6709
|
-
var
|
|
6796
|
+
var error51 = {
|
|
6710
6797
|
message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
6711
6798
|
params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
|
|
6712
6799
|
};
|
|
@@ -6715,7 +6802,7 @@ var require_limit = __commonJS({
|
|
|
6715
6802
|
type: "string",
|
|
6716
6803
|
schemaType: "string",
|
|
6717
6804
|
$data: true,
|
|
6718
|
-
error:
|
|
6805
|
+
error: error51,
|
|
6719
6806
|
code(cxt) {
|
|
6720
6807
|
const { gen, data, schemaCode, keyword, it } = cxt;
|
|
6721
6808
|
const { opts, self } = it;
|
|
@@ -6793,9 +6880,9 @@ var require_dist = __commonJS({
|
|
|
6793
6880
|
return f;
|
|
6794
6881
|
};
|
|
6795
6882
|
function addFormats(ajv, list, fs, exportName) {
|
|
6796
|
-
var
|
|
6883
|
+
var _a3;
|
|
6797
6884
|
var _b;
|
|
6798
|
-
(
|
|
6885
|
+
(_a3 = (_b = ajv.opts.code).formats) !== null && _a3 !== void 0 ? _a3 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
6799
6886
|
for (const f of list)
|
|
6800
6887
|
ajv.addFormat(f, fs[f]);
|
|
6801
6888
|
}
|
|
@@ -9963,11 +10050,11 @@ var require_connection = __commonJS({
|
|
|
9963
10050
|
}
|
|
9964
10051
|
self.emit("connect");
|
|
9965
10052
|
});
|
|
9966
|
-
const reportStreamError = function(
|
|
9967
|
-
if (self._ending && (
|
|
10053
|
+
const reportStreamError = function(error51) {
|
|
10054
|
+
if (self._ending && (error51.code === "ECONNRESET" || error51.code === "EPIPE")) {
|
|
9968
10055
|
return;
|
|
9969
10056
|
}
|
|
9970
|
-
self.emit("error",
|
|
10057
|
+
self.emit("error", error51);
|
|
9971
10058
|
};
|
|
9972
10059
|
this.stream.on("error", reportStreamError);
|
|
9973
10060
|
this.stream.on("close", function() {
|
|
@@ -10128,8 +10215,8 @@ var require_split2 = __commonJS({
|
|
|
10128
10215
|
for (let i = 0; i < list.length; i++) {
|
|
10129
10216
|
try {
|
|
10130
10217
|
push(this, this.mapper(list[i]));
|
|
10131
|
-
} catch (
|
|
10132
|
-
return cb(
|
|
10218
|
+
} catch (error51) {
|
|
10219
|
+
return cb(error51);
|
|
10133
10220
|
}
|
|
10134
10221
|
}
|
|
10135
10222
|
this.overflow = this[kLast].length > this.maxLength;
|
|
@@ -10144,8 +10231,8 @@ var require_split2 = __commonJS({
|
|
|
10144
10231
|
if (this[kLast]) {
|
|
10145
10232
|
try {
|
|
10146
10233
|
push(this, this.mapper(this[kLast]));
|
|
10147
|
-
} catch (
|
|
10148
|
-
return cb(
|
|
10234
|
+
} catch (error51) {
|
|
10235
|
+
return cb(error51);
|
|
10149
10236
|
}
|
|
10150
10237
|
}
|
|
10151
10238
|
cb();
|
|
@@ -10546,19 +10633,19 @@ var require_client = __commonJS({
|
|
|
10546
10633
|
});
|
|
10547
10634
|
this._attachListeners(con);
|
|
10548
10635
|
con.once("end", () => {
|
|
10549
|
-
const
|
|
10636
|
+
const error51 = this._ending ? new Error("Connection terminated") : new Error("Connection terminated unexpectedly");
|
|
10550
10637
|
clearTimeout(this.connectionTimeoutHandle);
|
|
10551
|
-
this._errorAllQueries(
|
|
10638
|
+
this._errorAllQueries(error51);
|
|
10552
10639
|
this._ended = true;
|
|
10553
10640
|
if (!this._ending) {
|
|
10554
10641
|
if (this._connecting && !this._connectionError) {
|
|
10555
10642
|
if (this._connectionCallback) {
|
|
10556
|
-
this._connectionCallback(
|
|
10643
|
+
this._connectionCallback(error51);
|
|
10557
10644
|
} else {
|
|
10558
|
-
this._handleErrorEvent(
|
|
10645
|
+
this._handleErrorEvent(error51);
|
|
10559
10646
|
}
|
|
10560
10647
|
} else if (!this._connectionError) {
|
|
10561
|
-
this._handleErrorEvent(
|
|
10648
|
+
this._handleErrorEvent(error51);
|
|
10562
10649
|
}
|
|
10563
10650
|
}
|
|
10564
10651
|
process.nextTick(() => {
|
|
@@ -10572,9 +10659,9 @@ var require_client = __commonJS({
|
|
|
10572
10659
|
return;
|
|
10573
10660
|
}
|
|
10574
10661
|
return new this._Promise((resolve, reject) => {
|
|
10575
|
-
this._connect((
|
|
10576
|
-
if (
|
|
10577
|
-
reject(
|
|
10662
|
+
this._connect((error51) => {
|
|
10663
|
+
if (error51) {
|
|
10664
|
+
reject(error51);
|
|
10578
10665
|
} else {
|
|
10579
10666
|
resolve(this);
|
|
10580
10667
|
}
|
|
@@ -10745,8 +10832,8 @@ var require_client = __commonJS({
|
|
|
10745
10832
|
_handleRowDescription(msg) {
|
|
10746
10833
|
const activeQuery = this._getActiveQuery();
|
|
10747
10834
|
if (activeQuery == null) {
|
|
10748
|
-
const
|
|
10749
|
-
this._handleErrorEvent(
|
|
10835
|
+
const error51 = new Error("Received unexpected rowDescription message from backend.");
|
|
10836
|
+
this._handleErrorEvent(error51);
|
|
10750
10837
|
return;
|
|
10751
10838
|
}
|
|
10752
10839
|
activeQuery.handleRowDescription(msg);
|
|
@@ -10754,8 +10841,8 @@ var require_client = __commonJS({
|
|
|
10754
10841
|
_handleDataRow(msg) {
|
|
10755
10842
|
const activeQuery = this._getActiveQuery();
|
|
10756
10843
|
if (activeQuery == null) {
|
|
10757
|
-
const
|
|
10758
|
-
this._handleErrorEvent(
|
|
10844
|
+
const error51 = new Error("Received unexpected dataRow message from backend.");
|
|
10845
|
+
this._handleErrorEvent(error51);
|
|
10759
10846
|
return;
|
|
10760
10847
|
}
|
|
10761
10848
|
activeQuery.handleDataRow(msg);
|
|
@@ -10763,8 +10850,8 @@ var require_client = __commonJS({
|
|
|
10763
10850
|
_handlePortalSuspended(msg) {
|
|
10764
10851
|
const activeQuery = this._getActiveQuery();
|
|
10765
10852
|
if (activeQuery == null) {
|
|
10766
|
-
const
|
|
10767
|
-
this._handleErrorEvent(
|
|
10853
|
+
const error51 = new Error("Received unexpected portalSuspended message from backend.");
|
|
10854
|
+
this._handleErrorEvent(error51);
|
|
10768
10855
|
return;
|
|
10769
10856
|
}
|
|
10770
10857
|
activeQuery.handlePortalSuspended(this.connection);
|
|
@@ -10772,8 +10859,8 @@ var require_client = __commonJS({
|
|
|
10772
10859
|
_handleEmptyQuery(msg) {
|
|
10773
10860
|
const activeQuery = this._getActiveQuery();
|
|
10774
10861
|
if (activeQuery == null) {
|
|
10775
|
-
const
|
|
10776
|
-
this._handleErrorEvent(
|
|
10862
|
+
const error51 = new Error("Received unexpected emptyQuery message from backend.");
|
|
10863
|
+
this._handleErrorEvent(error51);
|
|
10777
10864
|
return;
|
|
10778
10865
|
}
|
|
10779
10866
|
activeQuery.handleEmptyQuery(this.connection);
|
|
@@ -10781,8 +10868,8 @@ var require_client = __commonJS({
|
|
|
10781
10868
|
_handleCommandComplete(msg) {
|
|
10782
10869
|
const activeQuery = this._getActiveQuery();
|
|
10783
10870
|
if (activeQuery == null) {
|
|
10784
|
-
const
|
|
10785
|
-
this._handleErrorEvent(
|
|
10871
|
+
const error51 = new Error("Received unexpected commandComplete message from backend.");
|
|
10872
|
+
this._handleErrorEvent(error51);
|
|
10786
10873
|
return;
|
|
10787
10874
|
}
|
|
10788
10875
|
activeQuery.handleCommandComplete(msg, this.connection);
|
|
@@ -10790,8 +10877,8 @@ var require_client = __commonJS({
|
|
|
10790
10877
|
_handleParseComplete() {
|
|
10791
10878
|
const activeQuery = this._getActiveQuery();
|
|
10792
10879
|
if (activeQuery == null) {
|
|
10793
|
-
const
|
|
10794
|
-
this._handleErrorEvent(
|
|
10880
|
+
const error51 = new Error("Received unexpected parseComplete message from backend.");
|
|
10881
|
+
this._handleErrorEvent(error51);
|
|
10795
10882
|
return;
|
|
10796
10883
|
}
|
|
10797
10884
|
if (activeQuery.name) {
|
|
@@ -10801,8 +10888,8 @@ var require_client = __commonJS({
|
|
|
10801
10888
|
_handleCopyInResponse(msg) {
|
|
10802
10889
|
const activeQuery = this._getActiveQuery();
|
|
10803
10890
|
if (activeQuery == null) {
|
|
10804
|
-
const
|
|
10805
|
-
this._handleErrorEvent(
|
|
10891
|
+
const error51 = new Error("Received unexpected copyInResponse message from backend.");
|
|
10892
|
+
this._handleErrorEvent(error51);
|
|
10806
10893
|
return;
|
|
10807
10894
|
}
|
|
10808
10895
|
activeQuery.handleCopyInResponse(this.connection);
|
|
@@ -10810,8 +10897,8 @@ var require_client = __commonJS({
|
|
|
10810
10897
|
_handleCopyData(msg) {
|
|
10811
10898
|
const activeQuery = this._getActiveQuery();
|
|
10812
10899
|
if (activeQuery == null) {
|
|
10813
|
-
const
|
|
10814
|
-
this._handleErrorEvent(
|
|
10900
|
+
const error51 = new Error("Received unexpected copyData message from backend.");
|
|
10901
|
+
this._handleErrorEvent(error51);
|
|
10815
10902
|
return;
|
|
10816
10903
|
}
|
|
10817
10904
|
activeQuery.handleCopyData(msg, this.connection);
|
|
@@ -10934,11 +11021,11 @@ var require_client = __commonJS({
|
|
|
10934
11021
|
queryCallback = query.callback || (() => {
|
|
10935
11022
|
});
|
|
10936
11023
|
readTimeoutTimer = setTimeout(() => {
|
|
10937
|
-
const
|
|
11024
|
+
const error51 = new Error("Query read timeout");
|
|
10938
11025
|
process.nextTick(() => {
|
|
10939
|
-
query.handleError(
|
|
11026
|
+
query.handleError(error51, this.connection);
|
|
10940
11027
|
});
|
|
10941
|
-
queryCallback(
|
|
11028
|
+
queryCallback(error51);
|
|
10942
11029
|
query.callback = () => {
|
|
10943
11030
|
};
|
|
10944
11031
|
const index = this._queryQueue.indexOf(query);
|
|
@@ -11684,9 +11771,9 @@ var require_client2 = __commonJS({
|
|
|
11684
11771
|
return;
|
|
11685
11772
|
}
|
|
11686
11773
|
return new this._Promise((resolve, reject) => {
|
|
11687
|
-
this._connect((
|
|
11688
|
-
if (
|
|
11689
|
-
reject(
|
|
11774
|
+
this._connect((error51) => {
|
|
11775
|
+
if (error51) {
|
|
11776
|
+
reject(error51);
|
|
11690
11777
|
} else {
|
|
11691
11778
|
resolve(this);
|
|
11692
11779
|
}
|
|
@@ -11726,11 +11813,11 @@ var require_client2 = __commonJS({
|
|
|
11726
11813
|
queryCallback = query.callback || (() => {
|
|
11727
11814
|
});
|
|
11728
11815
|
readTimeoutTimer = setTimeout(() => {
|
|
11729
|
-
const
|
|
11816
|
+
const error51 = new Error("Query read timeout");
|
|
11730
11817
|
process.nextTick(() => {
|
|
11731
|
-
query.handleError(
|
|
11818
|
+
query.handleError(error51, this.connection);
|
|
11732
11819
|
});
|
|
11733
|
-
queryCallback(
|
|
11820
|
+
queryCallback(error51);
|
|
11734
11821
|
query.callback = () => {
|
|
11735
11822
|
};
|
|
11736
11823
|
const index = this._queryQueue.indexOf(query);
|
|
@@ -12089,8 +12176,8 @@ var ZodError = class _ZodError extends Error {
|
|
|
12089
12176
|
return issue2.message;
|
|
12090
12177
|
};
|
|
12091
12178
|
const fieldErrors = { _errors: [] };
|
|
12092
|
-
const processError = (
|
|
12093
|
-
for (const issue2 of
|
|
12179
|
+
const processError = (error51) => {
|
|
12180
|
+
for (const issue2 of error51.issues) {
|
|
12094
12181
|
if (issue2.code === "invalid_union") {
|
|
12095
12182
|
issue2.unionErrors.map(processError);
|
|
12096
12183
|
} else if (issue2.code === "invalid_return_type") {
|
|
@@ -12153,8 +12240,8 @@ var ZodError = class _ZodError extends Error {
|
|
|
12153
12240
|
}
|
|
12154
12241
|
};
|
|
12155
12242
|
ZodError.create = (issues) => {
|
|
12156
|
-
const
|
|
12157
|
-
return
|
|
12243
|
+
const error51 = new ZodError(issues);
|
|
12244
|
+
return error51;
|
|
12158
12245
|
};
|
|
12159
12246
|
|
|
12160
12247
|
// node_modules/zod/v3/locales/en.js
|
|
@@ -12414,8 +12501,8 @@ var handleResult = (ctx, result) => {
|
|
|
12414
12501
|
get error() {
|
|
12415
12502
|
if (this._error)
|
|
12416
12503
|
return this._error;
|
|
12417
|
-
const
|
|
12418
|
-
this._error =
|
|
12504
|
+
const error51 = new ZodError(ctx.common.issues);
|
|
12505
|
+
this._error = error51;
|
|
12419
12506
|
return this._error;
|
|
12420
12507
|
}
|
|
12421
12508
|
};
|
|
@@ -15070,25 +15157,25 @@ var ZodFunction = class _ZodFunction extends ZodType {
|
|
|
15070
15157
|
});
|
|
15071
15158
|
return INVALID;
|
|
15072
15159
|
}
|
|
15073
|
-
function makeArgsIssue(args,
|
|
15160
|
+
function makeArgsIssue(args, error51) {
|
|
15074
15161
|
return makeIssue({
|
|
15075
15162
|
data: args,
|
|
15076
15163
|
path: ctx.path,
|
|
15077
15164
|
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
|
|
15078
15165
|
issueData: {
|
|
15079
15166
|
code: ZodIssueCode.invalid_arguments,
|
|
15080
|
-
argumentsError:
|
|
15167
|
+
argumentsError: error51
|
|
15081
15168
|
}
|
|
15082
15169
|
});
|
|
15083
15170
|
}
|
|
15084
|
-
function makeReturnsIssue(returns,
|
|
15171
|
+
function makeReturnsIssue(returns, error51) {
|
|
15085
15172
|
return makeIssue({
|
|
15086
15173
|
data: returns,
|
|
15087
15174
|
path: ctx.path,
|
|
15088
15175
|
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
|
|
15089
15176
|
issueData: {
|
|
15090
15177
|
code: ZodIssueCode.invalid_return_type,
|
|
15091
|
-
returnTypeError:
|
|
15178
|
+
returnTypeError: error51
|
|
15092
15179
|
}
|
|
15093
15180
|
});
|
|
15094
15181
|
}
|
|
@@ -15097,15 +15184,15 @@ var ZodFunction = class _ZodFunction extends ZodType {
|
|
|
15097
15184
|
if (this._def.returns instanceof ZodPromise) {
|
|
15098
15185
|
const me = this;
|
|
15099
15186
|
return OK(async function(...args) {
|
|
15100
|
-
const
|
|
15187
|
+
const error51 = new ZodError([]);
|
|
15101
15188
|
const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
|
|
15102
|
-
|
|
15103
|
-
throw
|
|
15189
|
+
error51.addIssue(makeArgsIssue(args, e));
|
|
15190
|
+
throw error51;
|
|
15104
15191
|
});
|
|
15105
15192
|
const result = await Reflect.apply(fn, this, parsedArgs);
|
|
15106
15193
|
const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
|
|
15107
|
-
|
|
15108
|
-
throw
|
|
15194
|
+
error51.addIssue(makeReturnsIssue(result, e));
|
|
15195
|
+
throw error51;
|
|
15109
15196
|
});
|
|
15110
15197
|
return parsedReturns;
|
|
15111
15198
|
});
|
|
@@ -15865,6 +15952,7 @@ __export(core_exports2, {
|
|
|
15865
15952
|
$ZodOptional: () => $ZodOptional,
|
|
15866
15953
|
$ZodPipe: () => $ZodPipe,
|
|
15867
15954
|
$ZodPrefault: () => $ZodPrefault,
|
|
15955
|
+
$ZodPreprocess: () => $ZodPreprocess,
|
|
15868
15956
|
$ZodPromise: () => $ZodPromise,
|
|
15869
15957
|
$ZodReadonly: () => $ZodReadonly,
|
|
15870
15958
|
$ZodRealError: () => $ZodRealError,
|
|
@@ -16064,7 +16152,8 @@ __export(core_exports2, {
|
|
|
16064
16152
|
});
|
|
16065
16153
|
|
|
16066
16154
|
// node_modules/zod/v4/core/core.js
|
|
16067
|
-
var
|
|
16155
|
+
var _a;
|
|
16156
|
+
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
16068
16157
|
status: "aborted"
|
|
16069
16158
|
});
|
|
16070
16159
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -16099,10 +16188,10 @@ function $constructor(name, initializer3, params) {
|
|
|
16099
16188
|
}
|
|
16100
16189
|
Object.defineProperty(Definition, "name", { value: name });
|
|
16101
16190
|
function _(def) {
|
|
16102
|
-
var
|
|
16191
|
+
var _a3;
|
|
16103
16192
|
const inst = params?.Parent ? new Definition() : this;
|
|
16104
16193
|
init(inst, def);
|
|
16105
|
-
(
|
|
16194
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
16106
16195
|
for (const fn of inst._zod.deferred) {
|
|
16107
16196
|
fn();
|
|
16108
16197
|
}
|
|
@@ -16131,7 +16220,8 @@ var $ZodEncodeError = class extends Error {
|
|
|
16131
16220
|
this.name = "ZodEncodeError";
|
|
16132
16221
|
}
|
|
16133
16222
|
};
|
|
16134
|
-
|
|
16223
|
+
(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
|
|
16224
|
+
var globalConfig = globalThis.__zod_globalConfig;
|
|
16135
16225
|
function config(newConfig) {
|
|
16136
16226
|
if (newConfig)
|
|
16137
16227
|
Object.assign(globalConfig, newConfig);
|
|
@@ -16164,6 +16254,7 @@ __export(util_exports, {
|
|
|
16164
16254
|
defineLazy: () => defineLazy,
|
|
16165
16255
|
esc: () => esc,
|
|
16166
16256
|
escapeRegex: () => escapeRegex,
|
|
16257
|
+
explicitlyAborted: () => explicitlyAborted,
|
|
16167
16258
|
extend: () => extend,
|
|
16168
16259
|
finalizeIssue: () => finalizeIssue,
|
|
16169
16260
|
floatSafeRemainder: () => floatSafeRemainder2,
|
|
@@ -16252,19 +16343,12 @@ function cleanRegex(source) {
|
|
|
16252
16343
|
return source.slice(start, end);
|
|
16253
16344
|
}
|
|
16254
16345
|
function floatSafeRemainder2(val, step) {
|
|
16255
|
-
const
|
|
16256
|
-
const
|
|
16257
|
-
|
|
16258
|
-
if (
|
|
16259
|
-
|
|
16260
|
-
|
|
16261
|
-
stepDecCount = Number.parseInt(match[1]);
|
|
16262
|
-
}
|
|
16263
|
-
}
|
|
16264
|
-
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
16265
|
-
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
16266
|
-
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
16267
|
-
return valInt % stepInt / 10 ** decCount;
|
|
16346
|
+
const ratio = val / step;
|
|
16347
|
+
const roundedRatio = Math.round(ratio);
|
|
16348
|
+
const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
|
|
16349
|
+
if (Math.abs(ratio - roundedRatio) < tolerance)
|
|
16350
|
+
return 0;
|
|
16351
|
+
return ratio - roundedRatio;
|
|
16268
16352
|
}
|
|
16269
16353
|
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
16270
16354
|
function defineLazy(object3, key, getter) {
|
|
@@ -16346,7 +16430,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
|
|
|
16346
16430
|
function isObject(data) {
|
|
16347
16431
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
16348
16432
|
}
|
|
16349
|
-
var allowsEval = cached(() => {
|
|
16433
|
+
var allowsEval = /* @__PURE__ */ cached(() => {
|
|
16434
|
+
if (globalConfig.jitless) {
|
|
16435
|
+
return false;
|
|
16436
|
+
}
|
|
16350
16437
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
16351
16438
|
return false;
|
|
16352
16439
|
}
|
|
@@ -16379,6 +16466,10 @@ function shallowClone(o) {
|
|
|
16379
16466
|
return { ...o };
|
|
16380
16467
|
if (Array.isArray(o))
|
|
16381
16468
|
return [...o];
|
|
16469
|
+
if (o instanceof Map)
|
|
16470
|
+
return new Map(o);
|
|
16471
|
+
if (o instanceof Set)
|
|
16472
|
+
return new Set(o);
|
|
16382
16473
|
return o;
|
|
16383
16474
|
}
|
|
16384
16475
|
function numKeys(data) {
|
|
@@ -16435,7 +16526,14 @@ var getParsedType2 = (data) => {
|
|
|
16435
16526
|
}
|
|
16436
16527
|
};
|
|
16437
16528
|
var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
16438
|
-
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
16529
|
+
var primitiveTypes = /* @__PURE__ */ new Set([
|
|
16530
|
+
"string",
|
|
16531
|
+
"number",
|
|
16532
|
+
"bigint",
|
|
16533
|
+
"boolean",
|
|
16534
|
+
"symbol",
|
|
16535
|
+
"undefined"
|
|
16536
|
+
]);
|
|
16439
16537
|
function escapeRegex(str) {
|
|
16440
16538
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
16441
16539
|
}
|
|
@@ -16604,6 +16702,9 @@ function safeExtend(schema, shape) {
|
|
|
16604
16702
|
return clone(schema, def);
|
|
16605
16703
|
}
|
|
16606
16704
|
function merge(a, b) {
|
|
16705
|
+
if (a._zod.def.checks?.length) {
|
|
16706
|
+
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
16707
|
+
}
|
|
16607
16708
|
const def = mergeDefs(a._zod.def, {
|
|
16608
16709
|
get shape() {
|
|
16609
16710
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -16613,8 +16714,7 @@ function merge(a, b) {
|
|
|
16613
16714
|
get catchall() {
|
|
16614
16715
|
return b._zod.def.catchall;
|
|
16615
16716
|
},
|
|
16616
|
-
checks: []
|
|
16617
|
-
// delete existing checks
|
|
16717
|
+
checks: b._zod.def.checks ?? []
|
|
16618
16718
|
});
|
|
16619
16719
|
return clone(a, def);
|
|
16620
16720
|
}
|
|
@@ -16697,10 +16797,20 @@ function aborted(x, startIndex = 0) {
|
|
|
16697
16797
|
}
|
|
16698
16798
|
return false;
|
|
16699
16799
|
}
|
|
16800
|
+
function explicitlyAborted(x, startIndex = 0) {
|
|
16801
|
+
if (x.aborted === true)
|
|
16802
|
+
return true;
|
|
16803
|
+
for (let i = startIndex; i < x.issues.length; i++) {
|
|
16804
|
+
if (x.issues[i]?.continue === false) {
|
|
16805
|
+
return true;
|
|
16806
|
+
}
|
|
16807
|
+
}
|
|
16808
|
+
return false;
|
|
16809
|
+
}
|
|
16700
16810
|
function prefixIssues(path, issues) {
|
|
16701
16811
|
return issues.map((iss) => {
|
|
16702
|
-
var
|
|
16703
|
-
(
|
|
16812
|
+
var _a3;
|
|
16813
|
+
(_a3 = iss).path ?? (_a3.path = []);
|
|
16704
16814
|
iss.path.unshift(path);
|
|
16705
16815
|
return iss;
|
|
16706
16816
|
});
|
|
@@ -16709,17 +16819,14 @@ function unwrapMessage(message) {
|
|
|
16709
16819
|
return typeof message === "string" ? message : message?.message;
|
|
16710
16820
|
}
|
|
16711
16821
|
function finalizeIssue(iss, ctx, config2) {
|
|
16712
|
-
const
|
|
16713
|
-
|
|
16714
|
-
|
|
16715
|
-
|
|
16822
|
+
const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
|
|
16823
|
+
const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
|
|
16824
|
+
rest.path ?? (rest.path = []);
|
|
16825
|
+
rest.message = message;
|
|
16826
|
+
if (ctx?.reportInput) {
|
|
16827
|
+
rest.input = _input;
|
|
16716
16828
|
}
|
|
16717
|
-
|
|
16718
|
-
delete full.continue;
|
|
16719
|
-
if (!ctx?.reportInput) {
|
|
16720
|
-
delete full.input;
|
|
16721
|
-
}
|
|
16722
|
-
return full;
|
|
16829
|
+
return rest;
|
|
16723
16830
|
}
|
|
16724
16831
|
function getSizableOrigin(input) {
|
|
16725
16832
|
if (input instanceof Set)
|
|
@@ -16836,10 +16943,10 @@ var initializer = (inst, def) => {
|
|
|
16836
16943
|
};
|
|
16837
16944
|
var $ZodError = $constructor("$ZodError", initializer);
|
|
16838
16945
|
var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
16839
|
-
function flattenError(
|
|
16946
|
+
function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
16840
16947
|
const fieldErrors = {};
|
|
16841
16948
|
const formErrors = [];
|
|
16842
|
-
for (const sub of
|
|
16949
|
+
for (const sub of error51.issues) {
|
|
16843
16950
|
if (sub.path.length > 0) {
|
|
16844
16951
|
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
16845
16952
|
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
@@ -16849,50 +16956,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
|
|
|
16849
16956
|
}
|
|
16850
16957
|
return { formErrors, fieldErrors };
|
|
16851
16958
|
}
|
|
16852
|
-
function formatError(
|
|
16959
|
+
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
16853
16960
|
const fieldErrors = { _errors: [] };
|
|
16854
|
-
const processError = (
|
|
16855
|
-
for (const issue2 of
|
|
16961
|
+
const processError = (error52, path = []) => {
|
|
16962
|
+
for (const issue2 of error52.issues) {
|
|
16856
16963
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
16857
|
-
issue2.errors.map((issues) => processError({ issues }));
|
|
16964
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
16858
16965
|
} else if (issue2.code === "invalid_key") {
|
|
16859
|
-
processError({ issues: issue2.issues });
|
|
16966
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
16860
16967
|
} else if (issue2.code === "invalid_element") {
|
|
16861
|
-
processError({ issues: issue2.issues });
|
|
16862
|
-
} else if (issue2.path.length === 0) {
|
|
16863
|
-
fieldErrors._errors.push(mapper(issue2));
|
|
16968
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
16864
16969
|
} else {
|
|
16865
|
-
|
|
16866
|
-
|
|
16867
|
-
|
|
16868
|
-
|
|
16869
|
-
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
|
|
16970
|
+
const fullpath = [...path, ...issue2.path];
|
|
16971
|
+
if (fullpath.length === 0) {
|
|
16972
|
+
fieldErrors._errors.push(mapper(issue2));
|
|
16973
|
+
} else {
|
|
16974
|
+
let curr = fieldErrors;
|
|
16975
|
+
let i = 0;
|
|
16976
|
+
while (i < fullpath.length) {
|
|
16977
|
+
const el = fullpath[i];
|
|
16978
|
+
const terminal = i === fullpath.length - 1;
|
|
16979
|
+
if (!terminal) {
|
|
16980
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
16981
|
+
} else {
|
|
16982
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
16983
|
+
curr[el]._errors.push(mapper(issue2));
|
|
16984
|
+
}
|
|
16985
|
+
curr = curr[el];
|
|
16986
|
+
i++;
|
|
16875
16987
|
}
|
|
16876
|
-
curr = curr[el];
|
|
16877
|
-
i++;
|
|
16878
16988
|
}
|
|
16879
16989
|
}
|
|
16880
16990
|
}
|
|
16881
16991
|
};
|
|
16882
|
-
processError(
|
|
16992
|
+
processError(error51);
|
|
16883
16993
|
return fieldErrors;
|
|
16884
16994
|
}
|
|
16885
|
-
function treeifyError(
|
|
16995
|
+
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
16886
16996
|
const result = { errors: [] };
|
|
16887
|
-
const processError = (
|
|
16888
|
-
var
|
|
16889
|
-
for (const issue2 of
|
|
16997
|
+
const processError = (error52, path = []) => {
|
|
16998
|
+
var _a3, _b;
|
|
16999
|
+
for (const issue2 of error52.issues) {
|
|
16890
17000
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
16891
|
-
issue2.errors.map((issues) => processError({ issues }, issue2.path));
|
|
17001
|
+
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
16892
17002
|
} else if (issue2.code === "invalid_key") {
|
|
16893
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
17003
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
16894
17004
|
} else if (issue2.code === "invalid_element") {
|
|
16895
|
-
processError({ issues: issue2.issues }, issue2.path);
|
|
17005
|
+
processError({ issues: issue2.issues }, [...path, ...issue2.path]);
|
|
16896
17006
|
} else {
|
|
16897
17007
|
const fullpath = [...path, ...issue2.path];
|
|
16898
17008
|
if (fullpath.length === 0) {
|
|
@@ -16906,7 +17016,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
16906
17016
|
const terminal = i === fullpath.length - 1;
|
|
16907
17017
|
if (typeof el === "string") {
|
|
16908
17018
|
curr.properties ?? (curr.properties = {});
|
|
16909
|
-
(
|
|
17019
|
+
(_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
|
|
16910
17020
|
curr = curr.properties[el];
|
|
16911
17021
|
} else {
|
|
16912
17022
|
curr.items ?? (curr.items = []);
|
|
@@ -16921,7 +17031,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
|
|
|
16921
17031
|
}
|
|
16922
17032
|
}
|
|
16923
17033
|
};
|
|
16924
|
-
processError(
|
|
17034
|
+
processError(error51);
|
|
16925
17035
|
return result;
|
|
16926
17036
|
}
|
|
16927
17037
|
function toDotPath(_path) {
|
|
@@ -16942,9 +17052,9 @@ function toDotPath(_path) {
|
|
|
16942
17052
|
}
|
|
16943
17053
|
return segs.join("");
|
|
16944
17054
|
}
|
|
16945
|
-
function prettifyError(
|
|
17055
|
+
function prettifyError(error51) {
|
|
16946
17056
|
const lines = [];
|
|
16947
|
-
const issues = [...
|
|
17057
|
+
const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
|
|
16948
17058
|
for (const issue2 of issues) {
|
|
16949
17059
|
lines.push(`\u2716 ${issue2.message}`);
|
|
16950
17060
|
if (issue2.path?.length)
|
|
@@ -16955,7 +17065,7 @@ function prettifyError(error48) {
|
|
|
16955
17065
|
|
|
16956
17066
|
// node_modules/zod/v4/core/parse.js
|
|
16957
17067
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
16958
|
-
const ctx = _ctx ?
|
|
17068
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
16959
17069
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
16960
17070
|
if (result instanceof Promise) {
|
|
16961
17071
|
throw new $ZodAsyncError();
|
|
@@ -16969,7 +17079,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
|
16969
17079
|
};
|
|
16970
17080
|
var parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
16971
17081
|
var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
16972
|
-
const ctx = _ctx ?
|
|
17082
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
16973
17083
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
16974
17084
|
if (result instanceof Promise)
|
|
16975
17085
|
result = await result;
|
|
@@ -16994,7 +17104,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
|
16994
17104
|
};
|
|
16995
17105
|
var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
16996
17106
|
var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
16997
|
-
const ctx = _ctx ?
|
|
17107
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
16998
17108
|
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
16999
17109
|
if (result instanceof Promise)
|
|
17000
17110
|
result = await result;
|
|
@@ -17005,7 +17115,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
17005
17115
|
};
|
|
17006
17116
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
17007
17117
|
var _encode = (_Err) => (schema, value, _ctx) => {
|
|
17008
|
-
const ctx = _ctx ?
|
|
17118
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
17009
17119
|
return _parse(_Err)(schema, value, ctx);
|
|
17010
17120
|
};
|
|
17011
17121
|
var encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
@@ -17014,7 +17124,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
|
|
|
17014
17124
|
};
|
|
17015
17125
|
var decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
17016
17126
|
var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
17017
|
-
const ctx = _ctx ?
|
|
17127
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
17018
17128
|
return _parseAsync(_Err)(schema, value, ctx);
|
|
17019
17129
|
};
|
|
17020
17130
|
var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
@@ -17023,7 +17133,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
17023
17133
|
};
|
|
17024
17134
|
var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
17025
17135
|
var _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
17026
|
-
const ctx = _ctx ?
|
|
17136
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
17027
17137
|
return _safeParse(_Err)(schema, value, ctx);
|
|
17028
17138
|
};
|
|
17029
17139
|
var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
@@ -17032,7 +17142,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
|
17032
17142
|
};
|
|
17033
17143
|
var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
17034
17144
|
var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
17035
|
-
const ctx = _ctx ?
|
|
17145
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
17036
17146
|
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
17037
17147
|
};
|
|
17038
17148
|
var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
@@ -17065,6 +17175,7 @@ __export(regexes_exports, {
|
|
|
17065
17175
|
hex: () => hex,
|
|
17066
17176
|
hostname: () => hostname,
|
|
17067
17177
|
html5Email: () => html5Email,
|
|
17178
|
+
httpProtocol: () => httpProtocol,
|
|
17068
17179
|
idnEmail: () => idnEmail,
|
|
17069
17180
|
integer: () => integer,
|
|
17070
17181
|
ipv4: () => ipv4,
|
|
@@ -17103,7 +17214,7 @@ __export(regexes_exports, {
|
|
|
17103
17214
|
uuid7: () => uuid7,
|
|
17104
17215
|
xid: () => xid
|
|
17105
17216
|
});
|
|
17106
|
-
var cuid = /^[cC][
|
|
17217
|
+
var cuid = /^[cC][0-9a-z]{6,}$/;
|
|
17107
17218
|
var cuid2 = /^[0-9a-z]+$/;
|
|
17108
17219
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
17109
17220
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
@@ -17142,6 +17253,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
|
|
|
17142
17253
|
var base64url = /^[A-Za-z0-9_-]*$/;
|
|
17143
17254
|
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])?)*\.?$/;
|
|
17144
17255
|
var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
17256
|
+
var httpProtocol = /^https?$/;
|
|
17145
17257
|
var e164 = /^\+[1-9]\d{6,14}$/;
|
|
17146
17258
|
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])))`;
|
|
17147
17259
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
@@ -17200,10 +17312,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
17200
17312
|
|
|
17201
17313
|
// node_modules/zod/v4/core/checks.js
|
|
17202
17314
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
17203
|
-
var
|
|
17315
|
+
var _a3;
|
|
17204
17316
|
inst._zod ?? (inst._zod = {});
|
|
17205
17317
|
inst._zod.def = def;
|
|
17206
|
-
(
|
|
17318
|
+
(_a3 = inst._zod).onattach ?? (_a3.onattach = []);
|
|
17207
17319
|
});
|
|
17208
17320
|
var numericOriginMap = {
|
|
17209
17321
|
number: "number",
|
|
@@ -17269,8 +17381,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
17269
17381
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
17270
17382
|
$ZodCheck.init(inst, def);
|
|
17271
17383
|
inst._zod.onattach.push((inst2) => {
|
|
17272
|
-
var
|
|
17273
|
-
(
|
|
17384
|
+
var _a3;
|
|
17385
|
+
(_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
|
|
17274
17386
|
});
|
|
17275
17387
|
inst._zod.check = (payload) => {
|
|
17276
17388
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -17403,9 +17515,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
17403
17515
|
};
|
|
17404
17516
|
});
|
|
17405
17517
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
17406
|
-
var
|
|
17518
|
+
var _a3;
|
|
17407
17519
|
$ZodCheck.init(inst, def);
|
|
17408
|
-
(
|
|
17520
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
17409
17521
|
const val = payload.value;
|
|
17410
17522
|
return !nullish(val) && val.size !== void 0;
|
|
17411
17523
|
});
|
|
@@ -17431,9 +17543,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
17431
17543
|
};
|
|
17432
17544
|
});
|
|
17433
17545
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
17434
|
-
var
|
|
17546
|
+
var _a3;
|
|
17435
17547
|
$ZodCheck.init(inst, def);
|
|
17436
|
-
(
|
|
17548
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
17437
17549
|
const val = payload.value;
|
|
17438
17550
|
return !nullish(val) && val.size !== void 0;
|
|
17439
17551
|
});
|
|
@@ -17459,9 +17571,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
17459
17571
|
};
|
|
17460
17572
|
});
|
|
17461
17573
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
17462
|
-
var
|
|
17574
|
+
var _a3;
|
|
17463
17575
|
$ZodCheck.init(inst, def);
|
|
17464
|
-
(
|
|
17576
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
17465
17577
|
const val = payload.value;
|
|
17466
17578
|
return !nullish(val) && val.size !== void 0;
|
|
17467
17579
|
});
|
|
@@ -17489,9 +17601,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
17489
17601
|
};
|
|
17490
17602
|
});
|
|
17491
17603
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
17492
|
-
var
|
|
17604
|
+
var _a3;
|
|
17493
17605
|
$ZodCheck.init(inst, def);
|
|
17494
|
-
(
|
|
17606
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
17495
17607
|
const val = payload.value;
|
|
17496
17608
|
return !nullish(val) && val.length !== void 0;
|
|
17497
17609
|
});
|
|
@@ -17518,9 +17630,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
17518
17630
|
};
|
|
17519
17631
|
});
|
|
17520
17632
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
17521
|
-
var
|
|
17633
|
+
var _a3;
|
|
17522
17634
|
$ZodCheck.init(inst, def);
|
|
17523
|
-
(
|
|
17635
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
17524
17636
|
const val = payload.value;
|
|
17525
17637
|
return !nullish(val) && val.length !== void 0;
|
|
17526
17638
|
});
|
|
@@ -17547,9 +17659,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
17547
17659
|
};
|
|
17548
17660
|
});
|
|
17549
17661
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
17550
|
-
var
|
|
17662
|
+
var _a3;
|
|
17551
17663
|
$ZodCheck.init(inst, def);
|
|
17552
|
-
(
|
|
17664
|
+
(_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
|
|
17553
17665
|
const val = payload.value;
|
|
17554
17666
|
return !nullish(val) && val.length !== void 0;
|
|
17555
17667
|
});
|
|
@@ -17578,7 +17690,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
17578
17690
|
};
|
|
17579
17691
|
});
|
|
17580
17692
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
17581
|
-
var
|
|
17693
|
+
var _a3, _b;
|
|
17582
17694
|
$ZodCheck.init(inst, def);
|
|
17583
17695
|
inst._zod.onattach.push((inst2) => {
|
|
17584
17696
|
const bag = inst2._zod.bag;
|
|
@@ -17589,7 +17701,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
17589
17701
|
}
|
|
17590
17702
|
});
|
|
17591
17703
|
if (def.pattern)
|
|
17592
|
-
(
|
|
17704
|
+
(_a3 = inst._zod).check ?? (_a3.check = (payload) => {
|
|
17593
17705
|
def.pattern.lastIndex = 0;
|
|
17594
17706
|
if (def.pattern.test(payload.value))
|
|
17595
17707
|
return;
|
|
@@ -17785,13 +17897,13 @@ var Doc = class {
|
|
|
17785
17897
|
// node_modules/zod/v4/core/versions.js
|
|
17786
17898
|
var version = {
|
|
17787
17899
|
major: 4,
|
|
17788
|
-
minor:
|
|
17789
|
-
patch:
|
|
17900
|
+
minor: 4,
|
|
17901
|
+
patch: 3
|
|
17790
17902
|
};
|
|
17791
17903
|
|
|
17792
17904
|
// node_modules/zod/v4/core/schemas.js
|
|
17793
17905
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
17794
|
-
var
|
|
17906
|
+
var _a3;
|
|
17795
17907
|
inst ?? (inst = {});
|
|
17796
17908
|
inst._zod.def = def;
|
|
17797
17909
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -17806,7 +17918,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
17806
17918
|
}
|
|
17807
17919
|
}
|
|
17808
17920
|
if (checks.length === 0) {
|
|
17809
|
-
(
|
|
17921
|
+
(_a3 = inst._zod).deferred ?? (_a3.deferred = []);
|
|
17810
17922
|
inst._zod.deferred?.push(() => {
|
|
17811
17923
|
inst._zod.run = inst._zod.parse;
|
|
17812
17924
|
});
|
|
@@ -17816,6 +17928,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
17816
17928
|
let asyncResult;
|
|
17817
17929
|
for (const ch of checks2) {
|
|
17818
17930
|
if (ch._zod.def.when) {
|
|
17931
|
+
if (explicitlyAborted(payload))
|
|
17932
|
+
continue;
|
|
17819
17933
|
const shouldRun = ch._zod.def.when(payload);
|
|
17820
17934
|
if (!shouldRun)
|
|
17821
17935
|
continue;
|
|
@@ -17956,6 +18070,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
|
|
|
17956
18070
|
inst._zod.check = (payload) => {
|
|
17957
18071
|
try {
|
|
17958
18072
|
const trimmed = payload.value.trim();
|
|
18073
|
+
if (!def.normalize && def.protocol?.source === httpProtocol.source) {
|
|
18074
|
+
if (!/^https?:\/\//i.test(trimmed)) {
|
|
18075
|
+
payload.issues.push({
|
|
18076
|
+
code: "invalid_format",
|
|
18077
|
+
format: "url",
|
|
18078
|
+
note: "Invalid URL format",
|
|
18079
|
+
input: payload.value,
|
|
18080
|
+
inst,
|
|
18081
|
+
continue: !def.abort
|
|
18082
|
+
});
|
|
18083
|
+
return;
|
|
18084
|
+
}
|
|
18085
|
+
}
|
|
17959
18086
|
const url2 = new URL(trimmed);
|
|
17960
18087
|
if (def.hostname) {
|
|
17961
18088
|
def.hostname.lastIndex = 0;
|
|
@@ -18109,6 +18236,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
|
|
|
18109
18236
|
function isValidBase64(data) {
|
|
18110
18237
|
if (data === "")
|
|
18111
18238
|
return true;
|
|
18239
|
+
if (/\s/.test(data))
|
|
18240
|
+
return false;
|
|
18112
18241
|
if (data.length % 4 !== 0)
|
|
18113
18242
|
return false;
|
|
18114
18243
|
try {
|
|
@@ -18301,8 +18430,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
|
|
|
18301
18430
|
$ZodType.init(inst, def);
|
|
18302
18431
|
inst._zod.pattern = _undefined;
|
|
18303
18432
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
18304
|
-
inst._zod.optin = "optional";
|
|
18305
|
-
inst._zod.optout = "optional";
|
|
18306
18433
|
inst._zod.parse = (payload, _ctx) => {
|
|
18307
18434
|
const input = payload.value;
|
|
18308
18435
|
if (typeof input === "undefined")
|
|
@@ -18431,15 +18558,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
18431
18558
|
return payload;
|
|
18432
18559
|
};
|
|
18433
18560
|
});
|
|
18434
|
-
function handlePropertyResult(result, final, key, input, isOptionalOut) {
|
|
18561
|
+
function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
|
|
18562
|
+
const isPresent = key in input;
|
|
18435
18563
|
if (result.issues.length) {
|
|
18436
|
-
if (isOptionalOut && !
|
|
18564
|
+
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
18437
18565
|
return;
|
|
18438
18566
|
}
|
|
18439
18567
|
final.issues.push(...prefixIssues(key, result.issues));
|
|
18440
18568
|
}
|
|
18569
|
+
if (!isPresent && !isOptionalIn) {
|
|
18570
|
+
if (!result.issues.length) {
|
|
18571
|
+
final.issues.push({
|
|
18572
|
+
code: "invalid_type",
|
|
18573
|
+
expected: "nonoptional",
|
|
18574
|
+
input: void 0,
|
|
18575
|
+
path: [key]
|
|
18576
|
+
});
|
|
18577
|
+
}
|
|
18578
|
+
return;
|
|
18579
|
+
}
|
|
18441
18580
|
if (result.value === void 0) {
|
|
18442
|
-
if (
|
|
18581
|
+
if (isPresent) {
|
|
18443
18582
|
final.value[key] = void 0;
|
|
18444
18583
|
}
|
|
18445
18584
|
} else {
|
|
@@ -18467,8 +18606,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
18467
18606
|
const keySet = def.keySet;
|
|
18468
18607
|
const _catchall = def.catchall._zod;
|
|
18469
18608
|
const t = _catchall.def.type;
|
|
18609
|
+
const isOptionalIn = _catchall.optin === "optional";
|
|
18470
18610
|
const isOptionalOut = _catchall.optout === "optional";
|
|
18471
18611
|
for (const key in input) {
|
|
18612
|
+
if (key === "__proto__")
|
|
18613
|
+
continue;
|
|
18472
18614
|
if (keySet.has(key))
|
|
18473
18615
|
continue;
|
|
18474
18616
|
if (t === "never") {
|
|
@@ -18477,9 +18619,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
18477
18619
|
}
|
|
18478
18620
|
const r = _catchall.run({ value: input[key], issues: [] }, ctx);
|
|
18479
18621
|
if (r instanceof Promise) {
|
|
18480
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
18622
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
18481
18623
|
} else {
|
|
18482
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
18624
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
18483
18625
|
}
|
|
18484
18626
|
}
|
|
18485
18627
|
if (unrecognized.length) {
|
|
@@ -18545,12 +18687,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
18545
18687
|
const shape = value.shape;
|
|
18546
18688
|
for (const key of value.keys) {
|
|
18547
18689
|
const el = shape[key];
|
|
18690
|
+
const isOptionalIn = el._zod.optin === "optional";
|
|
18548
18691
|
const isOptionalOut = el._zod.optout === "optional";
|
|
18549
18692
|
const r = el._zod.run({ value: input[key], issues: [] }, ctx);
|
|
18550
18693
|
if (r instanceof Promise) {
|
|
18551
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
|
|
18694
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
|
|
18552
18695
|
} else {
|
|
18553
|
-
handlePropertyResult(r, payload, key, input, isOptionalOut);
|
|
18696
|
+
handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
|
|
18554
18697
|
}
|
|
18555
18698
|
}
|
|
18556
18699
|
if (!catchall) {
|
|
@@ -18581,9 +18724,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
18581
18724
|
const id = ids[key];
|
|
18582
18725
|
const k = esc(key);
|
|
18583
18726
|
const schema = shape[key];
|
|
18727
|
+
const isOptionalIn = schema?._zod?.optin === "optional";
|
|
18584
18728
|
const isOptionalOut = schema?._zod?.optout === "optional";
|
|
18585
18729
|
doc.write(`const ${id} = ${parseStr(key)};`);
|
|
18586
|
-
if (isOptionalOut) {
|
|
18730
|
+
if (isOptionalIn && isOptionalOut) {
|
|
18587
18731
|
doc.write(`
|
|
18588
18732
|
if (${id}.issues.length) {
|
|
18589
18733
|
if (${k} in input) {
|
|
@@ -18602,6 +18746,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
18602
18746
|
newResult[${k}] = ${id}.value;
|
|
18603
18747
|
}
|
|
18604
18748
|
|
|
18749
|
+
`);
|
|
18750
|
+
} else if (!isOptionalIn) {
|
|
18751
|
+
doc.write(`
|
|
18752
|
+
const ${id}_present = ${k} in input;
|
|
18753
|
+
if (${id}.issues.length) {
|
|
18754
|
+
payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
|
|
18755
|
+
...iss,
|
|
18756
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
18757
|
+
})));
|
|
18758
|
+
}
|
|
18759
|
+
if (!${id}_present && !${id}.issues.length) {
|
|
18760
|
+
payload.issues.push({
|
|
18761
|
+
code: "invalid_type",
|
|
18762
|
+
expected: "nonoptional",
|
|
18763
|
+
input: undefined,
|
|
18764
|
+
path: [${k}]
|
|
18765
|
+
});
|
|
18766
|
+
}
|
|
18767
|
+
|
|
18768
|
+
if (${id}_present) {
|
|
18769
|
+
if (${id}.value === undefined) {
|
|
18770
|
+
newResult[${k}] = undefined;
|
|
18771
|
+
} else {
|
|
18772
|
+
newResult[${k}] = ${id}.value;
|
|
18773
|
+
}
|
|
18774
|
+
}
|
|
18775
|
+
|
|
18605
18776
|
`);
|
|
18606
18777
|
} else {
|
|
18607
18778
|
doc.write(`
|
|
@@ -18695,10 +18866,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
18695
18866
|
}
|
|
18696
18867
|
return void 0;
|
|
18697
18868
|
});
|
|
18698
|
-
const
|
|
18699
|
-
const first = def.options[0]._zod.run;
|
|
18869
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
18700
18870
|
inst._zod.parse = (payload, ctx) => {
|
|
18701
|
-
if (
|
|
18871
|
+
if (first) {
|
|
18702
18872
|
return first(payload, ctx);
|
|
18703
18873
|
}
|
|
18704
18874
|
let async = false;
|
|
@@ -18751,10 +18921,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
|
|
|
18751
18921
|
var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
|
|
18752
18922
|
$ZodUnion.init(inst, def);
|
|
18753
18923
|
def.inclusive = false;
|
|
18754
|
-
const
|
|
18755
|
-
const first = def.options[0]._zod.run;
|
|
18924
|
+
const first = def.options.length === 1 ? def.options[0]._zod.run : null;
|
|
18756
18925
|
inst._zod.parse = (payload, ctx) => {
|
|
18757
|
-
if (
|
|
18926
|
+
if (first) {
|
|
18758
18927
|
return first(payload, ctx);
|
|
18759
18928
|
}
|
|
18760
18929
|
let async = false;
|
|
@@ -18829,7 +18998,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
18829
18998
|
if (opt) {
|
|
18830
18999
|
return opt._zod.run(payload, ctx);
|
|
18831
19000
|
}
|
|
18832
|
-
if (def.unionFallback) {
|
|
19001
|
+
if (def.unionFallback || ctx.direction === "backward") {
|
|
18833
19002
|
return _super(payload, ctx);
|
|
18834
19003
|
}
|
|
18835
19004
|
payload.issues.push({
|
|
@@ -18837,6 +19006,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
18837
19006
|
errors: [],
|
|
18838
19007
|
note: "No matching discriminator",
|
|
18839
19008
|
discriminator: def.discriminator,
|
|
19009
|
+
options: Array.from(disc.value.keys()),
|
|
18840
19010
|
input,
|
|
18841
19011
|
path: [def.discriminator],
|
|
18842
19012
|
inst
|
|
@@ -18958,64 +19128,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
18958
19128
|
}
|
|
18959
19129
|
payload.value = [];
|
|
18960
19130
|
const proms = [];
|
|
18961
|
-
const
|
|
18962
|
-
const
|
|
19131
|
+
const optinStart = getTupleOptStart(items, "optin");
|
|
19132
|
+
const optoutStart = getTupleOptStart(items, "optout");
|
|
18963
19133
|
if (!def.rest) {
|
|
18964
|
-
|
|
18965
|
-
const tooSmall = input.length < optStart - 1;
|
|
18966
|
-
if (tooBig || tooSmall) {
|
|
19134
|
+
if (input.length < optinStart) {
|
|
18967
19135
|
payload.issues.push({
|
|
18968
|
-
|
|
19136
|
+
code: "too_small",
|
|
19137
|
+
minimum: optinStart,
|
|
19138
|
+
inclusive: true,
|
|
18969
19139
|
input,
|
|
18970
19140
|
inst,
|
|
18971
19141
|
origin: "array"
|
|
18972
19142
|
});
|
|
18973
19143
|
return payload;
|
|
18974
19144
|
}
|
|
18975
|
-
|
|
18976
|
-
|
|
18977
|
-
|
|
18978
|
-
|
|
18979
|
-
|
|
18980
|
-
|
|
18981
|
-
|
|
19145
|
+
if (input.length > items.length) {
|
|
19146
|
+
payload.issues.push({
|
|
19147
|
+
code: "too_big",
|
|
19148
|
+
maximum: items.length,
|
|
19149
|
+
inclusive: true,
|
|
19150
|
+
input,
|
|
19151
|
+
inst,
|
|
19152
|
+
origin: "array"
|
|
19153
|
+
});
|
|
18982
19154
|
}
|
|
18983
|
-
|
|
18984
|
-
|
|
18985
|
-
|
|
18986
|
-
}, ctx);
|
|
18987
|
-
if (
|
|
18988
|
-
proms.push(
|
|
19155
|
+
}
|
|
19156
|
+
const itemResults = new Array(items.length);
|
|
19157
|
+
for (let i = 0; i < items.length; i++) {
|
|
19158
|
+
const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
|
|
19159
|
+
if (r instanceof Promise) {
|
|
19160
|
+
proms.push(r.then((rr) => {
|
|
19161
|
+
itemResults[i] = rr;
|
|
19162
|
+
}));
|
|
18989
19163
|
} else {
|
|
18990
|
-
|
|
19164
|
+
itemResults[i] = r;
|
|
18991
19165
|
}
|
|
18992
19166
|
}
|
|
18993
19167
|
if (def.rest) {
|
|
19168
|
+
let i = items.length - 1;
|
|
18994
19169
|
const rest = input.slice(items.length);
|
|
18995
19170
|
for (const el of rest) {
|
|
18996
19171
|
i++;
|
|
18997
|
-
const result = def.rest._zod.run({
|
|
18998
|
-
value: el,
|
|
18999
|
-
issues: []
|
|
19000
|
-
}, ctx);
|
|
19172
|
+
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
19001
19173
|
if (result instanceof Promise) {
|
|
19002
|
-
proms.push(result.then((
|
|
19174
|
+
proms.push(result.then((r) => handleTupleResult(r, payload, i)));
|
|
19003
19175
|
} else {
|
|
19004
19176
|
handleTupleResult(result, payload, i);
|
|
19005
19177
|
}
|
|
19006
19178
|
}
|
|
19007
19179
|
}
|
|
19008
|
-
if (proms.length)
|
|
19009
|
-
return Promise.all(proms).then(() => payload);
|
|
19010
|
-
|
|
19180
|
+
if (proms.length) {
|
|
19181
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
|
|
19182
|
+
}
|
|
19183
|
+
return handleTupleResults(itemResults, payload, items, input, optoutStart);
|
|
19011
19184
|
};
|
|
19012
19185
|
});
|
|
19186
|
+
function getTupleOptStart(items, key) {
|
|
19187
|
+
for (let i = items.length - 1; i >= 0; i--) {
|
|
19188
|
+
if (items[i]._zod[key] !== "optional")
|
|
19189
|
+
return i + 1;
|
|
19190
|
+
}
|
|
19191
|
+
return 0;
|
|
19192
|
+
}
|
|
19013
19193
|
function handleTupleResult(result, final, index) {
|
|
19014
19194
|
if (result.issues.length) {
|
|
19015
19195
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
19016
19196
|
}
|
|
19017
19197
|
final.value[index] = result.value;
|
|
19018
19198
|
}
|
|
19199
|
+
function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
19200
|
+
for (let i = 0; i < items.length; i++) {
|
|
19201
|
+
const r = itemResults[i];
|
|
19202
|
+
const isPresent = i < input.length;
|
|
19203
|
+
if (r.issues.length) {
|
|
19204
|
+
if (!isPresent && i >= optoutStart) {
|
|
19205
|
+
final.value.length = i;
|
|
19206
|
+
break;
|
|
19207
|
+
}
|
|
19208
|
+
final.issues.push(...prefixIssues(i, r.issues));
|
|
19209
|
+
}
|
|
19210
|
+
final.value[i] = r.value;
|
|
19211
|
+
}
|
|
19212
|
+
for (let i = final.value.length - 1; i >= input.length; i--) {
|
|
19213
|
+
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
19214
|
+
final.value.length = i;
|
|
19215
|
+
} else {
|
|
19216
|
+
break;
|
|
19217
|
+
}
|
|
19218
|
+
}
|
|
19219
|
+
return final;
|
|
19220
|
+
}
|
|
19019
19221
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
19020
19222
|
$ZodType.init(inst, def);
|
|
19021
19223
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -19037,19 +19239,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
19037
19239
|
for (const key of values) {
|
|
19038
19240
|
if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
|
|
19039
19241
|
recordKeys.add(typeof key === "number" ? key.toString() : key);
|
|
19242
|
+
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
19243
|
+
if (keyResult instanceof Promise) {
|
|
19244
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
19245
|
+
}
|
|
19246
|
+
if (keyResult.issues.length) {
|
|
19247
|
+
payload.issues.push({
|
|
19248
|
+
code: "invalid_key",
|
|
19249
|
+
origin: "record",
|
|
19250
|
+
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
|
|
19251
|
+
input: key,
|
|
19252
|
+
path: [key],
|
|
19253
|
+
inst
|
|
19254
|
+
});
|
|
19255
|
+
continue;
|
|
19256
|
+
}
|
|
19257
|
+
const outKey = keyResult.value;
|
|
19040
19258
|
const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
|
|
19041
19259
|
if (result instanceof Promise) {
|
|
19042
19260
|
proms.push(result.then((result2) => {
|
|
19043
19261
|
if (result2.issues.length) {
|
|
19044
19262
|
payload.issues.push(...prefixIssues(key, result2.issues));
|
|
19045
19263
|
}
|
|
19046
|
-
payload.value[
|
|
19264
|
+
payload.value[outKey] = result2.value;
|
|
19047
19265
|
}));
|
|
19048
19266
|
} else {
|
|
19049
19267
|
if (result.issues.length) {
|
|
19050
19268
|
payload.issues.push(...prefixIssues(key, result.issues));
|
|
19051
19269
|
}
|
|
19052
|
-
payload.value[
|
|
19270
|
+
payload.value[outKey] = result.value;
|
|
19053
19271
|
}
|
|
19054
19272
|
}
|
|
19055
19273
|
}
|
|
@@ -19073,6 +19291,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
19073
19291
|
for (const key of Reflect.ownKeys(input)) {
|
|
19074
19292
|
if (key === "__proto__")
|
|
19075
19293
|
continue;
|
|
19294
|
+
if (!Object.prototype.propertyIsEnumerable.call(input, key))
|
|
19295
|
+
continue;
|
|
19076
19296
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
19077
19297
|
if (keyResult instanceof Promise) {
|
|
19078
19298
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -19277,6 +19497,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
|
|
|
19277
19497
|
});
|
|
19278
19498
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
19279
19499
|
$ZodType.init(inst, def);
|
|
19500
|
+
inst._zod.optin = "optional";
|
|
19280
19501
|
inst._zod.parse = (payload, ctx) => {
|
|
19281
19502
|
if (ctx.direction === "backward") {
|
|
19282
19503
|
throw new $ZodEncodeError(inst.constructor.name);
|
|
@@ -19286,6 +19507,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
19286
19507
|
const output = _out instanceof Promise ? _out : Promise.resolve(_out);
|
|
19287
19508
|
return output.then((output2) => {
|
|
19288
19509
|
payload.value = output2;
|
|
19510
|
+
payload.fallback = true;
|
|
19289
19511
|
return payload;
|
|
19290
19512
|
});
|
|
19291
19513
|
}
|
|
@@ -19293,11 +19515,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
19293
19515
|
throw new $ZodAsyncError();
|
|
19294
19516
|
}
|
|
19295
19517
|
payload.value = _out;
|
|
19518
|
+
payload.fallback = true;
|
|
19296
19519
|
return payload;
|
|
19297
19520
|
};
|
|
19298
19521
|
});
|
|
19299
19522
|
function handleOptionalResult(result, input) {
|
|
19300
|
-
if (result.issues.length
|
|
19523
|
+
if (input === void 0 && (result.issues.length || result.fallback)) {
|
|
19301
19524
|
return { issues: [], value: void 0 };
|
|
19302
19525
|
}
|
|
19303
19526
|
return result;
|
|
@@ -19315,10 +19538,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
|
19315
19538
|
});
|
|
19316
19539
|
inst._zod.parse = (payload, ctx) => {
|
|
19317
19540
|
if (def.innerType._zod.optin === "optional") {
|
|
19541
|
+
const input = payload.value;
|
|
19318
19542
|
const result = def.innerType._zod.run(payload, ctx);
|
|
19319
19543
|
if (result instanceof Promise)
|
|
19320
|
-
return result.then((r) => handleOptionalResult(r,
|
|
19321
|
-
return handleOptionalResult(result,
|
|
19544
|
+
return result.then((r) => handleOptionalResult(r, input));
|
|
19545
|
+
return handleOptionalResult(result, input);
|
|
19322
19546
|
}
|
|
19323
19547
|
if (payload.value === void 0) {
|
|
19324
19548
|
return payload;
|
|
@@ -19434,7 +19658,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
|
|
|
19434
19658
|
});
|
|
19435
19659
|
var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
19436
19660
|
$ZodType.init(inst, def);
|
|
19437
|
-
|
|
19661
|
+
inst._zod.optin = "optional";
|
|
19438
19662
|
defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
|
|
19439
19663
|
defineLazy(inst._zod, "values", () => def.innerType._zod.values);
|
|
19440
19664
|
inst._zod.parse = (payload, ctx) => {
|
|
@@ -19454,6 +19678,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
19454
19678
|
input: payload.value
|
|
19455
19679
|
});
|
|
19456
19680
|
payload.issues = [];
|
|
19681
|
+
payload.fallback = true;
|
|
19457
19682
|
}
|
|
19458
19683
|
return payload;
|
|
19459
19684
|
});
|
|
@@ -19468,6 +19693,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
|
|
|
19468
19693
|
input: payload.value
|
|
19469
19694
|
});
|
|
19470
19695
|
payload.issues = [];
|
|
19696
|
+
payload.fallback = true;
|
|
19471
19697
|
}
|
|
19472
19698
|
return payload;
|
|
19473
19699
|
};
|
|
@@ -19513,7 +19739,7 @@ function handlePipeResult(left, next, ctx) {
|
|
|
19513
19739
|
left.aborted = true;
|
|
19514
19740
|
return left;
|
|
19515
19741
|
}
|
|
19516
|
-
return next._zod.run({ value: left.value, issues: left.issues }, ctx);
|
|
19742
|
+
return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
|
|
19517
19743
|
}
|
|
19518
19744
|
var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
|
|
19519
19745
|
$ZodType.init(inst, def);
|
|
@@ -19565,6 +19791,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
|
|
|
19565
19791
|
}
|
|
19566
19792
|
return nextSchema._zod.run({ value, issues: left.issues }, ctx);
|
|
19567
19793
|
}
|
|
19794
|
+
var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
|
|
19795
|
+
$ZodPipe.init(inst, def);
|
|
19796
|
+
});
|
|
19568
19797
|
var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
|
|
19569
19798
|
$ZodType.init(inst, def);
|
|
19570
19799
|
defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
|
|
@@ -19716,7 +19945,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
|
|
|
19716
19945
|
});
|
|
19717
19946
|
var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
19718
19947
|
$ZodType.init(inst, def);
|
|
19719
|
-
defineLazy(inst._zod, "innerType", () =>
|
|
19948
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
19949
|
+
const d = def;
|
|
19950
|
+
if (!d._cachedInner)
|
|
19951
|
+
d._cachedInner = def.getter();
|
|
19952
|
+
return d._cachedInner;
|
|
19953
|
+
});
|
|
19720
19954
|
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
19721
19955
|
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
19722
19956
|
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
@@ -19771,6 +20005,7 @@ __export(locales_exports, {
|
|
|
19771
20005
|
cs: () => cs_default,
|
|
19772
20006
|
da: () => da_default,
|
|
19773
20007
|
de: () => de_default,
|
|
20008
|
+
el: () => el_default,
|
|
19774
20009
|
en: () => en_default2,
|
|
19775
20010
|
eo: () => eo_default,
|
|
19776
20011
|
es: () => es_default,
|
|
@@ -19779,6 +20014,7 @@ __export(locales_exports, {
|
|
|
19779
20014
|
fr: () => fr_default,
|
|
19780
20015
|
frCA: () => fr_CA_default,
|
|
19781
20016
|
he: () => he_default,
|
|
20017
|
+
hr: () => hr_default,
|
|
19782
20018
|
hu: () => hu_default,
|
|
19783
20019
|
hy: () => hy_default,
|
|
19784
20020
|
id: () => id_default,
|
|
@@ -19798,6 +20034,7 @@ __export(locales_exports, {
|
|
|
19798
20034
|
pl: () => pl_default,
|
|
19799
20035
|
ps: () => ps_default,
|
|
19800
20036
|
pt: () => pt_default,
|
|
20037
|
+
ro: () => ro_default,
|
|
19801
20038
|
ru: () => ru_default,
|
|
19802
20039
|
sl: () => sl_default,
|
|
19803
20040
|
sv: () => sv_default,
|
|
@@ -20751,8 +20988,118 @@ function de_default() {
|
|
|
20751
20988
|
};
|
|
20752
20989
|
}
|
|
20753
20990
|
|
|
20754
|
-
// node_modules/zod/v4/locales/
|
|
20991
|
+
// node_modules/zod/v4/locales/el.js
|
|
20755
20992
|
var error9 = () => {
|
|
20993
|
+
const Sizable = {
|
|
20994
|
+
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
20995
|
+
file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
20996
|
+
array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
20997
|
+
set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
20998
|
+
map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
|
|
20999
|
+
};
|
|
21000
|
+
function getSizing(origin) {
|
|
21001
|
+
return Sizable[origin] ?? null;
|
|
21002
|
+
}
|
|
21003
|
+
const FormatDictionary = {
|
|
21004
|
+
regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
|
|
21005
|
+
email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
|
|
21006
|
+
url: "URL",
|
|
21007
|
+
emoji: "emoji",
|
|
21008
|
+
uuid: "UUID",
|
|
21009
|
+
uuidv4: "UUIDv4",
|
|
21010
|
+
uuidv6: "UUIDv6",
|
|
21011
|
+
nanoid: "nanoid",
|
|
21012
|
+
guid: "GUID",
|
|
21013
|
+
cuid: "cuid",
|
|
21014
|
+
cuid2: "cuid2",
|
|
21015
|
+
ulid: "ULID",
|
|
21016
|
+
xid: "XID",
|
|
21017
|
+
ksuid: "KSUID",
|
|
21018
|
+
datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
|
|
21019
|
+
date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
|
|
21020
|
+
time: "ISO \u03CE\u03C1\u03B1",
|
|
21021
|
+
duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
|
|
21022
|
+
ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
|
|
21023
|
+
ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
|
|
21024
|
+
mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
|
|
21025
|
+
cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
|
|
21026
|
+
cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
|
|
21027
|
+
base64: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",
|
|
21028
|
+
base64url: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",
|
|
21029
|
+
json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
|
|
21030
|
+
e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
|
|
21031
|
+
jwt: "JWT",
|
|
21032
|
+
template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
|
|
21033
|
+
};
|
|
21034
|
+
const TypeDictionary = {
|
|
21035
|
+
nan: "NaN"
|
|
21036
|
+
};
|
|
21037
|
+
return (issue2) => {
|
|
21038
|
+
switch (issue2.code) {
|
|
21039
|
+
case "invalid_type": {
|
|
21040
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
21041
|
+
const receivedType = parsedType(issue2.input);
|
|
21042
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
21043
|
+
if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
|
|
21044
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${issue2.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
|
|
21045
|
+
}
|
|
21046
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
|
|
21047
|
+
}
|
|
21048
|
+
case "invalid_value":
|
|
21049
|
+
if (issue2.values.length === 1)
|
|
21050
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${stringifyPrimitive(issue2.values[0])}`;
|
|
21051
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${joinValues(issue2.values, "|")}`;
|
|
21052
|
+
case "too_big": {
|
|
21053
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
21054
|
+
const sizing = getSizing(issue2.origin);
|
|
21055
|
+
if (sizing)
|
|
21056
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`;
|
|
21057
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.maximum.toString()}`;
|
|
21058
|
+
}
|
|
21059
|
+
case "too_small": {
|
|
21060
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
21061
|
+
const sizing = getSizing(issue2.origin);
|
|
21062
|
+
if (sizing) {
|
|
21063
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
21064
|
+
}
|
|
21065
|
+
return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.minimum.toString()}`;
|
|
21066
|
+
}
|
|
21067
|
+
case "invalid_format": {
|
|
21068
|
+
const _issue = issue2;
|
|
21069
|
+
if (_issue.format === "starts_with") {
|
|
21070
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${_issue.prefix}"`;
|
|
21071
|
+
}
|
|
21072
|
+
if (_issue.format === "ends_with")
|
|
21073
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${_issue.suffix}"`;
|
|
21074
|
+
if (_issue.format === "includes")
|
|
21075
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${_issue.includes}"`;
|
|
21076
|
+
if (_issue.format === "regex")
|
|
21077
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${_issue.pattern}`;
|
|
21078
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
21079
|
+
}
|
|
21080
|
+
case "not_multiple_of":
|
|
21081
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${issue2.divisor}`;
|
|
21082
|
+
case "unrecognized_keys":
|
|
21083
|
+
return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${issue2.keys.length > 1 ? "\u03B1" : "\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${issue2.keys.length > 1 ? "\u03B9\u03AC" : "\u03AF"}: ${joinValues(issue2.keys, ", ")}`;
|
|
21084
|
+
case "invalid_key":
|
|
21085
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
21086
|
+
case "invalid_union":
|
|
21087
|
+
return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
|
|
21088
|
+
case "invalid_element":
|
|
21089
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
|
|
21090
|
+
default:
|
|
21091
|
+
return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
|
|
21092
|
+
}
|
|
21093
|
+
};
|
|
21094
|
+
};
|
|
21095
|
+
function el_default() {
|
|
21096
|
+
return {
|
|
21097
|
+
localeError: error9()
|
|
21098
|
+
};
|
|
21099
|
+
}
|
|
21100
|
+
|
|
21101
|
+
// node_modules/zod/v4/locales/en.js
|
|
21102
|
+
var error10 = () => {
|
|
20756
21103
|
const Sizable = {
|
|
20757
21104
|
string: { unit: "characters", verb: "to have" },
|
|
20758
21105
|
file: { unit: "bytes", verb: "to have" },
|
|
@@ -20846,6 +21193,10 @@ var error9 = () => {
|
|
|
20846
21193
|
case "invalid_key":
|
|
20847
21194
|
return `Invalid key in ${issue2.origin}`;
|
|
20848
21195
|
case "invalid_union":
|
|
21196
|
+
if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
|
|
21197
|
+
const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
|
|
21198
|
+
return `Invalid discriminator value. Expected ${opts}`;
|
|
21199
|
+
}
|
|
20849
21200
|
return "Invalid input";
|
|
20850
21201
|
case "invalid_element":
|
|
20851
21202
|
return `Invalid value in ${issue2.origin}`;
|
|
@@ -20856,12 +21207,12 @@ var error9 = () => {
|
|
|
20856
21207
|
};
|
|
20857
21208
|
function en_default2() {
|
|
20858
21209
|
return {
|
|
20859
|
-
localeError:
|
|
21210
|
+
localeError: error10()
|
|
20860
21211
|
};
|
|
20861
21212
|
}
|
|
20862
21213
|
|
|
20863
21214
|
// node_modules/zod/v4/locales/eo.js
|
|
20864
|
-
var
|
|
21215
|
+
var error11 = () => {
|
|
20865
21216
|
const Sizable = {
|
|
20866
21217
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
20867
21218
|
file: { unit: "bajtojn", verb: "havi" },
|
|
@@ -20966,12 +21317,12 @@ var error10 = () => {
|
|
|
20966
21317
|
};
|
|
20967
21318
|
function eo_default() {
|
|
20968
21319
|
return {
|
|
20969
|
-
localeError:
|
|
21320
|
+
localeError: error11()
|
|
20970
21321
|
};
|
|
20971
21322
|
}
|
|
20972
21323
|
|
|
20973
21324
|
// node_modules/zod/v4/locales/es.js
|
|
20974
|
-
var
|
|
21325
|
+
var error12 = () => {
|
|
20975
21326
|
const Sizable = {
|
|
20976
21327
|
string: { unit: "caracteres", verb: "tener" },
|
|
20977
21328
|
file: { unit: "bytes", verb: "tener" },
|
|
@@ -21099,12 +21450,12 @@ var error11 = () => {
|
|
|
21099
21450
|
};
|
|
21100
21451
|
function es_default() {
|
|
21101
21452
|
return {
|
|
21102
|
-
localeError:
|
|
21453
|
+
localeError: error12()
|
|
21103
21454
|
};
|
|
21104
21455
|
}
|
|
21105
21456
|
|
|
21106
21457
|
// node_modules/zod/v4/locales/fa.js
|
|
21107
|
-
var
|
|
21458
|
+
var error13 = () => {
|
|
21108
21459
|
const Sizable = {
|
|
21109
21460
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
21110
21461
|
file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -21214,12 +21565,12 @@ var error12 = () => {
|
|
|
21214
21565
|
};
|
|
21215
21566
|
function fa_default() {
|
|
21216
21567
|
return {
|
|
21217
|
-
localeError:
|
|
21568
|
+
localeError: error13()
|
|
21218
21569
|
};
|
|
21219
21570
|
}
|
|
21220
21571
|
|
|
21221
21572
|
// node_modules/zod/v4/locales/fi.js
|
|
21222
|
-
var
|
|
21573
|
+
var error14 = () => {
|
|
21223
21574
|
const Sizable = {
|
|
21224
21575
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
21225
21576
|
file: { unit: "tavua", subject: "tiedoston" },
|
|
@@ -21327,12 +21678,12 @@ var error13 = () => {
|
|
|
21327
21678
|
};
|
|
21328
21679
|
function fi_default() {
|
|
21329
21680
|
return {
|
|
21330
|
-
localeError:
|
|
21681
|
+
localeError: error14()
|
|
21331
21682
|
};
|
|
21332
21683
|
}
|
|
21333
21684
|
|
|
21334
21685
|
// node_modules/zod/v4/locales/fr.js
|
|
21335
|
-
var
|
|
21686
|
+
var error15 = () => {
|
|
21336
21687
|
const Sizable = {
|
|
21337
21688
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
21338
21689
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -21373,9 +21724,27 @@ var error14 = () => {
|
|
|
21373
21724
|
template_literal: "entr\xE9e"
|
|
21374
21725
|
};
|
|
21375
21726
|
const TypeDictionary = {
|
|
21376
|
-
|
|
21727
|
+
string: "cha\xEEne",
|
|
21377
21728
|
number: "nombre",
|
|
21378
|
-
|
|
21729
|
+
int: "entier",
|
|
21730
|
+
boolean: "bool\xE9en",
|
|
21731
|
+
bigint: "grand entier",
|
|
21732
|
+
symbol: "symbole",
|
|
21733
|
+
undefined: "ind\xE9fini",
|
|
21734
|
+
null: "null",
|
|
21735
|
+
never: "jamais",
|
|
21736
|
+
void: "vide",
|
|
21737
|
+
date: "date",
|
|
21738
|
+
array: "tableau",
|
|
21739
|
+
object: "objet",
|
|
21740
|
+
tuple: "tuple",
|
|
21741
|
+
record: "enregistrement",
|
|
21742
|
+
map: "carte",
|
|
21743
|
+
set: "ensemble",
|
|
21744
|
+
file: "fichier",
|
|
21745
|
+
nonoptional: "non-optionnel",
|
|
21746
|
+
nan: "NaN",
|
|
21747
|
+
function: "fonction"
|
|
21379
21748
|
};
|
|
21380
21749
|
return (issue2) => {
|
|
21381
21750
|
switch (issue2.code) {
|
|
@@ -21396,16 +21765,15 @@ var error14 = () => {
|
|
|
21396
21765
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
21397
21766
|
const sizing = getSizing(issue2.origin);
|
|
21398
21767
|
if (sizing)
|
|
21399
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
21400
|
-
return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
21768
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
|
|
21769
|
+
return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
|
|
21401
21770
|
}
|
|
21402
21771
|
case "too_small": {
|
|
21403
21772
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
21404
21773
|
const sizing = getSizing(issue2.origin);
|
|
21405
|
-
if (sizing)
|
|
21406
|
-
return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
21407
|
-
}
|
|
21408
|
-
return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
21774
|
+
if (sizing)
|
|
21775
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
21776
|
+
return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
|
|
21409
21777
|
}
|
|
21410
21778
|
case "invalid_format": {
|
|
21411
21779
|
const _issue = issue2;
|
|
@@ -21436,12 +21804,12 @@ var error14 = () => {
|
|
|
21436
21804
|
};
|
|
21437
21805
|
function fr_default() {
|
|
21438
21806
|
return {
|
|
21439
|
-
localeError:
|
|
21807
|
+
localeError: error15()
|
|
21440
21808
|
};
|
|
21441
21809
|
}
|
|
21442
21810
|
|
|
21443
21811
|
// node_modules/zod/v4/locales/fr-CA.js
|
|
21444
|
-
var
|
|
21812
|
+
var error16 = () => {
|
|
21445
21813
|
const Sizable = {
|
|
21446
21814
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
21447
21815
|
file: { unit: "octets", verb: "avoir" },
|
|
@@ -21544,12 +21912,12 @@ var error15 = () => {
|
|
|
21544
21912
|
};
|
|
21545
21913
|
function fr_CA_default() {
|
|
21546
21914
|
return {
|
|
21547
|
-
localeError:
|
|
21915
|
+
localeError: error16()
|
|
21548
21916
|
};
|
|
21549
21917
|
}
|
|
21550
21918
|
|
|
21551
21919
|
// node_modules/zod/v4/locales/he.js
|
|
21552
|
-
var
|
|
21920
|
+
var error17 = () => {
|
|
21553
21921
|
const TypeNames = {
|
|
21554
21922
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
21555
21923
|
number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
|
|
@@ -21739,12 +22107,135 @@ var error16 = () => {
|
|
|
21739
22107
|
};
|
|
21740
22108
|
function he_default() {
|
|
21741
22109
|
return {
|
|
21742
|
-
localeError:
|
|
22110
|
+
localeError: error17()
|
|
22111
|
+
};
|
|
22112
|
+
}
|
|
22113
|
+
|
|
22114
|
+
// node_modules/zod/v4/locales/hr.js
|
|
22115
|
+
var error18 = () => {
|
|
22116
|
+
const Sizable = {
|
|
22117
|
+
string: { unit: "znakova", verb: "imati" },
|
|
22118
|
+
file: { unit: "bajtova", verb: "imati" },
|
|
22119
|
+
array: { unit: "stavki", verb: "imati" },
|
|
22120
|
+
set: { unit: "stavki", verb: "imati" }
|
|
22121
|
+
};
|
|
22122
|
+
function getSizing(origin) {
|
|
22123
|
+
return Sizable[origin] ?? null;
|
|
22124
|
+
}
|
|
22125
|
+
const FormatDictionary = {
|
|
22126
|
+
regex: "unos",
|
|
22127
|
+
email: "email adresa",
|
|
22128
|
+
url: "URL",
|
|
22129
|
+
emoji: "emoji",
|
|
22130
|
+
uuid: "UUID",
|
|
22131
|
+
uuidv4: "UUIDv4",
|
|
22132
|
+
uuidv6: "UUIDv6",
|
|
22133
|
+
nanoid: "nanoid",
|
|
22134
|
+
guid: "GUID",
|
|
22135
|
+
cuid: "cuid",
|
|
22136
|
+
cuid2: "cuid2",
|
|
22137
|
+
ulid: "ULID",
|
|
22138
|
+
xid: "XID",
|
|
22139
|
+
ksuid: "KSUID",
|
|
22140
|
+
datetime: "ISO datum i vrijeme",
|
|
22141
|
+
date: "ISO datum",
|
|
22142
|
+
time: "ISO vrijeme",
|
|
22143
|
+
duration: "ISO trajanje",
|
|
22144
|
+
ipv4: "IPv4 adresa",
|
|
22145
|
+
ipv6: "IPv6 adresa",
|
|
22146
|
+
cidrv4: "IPv4 raspon",
|
|
22147
|
+
cidrv6: "IPv6 raspon",
|
|
22148
|
+
base64: "base64 kodirani tekst",
|
|
22149
|
+
base64url: "base64url kodirani tekst",
|
|
22150
|
+
json_string: "JSON tekst",
|
|
22151
|
+
e164: "E.164 broj",
|
|
22152
|
+
jwt: "JWT",
|
|
22153
|
+
template_literal: "unos"
|
|
22154
|
+
};
|
|
22155
|
+
const TypeDictionary = {
|
|
22156
|
+
nan: "NaN",
|
|
22157
|
+
string: "tekst",
|
|
22158
|
+
number: "broj",
|
|
22159
|
+
boolean: "boolean",
|
|
22160
|
+
array: "niz",
|
|
22161
|
+
object: "objekt",
|
|
22162
|
+
set: "skup",
|
|
22163
|
+
file: "datoteka",
|
|
22164
|
+
date: "datum",
|
|
22165
|
+
bigint: "bigint",
|
|
22166
|
+
symbol: "simbol",
|
|
22167
|
+
undefined: "undefined",
|
|
22168
|
+
null: "null",
|
|
22169
|
+
function: "funkcija",
|
|
22170
|
+
map: "mapa"
|
|
22171
|
+
};
|
|
22172
|
+
return (issue2) => {
|
|
22173
|
+
switch (issue2.code) {
|
|
22174
|
+
case "invalid_type": {
|
|
22175
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
22176
|
+
const receivedType = parsedType(issue2.input);
|
|
22177
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
22178
|
+
if (/^[A-Z]/.test(issue2.expected)) {
|
|
22179
|
+
return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
|
|
22180
|
+
}
|
|
22181
|
+
return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
|
|
22182
|
+
}
|
|
22183
|
+
case "invalid_value":
|
|
22184
|
+
if (issue2.values.length === 1)
|
|
22185
|
+
return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
|
|
22186
|
+
return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
|
|
22187
|
+
case "too_big": {
|
|
22188
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
22189
|
+
const sizing = getSizing(issue2.origin);
|
|
22190
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
22191
|
+
if (sizing)
|
|
22192
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
|
|
22193
|
+
return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
|
|
22194
|
+
}
|
|
22195
|
+
case "too_small": {
|
|
22196
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
22197
|
+
const sizing = getSizing(issue2.origin);
|
|
22198
|
+
const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
22199
|
+
if (sizing) {
|
|
22200
|
+
return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
22201
|
+
}
|
|
22202
|
+
return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
|
|
22203
|
+
}
|
|
22204
|
+
case "invalid_format": {
|
|
22205
|
+
const _issue = issue2;
|
|
22206
|
+
if (_issue.format === "starts_with")
|
|
22207
|
+
return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
|
|
22208
|
+
if (_issue.format === "ends_with")
|
|
22209
|
+
return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
|
|
22210
|
+
if (_issue.format === "includes")
|
|
22211
|
+
return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
|
|
22212
|
+
if (_issue.format === "regex")
|
|
22213
|
+
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
|
|
22214
|
+
return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
22215
|
+
}
|
|
22216
|
+
case "not_multiple_of":
|
|
22217
|
+
return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
|
|
22218
|
+
case "unrecognized_keys":
|
|
22219
|
+
return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
|
|
22220
|
+
case "invalid_key":
|
|
22221
|
+
return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
22222
|
+
case "invalid_union":
|
|
22223
|
+
return "Neispravan unos";
|
|
22224
|
+
case "invalid_element":
|
|
22225
|
+
return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
|
|
22226
|
+
default:
|
|
22227
|
+
return `Neispravan unos`;
|
|
22228
|
+
}
|
|
22229
|
+
};
|
|
22230
|
+
};
|
|
22231
|
+
function hr_default() {
|
|
22232
|
+
return {
|
|
22233
|
+
localeError: error18()
|
|
21743
22234
|
};
|
|
21744
22235
|
}
|
|
21745
22236
|
|
|
21746
22237
|
// node_modules/zod/v4/locales/hu.js
|
|
21747
|
-
var
|
|
22238
|
+
var error19 = () => {
|
|
21748
22239
|
const Sizable = {
|
|
21749
22240
|
string: { unit: "karakter", verb: "legyen" },
|
|
21750
22241
|
file: { unit: "byte", verb: "legyen" },
|
|
@@ -21848,7 +22339,7 @@ var error17 = () => {
|
|
|
21848
22339
|
};
|
|
21849
22340
|
function hu_default() {
|
|
21850
22341
|
return {
|
|
21851
|
-
localeError:
|
|
22342
|
+
localeError: error19()
|
|
21852
22343
|
};
|
|
21853
22344
|
}
|
|
21854
22345
|
|
|
@@ -21863,7 +22354,7 @@ function withDefiniteArticle(word) {
|
|
|
21863
22354
|
const lastChar = word[word.length - 1];
|
|
21864
22355
|
return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
|
|
21865
22356
|
}
|
|
21866
|
-
var
|
|
22357
|
+
var error20 = () => {
|
|
21867
22358
|
const Sizable = {
|
|
21868
22359
|
string: {
|
|
21869
22360
|
unit: {
|
|
@@ -21996,12 +22487,12 @@ var error18 = () => {
|
|
|
21996
22487
|
};
|
|
21997
22488
|
function hy_default() {
|
|
21998
22489
|
return {
|
|
21999
|
-
localeError:
|
|
22490
|
+
localeError: error20()
|
|
22000
22491
|
};
|
|
22001
22492
|
}
|
|
22002
22493
|
|
|
22003
22494
|
// node_modules/zod/v4/locales/id.js
|
|
22004
|
-
var
|
|
22495
|
+
var error21 = () => {
|
|
22005
22496
|
const Sizable = {
|
|
22006
22497
|
string: { unit: "karakter", verb: "memiliki" },
|
|
22007
22498
|
file: { unit: "byte", verb: "memiliki" },
|
|
@@ -22103,12 +22594,12 @@ var error19 = () => {
|
|
|
22103
22594
|
};
|
|
22104
22595
|
function id_default() {
|
|
22105
22596
|
return {
|
|
22106
|
-
localeError:
|
|
22597
|
+
localeError: error21()
|
|
22107
22598
|
};
|
|
22108
22599
|
}
|
|
22109
22600
|
|
|
22110
22601
|
// node_modules/zod/v4/locales/is.js
|
|
22111
|
-
var
|
|
22602
|
+
var error22 = () => {
|
|
22112
22603
|
const Sizable = {
|
|
22113
22604
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
22114
22605
|
file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
|
|
@@ -22213,12 +22704,12 @@ var error20 = () => {
|
|
|
22213
22704
|
};
|
|
22214
22705
|
function is_default() {
|
|
22215
22706
|
return {
|
|
22216
|
-
localeError:
|
|
22707
|
+
localeError: error22()
|
|
22217
22708
|
};
|
|
22218
22709
|
}
|
|
22219
22710
|
|
|
22220
22711
|
// node_modules/zod/v4/locales/it.js
|
|
22221
|
-
var
|
|
22712
|
+
var error23 = () => {
|
|
22222
22713
|
const Sizable = {
|
|
22223
22714
|
string: { unit: "caratteri", verb: "avere" },
|
|
22224
22715
|
file: { unit: "byte", verb: "avere" },
|
|
@@ -22303,7 +22794,7 @@ var error21 = () => {
|
|
|
22303
22794
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
22304
22795
|
if (_issue.format === "regex")
|
|
22305
22796
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
22306
|
-
return `
|
|
22797
|
+
return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
22307
22798
|
}
|
|
22308
22799
|
case "not_multiple_of":
|
|
22309
22800
|
return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
|
|
@@ -22322,12 +22813,12 @@ var error21 = () => {
|
|
|
22322
22813
|
};
|
|
22323
22814
|
function it_default() {
|
|
22324
22815
|
return {
|
|
22325
|
-
localeError:
|
|
22816
|
+
localeError: error23()
|
|
22326
22817
|
};
|
|
22327
22818
|
}
|
|
22328
22819
|
|
|
22329
22820
|
// node_modules/zod/v4/locales/ja.js
|
|
22330
|
-
var
|
|
22821
|
+
var error24 = () => {
|
|
22331
22822
|
const Sizable = {
|
|
22332
22823
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
22333
22824
|
file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
|
|
@@ -22430,12 +22921,12 @@ var error22 = () => {
|
|
|
22430
22921
|
};
|
|
22431
22922
|
function ja_default() {
|
|
22432
22923
|
return {
|
|
22433
|
-
localeError:
|
|
22924
|
+
localeError: error24()
|
|
22434
22925
|
};
|
|
22435
22926
|
}
|
|
22436
22927
|
|
|
22437
22928
|
// node_modules/zod/v4/locales/ka.js
|
|
22438
|
-
var
|
|
22929
|
+
var error25 = () => {
|
|
22439
22930
|
const Sizable = {
|
|
22440
22931
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
22441
22932
|
file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -22468,9 +22959,9 @@ var error23 = () => {
|
|
|
22468
22959
|
ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
|
|
22469
22960
|
cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
22470
22961
|
cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
|
|
22471
|
-
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
22472
|
-
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \
|
|
22473
|
-
json_string: "JSON \
|
|
22962
|
+
base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
22963
|
+
base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
|
|
22964
|
+
json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
|
|
22474
22965
|
e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
|
|
22475
22966
|
jwt: "JWT",
|
|
22476
22967
|
template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
|
|
@@ -22478,7 +22969,7 @@ var error23 = () => {
|
|
|
22478
22969
|
const TypeDictionary = {
|
|
22479
22970
|
nan: "NaN",
|
|
22480
22971
|
number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
|
|
22481
|
-
string: "\
|
|
22972
|
+
string: "\u10D5\u10D4\u10DA\u10D8",
|
|
22482
22973
|
boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
|
|
22483
22974
|
function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
|
|
22484
22975
|
array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
|
|
@@ -22516,14 +23007,14 @@ var error23 = () => {
|
|
|
22516
23007
|
case "invalid_format": {
|
|
22517
23008
|
const _issue = issue2;
|
|
22518
23009
|
if (_issue.format === "starts_with") {
|
|
22519
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
23010
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
|
|
22520
23011
|
}
|
|
22521
23012
|
if (_issue.format === "ends_with")
|
|
22522
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
23013
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`;
|
|
22523
23014
|
if (_issue.format === "includes")
|
|
22524
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
23015
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`;
|
|
22525
23016
|
if (_issue.format === "regex")
|
|
22526
|
-
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \
|
|
23017
|
+
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;
|
|
22527
23018
|
return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
22528
23019
|
}
|
|
22529
23020
|
case "not_multiple_of":
|
|
@@ -22543,12 +23034,12 @@ var error23 = () => {
|
|
|
22543
23034
|
};
|
|
22544
23035
|
function ka_default() {
|
|
22545
23036
|
return {
|
|
22546
|
-
localeError:
|
|
23037
|
+
localeError: error25()
|
|
22547
23038
|
};
|
|
22548
23039
|
}
|
|
22549
23040
|
|
|
22550
23041
|
// node_modules/zod/v4/locales/km.js
|
|
22551
|
-
var
|
|
23042
|
+
var error26 = () => {
|
|
22552
23043
|
const Sizable = {
|
|
22553
23044
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
22554
23045
|
file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -22654,7 +23145,7 @@ var error24 = () => {
|
|
|
22654
23145
|
};
|
|
22655
23146
|
function km_default() {
|
|
22656
23147
|
return {
|
|
22657
|
-
localeError:
|
|
23148
|
+
localeError: error26()
|
|
22658
23149
|
};
|
|
22659
23150
|
}
|
|
22660
23151
|
|
|
@@ -22664,7 +23155,7 @@ function kh_default() {
|
|
|
22664
23155
|
}
|
|
22665
23156
|
|
|
22666
23157
|
// node_modules/zod/v4/locales/ko.js
|
|
22667
|
-
var
|
|
23158
|
+
var error27 = () => {
|
|
22668
23159
|
const Sizable = {
|
|
22669
23160
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
22670
23161
|
file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
|
|
@@ -22771,7 +23262,7 @@ var error25 = () => {
|
|
|
22771
23262
|
};
|
|
22772
23263
|
function ko_default() {
|
|
22773
23264
|
return {
|
|
22774
|
-
localeError:
|
|
23265
|
+
localeError: error27()
|
|
22775
23266
|
};
|
|
22776
23267
|
}
|
|
22777
23268
|
|
|
@@ -22789,7 +23280,7 @@ function getUnitTypeFromNumber(number4) {
|
|
|
22789
23280
|
return "one";
|
|
22790
23281
|
return "few";
|
|
22791
23282
|
}
|
|
22792
|
-
var
|
|
23283
|
+
var error28 = () => {
|
|
22793
23284
|
const Sizable = {
|
|
22794
23285
|
string: {
|
|
22795
23286
|
unit: {
|
|
@@ -22975,12 +23466,12 @@ var error26 = () => {
|
|
|
22975
23466
|
};
|
|
22976
23467
|
function lt_default() {
|
|
22977
23468
|
return {
|
|
22978
|
-
localeError:
|
|
23469
|
+
localeError: error28()
|
|
22979
23470
|
};
|
|
22980
23471
|
}
|
|
22981
23472
|
|
|
22982
23473
|
// node_modules/zod/v4/locales/mk.js
|
|
22983
|
-
var
|
|
23474
|
+
var error29 = () => {
|
|
22984
23475
|
const Sizable = {
|
|
22985
23476
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
22986
23477
|
file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -23085,12 +23576,12 @@ var error27 = () => {
|
|
|
23085
23576
|
};
|
|
23086
23577
|
function mk_default() {
|
|
23087
23578
|
return {
|
|
23088
|
-
localeError:
|
|
23579
|
+
localeError: error29()
|
|
23089
23580
|
};
|
|
23090
23581
|
}
|
|
23091
23582
|
|
|
23092
23583
|
// node_modules/zod/v4/locales/ms.js
|
|
23093
|
-
var
|
|
23584
|
+
var error30 = () => {
|
|
23094
23585
|
const Sizable = {
|
|
23095
23586
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
23096
23587
|
file: { unit: "bait", verb: "mempunyai" },
|
|
@@ -23193,12 +23684,12 @@ var error28 = () => {
|
|
|
23193
23684
|
};
|
|
23194
23685
|
function ms_default() {
|
|
23195
23686
|
return {
|
|
23196
|
-
localeError:
|
|
23687
|
+
localeError: error30()
|
|
23197
23688
|
};
|
|
23198
23689
|
}
|
|
23199
23690
|
|
|
23200
23691
|
// node_modules/zod/v4/locales/nl.js
|
|
23201
|
-
var
|
|
23692
|
+
var error31 = () => {
|
|
23202
23693
|
const Sizable = {
|
|
23203
23694
|
string: { unit: "tekens", verb: "heeft" },
|
|
23204
23695
|
file: { unit: "bytes", verb: "heeft" },
|
|
@@ -23304,12 +23795,12 @@ var error29 = () => {
|
|
|
23304
23795
|
};
|
|
23305
23796
|
function nl_default() {
|
|
23306
23797
|
return {
|
|
23307
|
-
localeError:
|
|
23798
|
+
localeError: error31()
|
|
23308
23799
|
};
|
|
23309
23800
|
}
|
|
23310
23801
|
|
|
23311
23802
|
// node_modules/zod/v4/locales/no.js
|
|
23312
|
-
var
|
|
23803
|
+
var error32 = () => {
|
|
23313
23804
|
const Sizable = {
|
|
23314
23805
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
23315
23806
|
file: { unit: "bytes", verb: "\xE5 ha" },
|
|
@@ -23413,12 +23904,12 @@ var error30 = () => {
|
|
|
23413
23904
|
};
|
|
23414
23905
|
function no_default() {
|
|
23415
23906
|
return {
|
|
23416
|
-
localeError:
|
|
23907
|
+
localeError: error32()
|
|
23417
23908
|
};
|
|
23418
23909
|
}
|
|
23419
23910
|
|
|
23420
23911
|
// node_modules/zod/v4/locales/ota.js
|
|
23421
|
-
var
|
|
23912
|
+
var error33 = () => {
|
|
23422
23913
|
const Sizable = {
|
|
23423
23914
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
23424
23915
|
file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
|
|
@@ -23523,12 +24014,12 @@ var error31 = () => {
|
|
|
23523
24014
|
};
|
|
23524
24015
|
function ota_default() {
|
|
23525
24016
|
return {
|
|
23526
|
-
localeError:
|
|
24017
|
+
localeError: error33()
|
|
23527
24018
|
};
|
|
23528
24019
|
}
|
|
23529
24020
|
|
|
23530
24021
|
// node_modules/zod/v4/locales/ps.js
|
|
23531
|
-
var
|
|
24022
|
+
var error34 = () => {
|
|
23532
24023
|
const Sizable = {
|
|
23533
24024
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
23534
24025
|
file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -23638,12 +24129,12 @@ var error32 = () => {
|
|
|
23638
24129
|
};
|
|
23639
24130
|
function ps_default() {
|
|
23640
24131
|
return {
|
|
23641
|
-
localeError:
|
|
24132
|
+
localeError: error34()
|
|
23642
24133
|
};
|
|
23643
24134
|
}
|
|
23644
24135
|
|
|
23645
24136
|
// node_modules/zod/v4/locales/pl.js
|
|
23646
|
-
var
|
|
24137
|
+
var error35 = () => {
|
|
23647
24138
|
const Sizable = {
|
|
23648
24139
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
23649
24140
|
file: { unit: "bajt\xF3w", verb: "mie\u0107" },
|
|
@@ -23748,12 +24239,12 @@ var error33 = () => {
|
|
|
23748
24239
|
};
|
|
23749
24240
|
function pl_default() {
|
|
23750
24241
|
return {
|
|
23751
|
-
localeError:
|
|
24242
|
+
localeError: error35()
|
|
23752
24243
|
};
|
|
23753
24244
|
}
|
|
23754
24245
|
|
|
23755
24246
|
// node_modules/zod/v4/locales/pt.js
|
|
23756
|
-
var
|
|
24247
|
+
var error36 = () => {
|
|
23757
24248
|
const Sizable = {
|
|
23758
24249
|
string: { unit: "caracteres", verb: "ter" },
|
|
23759
24250
|
file: { unit: "bytes", verb: "ter" },
|
|
@@ -23857,7 +24348,127 @@ var error34 = () => {
|
|
|
23857
24348
|
};
|
|
23858
24349
|
function pt_default() {
|
|
23859
24350
|
return {
|
|
23860
|
-
localeError:
|
|
24351
|
+
localeError: error36()
|
|
24352
|
+
};
|
|
24353
|
+
}
|
|
24354
|
+
|
|
24355
|
+
// node_modules/zod/v4/locales/ro.js
|
|
24356
|
+
var error37 = () => {
|
|
24357
|
+
const Sizable = {
|
|
24358
|
+
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
24359
|
+
file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
|
|
24360
|
+
array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
24361
|
+
set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
|
|
24362
|
+
map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
|
|
24363
|
+
};
|
|
24364
|
+
function getSizing(origin) {
|
|
24365
|
+
return Sizable[origin] ?? null;
|
|
24366
|
+
}
|
|
24367
|
+
const FormatDictionary = {
|
|
24368
|
+
regex: "intrare",
|
|
24369
|
+
email: "adres\u0103 de email",
|
|
24370
|
+
url: "URL",
|
|
24371
|
+
emoji: "emoji",
|
|
24372
|
+
uuid: "UUID",
|
|
24373
|
+
uuidv4: "UUIDv4",
|
|
24374
|
+
uuidv6: "UUIDv6",
|
|
24375
|
+
nanoid: "nanoid",
|
|
24376
|
+
guid: "GUID",
|
|
24377
|
+
cuid: "cuid",
|
|
24378
|
+
cuid2: "cuid2",
|
|
24379
|
+
ulid: "ULID",
|
|
24380
|
+
xid: "XID",
|
|
24381
|
+
ksuid: "KSUID",
|
|
24382
|
+
datetime: "dat\u0103 \u0219i or\u0103 ISO",
|
|
24383
|
+
date: "dat\u0103 ISO",
|
|
24384
|
+
time: "or\u0103 ISO",
|
|
24385
|
+
duration: "durat\u0103 ISO",
|
|
24386
|
+
ipv4: "adres\u0103 IPv4",
|
|
24387
|
+
ipv6: "adres\u0103 IPv6",
|
|
24388
|
+
mac: "adres\u0103 MAC",
|
|
24389
|
+
cidrv4: "interval IPv4",
|
|
24390
|
+
cidrv6: "interval IPv6",
|
|
24391
|
+
base64: "\u0219ir codat base64",
|
|
24392
|
+
base64url: "\u0219ir codat base64url",
|
|
24393
|
+
json_string: "\u0219ir JSON",
|
|
24394
|
+
e164: "num\u0103r E.164",
|
|
24395
|
+
jwt: "JWT",
|
|
24396
|
+
template_literal: "intrare"
|
|
24397
|
+
};
|
|
24398
|
+
const TypeDictionary = {
|
|
24399
|
+
nan: "NaN",
|
|
24400
|
+
string: "\u0219ir",
|
|
24401
|
+
number: "num\u0103r",
|
|
24402
|
+
boolean: "boolean",
|
|
24403
|
+
function: "func\u021Bie",
|
|
24404
|
+
array: "matrice",
|
|
24405
|
+
object: "obiect",
|
|
24406
|
+
undefined: "nedefinit",
|
|
24407
|
+
symbol: "simbol",
|
|
24408
|
+
bigint: "num\u0103r mare",
|
|
24409
|
+
void: "void",
|
|
24410
|
+
never: "never",
|
|
24411
|
+
map: "hart\u0103",
|
|
24412
|
+
set: "set"
|
|
24413
|
+
};
|
|
24414
|
+
return (issue2) => {
|
|
24415
|
+
switch (issue2.code) {
|
|
24416
|
+
case "invalid_type": {
|
|
24417
|
+
const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
|
|
24418
|
+
const receivedType = parsedType(issue2.input);
|
|
24419
|
+
const received = TypeDictionary[receivedType] ?? receivedType;
|
|
24420
|
+
return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
|
|
24421
|
+
}
|
|
24422
|
+
case "invalid_value":
|
|
24423
|
+
if (issue2.values.length === 1)
|
|
24424
|
+
return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
|
|
24425
|
+
return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
|
|
24426
|
+
case "too_big": {
|
|
24427
|
+
const adj = issue2.inclusive ? "<=" : "<";
|
|
24428
|
+
const sizing = getSizing(issue2.origin);
|
|
24429
|
+
if (sizing)
|
|
24430
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
|
|
24431
|
+
return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
|
|
24432
|
+
}
|
|
24433
|
+
case "too_small": {
|
|
24434
|
+
const adj = issue2.inclusive ? ">=" : ">";
|
|
24435
|
+
const sizing = getSizing(issue2.origin);
|
|
24436
|
+
if (sizing) {
|
|
24437
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
24438
|
+
}
|
|
24439
|
+
return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
|
|
24440
|
+
}
|
|
24441
|
+
case "invalid_format": {
|
|
24442
|
+
const _issue = issue2;
|
|
24443
|
+
if (_issue.format === "starts_with") {
|
|
24444
|
+
return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
|
|
24445
|
+
}
|
|
24446
|
+
if (_issue.format === "ends_with")
|
|
24447
|
+
return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
|
|
24448
|
+
if (_issue.format === "includes")
|
|
24449
|
+
return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
|
|
24450
|
+
if (_issue.format === "regex")
|
|
24451
|
+
return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
|
|
24452
|
+
return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
|
|
24453
|
+
}
|
|
24454
|
+
case "not_multiple_of":
|
|
24455
|
+
return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
|
|
24456
|
+
case "unrecognized_keys":
|
|
24457
|
+
return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
|
|
24458
|
+
case "invalid_key":
|
|
24459
|
+
return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
|
|
24460
|
+
case "invalid_union":
|
|
24461
|
+
return "Intrare invalid\u0103";
|
|
24462
|
+
case "invalid_element":
|
|
24463
|
+
return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
|
|
24464
|
+
default:
|
|
24465
|
+
return `Intrare invalid\u0103`;
|
|
24466
|
+
}
|
|
24467
|
+
};
|
|
24468
|
+
};
|
|
24469
|
+
function ro_default() {
|
|
24470
|
+
return {
|
|
24471
|
+
localeError: error37()
|
|
23861
24472
|
};
|
|
23862
24473
|
}
|
|
23863
24474
|
|
|
@@ -23877,7 +24488,7 @@ function getRussianPlural(count, one, few, many) {
|
|
|
23877
24488
|
}
|
|
23878
24489
|
return many;
|
|
23879
24490
|
}
|
|
23880
|
-
var
|
|
24491
|
+
var error38 = () => {
|
|
23881
24492
|
const Sizable = {
|
|
23882
24493
|
string: {
|
|
23883
24494
|
unit: {
|
|
@@ -24014,12 +24625,12 @@ var error35 = () => {
|
|
|
24014
24625
|
};
|
|
24015
24626
|
function ru_default() {
|
|
24016
24627
|
return {
|
|
24017
|
-
localeError:
|
|
24628
|
+
localeError: error38()
|
|
24018
24629
|
};
|
|
24019
24630
|
}
|
|
24020
24631
|
|
|
24021
24632
|
// node_modules/zod/v4/locales/sl.js
|
|
24022
|
-
var
|
|
24633
|
+
var error39 = () => {
|
|
24023
24634
|
const Sizable = {
|
|
24024
24635
|
string: { unit: "znakov", verb: "imeti" },
|
|
24025
24636
|
file: { unit: "bajtov", verb: "imeti" },
|
|
@@ -24124,12 +24735,12 @@ var error36 = () => {
|
|
|
24124
24735
|
};
|
|
24125
24736
|
function sl_default() {
|
|
24126
24737
|
return {
|
|
24127
|
-
localeError:
|
|
24738
|
+
localeError: error39()
|
|
24128
24739
|
};
|
|
24129
24740
|
}
|
|
24130
24741
|
|
|
24131
24742
|
// node_modules/zod/v4/locales/sv.js
|
|
24132
|
-
var
|
|
24743
|
+
var error40 = () => {
|
|
24133
24744
|
const Sizable = {
|
|
24134
24745
|
string: { unit: "tecken", verb: "att ha" },
|
|
24135
24746
|
file: { unit: "bytes", verb: "att ha" },
|
|
@@ -24235,12 +24846,12 @@ var error37 = () => {
|
|
|
24235
24846
|
};
|
|
24236
24847
|
function sv_default() {
|
|
24237
24848
|
return {
|
|
24238
|
-
localeError:
|
|
24849
|
+
localeError: error40()
|
|
24239
24850
|
};
|
|
24240
24851
|
}
|
|
24241
24852
|
|
|
24242
24853
|
// node_modules/zod/v4/locales/ta.js
|
|
24243
|
-
var
|
|
24854
|
+
var error41 = () => {
|
|
24244
24855
|
const Sizable = {
|
|
24245
24856
|
string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
24246
24857
|
file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
@@ -24346,12 +24957,12 @@ var error38 = () => {
|
|
|
24346
24957
|
};
|
|
24347
24958
|
function ta_default() {
|
|
24348
24959
|
return {
|
|
24349
|
-
localeError:
|
|
24960
|
+
localeError: error41()
|
|
24350
24961
|
};
|
|
24351
24962
|
}
|
|
24352
24963
|
|
|
24353
24964
|
// node_modules/zod/v4/locales/th.js
|
|
24354
|
-
var
|
|
24965
|
+
var error42 = () => {
|
|
24355
24966
|
const Sizable = {
|
|
24356
24967
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
24357
24968
|
file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -24457,12 +25068,12 @@ var error39 = () => {
|
|
|
24457
25068
|
};
|
|
24458
25069
|
function th_default() {
|
|
24459
25070
|
return {
|
|
24460
|
-
localeError:
|
|
25071
|
+
localeError: error42()
|
|
24461
25072
|
};
|
|
24462
25073
|
}
|
|
24463
25074
|
|
|
24464
25075
|
// node_modules/zod/v4/locales/tr.js
|
|
24465
|
-
var
|
|
25076
|
+
var error43 = () => {
|
|
24466
25077
|
const Sizable = {
|
|
24467
25078
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
24468
25079
|
file: { unit: "bayt", verb: "olmal\u0131" },
|
|
@@ -24563,12 +25174,12 @@ var error40 = () => {
|
|
|
24563
25174
|
};
|
|
24564
25175
|
function tr_default() {
|
|
24565
25176
|
return {
|
|
24566
|
-
localeError:
|
|
25177
|
+
localeError: error43()
|
|
24567
25178
|
};
|
|
24568
25179
|
}
|
|
24569
25180
|
|
|
24570
25181
|
// node_modules/zod/v4/locales/uk.js
|
|
24571
|
-
var
|
|
25182
|
+
var error44 = () => {
|
|
24572
25183
|
const Sizable = {
|
|
24573
25184
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
24574
25185
|
file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -24672,7 +25283,7 @@ var error41 = () => {
|
|
|
24672
25283
|
};
|
|
24673
25284
|
function uk_default() {
|
|
24674
25285
|
return {
|
|
24675
|
-
localeError:
|
|
25286
|
+
localeError: error44()
|
|
24676
25287
|
};
|
|
24677
25288
|
}
|
|
24678
25289
|
|
|
@@ -24682,7 +25293,7 @@ function ua_default() {
|
|
|
24682
25293
|
}
|
|
24683
25294
|
|
|
24684
25295
|
// node_modules/zod/v4/locales/ur.js
|
|
24685
|
-
var
|
|
25296
|
+
var error45 = () => {
|
|
24686
25297
|
const Sizable = {
|
|
24687
25298
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
24688
25299
|
file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -24788,17 +25399,18 @@ var error42 = () => {
|
|
|
24788
25399
|
};
|
|
24789
25400
|
function ur_default() {
|
|
24790
25401
|
return {
|
|
24791
|
-
localeError:
|
|
25402
|
+
localeError: error45()
|
|
24792
25403
|
};
|
|
24793
25404
|
}
|
|
24794
25405
|
|
|
24795
25406
|
// node_modules/zod/v4/locales/uz.js
|
|
24796
|
-
var
|
|
25407
|
+
var error46 = () => {
|
|
24797
25408
|
const Sizable = {
|
|
24798
25409
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
24799
25410
|
file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
|
|
24800
25411
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
24801
|
-
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
25412
|
+
set: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
25413
|
+
map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
|
|
24802
25414
|
};
|
|
24803
25415
|
function getSizing(origin) {
|
|
24804
25416
|
return Sizable[origin] ?? null;
|
|
@@ -24898,12 +25510,12 @@ var error43 = () => {
|
|
|
24898
25510
|
};
|
|
24899
25511
|
function uz_default() {
|
|
24900
25512
|
return {
|
|
24901
|
-
localeError:
|
|
25513
|
+
localeError: error46()
|
|
24902
25514
|
};
|
|
24903
25515
|
}
|
|
24904
25516
|
|
|
24905
25517
|
// node_modules/zod/v4/locales/vi.js
|
|
24906
|
-
var
|
|
25518
|
+
var error47 = () => {
|
|
24907
25519
|
const Sizable = {
|
|
24908
25520
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
24909
25521
|
file: { unit: "byte", verb: "c\xF3" },
|
|
@@ -25007,12 +25619,12 @@ var error44 = () => {
|
|
|
25007
25619
|
};
|
|
25008
25620
|
function vi_default() {
|
|
25009
25621
|
return {
|
|
25010
|
-
localeError:
|
|
25622
|
+
localeError: error47()
|
|
25011
25623
|
};
|
|
25012
25624
|
}
|
|
25013
25625
|
|
|
25014
25626
|
// node_modules/zod/v4/locales/zh-CN.js
|
|
25015
|
-
var
|
|
25627
|
+
var error48 = () => {
|
|
25016
25628
|
const Sizable = {
|
|
25017
25629
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
25018
25630
|
file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
|
|
@@ -25117,12 +25729,12 @@ var error45 = () => {
|
|
|
25117
25729
|
};
|
|
25118
25730
|
function zh_CN_default() {
|
|
25119
25731
|
return {
|
|
25120
|
-
localeError:
|
|
25732
|
+
localeError: error48()
|
|
25121
25733
|
};
|
|
25122
25734
|
}
|
|
25123
25735
|
|
|
25124
25736
|
// node_modules/zod/v4/locales/zh-TW.js
|
|
25125
|
-
var
|
|
25737
|
+
var error49 = () => {
|
|
25126
25738
|
const Sizable = {
|
|
25127
25739
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
25128
25740
|
file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
|
|
@@ -25225,12 +25837,12 @@ var error46 = () => {
|
|
|
25225
25837
|
};
|
|
25226
25838
|
function zh_TW_default() {
|
|
25227
25839
|
return {
|
|
25228
|
-
localeError:
|
|
25840
|
+
localeError: error49()
|
|
25229
25841
|
};
|
|
25230
25842
|
}
|
|
25231
25843
|
|
|
25232
25844
|
// node_modules/zod/v4/locales/yo.js
|
|
25233
|
-
var
|
|
25845
|
+
var error50 = () => {
|
|
25234
25846
|
const Sizable = {
|
|
25235
25847
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
25236
25848
|
file: { unit: "bytes", verb: "n\xED" },
|
|
@@ -25333,12 +25945,12 @@ var error47 = () => {
|
|
|
25333
25945
|
};
|
|
25334
25946
|
function yo_default() {
|
|
25335
25947
|
return {
|
|
25336
|
-
localeError:
|
|
25948
|
+
localeError: error50()
|
|
25337
25949
|
};
|
|
25338
25950
|
}
|
|
25339
25951
|
|
|
25340
25952
|
// node_modules/zod/v4/core/registries.js
|
|
25341
|
-
var
|
|
25953
|
+
var _a2;
|
|
25342
25954
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
25343
25955
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
25344
25956
|
var $ZodRegistry = class {
|
|
@@ -25384,7 +25996,7 @@ var $ZodRegistry = class {
|
|
|
25384
25996
|
function registry() {
|
|
25385
25997
|
return new $ZodRegistry();
|
|
25386
25998
|
}
|
|
25387
|
-
(
|
|
25999
|
+
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
25388
26000
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
25389
26001
|
|
|
25390
26002
|
// node_modules/zod/v4/core/api.js
|
|
@@ -26302,7 +26914,7 @@ function _refine(Class2, fn, _params) {
|
|
|
26302
26914
|
return schema;
|
|
26303
26915
|
}
|
|
26304
26916
|
// @__NO_SIDE_EFFECTS__
|
|
26305
|
-
function _superRefine(fn) {
|
|
26917
|
+
function _superRefine(fn, params) {
|
|
26306
26918
|
const ch = /* @__PURE__ */ _check((payload) => {
|
|
26307
26919
|
payload.addIssue = (issue2) => {
|
|
26308
26920
|
if (typeof issue2 === "string") {
|
|
@@ -26319,7 +26931,7 @@ function _superRefine(fn) {
|
|
|
26319
26931
|
}
|
|
26320
26932
|
};
|
|
26321
26933
|
return fn(payload.value, payload);
|
|
26322
|
-
});
|
|
26934
|
+
}, params);
|
|
26323
26935
|
return ch;
|
|
26324
26936
|
}
|
|
26325
26937
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -26449,7 +27061,7 @@ function initializeContext(params) {
|
|
|
26449
27061
|
};
|
|
26450
27062
|
}
|
|
26451
27063
|
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
26452
|
-
var
|
|
27064
|
+
var _a3;
|
|
26453
27065
|
const def = schema._zod.def;
|
|
26454
27066
|
const seen = ctx.seen.get(schema);
|
|
26455
27067
|
if (seen) {
|
|
@@ -26496,8 +27108,8 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
26496
27108
|
delete result.schema.examples;
|
|
26497
27109
|
delete result.schema.default;
|
|
26498
27110
|
}
|
|
26499
|
-
if (ctx.io === "input" && result.schema
|
|
26500
|
-
(
|
|
27111
|
+
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
27112
|
+
(_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
|
|
26501
27113
|
delete result.schema._prefault;
|
|
26502
27114
|
const _result = ctx.seen.get(schema);
|
|
26503
27115
|
return _result.schema;
|
|
@@ -26678,10 +27290,15 @@ function finalize(ctx, schema) {
|
|
|
26678
27290
|
result.$id = ctx.external.uri(id);
|
|
26679
27291
|
}
|
|
26680
27292
|
Object.assign(result, root.def ?? root.schema);
|
|
27293
|
+
const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
|
|
27294
|
+
if (rootMetaId !== void 0 && result.id === rootMetaId)
|
|
27295
|
+
delete result.id;
|
|
26681
27296
|
const defs = ctx.external?.defs ?? {};
|
|
26682
27297
|
for (const entry of ctx.seen.entries()) {
|
|
26683
27298
|
const seen = entry[1];
|
|
26684
27299
|
if (seen.def && seen.defId) {
|
|
27300
|
+
if (seen.def.id === seen.defId)
|
|
27301
|
+
delete seen.def.id;
|
|
26685
27302
|
defs[seen.defId] = seen.def;
|
|
26686
27303
|
}
|
|
26687
27304
|
}
|
|
@@ -26737,6 +27354,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
26737
27354
|
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
|
|
26738
27355
|
}
|
|
26739
27356
|
if (def.type === "pipe") {
|
|
27357
|
+
if (_schema._zod.traits.has("$ZodCodec"))
|
|
27358
|
+
return true;
|
|
26740
27359
|
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
|
|
26741
27360
|
}
|
|
26742
27361
|
if (def.type === "object") {
|
|
@@ -26826,39 +27445,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
26826
27445
|
json2.type = "integer";
|
|
26827
27446
|
else
|
|
26828
27447
|
json2.type = "number";
|
|
26829
|
-
|
|
26830
|
-
|
|
27448
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
27449
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
27450
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
27451
|
+
if (exMin) {
|
|
27452
|
+
if (legacy) {
|
|
26831
27453
|
json2.minimum = exclusiveMinimum;
|
|
26832
27454
|
json2.exclusiveMinimum = true;
|
|
26833
27455
|
} else {
|
|
26834
27456
|
json2.exclusiveMinimum = exclusiveMinimum;
|
|
26835
27457
|
}
|
|
26836
|
-
}
|
|
26837
|
-
if (typeof minimum === "number") {
|
|
27458
|
+
} else if (typeof minimum === "number") {
|
|
26838
27459
|
json2.minimum = minimum;
|
|
26839
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
26840
|
-
if (exclusiveMinimum >= minimum)
|
|
26841
|
-
delete json2.minimum;
|
|
26842
|
-
else
|
|
26843
|
-
delete json2.exclusiveMinimum;
|
|
26844
|
-
}
|
|
26845
27460
|
}
|
|
26846
|
-
if (
|
|
26847
|
-
if (
|
|
27461
|
+
if (exMax) {
|
|
27462
|
+
if (legacy) {
|
|
26848
27463
|
json2.maximum = exclusiveMaximum;
|
|
26849
27464
|
json2.exclusiveMaximum = true;
|
|
26850
27465
|
} else {
|
|
26851
27466
|
json2.exclusiveMaximum = exclusiveMaximum;
|
|
26852
27467
|
}
|
|
26853
|
-
}
|
|
26854
|
-
if (typeof maximum === "number") {
|
|
27468
|
+
} else if (typeof maximum === "number") {
|
|
26855
27469
|
json2.maximum = maximum;
|
|
26856
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
26857
|
-
if (exclusiveMaximum <= maximum)
|
|
26858
|
-
delete json2.maximum;
|
|
26859
|
-
else
|
|
26860
|
-
delete json2.exclusiveMaximum;
|
|
26861
|
-
}
|
|
26862
27470
|
}
|
|
26863
27471
|
if (typeof multipleOf === "number")
|
|
26864
27472
|
json2.multipleOf = multipleOf;
|
|
@@ -27030,7 +27638,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
27030
27638
|
if (typeof maximum === "number")
|
|
27031
27639
|
json2.maxItems = maximum;
|
|
27032
27640
|
json2.type = "array";
|
|
27033
|
-
json2.items = process2(def.element, ctx, {
|
|
27641
|
+
json2.items = process2(def.element, ctx, {
|
|
27642
|
+
...params,
|
|
27643
|
+
path: [...params.path, "items"]
|
|
27644
|
+
});
|
|
27034
27645
|
};
|
|
27035
27646
|
var objectProcessor = (schema, ctx, _json, params) => {
|
|
27036
27647
|
const json2 = _json;
|
|
@@ -27223,7 +27834,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
|
|
|
27223
27834
|
};
|
|
27224
27835
|
var pipeProcessor = (schema, ctx, _json, params) => {
|
|
27225
27836
|
const def = schema._zod.def;
|
|
27226
|
-
const
|
|
27837
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
27838
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
27227
27839
|
process2(innerType, ctx, params);
|
|
27228
27840
|
const seen = ctx.seen.get(schema);
|
|
27229
27841
|
seen.ref = innerType;
|
|
@@ -27423,7 +28035,9 @@ var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
|
|
|
27423
28035
|
...def,
|
|
27424
28036
|
checks: [
|
|
27425
28037
|
...def.checks ?? [],
|
|
27426
|
-
...checks.map((ch) => typeof ch === "function" ? {
|
|
28038
|
+
...checks.map((ch) => typeof ch === "function" ? {
|
|
28039
|
+
_zod: { check: ch, def: { check: "custom" }, onattach: [] }
|
|
28040
|
+
} : ch)
|
|
27427
28041
|
]
|
|
27428
28042
|
}, { parent: true });
|
|
27429
28043
|
};
|
|
@@ -27535,24 +28149,24 @@ function normalizeObjectSchema(schema) {
|
|
|
27535
28149
|
}
|
|
27536
28150
|
return void 0;
|
|
27537
28151
|
}
|
|
27538
|
-
function getParseErrorMessage(
|
|
27539
|
-
if (
|
|
27540
|
-
if ("message" in
|
|
27541
|
-
return
|
|
28152
|
+
function getParseErrorMessage(error51) {
|
|
28153
|
+
if (error51 && typeof error51 === "object") {
|
|
28154
|
+
if ("message" in error51 && typeof error51.message === "string") {
|
|
28155
|
+
return error51.message;
|
|
27542
28156
|
}
|
|
27543
|
-
if ("issues" in
|
|
27544
|
-
const firstIssue =
|
|
28157
|
+
if ("issues" in error51 && Array.isArray(error51.issues) && error51.issues.length > 0) {
|
|
28158
|
+
const firstIssue = error51.issues[0];
|
|
27545
28159
|
if (firstIssue && typeof firstIssue === "object" && "message" in firstIssue) {
|
|
27546
28160
|
return String(firstIssue.message);
|
|
27547
28161
|
}
|
|
27548
28162
|
}
|
|
27549
28163
|
try {
|
|
27550
|
-
return JSON.stringify(
|
|
28164
|
+
return JSON.stringify(error51);
|
|
27551
28165
|
} catch {
|
|
27552
|
-
return String(
|
|
28166
|
+
return String(error51);
|
|
27553
28167
|
}
|
|
27554
28168
|
}
|
|
27555
|
-
return String(
|
|
28169
|
+
return String(error51);
|
|
27556
28170
|
}
|
|
27557
28171
|
function getSchemaDescription(schema) {
|
|
27558
28172
|
return schema.description;
|
|
@@ -27596,8 +28210,8 @@ function getLiteralValue(schema) {
|
|
|
27596
28210
|
}
|
|
27597
28211
|
|
|
27598
28212
|
// node_modules/zod/v4/classic/external.js
|
|
27599
|
-
var
|
|
27600
|
-
__export(
|
|
28213
|
+
var external_exports = {};
|
|
28214
|
+
__export(external_exports, {
|
|
27601
28215
|
$brand: () => $brand,
|
|
27602
28216
|
$input: () => $input,
|
|
27603
28217
|
$output: () => $output,
|
|
@@ -27657,6 +28271,7 @@ __export(external_exports3, {
|
|
|
27657
28271
|
ZodOptional: () => ZodOptional2,
|
|
27658
28272
|
ZodPipe: () => ZodPipe,
|
|
27659
28273
|
ZodPrefault: () => ZodPrefault,
|
|
28274
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
27660
28275
|
ZodPromise: () => ZodPromise2,
|
|
27661
28276
|
ZodReadonly: () => ZodReadonly2,
|
|
27662
28277
|
ZodRealError: () => ZodRealError,
|
|
@@ -27735,6 +28350,7 @@ __export(external_exports3, {
|
|
|
27735
28350
|
int32: () => int32,
|
|
27736
28351
|
int64: () => int64,
|
|
27737
28352
|
intersection: () => intersection,
|
|
28353
|
+
invertCodec: () => invertCodec,
|
|
27738
28354
|
ipv4: () => ipv42,
|
|
27739
28355
|
ipv6: () => ipv62,
|
|
27740
28356
|
iso: () => iso_exports2,
|
|
@@ -27837,8 +28453,8 @@ __export(external_exports3, {
|
|
|
27837
28453
|
});
|
|
27838
28454
|
|
|
27839
28455
|
// node_modules/zod/v4/classic/schemas.js
|
|
27840
|
-
var
|
|
27841
|
-
__export(
|
|
28456
|
+
var schemas_exports2 = {};
|
|
28457
|
+
__export(schemas_exports2, {
|
|
27842
28458
|
ZodAny: () => ZodAny2,
|
|
27843
28459
|
ZodArray: () => ZodArray2,
|
|
27844
28460
|
ZodBase64: () => ZodBase64,
|
|
@@ -27886,6 +28502,7 @@ __export(schemas_exports3, {
|
|
|
27886
28502
|
ZodOptional: () => ZodOptional2,
|
|
27887
28503
|
ZodPipe: () => ZodPipe,
|
|
27888
28504
|
ZodPrefault: () => ZodPrefault,
|
|
28505
|
+
ZodPreprocess: () => ZodPreprocess,
|
|
27889
28506
|
ZodPromise: () => ZodPromise2,
|
|
27890
28507
|
ZodReadonly: () => ZodReadonly2,
|
|
27891
28508
|
ZodRecord: () => ZodRecord2,
|
|
@@ -27946,6 +28563,7 @@ __export(schemas_exports3, {
|
|
|
27946
28563
|
int32: () => int32,
|
|
27947
28564
|
int64: () => int64,
|
|
27948
28565
|
intersection: () => intersection,
|
|
28566
|
+
invertCodec: () => invertCodec,
|
|
27949
28567
|
ipv4: () => ipv42,
|
|
27950
28568
|
ipv6: () => ipv62,
|
|
27951
28569
|
json: () => json,
|
|
@@ -28115,8 +28733,8 @@ var initializer2 = (inst, issues) => {
|
|
|
28115
28733
|
}
|
|
28116
28734
|
});
|
|
28117
28735
|
};
|
|
28118
|
-
var ZodError2 = $constructor("ZodError", initializer2);
|
|
28119
|
-
var ZodRealError = $constructor("ZodError", initializer2, {
|
|
28736
|
+
var ZodError2 = /* @__PURE__ */ $constructor("ZodError", initializer2);
|
|
28737
|
+
var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
28120
28738
|
Parent: Error
|
|
28121
28739
|
});
|
|
28122
28740
|
|
|
@@ -28135,6 +28753,43 @@ var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
|
28135
28753
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
28136
28754
|
|
|
28137
28755
|
// node_modules/zod/v4/classic/schemas.js
|
|
28756
|
+
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
28757
|
+
function _installLazyMethods(inst, group, methods) {
|
|
28758
|
+
const proto = Object.getPrototypeOf(inst);
|
|
28759
|
+
let installed = _installedGroups.get(proto);
|
|
28760
|
+
if (!installed) {
|
|
28761
|
+
installed = /* @__PURE__ */ new Set();
|
|
28762
|
+
_installedGroups.set(proto, installed);
|
|
28763
|
+
}
|
|
28764
|
+
if (installed.has(group))
|
|
28765
|
+
return;
|
|
28766
|
+
installed.add(group);
|
|
28767
|
+
for (const key in methods) {
|
|
28768
|
+
const fn = methods[key];
|
|
28769
|
+
Object.defineProperty(proto, key, {
|
|
28770
|
+
configurable: true,
|
|
28771
|
+
enumerable: false,
|
|
28772
|
+
get() {
|
|
28773
|
+
const bound = fn.bind(this);
|
|
28774
|
+
Object.defineProperty(this, key, {
|
|
28775
|
+
configurable: true,
|
|
28776
|
+
writable: true,
|
|
28777
|
+
enumerable: true,
|
|
28778
|
+
value: bound
|
|
28779
|
+
});
|
|
28780
|
+
return bound;
|
|
28781
|
+
},
|
|
28782
|
+
set(v) {
|
|
28783
|
+
Object.defineProperty(this, key, {
|
|
28784
|
+
configurable: true,
|
|
28785
|
+
writable: true,
|
|
28786
|
+
enumerable: true,
|
|
28787
|
+
value: v
|
|
28788
|
+
});
|
|
28789
|
+
}
|
|
28790
|
+
});
|
|
28791
|
+
}
|
|
28792
|
+
}
|
|
28138
28793
|
var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
28139
28794
|
$ZodType.init(inst, def);
|
|
28140
28795
|
Object.assign(inst["~standard"], {
|
|
@@ -28147,23 +28802,6 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
28147
28802
|
inst.def = def;
|
|
28148
28803
|
inst.type = def.type;
|
|
28149
28804
|
Object.defineProperty(inst, "_def", { value: def });
|
|
28150
|
-
inst.check = (...checks) => {
|
|
28151
|
-
return inst.clone(util_exports.mergeDefs(def, {
|
|
28152
|
-
checks: [
|
|
28153
|
-
...def.checks ?? [],
|
|
28154
|
-
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
28155
|
-
]
|
|
28156
|
-
}), {
|
|
28157
|
-
parent: true
|
|
28158
|
-
});
|
|
28159
|
-
};
|
|
28160
|
-
inst.with = inst.check;
|
|
28161
|
-
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
28162
|
-
inst.brand = () => inst;
|
|
28163
|
-
inst.register = ((reg, meta3) => {
|
|
28164
|
-
reg.add(inst, meta3);
|
|
28165
|
-
return inst;
|
|
28166
|
-
});
|
|
28167
28805
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
28168
28806
|
inst.safeParse = (data, params) => safeParse3(inst, data, params);
|
|
28169
28807
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -28177,45 +28815,108 @@ var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
28177
28815
|
inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
|
|
28178
28816
|
inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
|
|
28179
28817
|
inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
|
|
28180
|
-
inst
|
|
28181
|
-
|
|
28182
|
-
|
|
28183
|
-
|
|
28184
|
-
|
|
28185
|
-
|
|
28186
|
-
|
|
28187
|
-
|
|
28188
|
-
|
|
28189
|
-
|
|
28190
|
-
|
|
28191
|
-
|
|
28192
|
-
|
|
28193
|
-
|
|
28194
|
-
|
|
28195
|
-
|
|
28196
|
-
|
|
28197
|
-
|
|
28198
|
-
|
|
28199
|
-
|
|
28200
|
-
|
|
28201
|
-
|
|
28818
|
+
_installLazyMethods(inst, "ZodType", {
|
|
28819
|
+
check(...chks) {
|
|
28820
|
+
const def2 = this.def;
|
|
28821
|
+
return this.clone(util_exports.mergeDefs(def2, {
|
|
28822
|
+
checks: [
|
|
28823
|
+
...def2.checks ?? [],
|
|
28824
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
28825
|
+
]
|
|
28826
|
+
}), { parent: true });
|
|
28827
|
+
},
|
|
28828
|
+
with(...chks) {
|
|
28829
|
+
return this.check(...chks);
|
|
28830
|
+
},
|
|
28831
|
+
clone(def2, params) {
|
|
28832
|
+
return clone(this, def2, params);
|
|
28833
|
+
},
|
|
28834
|
+
brand() {
|
|
28835
|
+
return this;
|
|
28836
|
+
},
|
|
28837
|
+
register(reg, meta3) {
|
|
28838
|
+
reg.add(this, meta3);
|
|
28839
|
+
return this;
|
|
28840
|
+
},
|
|
28841
|
+
refine(check2, params) {
|
|
28842
|
+
return this.check(refine(check2, params));
|
|
28843
|
+
},
|
|
28844
|
+
superRefine(refinement, params) {
|
|
28845
|
+
return this.check(superRefine(refinement, params));
|
|
28846
|
+
},
|
|
28847
|
+
overwrite(fn) {
|
|
28848
|
+
return this.check(_overwrite(fn));
|
|
28849
|
+
},
|
|
28850
|
+
optional() {
|
|
28851
|
+
return optional(this);
|
|
28852
|
+
},
|
|
28853
|
+
exactOptional() {
|
|
28854
|
+
return exactOptional(this);
|
|
28855
|
+
},
|
|
28856
|
+
nullable() {
|
|
28857
|
+
return nullable(this);
|
|
28858
|
+
},
|
|
28859
|
+
nullish() {
|
|
28860
|
+
return optional(nullable(this));
|
|
28861
|
+
},
|
|
28862
|
+
nonoptional(params) {
|
|
28863
|
+
return nonoptional(this, params);
|
|
28864
|
+
},
|
|
28865
|
+
array() {
|
|
28866
|
+
return array(this);
|
|
28867
|
+
},
|
|
28868
|
+
or(arg) {
|
|
28869
|
+
return union([this, arg]);
|
|
28870
|
+
},
|
|
28871
|
+
and(arg) {
|
|
28872
|
+
return intersection(this, arg);
|
|
28873
|
+
},
|
|
28874
|
+
transform(tx) {
|
|
28875
|
+
return pipe(this, transform(tx));
|
|
28876
|
+
},
|
|
28877
|
+
default(d) {
|
|
28878
|
+
return _default2(this, d);
|
|
28879
|
+
},
|
|
28880
|
+
prefault(d) {
|
|
28881
|
+
return prefault(this, d);
|
|
28882
|
+
},
|
|
28883
|
+
catch(params) {
|
|
28884
|
+
return _catch2(this, params);
|
|
28885
|
+
},
|
|
28886
|
+
pipe(target) {
|
|
28887
|
+
return pipe(this, target);
|
|
28888
|
+
},
|
|
28889
|
+
readonly() {
|
|
28890
|
+
return readonly(this);
|
|
28891
|
+
},
|
|
28892
|
+
describe(description) {
|
|
28893
|
+
const cl = this.clone();
|
|
28894
|
+
globalRegistry.add(cl, { description });
|
|
28895
|
+
return cl;
|
|
28896
|
+
},
|
|
28897
|
+
meta(...args) {
|
|
28898
|
+
if (args.length === 0)
|
|
28899
|
+
return globalRegistry.get(this);
|
|
28900
|
+
const cl = this.clone();
|
|
28901
|
+
globalRegistry.add(cl, args[0]);
|
|
28902
|
+
return cl;
|
|
28903
|
+
},
|
|
28904
|
+
isOptional() {
|
|
28905
|
+
return this.safeParse(void 0).success;
|
|
28906
|
+
},
|
|
28907
|
+
isNullable() {
|
|
28908
|
+
return this.safeParse(null).success;
|
|
28909
|
+
},
|
|
28910
|
+
apply(fn) {
|
|
28911
|
+
return fn(this);
|
|
28912
|
+
}
|
|
28913
|
+
});
|
|
28202
28914
|
Object.defineProperty(inst, "description", {
|
|
28203
28915
|
get() {
|
|
28204
28916
|
return globalRegistry.get(inst)?.description;
|
|
28205
28917
|
},
|
|
28206
28918
|
configurable: true
|
|
28207
28919
|
});
|
|
28208
|
-
inst.meta = (...args) => {
|
|
28209
|
-
if (args.length === 0) {
|
|
28210
|
-
return globalRegistry.get(inst);
|
|
28211
|
-
}
|
|
28212
|
-
const cl = inst.clone();
|
|
28213
|
-
globalRegistry.add(cl, args[0]);
|
|
28214
|
-
return cl;
|
|
28215
|
-
};
|
|
28216
|
-
inst.isOptional = () => inst.safeParse(void 0).success;
|
|
28217
|
-
inst.isNullable = () => inst.safeParse(null).success;
|
|
28218
|
-
inst.apply = (fn) => fn(inst);
|
|
28219
28920
|
return inst;
|
|
28220
28921
|
});
|
|
28221
28922
|
var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
@@ -28226,21 +28927,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
|
|
|
28226
28927
|
inst.format = bag.format ?? null;
|
|
28227
28928
|
inst.minLength = bag.minimum ?? null;
|
|
28228
28929
|
inst.maxLength = bag.maximum ?? null;
|
|
28229
|
-
inst
|
|
28230
|
-
|
|
28231
|
-
|
|
28232
|
-
|
|
28233
|
-
|
|
28234
|
-
|
|
28235
|
-
|
|
28236
|
-
|
|
28237
|
-
|
|
28238
|
-
|
|
28239
|
-
|
|
28240
|
-
|
|
28241
|
-
|
|
28242
|
-
|
|
28243
|
-
|
|
28930
|
+
_installLazyMethods(inst, "_ZodString", {
|
|
28931
|
+
regex(...args) {
|
|
28932
|
+
return this.check(_regex(...args));
|
|
28933
|
+
},
|
|
28934
|
+
includes(...args) {
|
|
28935
|
+
return this.check(_includes(...args));
|
|
28936
|
+
},
|
|
28937
|
+
startsWith(...args) {
|
|
28938
|
+
return this.check(_startsWith(...args));
|
|
28939
|
+
},
|
|
28940
|
+
endsWith(...args) {
|
|
28941
|
+
return this.check(_endsWith(...args));
|
|
28942
|
+
},
|
|
28943
|
+
min(...args) {
|
|
28944
|
+
return this.check(_minLength(...args));
|
|
28945
|
+
},
|
|
28946
|
+
max(...args) {
|
|
28947
|
+
return this.check(_maxLength(...args));
|
|
28948
|
+
},
|
|
28949
|
+
length(...args) {
|
|
28950
|
+
return this.check(_length(...args));
|
|
28951
|
+
},
|
|
28952
|
+
nonempty(...args) {
|
|
28953
|
+
return this.check(_minLength(1, ...args));
|
|
28954
|
+
},
|
|
28955
|
+
lowercase(params) {
|
|
28956
|
+
return this.check(_lowercase(params));
|
|
28957
|
+
},
|
|
28958
|
+
uppercase(params) {
|
|
28959
|
+
return this.check(_uppercase(params));
|
|
28960
|
+
},
|
|
28961
|
+
trim() {
|
|
28962
|
+
return this.check(_trim());
|
|
28963
|
+
},
|
|
28964
|
+
normalize(...args) {
|
|
28965
|
+
return this.check(_normalize(...args));
|
|
28966
|
+
},
|
|
28967
|
+
toLowerCase() {
|
|
28968
|
+
return this.check(_toLowerCase());
|
|
28969
|
+
},
|
|
28970
|
+
toUpperCase() {
|
|
28971
|
+
return this.check(_toUpperCase());
|
|
28972
|
+
},
|
|
28973
|
+
slugify() {
|
|
28974
|
+
return this.check(_slugify());
|
|
28975
|
+
}
|
|
28976
|
+
});
|
|
28244
28977
|
});
|
|
28245
28978
|
var ZodString2 = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
28246
28979
|
$ZodString.init(inst, def);
|
|
@@ -28319,7 +29052,7 @@ function url(params) {
|
|
|
28319
29052
|
}
|
|
28320
29053
|
function httpUrl(params) {
|
|
28321
29054
|
return _url(ZodURL, {
|
|
28322
|
-
protocol:
|
|
29055
|
+
protocol: regexes_exports.httpProtocol,
|
|
28323
29056
|
hostname: regexes_exports.domain,
|
|
28324
29057
|
...util_exports.normalizeParams(params)
|
|
28325
29058
|
});
|
|
@@ -28461,21 +29194,53 @@ var ZodNumber2 = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
|
|
|
28461
29194
|
$ZodNumber.init(inst, def);
|
|
28462
29195
|
ZodType2.init(inst, def);
|
|
28463
29196
|
inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
|
|
28464
|
-
inst
|
|
28465
|
-
|
|
28466
|
-
|
|
28467
|
-
|
|
28468
|
-
|
|
28469
|
-
|
|
28470
|
-
|
|
28471
|
-
|
|
28472
|
-
|
|
28473
|
-
|
|
28474
|
-
|
|
28475
|
-
|
|
28476
|
-
|
|
28477
|
-
|
|
28478
|
-
|
|
29197
|
+
_installLazyMethods(inst, "ZodNumber", {
|
|
29198
|
+
gt(value, params) {
|
|
29199
|
+
return this.check(_gt(value, params));
|
|
29200
|
+
},
|
|
29201
|
+
gte(value, params) {
|
|
29202
|
+
return this.check(_gte(value, params));
|
|
29203
|
+
},
|
|
29204
|
+
min(value, params) {
|
|
29205
|
+
return this.check(_gte(value, params));
|
|
29206
|
+
},
|
|
29207
|
+
lt(value, params) {
|
|
29208
|
+
return this.check(_lt(value, params));
|
|
29209
|
+
},
|
|
29210
|
+
lte(value, params) {
|
|
29211
|
+
return this.check(_lte(value, params));
|
|
29212
|
+
},
|
|
29213
|
+
max(value, params) {
|
|
29214
|
+
return this.check(_lte(value, params));
|
|
29215
|
+
},
|
|
29216
|
+
int(params) {
|
|
29217
|
+
return this.check(int(params));
|
|
29218
|
+
},
|
|
29219
|
+
safe(params) {
|
|
29220
|
+
return this.check(int(params));
|
|
29221
|
+
},
|
|
29222
|
+
positive(params) {
|
|
29223
|
+
return this.check(_gt(0, params));
|
|
29224
|
+
},
|
|
29225
|
+
nonnegative(params) {
|
|
29226
|
+
return this.check(_gte(0, params));
|
|
29227
|
+
},
|
|
29228
|
+
negative(params) {
|
|
29229
|
+
return this.check(_lt(0, params));
|
|
29230
|
+
},
|
|
29231
|
+
nonpositive(params) {
|
|
29232
|
+
return this.check(_lte(0, params));
|
|
29233
|
+
},
|
|
29234
|
+
multipleOf(value, params) {
|
|
29235
|
+
return this.check(_multipleOf(value, params));
|
|
29236
|
+
},
|
|
29237
|
+
step(value, params) {
|
|
29238
|
+
return this.check(_multipleOf(value, params));
|
|
29239
|
+
},
|
|
29240
|
+
finite() {
|
|
29241
|
+
return this;
|
|
29242
|
+
}
|
|
29243
|
+
});
|
|
28479
29244
|
const bag = inst._zod.bag;
|
|
28480
29245
|
inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
28481
29246
|
inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
@@ -28622,11 +29387,23 @@ var ZodArray2 = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
|
|
|
28622
29387
|
ZodType2.init(inst, def);
|
|
28623
29388
|
inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
|
|
28624
29389
|
inst.element = def.element;
|
|
28625
|
-
inst
|
|
28626
|
-
|
|
28627
|
-
|
|
28628
|
-
|
|
28629
|
-
|
|
29390
|
+
_installLazyMethods(inst, "ZodArray", {
|
|
29391
|
+
min(n, params) {
|
|
29392
|
+
return this.check(_minLength(n, params));
|
|
29393
|
+
},
|
|
29394
|
+
nonempty(params) {
|
|
29395
|
+
return this.check(_minLength(1, params));
|
|
29396
|
+
},
|
|
29397
|
+
max(n, params) {
|
|
29398
|
+
return this.check(_maxLength(n, params));
|
|
29399
|
+
},
|
|
29400
|
+
length(n, params) {
|
|
29401
|
+
return this.check(_length(n, params));
|
|
29402
|
+
},
|
|
29403
|
+
unwrap() {
|
|
29404
|
+
return this.element;
|
|
29405
|
+
}
|
|
29406
|
+
});
|
|
28630
29407
|
});
|
|
28631
29408
|
function array(element, params) {
|
|
28632
29409
|
return _array(ZodArray2, element, params);
|
|
@@ -28642,23 +29419,47 @@ var ZodObject2 = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
|
|
|
28642
29419
|
util_exports.defineLazy(inst, "shape", () => {
|
|
28643
29420
|
return def.shape;
|
|
28644
29421
|
});
|
|
28645
|
-
inst
|
|
28646
|
-
|
|
28647
|
-
|
|
28648
|
-
|
|
28649
|
-
|
|
28650
|
-
|
|
28651
|
-
|
|
28652
|
-
|
|
28653
|
-
|
|
28654
|
-
|
|
28655
|
-
|
|
28656
|
-
|
|
28657
|
-
|
|
28658
|
-
|
|
28659
|
-
|
|
28660
|
-
|
|
28661
|
-
|
|
29422
|
+
_installLazyMethods(inst, "ZodObject", {
|
|
29423
|
+
keyof() {
|
|
29424
|
+
return _enum2(Object.keys(this._zod.def.shape));
|
|
29425
|
+
},
|
|
29426
|
+
catchall(catchall) {
|
|
29427
|
+
return this.clone({ ...this._zod.def, catchall });
|
|
29428
|
+
},
|
|
29429
|
+
passthrough() {
|
|
29430
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
29431
|
+
},
|
|
29432
|
+
loose() {
|
|
29433
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
29434
|
+
},
|
|
29435
|
+
strict() {
|
|
29436
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
29437
|
+
},
|
|
29438
|
+
strip() {
|
|
29439
|
+
return this.clone({ ...this._zod.def, catchall: void 0 });
|
|
29440
|
+
},
|
|
29441
|
+
extend(incoming) {
|
|
29442
|
+
return util_exports.extend(this, incoming);
|
|
29443
|
+
},
|
|
29444
|
+
safeExtend(incoming) {
|
|
29445
|
+
return util_exports.safeExtend(this, incoming);
|
|
29446
|
+
},
|
|
29447
|
+
merge(other) {
|
|
29448
|
+
return util_exports.merge(this, other);
|
|
29449
|
+
},
|
|
29450
|
+
pick(mask) {
|
|
29451
|
+
return util_exports.pick(this, mask);
|
|
29452
|
+
},
|
|
29453
|
+
omit(mask) {
|
|
29454
|
+
return util_exports.omit(this, mask);
|
|
29455
|
+
},
|
|
29456
|
+
partial(...args) {
|
|
29457
|
+
return util_exports.partial(ZodOptional2, this, args[0]);
|
|
29458
|
+
},
|
|
29459
|
+
required(...args) {
|
|
29460
|
+
return util_exports.required(ZodNonOptional, this, args[0]);
|
|
29461
|
+
}
|
|
29462
|
+
});
|
|
28662
29463
|
});
|
|
28663
29464
|
function object2(shape, params) {
|
|
28664
29465
|
const def = {
|
|
@@ -28763,6 +29564,14 @@ var ZodRecord2 = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
|
|
|
28763
29564
|
inst.valueType = def.valueType;
|
|
28764
29565
|
});
|
|
28765
29566
|
function record(keyType, valueType, params) {
|
|
29567
|
+
if (!valueType || !valueType._zod) {
|
|
29568
|
+
return new ZodRecord2({
|
|
29569
|
+
type: "record",
|
|
29570
|
+
keyType: string2(),
|
|
29571
|
+
valueType: keyType,
|
|
29572
|
+
...util_exports.normalizeParams(valueType)
|
|
29573
|
+
});
|
|
29574
|
+
}
|
|
28766
29575
|
return new ZodRecord2({
|
|
28767
29576
|
type: "record",
|
|
28768
29577
|
keyType,
|
|
@@ -28934,10 +29743,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
|
28934
29743
|
if (output instanceof Promise) {
|
|
28935
29744
|
return output.then((output2) => {
|
|
28936
29745
|
payload.value = output2;
|
|
29746
|
+
payload.fallback = true;
|
|
28937
29747
|
return payload;
|
|
28938
29748
|
});
|
|
28939
29749
|
}
|
|
28940
29750
|
payload.value = output;
|
|
29751
|
+
payload.fallback = true;
|
|
28941
29752
|
return payload;
|
|
28942
29753
|
};
|
|
28943
29754
|
});
|
|
@@ -29092,6 +29903,20 @@ function codec(in_, out, params) {
|
|
|
29092
29903
|
reverseTransform: params.encode
|
|
29093
29904
|
});
|
|
29094
29905
|
}
|
|
29906
|
+
function invertCodec(codec2) {
|
|
29907
|
+
const def = codec2._zod.def;
|
|
29908
|
+
return new ZodCodec({
|
|
29909
|
+
type: "pipe",
|
|
29910
|
+
in: def.out,
|
|
29911
|
+
out: def.in,
|
|
29912
|
+
transform: def.reverseTransform,
|
|
29913
|
+
reverseTransform: def.transform
|
|
29914
|
+
});
|
|
29915
|
+
}
|
|
29916
|
+
var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
|
|
29917
|
+
ZodPipe.init(inst, def);
|
|
29918
|
+
$ZodPreprocess.init(inst, def);
|
|
29919
|
+
});
|
|
29095
29920
|
var ZodReadonly2 = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
|
|
29096
29921
|
$ZodReadonly.init(inst, def);
|
|
29097
29922
|
ZodType2.init(inst, def);
|
|
@@ -29171,8 +29996,8 @@ function custom(fn, _params) {
|
|
|
29171
29996
|
function refine(fn, _params = {}) {
|
|
29172
29997
|
return _refine(ZodCustom, fn, _params);
|
|
29173
29998
|
}
|
|
29174
|
-
function superRefine(fn) {
|
|
29175
|
-
return _superRefine(fn);
|
|
29999
|
+
function superRefine(fn, params) {
|
|
30000
|
+
return _superRefine(fn, params);
|
|
29176
30001
|
}
|
|
29177
30002
|
var describe2 = describe;
|
|
29178
30003
|
var meta2 = meta;
|
|
@@ -29210,7 +30035,11 @@ function json(params) {
|
|
|
29210
30035
|
return jsonSchema;
|
|
29211
30036
|
}
|
|
29212
30037
|
function preprocess(fn, schema) {
|
|
29213
|
-
return
|
|
30038
|
+
return new ZodPreprocess({
|
|
30039
|
+
type: "pipe",
|
|
30040
|
+
in: transform(fn),
|
|
30041
|
+
out: schema
|
|
30042
|
+
});
|
|
29214
30043
|
}
|
|
29215
30044
|
|
|
29216
30045
|
// node_modules/zod/v4/classic/compat.js
|
|
@@ -29241,7 +30070,7 @@ var ZodFirstPartyTypeKind2;
|
|
|
29241
30070
|
|
|
29242
30071
|
// node_modules/zod/v4/classic/from-json-schema.js
|
|
29243
30072
|
var z = {
|
|
29244
|
-
...
|
|
30073
|
+
...schemas_exports2,
|
|
29245
30074
|
...checks_exports2,
|
|
29246
30075
|
iso: iso_exports2
|
|
29247
30076
|
};
|
|
@@ -29631,12 +30460,6 @@ function convertBaseSchema(schema, ctx) {
|
|
|
29631
30460
|
default:
|
|
29632
30461
|
throw new Error(`Unsupported type: ${type}`);
|
|
29633
30462
|
}
|
|
29634
|
-
if (schema.description) {
|
|
29635
|
-
zodSchema = zodSchema.describe(schema.description);
|
|
29636
|
-
}
|
|
29637
|
-
if (schema.default !== void 0) {
|
|
29638
|
-
zodSchema = zodSchema.default(schema.default);
|
|
29639
|
-
}
|
|
29640
30463
|
return zodSchema;
|
|
29641
30464
|
}
|
|
29642
30465
|
function convertSchema(schema, ctx) {
|
|
@@ -29673,6 +30496,9 @@ function convertSchema(schema, ctx) {
|
|
|
29673
30496
|
if (schema.readOnly === true) {
|
|
29674
30497
|
baseSchema = z.readonly(baseSchema);
|
|
29675
30498
|
}
|
|
30499
|
+
if (schema.default !== void 0) {
|
|
30500
|
+
baseSchema = baseSchema.default(schema.default);
|
|
30501
|
+
}
|
|
29676
30502
|
const extraMeta = {};
|
|
29677
30503
|
const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
|
|
29678
30504
|
for (const key of coreMetadataKeys) {
|
|
@@ -29694,23 +30520,32 @@ function convertSchema(schema, ctx) {
|
|
|
29694
30520
|
if (Object.keys(extraMeta).length > 0) {
|
|
29695
30521
|
ctx.registry.add(baseSchema, extraMeta);
|
|
29696
30522
|
}
|
|
30523
|
+
if (schema.description) {
|
|
30524
|
+
baseSchema = baseSchema.describe(schema.description);
|
|
30525
|
+
}
|
|
29697
30526
|
return baseSchema;
|
|
29698
30527
|
}
|
|
29699
30528
|
function fromJSONSchema(schema, params) {
|
|
29700
30529
|
if (typeof schema === "boolean") {
|
|
29701
30530
|
return schema ? z.any() : z.never();
|
|
29702
30531
|
}
|
|
29703
|
-
|
|
29704
|
-
|
|
30532
|
+
let normalized;
|
|
30533
|
+
try {
|
|
30534
|
+
normalized = JSON.parse(JSON.stringify(schema));
|
|
30535
|
+
} catch {
|
|
30536
|
+
throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
|
|
30537
|
+
}
|
|
30538
|
+
const version3 = detectVersion(normalized, params?.defaultTarget);
|
|
30539
|
+
const defs = normalized.$defs || normalized.definitions || {};
|
|
29705
30540
|
const ctx = {
|
|
29706
30541
|
version: version3,
|
|
29707
30542
|
defs,
|
|
29708
30543
|
refs: /* @__PURE__ */ new Map(),
|
|
29709
30544
|
processing: /* @__PURE__ */ new Set(),
|
|
29710
|
-
rootSchema:
|
|
30545
|
+
rootSchema: normalized,
|
|
29711
30546
|
registry: params?.registry ?? globalRegistry
|
|
29712
30547
|
};
|
|
29713
|
-
return convertSchema(
|
|
30548
|
+
return convertSchema(normalized, ctx);
|
|
29714
30549
|
}
|
|
29715
30550
|
|
|
29716
30551
|
// node_modules/zod/v4/classic/coerce.js
|
|
@@ -32657,8 +33492,8 @@ var Protocol = class {
|
|
|
32657
33492
|
resolver(message);
|
|
32658
33493
|
} else {
|
|
32659
33494
|
const errorMessage = message;
|
|
32660
|
-
const
|
|
32661
|
-
resolver(
|
|
33495
|
+
const error51 = new McpError(errorMessage.error.code, errorMessage.error.message, errorMessage.error.data);
|
|
33496
|
+
resolver(error51);
|
|
32662
33497
|
}
|
|
32663
33498
|
} else {
|
|
32664
33499
|
const messageType = queuedMessage.type === "response" ? "Response" : "Error";
|
|
@@ -32702,8 +33537,8 @@ var Protocol = class {
|
|
|
32702
33537
|
nextCursor,
|
|
32703
33538
|
_meta: {}
|
|
32704
33539
|
};
|
|
32705
|
-
} catch (
|
|
32706
|
-
throw new McpError(ErrorCode.InvalidParams, `Failed to list tasks: ${
|
|
33540
|
+
} catch (error51) {
|
|
33541
|
+
throw new McpError(ErrorCode.InvalidParams, `Failed to list tasks: ${error51 instanceof Error ? error51.message : String(error51)}`);
|
|
32707
33542
|
}
|
|
32708
33543
|
});
|
|
32709
33544
|
this.setRequestHandler(CancelTaskRequestSchema, async (request, extra) => {
|
|
@@ -32725,11 +33560,11 @@ var Protocol = class {
|
|
|
32725
33560
|
_meta: {},
|
|
32726
33561
|
...cancelledTask
|
|
32727
33562
|
};
|
|
32728
|
-
} catch (
|
|
32729
|
-
if (
|
|
32730
|
-
throw
|
|
33563
|
+
} catch (error51) {
|
|
33564
|
+
if (error51 instanceof McpError) {
|
|
33565
|
+
throw error51;
|
|
32731
33566
|
}
|
|
32732
|
-
throw new McpError(ErrorCode.InvalidRequest, `Failed to cancel task: ${
|
|
33567
|
+
throw new McpError(ErrorCode.InvalidRequest, `Failed to cancel task: ${error51 instanceof Error ? error51.message : String(error51)}`);
|
|
32733
33568
|
}
|
|
32734
33569
|
});
|
|
32735
33570
|
}
|
|
@@ -32790,9 +33625,9 @@ var Protocol = class {
|
|
|
32790
33625
|
this._onclose();
|
|
32791
33626
|
};
|
|
32792
33627
|
const _onerror = this.transport?.onerror;
|
|
32793
|
-
this._transport.onerror = (
|
|
32794
|
-
_onerror?.(
|
|
32795
|
-
this._onerror(
|
|
33628
|
+
this._transport.onerror = (error51) => {
|
|
33629
|
+
_onerror?.(error51);
|
|
33630
|
+
this._onerror(error51);
|
|
32796
33631
|
};
|
|
32797
33632
|
const _onmessage = this._transport?.onmessage;
|
|
32798
33633
|
this._transport.onmessage = (message, extra) => {
|
|
@@ -32823,22 +33658,22 @@ var Protocol = class {
|
|
|
32823
33658
|
controller.abort();
|
|
32824
33659
|
}
|
|
32825
33660
|
this._requestHandlerAbortControllers.clear();
|
|
32826
|
-
const
|
|
33661
|
+
const error51 = McpError.fromError(ErrorCode.ConnectionClosed, "Connection closed");
|
|
32827
33662
|
this._transport = void 0;
|
|
32828
33663
|
this.onclose?.();
|
|
32829
33664
|
for (const handler of responseHandlers.values()) {
|
|
32830
|
-
handler(
|
|
33665
|
+
handler(error51);
|
|
32831
33666
|
}
|
|
32832
33667
|
}
|
|
32833
|
-
_onerror(
|
|
32834
|
-
this.onerror?.(
|
|
33668
|
+
_onerror(error51) {
|
|
33669
|
+
this.onerror?.(error51);
|
|
32835
33670
|
}
|
|
32836
33671
|
_onnotification(notification) {
|
|
32837
33672
|
const handler = this._notificationHandlers.get(notification.method) ?? this.fallbackNotificationHandler;
|
|
32838
33673
|
if (handler === void 0) {
|
|
32839
33674
|
return;
|
|
32840
33675
|
}
|
|
32841
|
-
Promise.resolve().then(() => handler(notification)).catch((
|
|
33676
|
+
Promise.resolve().then(() => handler(notification)).catch((error51) => this._onerror(new Error(`Uncaught error in notification handler: ${error51}`)));
|
|
32842
33677
|
}
|
|
32843
33678
|
_onrequest(request, extra) {
|
|
32844
33679
|
const handler = this._requestHandlers.get(request.method) ?? this.fallbackRequestHandler;
|
|
@@ -32858,9 +33693,9 @@ var Protocol = class {
|
|
|
32858
33693
|
type: "error",
|
|
32859
33694
|
message: errorResponse,
|
|
32860
33695
|
timestamp: Date.now()
|
|
32861
|
-
}, capturedTransport?.sessionId).catch((
|
|
33696
|
+
}, capturedTransport?.sessionId).catch((error51) => this._onerror(new Error(`Failed to enqueue error response: ${error51}`)));
|
|
32862
33697
|
} else {
|
|
32863
|
-
capturedTransport?.send(errorResponse).catch((
|
|
33698
|
+
capturedTransport?.send(errorResponse).catch((error51) => this._onerror(new Error(`Failed to send an error response: ${error51}`)));
|
|
32864
33699
|
}
|
|
32865
33700
|
return;
|
|
32866
33701
|
}
|
|
@@ -32926,7 +33761,7 @@ var Protocol = class {
|
|
|
32926
33761
|
} else {
|
|
32927
33762
|
await capturedTransport?.send(response);
|
|
32928
33763
|
}
|
|
32929
|
-
}, async (
|
|
33764
|
+
}, async (error51) => {
|
|
32930
33765
|
if (abortController.signal.aborted) {
|
|
32931
33766
|
return;
|
|
32932
33767
|
}
|
|
@@ -32934,9 +33769,9 @@ var Protocol = class {
|
|
|
32934
33769
|
jsonrpc: "2.0",
|
|
32935
33770
|
id: request.id,
|
|
32936
33771
|
error: {
|
|
32937
|
-
code: Number.isSafeInteger(
|
|
32938
|
-
message:
|
|
32939
|
-
...
|
|
33772
|
+
code: Number.isSafeInteger(error51["code"]) ? error51["code"] : ErrorCode.InternalError,
|
|
33773
|
+
message: error51.message ?? "Internal error",
|
|
33774
|
+
...error51["data"] !== void 0 && { data: error51["data"] }
|
|
32940
33775
|
}
|
|
32941
33776
|
};
|
|
32942
33777
|
if (relatedTaskId && this._taskMessageQueue) {
|
|
@@ -32948,7 +33783,7 @@ var Protocol = class {
|
|
|
32948
33783
|
} else {
|
|
32949
33784
|
await capturedTransport?.send(errorResponse);
|
|
32950
33785
|
}
|
|
32951
|
-
}).catch((
|
|
33786
|
+
}).catch((error51) => this._onerror(new Error(`Failed to send response: ${error51}`))).finally(() => {
|
|
32952
33787
|
if (this._requestHandlerAbortControllers.get(request.id) === abortController) {
|
|
32953
33788
|
this._requestHandlerAbortControllers.delete(request.id);
|
|
32954
33789
|
}
|
|
@@ -32967,11 +33802,11 @@ var Protocol = class {
|
|
|
32967
33802
|
if (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) {
|
|
32968
33803
|
try {
|
|
32969
33804
|
this._resetTimeout(messageId);
|
|
32970
|
-
} catch (
|
|
33805
|
+
} catch (error51) {
|
|
32971
33806
|
this._responseHandlers.delete(messageId);
|
|
32972
33807
|
this._progressHandlers.delete(messageId);
|
|
32973
33808
|
this._cleanupTimeout(messageId);
|
|
32974
|
-
responseHandler(
|
|
33809
|
+
responseHandler(error51);
|
|
32975
33810
|
return;
|
|
32976
33811
|
}
|
|
32977
33812
|
}
|
|
@@ -32985,8 +33820,8 @@ var Protocol = class {
|
|
|
32985
33820
|
if (isJSONRPCResultResponse(response)) {
|
|
32986
33821
|
resolver(response);
|
|
32987
33822
|
} else {
|
|
32988
|
-
const
|
|
32989
|
-
resolver(
|
|
33823
|
+
const error51 = new McpError(response.error.code, response.error.message, response.error.data);
|
|
33824
|
+
resolver(error51);
|
|
32990
33825
|
}
|
|
32991
33826
|
return;
|
|
32992
33827
|
}
|
|
@@ -33014,8 +33849,8 @@ var Protocol = class {
|
|
|
33014
33849
|
if (isJSONRPCResultResponse(response)) {
|
|
33015
33850
|
handler(response);
|
|
33016
33851
|
} else {
|
|
33017
|
-
const
|
|
33018
|
-
handler(
|
|
33852
|
+
const error51 = McpError.fromError(response.error.code, response.error.message, response.error.data);
|
|
33853
|
+
handler(error51);
|
|
33019
33854
|
}
|
|
33020
33855
|
}
|
|
33021
33856
|
get transport() {
|
|
@@ -33060,10 +33895,10 @@ var Protocol = class {
|
|
|
33060
33895
|
try {
|
|
33061
33896
|
const result = await this.request(request, resultSchema, options);
|
|
33062
33897
|
yield { type: "result", result };
|
|
33063
|
-
} catch (
|
|
33898
|
+
} catch (error51) {
|
|
33064
33899
|
yield {
|
|
33065
33900
|
type: "error",
|
|
33066
|
-
error:
|
|
33901
|
+
error: error51 instanceof McpError ? error51 : new McpError(ErrorCode.InternalError, String(error51))
|
|
33067
33902
|
};
|
|
33068
33903
|
}
|
|
33069
33904
|
return;
|
|
@@ -33106,10 +33941,10 @@ var Protocol = class {
|
|
|
33106
33941
|
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
33107
33942
|
options?.signal?.throwIfAborted();
|
|
33108
33943
|
}
|
|
33109
|
-
} catch (
|
|
33944
|
+
} catch (error51) {
|
|
33110
33945
|
yield {
|
|
33111
33946
|
type: "error",
|
|
33112
|
-
error:
|
|
33947
|
+
error: error51 instanceof McpError ? error51 : new McpError(ErrorCode.InternalError, String(error51))
|
|
33113
33948
|
};
|
|
33114
33949
|
}
|
|
33115
33950
|
}
|
|
@@ -33121,8 +33956,8 @@ var Protocol = class {
|
|
|
33121
33956
|
request(request, resultSchema, options) {
|
|
33122
33957
|
const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
|
|
33123
33958
|
return new Promise((resolve, reject) => {
|
|
33124
|
-
const earlyReject = (
|
|
33125
|
-
reject(
|
|
33959
|
+
const earlyReject = (error51) => {
|
|
33960
|
+
reject(error51);
|
|
33126
33961
|
};
|
|
33127
33962
|
if (!this._transport) {
|
|
33128
33963
|
earlyReject(new Error("Not connected"));
|
|
@@ -33182,9 +34017,9 @@ var Protocol = class {
|
|
|
33182
34017
|
requestId: messageId,
|
|
33183
34018
|
reason: String(reason)
|
|
33184
34019
|
}
|
|
33185
|
-
}, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((
|
|
33186
|
-
const
|
|
33187
|
-
reject(
|
|
34020
|
+
}, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error52) => this._onerror(new Error(`Failed to send cancellation: ${error52}`)));
|
|
34021
|
+
const error51 = reason instanceof McpError ? reason : new McpError(ErrorCode.RequestTimeout, String(reason));
|
|
34022
|
+
reject(error51);
|
|
33188
34023
|
};
|
|
33189
34024
|
this._responseHandlers.set(messageId, (response) => {
|
|
33190
34025
|
if (options?.signal?.aborted) {
|
|
@@ -33200,8 +34035,8 @@ var Protocol = class {
|
|
|
33200
34035
|
} else {
|
|
33201
34036
|
resolve(parseResult.data);
|
|
33202
34037
|
}
|
|
33203
|
-
} catch (
|
|
33204
|
-
reject(
|
|
34038
|
+
} catch (error51) {
|
|
34039
|
+
reject(error51);
|
|
33205
34040
|
}
|
|
33206
34041
|
});
|
|
33207
34042
|
options?.signal?.addEventListener("abort", () => {
|
|
@@ -33225,14 +34060,14 @@ var Protocol = class {
|
|
|
33225
34060
|
type: "request",
|
|
33226
34061
|
message: jsonrpcRequest,
|
|
33227
34062
|
timestamp: Date.now()
|
|
33228
|
-
}).catch((
|
|
34063
|
+
}).catch((error51) => {
|
|
33229
34064
|
this._cleanupTimeout(messageId);
|
|
33230
|
-
reject(
|
|
34065
|
+
reject(error51);
|
|
33231
34066
|
});
|
|
33232
34067
|
} else {
|
|
33233
|
-
this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((
|
|
34068
|
+
this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error51) => {
|
|
33234
34069
|
this._cleanupTimeout(messageId);
|
|
33235
|
-
reject(
|
|
34070
|
+
reject(error51);
|
|
33236
34071
|
});
|
|
33237
34072
|
}
|
|
33238
34073
|
});
|
|
@@ -33325,7 +34160,7 @@ var Protocol = class {
|
|
|
33325
34160
|
}
|
|
33326
34161
|
};
|
|
33327
34162
|
}
|
|
33328
|
-
this._transport?.send(jsonrpcNotification2, options).catch((
|
|
34163
|
+
this._transport?.send(jsonrpcNotification2, options).catch((error51) => this._onerror(error51));
|
|
33329
34164
|
});
|
|
33330
34165
|
return;
|
|
33331
34166
|
}
|
|
@@ -34187,11 +35022,11 @@ var Server = class extends Protocol {
|
|
|
34187
35022
|
if (!validationResult.valid) {
|
|
34188
35023
|
throw new McpError(ErrorCode.InvalidParams, `Elicitation response content does not match requested schema: ${validationResult.errorMessage}`);
|
|
34189
35024
|
}
|
|
34190
|
-
} catch (
|
|
34191
|
-
if (
|
|
34192
|
-
throw
|
|
35025
|
+
} catch (error51) {
|
|
35026
|
+
if (error51 instanceof McpError) {
|
|
35027
|
+
throw error51;
|
|
34193
35028
|
}
|
|
34194
|
-
throw new McpError(ErrorCode.InternalError, `Error validating elicitation response: ${
|
|
35029
|
+
throw new McpError(ErrorCode.InternalError, `Error validating elicitation response: ${error51 instanceof Error ? error51.message : String(error51)}`);
|
|
34195
35030
|
}
|
|
34196
35031
|
}
|
|
34197
35032
|
return result;
|
|
@@ -34450,13 +35285,13 @@ var McpServer = class {
|
|
|
34450
35285
|
}
|
|
34451
35286
|
await this.validateToolOutput(tool, result, request.params.name);
|
|
34452
35287
|
return result;
|
|
34453
|
-
} catch (
|
|
34454
|
-
if (
|
|
34455
|
-
if (
|
|
34456
|
-
throw
|
|
35288
|
+
} catch (error51) {
|
|
35289
|
+
if (error51 instanceof McpError) {
|
|
35290
|
+
if (error51.code === ErrorCode.UrlElicitationRequired) {
|
|
35291
|
+
throw error51;
|
|
34457
35292
|
}
|
|
34458
35293
|
}
|
|
34459
|
-
return this.createToolError(
|
|
35294
|
+
return this.createToolError(error51 instanceof Error ? error51.message : String(error51));
|
|
34460
35295
|
}
|
|
34461
35296
|
});
|
|
34462
35297
|
this._toolHandlersInitialized = true;
|
|
@@ -34489,8 +35324,8 @@ var McpServer = class {
|
|
|
34489
35324
|
const schemaToParse = inputObj ?? tool.inputSchema;
|
|
34490
35325
|
const parseResult = await safeParseAsync2(schemaToParse, args);
|
|
34491
35326
|
if (!parseResult.success) {
|
|
34492
|
-
const
|
|
34493
|
-
const errorMessage = getParseErrorMessage(
|
|
35327
|
+
const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
|
|
35328
|
+
const errorMessage = getParseErrorMessage(error51);
|
|
34494
35329
|
throw new McpError(ErrorCode.InvalidParams, `Input validation error: Invalid arguments for tool ${toolName}: ${errorMessage}`);
|
|
34495
35330
|
}
|
|
34496
35331
|
return parseResult.data;
|
|
@@ -34514,8 +35349,8 @@ var McpServer = class {
|
|
|
34514
35349
|
const outputObj = normalizeObjectSchema(tool.outputSchema);
|
|
34515
35350
|
const parseResult = await safeParseAsync2(outputObj, result.structuredContent);
|
|
34516
35351
|
if (!parseResult.success) {
|
|
34517
|
-
const
|
|
34518
|
-
const errorMessage = getParseErrorMessage(
|
|
35352
|
+
const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
|
|
35353
|
+
const errorMessage = getParseErrorMessage(error51);
|
|
34519
35354
|
throw new McpError(ErrorCode.InvalidParams, `Output validation error: Invalid structured content for tool ${toolName}: ${errorMessage}`);
|
|
34520
35355
|
}
|
|
34521
35356
|
}
|
|
@@ -34727,8 +35562,8 @@ var McpServer = class {
|
|
|
34727
35562
|
const argsObj = normalizeObjectSchema(prompt.argsSchema);
|
|
34728
35563
|
const parseResult = await safeParseAsync2(argsObj, request.params.arguments);
|
|
34729
35564
|
if (!parseResult.success) {
|
|
34730
|
-
const
|
|
34731
|
-
const errorMessage = getParseErrorMessage(
|
|
35565
|
+
const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
|
|
35566
|
+
const errorMessage = getParseErrorMessage(error51);
|
|
34732
35567
|
throw new McpError(ErrorCode.InvalidParams, `Invalid arguments for prompt ${request.params.name}: ${errorMessage}`);
|
|
34733
35568
|
}
|
|
34734
35569
|
const args = parseResult.data;
|
|
@@ -35174,8 +36009,8 @@ var StdioServerTransport = class {
|
|
|
35174
36009
|
this._readBuffer.append(chunk);
|
|
35175
36010
|
this.processReadBuffer();
|
|
35176
36011
|
};
|
|
35177
|
-
this._onerror = (
|
|
35178
|
-
this.onerror?.(
|
|
36012
|
+
this._onerror = (error51) => {
|
|
36013
|
+
this.onerror?.(error51);
|
|
35179
36014
|
};
|
|
35180
36015
|
}
|
|
35181
36016
|
/**
|
|
@@ -35197,8 +36032,8 @@ var StdioServerTransport = class {
|
|
|
35197
36032
|
break;
|
|
35198
36033
|
}
|
|
35199
36034
|
this.onmessage?.(message);
|
|
35200
|
-
} catch (
|
|
35201
|
-
this.onerror?.(
|
|
36035
|
+
} catch (error51) {
|
|
36036
|
+
this.onerror?.(error51);
|
|
35202
36037
|
}
|
|
35203
36038
|
}
|
|
35204
36039
|
}
|
|
@@ -35523,8 +36358,8 @@ var adminTools = [
|
|
|
35523
36358
|
idempotentHint: true,
|
|
35524
36359
|
openWorldHint: true
|
|
35525
36360
|
},
|
|
35526
|
-
inputSchema:
|
|
35527
|
-
limit:
|
|
36361
|
+
inputSchema: external_exports.object({
|
|
36362
|
+
limit: external_exports.number().int().min(1).max(100).default(50).describe("Max blocked/blocker pairs (default 50).")
|
|
35528
36363
|
}),
|
|
35529
36364
|
handler: async (input) => {
|
|
35530
36365
|
const { limit } = input;
|
|
@@ -35569,8 +36404,8 @@ var adminTools = [
|
|
|
35569
36404
|
idempotentHint: true,
|
|
35570
36405
|
openWorldHint: true
|
|
35571
36406
|
},
|
|
35572
|
-
inputSchema:
|
|
35573
|
-
includeSystem:
|
|
36407
|
+
inputSchema: external_exports.object({
|
|
36408
|
+
includeSystem: external_exports.boolean().default(false).describe("If true, include built-in `pg_*` roles (pg_read_all_data, pg_monitor, etc.).")
|
|
35574
36409
|
}),
|
|
35575
36410
|
handler: async (input) => {
|
|
35576
36411
|
const { includeSystem } = input;
|
|
@@ -35609,9 +36444,9 @@ var adminTools = [
|
|
|
35609
36444
|
idempotentHint: true,
|
|
35610
36445
|
openWorldHint: true
|
|
35611
36446
|
},
|
|
35612
|
-
inputSchema:
|
|
35613
|
-
schema:
|
|
35614
|
-
table:
|
|
36447
|
+
inputSchema: external_exports.object({
|
|
36448
|
+
schema: external_exports.string().min(1).max(63).default("public").describe("Schema name (defaults to 'public')."),
|
|
36449
|
+
table: external_exports.string().min(1).max(63).optional().describe("Table name. Omit to list privileges for all tables in the schema.")
|
|
35615
36450
|
}),
|
|
35616
36451
|
handler: async (input) => {
|
|
35617
36452
|
const { schema, table } = input;
|
|
@@ -35642,9 +36477,9 @@ var adminTools = [
|
|
|
35642
36477
|
idempotentHint: false,
|
|
35643
36478
|
openWorldHint: true
|
|
35644
36479
|
},
|
|
35645
|
-
inputSchema:
|
|
35646
|
-
pid:
|
|
35647
|
-
mode:
|
|
36480
|
+
inputSchema: external_exports.object({
|
|
36481
|
+
pid: external_exports.number().int().min(1).describe("Backend PID to signal."),
|
|
36482
|
+
mode: external_exports.enum(["cancel", "terminate"]).default("cancel").describe("`cancel` aborts the current query; `terminate` closes the connection entirely.")
|
|
35648
36483
|
}),
|
|
35649
36484
|
handler: async (input) => {
|
|
35650
36485
|
const { pid, mode } = input;
|
|
@@ -35679,7 +36514,7 @@ var adminTools = [
|
|
|
35679
36514
|
idempotentHint: true,
|
|
35680
36515
|
openWorldHint: true
|
|
35681
36516
|
},
|
|
35682
|
-
inputSchema:
|
|
36517
|
+
inputSchema: external_exports.object({}),
|
|
35683
36518
|
handler: async () => {
|
|
35684
36519
|
return withSharedClient(async (run) => {
|
|
35685
36520
|
const [slotsRes, replicasRes, walRes] = await Promise.all([
|
|
@@ -35738,10 +36573,10 @@ var adminTools = [
|
|
|
35738
36573
|
idempotentHint: true,
|
|
35739
36574
|
openWorldHint: true
|
|
35740
36575
|
},
|
|
35741
|
-
inputSchema:
|
|
35742
|
-
seqExhaustionThreshold:
|
|
35743
|
-
rlsSchemas:
|
|
35744
|
-
limit:
|
|
36576
|
+
inputSchema: external_exports.object({
|
|
36577
|
+
seqExhaustionThreshold: external_exports.number().min(0).max(1).default(0.5).describe("Minimum used-fraction (last_value / max_value) to flag a sequence (default 0.5 = 50%)."),
|
|
36578
|
+
rlsSchemas: external_exports.array(external_exports.string().min(1).max(63)).default(["public"]).describe("Schemas where RLS-missing should be flagged. Defaults to ['public']."),
|
|
36579
|
+
limit: external_exports.number().int().min(1).max(500).default(50).describe("Max rows per category (default 50).")
|
|
35745
36580
|
}),
|
|
35746
36581
|
handler: async (input) => {
|
|
35747
36582
|
const { seqExhaustionThreshold, rlsSchemas, limit } = input;
|
|
@@ -35750,16 +36585,19 @@ var adminTools = [
|
|
|
35750
36585
|
run(
|
|
35751
36586
|
// pg_sequences was added in PG10. last_value can be NULL on a never-
|
|
35752
36587
|
// touched sequence; we filter those out (nothing to report yet).
|
|
36588
|
+
// Divide in `numeric`, not `float8`: BIGINT sequences past 2^53 lose
|
|
36589
|
+
// precision in float8, and the danger zone (>= threshold) is exactly
|
|
36590
|
+
// where the reported pct_used must stay accurate.
|
|
35753
36591
|
`SELECT
|
|
35754
36592
|
schemaname AS schema,
|
|
35755
36593
|
sequencename AS sequence,
|
|
35756
36594
|
last_value::text AS last_value,
|
|
35757
36595
|
max_value::text AS max_value,
|
|
35758
|
-
(last_value::
|
|
36596
|
+
(last_value::numeric / NULLIF(max_value::numeric, 0))::numeric(6, 4)::float8 AS pct_used
|
|
35759
36597
|
FROM pg_catalog.pg_sequences
|
|
35760
36598
|
WHERE last_value IS NOT NULL
|
|
35761
36599
|
AND max_value > 0
|
|
35762
|
-
AND (last_value::
|
|
36600
|
+
AND (last_value::numeric / max_value::numeric) >= $1
|
|
35763
36601
|
ORDER BY pct_used DESC NULLS LAST
|
|
35764
36602
|
LIMIT $2`,
|
|
35765
36603
|
[seqExhaustionThreshold, limit]
|
|
@@ -35824,10 +36662,10 @@ var adminTools = [
|
|
|
35824
36662
|
idempotentHint: true,
|
|
35825
36663
|
openWorldHint: true
|
|
35826
36664
|
},
|
|
35827
|
-
inputSchema:
|
|
35828
|
-
schema:
|
|
35829
|
-
minDeadRatio:
|
|
35830
|
-
limit:
|
|
36665
|
+
inputSchema: external_exports.object({
|
|
36666
|
+
schema: external_exports.string().min(1).max(63).optional().describe("Limit to one schema. If omitted, all user schemas are included."),
|
|
36667
|
+
minDeadRatio: external_exports.number().min(0).max(1).default(0.1).describe("Minimum dead-tuple fraction to include \u2014 dead / (live + dead). Default 0.1 = 10%."),
|
|
36668
|
+
limit: external_exports.number().int().min(1).max(200).default(50).describe("Max rows to return (default 50).")
|
|
35831
36669
|
}),
|
|
35832
36670
|
handler: async (input) => {
|
|
35833
36671
|
const { schema, minDeadRatio, limit } = input;
|
|
@@ -35862,15 +36700,15 @@ var adminTools = [
|
|
|
35862
36700
|
];
|
|
35863
36701
|
|
|
35864
36702
|
// src/tools/params.ts
|
|
35865
|
-
var paramValue =
|
|
35866
|
-
() =>
|
|
36703
|
+
var paramValue = external_exports.lazy(
|
|
36704
|
+
() => external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean(), external_exports.null(), external_exports.array(paramValue), external_exports.record(external_exports.string(), paramValue)])
|
|
35867
36705
|
);
|
|
35868
36706
|
|
|
35869
36707
|
// src/tools/explain.ts
|
|
35870
|
-
var indexAccessMethod =
|
|
35871
|
-
var hypotheticalIndex =
|
|
35872
|
-
table:
|
|
35873
|
-
columns:
|
|
36708
|
+
var indexAccessMethod = external_exports.enum(["btree", "hash", "gin", "gist", "brin", "spgist"]);
|
|
36709
|
+
var hypotheticalIndex = external_exports.object({
|
|
36710
|
+
table: external_exports.string().min(1).max(127).describe("Target table. Use `schema.table` (e.g. `public.users`) or just `table` for the search_path."),
|
|
36711
|
+
columns: external_exports.array(external_exports.string().min(1).max(63)).min(1).describe("Column names in index order. Quoted identifiers are not supported here -- pass plain names."),
|
|
35874
36712
|
using: indexAccessMethod.default("btree").describe("Index access method. btree is the right answer for almost every query.")
|
|
35875
36713
|
});
|
|
35876
36714
|
function quoteIdent(name) {
|
|
@@ -35898,7 +36736,8 @@ function buildHypopgHooks(indexes) {
|
|
|
35898
36736
|
for (const idx of indexes) {
|
|
35899
36737
|
const cols = idx.columns.map(quoteIdent).join(", ");
|
|
35900
36738
|
const tbl = quoteQualifiedTable(idx.table);
|
|
35901
|
-
const
|
|
36739
|
+
const using = idx.using ?? "btree";
|
|
36740
|
+
const createSql = `CREATE INDEX ON ${tbl} USING ${using} (${cols})`;
|
|
35902
36741
|
const r = await client.query(
|
|
35903
36742
|
"SELECT (hypopg_create_index($1)).indexname AS indexname",
|
|
35904
36743
|
[createSql]
|
|
@@ -35924,12 +36763,12 @@ var explainTools = [
|
|
|
35924
36763
|
idempotentHint: false,
|
|
35925
36764
|
openWorldHint: true
|
|
35926
36765
|
},
|
|
35927
|
-
inputSchema:
|
|
35928
|
-
sql:
|
|
35929
|
-
analyze:
|
|
35930
|
-
format:
|
|
35931
|
-
params:
|
|
35932
|
-
hypothetical_indexes:
|
|
36766
|
+
inputSchema: external_exports.object({
|
|
36767
|
+
sql: external_exports.string().min(1).max(1e6).describe("The SQL statement to explain. Do NOT prefix with EXPLAIN."),
|
|
36768
|
+
analyze: external_exports.boolean().default(false).describe("Run EXPLAIN ANALYZE (actually executes the query)."),
|
|
36769
|
+
format: external_exports.enum(["text", "json"]).default("text").describe("Output format."),
|
|
36770
|
+
params: external_exports.array(paramValue).optional().describe("Positional parameters referenced as $1, $2, ... in the SQL."),
|
|
36771
|
+
hypothetical_indexes: external_exports.array(hypotheticalIndex).optional().describe(
|
|
35933
36772
|
"List of indexes the planner should pretend exist for this EXPLAIN. Requires the HypoPG extension. Indexes are session-scoped and reset at the end of the call."
|
|
35934
36773
|
)
|
|
35935
36774
|
}),
|
|
@@ -35991,8 +36830,8 @@ var healthTools = [
|
|
|
35991
36830
|
idempotentHint: true,
|
|
35992
36831
|
openWorldHint: true
|
|
35993
36832
|
},
|
|
35994
|
-
inputSchema:
|
|
35995
|
-
activeQueryLimit:
|
|
36833
|
+
inputSchema: external_exports.object({
|
|
36834
|
+
activeQueryLimit: external_exports.number().int().min(1).max(100).default(10).describe("Max active queries to return (default 10, max 100).")
|
|
35996
36835
|
}),
|
|
35997
36836
|
handler: async (input) => {
|
|
35998
36837
|
const { activeQueryLimit } = input;
|
|
@@ -36076,9 +36915,9 @@ var queryTools = [
|
|
|
36076
36915
|
idempotentHint: false,
|
|
36077
36916
|
openWorldHint: true
|
|
36078
36917
|
},
|
|
36079
|
-
inputSchema:
|
|
36080
|
-
sql:
|
|
36081
|
-
params:
|
|
36918
|
+
inputSchema: external_exports.object({
|
|
36919
|
+
sql: external_exports.string().min(1).max(1e6).describe("The SQL statement to execute. Hard cap of 1 MB."),
|
|
36920
|
+
params: external_exports.array(paramValue).optional().describe("Positional parameters referenced as $1, $2, ... in the SQL.")
|
|
36082
36921
|
}),
|
|
36083
36922
|
handler: async (input) => {
|
|
36084
36923
|
const { sql, params } = input;
|
|
@@ -36091,7 +36930,7 @@ var queryTools = [
|
|
|
36091
36930
|
];
|
|
36092
36931
|
|
|
36093
36932
|
// src/tools/schemas.ts
|
|
36094
|
-
var identSchema =
|
|
36933
|
+
var identSchema = external_exports.string().min(1).max(63);
|
|
36095
36934
|
var schemaTools = [
|
|
36096
36935
|
{
|
|
36097
36936
|
name: "pg_list_schemas",
|
|
@@ -36103,7 +36942,7 @@ var schemaTools = [
|
|
|
36103
36942
|
idempotentHint: true,
|
|
36104
36943
|
openWorldHint: true
|
|
36105
36944
|
},
|
|
36106
|
-
inputSchema:
|
|
36945
|
+
inputSchema: external_exports.object({}),
|
|
36107
36946
|
handler: async () => {
|
|
36108
36947
|
return runInternal(
|
|
36109
36948
|
`SELECT
|
|
@@ -36127,11 +36966,11 @@ var schemaTools = [
|
|
|
36127
36966
|
idempotentHint: true,
|
|
36128
36967
|
openWorldHint: true
|
|
36129
36968
|
},
|
|
36130
|
-
inputSchema:
|
|
36969
|
+
inputSchema: external_exports.object({
|
|
36131
36970
|
schema: identSchema.default("public").describe("Schema name (defaults to 'public')."),
|
|
36132
|
-
includeViews:
|
|
36133
|
-
limit:
|
|
36134
|
-
offset:
|
|
36971
|
+
includeViews: external_exports.boolean().default(false).describe("If true, include views and materialized views."),
|
|
36972
|
+
limit: external_exports.number().int().min(1).max(1e4).default(500).describe("Max rows to return (default 500, max 10000)."),
|
|
36973
|
+
offset: external_exports.number().int().min(0).default(0).describe("Rows to skip for pagination (default 0).")
|
|
36135
36974
|
}),
|
|
36136
36975
|
handler: async (input) => {
|
|
36137
36976
|
const { schema, includeViews, limit, offset } = input;
|
|
@@ -36168,7 +37007,7 @@ var schemaTools = [
|
|
|
36168
37007
|
idempotentHint: true,
|
|
36169
37008
|
openWorldHint: true
|
|
36170
37009
|
},
|
|
36171
|
-
inputSchema:
|
|
37010
|
+
inputSchema: external_exports.object({
|
|
36172
37011
|
schema: identSchema.default("public").describe("Schema name (defaults to 'public')."),
|
|
36173
37012
|
table: identSchema.describe("Table name.")
|
|
36174
37013
|
}),
|
|
@@ -36341,6 +37180,7 @@ var schemaTools = [
|
|
|
36341
37180
|
}
|
|
36342
37181
|
const kind = kindRes.ok ? kindRes.data?.[0]?.kind ?? "table" : "table";
|
|
36343
37182
|
const warnings = [];
|
|
37183
|
+
if (!kindRes.ok) warnings.push(`kind fetch failed, reported as "table": ${kindRes.error}`);
|
|
36344
37184
|
if (!pk.ok) warnings.push(`primary_key fetch failed: ${pk.error}`);
|
|
36345
37185
|
if (!fks.ok) warnings.push(`foreign_keys fetch failed: ${fks.error}`);
|
|
36346
37186
|
if (!idxs.ok) warnings.push(`indexes fetch failed: ${idxs.error}`);
|
|
@@ -36379,9 +37219,9 @@ var schemaTools = [
|
|
|
36379
37219
|
idempotentHint: true,
|
|
36380
37220
|
openWorldHint: true
|
|
36381
37221
|
},
|
|
36382
|
-
inputSchema:
|
|
37222
|
+
inputSchema: external_exports.object({
|
|
36383
37223
|
schema: identSchema.default("public").describe("Schema name (defaults to 'public')."),
|
|
36384
|
-
includeMaterialized:
|
|
37224
|
+
includeMaterialized: external_exports.boolean().default(true).describe("If true, include materialized views.")
|
|
36385
37225
|
}),
|
|
36386
37226
|
handler: async (input) => {
|
|
36387
37227
|
const { schema, includeMaterialized } = input;
|
|
@@ -36410,7 +37250,7 @@ var schemaTools = [
|
|
|
36410
37250
|
idempotentHint: true,
|
|
36411
37251
|
openWorldHint: true
|
|
36412
37252
|
},
|
|
36413
|
-
inputSchema:
|
|
37253
|
+
inputSchema: external_exports.object({
|
|
36414
37254
|
schema: identSchema.default("public").describe("Schema name (defaults to 'public').")
|
|
36415
37255
|
}),
|
|
36416
37256
|
handler: async (input) => {
|
|
@@ -36447,7 +37287,7 @@ var schemaTools = [
|
|
|
36447
37287
|
idempotentHint: true,
|
|
36448
37288
|
openWorldHint: true
|
|
36449
37289
|
},
|
|
36450
|
-
inputSchema:
|
|
37290
|
+
inputSchema: external_exports.object({}),
|
|
36451
37291
|
handler: async () => {
|
|
36452
37292
|
return runInternal(
|
|
36453
37293
|
`SELECT
|
|
@@ -36472,10 +37312,10 @@ var schemaTools = [
|
|
|
36472
37312
|
idempotentHint: true,
|
|
36473
37313
|
openWorldHint: true
|
|
36474
37314
|
},
|
|
36475
|
-
inputSchema:
|
|
36476
|
-
pattern:
|
|
37315
|
+
inputSchema: external_exports.object({
|
|
37316
|
+
pattern: external_exports.string().min(1).describe("LIKE pattern. Use '%' for wildcard: 'user_id', '%email%', 'created_%'."),
|
|
36477
37317
|
schema: identSchema.optional().describe("Limit to this schema. If omitted, searches all user schemas."),
|
|
36478
|
-
limit:
|
|
37318
|
+
limit: external_exports.number().int().min(1).max(1e3).default(100).describe("Max rows to return (default 100).")
|
|
36479
37319
|
}),
|
|
36480
37320
|
handler: async (input) => {
|
|
36481
37321
|
const { pattern, schema, limit } = input;
|
|
@@ -36506,7 +37346,7 @@ var schemaTools = [
|
|
|
36506
37346
|
];
|
|
36507
37347
|
|
|
36508
37348
|
// src/tools/stats.ts
|
|
36509
|
-
var identSchema2 =
|
|
37349
|
+
var identSchema2 = external_exports.string().min(1).max(63);
|
|
36510
37350
|
var statsTools = [
|
|
36511
37351
|
{
|
|
36512
37352
|
name: "pg_top_queries",
|
|
@@ -36518,9 +37358,9 @@ var statsTools = [
|
|
|
36518
37358
|
idempotentHint: true,
|
|
36519
37359
|
openWorldHint: true
|
|
36520
37360
|
},
|
|
36521
|
-
inputSchema:
|
|
36522
|
-
orderBy:
|
|
36523
|
-
limit:
|
|
37361
|
+
inputSchema: external_exports.object({
|
|
37362
|
+
orderBy: external_exports.enum(["total_time", "mean_time", "calls"]).default("total_time").describe("Ranking: total_time (cumulative impact), mean_time (worst per-call), or calls (hottest)."),
|
|
37363
|
+
limit: external_exports.number().int().min(1).max(100).default(20).describe("Number of rows to return (default 20).")
|
|
36524
37364
|
}),
|
|
36525
37365
|
handler: async (input) => {
|
|
36526
37366
|
const { orderBy, limit } = input;
|
|
@@ -36581,10 +37421,10 @@ var statsTools = [
|
|
|
36581
37421
|
idempotentHint: true,
|
|
36582
37422
|
openWorldHint: true
|
|
36583
37423
|
},
|
|
36584
|
-
inputSchema:
|
|
37424
|
+
inputSchema: external_exports.object({
|
|
36585
37425
|
schema: identSchema2.optional().describe("Limit to one schema. If omitted, all user schemas are included."),
|
|
36586
|
-
minSize:
|
|
36587
|
-
limit:
|
|
37426
|
+
minSize: external_exports.number().int().min(0).default(1e3).describe("Minimum live tuple count to include (default 1000, filters out tiny/empty tables)."),
|
|
37427
|
+
limit: external_exports.number().int().min(1).max(100).default(20).describe("Max rows to return (default 20).")
|
|
36588
37428
|
}),
|
|
36589
37429
|
handler: async (input) => {
|
|
36590
37430
|
const { schema, minSize, limit } = input;
|
|
@@ -36622,10 +37462,10 @@ var statsTools = [
|
|
|
36622
37462
|
idempotentHint: true,
|
|
36623
37463
|
openWorldHint: true
|
|
36624
37464
|
},
|
|
36625
|
-
inputSchema:
|
|
37465
|
+
inputSchema: external_exports.object({
|
|
36626
37466
|
schema: identSchema2.optional().describe("Limit to one schema. If omitted, all user schemas are included."),
|
|
36627
|
-
maxScans:
|
|
36628
|
-
limit:
|
|
37467
|
+
maxScans: external_exports.number().int().min(0).default(10).describe("Include indexes with scan count <= this (default 10). Use 0 for 'never scanned'."),
|
|
37468
|
+
limit: external_exports.number().int().min(1).max(200).default(50).describe("Max rows to return (default 50).")
|
|
36629
37469
|
}),
|
|
36630
37470
|
handler: async (input) => {
|
|
36631
37471
|
const { schema, maxScans, limit } = input;
|
|
@@ -36670,7 +37510,7 @@ function compareVersions(a, b) {
|
|
|
36670
37510
|
}
|
|
36671
37511
|
|
|
36672
37512
|
// src/index.ts
|
|
36673
|
-
var version2 = true ? "0.5.
|
|
37513
|
+
var version2 = true ? "0.5.3" : (await null).createRequire(import.meta.url)("../package.json").version;
|
|
36674
37514
|
var subcommand = process.argv[2];
|
|
36675
37515
|
if (subcommand === "version" || subcommand === "--version") {
|
|
36676
37516
|
console.log(version2);
|