@datapos/datapos-development 0.3.75 → 0.3.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/datapos-development.es.js +79 -79
- package/package.json +1 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { exec as qn } from "child_process";
|
|
2
|
-
import { promises as h } from "fs";
|
|
3
2
|
import { nanoid as Yn } from "nanoid";
|
|
4
3
|
import { promisify as Xn } from "util";
|
|
5
|
-
const Qn = ["createObject", "dropObject", "removeRecords", "upsertRecords"], nt = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
|
|
4
|
+
const h = {}, Qn = ["createObject", "dropObject", "removeRecords", "upsertRecords"], nt = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
|
|
6
5
|
function a(n, t, e) {
|
|
7
6
|
function o(c, u) {
|
|
8
7
|
var d;
|
|
@@ -119,7 +118,7 @@ const et = nn(() => {
|
|
|
119
118
|
return !1;
|
|
120
119
|
}
|
|
121
120
|
});
|
|
122
|
-
function
|
|
121
|
+
function F(n) {
|
|
123
122
|
if (L(n) === !1)
|
|
124
123
|
return !1;
|
|
125
124
|
const t = n.constructor;
|
|
@@ -129,7 +128,7 @@ function N(n) {
|
|
|
129
128
|
return !(L(e) === !1 || Object.prototype.hasOwnProperty.call(e, "isPrototypeOf") === !1);
|
|
130
129
|
}
|
|
131
130
|
function En(n) {
|
|
132
|
-
return
|
|
131
|
+
return F(n) ? { ...n } : Array.isArray(n) ? [...n] : n;
|
|
133
132
|
}
|
|
134
133
|
const ot = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
135
134
|
function B(n) {
|
|
@@ -186,7 +185,7 @@ function st(n, t) {
|
|
|
186
185
|
return O(n, o);
|
|
187
186
|
}
|
|
188
187
|
function at(n, t) {
|
|
189
|
-
if (!
|
|
188
|
+
if (!F(t))
|
|
190
189
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
191
190
|
const e = n._zod.def.checks;
|
|
192
191
|
if (e && e.length > 0)
|
|
@@ -201,7 +200,7 @@ function at(n, t) {
|
|
|
201
200
|
return O(n, o);
|
|
202
201
|
}
|
|
203
202
|
function ct(n, t) {
|
|
204
|
-
if (!
|
|
203
|
+
if (!F(t))
|
|
205
204
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
206
205
|
const e = {
|
|
207
206
|
...n._zod.def,
|
|
@@ -291,13 +290,13 @@ function Sn(n, t) {
|
|
|
291
290
|
return (o = e).path ?? (o.path = []), e.path.unshift(n), e;
|
|
292
291
|
});
|
|
293
292
|
}
|
|
294
|
-
function
|
|
293
|
+
function D(n) {
|
|
295
294
|
return typeof n == "string" ? n : n?.message;
|
|
296
295
|
}
|
|
297
296
|
function j(n, t, e) {
|
|
298
297
|
const o = { ...n, path: n.path ?? [] };
|
|
299
298
|
if (!n.message) {
|
|
300
|
-
const r =
|
|
299
|
+
const r = D(n.inst?._zod.def?.error?.(n)) ?? D(t?.error?.(n)) ?? D(e.customError?.(n)) ?? D(e.localeError?.(n)) ?? "Invalid input";
|
|
301
300
|
o.message = r;
|
|
302
301
|
}
|
|
303
302
|
return delete o.inst, delete o.continue, t?.reportInput || delete o.input, o;
|
|
@@ -305,7 +304,7 @@ function j(n, t, e) {
|
|
|
305
304
|
function on(n) {
|
|
306
305
|
return Array.isArray(n) ? "array" : typeof n == "string" ? "string" : "unknown";
|
|
307
306
|
}
|
|
308
|
-
function
|
|
307
|
+
function C(...n) {
|
|
309
308
|
const [t, e, o] = n;
|
|
310
309
|
return typeof t == "string" ? {
|
|
311
310
|
message: t,
|
|
@@ -401,7 +400,7 @@ const rn = (n) => (t, e, o, r) => {
|
|
|
401
400
|
function Tt() {
|
|
402
401
|
return new RegExp(It, "u");
|
|
403
402
|
}
|
|
404
|
-
const Nt = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ft = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, Ct = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Jt = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,
|
|
403
|
+
const Nt = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ft = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, Ct = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Jt = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Dt = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Tn = /^[A-Za-z0-9_-]*$/, Rt = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, Ut = /^\+(?:[0-9]){6,14}[0-9]$/, Nn = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", Vt = /* @__PURE__ */ new RegExp(`^${Nn}$`);
|
|
405
404
|
function Fn(n) {
|
|
406
405
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
407
406
|
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+)?)?`;
|
|
@@ -726,7 +725,7 @@ const ie = {
|
|
|
726
725
|
code: "invalid_format",
|
|
727
726
|
format: "url",
|
|
728
727
|
note: "Invalid hostname",
|
|
729
|
-
pattern:
|
|
728
|
+
pattern: Rt.source,
|
|
730
729
|
input: e.value,
|
|
731
730
|
inst: n,
|
|
732
731
|
continue: !t.abort
|
|
@@ -834,7 +833,7 @@ function Cn(n) {
|
|
|
834
833
|
}
|
|
835
834
|
}
|
|
836
835
|
const Ze = /* @__PURE__ */ a("$ZodBase64", (n, t) => {
|
|
837
|
-
t.pattern ?? (t.pattern =
|
|
836
|
+
t.pattern ?? (t.pattern = Dt), v.init(n, t), n._zod.onattach.push((e) => {
|
|
838
837
|
e._zod.bag.contentEncoding = "base64";
|
|
839
838
|
}), n._zod.check = (e) => {
|
|
840
839
|
Cn(e.value) || e.issues.push({
|
|
@@ -943,7 +942,7 @@ function Jn(n) {
|
|
|
943
942
|
optionalKeys: new Set(e)
|
|
944
943
|
};
|
|
945
944
|
}
|
|
946
|
-
function
|
|
945
|
+
function Dn(n, t, e, o, r, i) {
|
|
947
946
|
const s = [], c = r.keySet, u = r.catchall._zod, d = u.def.type;
|
|
948
947
|
for (const l of Object.keys(t)) {
|
|
949
948
|
if (c.has(l))
|
|
@@ -1005,7 +1004,7 @@ const Te = /* @__PURE__ */ a("$ZodObject", (n, t) => {
|
|
|
1005
1004
|
const m = l[p]._zod.run({ value: u[p], issues: [] }, c);
|
|
1006
1005
|
m instanceof Promise ? d.push(m.then((z) => W(z, s, p, u))) : W(m, s, p, u);
|
|
1007
1006
|
}
|
|
1008
|
-
return r ?
|
|
1007
|
+
return r ? Dn(d, u, s, c, e.value, n) : d.length ? Promise.all(d).then(() => s) : s;
|
|
1009
1008
|
};
|
|
1010
1009
|
}), Ne = /* @__PURE__ */ a("$ZodObjectJIT", (n, t) => {
|
|
1011
1010
|
Te.init(n, t);
|
|
@@ -1051,7 +1050,7 @@ const Te = /* @__PURE__ */ a("$ZodObject", (n, t) => {
|
|
|
1051
1050
|
n._zod.parse = (p, m) => {
|
|
1052
1051
|
l ?? (l = o.value);
|
|
1053
1052
|
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 ?
|
|
1053
|
+
return s(z) ? c && u && m?.async === !1 && m.jitless !== !0 ? (i || (i = r(t.shape)), p = i(p, m), d ? Dn([], z, p, m, l, n) : p) : e(p, m) : (p.issues.push({
|
|
1055
1054
|
expected: "object",
|
|
1056
1055
|
code: "invalid_type",
|
|
1057
1056
|
input: z,
|
|
@@ -1113,7 +1112,7 @@ function Y(n, t) {
|
|
|
1113
1112
|
return { valid: !0, data: n };
|
|
1114
1113
|
if (n instanceof Date && t instanceof Date && +n == +t)
|
|
1115
1114
|
return { valid: !0, data: n };
|
|
1116
|
-
if (
|
|
1115
|
+
if (F(n) && F(t)) {
|
|
1117
1116
|
const e = Object.keys(t), o = Object.keys(n).filter((i) => e.indexOf(i) !== -1), r = { ...n, ...t };
|
|
1118
1117
|
for (const i of o) {
|
|
1119
1118
|
const s = Y(n[i], t[i]);
|
|
@@ -1163,7 +1162,7 @@ const Je = /* @__PURE__ */ a("$ZodEnum", (n, t) => {
|
|
|
1163
1162
|
inst: n
|
|
1164
1163
|
}), r;
|
|
1165
1164
|
};
|
|
1166
|
-
}),
|
|
1165
|
+
}), De = /* @__PURE__ */ a("$ZodTransform", (n, t) => {
|
|
1167
1166
|
_.init(n, t), n._zod.parse = (e, o) => {
|
|
1168
1167
|
if (o.direction === "backward")
|
|
1169
1168
|
throw new On(n.constructor.name);
|
|
@@ -1178,7 +1177,7 @@ const Je = /* @__PURE__ */ a("$ZodEnum", (n, t) => {
|
|
|
1178
1177
|
function mn(n, t) {
|
|
1179
1178
|
return n.issues.length && t === void 0 ? { issues: [], value: void 0 } : n;
|
|
1180
1179
|
}
|
|
1181
|
-
const
|
|
1180
|
+
const Re = /* @__PURE__ */ a("$ZodOptional", (n, t) => {
|
|
1182
1181
|
_.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
1182
|
const e = t.innerType._zod.pattern;
|
|
1184
1183
|
return e ? new RegExp(`^(${en(e.source)})?$`) : void 0;
|
|
@@ -1289,7 +1288,7 @@ function _n(n, t, e, o) {
|
|
|
1289
1288
|
continue: !o._zod.def.abort
|
|
1290
1289
|
// params: inst._zod.def.params,
|
|
1291
1290
|
};
|
|
1292
|
-
o._zod.def.params && (r.params = o._zod.def.params), t.issues.push(
|
|
1291
|
+
o._zod.def.params && (r.params = o._zod.def.params), t.issues.push(C(r));
|
|
1293
1292
|
}
|
|
1294
1293
|
}
|
|
1295
1294
|
class He {
|
|
@@ -1329,7 +1328,7 @@ class He {
|
|
|
1329
1328
|
function qe() {
|
|
1330
1329
|
return new He();
|
|
1331
1330
|
}
|
|
1332
|
-
const
|
|
1331
|
+
const U = /* @__PURE__ */ qe();
|
|
1333
1332
|
function Ye(n, t) {
|
|
1334
1333
|
return new n({
|
|
1335
1334
|
type: "string",
|
|
@@ -1584,7 +1583,7 @@ function Zo(n, t) {
|
|
|
1584
1583
|
...f(t)
|
|
1585
1584
|
});
|
|
1586
1585
|
}
|
|
1587
|
-
function
|
|
1586
|
+
function Rn(n, t) {
|
|
1588
1587
|
return new Gt({
|
|
1589
1588
|
check: "max_length",
|
|
1590
1589
|
...f(t),
|
|
@@ -1651,23 +1650,23 @@ function Po(n, t) {
|
|
|
1651
1650
|
suffix: n
|
|
1652
1651
|
});
|
|
1653
1652
|
}
|
|
1654
|
-
function
|
|
1653
|
+
function J(n) {
|
|
1655
1654
|
return new oe({
|
|
1656
1655
|
check: "overwrite",
|
|
1657
1656
|
tx: n
|
|
1658
1657
|
});
|
|
1659
1658
|
}
|
|
1660
1659
|
function Ao(n) {
|
|
1661
|
-
return
|
|
1660
|
+
return J((t) => t.normalize(n));
|
|
1662
1661
|
}
|
|
1663
1662
|
function Io() {
|
|
1664
|
-
return
|
|
1663
|
+
return J((n) => n.trim());
|
|
1665
1664
|
}
|
|
1666
1665
|
function To() {
|
|
1667
|
-
return
|
|
1666
|
+
return J((n) => n.toLowerCase());
|
|
1668
1667
|
}
|
|
1669
1668
|
function No() {
|
|
1670
|
-
return
|
|
1669
|
+
return J((n) => n.toUpperCase());
|
|
1671
1670
|
}
|
|
1672
1671
|
function Fo(n, t, e) {
|
|
1673
1672
|
return new n({
|
|
@@ -1688,28 +1687,28 @@ function Co(n, t, e) {
|
|
|
1688
1687
|
});
|
|
1689
1688
|
}
|
|
1690
1689
|
function Jo(n) {
|
|
1691
|
-
const t =
|
|
1690
|
+
const t = Do((e) => (e.addIssue = (o) => {
|
|
1692
1691
|
if (typeof o == "string")
|
|
1693
|
-
e.issues.push(
|
|
1692
|
+
e.issues.push(C(o, e.value, t._zod.def));
|
|
1694
1693
|
else {
|
|
1695
1694
|
const r = o;
|
|
1696
|
-
r.fatal && (r.continue = !1), r.code ?? (r.code = "custom"), r.input ?? (r.input = e.value), r.inst ?? (r.inst = t), r.continue ?? (r.continue = !t._zod.def.abort), e.issues.push(
|
|
1695
|
+
r.fatal && (r.continue = !1), r.code ?? (r.code = "custom"), r.input ?? (r.input = e.value), r.inst ?? (r.inst = t), r.continue ?? (r.continue = !t._zod.def.abort), e.issues.push(C(r));
|
|
1697
1696
|
}
|
|
1698
1697
|
}, n(e.value, e)));
|
|
1699
1698
|
return t;
|
|
1700
1699
|
}
|
|
1701
|
-
function
|
|
1700
|
+
function Do(n, t) {
|
|
1702
1701
|
const e = new $({
|
|
1703
1702
|
check: "custom",
|
|
1704
1703
|
...f(t)
|
|
1705
1704
|
});
|
|
1706
1705
|
return e._zod.check = n, e;
|
|
1707
1706
|
}
|
|
1708
|
-
const
|
|
1707
|
+
const Ro = /* @__PURE__ */ a("ZodISODateTime", (n, t) => {
|
|
1709
1708
|
ve.init(n, t), y.init(n, t);
|
|
1710
1709
|
});
|
|
1711
1710
|
function Uo(n) {
|
|
1712
|
-
return wo(
|
|
1711
|
+
return wo(Ro, n);
|
|
1713
1712
|
}
|
|
1714
1713
|
const Vo = /* @__PURE__ */ a("ZodISODate", (n, t) => {
|
|
1715
1714
|
ye.init(n, t), y.init(n, t);
|
|
@@ -1765,25 +1764,25 @@ const Go = (n, t) => {
|
|
|
1765
1764
|
...t.checks ?? [],
|
|
1766
1765
|
...e.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
|
|
1767
1766
|
]
|
|
1768
|
-
})), n.clone = (e, o) => O(n, e, o), n.brand = () => n, n.register = (e, o) => (e.add(n, o), n), n.parse = (e, o) => Ho(n, e, o, { callee: n.parse }), n.safeParse = (e, o) => Yo(n, e, o), n.parseAsync = async (e, o) => qo(n, e, o, { callee: n.parseAsync }), n.safeParseAsync = async (e, o) => Xo(n, e, o), n.spa = n.safeParseAsync, n.encode = (e, o) => Qo(n, e, o), n.decode = (e, o) => nr(n, e, o), n.encodeAsync = async (e, o) => tr(n, e, o), n.decodeAsync = async (e, o) => er(n, e, o), n.safeEncode = (e, o) => or(n, e, o), n.safeDecode = (e, o) => rr(n, e, o), n.safeEncodeAsync = async (e, o) => ir(n, e, o), n.safeDecodeAsync = async (e, o) => sr(n, e, o), n.refine = (e, o) => n.check(Hr(e, o)), n.superRefine = (e) => n.check(qr(e)), n.overwrite = (e) => n.check(
|
|
1767
|
+
})), n.clone = (e, o) => O(n, e, o), n.brand = () => n, n.register = (e, o) => (e.add(n, o), n), n.parse = (e, o) => Ho(n, e, o, { callee: n.parse }), n.safeParse = (e, o) => Yo(n, e, o), n.parseAsync = async (e, o) => qo(n, e, o, { callee: n.parseAsync }), n.safeParseAsync = async (e, o) => Xo(n, e, o), n.spa = n.safeParseAsync, n.encode = (e, o) => Qo(n, e, o), n.decode = (e, o) => nr(n, e, o), n.encodeAsync = async (e, o) => tr(n, e, o), n.decodeAsync = async (e, o) => er(n, e, o), n.safeEncode = (e, o) => or(n, e, o), n.safeDecode = (e, o) => rr(n, e, o), n.safeEncodeAsync = async (e, o) => ir(n, e, o), n.safeDecodeAsync = async (e, o) => sr(n, e, o), n.refine = (e, o) => n.check(Hr(e, o)), n.superRefine = (e) => n.check(qr(e)), n.overwrite = (e) => n.check(J(e)), n.optional = () => bn(n), n.nullable = () => kn(n), n.nullish = () => bn(kn(n)), n.nonoptional = (e) => Vr(n, e), n.array = () => Er(n), n.or = (e) => Ar([n, e]), n.and = (e) => Tr(n, e), n.transform = (e) => $n(n, Fr(e)), n.default = (e) => Dr(n, e), n.prefault = (e) => Ur(n, e), n.catch = (e) => Wr(n, e), n.pipe = (e) => $n(n, e), n.readonly = () => Kr(n), n.describe = (e) => {
|
|
1769
1768
|
const o = n.clone();
|
|
1770
|
-
return
|
|
1769
|
+
return U.add(o, { description: e }), o;
|
|
1771
1770
|
}, Object.defineProperty(n, "description", {
|
|
1772
1771
|
get() {
|
|
1773
|
-
return
|
|
1772
|
+
return U.get(n)?.description;
|
|
1774
1773
|
},
|
|
1775
1774
|
configurable: !0
|
|
1776
1775
|
}), n.meta = (...e) => {
|
|
1777
1776
|
if (e.length === 0)
|
|
1778
|
-
return
|
|
1777
|
+
return U.get(n);
|
|
1779
1778
|
const o = n.clone();
|
|
1780
|
-
return
|
|
1779
|
+
return U.add(o, e[0]), o;
|
|
1781
1780
|
}, n.isOptional = () => n.safeParse(void 0).success, n.isNullable = () => n.safeParse(null).success, n)), Vn = /* @__PURE__ */ a("_ZodString", (n, t) => {
|
|
1782
1781
|
an.init(n, t), w.init(n, t);
|
|
1783
1782
|
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(Oo(...o)), n.includes = (...o) => n.check(Eo(...o)), n.startsWith = (...o) => n.check(So(...o)), n.endsWith = (...o) => n.check(Po(...o)), n.min = (...o) => n.check(M(...o)), n.max = (...o) => n.check(
|
|
1783
|
+
n.format = e.format ?? null, n.minLength = e.minimum ?? null, n.maxLength = e.maximum ?? null, n.regex = (...o) => n.check(Oo(...o)), n.includes = (...o) => n.check(Eo(...o)), n.startsWith = (...o) => n.check(So(...o)), n.endsWith = (...o) => n.check(Po(...o)), n.min = (...o) => n.check(M(...o)), n.max = (...o) => n.check(Rn(...o)), n.length = (...o) => n.check(Un(...o)), n.nonempty = (...o) => n.check(M(1, ...o)), n.lowercase = (o) => n.check(xo(o)), n.uppercase = (o) => n.check(jo(o)), n.trim = () => n.check(Io()), n.normalize = (...o) => n.check(Ao(...o)), n.toLowerCase = () => n.check(To()), n.toUpperCase = () => n.check(No());
|
|
1785
1784
|
}), ar = /* @__PURE__ */ a("ZodString", (n, t) => {
|
|
1786
|
-
an.init(n, t), Vn.init(n, t), n.email = (e) => n.check(Xe(cr, e)), n.url = (e) => n.check(oo(ur, e)), n.jwt = (e) => n.check(_o($r, e)), n.emoji = (e) => n.check(ro(dr, e)), n.guid = (e) => n.check(wn(zn, e)), n.uuid = (e) => n.check(Qe(
|
|
1785
|
+
an.init(n, t), Vn.init(n, t), n.email = (e) => n.check(Xe(cr, e)), n.url = (e) => n.check(oo(ur, e)), n.jwt = (e) => n.check(_o($r, e)), n.emoji = (e) => n.check(ro(dr, e)), n.guid = (e) => n.check(wn(zn, e)), n.uuid = (e) => n.check(Qe(V, e)), n.uuidv4 = (e) => n.check(no(V, e)), n.uuidv6 = (e) => n.check(to(V, e)), n.uuidv7 = (e) => n.check(eo(V, e)), n.nanoid = (e) => n.check(io(fr, e)), n.guid = (e) => n.check(wn(zn, e)), n.cuid = (e) => n.check(so(lr, e)), n.cuid2 = (e) => n.check(ao(pr, e)), n.ulid = (e) => n.check(co(hr, e)), n.base64 = (e) => n.check(go(zr, e)), n.base64url = (e) => n.check(vo(br, e)), n.xid = (e) => n.check(uo(mr, e)), n.ksuid = (e) => n.check(fo(gr, e)), n.ipv4 = (e) => n.check(lo(vr, e)), n.ipv6 = (e) => n.check(po(yr, e)), n.cidrv4 = (e) => n.check(ho(_r, e)), n.cidrv6 = (e) => n.check(mo(wr, e)), n.e164 = (e) => n.check(yo(kr, e)), n.datetime = (e) => n.check(Uo(e)), n.date = (e) => n.check(Lo(e)), n.time = (e) => n.check(Mo(e)), n.duration = (e) => n.check(Ko(e));
|
|
1787
1786
|
});
|
|
1788
1787
|
function A(n) {
|
|
1789
1788
|
return Ye(ar, n);
|
|
@@ -1794,7 +1793,7 @@ const y = /* @__PURE__ */ a("ZodStringFormat", (n, t) => {
|
|
|
1794
1793
|
ce.init(n, t), y.init(n, t);
|
|
1795
1794
|
}), zn = /* @__PURE__ */ a("ZodGUID", (n, t) => {
|
|
1796
1795
|
se.init(n, t), y.init(n, t);
|
|
1797
|
-
}),
|
|
1796
|
+
}), V = /* @__PURE__ */ a("ZodUUID", (n, t) => {
|
|
1798
1797
|
ae.init(n, t), y.init(n, t);
|
|
1799
1798
|
}), ur = /* @__PURE__ */ a("ZodURL", (n, t) => {
|
|
1800
1799
|
ue.init(n, t), y.init(n, t);
|
|
@@ -1841,7 +1840,7 @@ function xr(n) {
|
|
|
1841
1840
|
return Zo(Or, n);
|
|
1842
1841
|
}
|
|
1843
1842
|
const jr = /* @__PURE__ */ a("ZodArray", (n, t) => {
|
|
1844
|
-
Ie.init(n, t), w.init(n, t), n.element = t.element, n.min = (e, o) => n.check(M(e, o)), n.nonempty = (e) => n.check(M(1, e)), n.max = (e, o) => n.check(
|
|
1843
|
+
Ie.init(n, t), w.init(n, t), n.element = t.element, n.min = (e, o) => n.check(M(e, o)), n.nonempty = (e) => n.check(M(1, e)), n.max = (e, o) => n.check(Rn(e, o)), n.length = (e, o) => n.check(Un(e, o)), n.unwrap = () => n.element;
|
|
1845
1844
|
});
|
|
1846
1845
|
function Er(n, t) {
|
|
1847
1846
|
return Fo(jr, n, t);
|
|
@@ -1917,15 +1916,15 @@ function Wn(n, t) {
|
|
|
1917
1916
|
});
|
|
1918
1917
|
}
|
|
1919
1918
|
const Nr = /* @__PURE__ */ a("ZodTransform", (n, t) => {
|
|
1920
|
-
|
|
1919
|
+
De.init(n, t), w.init(n, t), n._zod.parse = (e, o) => {
|
|
1921
1920
|
if (o.direction === "backward")
|
|
1922
1921
|
throw new On(n.constructor.name);
|
|
1923
1922
|
e.addIssue = (i) => {
|
|
1924
1923
|
if (typeof i == "string")
|
|
1925
|
-
e.issues.push(
|
|
1924
|
+
e.issues.push(C(i, e.value, t));
|
|
1926
1925
|
else {
|
|
1927
1926
|
const s = i;
|
|
1928
|
-
s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = e.value), s.inst ?? (s.inst = n), e.issues.push(
|
|
1927
|
+
s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = e.value), s.inst ?? (s.inst = n), e.issues.push(C(s));
|
|
1929
1928
|
}
|
|
1930
1929
|
};
|
|
1931
1930
|
const r = t.transform(e.value, e);
|
|
@@ -1939,7 +1938,7 @@ function Fr(n) {
|
|
|
1939
1938
|
});
|
|
1940
1939
|
}
|
|
1941
1940
|
const Mn = /* @__PURE__ */ a("ZodOptional", (n, t) => {
|
|
1942
|
-
|
|
1941
|
+
Re.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType;
|
|
1943
1942
|
});
|
|
1944
1943
|
function bn(n) {
|
|
1945
1944
|
return new Mn({
|
|
@@ -1959,7 +1958,7 @@ function kn(n) {
|
|
|
1959
1958
|
const Jr = /* @__PURE__ */ a("ZodDefault", (n, t) => {
|
|
1960
1959
|
Ve.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType, n.removeDefault = n.unwrap;
|
|
1961
1960
|
});
|
|
1962
|
-
function
|
|
1961
|
+
function Dr(n, t) {
|
|
1963
1962
|
return new Jr({
|
|
1964
1963
|
type: "default",
|
|
1965
1964
|
innerType: n,
|
|
@@ -1968,11 +1967,11 @@ function Rr(n, t) {
|
|
|
1968
1967
|
}
|
|
1969
1968
|
});
|
|
1970
1969
|
}
|
|
1971
|
-
const
|
|
1970
|
+
const Rr = /* @__PURE__ */ a("ZodPrefault", (n, t) => {
|
|
1972
1971
|
Le.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType;
|
|
1973
1972
|
});
|
|
1974
1973
|
function Ur(n, t) {
|
|
1975
|
-
return new
|
|
1974
|
+
return new Rr({
|
|
1976
1975
|
type: "prefault",
|
|
1977
1976
|
innerType: n,
|
|
1978
1977
|
get defaultValue() {
|
|
@@ -2041,8 +2040,8 @@ const Zn = Ln({
|
|
|
2041
2040
|
statusId: X(),
|
|
2042
2041
|
typeId: Wn(["app", "engine", "connector", "context", "informer", "presenter"]),
|
|
2043
2042
|
version: A()
|
|
2044
|
-
}),
|
|
2045
|
-
async function
|
|
2043
|
+
}), N = Xn(qn);
|
|
2044
|
+
async function ti() {
|
|
2046
2045
|
try {
|
|
2047
2046
|
console.info("🚀 Building configuration...");
|
|
2048
2047
|
const n = JSON.parse(await h.readFile("package.json", "utf8")), t = JSON.parse(await h.readFile("config.json", "utf8"));
|
|
@@ -2051,7 +2050,7 @@ async function ei() {
|
|
|
2051
2050
|
console.error("❌ Error building configuration.", n);
|
|
2052
2051
|
}
|
|
2053
2052
|
}
|
|
2054
|
-
async function
|
|
2053
|
+
async function ei(n) {
|
|
2055
2054
|
try {
|
|
2056
2055
|
console.info(`🚀 Building public directory index for identifier '${n}'...`);
|
|
2057
2056
|
const t = {};
|
|
@@ -2085,7 +2084,7 @@ async function oi(n) {
|
|
|
2085
2084
|
console.error("❌ Error building public directory index.", t);
|
|
2086
2085
|
}
|
|
2087
2086
|
}
|
|
2088
|
-
async function
|
|
2087
|
+
async function oi() {
|
|
2089
2088
|
try {
|
|
2090
2089
|
console.info("🚀 Building connector configuration...");
|
|
2091
2090
|
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");
|
|
@@ -2101,7 +2100,7 @@ async function ri() {
|
|
|
2101
2100
|
console.error("❌ Error building connector configuration.", n);
|
|
2102
2101
|
}
|
|
2103
2102
|
}
|
|
2104
|
-
async function
|
|
2103
|
+
async function ri() {
|
|
2105
2104
|
try {
|
|
2106
2105
|
console.info("🚀 Building context configuration...");
|
|
2107
2106
|
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]);
|
|
@@ -2110,7 +2109,7 @@ async function ii() {
|
|
|
2110
2109
|
console.error("❌ Error building context configuration.", n);
|
|
2111
2110
|
}
|
|
2112
2111
|
}
|
|
2113
|
-
async function
|
|
2112
|
+
async function ii() {
|
|
2114
2113
|
try {
|
|
2115
2114
|
console.info("🚀 Building informer configuration...");
|
|
2116
2115
|
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]);
|
|
@@ -2119,7 +2118,7 @@ async function si() {
|
|
|
2119
2118
|
console.error("❌ Error building informer configuration.", n);
|
|
2120
2119
|
}
|
|
2121
2120
|
}
|
|
2122
|
-
async function
|
|
2121
|
+
async function si() {
|
|
2123
2122
|
try {
|
|
2124
2123
|
console.info("🚀 Building presenter configuration...");
|
|
2125
2124
|
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]);
|
|
@@ -2128,7 +2127,7 @@ async function ai() {
|
|
|
2128
2127
|
console.error("❌ Error building context configuration.", n);
|
|
2129
2128
|
}
|
|
2130
2129
|
}
|
|
2131
|
-
async function
|
|
2130
|
+
async function ai() {
|
|
2132
2131
|
try {
|
|
2133
2132
|
console.info("🚀 Bumping version...");
|
|
2134
2133
|
const n = JSON.parse(await h.readFile("package.json", "utf8"));
|
|
@@ -2141,10 +2140,10 @@ async function ci() {
|
|
|
2141
2140
|
console.error("❌ Error bumping package version.", n);
|
|
2142
2141
|
}
|
|
2143
2142
|
}
|
|
2144
|
-
function
|
|
2143
|
+
function ci(n) {
|
|
2145
2144
|
console.error(`❌ ${n} script not implemented.`);
|
|
2146
2145
|
}
|
|
2147
|
-
async function
|
|
2146
|
+
async function ui() {
|
|
2148
2147
|
try {
|
|
2149
2148
|
console.info("🚀 Sending deployment notice...");
|
|
2150
2149
|
const n = JSON.parse(await h.readFile("config.json", "utf8")), t = {
|
|
@@ -2158,16 +2157,16 @@ async function di() {
|
|
|
2158
2157
|
console.error("❌ Error sending deployment notice.", n);
|
|
2159
2158
|
}
|
|
2160
2159
|
}
|
|
2161
|
-
async function
|
|
2160
|
+
async function di() {
|
|
2162
2161
|
try {
|
|
2163
2162
|
console.info("🚀 Synchronising with GitHub....");
|
|
2164
2163
|
const n = JSON.parse(await h.readFile("package.json", "utf8"));
|
|
2165
|
-
await
|
|
2164
|
+
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
2165
|
} catch (n) {
|
|
2167
2166
|
console.error("❌ Error synchronising with GitHub.", n);
|
|
2168
2167
|
}
|
|
2169
2168
|
}
|
|
2170
|
-
async function
|
|
2169
|
+
async function fi(n, t) {
|
|
2171
2170
|
try {
|
|
2172
2171
|
console.info("🚀 Uploading directory to R2....");
|
|
2173
2172
|
async function e(r, i, s) {
|
|
@@ -2178,7 +2177,7 @@ async function li(n, t) {
|
|
|
2178
2177
|
await e(u, d, p);
|
|
2179
2178
|
} else {
|
|
2180
2179
|
console.info(`⚙️ Uploading '${r}/${c}'.`);
|
|
2181
|
-
const p = `wrangler r2 object put "datapos-sample-data-eu/${i}/${c}" --file="${r}/${c}" --jurisdiction=eu --remote`, m = await
|
|
2180
|
+
const p = `wrangler r2 object put "datapos-sample-data-eu/${i}/${c}" --file="${r}/${c}" --jurisdiction=eu --remote`, m = await N(p);
|
|
2182
2181
|
if (m.stderr) throw new Error(m.stderr);
|
|
2183
2182
|
}
|
|
2184
2183
|
}
|
|
@@ -2189,7 +2188,7 @@ async function li(n, t) {
|
|
|
2189
2188
|
console.error("❌ Error uploading directory to R2.", e);
|
|
2190
2189
|
}
|
|
2191
2190
|
}
|
|
2192
|
-
async function
|
|
2191
|
+
async function li() {
|
|
2193
2192
|
try {
|
|
2194
2193
|
console.info("🚀 Uploading module configuration....");
|
|
2195
2194
|
const n = JSON.parse(await h.readFile("config.json", "utf8")), t = n.id, e = {
|
|
@@ -2203,7 +2202,7 @@ async function pi() {
|
|
|
2203
2202
|
console.error("❌ Error uploading module configuration.", n);
|
|
2204
2203
|
}
|
|
2205
2204
|
}
|
|
2206
|
-
async function
|
|
2205
|
+
async function pi(n, t) {
|
|
2207
2206
|
try {
|
|
2208
2207
|
console.info("🚀 Uploading module to R2...");
|
|
2209
2208
|
const o = `v${JSON.parse(await h.readFile("package.json", "utf8")).version}`;
|
|
@@ -2214,28 +2213,29 @@ async function hi(n, t) {
|
|
|
2214
2213
|
if (u.isDirectory())
|
|
2215
2214
|
await r(d, l);
|
|
2216
2215
|
else {
|
|
2217
|
-
const p = `${t}/${o}/${l}`.replace(/\\/g, "/"), m = u.name.endsWith(".js") ? "application/javascript" : u.name.endsWith(".css") ? "text/css" : "application/octet-stream";
|
|
2216
|
+
const p = `${t}/${o}/${l}`.replace(/\\/g, "/"), m = u.name.endsWith(".js") ? "application/javascript" : u.name.endsWith(".css") ? "text/css" : "application/octet-stream", { stderr: z } = await N(`wrangler r2 object put "${p}" --file="${d}" --content-type ${m} --jurisdiction=eu --remote`);
|
|
2217
|
+
if (z) throw new Error(z);
|
|
2218
2218
|
console.info(`✅ Uploaded ${l} → ${p}`);
|
|
2219
2219
|
}
|
|
2220
2220
|
}
|
|
2221
2221
|
}
|
|
2222
|
-
await r(
|
|
2222
|
+
await r("dist"), console.info("✅ Module uploaded to R2.");
|
|
2223
2223
|
} catch (e) {
|
|
2224
2224
|
console.error("❌ Error uploading module to R2.", e);
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
2227
|
export {
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2228
|
+
ti as buildConfig,
|
|
2229
|
+
oi as buildConnectorConfig,
|
|
2230
|
+
ri as buildContextConfig,
|
|
2231
|
+
ii as buildInformerConfig,
|
|
2232
|
+
si as buildPresenterConfig,
|
|
2233
|
+
ei as buildPublicDirectoryIndex,
|
|
2234
|
+
ai as bumpVersion,
|
|
2235
|
+
ci as echoScriptNotImplemented,
|
|
2236
|
+
ui as sendDeploymentNotice,
|
|
2237
|
+
di as syncWithGitHub,
|
|
2238
|
+
fi as uploadDirectoryToR2,
|
|
2239
|
+
li as uploadModuleConfigToDO,
|
|
2240
|
+
pi as uploadModuleToR2
|
|
2241
2241
|
};
|
package/package.json
CHANGED