@datapos/datapos-development 0.3.74 → 0.3.76
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/dist/datapos-development.es.js +368 -364
- package/package.json +1 -1
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { exec as qn } from "child_process";
|
|
2
|
-
import { promises as
|
|
2
|
+
import { promises as h } from "fs";
|
|
3
3
|
import { nanoid as Yn } from "nanoid";
|
|
4
4
|
import { promisify as Xn } from "util";
|
|
5
|
-
const Qn =
|
|
6
|
-
__proto__: null,
|
|
7
|
-
default: Qn
|
|
8
|
-
}, Symbol.toStringTag, { value: "Module" })), tt = ["createObject", "dropObject", "removeRecords", "upsertRecords"], et = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
|
|
5
|
+
const Qn = ["createObject", "dropObject", "removeRecords", "upsertRecords"], nt = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
|
|
9
6
|
function a(n, t, e) {
|
|
10
7
|
function o(c, u) {
|
|
11
8
|
var d;
|
|
@@ -47,7 +44,7 @@ const xn = {};
|
|
|
47
44
|
function x(n) {
|
|
48
45
|
return xn;
|
|
49
46
|
}
|
|
50
|
-
function
|
|
47
|
+
function tt(n) {
|
|
51
48
|
const t = Object.values(n).filter((e) => typeof e == "number");
|
|
52
49
|
return Object.entries(n).filter(([e, o]) => t.indexOf(+e) === -1).map(([e, o]) => o);
|
|
53
50
|
}
|
|
@@ -112,7 +109,7 @@ const jn = "captureStackTrace" in Error ? Error.captureStackTrace : (...n) => {
|
|
|
112
109
|
function L(n) {
|
|
113
110
|
return typeof n == "object" && n !== null && !Array.isArray(n);
|
|
114
111
|
}
|
|
115
|
-
const
|
|
112
|
+
const et = nn(() => {
|
|
116
113
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
117
114
|
return !1;
|
|
118
115
|
try {
|
|
@@ -134,7 +131,7 @@ function N(n) {
|
|
|
134
131
|
function En(n) {
|
|
135
132
|
return N(n) ? { ...n } : Array.isArray(n) ? [...n] : n;
|
|
136
133
|
}
|
|
137
|
-
const
|
|
134
|
+
const ot = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
138
135
|
function B(n) {
|
|
139
136
|
return n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
140
137
|
}
|
|
@@ -155,10 +152,10 @@ function f(n) {
|
|
|
155
152
|
}
|
|
156
153
|
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
157
154
|
}
|
|
158
|
-
function
|
|
155
|
+
function rt(n) {
|
|
159
156
|
return Object.keys(n).filter((t) => n[t]._zod.optin === "optional" && n[t]._zod.optout === "optional");
|
|
160
157
|
}
|
|
161
|
-
function
|
|
158
|
+
function it(n, t) {
|
|
162
159
|
const e = n._zod.def, o = S(n._zod.def, {
|
|
163
160
|
get shape() {
|
|
164
161
|
const r = {};
|
|
@@ -173,7 +170,7 @@ function at(n, t) {
|
|
|
173
170
|
});
|
|
174
171
|
return O(n, o);
|
|
175
172
|
}
|
|
176
|
-
function
|
|
173
|
+
function st(n, t) {
|
|
177
174
|
const e = n._zod.def, o = S(n._zod.def, {
|
|
178
175
|
get shape() {
|
|
179
176
|
const r = { ...n._zod.def.shape };
|
|
@@ -188,7 +185,7 @@ function ct(n, t) {
|
|
|
188
185
|
});
|
|
189
186
|
return O(n, o);
|
|
190
187
|
}
|
|
191
|
-
function
|
|
188
|
+
function at(n, t) {
|
|
192
189
|
if (!N(t))
|
|
193
190
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
194
191
|
const e = n._zod.def.checks;
|
|
@@ -203,7 +200,7 @@ function ut(n, t) {
|
|
|
203
200
|
});
|
|
204
201
|
return O(n, o);
|
|
205
202
|
}
|
|
206
|
-
function
|
|
203
|
+
function ct(n, t) {
|
|
207
204
|
if (!N(t))
|
|
208
205
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
209
206
|
const e = {
|
|
@@ -216,7 +213,7 @@ function dt(n, t) {
|
|
|
216
213
|
};
|
|
217
214
|
return O(n, e);
|
|
218
215
|
}
|
|
219
|
-
function
|
|
216
|
+
function ut(n, t) {
|
|
220
217
|
const e = S(n._zod.def, {
|
|
221
218
|
get shape() {
|
|
222
219
|
const o = { ...n._zod.def.shape, ...t._zod.def.shape };
|
|
@@ -230,7 +227,7 @@ function ft(n, t) {
|
|
|
230
227
|
});
|
|
231
228
|
return O(n, e);
|
|
232
229
|
}
|
|
233
|
-
function
|
|
230
|
+
function dt(n, t, e) {
|
|
234
231
|
const o = S(t._zod.def, {
|
|
235
232
|
get shape() {
|
|
236
233
|
const r = t._zod.def.shape, i = { ...r };
|
|
@@ -255,7 +252,7 @@ function lt(n, t, e) {
|
|
|
255
252
|
});
|
|
256
253
|
return O(t, o);
|
|
257
254
|
}
|
|
258
|
-
function
|
|
255
|
+
function ft(n, t, e) {
|
|
259
256
|
const o = S(t._zod.def, {
|
|
260
257
|
get shape() {
|
|
261
258
|
const r = t._zod.def.shape, i = { ...r };
|
|
@@ -329,13 +326,13 @@ const Pn = (n, t) => {
|
|
|
329
326
|
enumerable: !1
|
|
330
327
|
});
|
|
331
328
|
}, An = a("$ZodError", Pn), In = a("$ZodError", Pn, { Parent: Error });
|
|
332
|
-
function
|
|
329
|
+
function lt(n, t = (e) => e.message) {
|
|
333
330
|
const e = {}, o = [];
|
|
334
331
|
for (const r of n.issues)
|
|
335
332
|
r.path.length > 0 ? (e[r.path[0]] = e[r.path[0]] || [], e[r.path[0]].push(t(r))) : o.push(t(r));
|
|
336
333
|
return { formErrors: o, fieldErrors: e };
|
|
337
334
|
}
|
|
338
|
-
function
|
|
335
|
+
function pt(n, t = (e) => e.message) {
|
|
339
336
|
const e = { _errors: [] }, o = (r) => {
|
|
340
337
|
for (const i of r.issues)
|
|
341
338
|
if (i.code === "invalid_union" && i.errors.length)
|
|
@@ -381,50 +378,50 @@ const rn = (n) => (t, e, o, r) => {
|
|
|
381
378
|
success: !1,
|
|
382
379
|
error: new (n ?? An)(i.issues.map((s) => j(s, r, x())))
|
|
383
380
|
} : { success: !0, data: i.value };
|
|
384
|
-
},
|
|
381
|
+
}, ht = /* @__PURE__ */ K(In), G = (n) => async (t, e, o) => {
|
|
385
382
|
const r = o ? Object.assign(o, { async: !0 }) : { async: !0 };
|
|
386
383
|
let i = t._zod.run({ value: e, issues: [] }, r);
|
|
387
384
|
return i instanceof Promise && (i = await i), i.issues.length ? {
|
|
388
385
|
success: !1,
|
|
389
386
|
error: new n(i.issues.map((s) => j(s, r, x())))
|
|
390
387
|
} : { success: !0, data: i.value };
|
|
391
|
-
},
|
|
388
|
+
}, mt = /* @__PURE__ */ G(In), gt = (n) => (t, e, o) => {
|
|
392
389
|
const r = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
|
|
393
390
|
return rn(n)(t, e, r);
|
|
394
|
-
},
|
|
391
|
+
}, vt = (n) => (t, e, o) => rn(n)(t, e, o), yt = (n) => async (t, e, o) => {
|
|
395
392
|
const r = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
|
|
396
393
|
return sn(n)(t, e, r);
|
|
397
|
-
},
|
|
394
|
+
}, _t = (n) => async (t, e, o) => sn(n)(t, e, o), wt = (n) => (t, e, o) => {
|
|
398
395
|
const r = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
|
|
399
396
|
return K(n)(t, e, r);
|
|
400
|
-
},
|
|
397
|
+
}, zt = (n) => (t, e, o) => K(n)(t, e, o), bt = (n) => async (t, e, o) => {
|
|
401
398
|
const r = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
|
|
402
399
|
return G(n)(t, e, r);
|
|
403
|
-
},
|
|
404
|
-
function
|
|
405
|
-
return new RegExp(
|
|
400
|
+
}, kt = (n) => async (t, e, o) => G(n)(t, e, o), $t = /^[cC][^\s-]{8,}$/, Zt = /^[0-9a-z]+$/, Ot = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, xt = /^[0-9a-vA-V]{20}$/, jt = /^[A-Za-z0-9]{27}$/, Et = /^[a-zA-Z0-9_-]{21}$/, St = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Pt = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, fn = (n) => n ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${n}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, At = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, It = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
401
|
+
function Tt() {
|
|
402
|
+
return new RegExp(It, "u");
|
|
406
403
|
}
|
|
407
|
-
const
|
|
404
|
+
const Nt = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ft = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, Ct = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Jt = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Dt = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Tn = /^[A-Za-z0-9_-]*$/, Rt = /^(?=.{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])?)*\.?$/, Ut = /^\+(?:[0-9]){6,14}[0-9]$/, Nn = "(?:(?:\\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])))", Vt = /* @__PURE__ */ new RegExp(`^${Nn}$`);
|
|
408
405
|
function Fn(n) {
|
|
409
406
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
410
407
|
return typeof n.precision == "number" ? n.precision === -1 ? `${t}` : n.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${n.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
411
408
|
}
|
|
412
|
-
function
|
|
409
|
+
function Lt(n) {
|
|
413
410
|
return new RegExp(`^${Fn(n)}$`);
|
|
414
411
|
}
|
|
415
|
-
function
|
|
412
|
+
function Wt(n) {
|
|
416
413
|
const t = Fn({ precision: n.precision }), e = ["Z"];
|
|
417
414
|
n.local && e.push(""), n.offset && e.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
418
415
|
const o = `${t}(?:${e.join("|")})`;
|
|
419
416
|
return new RegExp(`^${Nn}T(?:${o})$`);
|
|
420
417
|
}
|
|
421
|
-
const
|
|
418
|
+
const Mt = (n) => {
|
|
422
419
|
const t = n ? `[\\s\\S]{${n?.minimum ?? 0},${n?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
423
420
|
return new RegExp(`^${t}$`);
|
|
424
|
-
},
|
|
421
|
+
}, Bt = /^[^A-Z]*$/, Kt = /^[^a-z]*$/, $ = /* @__PURE__ */ a("$ZodCheck", (n, t) => {
|
|
425
422
|
var e;
|
|
426
423
|
n._zod ?? (n._zod = {}), n._zod.def = t, (e = n._zod).onattach ?? (e.onattach = []);
|
|
427
|
-
}),
|
|
424
|
+
}), Gt = /* @__PURE__ */ a("$ZodCheckMaxLength", (n, t) => {
|
|
428
425
|
var e;
|
|
429
426
|
$.init(n, t), (e = n._zod.def).when ?? (e.when = (o) => {
|
|
430
427
|
const r = o.value;
|
|
@@ -447,7 +444,7 @@ const Kt = (n) => {
|
|
|
447
444
|
continue: !t.abort
|
|
448
445
|
});
|
|
449
446
|
};
|
|
450
|
-
}),
|
|
447
|
+
}), Ht = /* @__PURE__ */ a("$ZodCheckMinLength", (n, t) => {
|
|
451
448
|
var e;
|
|
452
449
|
$.init(n, t), (e = n._zod.def).when ?? (e.when = (o) => {
|
|
453
450
|
const r = o.value;
|
|
@@ -470,7 +467,7 @@ const Kt = (n) => {
|
|
|
470
467
|
continue: !t.abort
|
|
471
468
|
});
|
|
472
469
|
};
|
|
473
|
-
}),
|
|
470
|
+
}), qt = /* @__PURE__ */ a("$ZodCheckLengthEquals", (n, t) => {
|
|
474
471
|
var e;
|
|
475
472
|
$.init(n, t), (e = n._zod.def).when ?? (e.when = (o) => {
|
|
476
473
|
const r = o.value;
|
|
@@ -510,7 +507,7 @@ const Kt = (n) => {
|
|
|
510
507
|
});
|
|
511
508
|
}) : (o = n._zod).check ?? (o.check = () => {
|
|
512
509
|
});
|
|
513
|
-
}),
|
|
510
|
+
}), Yt = /* @__PURE__ */ a("$ZodCheckRegex", (n, t) => {
|
|
514
511
|
H.init(n, t), n._zod.check = (e) => {
|
|
515
512
|
t.pattern.lastIndex = 0, !t.pattern.test(e.value) && e.issues.push({
|
|
516
513
|
origin: "string",
|
|
@@ -522,11 +519,11 @@ const Kt = (n) => {
|
|
|
522
519
|
continue: !t.abort
|
|
523
520
|
});
|
|
524
521
|
};
|
|
525
|
-
}),
|
|
526
|
-
t.pattern ?? (t.pattern =
|
|
527
|
-
}),
|
|
528
|
-
t.pattern ?? (t.pattern =
|
|
529
|
-
}),
|
|
522
|
+
}), Xt = /* @__PURE__ */ a("$ZodCheckLowerCase", (n, t) => {
|
|
523
|
+
t.pattern ?? (t.pattern = Bt), H.init(n, t);
|
|
524
|
+
}), Qt = /* @__PURE__ */ a("$ZodCheckUpperCase", (n, t) => {
|
|
525
|
+
t.pattern ?? (t.pattern = Kt), H.init(n, t);
|
|
526
|
+
}), ne = /* @__PURE__ */ a("$ZodCheckIncludes", (n, t) => {
|
|
530
527
|
$.init(n, t);
|
|
531
528
|
const e = B(t.includes), o = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${e}` : e);
|
|
532
529
|
t.pattern = o, n._zod.onattach.push((r) => {
|
|
@@ -543,7 +540,7 @@ const Kt = (n) => {
|
|
|
543
540
|
continue: !t.abort
|
|
544
541
|
});
|
|
545
542
|
};
|
|
546
|
-
}),
|
|
543
|
+
}), te = /* @__PURE__ */ a("$ZodCheckStartsWith", (n, t) => {
|
|
547
544
|
$.init(n, t);
|
|
548
545
|
const e = new RegExp(`^${B(t.prefix)}.*`);
|
|
549
546
|
t.pattern ?? (t.pattern = e), n._zod.onattach.push((o) => {
|
|
@@ -560,7 +557,7 @@ const Kt = (n) => {
|
|
|
560
557
|
continue: !t.abort
|
|
561
558
|
});
|
|
562
559
|
};
|
|
563
|
-
}),
|
|
560
|
+
}), ee = /* @__PURE__ */ a("$ZodCheckEndsWith", (n, t) => {
|
|
564
561
|
$.init(n, t);
|
|
565
562
|
const e = new RegExp(`.*${B(t.suffix)}$`);
|
|
566
563
|
t.pattern ?? (t.pattern = e), n._zod.onattach.push((o) => {
|
|
@@ -577,12 +574,12 @@ const Kt = (n) => {
|
|
|
577
574
|
continue: !t.abort
|
|
578
575
|
});
|
|
579
576
|
};
|
|
580
|
-
}),
|
|
577
|
+
}), oe = /* @__PURE__ */ a("$ZodCheckOverwrite", (n, t) => {
|
|
581
578
|
$.init(n, t), n._zod.check = (e) => {
|
|
582
579
|
e.value = t.tx(e.value);
|
|
583
580
|
};
|
|
584
581
|
});
|
|
585
|
-
class
|
|
582
|
+
class re {
|
|
586
583
|
constructor(t = []) {
|
|
587
584
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
588
585
|
}
|
|
@@ -605,13 +602,13 @@ class se {
|
|
|
605
602
|
`));
|
|
606
603
|
}
|
|
607
604
|
}
|
|
608
|
-
const
|
|
605
|
+
const ie = {
|
|
609
606
|
major: 4,
|
|
610
607
|
minor: 1,
|
|
611
608
|
patch: 12
|
|
612
609
|
}, _ = /* @__PURE__ */ a("$ZodType", (n, t) => {
|
|
613
610
|
var e;
|
|
614
|
-
n ?? (n = {}), n._zod.def = t, n._zod.bag = n._zod.bag || {}, n._zod.version =
|
|
611
|
+
n ?? (n = {}), n._zod.def = t, n._zod.bag = n._zod.bag || {}, n._zod.version = ie;
|
|
615
612
|
const o = [...n._zod.def.checks ?? []];
|
|
616
613
|
n._zod.traits.has("$ZodCheck") && o.unshift(n);
|
|
617
614
|
for (const r of o)
|
|
@@ -624,13 +621,13 @@ const ae = {
|
|
|
624
621
|
else {
|
|
625
622
|
const r = (s, c, u) => {
|
|
626
623
|
let d = P(s), l;
|
|
627
|
-
for (const
|
|
628
|
-
if (
|
|
629
|
-
if (!
|
|
624
|
+
for (const p of c) {
|
|
625
|
+
if (p._zod.def.when) {
|
|
626
|
+
if (!p._zod.def.when(s))
|
|
630
627
|
continue;
|
|
631
628
|
} else if (d)
|
|
632
629
|
continue;
|
|
633
|
-
const m = s.issues.length, z =
|
|
630
|
+
const m = s.issues.length, z = p._zod.check(s);
|
|
634
631
|
if (z instanceof Promise && u?.async === !1)
|
|
635
632
|
throw new I();
|
|
636
633
|
if (l || z instanceof Promise)
|
|
@@ -674,17 +671,17 @@ const ae = {
|
|
|
674
671
|
n["~standard"] = {
|
|
675
672
|
validate: (r) => {
|
|
676
673
|
try {
|
|
677
|
-
const i =
|
|
674
|
+
const i = ht(n, r);
|
|
678
675
|
return i.success ? { value: i.data } : { issues: i.error?.issues };
|
|
679
676
|
} catch {
|
|
680
|
-
return
|
|
677
|
+
return mt(n, r).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
|
|
681
678
|
}
|
|
682
679
|
},
|
|
683
680
|
vendor: "zod",
|
|
684
681
|
version: 1
|
|
685
682
|
};
|
|
686
683
|
}), an = /* @__PURE__ */ a("$ZodString", (n, t) => {
|
|
687
|
-
_.init(n, t), n._zod.pattern = [...n?._zod.bag?.patterns ?? []].pop() ??
|
|
684
|
+
_.init(n, t), n._zod.pattern = [...n?._zod.bag?.patterns ?? []].pop() ?? Mt(n._zod.bag), n._zod.parse = (e, o) => {
|
|
688
685
|
if (t.coerce)
|
|
689
686
|
try {
|
|
690
687
|
e.value = String(e.value);
|
|
@@ -699,9 +696,9 @@ const ae = {
|
|
|
699
696
|
};
|
|
700
697
|
}), v = /* @__PURE__ */ a("$ZodStringFormat", (n, t) => {
|
|
701
698
|
H.init(n, t), an.init(n, t);
|
|
702
|
-
}),
|
|
703
|
-
t.pattern ?? (t.pattern =
|
|
704
|
-
}),
|
|
699
|
+
}), se = /* @__PURE__ */ a("$ZodGUID", (n, t) => {
|
|
700
|
+
t.pattern ?? (t.pattern = Pt), v.init(n, t);
|
|
701
|
+
}), ae = /* @__PURE__ */ a("$ZodUUID", (n, t) => {
|
|
705
702
|
if (t.version) {
|
|
706
703
|
const e = {
|
|
707
704
|
v1: 1,
|
|
@@ -719,9 +716,9 @@ const ae = {
|
|
|
719
716
|
} else
|
|
720
717
|
t.pattern ?? (t.pattern = fn());
|
|
721
718
|
v.init(n, t);
|
|
722
|
-
}),
|
|
723
|
-
t.pattern ?? (t.pattern =
|
|
724
|
-
}),
|
|
719
|
+
}), ce = /* @__PURE__ */ a("$ZodEmail", (n, t) => {
|
|
720
|
+
t.pattern ?? (t.pattern = At), v.init(n, t);
|
|
721
|
+
}), ue = /* @__PURE__ */ a("$ZodURL", (n, t) => {
|
|
725
722
|
v.init(n, t), n._zod.check = (e) => {
|
|
726
723
|
try {
|
|
727
724
|
const o = e.value.trim(), r = new URL(o);
|
|
@@ -729,7 +726,7 @@ const ae = {
|
|
|
729
726
|
code: "invalid_format",
|
|
730
727
|
format: "url",
|
|
731
728
|
note: "Invalid hostname",
|
|
732
|
-
pattern:
|
|
729
|
+
pattern: Rt.source,
|
|
733
730
|
input: e.value,
|
|
734
731
|
inst: n,
|
|
735
732
|
continue: !t.abort
|
|
@@ -753,35 +750,35 @@ const ae = {
|
|
|
753
750
|
});
|
|
754
751
|
}
|
|
755
752
|
};
|
|
756
|
-
}),
|
|
757
|
-
t.pattern ?? (t.pattern =
|
|
758
|
-
}),
|
|
759
|
-
t.pattern ?? (t.pattern =
|
|
760
|
-
}),
|
|
753
|
+
}), de = /* @__PURE__ */ a("$ZodEmoji", (n, t) => {
|
|
754
|
+
t.pattern ?? (t.pattern = Tt()), v.init(n, t);
|
|
755
|
+
}), fe = /* @__PURE__ */ a("$ZodNanoID", (n, t) => {
|
|
756
|
+
t.pattern ?? (t.pattern = Et), v.init(n, t);
|
|
757
|
+
}), le = /* @__PURE__ */ a("$ZodCUID", (n, t) => {
|
|
758
|
+
t.pattern ?? (t.pattern = $t), v.init(n, t);
|
|
759
|
+
}), pe = /* @__PURE__ */ a("$ZodCUID2", (n, t) => {
|
|
760
|
+
t.pattern ?? (t.pattern = Zt), v.init(n, t);
|
|
761
|
+
}), he = /* @__PURE__ */ a("$ZodULID", (n, t) => {
|
|
761
762
|
t.pattern ?? (t.pattern = Ot), v.init(n, t);
|
|
762
|
-
}), me = /* @__PURE__ */ a("$
|
|
763
|
+
}), me = /* @__PURE__ */ a("$ZodXID", (n, t) => {
|
|
763
764
|
t.pattern ?? (t.pattern = xt), v.init(n, t);
|
|
764
|
-
}), ge = /* @__PURE__ */ a("$
|
|
765
|
+
}), ge = /* @__PURE__ */ a("$ZodKSUID", (n, t) => {
|
|
765
766
|
t.pattern ?? (t.pattern = jt), v.init(n, t);
|
|
766
|
-
}), ve = /* @__PURE__ */ a("$
|
|
767
|
-
t.pattern ?? (t.pattern = Et), v.init(n, t);
|
|
768
|
-
}), ye = /* @__PURE__ */ a("$ZodKSUID", (n, t) => {
|
|
769
|
-
t.pattern ?? (t.pattern = St), v.init(n, t);
|
|
770
|
-
}), _e = /* @__PURE__ */ a("$ZodISODateTime", (n, t) => {
|
|
771
|
-
t.pattern ?? (t.pattern = Bt(t)), v.init(n, t);
|
|
772
|
-
}), we = /* @__PURE__ */ a("$ZodISODate", (n, t) => {
|
|
773
|
-
t.pattern ?? (t.pattern = Mt), v.init(n, t);
|
|
774
|
-
}), ze = /* @__PURE__ */ a("$ZodISOTime", (n, t) => {
|
|
767
|
+
}), ve = /* @__PURE__ */ a("$ZodISODateTime", (n, t) => {
|
|
775
768
|
t.pattern ?? (t.pattern = Wt(t)), v.init(n, t);
|
|
776
|
-
}),
|
|
777
|
-
t.pattern ?? (t.pattern =
|
|
778
|
-
}),
|
|
779
|
-
t.pattern ?? (t.pattern =
|
|
769
|
+
}), ye = /* @__PURE__ */ a("$ZodISODate", (n, t) => {
|
|
770
|
+
t.pattern ?? (t.pattern = Vt), v.init(n, t);
|
|
771
|
+
}), _e = /* @__PURE__ */ a("$ZodISOTime", (n, t) => {
|
|
772
|
+
t.pattern ?? (t.pattern = Lt(t)), v.init(n, t);
|
|
773
|
+
}), we = /* @__PURE__ */ a("$ZodISODuration", (n, t) => {
|
|
774
|
+
t.pattern ?? (t.pattern = St), v.init(n, t);
|
|
775
|
+
}), ze = /* @__PURE__ */ a("$ZodIPv4", (n, t) => {
|
|
776
|
+
t.pattern ?? (t.pattern = Nt), v.init(n, t), n._zod.onattach.push((e) => {
|
|
780
777
|
const o = e._zod.bag;
|
|
781
778
|
o.format = "ipv4";
|
|
782
779
|
});
|
|
783
|
-
}),
|
|
784
|
-
t.pattern ?? (t.pattern =
|
|
780
|
+
}), be = /* @__PURE__ */ a("$ZodIPv6", (n, t) => {
|
|
781
|
+
t.pattern ?? (t.pattern = Ft), v.init(n, t), n._zod.onattach.push((e) => {
|
|
785
782
|
const o = e._zod.bag;
|
|
786
783
|
o.format = "ipv6";
|
|
787
784
|
}), n._zod.check = (e) => {
|
|
@@ -797,10 +794,10 @@ const ae = {
|
|
|
797
794
|
});
|
|
798
795
|
}
|
|
799
796
|
};
|
|
800
|
-
}),
|
|
801
|
-
t.pattern ?? (t.pattern =
|
|
802
|
-
}),
|
|
803
|
-
t.pattern ?? (t.pattern =
|
|
797
|
+
}), ke = /* @__PURE__ */ a("$ZodCIDRv4", (n, t) => {
|
|
798
|
+
t.pattern ?? (t.pattern = Ct), v.init(n, t);
|
|
799
|
+
}), $e = /* @__PURE__ */ a("$ZodCIDRv6", (n, t) => {
|
|
800
|
+
t.pattern ?? (t.pattern = Jt), v.init(n, t), n._zod.check = (e) => {
|
|
804
801
|
const o = e.value.split("/");
|
|
805
802
|
try {
|
|
806
803
|
if (o.length !== 2)
|
|
@@ -836,8 +833,8 @@ function Cn(n) {
|
|
|
836
833
|
return !1;
|
|
837
834
|
}
|
|
838
835
|
}
|
|
839
|
-
const
|
|
840
|
-
t.pattern ?? (t.pattern =
|
|
836
|
+
const Ze = /* @__PURE__ */ a("$ZodBase64", (n, t) => {
|
|
837
|
+
t.pattern ?? (t.pattern = Dt), v.init(n, t), n._zod.onattach.push((e) => {
|
|
841
838
|
e._zod.bag.contentEncoding = "base64";
|
|
842
839
|
}), n._zod.check = (e) => {
|
|
843
840
|
Cn(e.value) || e.issues.push({
|
|
@@ -849,17 +846,17 @@ const xe = /* @__PURE__ */ a("$ZodBase64", (n, t) => {
|
|
|
849
846
|
});
|
|
850
847
|
};
|
|
851
848
|
});
|
|
852
|
-
function
|
|
849
|
+
function Oe(n) {
|
|
853
850
|
if (!Tn.test(n))
|
|
854
851
|
return !1;
|
|
855
852
|
const t = n.replace(/[-_]/g, (o) => o === "-" ? "+" : "/"), e = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
856
853
|
return Cn(e);
|
|
857
854
|
}
|
|
858
|
-
const
|
|
855
|
+
const xe = /* @__PURE__ */ a("$ZodBase64URL", (n, t) => {
|
|
859
856
|
t.pattern ?? (t.pattern = Tn), v.init(n, t), n._zod.onattach.push((e) => {
|
|
860
857
|
e._zod.bag.contentEncoding = "base64url";
|
|
861
858
|
}), n._zod.check = (e) => {
|
|
862
|
-
|
|
859
|
+
Oe(e.value) || e.issues.push({
|
|
863
860
|
code: "invalid_format",
|
|
864
861
|
format: "base64url",
|
|
865
862
|
input: e.value,
|
|
@@ -867,10 +864,10 @@ const Ee = /* @__PURE__ */ a("$ZodBase64URL", (n, t) => {
|
|
|
867
864
|
continue: !t.abort
|
|
868
865
|
});
|
|
869
866
|
};
|
|
870
|
-
}),
|
|
871
|
-
t.pattern ?? (t.pattern =
|
|
867
|
+
}), je = /* @__PURE__ */ a("$ZodE164", (n, t) => {
|
|
868
|
+
t.pattern ?? (t.pattern = Ut), v.init(n, t);
|
|
872
869
|
});
|
|
873
|
-
function
|
|
870
|
+
function Ee(n, t = null) {
|
|
874
871
|
try {
|
|
875
872
|
const e = n.split(".");
|
|
876
873
|
if (e.length !== 3)
|
|
@@ -884,9 +881,9 @@ function Pe(n, t = null) {
|
|
|
884
881
|
return !1;
|
|
885
882
|
}
|
|
886
883
|
}
|
|
887
|
-
const
|
|
884
|
+
const Se = /* @__PURE__ */ a("$ZodJWT", (n, t) => {
|
|
888
885
|
v.init(n, t), n._zod.check = (e) => {
|
|
889
|
-
|
|
886
|
+
Ee(e.value, t.alg) || e.issues.push({
|
|
890
887
|
code: "invalid_format",
|
|
891
888
|
format: "jwt",
|
|
892
889
|
input: e.value,
|
|
@@ -894,9 +891,9 @@ const Ae = /* @__PURE__ */ a("$ZodJWT", (n, t) => {
|
|
|
894
891
|
continue: !t.abort
|
|
895
892
|
});
|
|
896
893
|
};
|
|
897
|
-
}),
|
|
894
|
+
}), Pe = /* @__PURE__ */ a("$ZodUnknown", (n, t) => {
|
|
898
895
|
_.init(n, t), n._zod.parse = (e) => e;
|
|
899
|
-
}),
|
|
896
|
+
}), Ae = /* @__PURE__ */ a("$ZodNever", (n, t) => {
|
|
900
897
|
_.init(n, t), n._zod.parse = (e, o) => (e.issues.push({
|
|
901
898
|
expected: "never",
|
|
902
899
|
code: "invalid_type",
|
|
@@ -907,7 +904,7 @@ const Ae = /* @__PURE__ */ a("$ZodJWT", (n, t) => {
|
|
|
907
904
|
function ln(n, t, e) {
|
|
908
905
|
n.issues.length && t.issues.push(...Sn(e, n.issues)), t.value[e] = n.value;
|
|
909
906
|
}
|
|
910
|
-
const
|
|
907
|
+
const Ie = /* @__PURE__ */ a("$ZodArray", (n, t) => {
|
|
911
908
|
_.init(n, t), n._zod.parse = (e, o) => {
|
|
912
909
|
const r = e.value;
|
|
913
910
|
if (!Array.isArray(r))
|
|
@@ -929,7 +926,7 @@ const Ne = /* @__PURE__ */ a("$ZodArray", (n, t) => {
|
|
|
929
926
|
return i.length ? Promise.all(i).then(() => e) : e;
|
|
930
927
|
};
|
|
931
928
|
});
|
|
932
|
-
function
|
|
929
|
+
function W(n, t, e, o) {
|
|
933
930
|
n.issues.length && t.issues.push(...Sn(e, n.issues)), n.value === void 0 ? e in o && (t.value[e] = void 0) : t.value[e] = n.value;
|
|
934
931
|
}
|
|
935
932
|
function Jn(n) {
|
|
@@ -937,7 +934,7 @@ function Jn(n) {
|
|
|
937
934
|
for (const o of t)
|
|
938
935
|
if (!n.shape?.[o]?._zod?.traits?.has("$ZodType"))
|
|
939
936
|
throw new Error(`Invalid element at key "${o}": expected a Zod schema`);
|
|
940
|
-
const e =
|
|
937
|
+
const e = rt(n.shape);
|
|
941
938
|
return {
|
|
942
939
|
...n,
|
|
943
940
|
keys: t,
|
|
@@ -955,8 +952,8 @@ function Dn(n, t, e, o, r, i) {
|
|
|
955
952
|
s.push(l);
|
|
956
953
|
continue;
|
|
957
954
|
}
|
|
958
|
-
const
|
|
959
|
-
|
|
955
|
+
const p = u.run({ value: t[l], issues: [] }, o);
|
|
956
|
+
p instanceof Promise ? n.push(p.then((m) => W(m, e, l, t))) : W(p, e, l, t);
|
|
960
957
|
}
|
|
961
958
|
return s.length && e.issues.push({
|
|
962
959
|
code: "unrecognized_keys",
|
|
@@ -965,7 +962,7 @@ function Dn(n, t, e, o, r, i) {
|
|
|
965
962
|
inst: i
|
|
966
963
|
}), n.length ? Promise.all(n).then(() => e) : e;
|
|
967
964
|
}
|
|
968
|
-
const
|
|
965
|
+
const Te = /* @__PURE__ */ a("$ZodObject", (n, t) => {
|
|
969
966
|
if (_.init(n, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
970
967
|
const s = t.shape;
|
|
971
968
|
Object.defineProperty(t, "shape", {
|
|
@@ -1004,16 +1001,16 @@ const Fe = /* @__PURE__ */ a("$ZodObject", (n, t) => {
|
|
|
1004
1001
|
}), s;
|
|
1005
1002
|
s.value = {};
|
|
1006
1003
|
const d = [], l = i.shape;
|
|
1007
|
-
for (const
|
|
1008
|
-
const m = l[
|
|
1009
|
-
m instanceof Promise ? d.push(m.then((z) =>
|
|
1004
|
+
for (const p of i.keys) {
|
|
1005
|
+
const m = l[p]._zod.run({ value: u[p], issues: [] }, c);
|
|
1006
|
+
m instanceof Promise ? d.push(m.then((z) => W(z, s, p, u))) : W(m, s, p, u);
|
|
1010
1007
|
}
|
|
1011
1008
|
return r ? Dn(d, u, s, c, e.value, n) : d.length ? Promise.all(d).then(() => s) : s;
|
|
1012
1009
|
};
|
|
1013
|
-
}),
|
|
1014
|
-
|
|
1015
|
-
const e = n._zod.parse, o = nn(() => Jn(t)), r = (
|
|
1016
|
-
const m = new
|
|
1010
|
+
}), Ne = /* @__PURE__ */ a("$ZodObjectJIT", (n, t) => {
|
|
1011
|
+
Te.init(n, t);
|
|
1012
|
+
const e = n._zod.parse, o = nn(() => Jn(t)), r = (p) => {
|
|
1013
|
+
const m = new re(["shape", "payload", "ctx"]), z = o.value, Kn = (Z) => {
|
|
1017
1014
|
const k = dn(Z);
|
|
1018
1015
|
return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
1019
1016
|
};
|
|
@@ -1046,20 +1043,20 @@ const Fe = /* @__PURE__ */ a("$ZodObject", (n, t) => {
|
|
|
1046
1043
|
}
|
|
1047
1044
|
m.write("payload.value = newResult;"), m.write("return payload;");
|
|
1048
1045
|
const Hn = m.compile();
|
|
1049
|
-
return (Z, k) => Hn(
|
|
1046
|
+
return (Z, k) => Hn(p, Z, k);
|
|
1050
1047
|
};
|
|
1051
1048
|
let i;
|
|
1052
|
-
const s = L, c = !xn.jitless, u = c &&
|
|
1049
|
+
const s = L, c = !xn.jitless, u = c && et.value, d = t.catchall;
|
|
1053
1050
|
let l;
|
|
1054
|
-
n._zod.parse = (
|
|
1051
|
+
n._zod.parse = (p, m) => {
|
|
1055
1052
|
l ?? (l = o.value);
|
|
1056
|
-
const z =
|
|
1057
|
-
return s(z) ? c && u && m?.async === !1 && m.jitless !== !0 ? (i || (i = r(t.shape)),
|
|
1053
|
+
const z = p.value;
|
|
1054
|
+
return s(z) ? c && u && m?.async === !1 && m.jitless !== !0 ? (i || (i = r(t.shape)), p = i(p, m), d ? Dn([], z, p, m, l, n) : p) : e(p, m) : (p.issues.push({
|
|
1058
1055
|
expected: "object",
|
|
1059
1056
|
code: "invalid_type",
|
|
1060
1057
|
input: z,
|
|
1061
1058
|
inst: n
|
|
1062
|
-
}),
|
|
1059
|
+
}), p);
|
|
1063
1060
|
};
|
|
1064
1061
|
});
|
|
1065
1062
|
function pn(n, t, e, o) {
|
|
@@ -1074,7 +1071,7 @@ function pn(n, t, e, o) {
|
|
|
1074
1071
|
errors: n.map((i) => i.issues.map((s) => j(s, o, x())))
|
|
1075
1072
|
}), t);
|
|
1076
1073
|
}
|
|
1077
|
-
const
|
|
1074
|
+
const Fe = /* @__PURE__ */ a("$ZodUnion", (n, t) => {
|
|
1078
1075
|
_.init(n, t), g(n._zod, "optin", () => t.options.some((r) => r._zod.optin === "optional") ? "optional" : void 0), g(n._zod, "optout", () => t.options.some((r) => r._zod.optout === "optional") ? "optional" : void 0), g(n._zod, "values", () => {
|
|
1079
1076
|
if (t.options.every((r) => r._zod.values))
|
|
1080
1077
|
return new Set(t.options.flatMap((r) => Array.from(r._zod.values)));
|
|
@@ -1105,7 +1102,7 @@ const Je = /* @__PURE__ */ a("$ZodUnion", (n, t) => {
|
|
|
1105
1102
|
}
|
|
1106
1103
|
return s ? Promise.all(c).then((u) => pn(u, r, n, i)) : pn(c, r, n, i);
|
|
1107
1104
|
};
|
|
1108
|
-
}),
|
|
1105
|
+
}), Ce = /* @__PURE__ */ a("$ZodIntersection", (n, t) => {
|
|
1109
1106
|
_.init(n, t), n._zod.parse = (e, o) => {
|
|
1110
1107
|
const r = e.value, i = t.left._zod.run({ value: r, issues: [] }, o), s = t.right._zod.run({ value: r, issues: [] }, o);
|
|
1111
1108
|
return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([c, u]) => hn(e, c, u)) : hn(e, i, s);
|
|
@@ -1154,10 +1151,10 @@ function hn(n, t, e) {
|
|
|
1154
1151
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
|
|
1155
1152
|
return n.value = o.data, n;
|
|
1156
1153
|
}
|
|
1157
|
-
const
|
|
1154
|
+
const Je = /* @__PURE__ */ a("$ZodEnum", (n, t) => {
|
|
1158
1155
|
_.init(n, t);
|
|
1159
|
-
const e =
|
|
1160
|
-
n._zod.values = o, n._zod.pattern = new RegExp(`^(${e.filter((r) =>
|
|
1156
|
+
const e = tt(t.entries), o = new Set(e);
|
|
1157
|
+
n._zod.values = o, n._zod.pattern = new RegExp(`^(${e.filter((r) => ot.has(typeof r)).map((r) => typeof r == "string" ? B(r) : r.toString()).join("|")})$`), n._zod.parse = (r, i) => {
|
|
1161
1158
|
const s = r.value;
|
|
1162
1159
|
return o.has(s) || r.issues.push({
|
|
1163
1160
|
code: "invalid_value",
|
|
@@ -1166,7 +1163,7 @@ const Re = /* @__PURE__ */ a("$ZodEnum", (n, t) => {
|
|
|
1166
1163
|
inst: n
|
|
1167
1164
|
}), r;
|
|
1168
1165
|
};
|
|
1169
|
-
}),
|
|
1166
|
+
}), De = /* @__PURE__ */ a("$ZodTransform", (n, t) => {
|
|
1170
1167
|
_.init(n, t), n._zod.parse = (e, o) => {
|
|
1171
1168
|
if (o.direction === "backward")
|
|
1172
1169
|
throw new On(n.constructor.name);
|
|
@@ -1181,7 +1178,7 @@ const Re = /* @__PURE__ */ a("$ZodEnum", (n, t) => {
|
|
|
1181
1178
|
function mn(n, t) {
|
|
1182
1179
|
return n.issues.length && t === void 0 ? { issues: [], value: void 0 } : n;
|
|
1183
1180
|
}
|
|
1184
|
-
const
|
|
1181
|
+
const Re = /* @__PURE__ */ a("$ZodOptional", (n, t) => {
|
|
1185
1182
|
_.init(n, t), n._zod.optin = "optional", n._zod.optout = "optional", g(n._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), g(n._zod, "pattern", () => {
|
|
1186
1183
|
const e = t.innerType._zod.pattern;
|
|
1187
1184
|
return e ? new RegExp(`^(${en(e.source)})?$`) : void 0;
|
|
@@ -1192,12 +1189,12 @@ const Ve = /* @__PURE__ */ a("$ZodOptional", (n, t) => {
|
|
|
1192
1189
|
}
|
|
1193
1190
|
return e.value === void 0 ? e : t.innerType._zod.run(e, o);
|
|
1194
1191
|
};
|
|
1195
|
-
}),
|
|
1192
|
+
}), Ue = /* @__PURE__ */ a("$ZodNullable", (n, t) => {
|
|
1196
1193
|
_.init(n, t), g(n._zod, "optin", () => t.innerType._zod.optin), g(n._zod, "optout", () => t.innerType._zod.optout), g(n._zod, "pattern", () => {
|
|
1197
1194
|
const e = t.innerType._zod.pattern;
|
|
1198
1195
|
return e ? new RegExp(`^(${en(e.source)}|null)$`) : void 0;
|
|
1199
1196
|
}), g(n._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), n._zod.parse = (e, o) => e.value === null ? e : t.innerType._zod.run(e, o);
|
|
1200
|
-
}),
|
|
1197
|
+
}), Ve = /* @__PURE__ */ a("$ZodDefault", (n, t) => {
|
|
1201
1198
|
_.init(n, t), n._zod.optin = "optional", g(n._zod, "values", () => t.innerType._zod.values), n._zod.parse = (e, o) => {
|
|
1202
1199
|
if (o.direction === "backward")
|
|
1203
1200
|
return t.innerType._zod.run(e, o);
|
|
@@ -1210,9 +1207,9 @@ const Ve = /* @__PURE__ */ a("$ZodOptional", (n, t) => {
|
|
|
1210
1207
|
function gn(n, t) {
|
|
1211
1208
|
return n.value === void 0 && (n.value = t.defaultValue), n;
|
|
1212
1209
|
}
|
|
1213
|
-
const
|
|
1210
|
+
const Le = /* @__PURE__ */ a("$ZodPrefault", (n, t) => {
|
|
1214
1211
|
_.init(n, t), n._zod.optin = "optional", g(n._zod, "values", () => t.innerType._zod.values), n._zod.parse = (e, o) => (o.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, o));
|
|
1215
|
-
}),
|
|
1212
|
+
}), We = /* @__PURE__ */ a("$ZodNonOptional", (n, t) => {
|
|
1216
1213
|
_.init(n, t), g(n._zod, "values", () => {
|
|
1217
1214
|
const e = t.innerType._zod.values;
|
|
1218
1215
|
return e ? new Set([...e].filter((o) => o !== void 0)) : void 0;
|
|
@@ -1229,7 +1226,7 @@ function vn(n, t) {
|
|
|
1229
1226
|
inst: t
|
|
1230
1227
|
}), n;
|
|
1231
1228
|
}
|
|
1232
|
-
const
|
|
1229
|
+
const Me = /* @__PURE__ */ a("$ZodCatch", (n, t) => {
|
|
1233
1230
|
_.init(n, t), g(n._zod, "optin", () => t.innerType._zod.optin), g(n._zod, "optout", () => t.innerType._zod.optout), g(n._zod, "values", () => t.innerType._zod.values), n._zod.parse = (e, o) => {
|
|
1234
1231
|
if (o.direction === "backward")
|
|
1235
1232
|
return t.innerType._zod.run(e, o);
|
|
@@ -1248,7 +1245,7 @@ const Ke = /* @__PURE__ */ a("$ZodCatch", (n, t) => {
|
|
|
1248
1245
|
input: e.value
|
|
1249
1246
|
}), e.issues = []), e);
|
|
1250
1247
|
};
|
|
1251
|
-
}),
|
|
1248
|
+
}), Be = /* @__PURE__ */ a("$ZodPipe", (n, t) => {
|
|
1252
1249
|
_.init(n, t), g(n._zod, "values", () => t.in._zod.values), g(n._zod, "optin", () => t.in._zod.optin), g(n._zod, "optout", () => t.out._zod.optout), g(n._zod, "propValues", () => t.in._zod.propValues), n._zod.parse = (e, o) => {
|
|
1253
1250
|
if (o.direction === "backward") {
|
|
1254
1251
|
const i = t.out._zod.run(e, o);
|
|
@@ -1261,7 +1258,7 @@ const Ke = /* @__PURE__ */ a("$ZodCatch", (n, t) => {
|
|
|
1261
1258
|
function D(n, t, e) {
|
|
1262
1259
|
return n.issues.length ? (n.aborted = !0, n) : t._zod.run({ value: n.value, issues: n.issues }, e);
|
|
1263
1260
|
}
|
|
1264
|
-
const
|
|
1261
|
+
const Ke = /* @__PURE__ */ a("$ZodReadonly", (n, t) => {
|
|
1265
1262
|
_.init(n, t), g(n._zod, "propValues", () => t.innerType._zod.propValues), g(n._zod, "values", () => t.innerType._zod.values), g(n._zod, "optin", () => t.innerType._zod.optin), g(n._zod, "optout", () => t.innerType._zod.optout), n._zod.parse = (e, o) => {
|
|
1266
1263
|
if (o.direction === "backward")
|
|
1267
1264
|
return t.innerType._zod.run(e, o);
|
|
@@ -1272,7 +1269,7 @@ const He = /* @__PURE__ */ a("$ZodReadonly", (n, t) => {
|
|
|
1272
1269
|
function yn(n) {
|
|
1273
1270
|
return n.value = Object.freeze(n.value), n;
|
|
1274
1271
|
}
|
|
1275
|
-
const
|
|
1272
|
+
const Ge = /* @__PURE__ */ a("$ZodCustom", (n, t) => {
|
|
1276
1273
|
$.init(n, t), _.init(n, t), n._zod.parse = (e, o) => e, n._zod.check = (e) => {
|
|
1277
1274
|
const o = e.value, r = t.fn(o);
|
|
1278
1275
|
if (r instanceof Promise)
|
|
@@ -1295,7 +1292,7 @@ function _n(n, t, e, o) {
|
|
|
1295
1292
|
o._zod.def.params && (r.params = o._zod.def.params), t.issues.push(F(r));
|
|
1296
1293
|
}
|
|
1297
1294
|
}
|
|
1298
|
-
class
|
|
1295
|
+
class He {
|
|
1299
1296
|
constructor() {
|
|
1300
1297
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
1301
1298
|
}
|
|
@@ -1329,17 +1326,17 @@ class Ye {
|
|
|
1329
1326
|
return this._map.has(t);
|
|
1330
1327
|
}
|
|
1331
1328
|
}
|
|
1332
|
-
function
|
|
1333
|
-
return new
|
|
1329
|
+
function qe() {
|
|
1330
|
+
return new He();
|
|
1334
1331
|
}
|
|
1335
|
-
const R = /* @__PURE__ */
|
|
1336
|
-
function
|
|
1332
|
+
const R = /* @__PURE__ */ qe();
|
|
1333
|
+
function Ye(n, t) {
|
|
1337
1334
|
return new n({
|
|
1338
1335
|
type: "string",
|
|
1339
1336
|
...f(t)
|
|
1340
1337
|
});
|
|
1341
1338
|
}
|
|
1342
|
-
function
|
|
1339
|
+
function Xe(n, t) {
|
|
1343
1340
|
return new n({
|
|
1344
1341
|
type: "string",
|
|
1345
1342
|
format: "email",
|
|
@@ -1357,7 +1354,7 @@ function wn(n, t) {
|
|
|
1357
1354
|
...f(t)
|
|
1358
1355
|
});
|
|
1359
1356
|
}
|
|
1360
|
-
function
|
|
1357
|
+
function Qe(n, t) {
|
|
1361
1358
|
return new n({
|
|
1362
1359
|
type: "string",
|
|
1363
1360
|
format: "uuid",
|
|
@@ -1366,7 +1363,7 @@ function to(n, t) {
|
|
|
1366
1363
|
...f(t)
|
|
1367
1364
|
});
|
|
1368
1365
|
}
|
|
1369
|
-
function
|
|
1366
|
+
function no(n, t) {
|
|
1370
1367
|
return new n({
|
|
1371
1368
|
type: "string",
|
|
1372
1369
|
format: "uuid",
|
|
@@ -1376,7 +1373,7 @@ function eo(n, t) {
|
|
|
1376
1373
|
...f(t)
|
|
1377
1374
|
});
|
|
1378
1375
|
}
|
|
1379
|
-
function
|
|
1376
|
+
function to(n, t) {
|
|
1380
1377
|
return new n({
|
|
1381
1378
|
type: "string",
|
|
1382
1379
|
format: "uuid",
|
|
@@ -1386,7 +1383,7 @@ function oo(n, t) {
|
|
|
1386
1383
|
...f(t)
|
|
1387
1384
|
});
|
|
1388
1385
|
}
|
|
1389
|
-
function
|
|
1386
|
+
function eo(n, t) {
|
|
1390
1387
|
return new n({
|
|
1391
1388
|
type: "string",
|
|
1392
1389
|
format: "uuid",
|
|
@@ -1396,7 +1393,7 @@ function ro(n, t) {
|
|
|
1396
1393
|
...f(t)
|
|
1397
1394
|
});
|
|
1398
1395
|
}
|
|
1399
|
-
function
|
|
1396
|
+
function oo(n, t) {
|
|
1400
1397
|
return new n({
|
|
1401
1398
|
type: "string",
|
|
1402
1399
|
format: "url",
|
|
@@ -1405,7 +1402,7 @@ function io(n, t) {
|
|
|
1405
1402
|
...f(t)
|
|
1406
1403
|
});
|
|
1407
1404
|
}
|
|
1408
|
-
function
|
|
1405
|
+
function ro(n, t) {
|
|
1409
1406
|
return new n({
|
|
1410
1407
|
type: "string",
|
|
1411
1408
|
format: "emoji",
|
|
@@ -1414,7 +1411,7 @@ function so(n, t) {
|
|
|
1414
1411
|
...f(t)
|
|
1415
1412
|
});
|
|
1416
1413
|
}
|
|
1417
|
-
function
|
|
1414
|
+
function io(n, t) {
|
|
1418
1415
|
return new n({
|
|
1419
1416
|
type: "string",
|
|
1420
1417
|
format: "nanoid",
|
|
@@ -1423,7 +1420,7 @@ function ao(n, t) {
|
|
|
1423
1420
|
...f(t)
|
|
1424
1421
|
});
|
|
1425
1422
|
}
|
|
1426
|
-
function
|
|
1423
|
+
function so(n, t) {
|
|
1427
1424
|
return new n({
|
|
1428
1425
|
type: "string",
|
|
1429
1426
|
format: "cuid",
|
|
@@ -1432,7 +1429,7 @@ function co(n, t) {
|
|
|
1432
1429
|
...f(t)
|
|
1433
1430
|
});
|
|
1434
1431
|
}
|
|
1435
|
-
function
|
|
1432
|
+
function ao(n, t) {
|
|
1436
1433
|
return new n({
|
|
1437
1434
|
type: "string",
|
|
1438
1435
|
format: "cuid2",
|
|
@@ -1441,7 +1438,7 @@ function uo(n, t) {
|
|
|
1441
1438
|
...f(t)
|
|
1442
1439
|
});
|
|
1443
1440
|
}
|
|
1444
|
-
function
|
|
1441
|
+
function co(n, t) {
|
|
1445
1442
|
return new n({
|
|
1446
1443
|
type: "string",
|
|
1447
1444
|
format: "ulid",
|
|
@@ -1450,7 +1447,7 @@ function fo(n, t) {
|
|
|
1450
1447
|
...f(t)
|
|
1451
1448
|
});
|
|
1452
1449
|
}
|
|
1453
|
-
function
|
|
1450
|
+
function uo(n, t) {
|
|
1454
1451
|
return new n({
|
|
1455
1452
|
type: "string",
|
|
1456
1453
|
format: "xid",
|
|
@@ -1459,7 +1456,7 @@ function lo(n, t) {
|
|
|
1459
1456
|
...f(t)
|
|
1460
1457
|
});
|
|
1461
1458
|
}
|
|
1462
|
-
function
|
|
1459
|
+
function fo(n, t) {
|
|
1463
1460
|
return new n({
|
|
1464
1461
|
type: "string",
|
|
1465
1462
|
format: "ksuid",
|
|
@@ -1468,7 +1465,7 @@ function po(n, t) {
|
|
|
1468
1465
|
...f(t)
|
|
1469
1466
|
});
|
|
1470
1467
|
}
|
|
1471
|
-
function
|
|
1468
|
+
function lo(n, t) {
|
|
1472
1469
|
return new n({
|
|
1473
1470
|
type: "string",
|
|
1474
1471
|
format: "ipv4",
|
|
@@ -1477,7 +1474,7 @@ function ho(n, t) {
|
|
|
1477
1474
|
...f(t)
|
|
1478
1475
|
});
|
|
1479
1476
|
}
|
|
1480
|
-
function
|
|
1477
|
+
function po(n, t) {
|
|
1481
1478
|
return new n({
|
|
1482
1479
|
type: "string",
|
|
1483
1480
|
format: "ipv6",
|
|
@@ -1486,7 +1483,7 @@ function mo(n, t) {
|
|
|
1486
1483
|
...f(t)
|
|
1487
1484
|
});
|
|
1488
1485
|
}
|
|
1489
|
-
function
|
|
1486
|
+
function ho(n, t) {
|
|
1490
1487
|
return new n({
|
|
1491
1488
|
type: "string",
|
|
1492
1489
|
format: "cidrv4",
|
|
@@ -1495,7 +1492,7 @@ function go(n, t) {
|
|
|
1495
1492
|
...f(t)
|
|
1496
1493
|
});
|
|
1497
1494
|
}
|
|
1498
|
-
function
|
|
1495
|
+
function mo(n, t) {
|
|
1499
1496
|
return new n({
|
|
1500
1497
|
type: "string",
|
|
1501
1498
|
format: "cidrv6",
|
|
@@ -1504,7 +1501,7 @@ function vo(n, t) {
|
|
|
1504
1501
|
...f(t)
|
|
1505
1502
|
});
|
|
1506
1503
|
}
|
|
1507
|
-
function
|
|
1504
|
+
function go(n, t) {
|
|
1508
1505
|
return new n({
|
|
1509
1506
|
type: "string",
|
|
1510
1507
|
format: "base64",
|
|
@@ -1513,7 +1510,7 @@ function yo(n, t) {
|
|
|
1513
1510
|
...f(t)
|
|
1514
1511
|
});
|
|
1515
1512
|
}
|
|
1516
|
-
function
|
|
1513
|
+
function vo(n, t) {
|
|
1517
1514
|
return new n({
|
|
1518
1515
|
type: "string",
|
|
1519
1516
|
format: "base64url",
|
|
@@ -1522,7 +1519,7 @@ function _o(n, t) {
|
|
|
1522
1519
|
...f(t)
|
|
1523
1520
|
});
|
|
1524
1521
|
}
|
|
1525
|
-
function
|
|
1522
|
+
function yo(n, t) {
|
|
1526
1523
|
return new n({
|
|
1527
1524
|
type: "string",
|
|
1528
1525
|
format: "e164",
|
|
@@ -1531,7 +1528,7 @@ function wo(n, t) {
|
|
|
1531
1528
|
...f(t)
|
|
1532
1529
|
});
|
|
1533
1530
|
}
|
|
1534
|
-
function
|
|
1531
|
+
function _o(n, t) {
|
|
1535
1532
|
return new n({
|
|
1536
1533
|
type: "string",
|
|
1537
1534
|
format: "jwt",
|
|
@@ -1540,7 +1537,7 @@ function zo(n, t) {
|
|
|
1540
1537
|
...f(t)
|
|
1541
1538
|
});
|
|
1542
1539
|
}
|
|
1543
|
-
function
|
|
1540
|
+
function wo(n, t) {
|
|
1544
1541
|
return new n({
|
|
1545
1542
|
type: "string",
|
|
1546
1543
|
format: "datetime",
|
|
@@ -1551,7 +1548,7 @@ function bo(n, t) {
|
|
|
1551
1548
|
...f(t)
|
|
1552
1549
|
});
|
|
1553
1550
|
}
|
|
1554
|
-
function
|
|
1551
|
+
function zo(n, t) {
|
|
1555
1552
|
return new n({
|
|
1556
1553
|
type: "string",
|
|
1557
1554
|
format: "date",
|
|
@@ -1559,7 +1556,7 @@ function ko(n, t) {
|
|
|
1559
1556
|
...f(t)
|
|
1560
1557
|
});
|
|
1561
1558
|
}
|
|
1562
|
-
function
|
|
1559
|
+
function bo(n, t) {
|
|
1563
1560
|
return new n({
|
|
1564
1561
|
type: "string",
|
|
1565
1562
|
format: "time",
|
|
@@ -1568,7 +1565,7 @@ function $o(n, t) {
|
|
|
1568
1565
|
...f(t)
|
|
1569
1566
|
});
|
|
1570
1567
|
}
|
|
1571
|
-
function
|
|
1568
|
+
function ko(n, t) {
|
|
1572
1569
|
return new n({
|
|
1573
1570
|
type: "string",
|
|
1574
1571
|
format: "duration",
|
|
@@ -1576,78 +1573,78 @@ function Zo(n, t) {
|
|
|
1576
1573
|
...f(t)
|
|
1577
1574
|
});
|
|
1578
1575
|
}
|
|
1579
|
-
function
|
|
1576
|
+
function $o(n) {
|
|
1580
1577
|
return new n({
|
|
1581
1578
|
type: "unknown"
|
|
1582
1579
|
});
|
|
1583
1580
|
}
|
|
1584
|
-
function
|
|
1581
|
+
function Zo(n, t) {
|
|
1585
1582
|
return new n({
|
|
1586
1583
|
type: "never",
|
|
1587
1584
|
...f(t)
|
|
1588
1585
|
});
|
|
1589
1586
|
}
|
|
1590
1587
|
function Rn(n, t) {
|
|
1591
|
-
return new
|
|
1588
|
+
return new Gt({
|
|
1592
1589
|
check: "max_length",
|
|
1593
1590
|
...f(t),
|
|
1594
1591
|
maximum: n
|
|
1595
1592
|
});
|
|
1596
1593
|
}
|
|
1597
|
-
function
|
|
1598
|
-
return new
|
|
1594
|
+
function M(n, t) {
|
|
1595
|
+
return new Ht({
|
|
1599
1596
|
check: "min_length",
|
|
1600
1597
|
...f(t),
|
|
1601
1598
|
minimum: n
|
|
1602
1599
|
});
|
|
1603
1600
|
}
|
|
1604
1601
|
function Un(n, t) {
|
|
1605
|
-
return new
|
|
1602
|
+
return new qt({
|
|
1606
1603
|
check: "length_equals",
|
|
1607
1604
|
...f(t),
|
|
1608
1605
|
length: n
|
|
1609
1606
|
});
|
|
1610
1607
|
}
|
|
1611
|
-
function
|
|
1612
|
-
return new
|
|
1608
|
+
function Oo(n, t) {
|
|
1609
|
+
return new Yt({
|
|
1613
1610
|
check: "string_format",
|
|
1614
1611
|
format: "regex",
|
|
1615
1612
|
...f(t),
|
|
1616
1613
|
pattern: n
|
|
1617
1614
|
});
|
|
1618
1615
|
}
|
|
1619
|
-
function
|
|
1620
|
-
return new
|
|
1616
|
+
function xo(n) {
|
|
1617
|
+
return new Xt({
|
|
1621
1618
|
check: "string_format",
|
|
1622
1619
|
format: "lowercase",
|
|
1623
1620
|
...f(n)
|
|
1624
1621
|
});
|
|
1625
1622
|
}
|
|
1626
|
-
function
|
|
1627
|
-
return new
|
|
1623
|
+
function jo(n) {
|
|
1624
|
+
return new Qt({
|
|
1628
1625
|
check: "string_format",
|
|
1629
1626
|
format: "uppercase",
|
|
1630
1627
|
...f(n)
|
|
1631
1628
|
});
|
|
1632
1629
|
}
|
|
1633
|
-
function
|
|
1634
|
-
return new
|
|
1630
|
+
function Eo(n, t) {
|
|
1631
|
+
return new ne({
|
|
1635
1632
|
check: "string_format",
|
|
1636
1633
|
format: "includes",
|
|
1637
1634
|
...f(t),
|
|
1638
1635
|
includes: n
|
|
1639
1636
|
});
|
|
1640
1637
|
}
|
|
1641
|
-
function
|
|
1642
|
-
return new
|
|
1638
|
+
function So(n, t) {
|
|
1639
|
+
return new te({
|
|
1643
1640
|
check: "string_format",
|
|
1644
1641
|
format: "starts_with",
|
|
1645
1642
|
...f(t),
|
|
1646
1643
|
prefix: n
|
|
1647
1644
|
});
|
|
1648
1645
|
}
|
|
1649
|
-
function
|
|
1650
|
-
return new
|
|
1646
|
+
function Po(n, t) {
|
|
1647
|
+
return new ee({
|
|
1651
1648
|
check: "string_format",
|
|
1652
1649
|
format: "ends_with",
|
|
1653
1650
|
...f(t),
|
|
@@ -1655,24 +1652,24 @@ function Io(n, t) {
|
|
|
1655
1652
|
});
|
|
1656
1653
|
}
|
|
1657
1654
|
function C(n) {
|
|
1658
|
-
return new
|
|
1655
|
+
return new oe({
|
|
1659
1656
|
check: "overwrite",
|
|
1660
1657
|
tx: n
|
|
1661
1658
|
});
|
|
1662
1659
|
}
|
|
1663
|
-
function
|
|
1660
|
+
function Ao(n) {
|
|
1664
1661
|
return C((t) => t.normalize(n));
|
|
1665
1662
|
}
|
|
1666
|
-
function
|
|
1663
|
+
function Io() {
|
|
1667
1664
|
return C((n) => n.trim());
|
|
1668
1665
|
}
|
|
1669
|
-
function
|
|
1666
|
+
function To() {
|
|
1670
1667
|
return C((n) => n.toLowerCase());
|
|
1671
1668
|
}
|
|
1672
|
-
function
|
|
1669
|
+
function No() {
|
|
1673
1670
|
return C((n) => n.toUpperCase());
|
|
1674
1671
|
}
|
|
1675
|
-
function
|
|
1672
|
+
function Fo(n, t, e) {
|
|
1676
1673
|
return new n({
|
|
1677
1674
|
type: "array",
|
|
1678
1675
|
element: t,
|
|
@@ -1682,7 +1679,7 @@ function Jo(n, t, e) {
|
|
|
1682
1679
|
...f(e)
|
|
1683
1680
|
});
|
|
1684
1681
|
}
|
|
1685
|
-
function
|
|
1682
|
+
function Co(n, t, e) {
|
|
1686
1683
|
return new n({
|
|
1687
1684
|
type: "custom",
|
|
1688
1685
|
check: "custom",
|
|
@@ -1690,8 +1687,8 @@ function Do(n, t, e) {
|
|
|
1690
1687
|
...f(e)
|
|
1691
1688
|
});
|
|
1692
1689
|
}
|
|
1693
|
-
function
|
|
1694
|
-
const t =
|
|
1690
|
+
function Jo(n) {
|
|
1691
|
+
const t = Do((e) => (e.addIssue = (o) => {
|
|
1695
1692
|
if (typeof o == "string")
|
|
1696
1693
|
e.issues.push(F(o, e.value, t._zod.def));
|
|
1697
1694
|
else {
|
|
@@ -1701,45 +1698,45 @@ function Ro(n) {
|
|
|
1701
1698
|
}, n(e.value, e)));
|
|
1702
1699
|
return t;
|
|
1703
1700
|
}
|
|
1704
|
-
function
|
|
1701
|
+
function Do(n, t) {
|
|
1705
1702
|
const e = new $({
|
|
1706
1703
|
check: "custom",
|
|
1707
1704
|
...f(t)
|
|
1708
1705
|
});
|
|
1709
1706
|
return e._zod.check = n, e;
|
|
1710
1707
|
}
|
|
1711
|
-
const
|
|
1712
|
-
|
|
1708
|
+
const Ro = /* @__PURE__ */ a("ZodISODateTime", (n, t) => {
|
|
1709
|
+
ve.init(n, t), y.init(n, t);
|
|
1713
1710
|
});
|
|
1714
|
-
function
|
|
1715
|
-
return
|
|
1711
|
+
function Uo(n) {
|
|
1712
|
+
return wo(Ro, n);
|
|
1716
1713
|
}
|
|
1717
|
-
const
|
|
1718
|
-
|
|
1714
|
+
const Vo = /* @__PURE__ */ a("ZodISODate", (n, t) => {
|
|
1715
|
+
ye.init(n, t), y.init(n, t);
|
|
1719
1716
|
});
|
|
1720
|
-
function
|
|
1721
|
-
return
|
|
1717
|
+
function Lo(n) {
|
|
1718
|
+
return zo(Vo, n);
|
|
1722
1719
|
}
|
|
1723
|
-
const
|
|
1724
|
-
|
|
1720
|
+
const Wo = /* @__PURE__ */ a("ZodISOTime", (n, t) => {
|
|
1721
|
+
_e.init(n, t), y.init(n, t);
|
|
1725
1722
|
});
|
|
1726
|
-
function
|
|
1727
|
-
return
|
|
1723
|
+
function Mo(n) {
|
|
1724
|
+
return bo(Wo, n);
|
|
1728
1725
|
}
|
|
1729
|
-
const
|
|
1730
|
-
|
|
1726
|
+
const Bo = /* @__PURE__ */ a("ZodISODuration", (n, t) => {
|
|
1727
|
+
we.init(n, t), y.init(n, t);
|
|
1731
1728
|
});
|
|
1732
|
-
function
|
|
1733
|
-
return
|
|
1729
|
+
function Ko(n) {
|
|
1730
|
+
return ko(Bo, n);
|
|
1734
1731
|
}
|
|
1735
|
-
const
|
|
1732
|
+
const Go = (n, t) => {
|
|
1736
1733
|
An.init(n, t), n.name = "ZodError", Object.defineProperties(n, {
|
|
1737
1734
|
format: {
|
|
1738
|
-
value: (e) =>
|
|
1735
|
+
value: (e) => pt(n, e)
|
|
1739
1736
|
// enumerable: false,
|
|
1740
1737
|
},
|
|
1741
1738
|
flatten: {
|
|
1742
|
-
value: (e) =>
|
|
1739
|
+
value: (e) => lt(n, e)
|
|
1743
1740
|
// enumerable: false,
|
|
1744
1741
|
},
|
|
1745
1742
|
addIssue: {
|
|
@@ -1761,14 +1758,14 @@ const qo = (n, t) => {
|
|
|
1761
1758
|
// enumerable: false,
|
|
1762
1759
|
}
|
|
1763
1760
|
});
|
|
1764
|
-
}, b = a("ZodError",
|
|
1761
|
+
}, b = a("ZodError", Go, {
|
|
1765
1762
|
Parent: Error
|
|
1766
|
-
}),
|
|
1763
|
+
}), Ho = /* @__PURE__ */ rn(b), qo = /* @__PURE__ */ sn(b), Yo = /* @__PURE__ */ K(b), Xo = /* @__PURE__ */ G(b), Qo = /* @__PURE__ */ gt(b), nr = /* @__PURE__ */ vt(b), tr = /* @__PURE__ */ yt(b), er = /* @__PURE__ */ _t(b), or = /* @__PURE__ */ wt(b), rr = /* @__PURE__ */ zt(b), ir = /* @__PURE__ */ bt(b), sr = /* @__PURE__ */ kt(b), w = /* @__PURE__ */ a("ZodType", (n, t) => (_.init(n, t), n.def = t, n.type = t.type, Object.defineProperty(n, "_def", { value: t }), n.check = (...e) => n.clone(S(t, {
|
|
1767
1764
|
checks: [
|
|
1768
1765
|
...t.checks ?? [],
|
|
1769
1766
|
...e.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
|
|
1770
1767
|
]
|
|
1771
|
-
})), n.clone = (e, o) => O(n, e, o), n.brand = () => n, n.register = (e, o) => (e.add(n, o), n), n.parse = (e, o) =>
|
|
1768
|
+
})), n.clone = (e, o) => O(n, e, o), n.brand = () => n, n.register = (e, o) => (e.add(n, o), n), n.parse = (e, o) => Ho(n, e, o, { callee: n.parse }), n.safeParse = (e, o) => Yo(n, e, o), n.parseAsync = async (e, o) => qo(n, e, o, { callee: n.parseAsync }), n.safeParseAsync = async (e, o) => Xo(n, e, o), n.spa = n.safeParseAsync, n.encode = (e, o) => Qo(n, e, o), n.decode = (e, o) => nr(n, e, o), n.encodeAsync = async (e, o) => tr(n, e, o), n.decodeAsync = async (e, o) => er(n, e, o), n.safeEncode = (e, o) => or(n, e, o), n.safeDecode = (e, o) => rr(n, e, o), n.safeEncodeAsync = async (e, o) => ir(n, e, o), n.safeDecodeAsync = async (e, o) => sr(n, e, o), n.refine = (e, o) => n.check(Hr(e, o)), n.superRefine = (e) => n.check(qr(e)), n.overwrite = (e) => n.check(C(e)), n.optional = () => bn(n), n.nullable = () => kn(n), n.nullish = () => bn(kn(n)), n.nonoptional = (e) => Vr(n, e), n.array = () => Er(n), n.or = (e) => Ar([n, e]), n.and = (e) => Tr(n, e), n.transform = (e) => $n(n, Fr(e)), n.default = (e) => Dr(n, e), n.prefault = (e) => Ur(n, e), n.catch = (e) => Wr(n, e), n.pipe = (e) => $n(n, e), n.readonly = () => Kr(n), n.describe = (e) => {
|
|
1772
1769
|
const o = n.clone();
|
|
1773
1770
|
return R.add(o, { description: e }), o;
|
|
1774
1771
|
}, Object.defineProperty(n, "description", {
|
|
@@ -1784,73 +1781,73 @@ const qo = (n, t) => {
|
|
|
1784
1781
|
}, n.isOptional = () => n.safeParse(void 0).success, n.isNullable = () => n.safeParse(null).success, n)), Vn = /* @__PURE__ */ a("_ZodString", (n, t) => {
|
|
1785
1782
|
an.init(n, t), w.init(n, t);
|
|
1786
1783
|
const e = n._zod.bag;
|
|
1787
|
-
n.format = e.format ?? null, n.minLength = e.minimum ?? null, n.maxLength = e.maximum ?? null, n.regex = (...o) => n.check(
|
|
1788
|
-
}),
|
|
1789
|
-
an.init(n, t), Vn.init(n, t), n.email = (e) => n.check(
|
|
1784
|
+
n.format = e.format ?? null, n.minLength = e.minimum ?? null, n.maxLength = e.maximum ?? null, n.regex = (...o) => n.check(Oo(...o)), n.includes = (...o) => n.check(Eo(...o)), n.startsWith = (...o) => n.check(So(...o)), n.endsWith = (...o) => n.check(Po(...o)), n.min = (...o) => n.check(M(...o)), n.max = (...o) => n.check(Rn(...o)), n.length = (...o) => n.check(Un(...o)), n.nonempty = (...o) => n.check(M(1, ...o)), n.lowercase = (o) => n.check(xo(o)), n.uppercase = (o) => n.check(jo(o)), n.trim = () => n.check(Io()), n.normalize = (...o) => n.check(Ao(...o)), n.toLowerCase = () => n.check(To()), n.toUpperCase = () => n.check(No());
|
|
1785
|
+
}), ar = /* @__PURE__ */ a("ZodString", (n, t) => {
|
|
1786
|
+
an.init(n, t), Vn.init(n, t), n.email = (e) => n.check(Xe(cr, e)), n.url = (e) => n.check(oo(ur, e)), n.jwt = (e) => n.check(_o($r, e)), n.emoji = (e) => n.check(ro(dr, e)), n.guid = (e) => n.check(wn(zn, e)), n.uuid = (e) => n.check(Qe(U, e)), n.uuidv4 = (e) => n.check(no(U, e)), n.uuidv6 = (e) => n.check(to(U, e)), n.uuidv7 = (e) => n.check(eo(U, e)), n.nanoid = (e) => n.check(io(fr, e)), n.guid = (e) => n.check(wn(zn, e)), n.cuid = (e) => n.check(so(lr, e)), n.cuid2 = (e) => n.check(ao(pr, e)), n.ulid = (e) => n.check(co(hr, e)), n.base64 = (e) => n.check(go(zr, e)), n.base64url = (e) => n.check(vo(br, e)), n.xid = (e) => n.check(uo(mr, e)), n.ksuid = (e) => n.check(fo(gr, e)), n.ipv4 = (e) => n.check(lo(vr, e)), n.ipv6 = (e) => n.check(po(yr, e)), n.cidrv4 = (e) => n.check(ho(_r, e)), n.cidrv6 = (e) => n.check(mo(wr, e)), n.e164 = (e) => n.check(yo(kr, e)), n.datetime = (e) => n.check(Uo(e)), n.date = (e) => n.check(Lo(e)), n.time = (e) => n.check(Mo(e)), n.duration = (e) => n.check(Ko(e));
|
|
1790
1787
|
});
|
|
1791
1788
|
function A(n) {
|
|
1792
|
-
return
|
|
1789
|
+
return Ye(ar, n);
|
|
1793
1790
|
}
|
|
1794
1791
|
const y = /* @__PURE__ */ a("ZodStringFormat", (n, t) => {
|
|
1795
1792
|
v.init(n, t), Vn.init(n, t);
|
|
1796
|
-
}),
|
|
1797
|
-
de.init(n, t), y.init(n, t);
|
|
1798
|
-
}), zn = /* @__PURE__ */ a("ZodGUID", (n, t) => {
|
|
1793
|
+
}), cr = /* @__PURE__ */ a("ZodEmail", (n, t) => {
|
|
1799
1794
|
ce.init(n, t), y.init(n, t);
|
|
1795
|
+
}), zn = /* @__PURE__ */ a("ZodGUID", (n, t) => {
|
|
1796
|
+
se.init(n, t), y.init(n, t);
|
|
1800
1797
|
}), U = /* @__PURE__ */ a("ZodUUID", (n, t) => {
|
|
1798
|
+
ae.init(n, t), y.init(n, t);
|
|
1799
|
+
}), ur = /* @__PURE__ */ a("ZodURL", (n, t) => {
|
|
1801
1800
|
ue.init(n, t), y.init(n, t);
|
|
1802
|
-
}),
|
|
1801
|
+
}), dr = /* @__PURE__ */ a("ZodEmoji", (n, t) => {
|
|
1802
|
+
de.init(n, t), y.init(n, t);
|
|
1803
|
+
}), fr = /* @__PURE__ */ a("ZodNanoID", (n, t) => {
|
|
1803
1804
|
fe.init(n, t), y.init(n, t);
|
|
1804
|
-
}), lr = /* @__PURE__ */ a("
|
|
1805
|
+
}), lr = /* @__PURE__ */ a("ZodCUID", (n, t) => {
|
|
1805
1806
|
le.init(n, t), y.init(n, t);
|
|
1806
|
-
}), pr = /* @__PURE__ */ a("
|
|
1807
|
+
}), pr = /* @__PURE__ */ a("ZodCUID2", (n, t) => {
|
|
1807
1808
|
pe.init(n, t), y.init(n, t);
|
|
1808
|
-
}), hr = /* @__PURE__ */ a("
|
|
1809
|
+
}), hr = /* @__PURE__ */ a("ZodULID", (n, t) => {
|
|
1809
1810
|
he.init(n, t), y.init(n, t);
|
|
1810
|
-
}), mr = /* @__PURE__ */ a("
|
|
1811
|
+
}), mr = /* @__PURE__ */ a("ZodXID", (n, t) => {
|
|
1811
1812
|
me.init(n, t), y.init(n, t);
|
|
1812
|
-
}), gr = /* @__PURE__ */ a("
|
|
1813
|
+
}), gr = /* @__PURE__ */ a("ZodKSUID", (n, t) => {
|
|
1813
1814
|
ge.init(n, t), y.init(n, t);
|
|
1814
|
-
}), vr = /* @__PURE__ */ a("
|
|
1815
|
-
|
|
1816
|
-
}), yr = /* @__PURE__ */ a("
|
|
1817
|
-
|
|
1818
|
-
}), _r = /* @__PURE__ */ a("
|
|
1815
|
+
}), vr = /* @__PURE__ */ a("ZodIPv4", (n, t) => {
|
|
1816
|
+
ze.init(n, t), y.init(n, t);
|
|
1817
|
+
}), yr = /* @__PURE__ */ a("ZodIPv6", (n, t) => {
|
|
1818
|
+
be.init(n, t), y.init(n, t);
|
|
1819
|
+
}), _r = /* @__PURE__ */ a("ZodCIDRv4", (n, t) => {
|
|
1819
1820
|
ke.init(n, t), y.init(n, t);
|
|
1820
|
-
}), wr = /* @__PURE__ */ a("
|
|
1821
|
+
}), wr = /* @__PURE__ */ a("ZodCIDRv6", (n, t) => {
|
|
1821
1822
|
$e.init(n, t), y.init(n, t);
|
|
1822
|
-
}), zr = /* @__PURE__ */ a("
|
|
1823
|
+
}), zr = /* @__PURE__ */ a("ZodBase64", (n, t) => {
|
|
1823
1824
|
Ze.init(n, t), y.init(n, t);
|
|
1824
|
-
}), br = /* @__PURE__ */ a("
|
|
1825
|
-
Oe.init(n, t), y.init(n, t);
|
|
1826
|
-
}), kr = /* @__PURE__ */ a("ZodBase64", (n, t) => {
|
|
1825
|
+
}), br = /* @__PURE__ */ a("ZodBase64URL", (n, t) => {
|
|
1827
1826
|
xe.init(n, t), y.init(n, t);
|
|
1828
|
-
}),
|
|
1829
|
-
|
|
1830
|
-
}),
|
|
1827
|
+
}), kr = /* @__PURE__ */ a("ZodE164", (n, t) => {
|
|
1828
|
+
je.init(n, t), y.init(n, t);
|
|
1829
|
+
}), $r = /* @__PURE__ */ a("ZodJWT", (n, t) => {
|
|
1831
1830
|
Se.init(n, t), y.init(n, t);
|
|
1832
|
-
}),
|
|
1833
|
-
|
|
1834
|
-
}), xr = /* @__PURE__ */ a("ZodUnknown", (n, t) => {
|
|
1835
|
-
Ie.init(n, t), w.init(n, t);
|
|
1831
|
+
}), Zr = /* @__PURE__ */ a("ZodUnknown", (n, t) => {
|
|
1832
|
+
Pe.init(n, t), w.init(n, t);
|
|
1836
1833
|
});
|
|
1837
1834
|
function X() {
|
|
1838
|
-
return
|
|
1835
|
+
return $o(Zr);
|
|
1839
1836
|
}
|
|
1840
|
-
const
|
|
1841
|
-
|
|
1837
|
+
const Or = /* @__PURE__ */ a("ZodNever", (n, t) => {
|
|
1838
|
+
Ae.init(n, t), w.init(n, t);
|
|
1842
1839
|
});
|
|
1843
|
-
function
|
|
1844
|
-
return
|
|
1840
|
+
function xr(n) {
|
|
1841
|
+
return Zo(Or, n);
|
|
1845
1842
|
}
|
|
1846
|
-
const
|
|
1847
|
-
|
|
1843
|
+
const jr = /* @__PURE__ */ a("ZodArray", (n, t) => {
|
|
1844
|
+
Ie.init(n, t), w.init(n, t), n.element = t.element, n.min = (e, o) => n.check(M(e, o)), n.nonempty = (e) => n.check(M(1, e)), n.max = (e, o) => n.check(Rn(e, o)), n.length = (e, o) => n.check(Un(e, o)), n.unwrap = () => n.element;
|
|
1848
1845
|
});
|
|
1849
|
-
function
|
|
1850
|
-
return
|
|
1846
|
+
function Er(n, t) {
|
|
1847
|
+
return Fo(jr, n, t);
|
|
1851
1848
|
}
|
|
1852
|
-
const
|
|
1853
|
-
|
|
1849
|
+
const Sr = /* @__PURE__ */ a("ZodObject", (n, t) => {
|
|
1850
|
+
Ne.init(n, t), w.init(n, t), g(n, "shape", () => t.shape), n.keyof = () => Wn(Object.keys(n._zod.def.shape)), n.catchall = (e) => n.clone({ ...n._zod.def, catchall: e }), n.passthrough = () => n.clone({ ...n._zod.def, catchall: X() }), n.loose = () => n.clone({ ...n._zod.def, catchall: X() }), n.strict = () => n.clone({ ...n._zod.def, catchall: xr() }), n.strip = () => n.clone({ ...n._zod.def, catchall: void 0 }), n.extend = (e) => at(n, e), n.safeExtend = (e) => ct(n, e), n.merge = (e) => ut(n, e), n.pick = (e) => it(n, e), n.omit = (e) => st(n, e), n.partial = (...e) => dt(Mn, n, e[0]), n.required = (...e) => ft(Bn, n, e[0]);
|
|
1854
1851
|
});
|
|
1855
1852
|
function Ln(n, t) {
|
|
1856
1853
|
const e = {
|
|
@@ -1858,30 +1855,30 @@ function Ln(n, t) {
|
|
|
1858
1855
|
shape: n ?? {},
|
|
1859
1856
|
...f(t)
|
|
1860
1857
|
};
|
|
1861
|
-
return new
|
|
1858
|
+
return new Sr(e);
|
|
1862
1859
|
}
|
|
1863
|
-
const
|
|
1864
|
-
|
|
1860
|
+
const Pr = /* @__PURE__ */ a("ZodUnion", (n, t) => {
|
|
1861
|
+
Fe.init(n, t), w.init(n, t), n.options = t.options;
|
|
1865
1862
|
});
|
|
1866
|
-
function
|
|
1867
|
-
return new
|
|
1863
|
+
function Ar(n, t) {
|
|
1864
|
+
return new Pr({
|
|
1868
1865
|
type: "union",
|
|
1869
1866
|
options: n,
|
|
1870
1867
|
...f(t)
|
|
1871
1868
|
});
|
|
1872
1869
|
}
|
|
1873
|
-
const
|
|
1874
|
-
|
|
1870
|
+
const Ir = /* @__PURE__ */ a("ZodIntersection", (n, t) => {
|
|
1871
|
+
Ce.init(n, t), w.init(n, t);
|
|
1875
1872
|
});
|
|
1876
|
-
function
|
|
1877
|
-
return new
|
|
1873
|
+
function Tr(n, t) {
|
|
1874
|
+
return new Ir({
|
|
1878
1875
|
type: "intersection",
|
|
1879
1876
|
left: n,
|
|
1880
1877
|
right: t
|
|
1881
1878
|
});
|
|
1882
1879
|
}
|
|
1883
1880
|
const Q = /* @__PURE__ */ a("ZodEnum", (n, t) => {
|
|
1884
|
-
|
|
1881
|
+
Je.init(n, t), w.init(n, t), n.enum = t.entries, n.options = Object.values(t.entries);
|
|
1885
1882
|
const e = new Set(Object.keys(t.entries));
|
|
1886
1883
|
n.extract = (o, r) => {
|
|
1887
1884
|
const i = {};
|
|
@@ -1911,7 +1908,7 @@ const Q = /* @__PURE__ */ a("ZodEnum", (n, t) => {
|
|
|
1911
1908
|
});
|
|
1912
1909
|
};
|
|
1913
1910
|
});
|
|
1914
|
-
function
|
|
1911
|
+
function Wn(n, t) {
|
|
1915
1912
|
const e = Array.isArray(n) ? Object.fromEntries(n.map((o) => [o, o])) : n;
|
|
1916
1913
|
return new Q({
|
|
1917
1914
|
type: "enum",
|
|
@@ -1919,8 +1916,8 @@ function Mn(n, t) {
|
|
|
1919
1916
|
...f(t)
|
|
1920
1917
|
});
|
|
1921
1918
|
}
|
|
1922
|
-
const
|
|
1923
|
-
|
|
1919
|
+
const Nr = /* @__PURE__ */ a("ZodTransform", (n, t) => {
|
|
1920
|
+
De.init(n, t), w.init(n, t), n._zod.parse = (e, o) => {
|
|
1924
1921
|
if (o.direction === "backward")
|
|
1925
1922
|
throw new On(n.constructor.name);
|
|
1926
1923
|
e.addIssue = (i) => {
|
|
@@ -1935,35 +1932,35 @@ const Cr = /* @__PURE__ */ a("ZodTransform", (n, t) => {
|
|
|
1935
1932
|
return r instanceof Promise ? r.then((i) => (e.value = i, e)) : (e.value = r, e);
|
|
1936
1933
|
};
|
|
1937
1934
|
});
|
|
1938
|
-
function
|
|
1939
|
-
return new
|
|
1935
|
+
function Fr(n) {
|
|
1936
|
+
return new Nr({
|
|
1940
1937
|
type: "transform",
|
|
1941
1938
|
transform: n
|
|
1942
1939
|
});
|
|
1943
1940
|
}
|
|
1944
|
-
const
|
|
1945
|
-
|
|
1941
|
+
const Mn = /* @__PURE__ */ a("ZodOptional", (n, t) => {
|
|
1942
|
+
Re.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType;
|
|
1946
1943
|
});
|
|
1947
1944
|
function bn(n) {
|
|
1948
|
-
return new
|
|
1945
|
+
return new Mn({
|
|
1949
1946
|
type: "optional",
|
|
1950
1947
|
innerType: n
|
|
1951
1948
|
});
|
|
1952
1949
|
}
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1950
|
+
const Cr = /* @__PURE__ */ a("ZodNullable", (n, t) => {
|
|
1951
|
+
Ue.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType;
|
|
1955
1952
|
});
|
|
1956
1953
|
function kn(n) {
|
|
1957
|
-
return new
|
|
1954
|
+
return new Cr({
|
|
1958
1955
|
type: "nullable",
|
|
1959
1956
|
innerType: n
|
|
1960
1957
|
});
|
|
1961
1958
|
}
|
|
1962
|
-
const
|
|
1963
|
-
|
|
1959
|
+
const Jr = /* @__PURE__ */ a("ZodDefault", (n, t) => {
|
|
1960
|
+
Ve.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType, n.removeDefault = n.unwrap;
|
|
1964
1961
|
});
|
|
1965
|
-
function
|
|
1966
|
-
return new
|
|
1962
|
+
function Dr(n, t) {
|
|
1963
|
+
return new Jr({
|
|
1967
1964
|
type: "default",
|
|
1968
1965
|
innerType: n,
|
|
1969
1966
|
get defaultValue() {
|
|
@@ -1971,11 +1968,11 @@ function Ur(n, t) {
|
|
|
1971
1968
|
}
|
|
1972
1969
|
});
|
|
1973
1970
|
}
|
|
1974
|
-
const
|
|
1975
|
-
|
|
1971
|
+
const Rr = /* @__PURE__ */ a("ZodPrefault", (n, t) => {
|
|
1972
|
+
Le.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType;
|
|
1976
1973
|
});
|
|
1977
|
-
function
|
|
1978
|
-
return new
|
|
1974
|
+
function Ur(n, t) {
|
|
1975
|
+
return new Rr({
|
|
1979
1976
|
type: "prefault",
|
|
1980
1977
|
innerType: n,
|
|
1981
1978
|
get defaultValue() {
|
|
@@ -1984,77 +1981,77 @@ function Lr(n, t) {
|
|
|
1984
1981
|
});
|
|
1985
1982
|
}
|
|
1986
1983
|
const Bn = /* @__PURE__ */ a("ZodNonOptional", (n, t) => {
|
|
1987
|
-
|
|
1984
|
+
We.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType;
|
|
1988
1985
|
});
|
|
1989
|
-
function
|
|
1986
|
+
function Vr(n, t) {
|
|
1990
1987
|
return new Bn({
|
|
1991
1988
|
type: "nonoptional",
|
|
1992
1989
|
innerType: n,
|
|
1993
1990
|
...f(t)
|
|
1994
1991
|
});
|
|
1995
1992
|
}
|
|
1996
|
-
const
|
|
1997
|
-
|
|
1993
|
+
const Lr = /* @__PURE__ */ a("ZodCatch", (n, t) => {
|
|
1994
|
+
Me.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType, n.removeCatch = n.unwrap;
|
|
1998
1995
|
});
|
|
1999
|
-
function
|
|
2000
|
-
return new
|
|
1996
|
+
function Wr(n, t) {
|
|
1997
|
+
return new Lr({
|
|
2001
1998
|
type: "catch",
|
|
2002
1999
|
innerType: n,
|
|
2003
2000
|
catchValue: typeof t == "function" ? t : () => t
|
|
2004
2001
|
});
|
|
2005
2002
|
}
|
|
2006
|
-
const
|
|
2007
|
-
|
|
2003
|
+
const Mr = /* @__PURE__ */ a("ZodPipe", (n, t) => {
|
|
2004
|
+
Be.init(n, t), w.init(n, t), n.in = t.in, n.out = t.out;
|
|
2008
2005
|
});
|
|
2009
2006
|
function $n(n, t) {
|
|
2010
|
-
return new
|
|
2007
|
+
return new Mr({
|
|
2011
2008
|
type: "pipe",
|
|
2012
2009
|
in: n,
|
|
2013
2010
|
out: t
|
|
2014
2011
|
// ...util.normalizeParams(params),
|
|
2015
2012
|
});
|
|
2016
2013
|
}
|
|
2017
|
-
const
|
|
2018
|
-
|
|
2014
|
+
const Br = /* @__PURE__ */ a("ZodReadonly", (n, t) => {
|
|
2015
|
+
Ke.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType;
|
|
2019
2016
|
});
|
|
2020
|
-
function
|
|
2021
|
-
return new
|
|
2017
|
+
function Kr(n) {
|
|
2018
|
+
return new Br({
|
|
2022
2019
|
type: "readonly",
|
|
2023
2020
|
innerType: n
|
|
2024
2021
|
});
|
|
2025
2022
|
}
|
|
2026
|
-
const
|
|
2027
|
-
|
|
2023
|
+
const Gr = /* @__PURE__ */ a("ZodCustom", (n, t) => {
|
|
2024
|
+
Ge.init(n, t), w.init(n, t);
|
|
2028
2025
|
});
|
|
2029
|
-
function
|
|
2030
|
-
return
|
|
2026
|
+
function Hr(n, t = {}) {
|
|
2027
|
+
return Co(Gr, n, t);
|
|
2031
2028
|
}
|
|
2032
|
-
function
|
|
2033
|
-
return
|
|
2029
|
+
function qr(n) {
|
|
2030
|
+
return Jo(n);
|
|
2034
2031
|
}
|
|
2035
2032
|
const Zn = Ln({
|
|
2036
2033
|
"en-au": A().optional(),
|
|
2037
2034
|
"en-gb": A().optional(),
|
|
2038
2035
|
"en-us": A().optional(),
|
|
2039
2036
|
"es-es": A().optional()
|
|
2040
|
-
}),
|
|
2037
|
+
}), Yr = Ln({
|
|
2041
2038
|
id: A(),
|
|
2042
2039
|
label: Zn,
|
|
2043
2040
|
description: Zn,
|
|
2044
2041
|
statusId: X(),
|
|
2045
|
-
typeId:
|
|
2042
|
+
typeId: Wn(["app", "engine", "connector", "context", "informer", "presenter"]),
|
|
2046
2043
|
version: A()
|
|
2047
2044
|
}), V = Xn(qn);
|
|
2048
|
-
async function
|
|
2045
|
+
async function ei() {
|
|
2049
2046
|
try {
|
|
2050
2047
|
console.info("🚀 Building configuration...");
|
|
2051
|
-
const n = JSON.parse(await
|
|
2052
|
-
|
|
2048
|
+
const n = JSON.parse(await h.readFile("package.json", "utf8")), t = JSON.parse(await h.readFile("config.json", "utf8"));
|
|
2049
|
+
Yr.parse(t), n.name && (t.id = n.name), n.version && (t.version = n.version), await h.writeFile("config.json", JSON.stringify(t, void 0, 4), "utf8"), console.info("✅ Configuration built.");
|
|
2053
2050
|
} catch (n) {
|
|
2054
2051
|
console.error("❌ Error building configuration.", n);
|
|
2055
2052
|
}
|
|
2056
2053
|
}
|
|
2057
|
-
async function
|
|
2054
|
+
async function oi(n) {
|
|
2058
2055
|
try {
|
|
2059
2056
|
console.info(`🚀 Building public directory index for identifier '${n}'...`);
|
|
2060
2057
|
const t = {};
|
|
@@ -2065,13 +2062,13 @@ async function ii(n) {
|
|
|
2065
2062
|
for (const u of i) {
|
|
2066
2063
|
const d = `${r}/${u}`;
|
|
2067
2064
|
try {
|
|
2068
|
-
const l = await
|
|
2065
|
+
const l = await h.stat(d);
|
|
2069
2066
|
if (l.isDirectory()) {
|
|
2070
|
-
const
|
|
2071
|
-
s.push(m), await e(d,
|
|
2067
|
+
const p = await h.readdir(d), m = { childCount: p.length, name: `${u}`, typeId: "folder" };
|
|
2068
|
+
s.push(m), await e(d, p);
|
|
2072
2069
|
} else {
|
|
2073
|
-
const
|
|
2074
|
-
s.push(
|
|
2070
|
+
const p = { id: Yn(), lastModifiedAt: l.mtimeMs, name: u, size: l.size, typeId: "object" };
|
|
2071
|
+
s.push(p);
|
|
2075
2072
|
}
|
|
2076
2073
|
} catch (l) {
|
|
2077
2074
|
throw new Error(`Unable to get information for '${u}' in 'buildPublicDirectoryIndex'. ${String(l)}`);
|
|
@@ -2082,75 +2079,75 @@ async function ii(n) {
|
|
|
2082
2079
|
return l !== 0 ? l : u.name.localeCompare(d.name);
|
|
2083
2080
|
});
|
|
2084
2081
|
}
|
|
2085
|
-
const o = await
|
|
2086
|
-
await e(`public/${n}`, o), await
|
|
2082
|
+
const o = await h.readdir(`public/${n}`);
|
|
2083
|
+
await e(`public/${n}`, o), await h.writeFile(`./public/${n}Index.json`, JSON.stringify(t), "utf8"), console.info("✅ Public directory index built.");
|
|
2087
2084
|
} catch (t) {
|
|
2088
2085
|
console.error("❌ Error building public directory index.", t);
|
|
2089
2086
|
}
|
|
2090
2087
|
}
|
|
2091
|
-
async function
|
|
2088
|
+
async function ri() {
|
|
2092
2089
|
try {
|
|
2093
2090
|
console.info("🚀 Building connector configuration...");
|
|
2094
|
-
const n = JSON.parse(await
|
|
2091
|
+
const n = JSON.parse(await h.readFile("package.json", "utf8")), t = JSON.parse(await h.readFile("config.json", "utf8")), e = await h.readFile("src/index.ts", "utf8");
|
|
2095
2092
|
let o = !1, r = !1;
|
|
2096
2093
|
const i = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, s = [...e.matchAll(i)].filter((u) => !u[1] && u[2] !== "constructor").map((u) => {
|
|
2097
2094
|
const d = u[2];
|
|
2098
|
-
return o = o ||
|
|
2095
|
+
return o = o || Qn.includes(d), r = r || nt.includes(d), d;
|
|
2099
2096
|
});
|
|
2100
2097
|
s.length > 0 ? console.info(`ℹ️ Implements ${s.length} operations.`) : console.warn("⚠️ Implements no operations.");
|
|
2101
2098
|
const c = r && o ? "bidirectional" : r ? "source" : o ? "destination" : null;
|
|
2102
|
-
c ? console.info(`ℹ️ Supports ${c} usage.`) : console.warn("⚠️ No usage identified."), n.name && (t.id = n.name), t.operations = s, t.usageId = c, n.version && (t.version = n.version), await
|
|
2099
|
+
c ? console.info(`ℹ️ Supports ${c} usage.`) : console.warn("⚠️ No usage identified."), n.name && (t.id = n.name), t.operations = s, t.usageId = c, n.version && (t.version = n.version), await h.writeFile("config.json", JSON.stringify(t, void 0, 4), "utf8"), console.info("✅ Connector configuration built.");
|
|
2103
2100
|
} catch (n) {
|
|
2104
2101
|
console.error("❌ Error building connector configuration.", n);
|
|
2105
2102
|
}
|
|
2106
2103
|
}
|
|
2107
|
-
async function
|
|
2104
|
+
async function ii() {
|
|
2108
2105
|
try {
|
|
2109
2106
|
console.info("🚀 Building context configuration...");
|
|
2110
|
-
const n = JSON.parse(await
|
|
2111
|
-
n.name && (t.id = n.name), t.operations = r, n.version && (t.version = n.version), await
|
|
2107
|
+
const n = JSON.parse(await h.readFile("package.json", "utf8")), t = JSON.parse(await h.readFile("config.json", "utf8")), e = await h.readFile("src/index.ts", "utf8"), o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, r = [...e.matchAll(o)].filter((i) => !i[1] && i[2] !== "constructor").map((i) => i[2]);
|
|
2108
|
+
n.name && (t.id = n.name), t.operations = r, n.version && (t.version = n.version), await h.writeFile("config.json", JSON.stringify(t, void 0, 4), "utf8"), console.info("✅ Context configuration built.");
|
|
2112
2109
|
} catch (n) {
|
|
2113
2110
|
console.error("❌ Error building context configuration.", n);
|
|
2114
2111
|
}
|
|
2115
2112
|
}
|
|
2116
|
-
async function
|
|
2113
|
+
async function si() {
|
|
2117
2114
|
try {
|
|
2118
2115
|
console.info("🚀 Building informer configuration...");
|
|
2119
|
-
const n = JSON.parse(await
|
|
2120
|
-
n.name && (t.id = n.name), t.operations = r, n.version && (t.version = n.version), await
|
|
2116
|
+
const n = JSON.parse(await h.readFile("package.json", "utf8")), t = JSON.parse(await h.readFile("config.json", "utf8")), e = await h.readFile("src/index.ts", "utf8"), o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, r = [...e.matchAll(o)].filter((i) => !i[1] && i[2] !== "constructor").map((i) => i[2]);
|
|
2117
|
+
n.name && (t.id = n.name), t.operations = r, n.version && (t.version = n.version), await h.writeFile("config.json", JSON.stringify(t, void 0, 4), "utf8"), console.info("✅ Informer configuration built.");
|
|
2121
2118
|
} catch (n) {
|
|
2122
2119
|
console.error("❌ Error building informer configuration.", n);
|
|
2123
2120
|
}
|
|
2124
2121
|
}
|
|
2125
|
-
async function
|
|
2122
|
+
async function ai() {
|
|
2126
2123
|
try {
|
|
2127
2124
|
console.info("🚀 Building presenter configuration...");
|
|
2128
|
-
const n = JSON.parse(await
|
|
2129
|
-
n.name && (t.id = n.name), t.operations = r, n.version && (t.version = n.version), await
|
|
2125
|
+
const n = JSON.parse(await h.readFile("package.json", "utf8")), t = JSON.parse(await h.readFile("config.json", "utf8")), e = await h.readFile("src/index.ts", "utf8"), o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, r = [...e.matchAll(o)].filter((i) => !i[1] && i[2] !== "constructor").map((i) => i[2]);
|
|
2126
|
+
n.name && (t.id = n.name), t.operations = r, n.version && (t.version = n.version), await h.writeFile("config.json", JSON.stringify(t, void 0, 4), "utf8"), console.info("✅ Presenter configuration built.");
|
|
2130
2127
|
} catch (n) {
|
|
2131
2128
|
console.error("❌ Error building context configuration.", n);
|
|
2132
2129
|
}
|
|
2133
2130
|
}
|
|
2134
|
-
async function
|
|
2131
|
+
async function ci() {
|
|
2135
2132
|
try {
|
|
2136
2133
|
console.info("🚀 Bumping version...");
|
|
2137
|
-
const n = JSON.parse(await
|
|
2134
|
+
const n = JSON.parse(await h.readFile("package.json", "utf8"));
|
|
2138
2135
|
if (n.version) {
|
|
2139
2136
|
const t = n.version, e = n.version.split(".");
|
|
2140
|
-
n.version = `${e[0]}.${e[1]}.${Number(e[2]) + 1}`, await
|
|
2137
|
+
n.version = `${e[0]}.${e[1]}.${Number(e[2]) + 1}`, await h.writeFile("package.json", JSON.stringify(n, void 0, 4), "utf8"), console.info(`✅ Version bumped from ${t} to ${n.version}.`);
|
|
2141
2138
|
} else
|
|
2142
|
-
n.version = "0.0.001", await
|
|
2139
|
+
n.version = "0.0.001", await h.writeFile("package.json", JSON.stringify(n, void 0, 4), "utf8"), console.warn(`⚠️ Version initialised to ${n.version}.`);
|
|
2143
2140
|
} catch (n) {
|
|
2144
2141
|
console.error("❌ Error bumping package version.", n);
|
|
2145
2142
|
}
|
|
2146
2143
|
}
|
|
2147
|
-
function
|
|
2144
|
+
function ui(n) {
|
|
2148
2145
|
console.error(`❌ ${n} script not implemented.`);
|
|
2149
2146
|
}
|
|
2150
|
-
async function
|
|
2147
|
+
async function di() {
|
|
2151
2148
|
try {
|
|
2152
2149
|
console.info("🚀 Sending deployment notice...");
|
|
2153
|
-
const n = JSON.parse(await
|
|
2150
|
+
const n = JSON.parse(await h.readFile("config.json", "utf8")), t = {
|
|
2154
2151
|
body: JSON.stringify(n),
|
|
2155
2152
|
headers: { "Content-Type": "application/json" },
|
|
2156
2153
|
method: "PUT"
|
|
@@ -2161,41 +2158,41 @@ async function li() {
|
|
|
2161
2158
|
console.error("❌ Error sending deployment notice.", n);
|
|
2162
2159
|
}
|
|
2163
2160
|
}
|
|
2164
|
-
async function
|
|
2161
|
+
async function fi() {
|
|
2165
2162
|
try {
|
|
2166
2163
|
console.info("🚀 Synchronising with GitHub....");
|
|
2167
|
-
const n = JSON.parse(await
|
|
2164
|
+
const n = JSON.parse(await h.readFile("package.json", "utf8"));
|
|
2168
2165
|
await V("git add ."), await V(`git commit -m "v${n.version}"`), await V("git push origin main:main"), console.info(`✅ Synchronised version ${n.version} with GitHub.`);
|
|
2169
2166
|
} catch (n) {
|
|
2170
2167
|
console.error("❌ Error synchronising with GitHub.", n);
|
|
2171
2168
|
}
|
|
2172
2169
|
}
|
|
2173
|
-
async function
|
|
2170
|
+
async function li(n, t) {
|
|
2174
2171
|
try {
|
|
2175
2172
|
console.info("🚀 Uploading directory to R2....");
|
|
2176
2173
|
async function e(r, i, s) {
|
|
2177
2174
|
for (const c of s) {
|
|
2178
2175
|
const u = `${r}/${c}`, d = `${i}/${c}`;
|
|
2179
|
-
if ((await
|
|
2180
|
-
const
|
|
2181
|
-
await e(u, d,
|
|
2176
|
+
if ((await h.stat(u)).isDirectory()) {
|
|
2177
|
+
const p = await h.readdir(u);
|
|
2178
|
+
await e(u, d, p);
|
|
2182
2179
|
} else {
|
|
2183
2180
|
console.info(`⚙️ Uploading '${r}/${c}'.`);
|
|
2184
|
-
const
|
|
2181
|
+
const p = `wrangler r2 object put "datapos-sample-data-eu/${i}/${c}" --file="${r}/${c}" --jurisdiction=eu --remote`, m = await V(p);
|
|
2185
2182
|
if (m.stderr) throw new Error(m.stderr);
|
|
2186
2183
|
}
|
|
2187
2184
|
}
|
|
2188
2185
|
}
|
|
2189
|
-
const o = await
|
|
2186
|
+
const o = await h.readdir(`${n}/${t}/`);
|
|
2190
2187
|
await e(`${n}/${t}`, t, o), console.info("✅ Directory uploaded to R2.");
|
|
2191
2188
|
} catch (e) {
|
|
2192
2189
|
console.error("❌ Error uploading directory to R2.", e);
|
|
2193
2190
|
}
|
|
2194
2191
|
}
|
|
2195
|
-
async function
|
|
2192
|
+
async function pi() {
|
|
2196
2193
|
try {
|
|
2197
2194
|
console.info("🚀 Uploading module configuration....");
|
|
2198
|
-
const n = JSON.parse(await
|
|
2195
|
+
const n = JSON.parse(await h.readFile("config.json", "utf8")), t = n.id, e = {
|
|
2199
2196
|
body: JSON.stringify(n),
|
|
2200
2197
|
headers: { "Content-Type": "application/json" },
|
|
2201
2198
|
method: "PUT"
|
|
@@ -2206,32 +2203,39 @@ async function mi() {
|
|
|
2206
2203
|
console.error("❌ Error uploading module configuration.", n);
|
|
2207
2204
|
}
|
|
2208
2205
|
}
|
|
2209
|
-
async function
|
|
2206
|
+
async function hi(n, t) {
|
|
2210
2207
|
try {
|
|
2211
2208
|
console.info("🚀 Uploading module to R2...");
|
|
2212
|
-
const o = `v${JSON.parse(await
|
|
2213
|
-
async function r(i) {
|
|
2214
|
-
const
|
|
2215
|
-
for (const
|
|
2216
|
-
|
|
2209
|
+
const o = `v${JSON.parse(await h.readFile("package.json", "utf8")).version}`;
|
|
2210
|
+
async function r(i, s = "") {
|
|
2211
|
+
const c = await h.readdir(i, { withFileTypes: !0 });
|
|
2212
|
+
for (const u of c) {
|
|
2213
|
+
const d = `${i}/${u.name}`, l = s ? `${s}/${u.name}` : u.name;
|
|
2214
|
+
if (u.isDirectory())
|
|
2215
|
+
await r(d, l);
|
|
2216
|
+
else {
|
|
2217
|
+
const p = `${t}/${o}/${l}`.replace(/\\/g, "/"), m = u.name.endsWith(".js") ? "application/javascript" : u.name.endsWith(".css") ? "text/css" : "application/octet-stream";
|
|
2218
|
+
console.info(`✅ Uploaded ${l} → ${p}`);
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2217
2221
|
}
|
|
2218
|
-
await r("dist"), console.info("
|
|
2222
|
+
await r("dist"), console.info("🎉 All files uploaded to R2.");
|
|
2219
2223
|
} catch (e) {
|
|
2220
2224
|
console.error("❌ Error uploading module to R2.", e);
|
|
2221
2225
|
}
|
|
2222
2226
|
}
|
|
2223
2227
|
export {
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2228
|
+
ei as buildConfig,
|
|
2229
|
+
ri as buildConnectorConfig,
|
|
2230
|
+
ii as buildContextConfig,
|
|
2231
|
+
si as buildInformerConfig,
|
|
2232
|
+
ai as buildPresenterConfig,
|
|
2233
|
+
oi as buildPublicDirectoryIndex,
|
|
2234
|
+
ci as bumpVersion,
|
|
2235
|
+
ui as echoScriptNotImplemented,
|
|
2236
|
+
di as sendDeploymentNotice,
|
|
2237
|
+
fi as syncWithGitHub,
|
|
2238
|
+
li as uploadDirectoryToR2,
|
|
2239
|
+
pi as uploadModuleConfigToDO,
|
|
2240
|
+
hi as uploadModuleToR2
|
|
2237
2241
|
};
|