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